Chapter 1
Chapter 1
Automatic Control
ECE 306
Nguyen Thi My Thanh
Room 320.B11 (13:00PM-14:00PM)
Phone: 0907 599 993
Email: [email protected]
1
Learning outcomes
2
Outline
Chapter 2 Stability
3
Textbooks
1. Katsuhiko Ogata. (2015). Modern Control Engineering (Fifth Edition). Prentice Hall International
Editions
2. Golnaraghi, M. F., Kuo, Benjamin C. (2017). Automatic control systems (10th edition). Hoboken, NJ,
Wiley. ISBN: 9780470048962.
3. Phillips, Charles L.; Nagle, H. Troy (1998). Digital control system analysis and design (3rd edition).
Upper Saddle River, New Jersy, Person Education International Inc. ISBN: 9780133177299.
4
Assessment
❖ Midterm exam 30% >20% absence
❖ Final exam 40%
Exam
❖ Labs 25%
❖ Attendance 5%
5
Chapter 1 Repreparation of linear continuous-time systems
6
1.1 Mathematical model of linear systems
𝑑𝑖
Kirchhoff’s law: 𝑢 = 𝐿𝑎 + 𝑅𝑎 𝑖 + 𝐾Փω (1)
𝑑𝑡
𝑑ω 𝐽 𝑑ω 𝐵 1
Newton’s : 𝐾Փ𝑖 = 𝐽 + 𝐵ω + 𝑇𝐿 (2) ⇒ 𝑖 = + ω + 𝑇𝐿 (3)
𝑑𝑡 𝐾Փ 𝑑𝑡 𝐾Փ 𝐾Փ
𝐽 𝑑2 ω 𝐵 𝑑ω 1 𝑑𝑇𝐿 𝐽 𝑑ω 𝐵 1
(3) to (1) ⇒ 𝑢 = 𝐿𝑎 ( + + ) + 𝑅𝑎 + ω + 𝑇𝐿 + 𝐾Փω
𝐾Փ 𝑑𝑡 𝐾Փ 𝑑𝑡 𝐾Փ 𝑑𝑡 𝐾Փ 𝑑𝑡 𝐾Փ 𝐾Փ
▪ Linear system
▪ 2rd order system
▪ 𝑎0 , 𝑎1 , 𝑎2 , 𝑏1 , 𝑏2 : 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 => Time invariant
9
1.2 Transfer function
Laplace transform
➢Laplace transform is one of the mathematical tools for the solution of ordinary linear
differential equations.
Features:
▪ Laplace transform converts a differential equation into an algebraic equation in s which is
solved simply.
10
1.2 Transfer function
Laplace transform
Given the function x(t) with t ≥ 0, the Laplace transform of x(t) is
+∞
𝓛𝑥 𝑡 =𝑋 𝑠 =න 𝑥 𝑡 𝑒 −𝑠𝑡 𝑑𝑡
0
Where
𝓛: Laplace operator
s: Laplace variable
11
1.2 Transfer function
Properties of the Laplace transform
12
1.2 Transfer function
Laplace transform table
13
1.2 Transfer function
Laplace transform
u(t) Linear time y(t)
invariant system
14
1.2 Transfer function
Transfer function
➢The transfer function of a system G(s) is the ratio of the output's Laplace transform to the
input's Laplace transform under the assumption that all initial conditions are zero.
u(t) y(t)
G(s)
15
1.2 Transfer function
Transfer function U(s) Y(s)
G(s)
16
1.2 Transfer function
Example: a DC motor
i
u e
1 −b1 s − b2
Transfer function: 𝐺1 𝑠 = ; G2 s =
a0 s 2 + a1 𝑠 + a2 a0 s 2 + a1 𝑠 + a2
17
1.2 Transfer function
Example: a car
Differential equation:
Transfer function:
Or where
18
1.2 Transfer function
RLC circuits
𝑑𝑖(𝑡) 1 𝑡
𝓛 𝑖(𝑡)𝑅 𝓛 𝐿 𝓛 න 𝑖 𝜏 𝑑𝜏 + 𝑉0
𝑑𝑡 𝐶 0
= 𝑅𝐼(𝑠) = 𝐿[𝑠𝐼 𝑠 − 𝐼0 ] 𝐼(𝑠) 𝑉0
= +
𝑠𝐶 𝑠
19
1.2 Transfer function
Example: Find the transfer function of the circuit
𝑑𝑖 1 𝑡
Applying KCL: 𝑉𝑖 = 𝑅𝑖 + 𝐿 + න 𝑖 𝜏 𝑑𝜏
𝑑𝑡 𝐶 0
𝐼 𝑠
Laplace transform: 𝑉𝑖 = 𝑅𝐼 𝑠 + 𝐿𝑠𝐼 𝑠 + V𝑜, 𝑤ℎ𝑒𝑟𝑒 𝑉𝑜 =
𝑠𝐶
𝑉𝑜 1
⇒𝐻 𝑠 = = 2
𝑉𝑖 𝑠 𝐿𝐶 + sRC + 1
20
1.2 Transfer function
Inverting amplifier
Ideal op amp: 𝑖+ = 𝑖− = 0
Applying KCL:
𝑉𝑜 𝑅𝑓
⇒𝐻 𝑠 = =−
𝑉𝑖 𝑅1
21
1.2 Transfer function
Exercise: Determine the transfer functions of the circuits below:
a) b) c)
d) e) f) 22
1.2 Transfer function
Impulse response
The output:
The impulse response is the inverse Laplace transform of the transfer function.
23
1.2 Transfer function
Step response
The output:
2
Impulse response: = 𝓛−1
1
10(𝑠 + )
10
2 −1𝑡
𝑦 𝑡 = 𝑒 10
10
2 2 20
Step response: = 𝓛−1 = 𝓛−1 (𝑠 − 10𝑠+1)
𝑠(10𝑠+1)
1
− 𝑡
𝑦 𝑡 = 2 − 2𝑒 10
25
1.2 Transfer function
2
Example 𝐺 𝑠 =
10𝑠 + 1
Matlab
>> sys = tf(2,[10 1])
>> impulse(sys)
>> step(sys)
26
1.2 Transfer function
3𝑠 + 6
Example 𝐺 𝑠 = 2
𝑠 + 2𝑠 + 5
Impulse response:
3𝑠+6 3𝑠+6 3 𝑠+1 +3
𝑦 𝑡 = 𝓛−1 𝐺 𝑠 = 𝓛−1 = 𝓛−1 = 𝓛−1
𝑠 2 +2𝑠+5 (𝑠+1)2 +22 (𝑠+1)2 +22
3 𝑠+1 3 𝑠+1 3 2
𝑦 𝑡 = 𝓛−1 + = 𝓛−1 3 +
(𝑠+1)2 +22 (𝑠+1)2 +22 (𝑠+1)2 +22 2 (𝑠+1)2 +22
3 −𝑡
y t = 3𝑒 −𝑡 c𝑜𝑠(2t) + 𝑒 sin(2t)
2
27
1.2 Transfer function
3𝑠 + 6
Example 𝐺 𝑠 = 2
𝑠 + 2𝑠 + 5
Step response:
𝐺 𝑠 3𝑠+6 𝐴 𝐵𝑠+𝐶 𝐴+𝐵 𝑠 2 + 2𝐴+𝐶 𝑠+5𝐴
𝑦 𝑡 = 𝓛−1 = 𝓛−1 = 𝓛−1 + = 𝓛−1
𝑠 𝑠(𝑠 2 +2𝑠+5) 𝑠 𝑠 2 +2𝑠+5 𝑠 2 +2𝑠+5
𝐴+𝐵 =0 𝐴 = 1.2
ቐ2𝐴 + 𝐶 = 3 ⇒ ൝ 𝐵 = −1.2
5𝐴 = 6 𝐶 = 0.6
Impulse response:
100 20 5 3
𝑦 𝑡 = 𝓛−1 𝐺 𝑠 = 𝓛−1 2
=𝓛−1 .
𝑠 + 10𝑠 + 100 3 (𝑠 + 5)2 +(5 3)2
20 −5𝑡
y t = 𝑒 sin(5 3t)
3
29
1.2 Transfer function
100
Example 𝐺 𝑠 = 2
𝑠 + 10𝑠 + 100
Step response:
𝐺 𝑠 100 𝐴 𝐵𝑠+𝐶
𝑦 𝑡 = 𝑔 𝑡 = 𝓛−1 = 𝓛−1 = 𝓛−1 +
𝑠 𝑠(𝑠 2 +10𝑠+100) 𝑠 𝑠 2 +10𝑠+100
𝐴+𝐵 =0 𝐴=1
ቐ10𝐴 + 𝐶 = 0 ⇒ ቐ 𝐵 = −1
100𝐴 = 100 𝐶 = −10
1
1 𝑠+10 1 𝑠+5+5 3
⇒ 𝑦 𝑡 = 𝓛−1 − 2 = 𝓛−1 = 𝓛−1 − 3
𝑠 𝑠 +10𝑠+100 𝑠 (𝑠+5)2 +(5 3)2
−1 1 𝑠+5 1 5 3
⇒𝑦 𝑡 = 𝓛 − 2 −
𝑠 (𝑠+5)2 + 5 3 3 (𝑠+5)2 +(5 3)2
−5𝑡 1 −5𝑡
⇒ 𝑦(𝑡) = 1 − 𝑒 cos 5 3𝑡 − 𝑒 sin 5 3𝑡 30
3
1.2 Transfer function
Exercise: Find the Transfer functions of the following systems
𝑑𝑦
a) + 2𝑦 = 5𝑢
𝑑𝑡
𝑑2 𝑦 𝑑𝑦 𝑑𝑢
b) +4 + 13𝑦 = 3 + 9𝑢
𝑑𝑡 2 𝑑𝑡 𝑑𝑡
𝑑3 𝑦 𝑑2 𝑦 𝑑𝑦 𝑑𝑢
c) +3 2 +3 +𝑦 =6 + 5𝑢
𝑑𝑡 3 𝑑𝑡 𝑑𝑡 𝑑𝑡
31
1.2 Transfer function
Exercise: Find the impulse response and step response of the following systems:
6𝑠+8 6 6
d) 𝐺 𝑠 = e) 𝐺 𝑠 = f) 𝐺 𝑠 =
𝑠 2 +3𝑠+2 𝑠+2 (𝑠+2)2
g) 𝑦ሷ + 4𝑦ሶ + 5𝑦 = 6𝑢ሶ + 8𝑢
𝑌(𝑠)
Given the transfer function 𝐺 𝑠 =
𝑈(𝑠)
32
1.3 Block diagrams
➢A pictorial representation of the functions performed by each component and of
the flow of signals.
Branch point
33
1.3 Block diagrams
Elements
𝑥2
𝑥1 + y
+
−
𝑥3
Y 𝑠 = 𝐺1 𝑠 𝑈 𝑠 Y 𝑠 = 𝑋1 𝑠 + 𝑋2 𝑠 − 𝑋3 𝑠
34
1.3 Block diagrams
Cascaded system Paralleled system Feedback system
≡
≡
R(s) C(s) R(s) C(s) R(s) C(s)
𝐺1 (𝑠)
𝐺1 (𝑠) 𝐺2 (𝑠) 𝐺1 (𝑠)+ 𝐺2 (𝑠)
1 + 𝐺1 (𝑠)𝐺2 (𝑠)
𝐶(𝑠) 𝐺1 (𝑠)
C 𝑠 = 𝐺1 𝑠 𝐺2 𝑠 𝑅 𝑠 C 𝑠 = (𝐺1 𝑠 +𝐺2 𝑠 )𝑅 𝑠 G 𝑠 = =
𝑅 𝑠 1+𝐺1 (𝑠)𝐺2 (𝑠)
35
1.3 Block diagrams
➢Moving a branch point
➢Moving a comparator
36
1.3 Block diagrams
➢Find the transfer function of the system described as the block diagram
𝐸 𝑠 =𝑅 𝑠 −𝐵 𝑠
B 𝑠 =𝐻 𝑠 𝐶 𝑠
C 𝑠 =𝐺 𝑠 𝐸 𝑠
=𝐺 𝑠 𝑅 𝑠 −𝐵 𝑠
=𝐺 𝑠 𝑅 𝑠 −𝐻 𝑠 𝐶 𝑠
⇒ C 𝑠 + 𝐺(𝑠) 𝐻 𝑠 𝐶 𝑠 = 𝐺 𝑠 𝑅 𝑠
=> C 𝑠 [1 + 𝐺 𝑠 𝐻 𝑠 ] = 𝐺 𝑠 𝑅 𝑠
𝐶(𝑠) 𝐺(𝑠)
Transfer function of the system: =
𝑅(𝑠) 1+𝐺 𝑠 𝐻 𝑠
37
1.3 Block diagrams
➢Find the transfer function of the system described as the block diagram
𝐸 𝑠 =𝑅 𝑠 +𝐵 𝑠
B 𝑠 =𝐻 𝑠 𝐶 𝑠 +
C 𝑠 =𝐺 𝑠 𝐸 𝑠
= 𝐺 𝑠 𝑅 𝑠 +𝐵 𝑠
=𝐺 𝑠 𝑅 𝑠 +𝐻 𝑠 𝐶 𝑠
⇒ C 𝑠 − 𝐺(𝑠) 𝐻 𝑠 𝐶 𝑠 = 𝐺 𝑠 𝑅 𝑠
=> C 𝑠 [1 − 𝐺 𝑠 𝐻 𝑠 ] = 𝐺 𝑠 𝑅 𝑠
𝐶(𝑠) 𝐺(𝑠)
Transfer function of the system: =
𝑅(𝑠) 1−𝐺 𝑠 𝐻 𝑠
38
1.3 Block diagrams
➢Find the transfer function of the system described as the block diagram
Y 𝑠 =𝐺 𝑠 𝑈 𝑠
R(s) E(s) U(s) Y(s)
=G(s)K(s)E(s) +- K(s) G(s)
=G(s)K(s)[R(s)−W(s)]
W(s) Z(s) ++ V(s)
=G(s)K(s)[R(s)−F(s)Z(s)] F(s)
=G(s)K(s)[R(s)−F(s){Y(s)+V(s)}]
= G(s)K(s)R(s)−G(s)K(s)F(s)Y(s)- G(s)K(s)F(s)V(s)
⇒ Y(s)[1+G(s)K(s)F(s)] = G(s)K(s)R(s)−G(s)K(s)F(s)V(s)
G(s)K(s) −G(s)K(s)F(s)
⇒𝑌 𝑠 = R(s) + V(s)
1+G(s)K(s)F(s) 1+G(s)K(s)F(s)
𝐻1 (s) 𝐻2 (s)
𝐻1 (s): Transfer function from R(s) to Y(s)
⇒ Y 𝑠 = 𝐻1 (s)𝑅 𝑠 + 𝐻2 (s)𝑉 𝑠
𝐻2 (s): Transfer function from V(s) to Y(s)
39
1.3 Block diagrams
Example
R(s) 𝐺4 𝑠 + 𝐺1 𝑠 𝐺2 𝑠 Y(s)
1 + 𝐺2 (𝑠)𝐺3 (𝑠)
40
1.3 Block diagrams
Example: Find the transfer function of the following system
41
1.3 Block diagrams
Example: Simplify this diagram
42
1.3 Block diagrams
Example: Simplify this diagram
43
1.3 Block diagrams
Example: Simplify this diagram
44
1.3 Block diagrams
Exercise: Find the transfer function of the systems
a)
b)
45
1.3 Block diagrams
Exercise: Find the transfer function of the systems
c) d)
46
1.3 Signal flow graph
𝐸 𝑠 =𝑅 𝑠 −𝐻 𝑠
Forward path C 𝑠 =𝐺 𝑠 𝐸 𝑠
Loop
𝐶(𝑠) 𝐺(𝑠)
=
𝑅(𝑠) 1 + 𝐺 𝑠 𝐻 𝑠
47
1.3 Signal flow graph
❖Nodes represent variables.
▪ Input Node (source) − It is a node with only outgoing branches.
▪ Output Node (sink) − It is a node with only incoming branches.
▪ Mixed Node − It is a node with both incoming and outgoing branches.
❖Path is a continuous set of branches traversed in the direction indicated by the branch arrows.
❖Forward path is a path from an input node to an output node that does not revisit any node.
❖Path gain is the product of the gains of all the branches in the path.
❖Branches are line segments that joins two nodes. Signals travel along branches only in the
direction described by the arrows of the branches.
48
1.3 Signal flow graph
Example: Find the Signal flow graph of the following system
𝐺4 (𝑠) 𝐺4 (𝑠)
𝐺1 (𝑠) 𝐺2 (𝑠) 1
R(s) R(s) x
+ Y(s)
𝐺1 (𝑠) + 𝐺2 (𝑠) + v
−
𝑋 𝑠 = 𝐺1 𝑠 𝑅 𝑠 − 𝐺3 𝑠 Y s
𝑌 𝑠 = 𝑉 𝑠 = 𝐺4 𝑠 𝑅 𝑠 + 𝐺2 𝑠 X s
𝑌 𝑠 = 𝐺4 𝑠 R s + 𝐺2 𝑠 𝐺1 𝑠 𝑅 𝑠 − 𝐺2 𝑠 𝐺2 𝑠 𝑌 𝑠
1 + 𝐺2 𝑠 𝐺2 𝑠 𝑌 𝑠 = (𝐺4 𝑠 + 𝐺1 𝑠 𝐺2 𝑠 )𝑅 𝑠
𝑌(𝑠) 𝐺4 𝑠 + 𝐺1 𝑠 𝐺2 𝑠
⇒ =
𝑅(𝑠) 1+𝐺2 𝑠 𝐺2 𝑠
49
1.3 Signal flow graph
➢ Mason’s formula for signal flow graphs
➢ Gain between input node u and output node y: Y(s) = G(s)U(s)
1
𝐺 𝑠 = 𝑇𝑖 ∆𝑖
∆
▪ 𝑇𝑖 : gain of the ith forward path
▪ ∆𝑖 : the determinant for the part of the signal flow graph which is nontouching with the ith
forward path
▪ ∆: determinant of the graph
σ 𝐿𝑖 𝐿𝑗 𝐿𝑘 : sum of the gain products of all possible combinations of three nontouching loops
50
1.3 Signal flow graph
Example
𝐺4 (𝑠) • 𝑇1 = 𝐺4 => ∆1 = 1
−𝐺3 (𝑠)
• 𝑇2 = 𝐺1 𝐺2 => ∆2 = 1
Path from input to output: 𝑇1 = 𝐺4
𝑇2 = 𝐺1 𝐺2
Loop: 𝐿1 = −𝐺2 𝐺3
Determinant: ∆= 1 − 𝐿1 = 1 +𝐺2 𝐺3
𝑇1 ∆1 + 𝑇2 ∆2 𝐺4 + 𝐺1 𝐺2
⇒𝐺 𝑠 = =
∆ 1 +𝐺2 𝐺3
51
1.3 Signal flow graph
Example: find the transfer function of the system below
52
1.3 Signal flow graph
Solution 𝐺2
r 𝐺4 𝑥 1 y
1 𝑛 𝑢 𝐺1 𝑣 1
−𝐺3
−𝐺5
𝑋 = 𝐺1 U
N= 𝑅 − 𝐺5 Y
𝑋 = 𝐺1 𝐺4 𝑁 − 𝐺3 𝑋
𝑋 = 𝐺1 𝐺4 𝑅 − 𝐺1 𝐺4 𝐺5 Y − 𝐺1 𝐺3 X
𝐺1 𝐺4 𝑅 − 𝐺1 𝐺4 𝐺5 Y
𝑋=
1 + 𝐺1 𝐺3
𝑌 = 𝑉 = 𝐺2 N + X
𝑌 = 𝑉 = 𝐺2 N + X = 𝐺2 (𝑅 − 𝐺5 Y) + 𝐺1 𝐺4 𝑁 − 𝐺3 𝑋
𝑌 = 𝐺2 (𝑅 − 𝐺5 Y) + 𝐺1 𝐺4 (𝑅 − 𝐺5 Y ) − 𝐺3 𝑋
𝑌 = 𝐺2 𝑅 − 𝐺2 𝐺5 Y + 𝐺1 𝐺4 𝑅 − 𝐺1 𝐺4 𝐺5 Y − 𝐺1 𝐺3 𝑋 𝐺1 𝐺3 𝐺1 𝐺4
𝐺1 𝐺3 𝐺1 𝐺4 𝑌 𝐺2 + 𝐺 𝐺
1 4 − 1 + 𝐺1 𝐺3
1 + 𝐺2 𝐺5 + 2𝐺1 𝐺4 𝐺5 𝑌 = 𝐺2 + 𝐺1 𝐺4 − 𝑅 =≫ = 53
1 + 𝐺1 𝐺3 𝑅 1 + 𝐺2 𝐺5 + 2𝐺1 𝐺4 𝐺5
1.3 Signal flow graph
Solution:
Forward path: Loop:
𝑇1 = 𝐺4 𝐺1 𝐿1 = −𝐺1 𝐺3
𝑇2 = 𝐺2 𝐿2 = −𝐺1 𝐺4 𝐺5
𝐿3 = −𝐺2 𝐺5
𝐺1 𝐺3 𝐺1 𝐺4
𝑌 𝐺2 + 𝐺 𝐺
1 4 − 1 + 𝐺1 𝐺3
=≫ = 54
𝑅 1 + 𝐺2 𝐺5 + 2𝐺1 𝐺4 𝐺5
1.3 Signal flow graph
Exercise: Find the graph of the block diagram
55
Complex number
z=x+yi
x and y are real numbers
x : real part
y : imaginary part
i : imaginary unit
𝑧 = 𝑟𝑒 𝑖𝜑 = 𝑟(𝑐𝑜𝑠𝜑 + 𝑖𝑠𝑖𝑛𝜑)
𝑟= 𝑧 = 𝑥2 + 𝑦2 In angle notation,
𝜑 = 𝑎𝑟𝑔 𝑧 = 𝑎𝑡𝑎𝑛2(𝐼𝑚 𝑧 , 𝑅𝑒 𝑧 )
𝑦 −1
𝑦 r : absolute value of z(or modulus or magnitude)
𝜑 = arctan = 𝑡𝑎𝑛 ( ) 𝜑 : argument of z (or phase)
𝑥 𝑥
56
Unit circle
57