Professional Documents
Culture Documents
Dynamical Systems
A Practical Control System
(bias noise)
Window opening/closing
(random noise)
2
Another Practical Control System
Ref.: K. Ogata,
Modern Control Engineering
3rd Ed., Prentice Hall, 1999.
noise
Water level control in an overhead tank
3
State Space Representation
noise
Input variable: Y → Y*
control
• Manipulative (control) System
• Non-manipulative (noise) Z
Controller
Output variable:
Variables of interest that can be either be
measured or calculated
State variable:
Minimum set of parameters which completely
summarize the system’s status.
4
Definitions
State : The state of a dynamic system is the smallest
number of variables (called state variables)
such that the knowledge of these variables at t = t0 ,
together with the knowledge of the input for t = t0 ,
completely determine the behaviour of the system
for any time t t0 .
6
Critical Considerations while
Selecting State Variables
Minimum number of variables
• Minimum number of first-order differential equations
needed to describe the system dynamics completely
• Lesser number of variables: won’t be possible to
describe the system dynamics
• Larger number of variables:
• Computational complexity
• Loss of either controllability, or observability or both.
Linear independence. If not, it may result in:
• Bad: May not be possible to solve for all other system
variables
• Worst: May not be possible to write the complete state
equations
7
State Variable Selection
Typically, the number of state variables (i.e.
the order of the system) is equal to the
number of independent energy storage
elements. However, there are exceptions!
9
Generic State Space
Representation
x1 .... xn u1 .... um
T n T m
X , U
x1 f1 (t , x1 ... xn , u1 ... um
= , t +
x f (t , x ... x , u ... u
n n 1 n 1 m
X f ( t , X ,U )
Generic State Space Representation
T
Y y1 .... y p p
y1 h1 (t , x1 ... xn , u1 ... um
= , t +
y h (t , x ... x , u ... u
p p 1 n 1 m
Y h ( t , X ,U )
Summary:
X = f ( X ,U ) X R n ,U R m
Y = h( X ,U ) Y Rp
Linear System
X = AX + BU
Y = CX + DU
A = System matrix − n n
B = Input matrix − n m
C = Output matrix − p n
D = Feed forward matrix − p m
Block diagram representation of
linear systems
13
Writing Differential Equations in First
Companion Form
(Phase variable form/Controllable canonical form)
dny d n −1 y
n
+ an −1 n −1
+ ..... + a0 y = u
dt dt
Choose output y(t ) and its (n -1) derivatives as state variables
dy
x1 = y x1 = dt
dy
x2 = x = d y
2
dt 2 2
→ differentiating → dt
n −1
x = d y n
d y
−
xn = n
n n 1
dt
dt
First Companion Form
(Controllable Canonical Form)
x1 0 1 0 0 0 ... 0 0 x1
x 0 0 1 0 0 ... 0 0 x 0
2 2 0
x3 0 0 0 1 0 ... 0 0 x3
0
= + u
0
0
xn −1 0 0 0 0 0 0 0 1 xn −1
0
n −a0
x −a1 −a2 ... ... ... ... −an −1 xn
x1
x
2
x3
y = 1 0 0 ... ... 0 + 0 u
xn −1
n
x
Example – 1
Dynamical system : x + 3x + 2 x = u
y=x
State variables:
x1 x, x2 x
x1 = x2 , x2 = -2 x1 - 3x2 + u
hence, x1 0 1 x1 0
x = −2 −3 x + 1 u
2 2
X A X B
x1
y = 1 0 + 0 u
C x2 D
Example – 2
(spring-mass-damper system)
System dynamics :
my + cy + ky = bu
State variables:
x1 y, x2 y
State dynamics :
y x2
1
x
x = 1 b = 1 b
2 (−ky − cy ) + u (−ky − cx2 ) + u
m m m m
X
Example – 2
(spring-mass-damper system)
State dynamics :
0 1 0
1
x 1
x
x = k c + b u
2 − − x2
m m m
Output equation :
y x1
y = 1 ... 0 X + 0 u
Example – 3:
Translational Mechanical System
d 2 x1 dx
M1 2 + D 1 + K (x1 − x2 ) = 0
dt dt
d 2 x2
M 2 2 + K ( x2 − x1 ) = f (t )
dt
19
Example – 3:
Translational Mechanical System
dx1 dx2
Define : v1 , v2
dt dt
System equations :
dv1 K D K
=− x1 − v1 + x2
dt M1 M1 M1
dv2 K K 1
= x1 − x2 + f (t )
dt M 2 M2 M2
dt
M1 M1
x˙2= v2
1
v˙2 = −
K
( 2 1) +
x − x
3
f (t )
M2 M2
21
Example – 5
The Ball and Beam System
The beam can rotate by applying a torque at the
centre of rotation, and ball can move freely along
the beam
22
Example – 5
The Ball and Beam System
State Space Model x1 = r, x2 = r˙, x3 = , x4 = ˙
x˙1 = x2
−mg sin x1 + m x4x2
x˙2 =
Jb
m+ 2
R
x˙3= x4
x˙4 =
− mg x1 cos x3 − 2mx1 x2 x4
m x1 + J +J b
2
23
Example – 6: Van-der Pol’s Oscillator
(Limit cycle behavior)
Equation :
Mx + 2c ( x 2 − 1) x + kx = 0 c, k 0
State variables:
x1 x, x 2 x
x2
1
x : Homogeneous nonlinear system
=
x
2 −
m
2c
( x1 − 1) x2 −
2 k
x1
m
X
F(X )
Example – 7: Spinning Body Dynamics
(Satellite dynamics)
Dynamics :
I 2 − I3 1
1 = 23 + 1
I1 I1
I 3 − I1 1
2 = 31 + 2
I2 I2
I1 − I 2 1
3 = 23 + 3
I3 I3
I1 , I 2 , I 3 : MI about principal axes
1 , 2 , 3 : Angular velocities about principal axes
1 , 2 , 3 : Torques about principal axes
Transfer Function ↔ State Space
Find the transfer function of the system with state space representation
We start by multiplying by Z(s)/Z(s) and then solving for Y(s) and U(s) in
terms of Z(s). We also convert back to a differential equation.
Again we note that y=q1 and we call the integral terms q3:
x (t ) = Ax(t ) + Bu (t )
y(t ) = Cx(t ) + Du(t )
Along with this, consider another state space model of the same plant
Here the state vector 𝑥,ҧ say, represents the physical state relative to
some other reference, or even a mathematical coordinate vector.
x (t ) = A x (t ) + B u (t )
y (t ) = C x (t ) + D u (t )
Similarity Transformations
x(t ) = T x (t )
Where T is a nonsingular nxn transformation matrix.
x (t ) = T −1 x(t )
Similarity Transformations
The transformed state 𝑥(𝑡ሻ
ҧ is written as
x (t ) = T −1 x(t )
Taking time derivative of above equation
x (t ) = T −1 x (t)
x (t ) = T −1 Ax(t ) + Bu (t ) x (t ) = Ax(t ) + Bu (t )
x (t ) = T −1 ATx (t ) + Bu (t ) x(t ) = T x (t )
x (t ) = T −1 ATx (t ) + T −1 Bu (t ) x (t ) = A x (t ) + B u (t )
−1 −1
A = T AT B =T B
Similarity Transformations
Consider transformed output equation
y (t ) = C x (t ) + D u (t )
y (t ) = C T −1 x(t ) + D u (t )
C = CT D=D
Similarity Transformations
−1 −1
A = T AT B =T B
C = CT D=D
Similarity Transformations
−1
sI − A = sI − T AT
−1 −1 −1
= sT T − T AT T T = I
= T −1 sI − A T
= sI − A
P = CM W
Where CM is controllability Matrix and is given as
𝐶𝑀 = 𝐵 𝐴𝐵 ⋯ 𝐴𝑛−1 𝐵
and W is coefficient matrix
an −1 an − 2 a1 1
a a 1 0
n−2 n −3
W =
a1 1 0 0
1 0 0 0
Where the ai’s are coefficients of the characteristic polynomial
A = P −1 AP B = P −1 B C = CP D=D
Transformation to CCF (Example)
𝑥1 1 2 1 𝑥1 1
𝑥2 = 0 1 3 𝑥2 + 0 𝑢(𝑡ሻ
𝑥3 1 1 1 𝑥3 1
𝑥1 1 2 1 𝑥1 1
𝑥2 = 0 1 3 𝑥2 + 0 𝑢(𝑡ሻ
𝑥3 1 1 1 𝑥3 1
𝑎1 = −3, 𝑎2 = −1, 𝑎3 = −1
a2 a1 1 − 1 − 3 1
W = a1 1 0 = − 3 1 0
1 0 0 1 0 0
Transformation to CCF (Example)
𝑥1 1 2 1 𝑥1 1
𝑥2 = 0 1 3 𝑥2 + 0 𝑢(𝑡ሻ
𝑥3 1 1 1 𝑥3 1
Now the controllability matrix CM is calculated
as 𝐶𝑀 = 2
𝐵 𝐴𝐵 𝐴 𝐵
1 2 10
𝐶𝑀 = 0 3 9
1 2 7
Transformation matrix P is now obtained as
1 2 10 −1 −3 1
𝑃 = 𝐶𝑀 × 𝑊 = 0 3 9 −3 1 0
1 2 7 1 0 0
3 −1 1
𝑃= 0 3 0
0 −1 1
Transformation to CCF (Example)
−1 −1
A = P AP B=P B
0 1 0
A = P −1 AP = 0 0 1
3 1 3 𝑠𝐼 − 𝐴 = 𝑠 3 − 3𝑠 2 − 𝑠 − 3
0
B = P −1 B = 0
1
Transformation to OCF
Transformation to OCF is done by means of transformation matrix Q.
Q = (W OM ) −1
Where OM is observability Matrix and W is coefficient matrix
𝑇
𝑂𝑀 = 𝐶 𝐶𝐴 ⋯ 𝐶𝐴𝑛−1
an −1 an − 2 a1 1
a an −3 1 0
n−2
W =
a1 1 0 0
1 0 0 0
A = Q −1 AQ B = Q −1 B C = CQ D=D
Transformation to OCF (Example)
𝑎1 = −3, 𝑎2 = −1, 𝑎3 = −1
a2 a1 1 − 1 − 3 1
W = a1 1 0 = − 3 1 0
1 0 0 1 0 0
Transformation to OCF (Example)
𝑥1 1 2 1 𝑥1 1 𝑥1
𝑥2 = 0 1 3 𝑥2 + 0 𝑢(𝑡ሻ 𝑦(𝑡ሻ = 1 1 0 𝑥2
𝑥3 1 1 1 𝑥3 1 𝑥3
1 1 0
𝑂𝑀 = 1 3 4
5 6 10
A = Q −1 AQ B = Q −1 B C = CQ D=D
0 0 3
A = Q −1 AQ = 1 0 1
0 1 3
C = CQ = 0 0 1
3
B = Q −1 B = 2
1
Jordan Canonical Form
Y (s) r1 r2 rn
H (s) = = b0 + + + +
U (s) s − 1 s − 2 s − n
➢ All the poles of transfer function are distinct i.e no repeated pole.
1 0 0 0
A= 0 2 0 0
0 0 3 0
0 0 0 n
1
B= 1 C = r1 r2 r3 rn
1
D=
b0
1
Jordan form (repeated poles):
n = n1 + n2 + ... + nm
Y (s)
H (s) = = b0 + H 1( s) + ... + Hm( s)
U (s)
ri1 ri 2 rini
Hi( s) = + + +
(s − i) (s − i)
ni ni −1
s − i
xi (t ) = i xi (t ) + Bi u (t )
y = Ci x i
i 1 0 0
0 i 1 0
i = 0 0 i 0
0 0 0 i
Bi = 0 0 ... 1 Ci = ri1 ri 2 ... rini
T
Y (s) b1' s n −1 + b2' s n − 2 + ... + bn'
H (s) = = b0 +
U (s) ( s − 1) n1 ( s − 2) n 2 ...( s − m) nm
x(t ) = x(t ) + Bu (t )
y = Cx + Du
1 0 0 0
0 0 0
2
= 0 0 3 0
0 0 0 m
B = b1 b2 ... bm C = c1 c 2 ... cm D = b0
T
Transformation to Jordan (Diagonal) Form
𝑀 = 𝑚1 𝑚2 ... 𝑚𝑛
A = = M −1 AM B = M −1 B C = CM D=D
Systems with Repeated Eigenvalues
The method for deriving the state transition matrix presented in the
previous section is dependent on the existence of the inverse of the
modal matrix M, that is M must be nonsingular.
In general, if there are two or more eigenvalues with the same value,
the eigenvectors are not linearly independent, and M−1 does not
exist.
𝜆1 1 0 0
0 𝜆1 0 0
0 0 𝜆3 0
0 0 0 𝜆4
State-Variable Response of Linear Systems
𝑥ሶ = 𝐴𝑥 + 𝑏𝑢
𝑦 = 𝐶𝑥 + 𝐷𝑢
𝑥ሶ = 𝐴𝑥
𝑥ሶ = 𝑎𝑥
In this case the homogeneous response xh(t) has an exponential
form defined by the system time constant τ = −1/a, or:
xh(t) = eatx(0).
The exponential term eat may be expanded as a power series, to
give:
𝑎2 𝑡 2 𝑎𝑘 𝑡 𝑘
𝑥ℎ (𝑡ሻ = 1 + 𝑎𝑡 + +. . . + +. . . 𝑥(0ቇ
2! 𝑘!
𝐴2 𝑡 2 𝐴𝑘 𝑡 𝑘
𝑥ℎ (𝑡ሻ = I + 𝐴𝑡 + +. . . + +. . . 𝑥(0ቇ
2! 𝑘!
where x(0) is the initial state. Each term in this series is a matrix of size
n × n, and the summation of all terms yields another matrix of size n×n.
The homogeneous response to an arbitrary set of initial conditions
x(0) can therefore be expressed as an infinite sum of time dependent
matrix functions, involving only the system matrix A. Because of the
similarity of this series to the power series defining the scalar
exponential, it is convenient to define the matrix exponential of a
square matrix A as
𝐴2 𝑡 2 𝐴𝑘 𝑡 𝑘
𝑒 𝐴𝑡 = 𝐼 + 𝐴𝑡 + +. . . + +. . .
2! 𝑘!
The system homogeneous response xh(t) may therefore be
written in terms of the matrix exponential
𝑥ሶ = 𝐴𝑥 + 𝑏𝑢
𝑥ሶ − 𝐴𝑥 = 𝑏𝑢
𝑑 −𝐴𝑡
𝑒 −𝐴𝑡 (𝑥ሶ − 𝐴𝑥ሻ = (𝑒 𝑥(𝑡ሻሻ = 𝑒 −𝐴𝑡 𝑏𝑢
𝑑𝑡
Integration gives
𝑡
𝑡
𝑑 −𝐴𝜏
(𝑒 𝑥(𝜏ሻቇ 𝑑𝜏 = 𝑒 −𝐴𝑡 𝑥(𝑡ሻ − 𝑒 −𝐴0 𝑥(0ሻ = න𝑒 −𝐴𝜏 𝑏𝑢(𝜏ሻ 𝑑𝜏
𝑑𝑡
0
0
(4) If A is a diagonal matrix then eAt is also diagonal, and each element on
the diagonal is an exponential in the corresponding diagonal element of
the A matrix, that is eaiit.
Problem
Find the response of the output variable
y = 2x1 + x2
in the system described by state equations
𝑥ሶ1 = −2𝑥1 + 𝑢
𝑥ሶ 2 = 𝑥1 − 𝑥2
Solution of State Equation Using Laplace transform
𝑒 𝐴𝑡 = 𝜙(𝑡ሻ = 𝐿−1 [ 𝑠𝐼 − 𝐴 −1 ሿ
Solution of State Equation
• Similarity transformation
A = = M −1 AM
𝑒 𝐴𝑡 = 𝑀𝑒 𝛬𝑡 𝑀−1
State Space Modelling
The complete system model for a linear time-invariant system
consists of
(i) a set of n state equations, defined in terms of the matrices A and
B, and
(ii) a set of output equations that relate any output variables of interest
to the state variables and inputs, and expressed in terms of the C
and D matrices.
The task of modeling the system is to derive the elements of the
matrices, and to write the system model in the form:
x˙ = Ax + Bu
y = Cx + Du.
The matrices A and B are properties of the system and are determined
by the system structure and elements. The output equation matrices C
and D are determined by the particular choice of output variables. The
overall modeling procedure can be developed based on the following
steps:
1. Determination of the system order n and selection of a set of state
variables for the system
2. Generation of a set of state equations and the system A and B
matrices using a well defined methodology.
3. Determination of a suitable set of output equations and derivation of
the appropriate C and D matrices.
Write the state equation for the network shown in Figure B.1.
Define the state variables as current through the inductor and voltage
across the capacitors. Write two node equations containing capacitors and
a loop equation containing the inductor. The state variables will be vc1, vc2
and iL.
The state equation is given by
𝑥ሶ1 −1 0 −4 𝑥1 1 0 𝑣
𝑖
𝑥ሶ 2 = 0 −2 2 𝑥2 + 0 2 𝑖
𝑠
𝑥ሶ 3 0.5 −0.5 0 𝑥3 0 0