Professional Documents
Culture Documents
Lecture-17
Modeling in Time Domain (State Space Modeling)
Dr. Imtiaz Hussain
Associate Professor (Control Systems),
Department of Electrical Engineering
DHA Suffa University, Karachi, Pakistan
email: imtiaz.hussain@dsu.edu.pk
Note: I do not claim any originality in these lectures. The contents of this presentation are
mostly taken from the book of Ogata, Norman S Nise and various other internet sources. 1
Introduction
• The state variable approach of modern control theory provides a
uniform and powerful methods of representing systems of arbitrary
order, linear or nonlinear, with time-varying or constant coefficients.
3
Definitions
• Let x1 and x2 are two state variables that define the state of
the system completely .
dx
x2 dt
Velocity State (t=t1)
State (t=t1)
State
Vector
x1 Position
x
4
Example-1
• An electrical network is given in following figure, find a
state-space representation if the output is the current
through the resistor.
𝑑 𝑣 𝑐 (𝑡 )
𝐶 =𝑖 𝑐
𝑑𝑡
𝑑 𝑖 𝐿 (𝑡 )
𝐿 =𝑣 𝐿
𝑑𝑡
v c
• State Vector
iL
Example-1
• Step 3: Apply network theory, such as Kirchhoff’s voltage
and current laws, to obtain iC and vL in terms of the state
variables, vC and iL.
i L i R iC
𝑑 𝑣 𝑐 (𝑡 )
iC i R iL 𝐶
𝑑𝑡
=𝑖 𝑐
𝑑 𝑖 𝐿 (𝑡 )
𝐿 =𝑣 𝐿
dvC vC 𝑑𝑡
C iL (1)
dt R
Example-1
• Step 3: Apply network theory, such as Kirchhoff’s voltage
and current laws, to obtain iC and vL in terms of the state
variables, vC and iL.
diL
v(t ) L vR 𝑑 𝑣 𝑐 (𝑡 )
dt 𝐶
=𝑖 𝑐
𝑑𝑡
𝑑 𝑖 𝐿 (𝑡 )
diL 𝐿 =𝑣 𝐿
𝑑𝑡
L vC v(t ) (2)
dt
Example-1
dvC vC diL
C iL (1) L vC v(t ) (2)
dt R dt
Write equation (1) & (2) in standard form.
dvC 1 1
vC i L
dt RC C
State Equations
diL 1 1
vC v(t )
dt L L
Example-1
dvC 1 1 diL 1 1
vC i L vC v(t )
dt RC C dt L L
1 1
d vc RC v 0
C c 1 v(t )
1
dt i L i
0 L L
L
1 1
v c RC v 0
C c 1 v(t )
1
i L i
0 L L
L
Example-1
Step-4: The output is current through the resistor therefore, the
output equation is
1
iR vC
R
1 v c
iR 0
R iL
Example-1
1 1
v c RC v 0
C c 1 v(t )
1
iL 0 i L L
L Where,
x(t) --------------- State Vector
x (t ) Ax(t ) Bu(t ) A (nxn) ---------------- System Matrix
B (nxp) ----------------- Input Matrix
u(t) --------------- Input Vector
1 v c
iR 0
R iL Where,
y(t) -------------- Output Vector
C (qxn) ---------------- Output Matrix
y(t ) Cx(t ) Du (t ) D ----------------- Feed forward Matrix
Example-2
• Consider RLC Circuit shown below. Represent the system in Sate
Space and find (if L=1H, R=3Ω and C=0.5 F):
– State Vector
iL
– System Matrix
+ +
– Input Matrix & Input Vector Vc Vo
– Output Matrix & Output Vector - -
dvc diL
C u( t ) iL L RiL vc Vo RiL
dt dt
• Choosing vc and iL as state variables
dvc 1 1 diL 1 R
iL u(t ) vc iL
dt C C dt L L
Example-2
dvc 1 1 diL 1 R
iL u(t ) vc iL
dt C C dt L L
1
v c 0 v 1
C c
C u(t )
i 1
R iL State Equation
L 0
L L
Vo RiL
v c
Vo 0 R Output Equation
iL
Example-3
• Find the state-space representation of the electrical network
shown in following Figure. The output is vo(t).
Example-3
• Solution
𝒗 𝑳 𝒗 𝒐
𝑑 𝑣 𝑐 1 (𝑡 ) 𝑑 𝑖 𝐿 (𝑡 ) 𝑑 𝑣 0 (𝑡 )
𝐶1 =𝑖 𝑐1 𝐿 =𝑣 𝐿 𝐶2 =𝑖 𝑐 2
𝑑𝑡 𝑑𝑡 𝑑𝑡
𝑣𝑐1
State Vector 𝒙= 𝑖 𝐿
𝑣𝑜 [ ]
𝑑 𝑣 𝑐 1 (𝑡 ) Example-3
𝐶1 =𝑖 𝑐1
𝑑𝑡 𝒗𝑳 𝒗𝒐
𝑑 𝑖 𝐿 (𝑡 )
𝐿 =𝑣 𝐿
𝑑𝑡
𝑑 𝑣 0 (𝑡 )
𝐶2 =𝑖 𝑐 2
𝑑𝑡
• Now obtain , and in terms of state variables
𝑖 𝑐 1=𝑖 𝐿 +𝑖 𝑅
𝑣 𝐿 =(𝑣 ¿ ¿ 𝑖− 𝑣 𝑐 1)¿
𝑣𝐿 − 𝑣𝑜
𝑖 𝑐 1=𝑖 𝐿 + 𝑣𝐿 − 𝑣𝑜
𝑅
𝑖 𝑐 2=𝑖 𝑅 =
(𝑣 ¿ ¿ 𝑖 − 𝑣 𝑐1 )− 𝑣 𝑜 𝑅
𝑖 𝑐 1=𝑖 𝐿 + ¿ (𝑣 ¿ ¿𝑖 − 𝑣 𝑐1 )− 𝑣 𝑜
𝑅 𝑖 𝑐 2=
𝑅
¿
𝑣𝑖 𝑣𝑐 1 𝑣𝑜 𝑣𝑖 𝑣𝑐1 𝑣𝑜
𝑖 𝑐 1=𝑖 𝐿 + − − 𝑖 𝑐 2= − −
𝑅 𝑅 𝑅 𝑅 𝑅 𝑅
Example-3
• Solution
𝒗 𝑳 𝒗 𝒐
𝑣𝑐1
[ ]
𝒙= 𝑖 𝐿
𝑣𝑜
Example-4
• State Space Representation of Series RLC circuit
𝑑𝑞 (𝑡 ) 𝑑 2 𝑞(𝑡 ) 1
𝑣 ( 𝑡 )= 𝑅+𝐿 2
+ 𝑞(𝑡 )
𝑑𝑡 𝑑𝑡 𝐶
Example-4
𝑑𝑞 (𝑡 ) 𝑑 2 𝑞(𝑡 ) 1
𝑣 ( 𝑡 )= 𝑅+ 𝐿 2
+ 𝑞(𝑡 )
𝑑𝑡 𝑑𝑡 𝐶
• We can convert above equation into two simultaneous, first-
order differential equations in terms of i(t) and q(t).
𝑑𝑖 (𝑡 )
𝑅 1 1
=− 𝑖 ( 𝑡 ) − 𝑞 ( 𝑡 )+ 𝑣 ( 𝑡 )
𝑑𝑡 𝐿 𝐿𝐶 𝐿
Example-4
𝑑𝑞(𝑡 ) 𝑑𝑖 (𝑡 ) 𝑅 1 1
=𝑖 (𝑡 ) =− 𝑖(𝑡 )− 𝑞 (𝑡 ) + 𝑣 ( 𝑡 )
𝑑𝑡 𝑑𝑡 𝐿 𝐿𝐶 𝐿
q 0 1 q 0
i 1 R 1 v(t )
i
LC L L
• If capacitor Voltage is the output then
1 1
𝑣 𝑐 ( 𝑡 ) = ∫ 𝑖(𝑡 )𝑑𝑡= 𝑞 (𝑡)
𝐶 𝐶
1 q
vc 0
C i
Example-5: Home Work
• Find the state-space representation of the electrical
network shown in following Figure. The output is vo(t).
Example-5: Home Work
• Solution
Example-5: Home Work
• Solution
Example-5: Home Work
• Solution
Example-6
• Represent the electrical network shown in following
figure in state space, where iR(t) is the output.
Example-6
Example-6
𝑑𝑣1 1 𝑑 𝑖 1 3
= 𝑖2 = 𝑣𝐿
𝑑𝑡 3 𝑑𝑡 2
1
𝑖 2= ( 𝑣 𝑖 − 𝑣 1 ) − 𝑖 3
3
𝑑 𝑣 1 1 1 1
=− 𝑣 1 − 𝑖3 + 𝑣 𝑖
𝑑𝑡 9 3 9
Example-6
𝑑𝑣1 1 1 1 𝑑 𝑖 3 11 3
=− 𝑣 1 − 𝑖 3 + 𝑣 𝑖 =− 𝑣 − 𝑖
𝑑𝑡 9 3 9 𝑑𝑡 2 1 2 3
• Writing state equations in vector matrix form
1 1
[ ] 𝑣˙1
𝑖˙3
=
−
9
11
2
[ − −
−
3
3
2
] 𝑣1
[ ]
𝑖3
1
[]
+ 9 𝑣𝑖
0
𝑣1
𝑖𝑅 = [ 4 1]
[ ] 𝑖3
Example-7
• Consider the following system
K
x(t)
M
f(t)
B
Differential equation of the system is:
d 2 x(t ) dx(t )
M B Kx(t ) f (t )
dt 2 dt
33
Example-7
• As we know
dx d 2x dv
v
dt dt 2 dt
• Choosing x and v as state variables
d 2 x(t ) dx(t )
dx M B Kx(t ) f (t )
v dt 2 dt
dt
dv B K 1
v x f (t )
dt M M M
x 0 1 x 0
K B 1 f (t )
v
v M M M
Example-7
x 0 1 x 0
K B 1 f (t )
v
v M M M
• If velocity v is the out of the system then output equation is given as
x
y (t ) 0 1
v
Example-8
• Find the state equations of following mechanical translational
system.
d 2 x1 dx1 d 2 x2
M1 2
D Kx1 Kx2 0 f (t ) M 2 2
Kx2 Kx1
dt dt dt
Example-8
• Now dx1 d 2 x1 dv1
v1
dt dt 2 dt
dx2 d 2 x2 dv2
v2
dt dt 2 dt
• Choosing x1, v1, x2, v2 as state variables
dx1
v1
dt
dv1
M1 Dv1 Kx1 Kx2 0
dt
dx2
v2
dt
dv2
f (t ) M 2 Kx2 Kx1
dt
Example-8
• In Standard form
dx1
v1
dt
dv1 D K K
v1 x1 x2
dt M1 M1 M1
dx2
v2
dt
dv2 K K 1
x2 x1 f (t )
dt M2 M2 M2
Example-8
dx1 dv1 D K K dx2
v1 v1 x1 x2 v2
dt dt M1 M1 M1 dt
dv2 K K 1
x2 x1 f (t )
dt M2 M2 M2
• In Vector-Matrix form
0 1 0 0 0
x 1 K D K 1 x
0 0
v1 M 1 M1 M1 v1
0 f (t )
x 2 0 0 0 1 x2
K K 1
v 2 M 0 0 v 2
2 M2 M2
Example-8
0 1 0 0 0
x 1 K D K 1 x
0 0
v1 M 1 M1 M1 v1
0 f (t )
x 2 0 0 0 1 x2
K K 1
v 2 M 0 0 v 2
2 M2 M2
x1
1 0 0 0 v
1
y (t )
0 0 0 1
x2
v2
Example-9 (Home Work)
• Represent the translational mechanical system shown in
following figure in state space, where x3(t) is the output.
Example-10
• Represent the translational mechanical system shown in
following figure in state space, where x3(t) is the output.
Example-11 (State Space Model of DC Motor)
dia Ra La
u Ra ia La eb Eq. 1
dt B
d ia
TJ Bω Eq. 2 u eb T J
dt
T K t ia Eq. 3
t
stan
con
eb K b ω Eq. 4
=
Vf
d
K t ia J B Eq. 6
dt
Example-11 (State Space Model of DC Motor)
dia
u Ra ia La K b ω Eq. 5
dt 𝑖𝑎
K t ia J
d
B
𝒙=
[ ]
𝜔
Eq. 6
dt
• Re-arranging equation (5) and (6)
dia Ra Kb 1
ia ω u
dt La La La
d B Kt
ia
dt J J
Example-11 (State Space Model of DC Motor)
dia
Ra
ia
Kb
ω
1 d B Kt
u ia
dt La La La dt J J
• In vector Matrix Form
𝑅𝑎 𝐾𝑏
[]
˙𝑖
𝜔˙
𝑎
[
=
−
𝐾𝑡
𝐽
𝐿𝑎
−
−
𝐿𝑎
𝐵
𝐽
] 𝑖𝑎
[ ]
𝜔
1
[ ]
+ 𝐿𝑎 𝑢 (𝑡 )
𝜔
• Output equation
𝑖𝑎
𝑦 =[ 0 1]
[ 𝜔 ]
Example-11 (State Space Model of DC Motor)
• Choosing as state variables
0 1 0
[ ]
0
[ ][ ]
𝜃 𝐵 𝐾𝑡 𝜃
𝑑
𝑑𝑡
𝜃
[]
˙ =
𝑖𝑎
0
0
−
𝐽
𝐾
− 𝑏
𝐿𝑎
𝐽
𝑅
− 𝑎
𝐿𝑎
𝜃˙ +
𝑖𝑎
0
1
𝐿𝑎
𝑒𝑎
𝜃
𝑦 ( 𝑡 )= [ 1 0
[]
0 ] 𝜃˙
𝑖𝑎
To download this lecture visit
http://imtiazhussainkalwar.weebly.com/
END OF LECTURE-17