Professional Documents
Culture Documents
Brunel University
» Modelling and Simulation of Dynamic Systems
˃ I/O models
˃ State-space models
˃ Linear state equations
˃ Time invariant systems
˃ Open Loop closed Loop systems
2
1. Define system boundaries and specifications
2. Specify system Inputs/Outputs (i.e. system variables)
3. Understand and estimate the components of the
system using models
4. Draw the systems components diagram
5. Write systems equations:
˃ physical laws (constitutive),
˃ continuity equation for through variables, e.g. equilibrium of forces at
joints, current balance at nodes, …)
˃ Cross variables (equations for velocity, voltage, pressure drop, …)
6. Express system boundary conditions and response
initial conditions using system variables.
3
» State variables are the minimal set of variables that
describe the dynamic state of a system.
4
» A state vector x is a column vector of 𝑥1 , 𝑥2 , … 𝑥𝑛
variables that describe the state of a dynamic system.
» 𝑛 is the number of state variables and represents the
order of the system.
5
» Property 2: System output 𝒚 𝑡1 is determined by the
state 𝑥(𝑡1 ) and input (excitation) 𝑢(𝑡1 ) at any given
time 𝑡1 . Expressed as:
𝑦 𝑡1 = 𝒉(𝑡1 , 𝑥 𝑡1 , 𝒖 𝑡1 ) (2)
6
» A state model thus consists of n state equations (first-
order ordinary differential equations (time domain),
which are coupled. First order
» In the vector for expressed as: Differential
Equation
𝑥 = 𝑓 𝑥, 𝑢, 𝑡 3
𝑦 = ℎ 𝑥, 𝑢, 𝑡 4 Algebraic
Output
equation
» Example of first order linear differential equation:
𝑥1 = 𝑥1 + 2𝑥2
𝑥2 = 3𝑥1 + 2𝑥2
We call it coupled because you need the knowledge of one variable to
find the other.
7
An nth order linear state model is given by the differential
state equations as:
x1 a11x1 a12 x2 ... a1n xn b11u1 b12u2 ... b1r ur
x2 a21x1 a22 x2 ... a2 n xn b21u1 b22u2 ... b2 r ur
.
(5)
.
xn an1 x1 a12 x2 ... ann xn bn1u1 bn 2u2 ... bnrur
dx
Where, x1 ; x1 , x2 ,...xn are the state variables and u1...r
dt
Are the input variables.
8
The algebraic output equations are thus:
9
» The vector-matrix form of equations (5 and 6):
x Ax Bu (7)
y Cx Du (8)
x1 x1
x x a11 a12 ... a1n
a
2 2 a ... a
. . 21 22 2 n
x ; x ; A . . ;
.
.
. . . .
an1 an1 ... a2 n
n
xn
x
b11 b12 ... b1r c11 c12 ... c1n d11 d12 ... d1r
b ... b2 r c d ... d 2 r
21 b22 21 c22 ... c2 n 21 d 22
B
. .
; C . .
; D . .
. ... ... . . ... ... . . ... ... .
. . . . . .
bn1 bn 2 ... bnr cm1 cm 2 ... cmn d m1 dm2 ... d mr
10
» State, output, order of a system, and system initial state
» According to Newton’s second Law, the rectilinear motion of
a mass (m) with respect to an input force u(t), the position x
can be expressed as:
d 2x
m 2 u (t ) or mx u 0 (9)
dt
d 2 y1
m 2 u (t )
3. the two outputs y1 x and y2 v x
dt
dy
m 2 u (t )
dt 11
The state space model:
dx
1. Define the two state variables when x1 x ; x2
dt
then:
1
x1 x2 the State equation : x2 u (t )
m
output equation : y x1
1
x1 x2 the State equation : x2 u (t )
m
y1 1 0 x1
output equation : x
2
y 0 1 2 Vector Matrix
Illustration
12
The state space model:
1
2. Define the two state variable when x1 6 x and x2 ( x1 )
2
x1 2 x2
State equations:
3
x2 u (t )
m
1
output equation: y x1 then one state equation is given by one of the
6 definitions itself, and the other state equation is obtained by
x1 2 x2 substituting the two definitions in into equation (9).
3
x2 u (t )
m
y1 1 6 0 x1
output equation : Vector Matrix
y 2 0 1 x2
3
Illustration
1
−2 × (− ) 13
6
» State vector is the minimum set of variables that
determines the dynamic state of a system.
» State vectors are not unique and may choices are possible
for a given system
» Output variables can be determined from any choice of
state variable.
» State variables may or may not have physical
representation.
14
If 𝑥 = 𝑓 𝑥, 𝑢, 𝑡 and 𝑦 = ℎ 𝑥, 𝑢, 𝑡 are not explicitly time
dependent pointing to the fact that equations (7 & 8):
x Ax Bu
y Cx Du
are constant.
15
Open Loop Systems
disturbance disturbance
16
disturbance disturbance
Closed Loop (Feedback) System
input + Process + +
input + + output
controller or
trans. Plant
-
measurement
transducer
or sensor
17
» Transfer-function models (Laplace transfer-functions) are
based on the Laplace transform.
» Means to represent dynamic models in Laplace domains
» Frequency Domain models (frequency transfer functions)
are special case of Laplace domain models, and are based
on Fourier transform
» They are interchangeable
» Systems with single I/O can be represented uniquely by one
transfer function
» System with 2 or more I/O (input and output vectors) need
several transfer functions
» Only minimum knowledge of the theory of Laplace and
Fourier transform is needed to use transfer functions for
modelling
18
» The Laplace transform converts :
˃ differentiation into a multiplication by the Laplace variable “s”. And
˃ Integration into division by “s”.
By setting the 𝑠 = 𝑗𝜔
Complex (non-real) variable
Where 𝜔 is the frequency variable.
20
The Laplace transform is linear so as:
21
Based on equation (10):
∞
Initial condition
−𝑠𝑡
𝑑𝑦
𝐿𝑦 = 𝑒 𝑑𝑡 = sY s − y(0)
𝑑𝑡 (13)
0
By continuously applying equation (11) we can achieve Laplace
transform of the higher derivatives:
𝐿𝑦 = 𝑠𝐿 𝑦𝑡 − 𝑦 0 = 𝑠 𝑠𝑌 𝑠 − 𝑦 0 − 𝑦 0
𝑡 ∞ 𝑡 ∞ 𝑡
1 𝑑 −𝑠𝑡
𝐿 𝑦 𝜏 𝑑𝜏 = 𝑒 −𝑠𝑡 𝑦 𝜏 𝑑 𝜏𝑑𝑡 = − (𝑒 ) 𝑦 𝜏 𝑑𝜏𝑑𝑡
𝑠 𝑑𝑡
0 0 0 0 0
23
» The Fourier transform is the process of converting from time
domain to frequency domain:
∞
Fourier inverse:
∞
1
𝑦 𝑡 = 𝑌 𝑗𝜔 exp 𝑗𝜔𝑡 𝑜𝑟 𝑦 𝑡 = 𝐹 −1 𝑌(𝑗𝜔) (19)
2𝜋
−∞
24
1st order system I/O model:
output 𝑦 𝑡 : L 𝑦 𝑡 = 𝑌(𝑠)
input 𝑥 𝑡 : L 𝑥 𝑡 = 𝑋(𝑠)
𝑑𝑦
+ 2𝑦 𝑡 = 6𝑢(𝑡)
𝑑𝑡
Taking the Laplace Transform: L 𝑦 = 𝑠𝑌 𝑠 − 𝑦 0
𝑠𝑌 𝑠 − 𝑦 0 + 2 𝑦 = 6𝑈 𝑠
𝑠 + 2 𝑌 𝑠 = 𝑦 0 + 6𝑈 𝑠
𝑦(0) 6𝑈(𝑠)
𝑌 𝑠 = + Forced response
𝑠+2 𝑠+2
Free response
for a linear system, the total response is the sum of the responses to the initial
conditions (the free response) and the input (the forced response) applied
separately (superimposition).
25
» can determine the Laplace transform of signals from its
definition - rather use table of standard transforms.
» Two basic functions are:
˃ Unit impulse 𝛿 𝑡
1, 𝑡≥0
˃ Unit step H(t)=
0, 𝑡<0
looks like H t
1
0 t
Corresponding Laplace transforms: 𝛿 𝑡 ↔ 1 unit impulse
1
𝐻(𝑡) ↔ unit step
𝑠
26
» Delayed time function: 𝑦 𝑡 − 𝜏 𝐻 𝑡 − 𝜏 ↔ 𝑒 −𝑠𝜏 𝑌 𝑠
1
Exponential decay: 𝑒 −𝑎𝑡 𝐻 𝑡 ↔
𝑠+𝑎
𝜔
𝑠𝑖𝑛𝜔𝑡 𝐻 𝑡 ↔
𝑠2 + 𝜔2
𝑠
𝑐𝑜𝑠𝜔𝑡 𝐻(𝑡) ↔ 2
𝑠 + 𝜔2
27
And various functions can be included
𝑒 −𝑎𝑡 𝑦 𝑡 𝐻 𝑡 ↔ 𝑌 𝑠 + 𝑎
𝜔
𝑒 −𝑎𝑡 𝑠𝑖𝑛𝜔𝑡𝐻(𝑡) ↔
𝑠 + 𝑎 2 + 𝜔2
(𝑠 + 𝑎)
𝑒 −𝑎𝑡 𝑐𝑜𝑠𝜔𝑡𝐻(𝑡) ↔
and (𝑠 + 𝑎)2 +𝜔 2
1
𝑡𝐻 𝑡 ↔ 2
𝑠
𝑛!
𝑡𝑛𝐻 𝑡 ↔
𝑠 𝑛+1
𝑛
𝑑
𝑡 𝑛 𝑦 𝑡 𝐻 𝑡 ↔ −1 𝑛 𝑛 𝑌 𝑠
𝑑𝑠
−𝑎𝑡
1
𝑡𝑒 𝐻(𝑡) ↔
(𝑠 + 𝑎)2
28
» we are interested in the value at which a signal “settles
down” i.e. the steady state or final value
lim 𝑓(𝑡)
𝑡→∞
Given by:
lim 𝑓 𝑡 = lim 𝐹(𝑠)
𝑡→∞ 𝑠→∞
29
» Remember the 1st order LDE I/O example:
If 𝑢 𝑡 = 0 ∀𝑡 ∴ 𝑈 𝑠 = 0
So
𝑦(0) 1
𝑌 𝑠 = = 𝑦(0) y(0) is a constant
𝑠+2 𝑠+2
6 3 3
And 𝑌 𝑠 = = − by partial fraction expansion:
𝑠(𝑠+2) 𝑠 𝑠+2
31