Lecture 6 State Space Modeling Analysis
Lecture 6 State Space Modeling Analysis
Lecture-6
State Space Modeling & Analysis
• State Variable: The state variables of a dynamic system are the smallest
set of variables that determine the state of the dynamic system.
dx
x2 dt
Velocity State (t=t1)
State (t=t1)
State
Vector
x1 Position
x
4
State Space Equations
• In state-space analysis we are concerned with three types of
variables that are involved in the modeling of dynamic systems:
input variables, output variables, and state variables.
𝑥˙ 1 ( 𝑡 )= 𝑓 1 (𝑥 1 , 𝑥 2 , ⋯ , 𝑥 𝑛 ; 𝑢1 ,𝑢 2 , ⋯ , 𝑢𝑟 ; 𝑡 )
˙ 2 ( 𝑡 ) = 𝑓 2 ( 𝑥1 , 𝑥 2 , ⋯ , 𝑥𝑛 ; 𝑢1 , 𝑢2 , ⋯ , 𝑢𝑟 ; 𝑡 )
𝑥
˙ 𝑛 ( 𝑡 )= 𝑓 𝑛 ( 𝑥 1 , 𝑥 2 , ⋯ , 𝑥 𝑛 ; 𝑢1 ,𝑢 2 , ⋯ ,𝑢 𝑟 ; 𝑡 )
𝑥
State Space Equations
• The outputs of the system may be given as.
𝑦 1 ( 𝑡 ) =𝑔1 ( 𝑥 1 , 𝑥 2 , ⋯ , 𝑥 𝑛 ; 𝑢1 ,𝑢 2 , ⋯ ,𝑢 𝑟 ; 𝑡 )
𝑦 2 ( 𝑡 ) =𝑔 2 (𝑥 1 , 𝑥 2 , ⋯ , 𝑥 𝑛 ; 𝑢1 ,𝑢 2 , ⋯ , 𝑢𝑟 ; 𝑡 )
𝑦 𝑚 ( 𝑡 )=𝑔 𝑚 ( 𝑥1 , 𝑥 2 , ⋯ , 𝑥𝑛 ; 𝑢1 , 𝑢2 , ⋯ , 𝑢𝑟 ;𝑡 )
• If we define
[] [ ]
𝑥1 𝑓 1 ( 𝑥 1 , 𝑥 2 , ⋯ , 𝑥 𝑛 ; 𝑢1 ,𝑢2 , ⋯ ,𝑢 𝑟 ; 𝑡 )
𝒙 ( 𝑡 )= 𝑥 2 𝒇 ( 𝒙 ,𝒖 , 𝑡 )= 𝑓 2 ( 𝑥 1 , 𝑥 2 , ⋯ , 𝑥 𝑛 ; 𝑢1 ,𝑢 2 , ⋯ ,𝑢 𝑟 ; 𝑡 )
⋮
[]
⋮
𝑥𝑛 𝑓 𝑛 ( 𝑥1 , 𝑥 2 , ⋯ , 𝑥𝑛 ; 𝑢 1 , 𝑢2 , ⋯ , 𝑢𝑟 ;𝑡 ) 𝑢1
𝑢
𝒖 ( 𝑡 )= 2
⋮
𝑢𝑟
[] [ ]
𝑦1 𝑔 1 (𝑥 1 , 𝑥 2 , ⋯ , 𝑥 𝑛 ; 𝑢1 ,𝑢 2 , ⋯ , 𝑢𝑟 ; 𝑡 )
𝑦2 𝑔 2 ( 𝑥1 , 𝑥 2 , ⋯ , 𝑥𝑛 ; 𝑢1 , 𝑢2 , ⋯ , 𝑢𝑟 ; 𝑡 )
𝒚 ( 𝑡 )= 𝒈 ( 𝒙 , 𝒖, 𝑡)=
⋮ ⋮
𝑦𝑚 𝑔𝑚 (𝑥 1 , 𝑥 2 , ⋯ , 𝑥 𝑛 ; 𝑢1 , 𝑢2 , ⋯ , 𝑢𝑟 ; 𝑡 )
State Space Modeling
𝒙˙ ( 𝑡 )= 𝒇 (𝒙 ,𝒖 ,𝑡 ) State Equation
B C
A
Example-1
• Consider the mechanical system shown in figure. We assume that the
system is linear. The external force u(t) is the input to the system, and the
displacement y(t) of the mass is the output. The displacement y(t) is
measured from the equilibrium position in the absence of the external force.
This system is a single-input, single-output system.
• Then we obtain
𝑏 𝑘 1
𝑥˙ 2 ( 𝑡 ) =− 𝑦˙ ( 𝑡 ) − 𝑦 ( 𝑡 ) + 𝑢(𝑡 )
𝑚 𝑚 𝑚
• Or
𝑏 𝑘 1
𝑥˙ 2 ( 𝑡 ) =− 𝑥2(𝑡 ) − 𝑥 1 ( 𝑡 )+ 𝑢 (𝑡 )
𝑚 𝑚 𝑚
• The output equation is
𝑦 ( 𝑡 ) =𝑥1 ( 𝑡 )
Example-1
𝑏 𝑘 1
𝑥˙ 2 ( 𝑡 ) =− 𝑥2(𝑡 ) − 𝑥 1 ( 𝑡 )+ 𝑢 (𝑡 ) 𝑦 ( 𝑡 ) =𝑥1 ( 𝑡 )
𝑚 𝑚 𝑚
• In a vector-matrix form,
x 1 (t ) 0 1 x (t ) 0
x (t ) k b 1 1 u (t )
x2 (t )
2 m m m
x1 (t )
y (t ) 1 0
x
2 (t )
Example-1
• State diagram of the system is
𝑏 𝑘 1
𝑥˙ 2 ( 𝑡 ) =− 𝑥2(𝑡 ) − 𝑥 1 ( 𝑡 )+ 𝑢 (𝑡 )
𝑚 𝑚 𝑚
𝑦 ( 𝑡 ) =𝑥1 ( 𝑡 )
-k/m
-b/m
1/m 𝑥˙ 2 𝑥1
𝑢(𝑡) 1/s 𝑥 = 𝑥˙ 1/s 𝑦 (𝑡)
2 1
Example-1
• State diagram in signal flow and block diagram format
-k/m
-b/m
1/m 𝑥˙ 2 𝑥1
𝑢(𝑡) 1/s 𝑥 = 𝑥˙ 1/s 𝑦 (𝑡)
2 1
Example-2
• State space representation of armature Controlled D.C Motor.
Ra La
B
ia
ea eb T J
t
stan
= con
Vf
• ea is armature voltage (i.e. input) and is output.
dia
ea Ra ia La eb
dt
T J B
Example-2
T K t ia eb K b
J B-K t ia 0
dia
La Ra ia K b ea
dt
• Choosing as state variables
[ ] [][ ]
0 1 0
[]
𝐾𝑡 0
𝜃 𝐵 𝜃
𝑑 0 −
𝜃˙ = 𝐽 𝐽 𝜃˙ + 0 𝑒𝑎
𝑑𝑡 1
𝑖𝑎 𝐾𝑏 𝑅𝑎 𝑖𝑎
0 − − 𝐿𝑎
𝐿𝑎 𝐿𝑎
• Since is output of the system therefore output equation is given as
[]
𝜃
𝑦 ( 𝑡 ) =[ 1 0 0] 𝜃˙
𝑖𝑎
State Controllability
• A system is completely controllable if there exists an
unconstrained control u(t) that can transfer any initial
state x(to) to any other desired location x(t) in a finite
time, to ≤ t ≤ T.
uncontrollable
controllable
State Controllability
• Controllability Matrix CM
CM B AB A2 B An 1 B
• System is said to be state controllable if
rank (CM ) n
State Controllability (Example)
• Consider the system given below
1 0 1
x x u
0 3 0
y 1 2x
• State diagram of the system is
U (s ) 1 s -1 x1
1
Y (s )
1
2
3 x2
s -1
State Controllability (Example)
• Controllability matrix CM is obtained as
CM B AB
1 1
B AB
0 0
• Thus
1 1
CM
0 0
• Since therefore system is not completely state
controllable.
State Observability
• A system is completely observable if and only if there exists a finite
time T such that the initial state x(0) can be determined from the
observation history y(t) given the control u(t), 0≤ t ≤ T.
observable
unobservable
State Observability
• Observable Matrix (OM)
C
CA
Observability Matrix OM CA
2
CAn 1
rank (OM ) n
State Observability (Example)
• Consider the system given below
0 1 0
x x u
0 2 1
y 0 4x
• OM is obtained as
C
OM
CA
• Where C 0 4
0 1
CA 0 4 0 12
0 2
State Observability (Example)
• Therefore OM is given as
0 4
OM
0 12
• Since therefore system is not completely state observable.
U (s ) 1 s -1 x2 s -1 x1 Y (s )
2
Output Controllability
• Output controllability describes the ability of an external
input to move the output from any initial condition to any
final condition in a finite time interval.
OCM CB CAB CA 2 B CA n 1 B
Home Work
• Check the state controllability, state observability
and output controllability of the following system
0 1 0
A , B , C 0 1
1 0 1
Transfer Matrix (State Space to T.F)
• Now Let us convert a space model to a transfer function model.
x (t ) Ax(t ) Bu (t ) (1)
Y ( s ) CX ( s ) DU ( s ) (4)
• From equation (3)
( sI A) X ( s ) BU ( s )
X ( s ) ( sI A) 1 BU ( s ) (5)
Transfer Matrix (State Space to T.F)
• Substituting equation (5) into equation (4) yields
1
Y ( s) C ( sI A) BU ( s ) DU ( s)
Y ( s ) C ( sI A) 1
B D U ( s)
Example#3
• Convert the following State Space Model to
Transfer Function Model if K=3, B=1 and
M=10;
x 0 1 x 0
K B 1 f (t )
v
v M M M
x
y (t ) 0 1
v
Example#3
• Substitute the given values and obtain A, B, C
and D matrices.
x
0 1 x 0
v 3 1 1 f (t )
10 v
10 10
x
y (t ) 0 1
v
Example#3
0 1 0
A 3 1 B1
10 10
10
D0
C 0 1
Y (s)
C ( sI A) 1 B D
U ( s)
Example#3
0 1 0
A 3 1 B1
10 10
10
D0
C 0 1
1
Y ( s) s 0 0 1 0
0 1 3 1 1
U ( s) 0 s 10
10 10
Example#3
1
Y ( s) s 0 0 1 0
0 1 3 1 1
U (s) 0 s 10
10 10
1
Y (s) s 1 0
0 1 3 1 1
U ( s) s 10
10 10
1
Y ( s) 1 s 10 1 0
0 1 1
U (s) 1 3 3
s( s ) s 10
10 10 10
Example#3
1
Y ( s) 1 s 10 1 0
0 1 1
U ( s) 1 3 3
s( s ) s 10
10 10 10
Y (s) 1 3 1
0
10 s
U ( s) s(s 1 ) 3 10
10 10
Y (s) 1 s
U ( s ) s ( s 1 ) 3 10
10 10
Example#3
Y ( s) 1 s
U ( s ) s ( s 1 ) 3 10
10 10
Y (s) s
U ( s ) s (10s 1) 3
Home Work
• Obtain the transfer function T(s) from
following state space representation.
Answer
Forced and Unforced Response
• Forced Response, with u(t) as forcing function
x 1 a11 a12 x1 b1
x a u(t )
2 21 a22 x2 b2
• Unforced Response (response due to initial conditions)
sX ( s ) x(0) AX ( s )
sX ( s ) AX ( s ) x(0)
1
X (s) x ( 0)
sI A
Solution of State Equations
1
X (s) x ( 0)
sI A
• Taking inverse Laplace
At
x(t ) e x(0)
1 iL Vo
v c 0 v 1 + +
C c
C u(t )
i 1 R Vc
L iL 0 - -
L L
R 3, L 1 and C 0.5
S 3 2
1 ( S 1)( S 2 )
(t ) ( S 1)( S 2)
1 S
( S 1)( S 2 ) ( S 1)( S 2 )
Example-4 (cont...)
S 3
2
1 ( S 1)( S 2 ) ( S 1)( S 2 )
(t )
1 S
( S 1)( S 2 ) ( S 1)( S 2 )
• Taking the inverse Laplace transform of each element
( 2e e ) ( 2e 2e )
t 2 t t 2 t
( t ) t 2t t 2t
( e e ) ( e 2e )
Home Work
• Compute the state transition matrix if
1 0 0
A 0 2 0
0 0 3
Solution
1 1
(t ) [( SI A) ]
State Space Trajectories
• The unforced response of a system released from any initial
point x(to) traces a curve or trajectory in state space, with time
t as an implicit function along the trajectory.
x (t ) Ax(t )
• Response due to initial conditions can be obtained as
x(t ) (t ) x( 0)
State Transition
• Any point P in state space represents the state of the system
at a specific time t.
x2
P(x1, x2)
x1
t3
x1
t5 t4
Example-5
• For the RLC circuit of example-4 draw the state space trajectory
with following initial conditions.
vc ( 0) 1
• Solution iL ( 0 ) 2
x(t ) (t ) x( 0)
vc (2e t e 2t ) (2e t 2e 2t ) 1
i t 2 t 2t
L (e e ) (e 2e ) 2
t
vc 3e 3e
t 2 t vc 3e t 3e 2t
i t 2t
iL e t 3e 2t
L e 3e
Example-5 (cont...)
• Following trajectory is obtained
State Space Trajectory of RLC Circuit
2
1.5
t-------->inf
1
0.5
iL
-0.5
-1
-1 -0.5 0 0.5 1 1.5 2
Vc
Example-5 (cont...)
State Space Trajectories of RLC Circuit
2
1.5
0
1
1
0.5
1
0 1 0
iL
0
-0.5
0
-1 1
-1.5
-2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
Vc
Equilibrium Point
• The equilibrium or stationary state of the system
is when
x (t ) 0
State Space Trajectories of RLC Circuit
2
1.5
0.5
0
iL
-0.5
-1
-1.5
-2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
Vc
Solution of State Equations
• Consider the state equation with u(t) as forcing function
x (t ) Ax(t ) Bu (t ) (1)
• Taking Laplace transform of the equation (1)
sX ( s ) x(0) AX ( s ) BU ( s )
sX ( s ) AX ( s ) x(0) BU ( s )
Natural Response
Forced Response
Example#6
• Obtain the time response of the following system:
x 1 0 1 x1 0
x 2 u (t )
3 x2 1
2
• Where u(t) is unit step function occurring at t=0.
consider x(0)=0.
Solution
END OF LECTURE-6