Lecture Notes
Lecture Notes
Fundamentals of Control Systems
Fundamentals of Control Systems
Instructor: Assoc. Prof. Dr. Huynh Thai Hoang
Department of Automatic Control
Faculty of Electrical & Electronics Engineering
Ho Chi Minh City University of Technology
Email: hthoang@hcmut.edu.vn
huynhthaihoang@yahoo.com
Homepage: www4.hcmut.edu.vn/~hthoang/
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
1
Chapter 2
Chapter 2
Mathematical Models of
Mathematical Models of
Mathematical Models of
Mathematical Models of
Continuous Control Systems
Continuous Control Systems
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
2
Content
Content
The concept of mathematical model
The concept of mathematical model
Transfer function
Block diagram algebra
Block diagram algebra
Signal flow diagram
State space equation
State space equation
Linearized models of nonlinear systems
Nonlinear state equation
Nonlinear state equation
Linearized equation of state
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
3
The concept of mathematical models
The concept of mathematical models
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
4
If you design a control system, what do you need to know
If you design a control system what do you need to know
Question
Question
What are the advantages of mathematical models?
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
5
about the plant or the process to be controlled?
Practical control systems are diverse and different in nature
Practical control systems are diverse and different in nature.
It is necessary to have a common method for analysis and
design of different type of control systems Mathematics
The relationship between input and output of a LTI system of
can be described by linear constant coefficient equations:
Why mathematical model?
Why mathematical model?
u(t) y(t)
n
1
d
a
a
n
tya
)(
n
0
a
1
1
)(
ty
n
1
)(
tdy
dt
dt
n
)(
tyd
n
dt
m
d
b
0
b
1
b
m
tub
)(
m
1
1
1
tu
)(
1
m
m
tud
)(
m
dt
dt
tdu
)(
dt
Linear Time-
Invariant System
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
6
n: system order, for proper systems: nm.
n: system order for proper systems: nm
ai, bi: parameter of the system
Example: Car dynamics
Example: Car dynamics
M
M
tBv
)(
)(
tBv
f
f
t
)(
)(
t
tdv
)(
dt
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
7
M: mass of the car, B friction coefficient: system parameters
M: mass of the car B friction coefficient: system parameters
f(t): engine driving force: input
v(t): car speed: output
v(t): car speed: output
Example: Car suspension
Example: Car suspension
M
B
tKy
)(
f
t
)(
tdy
)(
dt
2
tyd
)(
2
dt
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
8
M: equivalent mass
B friction constant, K spring stiffness
f(t): external force: input
y(t): travel of the car body: output
(t) t
t
b d f th t l
Example: Elevator
Example: Elevator
t b l
g
MB
MB
Counter-
balance
ML
Cabin &
load
M
B
)(
gMtKgM
L
T
B
2
tyd
)(
2
dt
dt
tdy
)(
dt
dt
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
9
ML: mass of cabin and load,
MB: counterbalance
M
B friction constant,
K gear box constant
(t): driving moment of the motor
y(t): position of the cabin
Disadvantages of differential equation model
Disadvantages of differential equation model
Difficult to solve differential equation order n (n>2)
Difficult to solve differential equation order n (n>2)
n
1
d
a
a
0
a
1
n
tya
)(
n
1
ty
)(
n
1
n
tyd
)(
n
dt
dt
dt
dt
tdy
)(
dt
dt
m
d
b
1
b
0
b
m
tub
)(
m
1
1
tu
)(
1
m
m
tud
)(
m
dt
dt
tdu
)(
dt
System analysis based on differential equation model is
System design based on differential equations is almost
difficult.
It is necessary to have another mathematical model that makes
It is necessary to have another mathematical model that makes
impossible in general cases.
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
10
the analysis and design of control systems easier:
transfer function
state space equation
Transfer functions
T
Transfer functions
f
f
T
ti
ti
f
f
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
11
Definition of Laplace transform
Definition of Laplace transform
st
f
sF
)(
f
et
(
).
dt
t
)(
The Laplace transform of a function f(t), defined for all real
The Laplace transform of a function f(t) defined for all real
numbers t ≥ 0, is the function F(s), defined by:
L
0
0
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
12
where:
s : complex variable (Laplace variable)
L : Laplace operator
F(s) Laplace transform of f(t).
The Laplace transform exists if the integral of ƒ(t) in the
interval [0,+) is convergence.
interval [0 +) is convergence
Properties of Laplace transform
Properties of Laplace transform
sG
sG
)(
)(
tg
)(
)(
tg
Given the functions f(t) and g(t), and their respective Laplace
Given the functions f(t) and g(t) and their respective Laplace
transforms F(s) and G(s):
L
L
f
f
sF
sF
)(
)(
t
)(
)(
t
L
L
Linearity
t
)(
sFa
)(
.
sGb
.
)(
fa
.
tgb
)(.
L
Time shifting
f
.
sF
)(
Tt
(
Ts
e
)
L
Differentiation
sF
s
)(
f
)0(
L
tdf
)(
)(
dt
t
t
Integration
f
L
)(
sF
sF
)(
s
0
f
f
t
)(
)(
t
sF
sF
s
)(
)(
s
Final value theorem
Final value theorem
df
lim
lim
t
)(
d
lim
lim
s
0
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
13
Unit step function:
Laplace transform of basic functions
Laplace transform of basic functions
tf
tf
u(t)
tu
)(
)(
tu
1
L
1
1
s
tf
0
0
0
1
1
i
i
0
i
Dirac function:
t
t 0
0
t
)(
tf
tf
tf
0
0
0
0
i
i
i
(t)
1
tL
)(
)( dt
)( dt
t
t
1
1
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
14
t
t 0
0
Laplace transform of basic functions (cont’)
Laplace transform of basic functions (cont’)
Ramp function:
f
)(
tr
tu
)(
t
tf
tf
0
0
t
i
0
i
R ti
r(t)r(t)
)(.
tut
1
L
1
2
s
0
0
at
Exponential function
f
t
)(
tu
)(.
e
0
f t
f
t
f
t i
ate
e
i
i
0
t 1 0
f(t)
e at
)(.
tu
1
L
1
as
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
15
t
t 0
0
Sinusoidal function
id l f
Laplace transform of basic functions (cont’)
Laplace transform of basic functions (cont’)
Si ti
tf
tf
f
t
)(
(sin
tut
).
)(
t
t
0
0
0
0
i
i
tf
i
sin
sin
f( )
f(t)
(sin
)()
tut
t
t 0
0
L
2
s
2
Table of Laplace transform: Appendix A, Feedback control
p
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
16
pp
of dynamic systems, Franklin et. al.
Definition of transfer function
Definition of transfer function
Consider a system described by the differential equation:
Consider a system described by the differential equation:
u(t) y(t)
n
1
d
a
a
a
a
0
0
a
a
1
1
n
tya
)(
)(
tya
n
1
1
ty
)(
1
1
n
n
tyd
)(
n
dt
dt
tdy
)(
dt
m
d
b
0
0
)(
)(
tub
m
m
b
m
m
b
1
1
1
1
1
tu
)(
1
m
m
1
dt
d
m
tud
)(
m
m
dt
d
Taking the Laplace transform the two sides of
Linear time
invariant system
invariant system
tdu
)(
dt
d
the above
equation, using differentiation property and assuming that the
g
p p
initial condition are zeros, we have:
n
sYsa
)(
a
sY
s
)(
0
n
1
sYsa
)(
1
s
)(
n
1
m
sUsb
)(
0
sYa
)(
n
1
m
sUsb
)(
1
sUb
)(
m
sUb
1
m
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
17
q g y ,
Definition of transfer function (cont’)
Definition of transfer function (cont’)
Transfer function:
Transfer function:
m
m
1
)(
sG
)(
n
n
n
n
1
1
sY
)(
)(
sU
U
)(
sb
0
sa
0
sb
1
sa
1
n
n
bs
b
m
m
1
asa
1
Definition: Transfer
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
18
y
function of a system is the ratio
between the Laplace transform of the output signal and the
Laplace transform of the input signal assuming that initial
conditions are zeros.
conditions are zeros
Transfer function of components
Transfer function of components
Step 1: Establish the differential equation describing the
Procedure to find the transfer function of a component
Procedure to find the transfer function of a component
p p
y
input-output relationship of the components by:
p
p
Applying Kirchhoff's law, current-voltage relationship of
Applying Newton's law, the relationship between friction
resistors, capacitors, inductors,... for the electrical
components.
components
h i th ti f f t l i l
and velocity, the relationship between force and
deformation of springs ... for the mechanical elements.
d f
Apply heat transfer law, law of conservation of energy, for
...
Step 2: Taking the Laplace transform of the two sides of the
differential equation established in step 1, we find the transfer
differential equation established in step 1 we find the transfer
function of the component.
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
19
the thermal process. p
Transfer function of some type of controllers
Transfer function of some type of controllers
R
First order integrator:
Passive compensators
Passive compensators
C
C
sG
)(sG
)(
1
RCs
1
C
First order differentiator:
R
sG
)(
)(
RCs
RC
1
1
RCs
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
20
g
Transfer function of some type of controllers (cont’)
Transfer function of some type of controllers (cont’)
C
Phase lead compensator:
R1
R
sG
)(
K
C
R2
Ts
1
1Ts
Ts
1
R
R
1
R
R
2
1
T
KC
R
R
2
R
1
R
2
R
2
CRR
12
R
R
1
2
R2
Phase lag compensator :
R1
)(
)(
sG
K
C
C
Ts
1
Ts
1
C
1
T
(
R
1
)
CR
2
1CK
R
1R
1
RR
2
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
21
ass e co pe sato s
Passive compensators
Transfer function of some type of controllers (cont’)
Transfer function of some type of controllers (cont’)
Proportional Controller (P)
sG )(
G )(
K P
K P
PK
K
2R
1R
Active controllers
Active controllers
I
sG
K
)(
P
P
K
s
K I
I
K P
P
1
CR
CR
1
2R
1R
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
22
)
Proportional Integral controller (PI)
g p (
Transfer function of some type of controllers (cont’)
Transfer function of some type of controllers (cont’)
Proportional Derivative controller (PD)
sG
K
)(
P
sK
D
CR
CR
K D
K
2
K P
K
2R
2
R
1
Active controllers
Active controllers
I
sG
K
)(
P
sK
D
Proportional Integral Derivative controller (PID)
)
K
s
s
11
2
2
K I
K P
1
CR
1
2
CRCR
CR
21
K D
2CR
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
23
g p (
Transfer function of DC motors
Transfer function of DC motors
ia
Ra
La
Ua
Ea
a
ML ,B, J
ML B J
Equivalent diagram of a DC motor
Equivalent diagram of a DC motor
: motor speed
ML : load inertia
ti
B : friction constant
La : armature induction
Ra : armature resistance
t
Ua : armature voltage
Ea : back electromotive force J : moment of inertia of the
a
rotor
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
24
R M l d i i t
Applying Kirchhoff's law for the armature circuit:
Transfer function of DC motors
Transfer function of DC motors
ff f
(
tU
)(
a
i
a
Rt
).
a
L
a
tE
)(
a
di
t
)(
a
dt
dt
(1)
(2) where: t
)( K
tE
)(
a
Applying Newton’s law for the rotating part of the motor:
)(
)(
t
K : electromotive force constant
K : electromotive force constant
: excitation magnetic flux
)(
)(
J
J
tMtM
)(
tMtM
)(
)(
)(
tB
tB
L
d
dt
(3)
(3)
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
25
(4) where: tM
)( t
)( iK
a
Transfer function of DC motors
Transfer function of DC motors
Taking the Laplace transform of (1), (2), (3), (4) leads to:
f (1) (2) (3) (4) l d t th L l T ki t f
a
a
(5) I ( s
)( sU
)(
a Rs
).
a sIL
a sE
)(
a
(6) s
)( K
sE
)(
a
t
(7) )( Js s
)( sMsM
)(
)(
sB
Denote:
(8) sM
)( s
)( iK
a
T
a
a
L
a
R
a
Electromagnetic time constant
Electromagnetic time constant
Tc
J
B
B
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
26
Mechanical time constant
Transfer function of DC motors
Transfer function of DC motors
From (5) and (7), we have:
From (5) and (7) we have:
I
s
)(
a
sU
)(
a
1(
R
R
1(
a
sE
)(
a
sT
sT
)
)
a
s
)(
)(
B
B
1(
1(
sMsM
)(
L
sT
sT
)
)
c
From (5’), (6), (7’) and (8) we can develop the block diagram
(5’)
)(sM L
)(sU a
)(a
/1
R/1
R
a
1
asT
)(sEa
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
27
of the DC motor as follow:
of the DC motor as follow:
Transfer function of a thermal process
Transfer function of a thermal process
Temperature of
the oven
th
Electric power supplying
to the oven 100%
100%
t
th
y(t) u(t)
y(t)
(t) y(t)
(t)
Inflection
point
“Exact” characteristic of the oven
Approximate characteristic of the oven
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
28
Transfer function of a thermal process (cont’)
Transfer function of a thermal process (cont’)
sG
)(
The approximate transfer function of the thermal
The approximate transfer function of the thermal
process can be calculated by using the equation:
sY
)(sY
)(
sU
)(
The input is the unit step signal, then
sU
)(
1
1
s
y
ty
)(
)(
f
f
(
(
)
)
ate output s
The approximate output is:
e app o
where:
f
t
)(
K
1(
The Laplace transform of f (t) is:
The Laplace transform of
f (t) is:
sF
F
)(
)(
1(
s
)
Applying the time delay theorem:
Applying the time delay theorem:
sY
sY
)(
)(
s
)
1Tt
1
2/ Tte
)
K
2sT
sT
1Ke
1(
2sT
sG
)(
)(
G
)(
sY
)(
sU
)(
sT
1Ke
sT
1
2
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
29
Transfer function of a car
Transfer function of a car
M
tBv
)(
f
t
)(
Differential equation:
tdv
)(
dt
dt
Transfer function
)(
sG
sG
)(
)(
sV
)(
)(
sF
F
1
BM
BMs
K
1Ts
T
1
M: car mass
B: friction constant
f(t): driving force
v(t): car speed
K
K
T
T
1
B
M
B
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
30
where
Transfer function of an suspension system
Transfer function of an suspension system
q
Differential equation:
tKy
)(
f
t
)(
M
B
)(
tdy
dt
dt
2
)(
tyd
2
dt
dt
Transfer function:
Transfer function:
)(
sG
sG
)(
2
)(
sY
)(
sF
1
Bs
Ms
K
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
31
M: equivalent car mass
B: friction constant
K: spring stiffness
f(t): external force
f(t): external force
y(t): travel of car body
Transfer functions of sensors
Transfer functions of sensors
y(t)
y(t) yfb(t)
yfb(t)
y( )
g
Feedback signal yfb(t) is proportional to y(t), so transfer functions of
yfb( )
p p
sensors are usually constant:
sH
)(
fbK
Ex: Suppose that temperature of a furnace changing in the range
y(t) = 05000C, if a sensor converts the temperature to a voltage in
the range yfb(t) 05V, then the transfer function of the sensor is:
the range y (t) 05V then the transfer function of the sensor is:
0
sH
)(
K
(5
V
/)
(500
C
)
(01.0
0
CV
/
)
fb
If the sensor has a delay time, then the transfer function of the
sensor is:
)(
sH
)(
sH
1
K
fb
sT
fb
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
32
Sensor
Transfer functions
Transfer functions
of control systems
of control systems
6 December 2013
33
Block diagram
Block diagram
Block diagram is a diagram of a system in which the principal
Block diagram is a diagram of a system, in which the principal
parts or functions are represented by blocks connected by
lines, that show the relationships of the blocks.
A block diagram composes of 3 components:
Function block
Summing point
Summing point
Pickoff point
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
34
Summing point Function block Pickoff point
Block diagram algebra
Block diagram algebra
Un (s)
Yn (s)
( )
U(s)
( )
Y(s)
1 ( )
U1 (s)
1 ( )
Y1 (s)
G1
G
G2
G
Gn
G
U2(s)
Y2 (s)
Transfer function of systems in series
Transfer function of systems in series
Y (s)
U(s)
n
)(
sG
s
)(
sG
i
i 1
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
35
Gs
Block diagram algebra (cont’)
Block diagram algebra (cont’)
U1 (s)
U (s)
Y1 (s)
Y (s)
G1
Y(s)
Y(s)
U(s)
U(s)
Y2 (s)
Y2 (s)
U2(s)
U (s)
G2
Transfer function of systems in parallel
Transfer function of systems in parallel
Y (s)
U(s)
Yn (s)
Un (s)
Gn
n
)(
sG
)(
p
p
)(
sG
)(
i
i
1
i
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
36
Gp
Block diagram algebra (cont’)
Block diagram algebra (cont’)
Negative feedback
Unity negative feedback
Y(s)
Y(s)
R(s)
R(s)
E(s)
E(s)
G(s)
G(s)
+
+
Yfb(s)
Yfb(s)
H(s)
sGcl
sG
)(
)(
sGcl
)(
)(
sG
1
)(
sG
sG
)(
sG
)(
sHsG
(
).
)(
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
37
Transfer function of feedback systems
Transfer function of feedback systems
Block diagram algebra (cont’)
Block diagram algebra (cont’)
Positive feedback
Unity positive feedback
Y(s)
Y(s)
R(s)
R(s)
E(s)
E(s)
G(s)
G(s)
+
+
+
+
Yfb(s)
Y (s)
Yfb(s)
Y (s)
H(s)
sGcl
)(
sGcl
)(
1
1
sG
)(
sG
)(
)(
sG
1
1
sG
)(
sHsG
)(
(
).
)(
)(
sHsG
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
38
Transfer function of feedback systems
Transfer function of feedback systems
Block diagram algebra (cont’)
Block diagram algebra (cont’)
For a complex system consisting of multi feedback loops, we
Transfer function of multi-loop systems
Transfer function of multi loop systems
i l f t bl th t k di ti t f l
perform equivalent block diagram transformation so that simple
i
connecting blocks appears, and then we simplify the block
diagram from the inner loops to the outer loops.
diagram from the inner loops to the outer loops
g p p
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
39
q
Two block diagrams are equivalent if their input-output
relationship are the same.
Block diagram algebra (cont’)
Block diagram algebra (cont’)
Moving a pickoff point behind a block
x1 x3 x3 x1
G(s) G(s)
x
x
x
3
x
x
2
3
1
Gx
G
1
2
Gx
1
xGx
/ G
/
3
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
40
x2 x2 1/G(s)
Block diagram algebra (cont’)
Block diagram algebra (cont’)
Moving a pickoff point ahead a block ff
x3 x1 x1 x3
G(s) G(s)
x
x
2
2
x
3
3
Gx
1
1
x
2
3
Gx
1
Gx
G
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
41
x2 x2 G(s)
Block diagram algebra (cont’)
Block diagram algebra (cont’)
Moving a summing point behide a block
x3 x1 x1 x3
+
+
G(s) G(s)
x
(
x
x
(
x
3
GxGx
1
2
)
Gx
2
1
3
)
Gx
2
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
42
x2 x2 G(s)
Block diagram algebra (cont’)
Block diagram algebra (cont’)
Moving a summing point ahead a block
x3 x1 x1 x3
+
+
G(s) G(s)
x
(
x
)
/
xGxGGx
x
3
1
2
1
2
3
xGx
1
2
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
43
x2 x2 1/G(s)
Block diagram algebra (cont’)
Block diagram algebra (cont’)
= - +
= + -
x
x
(
)
x
x
)
(
x
4
1
2
x
3
x
4
1
3
x
2
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
44
Interchanging the positions of the
two consecutive summing points
Block diagram algebra (cont’)
Block diagram algebra (cont’)
= - +
=
+
x
x
x
x
x
x
x
x
(
(
)
)
x
x
4
= - +
=
+
1
2
x
x
3
x
x
4
1
2
x
x
3
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
45
Splitting a summing point
Block diagram algebra (cont’)
Block diagram algebra (cont’)
Do not
NoteNote
Do
Do
interchange the positions of a pickoff point and a
g p summing point :
not
not interchange
interchange
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
46
the
the
positions of two summing points
there exists a pickoff point
if
between them:
b t th
Example 1
Block diagram algebra –– Example 1
Block diagram algebra
Find the equivalent transfer function of the following system:
Y(s)
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
47
Example 1 (cont’)
Block diagram algebra –– Example 1 (cont’)
Block diagram algebra
Interchanging the summing points and ,
Y(s)
)(
)(
sGsGsGA
)(
3
4
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
48
Eliminating GA(s)=[G3(s)//G4(s)]
Example 1 (cont’)
Block diagram algebra –– Example 1 (cont’)
Block diagram algebra
GB(s)=[G1(s) // unity block] ,
G (s)=[G (s) // unity block]
Y(s)
Y( )
1)(
1)(
sGB
sG
1 sG
sG
)(
)(
sGC
)(
sG
)(
2
sGsG
sGsG
(
)(
).
)(
)(
).[
) [
(
(
)]
)]
1
1
1
1
A
2
sG
)(
2
sGsGsG
sGsGsG
)(
)(
(
(
3
2
4
Equivalent transfer function of the system:
)(
).
(
sGsGsG
)(
B
eq
C
(
sGeq
)(
sG
)(
(
)]
1
sGsG
1[
)].
)(
1
2
sGsGsG
).[
)(
(
3
4
2
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
49
GC (s)= feedback loop[G2(s),GA(s)]:
Example 2
Block diagram algebra –– Example 2
Block diagram algebra
Find the equivalent transfer function of the following system:
Y(s)
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
50
Example 2 (cont’)
Block diagram algebra –– Example 2 (cont’)
Block diagram algebra
Interchanging the positions of the summing points and
Y(s)
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
51
Moving the pickoff point behind the block G2(s)
Example 2 (cont’)
Block diagram algebra –– Example 2 (cont’)
Block diagram algebra
GB(s) = feedback loop [G2(s), H2(s)]
[GA(s)// unity block]
GC(s)
GC(s) = [GA(s)// unity block]
Y(s)Y(s)
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
52
Example 2 (cont’)
Block diagram algebra –– Example 2 (cont’)
Block diagram algebra
GD(s) = cascade(GB (s), GC(s), G3(s))
G ( )
d (G ( ) G ( ) G ( ))
Y(s)
GE(s) = feedback loop(GD(s), H3(s))
Y(s)Y(s)
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
53
Example 2 (cont’)
Block diagram algebra –– Example 2 (cont’)
Block diagram algebra
Detailed calculation:
Detailed calculation:
1
*
GA
GA
H
G
2
*
G
GB
1
G
2
HG
2
2
1
2
1
*
G
1
1
G
C
A
H
H
G
2
HG
HG
G
2
1
2
1
*
.
G
D
C
B
.
GGG
3
1
2
1
3
HGGG
3
HG
2
2
G
2
HG
2
2
HG
G
2
G
3
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
54
Example 2 (cont’)
algebra –– Example 2 (cont’) Block diagram
Block
diagram algebra
1
2
1
3
3
3
G
*
E
1
1
1
G
D
HG
D
D
3
3
HGGG
1
2
HHGHGGHG
3
3
2
2
3
3
3
3
1
1
2
2
2
2
3
3
1
1
H
H
3
2
1
3
HGGG
HGGG
3
HG
2
2
HGGG
3
HG
2
2
Equivalent transfer function of the system:
f
3
3
.
G
G
1
1
2
2
3
2
3
3
1
G
*
eq
3
3
1
E
GG
E
1
GG
1
1
.
G
1
1
1
HGGG
1
2
HHGHGGHG
3
HGGG
1
2
HHGHGGHG
HHGHGGHG
3
2
2
2
3
3
1
3
1
3
1
1
Geq
eq
1
1
2
HGGGGG
3
HGGGGGHHGHGGHG
HGGGGGHHGHGGHG
1
3
2
2
3
2
2
3
3
1
3
1
3
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
55
E i f th t t ti t f l
Example 3
Block diagram algebra –– Example 3
Block diagram algebra
Find the equivalent transfer function of the following system:
Y(s)
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
56
Example 3 (cont’)
Block diagram algebra –– Example 3 (cont’)
Block diagram algebra
Move the summing point ahead the block G1(s),
Hint to solve example 3
Hint to solve example 3
Hint to solve example 3
Hint to solve example 3
Y(s)Y(s)
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
57
then interchange the position of the summing points and
then interchange the position of the summing points and
Move the pickoff point behind the block G2(s)
Example 3 (cont’)
Block diagram algebra –– Example 3 (cont’)
Block diagram algebra
Students calculate the equivalent transfer function themselves
Solution to Example 3
Solution to Example 3
Solution to Example 3
Solution to Example 3
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
58
using the hints in the previous slide.
using the hints in the previous slide
Remarks on block diagram algebra
Remarks on block diagram algebra
Block diagram algebra is a relatively simple method to
Block diagram algebra is a relatively simple method to
calculate the equivalent transfer function of a control system.
The main disadvantage of block diagram algebra is its lack of
systematic
diagram
transformation; each particular block diagram can be
transformed by different heuristic ways.
transformed by different heuristic ways.
When calculating the equivalent
perform the procedure block to
function, transfer it
is
necessary to manipulate many calculations on algebraic
the
fractions. This could be a potential source of error if
the
fractions This could be a potential source of error if
system is complex enough.
Block diagram algebra is only appropriate for
finding
transfer
function of complex systems,
flow graph method (to be discussed later) is more
flow graph method (to be discussed later) is more
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
59
equivalent transfer function of simple systems.
To find equivalent
signal
signal
effective.
Definition of signal flow graph
Definition of signal flow graph
Y(s)
Y(s)
Y(s)
Y(s)
Block diagram
Signal flow graph
l di
th
h
d
ti
f
t
i
i
Source node: a node from which there are only out-going
hi h th
d
d
t
f
l
i
Signal flow graph: a networks consisting of nodes and branches
Signal flow graph: a networks consisting of nodes and branches.
Node: a point representing a signal or a variable in the system.
Branch: a line directly connecting two nodes, each branch has an
function
arrow showing the signal direction and a transfer
ti
f
representing the relationship between the signal at the two nodes of
the branch
S
branches.
Sink node: a node to which there are only in-going branches.
Hybrid node: a node which both has in-going branches and out-
going branches.
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
60
Definition of signal flow graph (cont’)
Definition of signal flow graph (cont’)
p
p
q
g
Forward path: is a path consisting of continuous sequence of
branches that goes in the same direction from a source node to a
sink node without passing any single node more than once.
Path gain is the product of all transfer functions of the branches
Path gain is the product of all transfer functions of the branches
belonged to the path.
Loop: is a closed path consisting of continuous sequence of
branches that goes in the same direction without passing any single
branches that goes in the same direction without passing any single
node more than once.
Loop gain is the product of all transfer functions of the branches
belonged to the loop.
belonged to the loop
Y(s)
Y(s)
Y(s)
Forward path
Loop
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
61
Mason’s formula
Mason’s formula
G
kk P
1
1
k
The equivalent transfer function from a source
The equivalent transfer function from a source
node to a sink node of a system can be found
by using the Mason’s formula:
Pk: is the gain of kth forward path from the considered source node
to the considered sink node.
1
LL
i
L
i
j
LLL
mj
i
: is the determinant of the signal flow graph.
: is the determinant of the signal flow graph
i
,
ji
nontouchin
nontouchin
g
g
,
,
mji
nontouchin
nontouchin
g
g
iL : is the gain of the ith loop
k: is the cofactor of the kth path .
k is inferred from by removing all the gain(s) of the loop(s)
touching the forward path Pk
Note: Nontouching loops do not have any common nodes. A loop and
Note: Nontouching loops do not have any common nodes A loop and
a path touch together if they have at least one common node.
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
62
Find the equivalent transfer function of the system described
Find the equivalent transfer function of the system described
Example 1
Signal flow graph –– Example 1
Signal flow graph
R(s)
Y(s)
Solution
Solution
1
1
3
2
2
6
6
2
Forward paths:
GGGGGP
GGGGGP
1
2
5
1
4
GGGGP
2
1
5
4
GGGP
GGGP
3
3
1
1
7
7
2
2
Loop:
L
L
1
1
L
2
L
3
L
4
HG
HG
4
4
HGG
7
HGGG
4
5
HGGGG
4
5
2
3
2
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
63
by the following signal flow graph:
Example 1 (cont’)
Signal flow graph –– Example 1 (cont’)
Signal flow graph
)
The determinant of the SFG:
The determinant of the SFG:
L
(1
4
L
2
L
3
L
1
LL
21
The cofactors of the paths
11
12
3 1 L
1
The equivalent transfer function of the system:
(
(
)
)
Geq
G
P
P
1
2
P
P
2
P
P
3
1
3
1
1(
)
1
2
1
4
2
6
1
3
4
Geq
G
1
GGGGGGGGGGGG
1
7
HG
4
5
5
HGGHGHGGGGHGGGHGGHG
2
1
6
2
4
5
7
2
3
5
2
4
2
1
4
7
4
2
2
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
64
Example 2
Signal flow graph –– Example 2
Signal flow graph
Find the equivalent transfer function of the system described
Find the equivalent transfer function of the system described
R(s)
Y(s)
Solution:
R(s)
Y(s)
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
65
by the following block diagram:
Example 2 (cont’)
Signal flow graph –– Example 2 (cont’)
Signal flow graph
R(s)
Y(s)
Forward paths:
2
3
GGGP
1
1
3
GHGP
2
1
3
1
1
3
3
1
1
3
3
Loop
L
1
L
L
2
L
3
L
L
4
4
L
5
HG
2
2
HGG
HGG
3
2
GGG
3
2
HHG
HHG
HGG
3
1
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
66
Example 2 (cont’)
Signal flow graph –– Example 2 (cont’)
Signal flow graph
The determinant of the SFG:
f th SFG
(1
)
L
1
L
2
L
3
L
4
L
5
The cofactors of the paths
11 1
12
The equivalent transfer function of the system:
f
Th d t t i
(
)
P
1
P
2
1
2
f th Th t t t l i f
1
1
3
1
Geq
1
1
2
3
HGGGGG
HGGHHGGGGHGGHG
HGGHHGGGGHGGHG
2
1
2
3
2
3
3
3
3
2
1
3
1
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
67
ti
1
Geq
Example 3
Signal flow graph –– Example 3
Signal flow graph
Find the equivalent transfer function of the system described
q y
Y(s)
Solution:
Y(s)
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
68
by the following block diagram:
Example 3 (cont’)
Signal flow graph –– Example 3 (cont’)
Signal flow graph
Y(s)
Forward path
2
1
GGGP
1
1
3
2 GP
4
1
3
3
Loop
L
1
L
L
2
L
3
L
L
4
4
L
5
HG
1
2
HGG
HGG
2
1
GGG
3
2
HGG
HGG
3
3
2
2
G
4
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
69
Example 3 (cont’)
Signal flow graph –– Example 3 (cont’)
Signal flow graph
Determinant of the SFG:
Determinant of the SFG:
(1
)
(
)
L
1
L
2
L
3
L
4
L
5
LL
41
LL
51
LL
52
LL
54
LLL
541
The cofactor:
(1
)
(
)
11
2
L
1
L
2
L
4
LL
41
The equivalent transer function of the system:
The equivalent transer function of the system:
G
(
)
P
1
P
2
1
2
1
Num
Den
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
70
State space equations
State space equations
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
71
State of a system
State of a system
State: The state of a system is a set of variables whose
State: The state of a system is a set of variables whose
values, together with the equations described the system
dynamics, will provide future state and output of the system.
A nth order system has n state variables. The state variables
can be physical variables, but not necessary.
State vector: n state variables form a column vector called
T
nx
x
1x
2
x
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
72
the state vector.
State equations
State equations
By using state variables, we can transform the n-order
o de
differential equation describing the system dynamics into a
set of n first order differential equations (called state
equations) of the form:
equations) of the form:
tu
)(
a ab es, y us g s a e a s o e ca e
Ax B
t
)(
)(
t
x
t
)(
ty
)( Cx
n
c
where
where
A
B
c
1C
2
nc
a
11
a
a
21
21
a
12
a
a
22
22
a
1
n
a
a
2
2
a
a
1
n
n
2
a
nn
b
1
b
b
2
2
nb
Note: Depending on how we chose the state variables, a
y
system can be described by many different state equations.
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
73
q y y
Example 1
State equations –– Example 1
State equations
B
M
y
tKy
)(
)(
f
f
)(
)(
t
)(
tdy
dt
Differential equation:
2
tyd
)(
2
2
dt
tx
)(
1
f
t
)(
tx
)(
2
tx
)(
1
tx
)(
2
Denote:
ty
y
)(1
)(
)(
)(
tx
1
tx
ty
)(
)(
2
1
1
M
f
t
)(
tx
)(
2
K
K
M
)(
tx
)(
1
1
tx
)(
2
)(
)(
tx
1
1
)(
tx
2
B
B
M
.
1
B
B
M
0
1
1
M
ty
)(
01
0
K
K
M
tx
)(1 tx
)(
1
)(
tx
2
)(
)(
t
)(
)(
t
)(
)(
t
A suspension system
A suspension system
A suspension system
A suspension system
Ax
f
f
B
01C
B
B
A
A
x
ty
)(
t
)(
Cx
0
1
M
0
K
M
1
B
M
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
74
Example 2
State equations –– Example 2
State equations
: motor speed
Mt : load inertia
M : load inertia
B : friction constant
J : moment of inertia of the rotor
La : armature induction
Ra : armature resistance
R : armature resistance
Ua : armature voltage
Ea : back electromotive force
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
75
DC motor
DC motor
Example 2 (cont’)
State equations –– Example 2 (cont’)
State equations
Applying Kirchhoff s law for the armature circuit:
Applying Kirchhoff's law for the armature circuit:
(
)(
tU
a
i
a
).
Rt
a
L
a
tE
)(
a
)(
di
t
a
dt
dt
(1)
t
)(
K
tE
)(
a
(2) where:
Applying Newton s law for the rotating part of the motor:
Applying Newton’s law for the rotating part of the motor:
K : electromotive force constant
: excitation magnetic flux
(for simplicity, assuming that load torque is zero)
)(
tM
J
)(
tB
d
)(
t
d
t
)(
dt
(3)
(3)
tM
)(
)(
tM
t
)(
)(
t
iK
iK
a
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
76
(4)
(4) where:
h
t
)(
Example 2 (cont’)
State equations –– Example 2 (cont’)
State equations
(1) & (2)
t
)(
t
)(
i
ö
tU
)(
ö
di
ö
dt
R
ö
L
ö
K
L
ö
1
L
ö
t
)(
(5)
t
)(
t
)(
(3) & (4)
i
ö
d
dt
K
J
B
J
t
)(
Denote:
t
)(
)(
t
i
ö
tx
)(1
tx
)(
)(2
tx
tx
tx
)(
)(
1
tx
tx
)(
)(
1
tx
)(
)(
tx
2
tU
)(
)(
tU
ö
1
L
ö
(5) & (6)
)(
)(
tx
2
2
)(
)(
tx
1
1
)(
)(
tx
2
2
R
ö
ö
L
ö
K
J
K
L
ö
B
J
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
77
(6)
ö
)(
tx
1
)(
tx
2
tx
)(
1
)(
tx
2
1
tUL
)(
tUL
)(
ö
0
R
ö
L
ö
ö
K
J
K
L
ö
ö
B
J
t
)(
tx
)(
)(
1
tx
)(
2
10
Example 2 (cont’)
State equations –– Example 2 (cont’)
State equations
x
Ax
B
tU
)(
u
t
)(
)(
t
t
)(
)(
t
Cx
where:
A
10C
B
1
öL
0
0
R
ö
L
ö
K
J
K
L
ö
B
J
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
78
Establishing state equations from differential equations
Establishing state equations from differential equations
Case #1: The differential equation
Case #1: The differential equation
Case #1: The differential equation
Case #1: The differential equation
does not involve the input derivatives
does not involve the input derivatives
The differential equation describing the system dynamics is:
n
1
d
a
a
0
a
1
n
)(
tya
n
)(
tub
0
1
)(
ty
1
n
n
)(
tyd
n
dt
dt
)(
tdy
dt
Define the state variables as follow:
The first state is the system output:
The first state is the system output:
The i th state (i=2..n) is chosen to be
the first derivative of the (i1)th state :
tx
tx
)(
)(1
1
tx
)(
2
)(
)(
tx
3
3
ty
)(
)(
ty
tx
)(
1
)(
)(
tx
2
2
t
)(
tx
)(
n
n
1
x
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
79
q g y y
Establishing state equations from differential equations
Establishing state equations from differential equations
Case #1 (cont )
Case #1 (cont’)
Case #1 (cont )
Case #1 (cont’)
t
)(
tu
)(
t
)(
Ax
B
State equation:
x
ty
)(
)(
ty
t
)(
)(
t
Cx
Cx
0
0
1
1
0
0
0
0
0
0
1
0
where:
A
A
)(
tx
1
)(
tx
2
)(
)(
t
x
B
B
2
1
)(
x
t
n
1
)(txn
)(
tx
0
a
n
a
0
0
a
n
a
0
1
a
1
a
0
0
0
0
0
b
0
0a
C
01
0
a
n
a
0
00
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
80
Establishing state equations from differential equations
Establishing state equations from differential equations
Case #1: Example
Case #1: Example
Case #1: Example
Case #1: Example
Write the state equations describing the following system:
)(6)(5)(2
ty
ty
ty
10
ty
)(
tu
)(
Define the state variables as:
ty
)(
tx
)(
1
tx
)(
2
tr
)(
B
State equation:
tx
)(
1
tx
)(
2
tx
)(
3
x
t
)(
ty
)(
)(
t
)(
t
)(
)(
Ax
Cx
C
0
0
where
B
B
0
0
0
1
0
0
1
0
5.0
0
0
1
A
0
0
b
0
a
0
3
3
2
2
5
5
3
3
5.2
52
0
a
a
0
a
a
1
a
1
1
a
0
0
0
001C
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
81
Establishing state equations from differential equations
Establishing state equations from differential equations
Case #2: The differential equation involve the input derivatives
Case #2: The differential equation involve the input derivatives
Case #2: The differential equation involve the input derivatives
Case #2: The differential equation involve the input derivatives
Consider a system described by the differential equation:
n
1
d
d
a
a
n
)(
)(
tya
n
0
a
1
1
)(
)(
ty
ty
1
n
n
)(
)(
tyd
tyd
n
dt
dt
n
n
d
d
b
b
n
b
b
0
0
b
b
1
1
2
2
)(1
)(
tub
tub
1
n
1
)(
tu
1
n
)(
)(
tdy
tdy
dt
2
)(
tu
1
n
dt
dt
)(
tdu
dt
Define the state variables as follow:
tu
)(
tx
)(
1
tx
)(
2
2
tx
)(
3
ty
)(
tx
)(
1
1
tx
)(
2
tu
)(
1
1
2
The first state is the system output:
The i th state (i=2 n) is equal to the
state (i 2..n) is equal to the
The i
first derivative of the (i1)th state
minus a quantity proportional to
the input:
th i
t
x
t
)(
tx
)(
n
n
n
tu
)(
1
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
82
Establishing state equations from differential equations
Establishing state equations from differential equations
Case #2 (cont )
Case #2 (cont’)
Case #2 (cont )
Case #2 (cont’)
t
)(
tu
)(
t
)(
Ax
B
State equation:
x
ty
)(
)(
ty
t
)(
)(
t
Cx
Cx
0
0
1
1
0
0
0
0
0
0
1
0
tx
)(
1
tx
)(
2
t
)(
where:
x
A
B
2
1
x
t
)(
1
n
t
)(txn
)(
1
2
1
n
n
0
a
n
a
0
0
a
n
a
0
0
a
n
a
0
1
a
1
a
0
C
C
01
00
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
83
Establishing state equations from differential equations
Establishing state equations from differential equations
Case #2 (cont )
Case #2 (cont’)
Case #2 (cont )
Case #2 (cont’)
1
b
b
0
a
0
b
b
1
1
2
a
b
2
2
12
12
3
a
a
11
11
a
0
a
21
21
a
0
2
b
n
a
1
n
a
n
1
1
11
n
a
2
n
a
0
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
84
The coefficients in the vector B are calculated as follow:
Establishing state equations from differential equations
Establishing state equations from differential equations
Case #2: Example
Case #2: Example
Case #2: Example
Case #2: Example
Write the state equations describing the following system:
)(6)(5)(2
ty
ty
ty
tu
)(
tu
)(
ty
)(
10
10
20
Define the state variables:
tu
)(
)(
tx
1
)(
tx
2
tx
)(
3
)(
ty
)(
tx
1
tx
)(
2
)(
tu
1
2
)(
)(
tu
Ax
B
The state equation:
The state equation:
x
)(
)(
t
ty
)(
)(
)(
t
t
)(
Cx
0
0
0
0
1
1
0
0
1
1
0
0
A
0
0
1
3
3
2
2
5
5
3
3
5.2
52
1
B
2
3
001C
0
a
a
0
a
a
1
a
1
1
a
0
0
0
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
85
Establishing state equations from differential equations
Establishing state equations from differential equations
The elements of vector B are calculated as follow:
0
10
10
b
0
a
0
b
b
1
5
a
20
0655
b
2
2
05
05
2
2
2
1
1
2
5
2
0
2
a
a
11
a
0
a
1
1
2
2
a
0
1
2
3
0
Case #2: Example (cont ))
Case #2: Example (cont’))
Case #2: Example (cont ))
Case #2: Example (cont’))
B
5
5
5
2
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
86
Consider a system described by the differential equation:
Consider a system described by the differential equation:
n
1
d
a
a
0
a
1
n
tya
)(
n
1
)(
ty
n
1
n
)(
tyd
n
dt
dt
dt
dt
)(
tdy
dt
dt
m
d
b
0
b
1
b
m
tub
)(
m
1
1
tu
)(
1
m
m
tud
)(
m
dt
dt
tdu
)(
dt
space equations in controllable canonical form
StateState--space equations in controllable canonical form
m
m
1
sG
)(
)(
G
n
n
1
...
...
sb
0
0
sa
0
sb
1
1
sa
1
n
n
bsb
1
1
m
m
m
m
asa
1
The controllable canonical state equations of the system is
Th
t t
or equivalently by the transfer function:
f th ti t i t i
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
87
l
ll bl
presented in the next slide.
space equations in controllable canonical form (cont’)
StateState--space equations in controllable canonical form (cont’)
tr
)(
)(
t
Ax
A
B
B
State equations:
t
)(
)(
t
x
ty
)(
t
)(
)(
t
t
)(
Cx
1
0
0
0
0
0
0
1
Where:
B
A
t
)(
x
2
1
tx
)(
)(t
1
)(
tx
2
)(txn
0
0
0
1
0
a
n
a
0
0
0
a
n
a
0
0
0
a
n
a
0
0
1
a
1
a
0
0
1
0
0
0
0
C
C
b
m
a
0
b
m
a
0
b
0
a
0
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
88
space equations in controllable canonical form (cont’)
StateState--space equations in controllable canonical form (cont’)
)(2
ty
Write the controllable canonical state equations of the following
Write the controllable canonical state equations of the following
ty
ty
)(4)(5)(
ty
tu
)(3)(
tu
tr
)(
system:
Ax
B
Solution:
t
)(
x
ty
)(
t
)(
)(
t
Cx
0
1
0
0
1
0
A
0
0
1
B
2
5.2
5.0
0
0
1
0
a
3
a
0
0
a
2
a
0
1
a
1
a
0
where:
C
C
5.005.1
50051
b
2
a
0
b
1
a
0
b
0
a
0
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
89
Establishing state equations from block diagrams
Establishing state equations from block diagrams
Establish the state equations describing the system below:
R(s)
Y(s)
Example
Example
Example
Example
10
)(1
ss
(
s
)3
Define the state variables as in the block diagram:
( )
R(s)
Y(s)
Y(s)
2(s)
X2(s)
X3(s)
X3(s)
X1(s)
X1(s)
+
(
)1
(
)3
1
1
s
10
10
s
1
1
s
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
90
+
Establishing state equations from block diagrams
Establishing state equations from block diagrams
From the block diagram, we have:
sX
10
3)(
s
sX
)(
1
sX
)(
2
1
sX
)(
1
sX
)(
2
10
10
s
3
Example (cont )
Example (cont’)
Example (cont )
Example (cont’)
10
tx
)(
1
tx
)(3
1
tx
)(
2
sX
)(
)(
s
)(
)(
sX
2
2
)(
)(
sX
3
3
2
2
)(
)(
sX
2
2
)(
)(
sX
3
3
1
1
1
s
(1)
tx
)(
2
tx
)(
2
tx
)(
3
sR
)(
sY
)(
sX
s
)(
sR
)(
sX
)(3
3
sX
)(
1
1
s
tr
)(
)(
(2)
)(
tx
)(
3
tx
)(
)(
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
91
(3)
(3)
Establishing state equations from block diagrams
Establishing state equations from block diagrams
Example (cont )
Example (cont’)
Example (cont )
Example (cont’)
Combining (1), (2), and (3) leads to the state equations:
0
3
10
0
11
0
0
0
1
)(0
tr
1
B
x
tx
)(
tx
)(
1
1
tx
)(
tx
)(
2
2
tx
tx
)(
)(
3
3
x
)(
)(
t
)(
)(
t
A
Output equation:
ty
)(
tx
)(
1
tx
)(tx
)(
1
tx
)(
2
)(3 tx
)(
t
001
C
C
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
92
State equation to transfer function
State equation to transfer function
Given a system described by the state equations:
tu
)(
ib d b th t t Gi d ti t
B
x
t
)(
ty
)(
)(
t
t
)(
t
)(
)(
t
Ax
Cx
C
Then the transfer function of the system is:
1
)(
sG
BAIC
s
)(
sY
)(
sU
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
93
Calculate the transfer function of the system described by the
Calculate the transfer function of the system described by the
Example
State equation to transfer function –– Example
State equation to transfer function
tu
)(
state equation:
Ax
B
x
t
)(
ty
)(
t
)(
t
)(
Cx
0
1
where
B
01C
A
2
3
1
3
Solution: The transfer function of the system is:
1
)(
sG
BAIC
s
)(
sY
)(
sU
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
94
Calculate transfer functions from state equations
Calculate transfer functions from state equations
0
1
s
1
s
s
Example (cont )
Example (cont’)
Example (cont )
Example (cont’)
AI
10
10
2
2
2
2
s
s
01
3
3
3
3
1
1AI
s
s
2
s
(
ss
)1.(2)3
1
1
3
13
s
2
s
13
1
AIC
s
s
AIC
01
01
s
s
13
13
2
2
s
1
s
3
s
2
1
s
3
s
2
s
2
1
s
s
BAIC
BAIC
s
s
2
1
s
3
s
2
(3
2
s
1)3
s
s
3
2
3
13
13
1
sG
sG
)(
)(
s
2
s
3
10
2
s
3
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
95
Solution to state equations
Solution to state equations
tu
t
)(
t
)(
Ax
B
x
Solution to the state equation ?)(
t
)(
t
t
)(
(
t
t
(
u
u
x
x
)0()(
)0()(
t
t
x
x
)
)
B
B
d
)(
)(
d
0
1
[
[
(
(
s
s
)]
)]
t
)(
)(
t
where
where transient matrix
transient matrix
L
L
(
1)
s
)(
System response?
)(
ty
)(
t
AIs
Cx
Example:
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
96
Relationship between the mathematical models
Relationship between the mathematical models
Diff. equation
Define x
L
L -1
1
sG
)(
s
BAIC
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
97
Transfer function State equation
Linearized models of nonlinear systems
Linearized models of nonlinear systems
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
98
Nonlinear systems
Nonlinear systems
Nonlinear systems do not satisfy the superposition
principle and cannot be described by a linear differential
equation.
Most of the practical systems are nonlinear:
Most of the practical systems are nonlinear:
Fluid system (Ex: liquid tank,…)
Thermal system (Ex: furnace,…)
Thermal system (Ex: furnace
)
Mechanical system (Ex: robot arm,….)
Electro-magnetic system (TD: motor,…)
Electro magnetic system (TD: motor
)
Hybrid system ,…
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
99
nonlinear systems
Mathematical model of nonlinear systems
Mathematical model of
Input – output relationship of a continuous nonlinear system
Input
output relationship of a continuous nonlinear system
can be expressed in the form of a nonlinear differential
equations.
n
1
d
,
,
,
),
,
,
tu
)(,
g
(
ty
)(
ty
n
n
1
1
)(
tdy
dt
dt
)(
tdu
dt
dt
n
)(
tyd
n
n
dt
dt
dt
dt
m
)(
tud
m
m
dt
dt
where: u(t): input signal,
where: u(t): input signal,
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
100
y(t): output signal,
g(.): nonlinear function
Example 1
Nonlinear system –– Example 1
Nonlinear system
qin
t
u(t)
a: cross area of the dischage valve
a: cross area of the dischage valve
A: cross area of the tank
g: gravity acceleration
k: constant
t
k
CD: discharge constant
Balance equation:
tyA
)(
t
)(
tq
)(
in
q
out
y(t)
(t) qout
tku
)(
)(
tku
t
)(
aC
2
tgy
)(
tqin
tq
)(
)(
q
out
D
ty
)(
)(
ty
aC
aC
2
2
tgy
tgy
where:
where:
tku
)(
)(
tku
)(
)(
D
D
1
A
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
101
(first order
nonlinear system )
) li t
Example 2
Nonlinear system –– Example 2
Nonlinear system
l
m
m
u
J: moment inertia of the robot arm
J: moment inertia of the robot arm
M: mass of the robot arm
m: object mass
l: length of robot arm
l: length of robot arm
lC : distance from center of gravity to rotary axis
B: friction constant
g: gravitational acceleration
g: gravitational acceleration
u(t): input torque
(t): robot arm angle
J
(
(
ml
)
cos
tu
)(
)()
t
According to Newton’s Law
2
tB
ml
)(
gMl
C
t
)(
g
cos
tu
)(
)(
t
2
2
)
(
J
ml
(
(
J
Ml
)
C
2
ml
)
)
(
J
B
ml
1
ml
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
102
(second order nonlinear system)
Example 3
Nonlinear system –– Example 3
Nonlinear system
Moving direction
(t)
: steering angle
: ship angle
k: constant
i: constant
(t)
( )
The differential equation describing the steering dynamic of a
g y g q
t
)(
)(
t
t
)(
)(
t
t
)(
)(
t
t
)(
)(
t
)(
)(
t
t
ship:
3
3
t
)(
)(
t
3
k
21
1
1
2
1
1
21
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
103
(third order nonlinear system)
(third order nonlinear system)
A continuous nonlinear system can be described by the state
A continuous nonlinear system can be described by the state
Describing nonlinear systems by state equations
Describing nonlinear systems by state equations
equation:
x
)(
)(
t
ty
)(
f
xf
((
((
x
((
h
),
),
(
(
))
))
tut
tut
),
(
))
where: u(t): input,
y(t): output,
x(t): state vector,
x(t) = [x1(t), x2(t),…,xn(t)]T
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
104
f(.), h(.): nonlinear functions
StateState--space model of nonlinear system Example 1
space model of nonlinear system –– Example 1
ty
)(
aC
2
tgy
qin
Differential equation:
Differential equation:
tku
)(
u(t)
)(
D
1
A
A
ty
)(
)(
Define the state variable:
tx
)(1
)(
State equation:
y(t)
(t) qout
St t ti
x
x
t
)(
t
)(
ty
)(
xf
((
xf
((
h
x
((
tut
),
(
))
tut
),
(
))
),
tut
(
))
aC
)(
t
gx
1
D
where
xf
tu
)(
),(
u
k
A
h
x
((
tut
),
(
))
2
A
1 tx
)(
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
105
StateState--space model of nonlinear system Example 2
space model of nonlinear system –– Example 2
t
)(
g
cos
tu
)(
)(
t
2
2
l
J
(
)
Ml
)
C
2
)
ml
)
(
J
1
ml
Differential equation:
Differential equation:
B
ml
(
ml
(
J
m
Define the state variable:
t
)(
)(
t
t
)(
tx
)(
1
tx
)(
)(2
tx
2
t
)(
u
u
xf
((
tut
),
(
))
State equation:
q
x
ty
)(
)(
h
h
x
)((
tut
),
((
(
(
))
))
where
xf
u
),(
tu
)(
cos
tx
)(
1
tx
)(
2
2
2
J
)
(
J
)(2 tx
ml
(
J
(
gMl
C
2
ml
)
)
)
(
B
ml
1
ml
h
x
((
tut
),
(
))
1 tx
)(
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
106
Equilibrium points of a nonlinear system
Equilibrium points of a nonlinear system
Consider a nonlinear system described by the diff. equation:
Consider a nonlinear system described by the diff. equation:
x
t
)(
ty
)(
)(
ty
xf
((
x
((
h
h
((
x
tut
),
(
))
tut
),
),
(
(
))
))
tut
x
The state is called the equilibrium point of the nonlinear
x
x
u
,( ux
( ux
)
)
If
If
system if the system is at the state
system if the system is at the state and the control signal is
and the control signal is
fixed at then the system will stay at state forever.
is equilibrium point of the nonlinear system then:
is equilibrium point of the nonlinear system then:
xf
((
tut
),
(
))
0
uu
,
xx
The equilibrium point is also called the stationary point of the
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
107
nonlinear system.
)(
tx
1
)(
)(
tx
2
2
Consider a nonlinear system described by the state equation:
Consider a nonlinear system described by the state equation:
1
tu
)(
(
).
)(
txtx
u
2
1
)(
)(2)(
)(
tx
tx
2
1
1
2
u
Find the equilibrium point when
Solution:
tut
(
),
Example 1
Equilibrium point of nonlinear system –– Example 1
Equilibrium point of nonlinear system
xf
((
))
0
The equilibrium point(s) are the solution to the equation:
uuxx
xx
,
,
uu
01
0
xx
.
1
2
x
x
2
1
1
2
2
2
1x
2x
2x
1x
2
2
2
2
2
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
108
or
Consider a nonlinear system described by the state equation:
d
Example 2
Equilibrium point of nonlinear system –– Example 2
Equilibrium point of nonlinear system
)
1
x
3
3
x
1
1
x
2
x
3
2
2
x
x
u
2
3
2
3
sin(
x
x
1
2
x
u
3
y
1x
ib d b th t t id C ti li t
tu
)(
)(
tu
0
0
u
u
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
109
Find the equilibrium point when
Find the equilibrium point when
Linearized model of a nonlinear system around an equilibrium point
Linearized model of a nonlinear system around an equilibrium point
Consider a nonlinear system described by the diff. equation:
Consider a nonlinear system described by the diff equation:
(1)
x
t
)(
ty
)(
)(
ty
xf
tut
((
),
(
))
x
)((
h
h
tut
(
((
),
(
))
))
x
tut
Expanding Taylor series for f(x,u) and h(x,u) around the
,( ux
)
y g ) ( )
(
equilibrium point , we can approximate the nonlinear
system (1) by the following linearized state equation:
(2)
)(~
x
t
)(~
ty
)(~
xA
t
)(~
xC
t
)(~
B
tu
)(~
D
tu
x
x
t
)(
where:
)(~
x
t
)(~
)(
tu
)(~
ty
)(
)(
tu
ty
)(
u
y
(
y
h
x
,(
u
))
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
110
Linearized model of a nonlinear system around an equilibrium point
Linearized model of a nonlinear system around an equilibrium point
The matrix of the linearized state equation are calculated as
i d t t f th li l t d t i ti l
Th
follow:
B
A
f
1
u
f
f
2
2
u
f
f
n
u
)
,x
( u
f
1
x
1
f
f
2
x
1
f
n
x
1
f
f
1
1
x
x
2
n
f
f
f
f
2
2
x
nx
2
f
f
n
n
x
x
2
n
(
,x
u
)
C
D
h
u
h
x
1
1
h
x
2
2
h
nx
n
)
)
( u,x
( u
x
,x
(
(
u
)
)
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
111
Linearized state--space model
Linearized state Example 1
space model –– Example 1
2
2
a
cm
1
,
A
100
cm
The parameter of the tank:
The parameter of the tank:
3
3
qin
k
k
150
150
cm
/
/
sec
CV
CV
.
,
8.0
80
D
u(t)
u(t)
2
g
981
cm
/
sec
t
)(
y(t) qout
xf
((
tut
),
(
))
Nonlinear state equation:
x
ty
)(
)(
ty
h
h
x
)((
tut
tut
((
),
(
(
x
))
))
)(
)(
t
aCD
D
tu
)(
)(
3544
3544
.0
0
9465
9465
tu
)(
)(
where
xf
f
u
),(
)
(
.0
0
tx
)(
)(
1
g
gx
2
1
1
A
k
k
A
h
((
((
x
),
),
(
(
tut
))
))
)(
)(
1 tx
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
112
Linearized state--space model
Linearized state Example 1 (cont’)
space model –– Example 1 (cont’)
The equilibrium point:
2020
9465
.0u
1 x
uxf
,(
)
.0
3544
u
5.1
0
x
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
113
Linearize the system around y = 20cm:
Linearize the system around y = 20cm:
The matrix of the linearized state-space model:
The matrix of the linearized state space model:
g
Linearized state--space model
Linearized state Example 1 (cont’)
space model –– Example 1 (cont’)
A
.0
0396
C
C
1
aC
2
2
D
xA
1
f
1
x
(1
,x
u
)
h
x
(1
,x
u
)
(
,x
u
)
D
0
B
5.1
h
u
k
A
f
1
u
(
,x
u
)
(
,x
u
)
(
,x
u
)
The linearized state equation describing the system around
)(
t
gx
1
tu
)(
0396
2
A
k
A
h
the equilibrium point y 20cm is:
the equilibrium point y=20cm is:
)(~
x
t
.0
)(~)(~
)(~)(~
x
ty
t
aC
D
),(
u
xf
)(~5.1)(~
x
t
tu
((
tut
),
1 tx
(
))
)(
x
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
114
Linearized state--space model
Linearized state Example 2
space model –– Example 2
The parameters of the robot:
The parameters of the robot:
l
,2.0
mm
1.0
kg
lm
,5.0
C
l
2
M
M
kg
kg
,5.0
50
J
J
02.0
020
.
mkg
mkg
m
2
B
.0
,005
g
81.9
m
/
sec
t
)(
u
u
xf
((
tut
),
(
))
Nonlinear state equation :
x
ty
)(
)(
ty
h
h
x
)((
tut
tut
((
),
(
(
x
))
))
where:
xf
),(
u
cos
tu
)(
tx
)(
1
)(
tx
2
2
2
)(2 tx
(
ml
J
(
gMl
C
2
ml
)
)
)
(
J
)
(
J
B
ml
1
ml
h
x
((
tut
),
(
))
1 tx
)(
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
115
Linearize the system around the equilibrium point y = /6 (rad):
Linearize the system around the equilibrium point y = /6 (rad):
Calculating the equilibrium point:
6/x
6/
1 x
x
2
(
u
0
Linearized state--space model
Linearized state Example 2 (cont’)
space model –– Example 2 (cont’)
f
xf
(
(
,
,
)
)
cos
cos
u
u
x
x
1
x
x
2
2
2
ml
J
(
gMl
C
C
2
ml
)
)
)
(
J
)
(
J
1
ml
B
ml
0
2744
2x
.1u
Then the equilibrium point is:
Th
ilib i i t i th
x
x
x
1
x
2
6/
6/
0
2744
2744
.1u
1
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
116
The system matrix around the equilibrium point:
The system matrix around the equilibrium point:
Linearized state--space model
Linearized state Example 2 (cont’)
space model –– Example 2 (cont’)
A
a
a
11
12
a
21 a
a
a
22
1
0
a
12
a
11
f
1
x
x
(2
(2
,x
u
)
)
f
1
x
x
(1
1
)
u
,x
a
sin
21
21
)(
)(
tx
1
1
ml
(
J
(
)
Ml
C
2
2
ml
)
(
,x
u
)
,x
u
f
2
x
(1
)
a
a
22
2
)
(
,x
u
)
,x
u
f
2
2
x
(2
)
xf
(
u
u
),(
xf
)
cos
tu
)(
tx
)(
1
tx
)(
2
2
2
gMl
gMl
C
C
2
ml
J
)
)
)
)
(
)
(
J
1
1
ml
B
B
ml
B
J
ml
(
)(
tx
2
ml
(
(
ml
J
(
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
117
The input matrix around the equilibrium point:
The input matrix around the equilibrium point:
Linearized state--space model
Linearized state Example 2 (cont’)
space model –– Example 2 (cont’)
B
b
1
2b
b
0
0
b
b
1
f
1f
1
u
(
,x
u
)
b
2
2
f
f
2
u
J
1
1
ml
(
)
,x
u
xf
(
u
u
),(
xf
)
cos
tu
)(
)(
tx
)(
)(
1
tx
)(
)(
2
2
2
gMl
gMl
C
C
2
ml
)
(
J
)
(
tx
)(
2
ml
(
(
ml
J
(
)
)
)
J
1
1
ml
B
B
ml
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
118
The output matrix around the equilibrium point:
The output matrix around the equilibrium point:
0
c
2
1
c
1
cC
1
2
c
h
x
(2
(2
u,x
)
)
h
x
x
(1
1
Linearized state--space model
Linearized state Example 2 (cont’)
space model –– Example 2 (cont’)
,x
u
)
0
d
1
1dD
h
u ,x
u
(
(
u
)
)
Then the linearized state equation is:
)(~
x
t
)(~
ty
)(
t
)(~
xA
t
)(~
xC
xC
t
)(
t
)(~
B
tu
)(~
tu
)(
t
D
D
0D
0D
A
A
B
B
01C
01C
0
1
a
21 a
22
0
2b
h
x
),(
u
1 tx
)(
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
119
Regulating nonlinear system around equilibrium point
Regulating nonlinear system around equilibrium point
Drive the nonlinear system to the neighbor of the equilibrium
Drive the nonlinear system to the neighbor of the equilibrium
Around the equilibrium point, use a linear controller to maintain
Around the equilibrium point, use a linear controller to maintain
point (the simplest way is to use an ON-OFF controller)
the system around the equilibrium point.
Linear
Linear
control r(t) e(t) u(t) y(t)
Nonlinear
system
system +
ON-OFF
6 December 2013
© H. T. Hoang - www4.hcmut.edu.vn/~hthoang/
120
Mode
select