You are on page 1of 28

Department of Signals and Systems

ESS101- Modeling and Simulation


Lecture 7

Paolo Falcone
Department of Signals and Systems
Chalmers University of Technology
Gteborg, Sweden

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

Physical modelling

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

Department of Signals and Systems

September 9, 2016

Department of Signals and Systems

Physical modeling. Three phases method

Structuring
Divide into subsystems
Inputs, outputs, internal variables?

Graph or block diagram

Relationships
Conservation laws
Constitutive relations

differential equations
and algebraic relationships

Form state-space model


Choose state variables
Rearrange the equations

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

x = Ax + Bu
y = Cx + Du
September 9, 2016

Department of Signals and Systems

System identification

Limitations in physical modeling:


Constitutive relationships may be unknown
Physical parameters may be either unknown or
highly uncertain
The problem is too complex
Basic idea in SysId

System

Collect measurements of u and y and find a


model for the System fitting the collected data

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

System identification

Department of Signals and Systems

w(t) input
disturbance

u(t)
System

y(t)
ey(t) measurement
noise

eu(t) measurement
noise

u(kT)

y(kT)

Model derived from input and output


measurements
In practice, measurements are noisy (eu, ey) and
system is affected by disturbances
Goal. Model the effects of disturbances
Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

Today (Chapter 3)

Department of Signals and Systems

Disturbance modeling
Deterministic models in time domain
Stochastic models in time domain
Deterministic models in the frequency domain
Stochastic models in the frequency domain

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

Department of Signals and Systems

Time domain deterministic models

IDEA: to describe the disturbance signal as the output of a


dynamical model
x! w (t ) = f (xw (t ), uw (t ) )
w(t ) = g (xw (t ), uw (t ) )

or

W ( s) = Gw (s)U w ( s)

if f and g are linear

where typical choices for uw are pulse, pulse train or


sinusoids. In discrete time
w(k + n) + d1w(k + n 1) + ! + d n w(k ) =
c0uw (k + n) + c1uw (k + n 1) + ! + cnuw (k )

or
c0 z n + c1 z n 1 + ! + cn
Gw ( z ) = n
z + d1 z n 1 + ! + d n
Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

Examples in
the textbook
September 9, 2016

Department of Signals and Systems

Time domain stochastic models

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

Department of Signals and Systems

Time domain stochastic models

We describe a signal through a stochastic model when we are not


able to predict it. E.g., the wind gust velocity.
Although such a signal cannot be predicted, a guess can be made on
its expected value, based on its stochastic characterizations

A signal x(t) can be viewed as a Random Variable (RV). As such, x(t)


can be characterized by means of its Cumulative Distribution Function
(CDF)

Fx (x,t) = Pr{x(t) x}

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

Department of Signals and Systems

Time domain stochastic models


CDF can be interpreted as

N(x,t)
Fx (x,t) = lim
N
N

where N(x,t) is the number of times x(t) is


below the threshold x over N realizations
(tosses)

For the RV x(t), we also define the Probability Density Function


(PDF) as

Fx (x,t)
f x (x,t) =
x
Its integral, over a range of x, is the probability the value of the RV
falls in that range

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

10

Department of Signals and Systems

Time domain stochastic models

A RV can be more compactly described by mean of the expected


value or mean

mx (t) = E[x(t)] =

xf x (x, t)dx

the covariance

Rx (t,s) = E ( x(t) mx (t))( x(s) mx (s))


the cross covariance

Rxw (t) = E ( x(t) mx (t))( w(t) mw (t))

zero for independent random variables


the variance

Paolo Falcone (CHALMERS)

Vx (t) = Rx (t,t)
ESS101 Modeling and Simulation

September 9, 2016

11

Stationary signals

Department of Signals and Systems

A signal x(t) is stationary if m x (t) = m x


the covariance Rx (t,s) = Rx (t s) = Rx ( )

the cross covariance Rxw (t) = Rxw

the variance Vx (t) = Vx

That is, the signal x(t) is stationary if


its stochastic
characterizations do not depend on the time

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

12

Special signals. White noise

Department of Signals and Systems

A white noise e(t) is a sequence of independent, normally distributed


