You are on page 1of 30

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 2


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
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 3
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
State Space Representation
noise
z Input variable: Y → Y*
control
• Manipulative (control) System
• Non-manipulative (noise) 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 4
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
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 5
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
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 6


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
Critical Considerations while
Selecting State Variables
z 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.
z 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 7
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
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 8
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
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 9
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
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+
⎢#⎥ ⎢ # ⎥
⎢ ⎥ ⎢ ⎥
⎣Nxn ⎦ ⎢⎣ f n ( t , x1 " xn , u1 " um ) ⎥⎦



X f ( t , X ,U )

ADVANCED CONTROL SYSTEM DESIGN 10


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
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 h ( t , X ,U )

Summary: X = f ( t , X , U ) : A set of differential equations


Y = h ( t , X , U ) : A set of algebraic equations
ADVANCED CONTROL SYSTEM DESIGN 11
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
State Space Representation
(noise free systems)
z Nonlinear System
X = f ( X , U ) X ∈ R ,U ∈ R n m

Y = h( X , U ) Y ∈Rp
z Linear System
A - System matrix- n x n
X = AX + BU B - Input matrix- n x m

Y = CX + DU C - Output matrix- p x n
D - Feed forward matrix – p x m

ADVANCED CONTROL SYSTEM DESIGN 12


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
Block diagram representation of
linear systems

Ref.: K. Ogata,
Modern Control Engineering
3rd Ed., Prentice Hall, 1999.

ADVANCED CONTROL SYSTEM DESIGN 13


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
Writing Differential Equations in
First Companion Form
(Phase variable form/Controllable canonical form)

dn y 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 ⎤ x =
⎢ 1 dt ⎥
⎢ dy ⎥ ⎢ ⎥
⎢ x2 = ⎥ ⎢ x = d y ⎥
2

⎢ dt ⎥ ⎢ 2 dt 2 ⎥
⎢ ⎥ ⎯⎯→ differentiating ⎯⎯→
# ⎢ ⎥
⎢ ⎥ ⎢ # ⎥
⎢ d y⎥
n −1
⎢ n ⎥
x
⎢⎣ n = n −1 ⎥
d y
dt ⎦ ⎢ 
x = ⎥
⎣ dt ⎦
n n

ADVANCED CONTROL SYSTEM DESIGN 14


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
First Companion Form
(Controllable Canonical Form)
⎡ x1 ⎤ ⎡ 0 1 0 0 0 " 0 0 ⎤ ⎡ x1 ⎤ ⎡ 0 ⎤
⎢ x ⎥ ⎢ 0 0 1 0 0 " 0 0 ⎥⎥ ⎢⎢ x2 ⎥⎥ ⎢⎢ 0 ⎥⎥
⎢ 2 ⎥ ⎢
⎢ x3 ⎥ ⎢ 0 0 0 1 0 " 0 0 ⎥ ⎢ x3 ⎥ ⎢ 0 ⎥
⎢ ⎥=⎢ ⎥⎢ ⎥ + ⎢ ⎥u
⎢ # ⎥ ⎢ # # # # # # # # ⎥ ⎢ # ⎥ ⎢0 ⎥
⎢ xn −1 ⎥ ⎢ 0 0 0 0 0 0 0 1 ⎥ ⎢ xn −1 ⎥ ⎢ 0 ⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢⎣ xn ⎥⎦ ⎢⎣ − a0 − a1 − a2 " " " " − an −1 ⎥⎦ ⎢⎣ xn ⎥⎦ ⎢⎣ 1 ⎥⎦
⎡ x1 ⎤
⎢x ⎥
⎢ 2 ⎥
⎢ x3 ⎥
y = [1 0 0 " " 0 ] ⎢ ⎥ + [0] u
⎢ # ⎥
⎢ xn −1 ⎥
⎢ ⎥
⎣⎢ xn ⎦⎥
ADVANCED CONTROL SYSTEM DESIGN 15
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
Example – 1
z Dynamical system x + 3 x + 2 x = u
y=x

z State variables: x1  x, x2  x
x1 = x2 , x2 = −2x1 − 3x2 + u
Hence ⎡ x1 ⎤ ⎡0 1 ⎤ ⎡ x1 ⎤ ⎡ 0 ⎤
⎢ x ⎥ = ⎢ − 2 − 3 ⎥ ⎢ x ⎥ + ⎢ 1 ⎥ u
⎣ 2⎦ 
N ⎣
⎦ N ⎣ 2 ⎦ ⎣N⎦
X A X B

