Академический Документы
Профессиональный Документы
Культура Документы
Mathematical Modeling
of Dynamic Systems in
State Space
y (t ) Cx (t ) Du (t )
Thursday, February 22, ProfDrMFRCIED 8
2018
Terms
• State equations: a set of n simultaneous,
first order differential equations with n
variables, where the n variables to be
solved are the state variables
• State space: The n-dimensional space
whose axes are the state variables
• State space representation: A
mathematical model for a system that
consists of simultaneous, first order
differential equations and output equation
Thursday, February 22, ProfDrMFRCIED 9
2018
Terms
• State variables: the smallest set of
linearly independent system variables
such that the value of the members of the
set
• State vector: a vector whose elements
are the state variables
Vi (t ) VR (t ) VL (t ) VR (t ) Vo (t )
Vo (t ) VR (t ) Vi (t )
Vo (t ) i (t ) R Vi (t )
y (t ) R i (t ) 1Vi (t )
Thursday, February 22, ProfDrMFRCIED 16
2018
Example 2 : RC serial network
• Figure below shows an RC circuit with
input voltage vi(t) and output voltage at
resistor ie vo(t). Form a state space model
for this system using the voltage vc(t)
across the capacitor as the state variable
R V0
VR
Vi i VC C
di(t ) 1
L Ri (t ) i (t )dt vi (t )
dt C
Thursday, February 22, ProfDrMFRCIED 25
2018
Converting to charge
• Using equation,
dq (t )
i (t )
dt
2
d q (t ) dq (t ) 1
L 2
R q (t ) vi (t )
dt dt C
Thursday, February 22, ProfDrMFRCIED 26
2018
Derivatives of state vector
x1 (t ) q (t )
dq(t )
x1 (t ) i (t ) x2 (t )
dt
x2 (t ) i (t )
di(t )
x2 (t )
dt
Thursday, February 22, ProfDrMFRCIED 27
2018
State equation
• First state equation
dq(t )
x1 (t ) i (t ) x2 (t )
dt
• Second state equation, using
q (t ) i (t )dt
di(t ) 1
L Ri (t ) i (t )dt v(t )
dt C
di (t ) q (t ) Ri (t ) v(t )
dt LC L L
1 R 1
x2 (t ) x1 (t ) x2 (t ) u (t )
LC L L
Thursday, February 22, ProfDrMFRCIED 28
2018
State equation in matrix form
x(t ) Ax (t ) Bu (t )
0 1 x (t ) 0
x (t )
x(t ) 1
1 R 1 1 u (t )
x (t ) LC x2 (t )
L
2 L
dq(t )
dt 0 1 q (t ) 0
x(t ) 1 R 1 v(t )
di(t ) i (t )
LC L L
dt
Thursday, February 22, ProfDrMFRCIED 29
2018
Output equation
• Output system is VL
VL (t ) VR (t ) VC (t ) vi (t )
VL (t ) VC (t ) VR (t ) vi (t )
1
V L(t ) i (t )dt i (t ) R vi (t )
C
1
VL (t ) q (t ) Ri (t ) vi (t )
C
1
VL (t ) x1 (t ) Rx2 (t ) u (t )
C
Thursday, February 22, ProfDrMFRCIED 30
2018
Output equation in matrix form
y (t ) Cx (t ) Du (t )
1 x1 (t )
y (t ) R 1u (t )
C x2 (t )
1 q(t )
VL (t ) R 1v (t )
C i (t )
Thursday, February 22, ProfDrMFRCIED 31
2018
Example 4: RLC network
• Consider RLC serial network
• RLC serial network – second order system
x2 (t ) VC (t )
dVC (t ) 1 1
x2 (t ) i (t ) VR (t )
dt C RC
1
x2 (t ) x1 (t )
RC
Thursday, February 22, ProfDrMFRCIED 37
2018
State equation in matrix form
x(t ) Ax (t ) Bu (t )
R R
x (t ) R
x1 (t )
x(t ) L L 1
L u (t )
x (t ) 1 x2 (t ) 0
2 0
RC
dVR (t ) R R
dt L L VR (t ) R
x(t ) L v(t )
dVC (t )
1
0 V C (t ) 0
dt RC
Thursday, February 22, ProfDrMFRCIED 38
2018
Output equation
VL (t ) VR (t ) VC (t ) v(t )
VL (t ) VR (t ) VC (t ) v(t )
y (t ) x1 (t ) x2 (t ) u (t )
y (t ) Cx (t ) Du (t )
x1 (t )
y (t ) 1 1 1 u (t )
x2 (t )
VR (t )
VL (t ) 1 1 1 v(t )
VC (t )
Thursday, February 22, ProfDrMFRCIED 40
2018
Example 5: 2 loops
• Given the RLC system described a set
of state variables x1 and x2, shown
below,
2 2
Thursday, February 22, ProfDrMFRCIED 42
2018
Utilizing Kirchhoff’s current
law
• Determine the state space
representation,
• At the junction
• First order differential equation
• Describing the rate of change of
capacitor voltage
dvc
ic C u (t ) iL
dt
Thursday, February 22, ProfDrMFRCIED 43
2018
Utilizing Kirchhoff’s voltage
law
• Right hand loop
• Provide the equation describing the
rate of change of inductor current
diL
L RiL vc
dt
• Output of the system, linear algebraic
equation
Thursday, February 22,
vo RiL (t )
ProfDrMFRCIED 44
2018
State space representation
• A set of two first order differential
equation and output signal in terms of
the state variables x1 and x2
dx1 1 1
x2 u ( t )
dt C C
dx2 1 R
x1 x2
dt L L
y (t ) vo (t ) Rx2
Thursday, February 22, ProfDrMFRCIED 45
2018
State space representation
• State space representation,
1
0 x 1
x
x 1 C
. C .u
1
x 1 R x2 0
2
L L
x1
y 0 R .
x2
x
0 1 x1 1
x 1 . .u
x 1 1 x2 0
2
x1
y 0 1.
x2
0 1
A
1 1
1
B
0
C 0 1
Thursday, February 22, ProfDrMFRCIED 48
2018
Transfer _ Function G ( s ) C sI A B D
1
1 0 0 1 s 1
sI A s
0 1 1 1 1 s 1
s 1 1 s 1 1
adj sI A 1 1
sI A1 s s
det sI A s ( s 1) ( 1)(1) s2 s 1
s 1 1
1 1
G ( s ) C sI A B D 0 1. 2 .
1 s
s s 1 0
1
G( s) 2
s s 1
Thursday, February 22, ProfDrMFRCIED 49
2018
Step Response
1.4
System: sys
Peak amplitude: 1.16
Overshoot (%): 16.3
1.2 At time (seconds): 3.59
System: sys
System: sys Final value: 1
Settling time (seconds): 8.08
1
System: sys
Rise time (seconds): 1.64
0.8
Amplitude
0.6
0.4
0.2
0
0 2 4 6 8 10 12
Time (seconds)
Vi iL
VR
R C
iR
iC VC
1
iR (t ) VC (t ) (11)
R
iR
iC1
Vi iC2 Vo
DC
L C2
iL
iC1 (t ) iL (t ) iR (t ) iC1
iR
iC2 Vo
iC1 (t ) iL (t ) ic 2 (t )
Vi
DC
L C2
iL
1
iC1 (t ) iL (t ) (vL (t ) vC 2 (t ))
R
vL (t ) vC1 (t ) vi (t )
1
iC 2 (t ) iR (t ) (vL (t ) vC 2 (t ))
R
Thursday, February 22, ProfDrMFRCIED 64
2018
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 RC2 RC2 RC2
vo vC 2
Thursday, February 22, ProfDrMFRCIED 65
2018
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
RC2 RC2 RC2
y 0 0 1x
Thursday, February 22, ProfDrMFRCIED 66
2018
Modeling of Mechanical
• Mass
Networks
f (t ) M .a (t )
f (t ) M .
d 2 y (t ) y(t)
dt 2
dv(t )
f (t ) M .
dt
a (t ) acceleration
v(t ) velocity
M f(t)
y (t ) displacement
f (t ) force
M mass
Thursday, February 22, ProfDrMFRCIED 67
2018
Modeling of Mechanical
• Linear Spring
Networks
f (t ) K . y (t )
K y(t)
f (t ) force
y (t ) displacement f(t)
K spring _ cons tan t
dy (t ) B y(t)
f (t ) B.
dt
f (t ) force f(t)
y (t ) displacement
B viscous _ frictional
B M
f(t)
x1 (t ) y (t )
dy (t ) dx1 (t )
x2 (t )
dt dt
input u f (t )
output y y (t )
Thursday, February 22, ProfDrMFRCIED 75
2018
Mass, spring and damper
system
• Draw the free body diagram
y(t)
d 2 y (t )
M
dt 2
Ky (t ) M f(t)
dy(t )
B
dt
Thursday, February 22, ProfDrMFRCIED 76
2018
Mass, spring and damper system
• a. Free-body diagram of mass, spring, and
damper system;
b. transformed free-body diagram
x1 (t ) x2 (t )
K B 1
x 2 (t ) .x1 (t ) .x2 (t ) . f (t )
M M M
y (t ) x1 (t )
Thursday, February 22, ProfDrMFRCIED 79
2018
Mass, spring and damper
system
• State space representation in vector
matrix form are
0 1 x (t ) 0
x1 (t )
K B . 1 1 . f (t )
x (t ) M x2 (t )
M M
2
K
x1 (t )
y (t ) 1 0.
y(t)
B M
x2 (t ) f(t)
– All forces on M1
K1X1 K1X2
M1s2X1 M1 u
B1sX1 B1sX2
z3
z4
Thursday, February 22, ProfDrMFRCIED 93
2018
Modeling of Electro-Mechanical System
• NASA flight simulator robot arm with
electromechanical control system components
J m d m Dm d m
2
ia (t ) 2
( 4)
K t dt K t dt
J m d 2 m Dm d m d m
ea (t ) Ra 2
Kb
K t dt K t dt dt
Ra J m d 2 m Ra Dm d m
ea (t ) . 2 K b . (5)
K t dt Kt dt
Thursday, February 22, ProfDrMFRCIED 101
2018
DC motor armature control
• Define the state variables, input and ouput
x1 m (6a )
d m
x2 (6b)
dt
u ea (t )
y 0.1 m
• Substituting equation (6) into equation (5)
yields Ra J m dx2 Ra Dm
ea (t ) . K b .x2 (7)
K t dt K t
Thursday, February 22, ProfDrMFRCIED 102
2018
DC motor armature control
• Solving for x2 dot yields,
Ra Dm
ea (t ) K b .x2
dx2
Kt
dt Ra J m
Kt
dx2 K t Dm K b K t
.ea (t ) .x2
dt Ra J m J m Ra J m
dx2 1 Kb Kt K
Dm .x2 t .ea (t ) (8)
dt Jm Ra Ra J m
Thursday, February 22, ProfDrMFRCIED 103
2018
DC motor armature control
• Using equation (6) and (8), the state
equations are written as
dx1 d m
x2
dt dt
dx2 1 Kt Kb Kt
Dm .x2 .ea (t )
dt Jm Ra Ra J m
Thursday, February 22, ProfDrMFRCIED 104
2018
DC motor armature control
• Assuming that the output o(t) is 0.1 the
displacement of the armature m(t) as x1.
Hence the output equation is
y 0.1x1
• State space representation in vector
matrix form are
0 1
x 0
1
x 1 K t K b . K t .ea (t )
1
x 0 J Dm R x2 R J
2 m a a m
x1
y 0.1 0.
x2
Thursday, February 22, ProfDrMFRCIED 105
2018
Modelling of Electro-Mechanical
System
• Field Controlled DC
+
Rf
ef (t)
Motor if (t)
-
Lf Gelung Medan
Ra La
+
ea
Ba
Ja
ia
- TL(t)
Tm(t)
Gelung Angker m (t )
Tetap
d o d o
2
T (t ) J B (2)
dt dt
Thursday, February 22, ProfDrMFRCIED 107
2018
DC motor field control
• For torque and field current relationship
T (t ) i f (t )
T (t ) K t i f (t ) (3)
• Define the state variables, input and
output x (t ) ( 4)
1 o
d o (t )
x2 (5)
dt
x3 i f (t ) (6)
u e(t )
y o (t )
Thursday, February 22, ProfDrMFRCIED 108
2018
DC motor field control
• From equation (4) and (5), we can
determine the first state equation as :
d o
x1 (t ) x2 (t ) (7 )
dt
• Another two state equations are :
d 2 o
x2 2
(8)
dt
di f
x3 (9)
dt
Thursday, February 22, ProfDrMFRCIED 109
2018
DC motor field control
• Substituting x3 and x3 dot into equation (1)
yields
e(t ) x3 R f L f x3
• Substituting equation (3) into equation (2)
d o d o
yields 2
J 2 B Kti f
dt dt
Thursday, February 22, ProfDrMFRCIED 110
2018
DC motor field control
• Substituting x2 dot, x2 and x3, hence
J x2 Bx2 K t x3
• Rewrite equations
Rf 1
x3 x3 e(t )
Lf Lf
B Kt
x2 x2 x3
J J
Thursday, February 22, ProfDrMFRCIED 111
2018
DC motor field control
• Matrix form
0 1 0 0
x 0
B Kt x 0 u
J J 1
Rf
0 0 L f
Lf
y 1 0 0x
Thursday, February 22, ProfDrMFRCIED 112
2018
Block diagrams
• The block diagram is a useful tool for
simplifying the representation of a
system.
• Simple block diagrams only have one
feedback loop.
• Complex block diagram consist of more
than one feedback loop, more than 1 input
and more than 1 output i.e. inter-coupling
exists between feedback loops
Thursday, February 22, ProfDrMFRCIED 113
2018
Block diagrams
• Integrator
x2 x1dt
x1
K
x1
+ x4 = x1-x2+x3
• Summer x2 -
x3
+
Thursday, February 22, ProfDrMFRCIED 114
2018
Signal flow graphs
• Having the block diagram simplifies the
analysis of a complex system.
• Such an analysis can be further simplified
by using a signal flow graphs (SFG) which
looks like a simplified block diagram
• An SFG is a diagram which represents a
set of simultaneous equation.
• It consist of a graph in which nodes are
connected by directed branches.
Thursday, February 22, ProfDrMFRCIED 115
2018
Signal flow graphs
• The nodes represent each of the system
variables.
• A branch connected between two nodes
acts as a one way signal multiplier: the
direction of signal flow is indicated by an
arrow placed on the branch, and the
multiplication factor(transmittance or
transfer function) is indicated by a letter
placed near the arrow.
Thursday, February 22, ProfDrMFRCIED 116
2018
Signal flow graphs
• A node performs two functions:
1. Addition of the signals on all incoming
branches
2. Transmission of the total node signal(the
sum of all incoming signals) to all outgoing
branches
x1 a x2 = ax1
v b d y
u
a x
c 1 x
w
v b Mixed Sink
node node
Thursday, February 22, ProfDrMFRCIED 121
2018
Signal flow graphs
• A path is any connected sequence of
branches whose arrows are in the same
direction
• A forward path between two nodes is one
which follows the arrows of successive
branches and in which a node appears
only once.
• The path uwx is a forward path between
the nodes u and x
a b ab
x y z x z
(a+b)
x y
x y
b
Thursday, February 22, ProfDrMFRCIED 126
2018
Signal flow graphs
simplification
Original graph Equivalent graph
w ac
a z w
c z
x y x bc
b
Thursday, February 22, ProfDrMFRCIED 127
2018
Block diagram of feedback
system
R E C
G
B
H
R 1 E G C R 1 E G C
-1
H
B -H
Thursday, February 22, ProfDrMFRCIED 130
2018
Successive reduction of SFG
third fourth
• Node E eliminated, self • Self loop eliminated
loop of value -GH
R G C R C
G/(1+GH)
-GH
Thursday, February 22, ProfDrMFRCIED 131
2018
SIGNAL FLOW GRAPHS OF
STATE EQUATIONS
• demonstrate how to draw signal flow
graphs from state equations.
• Consider the following state and output
equations:
x1 2 x1 5 x2 3x3 2r (1a)
x2 6 x1 2 x2 2 x3 5r (1b)
x 3 x1 3x2 4 x3 7r (1c)
y 4 x1 6x 2 9x 3 (1d)
Thursday, February 22, ProfDrMFRCIED 132
2018
SIGNAL FLOW GRAPHS OF
STATE EQUATIONS
• Step 1 : Identify three nodes to be the
three state variables, , and three nodes,
placed to the left of each respective
state variables. Also identify a node as
the input, r, and another node as the
output, y.
R(s) Y(s)
sX (s) X (s) sX (s) X (s) sX (s) X (s)
3 3 2 2 1 1
1 1 1
s s s
R(s) Y(s)
sX (s) X (s) sX (s) X (s) sX (s) X (s)
3 3 2 2 1 1
1 1 1
s s -5 s
R(s) Y(s)
X (s) X (s) sX (s) X (s)
sX (s) 3 sX (s) 2 1 1
3 2
3
Thursday, February 22, ProfDrMFRCIED 135
2018
SIGNAL FLOW GRAPHS OF
STATE EQUATIONS
• Step 4 : Using Eqn (1b), feed to each node
the indicated signals.
2
1 1 1
s 2 s -5 s
R(s) Y(s)
X (s) sX (s) X (s) sX (s) X (s)
sX (s) 3 2 2 1 1
3
-2 2
3 -6
Thursday, February 22, ProfDrMFRCIED 136
2018
SIGNAL FLOW GRAPHS OF
STATE EQUATIONS
• Step 5 : Using Eqn (1c), feed to each node
the indicated signals.
2
1 1 1
7 s 2 s -5 s
R(s) Y(s)
sX (s) X (s) sX (s) X (s) sX (s) X (s)
3 3 2 2 1 1
-4 -2 2
-3 3 -6
1
Thursday, February 22, ProfDrMFRCIED 137
2018
SIGNAL FLOW GRAPHS OF
STATE EQUATIONS
• Step 6 : Finally, use Eqn (1d) to complete
the signal flow2 graph. 9
5 6
1 1 1
7 s 2 s -5 s -4
R(s) Y(s)
sX (s) X (s) sX (s) X (s) sX (s) X (s)
3 3 2 2 1 1
-4 -2 2
-3 3 -6
1
Thursday, February 22, ProfDrMFRCIED 138
2018
Example 9
• Draw a signal-flow graph for each of the
following state equations :
0 1 0 x1 0
x(t ) 0 0
1 . x2 0 r (t )
2 4 6 x3 1
x1
y (t ) 1 1 0. x2
x3
Thursday, February 22, ProfDrMFRCIED 139
2018
Solution
• State and output equations
x1 (t ) x2 (t )
x2 (t ) x3 (t )
x3 (t ) 2 x1 (t ) 4 x2 (t ) 6 x3 (t ) r (t )
y (t ) x1 (t ) x2 (t )
Thursday, February 22, ProfDrMFRCIED 140
2018
Solution
• Signal flow graph 1
-4
-2
Thursday, February 22, ProfDrMFRCIED 141
2018
Example 10
• Draw a signal-flow graph for each of the
following state equations :
0 1 0 0
x(t ) 0
3 1 x(t ) 1 r (t )
3 4 5 1
y (t ) 1 2 0x(t )
Thursday, February 22, ProfDrMFRCIED 142
2018
Solution
• State and output equations
x1 (t ) x2 (t )
x2 (t ) 3 x2 (t ) x3 (t ) r (t )
x3 (t ) 3 x1 (t ) 4 x2 (t ) 5 x3 (t ) r (t )
y (t ) x1 (t ) 2 x2 (t )
Thursday, February 22, ProfDrMFRCIED 143
2018
Solution
• Signal flow graph
1 2
-5
-3
-4
-3
Thursday, February 22, ProfDrMFRCIED 144
2018
Example 11
• Draw a signal-flow graph for each of the
following state equations :
7 1 0 1
x(t ) 3
2 1 x(t ) 2 r (t )
1 0 2 1
y (t ) 1 3 2x (t )
Thursday, February 22, ProfDrMFRCIED 145
2018
Solution
• State and output equations
x1 (t ) 7 x1 (t ) x2 (t ) r (t )
x2 (t ) 3 x1 (t ) 2 x2 (t ) x1 (t ) 2r (t )
x3 (t ) x1 (t ) 2 x3 (t ) r (t )
y (t ) x1 (t ) 3 x2 (t ) 2 x3 (t )
Thursday, February 22, ProfDrMFRCIED 146
2018
Solution
• Signal flow graph
1
2
2 3
-3
-1
Thursday, February 22, ProfDrMFRCIED 147
2018