stochastic variables
f (x) =

1
2

(x ) 2

e(t) N (0, )

2 2

=2

Mean Variance

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

13

Department of Signals and Systems

White noise

White Noise. Used to describe disturbances and noises in


engineering systems. A sequence of independent, normally
distributed random variables

( me (t) = me = 0
e(t) N(0, ) )
* Re (t,s) = Re (t s) = Re ( ) = ( )
Colored Noise. Obtained from white noise by filtering it through
linear systems.

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

14

Stochastic processes. Exercise.

Department of Signals and Systems

e(t ) N (0,1)
e(t )

1
H ( z) =
1 0.9 z 1

w(t )

Compute mean and covariance of w(t).


Watch out the covariance!!
Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

15

Department of Signals and Systems

Exercise

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

16

Department of Signals and Systems

Covariance

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

18

Department of Signals and Systems

Frequency domain models

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

19

Department of Signals and Systems

(Density) Spectrum

w ( ) describes the frequency content of the signal w(t)


2

w ( )d

is a measure of the signal energy in the frequency

interval 1 , 2

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

20

Department of Signals and Systems

Spectrum. Continuous deterministic signals


Consider the signal w(t ), < t < with

w(t ) dt <

The spectrum is defined as:


w ( ) = W ()

where

W ( ) = w(t )e it dt

(Fourier transform)

Recall that

w(t) =

a e
n

n=
Paolo Falcone (CHALMERS)

in t

with

1
an =
T

ESS101 Modeling and Simulation

T
2
T

w(t)e

!
2
i nt
T

September 9, 2016

dt
21

Department of Signals and Systems

Spectrum. Sampled deterministic signals


Consider the signal w(k ), < t < with

w(kT ) <

k =

The spectrum is defined as:


T
w

( ) = W ( )

where

W T ( ) = T w(k)e ikT

(Fourier transform)

k =

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

22

Department of Signals and Systems

Spectrum. Sampled stochastic processes

The spectrum for a sampled stochastic signal w(k) is


defined as
k =

Tw ( ) = T Rw ( kT )e ikT
k =

The cross spectrum of two signals u and y is defined as

k =

Tyu ( ) = T Ryu ( kT )e ikT


k =

and provide information their joint variation

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

23

Department of Signals and Systems

Examples

f = 200Hz

f = 100Hz

x(t) = cos(2ft) + n(t)


f = 300Hz

Paolo Falcone (CHALMERS)

f = 400Hz

ESS101 Modeling and Simulation

September 9, 2016

24

Department of Signals and Systems

Example

Lets calculate the spectrum of a white noise w(t) with


variance
Use the definition of spectrum for stochastic signals
k =

Tw ( ) = T Rw ( kT )e ikT
k =

Recall that Re (t) = ( t )

Hence

Paolo Falcone (CHALMERS)

Tw ( ) = T
ESS101 Modeling and Simulation

September 9, 2016

25

Spectra and linear systems

Department of Signals and Systems

Consider the sampled signal y(k) obtained as output of


a linear system
y(k) = G(q)u(k) + v(k)

where u(k) and v(k) are uncorrelated


Ty ( ) and Tyu ( ) are given by
The spectra
T
y

( ) = G(i ) Tu ( ) + Tv ( )

Tyu ( ) = G(i )Tu ( )

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

26

Department of Signals and Systems

Spectra and linear systems. Example

Let w(t) be a stationary stochastic process. w(t) is


generated from the time discrete relation

w(t ) 0.4w(t 1) = e(t ) 0.5e(t 1)


where e(t) is white noise with variance . Determine the
spectrum of w(t)

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

27

Department of Signals and Systems

Example. Vehicle Dynamics


Ftractive

Fwind
mv! = Ftractive Froll Fwind Fgrade
with

Fgrade

mg

Froll

Froll = kmgsign (v)


1
C x A(v vwind )2
2
= mg sin

Fwind =
Fgrade

The road grade might be available (e.g., through GPS and maps).
Wind velocity is not
Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

September 9, 2016

29

Road slope spectra

Paolo Falcone (CHALMERS)

ESS101 Modeling and Simulation

Department of Signals and Systems

September 9, 2016

30

You might also like