⎡ x1 ⎤
y = [1 0 ] ⎢ ⎥ + [ 0 ] u
N ⎣ x2 ⎦ N
C D

ADVANCED CONTROL SYSTEM DESIGN 16


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
Example – 2
(spring-mass-damper system)
z System dynamics
my + cy + ky = bu

z State variables
x1  y, x2  y
z State dynamics
⎡ y ⎤ ⎡ x2 ⎤

⎡ x1 ⎤ ⎢ ⎥=⎢1 ⎥
=
⎢ x ⎥ ⎢ 1 b b
⎣ 2⎦ ( −ky − cy ) + u ⎥ ⎢ ( −kx1 − cx2 ) + u ⎥
⎣m m ⎦ ⎣m m ⎦
ADVANCED CONTROL SYSTEM DESIGN 17
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
Example – 2
(spring-mass-damper system)
z State dynamics

⎡ 0 1⎤ ⎡0⎤
⎡ x1 ⎤ ⎢ ⎥ ⎡ x1 ⎤ ⎢ ⎥
⎢ x ⎥ = ⎢ −k −c ⎥ ⎢ ⎥ + ⎢ b ⎥ u
⎣ 2⎦ ⎣ x2 ⎦
⎣m m⎦ ⎣m⎦
z Output equation
y  x1
y = [1 " 0] X + [ 0] u
ADVANCED CONTROL SYSTEM DESIGN 18
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
Example – 3:
Translational Mechanical System

d 2 x1 dx1
M1 2 + D + K ( x1 − x2 ) = 0 Ref: N. S. Nise:
dt dt Control Systems Engineering,
4th Ed., Wiley, 2004
d 2 x2
M 2 2 + K ( x2 − x1 ) = f ( t )
dt
ADVANCED CONTROL SYSTEM DESIGN 19
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
Example – 3:
Translational Mechanical System
dx1 dx2
z Define v1  , v2 
dt dt
dv1 K D K
z System equations =− x1 − v1 + x2
dt M1 M1 M1
dv2 K K 1
= x1 − x2 + f (t )
dt M 2 M2 M2
⎡ 0 1 0 0⎤
⎡ x1 ⎤ ⎢⎢ K ⎥⎡x ⎤ ⎡ 0 ⎤
z State space D K
0⎥ ⎢ 1 ⎥ ⎢ 0 ⎥
⎢ v ⎥ ⎢ − M −
M1 M1 ⎥ ⎢ v1 ⎥ ⎢ ⎥
equations in ⎢ 1⎥ = ⎢ 1
⎥ + ⎢ 0 ⎥ f (t )
⎢ x2 ⎥ ⎢ 0 0 0 1 ⎥ ⎢ x2 ⎥ ⎢ ⎥
standard form ⎢ ⎥ ⎢ ⎢ ⎥ 1
⎣ v2 ⎦ K K ⎥ ⎣ v2 ⎦ ⎢ ⎥
⎢ 0 − 0⎥ ⎢⎣ M 2 ⎥⎦
⎣ M2 M2 ⎦
ADVANCED CONTROL SYSTEM DESIGN 20
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
Example – 4:
Nonlinear spring in Example – 3
d 2 x1 dx
M 1 2 + D 1 + K ( x1 − x2 ) = 0
3
z Dynamic equations
dt dt
d 2 x2
M 2 2 + K ( x2 − x1 ) = f ( t )
3

dt

z State space equation


x1 = v1
K D
v1 = − ( x1 − x2 ) − v1
3

M1 M1
x2 = v2
K 1
v2 = − ( x2 − x1 ) + f (t )
3

M2 M2
ADVANCED CONTROL SYSTEM DESIGN 21
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
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 22


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
Example – 5
The Ball and Beam System
State Space Model x1 = r , x2 = r, x3 = θ , x4 = θ
x1 = x2
−mg sin x3 + m x1 x42
x2 =
Jb
m+ 2
R
x3 = x4
τ − mg x1 cos x3 − 2m x1 x2 x4
x4 =
m x + J + Jb
2
1

ADVANCED CONTROL SYSTEM DESIGN 23


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
Example – 6: Van-der Pol’s Oscillator
(Limit cycle behaviour)

z Equation x + 2c ( x 2 − 1) x + k x = 0
M  {c, k > 0}

z State variables x1  x, x2  x

z State Space Equation


 ⎡ x2 ⎤
⎡ 1⎤ ⎢
x
⎢ x ⎥ = ⎢ 2c 2 k ⎥⎥ : Homogeneous nonlinear system
⎣N 2⎦ − ( x1 − 1) x2 − x1
⎣ m
 m

X
F(X )

ADVANCED CONTROL SYSTEM DESIGN 24


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
Example – 7: Spinning Body Dynamics
(Satellite dynamics)
⎛ I 2 − I3 ⎞ ⎛1⎞
Dynamics: ω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 25
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
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 )
( )
V = WP − UR + g sin Φ cos Θ + FAY + FTY / m

