State Space Representation of Dynamical Systems

Lecture – 8
State Space Representation of Dynamical Systems
Dr. Radhakant Padhi
Asst. Professor
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore
A Practical Control System
Ref.: K. Ogata,
(bias noise)
Modern Control Engineering
3rd Ed., Prentice Hall, 1999.
Window opening/closing
(random noise)
Temperature control system in a car
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
2
Another Practical Control System
Ref.: K. Ogata,
Modern Control Engineering
3rd Ed., Prentice Hall, 1999.
noise
Water level control in an overhead tank
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
3
State Space Representation
z
Input variable:
• Manipulative (control)
• Non-manipulative (noise)
noise
control
Y → Y*
System
Z
Controller
z
Output variable:
Variables of interest that can be either be
measured or calculated
z
State variable:
Minimum set of parameters which completely
summarize the system’s status.
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
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 .
Note : State variables need not be physically measurable
or observable quantities. This gives extra flexibility.
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
5
Definitions
State Vector : A n - dimensional vector whos components
are n state variables that describe the system
completely.
State Space : The n - dimensional space whose co-ordinate
axes consist of the x1 axis, x2 axis, ", xn axis
is called a state space.
Note : For any dynamical system, the state space remains
unique, but the state variables are not unique.
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
6
Critical Considerations while
Selecting State Variables
z
Minimum number of variables
•
•
•
z
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
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
7
State Variable Selection
z
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!
z
Is there a restriction on the selection of the
state variables ?
YES! All state variables should be linearly
independent and they must collectively
describe the system completely.
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
8
Advantages of State Space
Representation
z
Systematic analysis and synthesis of higher order
systems without truncation of system dynamics
z
Convenient tool for MIMO systems
z
Uniform platform for representing time-invariant
systems, time-varying systems, linear systems as
well as nonlinear systems
z
Can describe the dynamics in almost all systems
(mechanical systems, electrical systems, biological
systems, economic systems, social systems etc.)
z
Note: Transfer function representations are valid for
only for linear time invariant (LTI) systems
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
9
Generic State Space
Representation
X [ x1 " xn ] ∈ R , U [u1 " um ] ∈ R m
T
n
T
⎡ x1 ⎤ ⎡ f1 ( t , x1 " xn , u1 " um ) ⎤
⎥
⎢#⎥ ⎢
#
⎢
⎥ , t ∈ R+
⎢ ⎥=
⎥
⎢#⎥ ⎢
#
⎥
⎢ ⎥ ⎢
xn ⎦ ⎢⎣ f n ( t , x1 " xn , u1 " um ) ⎥⎦
⎣N
X
f ( t , X ,U )
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
10
Generic State Space
Representation
T
Y ⎡⎣ y1 " y p ⎤⎦ ∈ R p
⎡ y1 ⎤ ⎡ h1 ( t , x1 " xn , u1 " um ) ⎤
⎥
⎢ ⎥ ⎢
#
⎥ , t ∈ R+
⎢ # ⎥=⎢
⎥
⎢# ⎥ ⎢
#
⎥
⎢ ⎥ ⎢
y p ⎥⎦ ⎢⎣ h p ( t , x1 " xn , u1 " um ) ⎥⎦
⎢⎣N
Y
Summary:
h ( t , X ,U )
X = f ( t , X , U ) : A set of differential equations
Y = h ( t , X , U ) : A set of algebraic equations
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
11
State Space Representation
(noise free systems)
z
z
Nonlinear System
X = f ( X , U )
X ∈ R ,U ∈ R
Y = h( X , U )
Y ∈Rp
Linear System
X = AX + BU
Y = CX + DU
n
m
A
B
- System matrix- n x n
C
- Output matrix- p x n
D
- Feed forward matrix – p x m
- Input matrix- n x m
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
12
Block diagram representation of
linear systems
Ref.: K. Ogata,
Modern Control Engineering
3rd Ed., Prentice Hall, 1999.
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
13
Writing Differential Equations in
First Companion Form
(Phase variable form/Controllable canonical form)
dn y
d n −1 y
+ an −1 n −1 + " + a0 y = u
n
dt
dt
Choose output y(t ) and its (n − 1) derivatives as state variables
dy ⎤
⎡
=
x
⎡
⎤
⎢ 1 dt ⎥
⎢
⎥
⎢
⎥
2
⎢
⎥
⎢ x = d y ⎥
⎢
⎥
⎢ 2 dt 2 ⎥
⎯⎯
→
⎯⎯
→
differentiating
⎢
⎥
⎥
⎢
⎢
⎥
#
⎢
⎥
n −1
d y⎥
⎢
n ⎥
⎢
=
x
d
y
⎢⎣ n
n −1 ⎥
⎢
⎥
=
x
dt ⎦
n
n
dt ⎦
⎣
x1 = y
dy
x2 =
dt
#
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
14
First Companion Form
(Controllable Canonical Form)
⎡ x1 ⎤ ⎡ 0
⎢ x ⎥ ⎢ 0
⎢ 2 ⎥ ⎢
⎢ x3 ⎥ ⎢ 0
⎢
⎥=⎢
⎢ # ⎥ ⎢ #
⎢ xn −1 ⎥ ⎢ 0
⎢
⎥ ⎢
⎢⎣ xn ⎥⎦ ⎢⎣ − a0
1
0
0
#
0
− a1
0
0 0
1
0 0
0
1 0
#
#
#
0
0 0
− a2 " "
0 ⎤ ⎡ x1 ⎤ ⎡ 0 ⎤
" 0
0 ⎥⎥ ⎢⎢ x2 ⎥⎥ ⎢⎢ 0 ⎥⎥
" 0
0 ⎥ ⎢ x3 ⎥ ⎢ 0 ⎥
" 0
⎥⎢
⎥ + ⎢ ⎥u
#
#
# ⎥ ⎢ # ⎥ ⎢0 ⎥
0 0
1 ⎥ ⎢ xn −1 ⎥ ⎢ 0 ⎥
⎥⎢
⎥ ⎢ ⎥
" " − an −1 ⎥⎦ ⎢⎣ xn ⎥⎦ ⎢⎣ 1 ⎥⎦
⎡ x1 ⎤
⎢x ⎥
⎢ 2 ⎥
⎢ x3 ⎥
y = [1 0 0 " " 0 ] ⎢
⎥ + [0] u
#
⎢
⎥
⎢ xn −1 ⎥
⎢
⎥
⎣⎢ xn ⎦⎥
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
15
Example – 1
z
Dynamical system x + 3 x + 2 x = u
y=x
z
x1 x, x2 x
x1 = x2 , x2 = −2x1 − 3x2 + u
State variables:
Hence ⎡ x1 ⎤
1 ⎤ ⎡ x1 ⎤ ⎡ 0 ⎤
⎡0
⎢ x ⎥ = ⎢ − 2 − 3 ⎥ ⎢ x ⎥ + ⎢ 1 ⎥ u
⎣ ⎦ N
⎣ 2⎦ ⎣ 2 ⎦ ⎣N⎦
N
X
A
X
B
⎡ x1 ⎤
y = [1 0 ] ⎢ ⎥ + [ 0 ] u
N ⎣ x2 ⎦ N
C
D
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
16
Example – 2
(spring-mass-damper system)
z
System dynamics
my + cy + ky = bu
z
State variables
z
State dynamics
y
x2
⎡
⎤ ⎡
⎤
⎡ x1 ⎤ ⎢
⎥=⎢1
⎥
=
1
b
b
⎢ x ⎥ ⎢
( −ky − cy ) + u ⎥ ⎢ ( −kx1 − cx2 ) + u ⎥
⎣ 2⎦
m ⎦ ⎣m
m ⎦
⎣m
x1 y, x2 y
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
17
Example – 2
(spring-mass-damper system)
z
State dynamics
0
⎡
⎡ x1 ⎤ ⎢
⎢ x ⎥ = ⎢ −k
⎣ 2⎦
⎣m
z
1⎤
⎡0⎤
⎡ x1 ⎤ ⎢ ⎥
⎥
−c ⎥ ⎢ ⎥ + ⎢ b ⎥ u
⎣ x2 ⎦
m⎦
⎣m⎦
Output equation
y x1
y = [1 " 0] X + [ 0] u
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
18
Example – 3:
Translational Mechanical System
d 2 x1
dx1
+ K ( x1 − x2 ) = 0
M1 2 + D
dt
dt
d 2 x2
M 2 2 + K ( x2 − x1 ) = f ( t )
dt
Ref: N. S. Nise:
Control Systems Engineering,
4th Ed., Wiley, 2004
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
19
Example – 3:
Translational Mechanical System
z
z
dx1
dx2
v1 , v2 dt
dt
Define
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
z
State space
equations in
standard form
⎡ 0
⎡ x1 ⎤ ⎢⎢ K
⎢ v ⎥ ⎢ − M
1
⎢ 1⎥ = ⎢
⎢ x2 ⎥ ⎢ 0
⎢ ⎥ ⎢
K
⎣ v2 ⎦
⎢
⎣ M2
1
D
−
M1
0
K
M1
0
0
0
−
K
M2
0⎤
⎥⎡x ⎤ ⎡ 0 ⎤
0⎥ ⎢ 1 ⎥ ⎢ 0 ⎥
⎥
⎥ ⎢ v1 ⎥ ⎢
+ ⎢ 0 ⎥ f (t )
⎥
1 ⎥ ⎢ x2 ⎥ ⎢
⎥
1
⎢
⎥
⎥
⎥ ⎣ v2 ⎦ ⎢
⎢⎣ M 2 ⎥⎦
0⎥
⎦
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
20
Example – 4:
Nonlinear spring in Example – 3
z
Dynamic equations
z
State space equation
d 2 x1
dx
3
M 1 2 + D 1 + K ( x1 − x2 ) = 0
dt
dt
d 2 x2
3
M 2 2 + K ( x2 − x1 ) = f ( t )
dt
x1 = v1
v1 = −
K
D
3
( x1 − x2 ) − v1
M1
M1
x2 = v2
v2 = −
1
K
3
f (t )
( x2 − x1 ) +
M2
M2
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
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
Moment of Inertia of beam: J
Mass, moment of inertia and radius of ball: m, J b , R
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
22
Example – 5
The Ball and Beam System
x1 = r , x2 = r, x3 = θ , x4 = θ
State Space Model
x1 = x2
−mg sin x3 + m x1 x42
x2 =
Jb
m+ 2
R
x3 = x4
x4 =
τ − mg x1 cos x3 − 2m x1 x2 x4
m x + J + Jb
2
1
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
23
Example – 6: Van-der Pol’s Oscillator
(Limit cycle behaviour)
M x + 2c ( x 2 − 1) x + k x = 0
z
Equation
z
State variables
z
State Space Equation
x1 x,
{c, k > 0}
x2 x
x2
⎡
⎤
x
⎡ 1⎤ ⎢
k ⎥⎥ : Homogeneous nonlinear system
⎢ x ⎥ = ⎢ 2c 2
− ( x1 − 1) x2 − x1
⎣N
2⎦
m ⎦
⎣ m X
F(X )
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
24
Example – 7: Spinning Body Dynamics
(Satellite dynamics)
Dynamics:
⎛ I 2 − I3 ⎞
⎛1⎞
ω1 = ⎜
⎟ ω2ω3 + ⎜ ⎟τ 1
⎝ I1 ⎠
⎝ I1 ⎠
⎛ I 3 − I1 ⎞
⎛1⎞
ω 2 = ⎜
⎟ ω3ω1 + ⎜ ⎟τ 2
⎝ I2 ⎠
⎝ I2 ⎠
⎛ I1 − I 2 ⎞
⎛1⎞
ω 3 = ⎜
⎟ ω1ω2 + ⎜ ⎟τ 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
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
25
Example – 8: Airplane Dynamics,
Six Degree-of-Freedom Nonlinear Model
Ref: Roskam J., Airplane Flight Dynamics and Automatic Controls, 1995
(
)
U = VR − WQ − g sin Θ + FAX + FTX / m
(
)
W = UQ − VP + g cos Φ cos Θ + ( F + F ) / m
P = c1QR + c2 PQ+c3 ( L A + LT ) +c 4 ( N A + NT )
Q = c5 PR − c6 ( P 2 − R 2 ) + c7 ( M A + M T )
R = c8 PQ − c2QR + c4 ( LA + LT ) + c9 ( N A + NT )
V = WP − UR + g sin Φ cos Θ + FAY + FTY / m
AZ
TZ
= P + Q sin Φ tan Θ + R cos Φ tan Θ
Φ
= Q cos Φ − R sin Φ
Θ
= ( Q sin Φ + R cos Φ ) sec Θ
Ψ
⎡ X ′⎤ ⎡cos Ψ − sin Ψ 0 ⎤ ⎡ cos Θ 0 sin Θ ⎤ ⎡1
0
0 ⎤ ⎡U ⎤
⎢ ⎥ ⎢
⎥⎢
1
0 ⎥⎥ ⎢⎢0 cos Φ − sin Φ ⎥⎥ ⎢⎢ V ⎥⎥
⎢ Y ′ ⎥ = ⎢ sin Ψ cos Ψ 0 ⎥ ⎢ 0
⎢ Z ′ ⎥ ⎢⎣ 0
0
1 ⎥⎦ ⎢⎣ − sin Θ 0 cos Θ ⎥⎦ ⎢⎣0 sin Φ cos Φ ⎥⎦ ⎢⎣W ⎥⎦
⎣ ⎦
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
⎡⎣ Note: h = − Z ′⎤⎦
26
Example – 8: Airplane Dynamics,
Six Degree-of-Freedom Nonlinear Model
Ref: Roskam J., Airplane Flight Dynamics and Automatic Controls, 1995
N
FTx = ∑ Ti cos ΦTi cos Ψ Ti
i =1
N
FTy = ∑ Ti cos ΦTi sin Ψ Ti
i =1
N
FTz = − ∑ Ti sin ΦTi
i =1
(
)
(
)
N
i =1
N
i =1
(
)
N
(
⎡cos α
T (α ) ⎢
⎣ sin α
)
M T = ∑ Ti cos ΦTi cos Ψ Ti zTi + ∑ Ti sin ΦTi xTi
i =1
N
(
i =1
)
N
(
− sin α ⎤
cos α ⎥⎦
)
NT = − ∑ Ti cos ΦTi cos Ψ Ti yTi + ∑ Ti cos ΦTi sin Ψ Ti xTi
i =1
⎛ C
⎡ FAX s ⎤
⎡ FAX ⎤
⎜ ⎡ DO
⎥ = T (α )( − qS ) ⎜ ⎢
⎢
⎥ = T (α ) ⎢
⎢⎣ FAZs ⎥⎦
⎣⎢ FAZ ⎦⎥
⎜ ⎢⎣ CLO
⎝
CDα
CLα
⎛
FAY = qS CY = qS ⎜ CYβ β + ⎡CYδ
⎣ A
⎝
Cmα
i =1
CDi ⎤ ⎡ 1 ⎤ ⎡CDδ ⎤ ⎞⎟
h
E
⎥ ⎢⎢α ⎥⎥ + ⎢
⎥δE
CLi ⎥
CLδ ⎥ ⎟⎟
⎢
h ⎦ ⎢
⎣ ih ⎥⎦ ⎣ E ⎦ ⎠
⎛ ⎡ Clβ ⎤
⎡ LAS ⎤
⎡ Clδ A
⎡ LA ⎤
⎜
T
T
qSb
α
α
β
=
=
+
⎢
⎥
⎢
⎢ ⎥
( )
( )
⎢N ⎥
⎜
N
C
C
⎣ A⎦
⎣⎢ nδ A
⎣⎢ AS ⎦⎥
⎝ ⎣⎢ nβ ⎦⎥
M A = qSc Cm = qSc ⎡Cmo
⎣
N
LT = − ∑ Ti cos ΦTi sin Ψ Ti zTi − ∑ Ti sin ΦTi yTi
Clδ ⎤ ⎡δ ⎤ ⎞
R
A
⎥ ⎢ ⎥⎟
Cnδ ⎥ ⎣δ R ⎦ ⎟
R ⎦
⎠
⎡δ ⎤ ⎞
CYδ ⎤ ⎢ A ⎥ ⎟
R ⎦
⎣δ R ⎦ ⎠
Cmi ⎤ [1 α
h ⎦
ih ] + Cm δ δ E
T
E
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
27
Advantages of State Space
Representation
z
Systematic analysis and synthesis of higher order
systems without truncation of system dynamics
z
Convenient tool for MIMO systems
z
Uniform platform for representing time-invariant
systems, time-varying systems, linear systems as
well as nonlinear systems
z
Can describe the dynamics in almost all systems
(mechanical systems, electrical systems, biological
systems, economic systems, social systems etc.)
z
Note: Transfer function representations are valid for
only for linear time invariant (LTI) systems
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
28
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
29
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
30