Chapter 1 Modeling (In State Space
Chapter 1 Modeling (In State Space
Mathematical Modeling of
Dynamic Systems in State
Space
1
Introduction to State Space
analysis
• Two approaches are available for the analysis
and design of feedback control systems
– Classical or Frequency domain technique
– Modern or Time domain technique
2
Introduction to State Space
analysis
• Classical technique is based on converting a
system’s differential equation to a transfer function
• Disadvantage
– Can be applied only to Linear Time Invariant system
– Restricted to Single Input and Single output system
• Advantage
– Rapidly provide stability and transient response information
3
Introduction to State Space
analysis
• Modern technique or state space approach is
a unified method for modeling, analyzing and
designing a wide range of systems
• Advantages :
– Can be used to nonlinear system
– Applicable to time varying system
– Applicable to Multi Input and Multi Output system
– Easily tackled by the availability of advanced
digital computer
4
The State Space Equations
x Ax Bu
y Cx Du 5
Equation defination
x derivative _ of _ the _ state _ vector
x state _ vector
y output _ vector
u input _ of _ control _ vector
A system _ matrix
B input _ matrix
C output _ matrix
D feedfoward _ matrix 6
Two type of equation
• State equation
x Ax Bu
• Output equation
y Cx Du 7
Modeling of Electrical Networks
Voltage-current, voltage-charge, and
impedance relationships for capacitors,
resistors, and inductors
8
Modeling of Electrical Networks
• Consider RL serial network
R
VR
Vi iV L
L
9
Modeling of Electrical Networks
• RL serial network – first order system
10
RL serial network
• The loop equation is
di
L Ri Vi
dt
• Taking the Laplace transform by assuming
zero initial conditions yields
1 1 1
I (s)
Rs s R
L 12
RL serial network
• Taking the inverse Laplace
1 R
t
i (t ) 1 e L
R
13
RL serial network
• Voltage across the resistor
vR (t ) Ri (t )
• Voltage across the inductor
di
vL (t ) vi (t ) Ri (t ) L
dt
• The derivative of the current 0912254180
vi (t ) Ri (t )
di 1
dt L 14
RC serial network
• Figure below shows an RC circuit with input
voltage vi and output voltage vo. Form a state
space model for this system using the voltage
vc across the capacitor as the state variable
15
RC serial network
• Write the equations for the system using
Kirchhoff’s voltage law,
vi vc vo (1)
for _ the _ capacitor
dvc
iC (2)
dt
for _ the _ resistor
vo iR (3) 16
RC serial network
• State variable is given only one
• Therefore the system is a first order system
• Therefore a state equation involving vc is
required
• Combine equation (2) and (3) yields
vo dvc
iC
R dt
dvc
vo RC (4)
dt 17
RC serial network
• Eliminate vo from equation (4) and combine
with equation (1) and rearrange gives
vi vc vo
dvc
vi vc RC
dt
dvc
RC vc vi
dt
dvc 1 1
vc vc vi (5)
dt RC RC 18
RC serial network
• Output of the system
vo vc vi (6)
• Rearrange equation (5) and (6) in matrix form
yields
1 1
v c
v
v
RC RC
c i
y 1v c 1v i 19
RC serial network
• Where, x state _ vector vc
x derivative _ state _ vector v c
u input _ vector vi
y output _ vector vo vr
1
A state _ matrix
RC
1
B input _ matrix
RC
C ouput _ matrix 1
D direct _ transmission _ matrix 1
20
Modeling of Electrical Networks
• Consider RLC serial network
L
R
VR VL
Vi
C
i VC
21
Modeling of Electrical Networks
• RLC serial network – second order system
22
State Variables and output
• Select two state variables,
x1 q
x2 i
y VL
23
Loop equation
• Using Kirchoff Voltage Law,
di 1
L Ri
dt C
idt v(t)
24
Converting to charge
• Using equation,
dq
i
dt
2
dq dq 1
L 2 R q v(t)
dt dt C 25
Derivatives of state vector
x1 q
dq
x1 i
dt
x2 i
di
x2
dt 26
State equation
• First state equation
dq
x1 i x2
dt
• Second state equation, using
q idt
di 1
L Ri idt v(t)
dt C
di q Ri v(t)
dt LC L L
1 R 1
x2 x1 x 2 u 27
LC L L
State equation in matrix form
x Ax Bu
0
1 x 0
x1
x 1 R 1 u
1
x LC x2
L
2 L
dq
dt 0 1 q 0
x 1 R 1 v(t )
di i
LC L L
dt 28
Output equation
• Output system is VL
VL VR VC v(t)
VL VC VR v(t)
1
V L idt iR v(t)
C
1
VL q Ri v(t)
C
1
VL x1 Rx 2 u
C 29
Output equation in matrix form
y Cx Du
1 x1
y R 0u
C x2
1 q
VL R 0v(t )
C i 30
Change State Variables but output
still same
x1 VR
x 2 VC
y VL
31
Voltage formula for R, L and C
VR iR
1
VC idt
C
di
VL L
dt 32
Derivative of first state equation
x1 VR
dVR di R
x1` R v(t) VR VC
dt dt L
R R R
x1 VR VC v(t)
L L L
R R R
x1` x1 x 2 u
L L L 33
Derivative of second state
equation
x 2 VC
dVC 1 1
x2 i VR
dt C RC
1
x2 x1
RC 34
State equation in matrix form
x Ax Bu
R R
x R
x1
x L L
L u
1
x 1 x2 0
2 0
RC
dVR R R
dt L L VR R
x L v(t )
0 C 0
dVC 1 V
dt RC
35
Output equation
VL VR VC v(t)
VL VR VC v(t)
y x1 x 2 u
36
Output equation in matrix form
y Cx Du
x1
y 1 1 1 u
x2
VR
VL 1 1 1 v(t )
VC 37
Example : 2 loop
• Find a state space representation if the output
is the current through the resistor.
• State variables VC and iL
• Output is iR
• Input is Vi
38
Electrical network LRC
L
node 1
VL
Vi iL
VR
R C
iR
iC VC
39
Solution : Step 1
• Label all of the branch currents in the network.
• iL(t), iR(t) and iC(t)
40
Solution : Step 2
• Select the state variables by writing
the derivative equation for all energy-
storage elements ie inductor and
capacitor
1
VC iC (t )dt
C
dVC
iC C (1)
dt
diL
VL L (2)
dt 41
Solution : Step 3
• Apply network theory, such as Kirchoff’s
voltage and current laws to obtain iC and VL
in terms of the state variable VC and iL
• At node 1,
iL iR iC
iC iL iR
1
iC VC iL (3)
• Arround the outer loop,
R
V (t ) VL VC
VL VC V (t ) (4)
42
Solution : Step 4
• Substitute the result of equation (3) and
equation (4) into equation (1) and (2)
dVC 1
C VC iL (7)
dt R
diL
L VC V (t ) (8)
dt
• Rearrange
dVC 1 1
VC iL (9)
dt RC C
diL 1 1
VC V (t ) (10)
dt L L 43
Solution : Step 5
• Find the output equation
1
iR VC (11)
R
44
Solution : Step 6
• State space representation in vector matrix
form are
dVC 1 1
dt RC C VC 0
di 1 . 1 v(t ) (12)
L 0 L L
i
dt L
1 VC
iR 0. (13)
R iL
45
Example 2 loop
• Find the state space representation of the
electrical network shown in figure below
• Input vi(t)
• Output vo(t)
• State variables x1 = vC1, x2 = iL and x3 = vC2
46
RLC two loop network
• Identifying appropriate variables on the
circuit yields
C1
node R
iR
iC1
Vi iC2 Vo
DC
L C2
iL
47
RLC two loop network
• Identifying appropriate variables on the circuit
yields
48
RLC two loop network
• Represent the electrical network shown in
figure in state space where
• Output is v0(t)
• Input is vi(t)
• State variables :-
x1 = vC1
x2 = iL
x3 = vC2
49
solution
• Writing the derivative relations
dvC1
C1 iC1
dt
diL
L vL
dt
dVC 2
C2 iC 2
dt 50
solution
• Using Kirchhoff’s current and voltage laws
1
iC1 iL iR (vL vC 2 )
R
vL vC1 vi
1
iC 2 iR (vL vC 2 )
R 51
solution
• Substituting these relations and simplifying
yields the state equations as
dvC1 1 1 1 1
vC1 iL vC 2 vi
dt RC1 C1 RC1 RC1
diL 1 1
vC1 vi
dt L L
dvC 2 1 1 1
vC1 vC 2 vi
dt RC 2 RC 2 RC 2
vo vC 2 52
solution
• Putting the equations in vector matrix form
1 1 1 1
RC
C1 RC1 RC1
1
1 1
x 0 0 x vi
L L
1 1 1
0
RC 2 RC 2 RC 2
y 0 0 1x 53
Example 1
i1 i3 i5
Vi C1 = 1 F
L=1H
C2 = 1 F Vo
i2 i4
55
Electrical network 1
• Add the branch current and node voltages to
the network
56
solution
• Write the differential equation for each energy
storage element
dv1
i2
dt
di4
v2
dt
dv0
i5
dt 57
solution
• Therefore the state vector is ,
v1
x i4
vo
58
solution
• Now obtain i2, v2 and i5 in terms of the state
variables,
i2 i1 i3 vi v1 (v1 v2 ) vi 2v1 v2
v2 i5 vo i3 i4 v0 v1 v2 i4 v0
Therefore,
1 1 1
v2 v1 i4 vo
2 2 2 59
solution
• Substituting v2 in i2,
3 1 1
i2 vi v1 i4 v0
2 2 2
also,
i5 i3 i4 v1 v2 i4
substituti ng _ v2 ,
1 1 1
i5 v1 i4 vo
2 2 2 60
solution
• Therefore rearrange i2, v2 and i5 in matrix form
yields
3 1 1
x 1 v 1 i2 2 2 2 v1 1
1 1 1
x x2 i4 v2 . i4 0 vi
2 2 2
x3 vo i5 1 1 1 vo 0
2 2 2
v1
y 0 0 1. i4
vo 61
Example 2
• Represent the electrical network shown in
figure in state space where
• Output is iR(t)
• Input is vi(t)
• State variables :-
x 1 = i2
x2 = v C
62
Electrical network 2
• Add the branch currents and node voltages
to the schematic and obtain
C = 1F
R1 = 1 Ohm
node V1 node V2
i1
i3
Vi R2=1 Ohm
4V1 iR
DC
L = 1H i2
i4
63
Electrical network 2
• Add the branch currents and node voltages to
the schematic and obtain
64
solution
• Write the differential equation for each energy
storage element
di2
v1
dt
dvc
i3
dt 65
solution
• Therefore the state vector is,
i2
x
c
v
66
solution
• Now obtain v1 in terms of the state variables
v1 vc v2
v1 vc iR
v1 vc i3 4v1
v1 vc (i1 i2 ) 4v1
v1 vc vi v1 i2 4v1
1 1 1
v1 i2 vc vi 67
2 2 2
solution
• Now obtain i3 in terms of the state variables
i3 i1 i2
i3 vi v1 i2
1 1 1
i3 vi i2 vc vi i2
2 2 2
3 1 3
i3 i2 vc vi
2 2 2 68
solution
• Now obtain the output iR in terms of the state
variables
iR i3 4v1
1 3 1
iR i2 vc vi
2 2 2 69
solution
• Hence the state space representation
1 1 1
v
i
i2 2 2 2 v
x 1 2
3 i
.
v i3 3 1
vc
c
2 2 2
1 3 i2 1
y . vi
2 2 vc 2
70
RLC network with 2 input
R L1 L2
i1 + i2
Va iC C -
VC Vb
DC
DC
71
solution
• State variables and their derivatives
di1
x1 i1 x1
dt
di2
x2 i2 x2
dt
dvc
x3 v x3
dt
u1 va
u 2 vb
y vc 72
solution
• The derivatives equations for energy storage
elements
di1
L1 vL1 (1)
dt
di2
L2 vL 2 (2)
dt
dv
C iC (3)
dt 73
solution
• For loop (1) ;
va i1R vL1 vC
vL1 va i1R vC (4)
• For loop (2) ;
vb vL 2 vC
vL 2 vb vC (5)
74
solution
• For current iC ;
iC i1 i2 (6)
• Substituting equation (4), (5) and (6) into
equation (1), (2) and (3) yields
di1
L1 va i1 R vC
dt
di1 R 1 1
i1 vC va
dt L1 L1 L1
di1 R 1 1
x1 x1 x3 va (7)
dt L1 L1 L1 75
solution
• Substituting equation (4), (5) and (6) into
equation (1), (2) and (3) yields
di2
L2 vb vC
dt
di2 1 1
vC vb
dt L2 L2
di2 1 1
x2 x3 vb (8)
dt L2 L2 76
solution
• Substituting equation (4), (5) and (6) into
equation (1), (2) and (3) yields
dvC
C i1 i2
dt
dvC 1 1
i1 i2
dt C C
dvC 1 1
x3 x1 x2 (9)
dt C C 77
solution
• Rewrite equation (7), (8) and (9) in state space
representation matrix form
R 1 1
L 0
L1 x L1
0
x1
1
1 v
1 a
x x2 0
. x2 0
1
0 .
L2 L2 vb
x3 1 1 x3 0 0
0
C C
x1
y 0 0 1. x2
x3 78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Eigenvalues and Eigenvectors
Definition 1: A nonzero vector x is an eigenvector (or characteristic vector) of a
square matrix A if there exists a scalar λ such that Ax = λx. Then λ is an
eigenvalue (or characteristic value) of A.
Note: The zero vector can not be an eigenvector even though A0 = λ0. But λ = 0
can be an eigenvalue.
Example: 2 2 4
Show x is an eigenvector for A
1 3 6
2 4 2 0
Solution : Ax
3 6 1 0
2 0
But for 0, x 0
1 0
Thus, x is an eigenvector of A,and 0 is an eigenvalue.
Geometric interpretation of
Eigenvalues and Eigenvectors
An n×n matrix A multiplied by n×1 vector x results in another n×1
vector y=Ax. Thus A can be considered as a transformation matrix.
Example 1 (cont.):
3 12 1 4
1 : (1) I A
1 4 0 0
x1 4 x2 0 x1 4t , x2 t
x1 4
x1 t , t 0
x2 1
4 12 1 3
2 : (2) I A
1 3 0 0
x1 3
x 2 s , s 0
x2 1
Eigenvectors 2 1 0
Example 2 (cont.): Find the eigenvectors of A 0 2 0
0 0 2
Recall that λ = 2 is an eigenvector of multiplicity 3.
Solve the homogeneous linear system represented by
0 1 0 x1 0
(2 I A)x 0 0 0 x2 0
0 0 0 x3 0
Let x1 s, x3 t. The eigenvectors of = 2 are of the form