W = UQ − VP + g cos Φ cos Θ + ( F + F ) / m
AZ TZ

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 )
 = 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 ⎤
⎢ ⎥ ⎢ ⎥⎢
⎢ Y ′ ⎥ = ⎢ sin Ψ cos Ψ 0 ⎥ ⎢ 0 1 0 ⎥⎥ ⎢⎢0 cos Φ − sin Φ ⎥⎥ ⎢⎢ V ⎥⎥
⎡⎣ Note: h = − Z ′⎤⎦
⎢ Z ′ ⎥ ⎢⎣ 0 0 1 ⎥⎦ ⎢⎣ − sin Θ 0 cos Θ ⎥⎦ ⎢⎣0 sin Φ cos Φ ⎥⎦ ⎢⎣W ⎥⎦
⎣ ⎦

ADVANCED CONTROL SYSTEM DESIGN 26


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
Example – 8: Airplane Dynamics,
Six Degree-of-Freedom Nonlinear Model
Ref: Roskam J., Airplane Flight Dynamics and Automatic Controls, 1995

( ) ( )
N N N
FTx = ∑ Ti cos ΦTi cos Ψ Ti LT = − ∑ Ti cos ΦTi sin Ψ Ti zTi − ∑ Ti sin ΦTi yTi
i =1 i =1 i =1
⎡cos α − sin α ⎤
( ) ( ) T (α )  ⎢
N N N
FTy = ∑ Ti cos ΦTi sin Ψ Ti M T = ∑ Ti cos ΦTi cos Ψ Ti zTi + ∑ Ti sin ΦTi xTi
i =1 i =1 i =1 ⎣ sin α cos α ⎥⎦

( ) ( )
N N N
FTz = − ∑ Ti sin ΦTi NT = − ∑ Ti cos ΦTi cos Ψ Ti yTi + ∑ Ti cos ΦTi sin Ψ Ti xTi
i =1 i =1 i =1

⎛ C CDi ⎤ ⎡ 1 ⎤ ⎡CDδ ⎤ ⎞⎟
⎡ FAX ⎤ ⎡ FAX s ⎤ ⎜ ⎡ DO CDα
⎢ ⎥ = T (α ) ⎢ ⎥ = T (α )( − qS ) ⎜ ⎢ ⎥ ⎢⎢α ⎥⎥ + ⎢ ⎥δE
h E

⎣⎢ FAZ ⎦⎥ ⎢⎣ FAZs ⎥⎦ ⎜ ⎢⎣ CLO CLα CLi ⎥ ⎢ CLδ ⎥ ⎟⎟



h ⎦ ⎢
⎣ ih ⎥⎦ ⎣ E ⎦ ⎠

⎡ LA ⎤ ⎡ LAS ⎤ ⎛ ⎡ Clβ ⎤ ⎡ Clδ A Clδ ⎤ ⎡δ ⎤ ⎞


⎢N ⎥ = T ( )
α ⎢ ⎥ = T ( )
α qSb ⎜ ⎢ ⎥ β + ⎢
R
⎥ ⎢ ⎥⎟
A

⎜ Cnδ ⎥ ⎣δ R ⎦ ⎟
⎣ A⎦ ⎣⎢ AS ⎦⎥ ⎝ ⎣⎢ nβ ⎦⎥ ⎣⎢ nδ A
N C C
R ⎦ ⎠

⎛ ⎡δ ⎤ ⎞
FAY = qS CY = qS ⎜ CYβ β + ⎡CYδ CYδ ⎤ ⎢ A ⎥ ⎟
⎣ A R ⎦
⎣δ R ⎦ ⎠

M A = qSc Cm = qSc ⎡Cmo Cmi ⎤ [1 α ih ] + Cm δ δ E


T
Cmα
⎣ h ⎦ E

ADVANCED CONTROL SYSTEM DESIGN 27


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
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 28
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
ADVANCED CONTROL SYSTEM DESIGN 29
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore
ADVANCED CONTROL SYSTEM DESIGN 30
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

You might also like