D(s)
R(s) +
C(s)
+
-
Controller + Plant
MA3005: Control Theory
Part II: Controller Design
Assistant Professor Guo Zhan Lum
1
Background
▪ Educational Background (Mechanical Engineering)
➢ [Link]. with first class honors from NTU (2006 – 2010)
➢ Dual [Link]. from NTU and CMU (2011 – 2016)
➢ Post-Doctoral Researcher at MPI (2016 – 2017)
CMU – Carnegie Mellon University (USA), MPI – Max Planck Institute for Intelligent Systems (Germany)
▪ Contact Details
➢ Email: gzlum@[Link]
➢ Office: N3.2-01-22
2
Teaching Plan
Week Lecture Topics Tutorial
8 Recap & Introduction to controller design/System Types 6
9 Root Locus: Introduction and Sketching 7
10 Root Locus: Controller Design 8
11 Bode Plot: Introduction and Sketching 9
12 Bode Plot: Analysis 10
13 Revision 11
3
Continuous Assessment
Homework 2 (20%)
• Released in Week 10
• Two weeks to complete
4
Motivation
1. A method to unify sub-systems across different disciplines
2. To regulate the output with respect to time t
For example:
Desired Electrical System Mechanical System Actual
Velocity Voltage Torque Velocity
Controller
Sensors
5
Laplace Transformation
Converting differential equations (t) algebraic equations (s)
Some Basic Transform s-shifting
1
ℒ 1 = 1
𝑠 ℒ −1 = 𝑒 −𝑎𝑡
𝑠 𝑠+𝑎
ℒ cos 𝜔𝑡 = 2
𝑠 + 𝜔2
𝜔 𝜔
ℒ sin 𝜔𝑡 = 2 ℒ −1 = 𝑒 −𝑎𝑡 sin 𝜔𝑡
𝑠 + 𝜔2 𝑠 + 𝑎 2 + 𝜔2
𝑑𝑓 0
ℒ 𝑓(𝑡) = 𝐹(𝑠), ℒ = 𝑠𝐹 𝑠 − 𝑓(𝑡 = 0)
𝑑𝑡
6
Transfer Function Poles
Differential Equation Laplace Transformation
𝑀𝑥ሷ + 𝐶 𝑥ሶ + 𝐾𝑥 = 𝑓 𝑀𝑠 2 + 𝐶𝑠 + 𝐾 𝑋(𝑠) = 𝐹(𝑠)
𝑋(𝑠) 1
Homogeneous solution: 𝑀 𝑥ሷ + 𝐶 𝑥ሶ + 𝐾𝑥 = 0 =
𝐹(𝑠) 𝑀𝑠 2 + 𝐶𝑠 + 𝐾
𝑀𝑑 2 + 𝐶𝑑 + 𝐾 = 0 Transfer Function Poles: 𝑀𝑠 2 + 𝐶𝑠 + 𝐾 = 0
1st possibility 2nd possibility 1st possibility 2nd possibility
𝑑 = −1, 2 𝑑 = ±𝑗5 𝑠 = −1, 2 𝑠 = ±𝑗5
𝑥= 𝐴e−𝑡 + 𝐵e2𝑡 𝑥 = 𝐴cos(5𝑡 + ∅) 𝑥 = 𝐴e−𝑡 + 𝐵e2𝑡 𝑥 = 𝐴cos(5𝑡 + ∅)
3rd possibility 3rd possibility
𝑑 = −2 ± 𝑗5 𝑠 = −2 ± 𝑗5
𝑥 = 𝐴e−2𝑡 cos 5𝑡 + ∅ 𝑥 = 𝐴e−2𝑡 cos 5𝑡 + ∅
Poles dictate homogeneous 7
solution/ transient response
Stable Systems
Transfer function poles dictate stability
𝑋(𝑠) 1
= 2
𝐹(𝑠) 𝑠 + 3𝑠 + 2
Transfer Function Poles: 𝑠 2 + 3𝑠 + 2 = 0 𝑠+1 𝑠+2 =0 𝑠 = −1, −2
Im Transient Response Step Response
x(t)
𝐴𝑒 −𝑡 + 𝐵𝑒 −2𝑡
-2 -1 Re
𝑠 = −1 𝑠 = −2 Time
Pole #1 Pole #2
Transient response decays
s-plane 𝐴, 𝐵 are constants Stable system
8
Partially-Stable Systems
Transfer function poles dictate stability
𝑋(𝑠) 1
= 2
𝐹(𝑠) 𝑠 +4
Transfer Function Poles: 𝑠2 + 4 = 0 𝑠 = ±𝑗2
Im Transient Response Step Response
x(t)
2
𝐴 cos(2𝑡 + ∅)
Re
-2
𝑠 = ±𝑗2 Time
Complex Poles Transient response oscillates
s-plane 𝐴, ∅ are constants Partially-stable system
9
Unstable Systems
Transfer function poles dictate stability
𝑋(𝑠) 1
= 2
𝐹(𝑠) 𝑠 +𝑠−2
Transfer Function Poles: 𝑠2 + 𝑠 − 2 = 0 𝑠−1 𝑠+2 =0 𝑠 = 1, −2
Im Transient Response Step Response
x(t)
𝐴𝑒 𝑡 + 𝐵𝑒 −2𝑡
-2 1 Re
𝑠=1 𝑠 = −2 Time
Pole #1 Pole #2
Transient response → ∞
s-plane 𝐴, 𝐵 are constants unstable system
10
Stability
Three types of poles
1. Real poles (e.g. s = a) Stable systems require
Transient response 𝐴𝑒 𝑎𝑡 𝑒 𝑎𝑡 → 0, when 𝑡 → ∞
𝑎<0
2. Pure complex poles (e.g. s = ±jb)
Left hand s-plane
Transient response 𝐴 cos(𝑏𝑡 + ∅) Im
(always partially-stable)
Stable Unstable
3. Complex poles with real parts (e.g. s = a ± jb)
Re
Transient response 𝐴𝑒 𝑎𝑡 cos(𝑏𝑡 + ∅)
𝐴, ∅ are constants
s-plane 11
Dominant Poles
Dominant poles are the
rightmost poles (slowest) Step Response
e.g., compare step response of two
systems 5s
System #1 has two poles: s = -2 ± j
2s
transient response: 𝐴𝑒 −2𝑡 cos(𝑡 + ∅)
System #2 has two poles: s = -1 ± j
transient response: 𝐴𝑒 −𝑡 cos(𝑡 + ∅)
Slower!
12
Transient Response
E.g., Underdamped Second Order System
Poles
𝑋(𝑠) 𝜔𝑛2 𝑠 = −𝜁𝜔𝑛 ± 𝑗𝜔𝑛 1 − 𝜁 2 ,
= 2 2, 𝜁<1 Transient
𝐹(𝑠) 𝑠 + 2𝜁𝜔𝑛 𝑠 + 𝜔𝑛 𝐴𝑒 −𝜁𝜔𝑛 𝑡 cos(𝜔𝑛 1 − 𝜁 2 𝑡 + ∅)
Im Step Response
𝜁𝜔𝑛 𝜋𝜁
−
%OS = 𝑒 1−𝜁 2
𝜔𝑛
𝜔𝑛 1 − 𝜁2 𝛽
Re
4
cos 𝛽 = 𝜁 𝑡𝑠 =
𝜁𝜔𝑛 steady-state
value
s-plane
13
Closed-Loop System
R(s) + E(s) C(s)
Gc(s) P(s)
-
Controller
Plant
Objective: Design GC(s) to achieve the desired steady-
state errors and poles for closed-loop transfer function
Specifically in this lecture To make c(t) stable and control its
1. Steady-state error
2. Transient response
14
Physical System
R(s) + E(s) C(s)
Gc(s) P(s)
-
Controller
Plant
Software
Programming
15
Microcontroller
D(s)
R(s) +
C(s)
+
-
Controller + Plant
System Types
16
Unity feedback systems
R(s) + E(s) G (s) P(s)
C(s)
c
-
Simplify R(s)+ E(s) C(s)
G(s)
- C(s)
G(s): Open-loop Transfer Function
𝐸 = 𝑅 − 𝐶,
𝐶 = 𝐺𝐸 → 𝐶 = 𝐺 𝑅 − 𝐶 → 𝐶 1 + 𝐺 = 𝐺𝑅
𝐶 𝐺
= 17
𝑅 (1 + 𝐺)
System Type
G(s): Open-loop transfer function for unity feedback system
K (Ta s + 1)(Tb s + 1) (Tm s + 1)
G (s) =
s N (T1s + 1)(T2 s + 1) (T s + 1)
p
G(s) is Type N system, System Type = power of “s” in denominator
where N can be 0, 1, 2, etc..
steady-state error (desirable)
make closed-loop
system
N stability (undesirable)
N is a trade off between steady-state
error and stability
18
Steady-State Error
R(s)+ E(s) C(s) 𝐶 𝐺
G(s)
- Transfer function: 𝑅 = (1 + 𝐺) ,
𝐶 𝐺
𝐸 =𝑅−𝐶 → 𝐸 =𝑅− 𝑅 → 𝐸 =𝑅 1−
𝑅 1+𝐺
𝑅
𝐸(𝑠) =
(1 + 𝐺)
Compute steady-state error ess via final value theorem:
ess = lim e(t ) = lim sE ( s )
t → s →0
sR( s )
= lim
s →0 1 + G ( s ) 19
Step Input ess
𝑠𝑅
General formula: 𝑒𝑠𝑠 = lim
s→0 (1 + 𝐺)
1 s 1 1
For step input: 𝑅 = → ess = lim ∙ =
s s→0 1 + 𝐺 𝑠 1 + 𝐺(𝑠 = 0)
We define Kp to be static position error constant, such that
𝐾𝑝 = lim 𝐺 𝑠 = 𝐺(𝑠 = 0)
𝑠→0
Using this definition, the step input ess can be expressed as:
1
ess =
1+ K p 20
Kp vs System Types
For type 0 systems
K (Ta s + 1)(Tb s + 1)
K p = lim =K
s →0 (T1s + 1)(T2 s + 1)
1 1
→ 𝑒𝑠𝑠 = =
1 + 𝐾𝑝 1 + 𝐾 (Non-zero error)
For type 1 or higher systems
K (Ta s + 1)(Tb s + 1)
K p = lim N → , for N 1
s →0 s (T s + 1)(T s + 1)
1 2
1
𝑒𝑠𝑠 = → 𝑒𝑠𝑠 = 0
1 + 𝐾𝑝
(steady-state error eliminated) 21
Observation (I)
For step inputs, the steady-state error ess:
1. Type 0 systems
1
ess = ( Non-zero value)
1+ K
2. Type 1 or higher systems
ess = 0 (steady-state error
eliminated)
Require at least one integrator in forward path
22
Ramp Input ess
𝑠𝑅
General formula: 𝑒𝑠𝑠 = lim
s→0 (1 + 𝐺)
1 s 1 1
For ramp input: 𝑅 = 2 → ess = lim ∙ 2=
s s→0 1 + 𝐺 𝑠 lim𝑠𝐺
s→0
We define Kv to be static velocity error constant, such that
K v = lim sG( s )
s→0
Using this definition, the ramp input ess can be expressed as:
1
ess =
Kv
23
Kv vs System Types
For type 0 systems
sK (Ta s + 1)(Tb s + 1) 1
K v = lim = 0 → 𝑒𝑠𝑠 = → ∞ (can’t follow input)
s →0 (T1s + 1)(T2 s + 1) 𝐾𝑣
For type 1 systems
sK (Ta s + 1)(Tb s + 1) 1
K v = lim =K → 𝑒𝑠𝑠 = (non-zero error)
s →0 s (T1s + 1)(T2 s + 1) 𝐾
For type 2 and higher systems
sK (Ta s + 1)(Tb s + 1)
K v = lim N → , for N 2 → 𝑒𝑠𝑠 = 0
s →0 s (T s + 1)(T s + 1)
1 2
(steady-state error eliminated)
24
Observation (II)
For ramp inputs, the steady-state error ess:
1. Type 0 systems:
𝑒𝑠𝑠 → ∞ (can’t follow ramp input)
2. Type 1 systems
1
𝑒𝑠𝑠 = (non-zero value)
𝐾𝑣
3. Type 2 or higher systems
𝑒𝑠𝑠 = 0 (steady-state error eliminated)
25
Unit Parabolic Input ess
𝑠𝑅
General formula: 𝑒𝑠𝑠 = lim
s→0 (1 + 𝐺)
1 s 1 1
Parabolic input: 𝑅 = 3 → ess = lim ∙ 3=
s s→0 1 + 𝐺 𝑠 lim𝑠 2 𝐺
s→0
We define Ka to be static acceleration error constant:
K a = lim s G ( s )
2
s →0
Using this definition, the parabolic input ess can be expressed as:
1
ess =
Ka 26
Ka vs System Types
For type 0 systems:
s 2 K (Ta s + 1)(Tb s + 1)
K a = lim =0
s →0 (T1s + 1)(T2 s + 1)
1
→ 𝑒𝑠𝑠 = →∞ (can’t follow input)
𝐾𝑎
For type 1 systems
s K (Ta s + 1)(Tb s + 1)
2
K a = lim =0
s →0 s (T1s + 1)(T2 s + 1)
1
→ 𝑒𝑠𝑠 = →∞ (can’t follow input)
𝐾𝑎
27
Ka vs System Types
For type 2 systems:
s K (Ta s + 1)(Tb s + 1)
2
K a = lim 2 =K
s→0 s (T s + 1)(T s + 1)
1 2
1
→ 𝑒𝑠𝑠 = (non-zero error)
𝐾
For type 3 or higher systems
s 2 K (Ta s + 1)(Tb s + 1)
K a = lim N → , for N 3
s →0 s (T s + 1)(T s + 1)
1 2
1
→ 𝑒𝑠𝑠 = = 0 (steady-state error eliminated)
𝐾𝑎 28
Observation (III)
For parabolic inputs, the steady-state error ess:
1. Type 0 and 1 systems:
𝑒𝑠𝑠 → ∞ (can’t follow parabolic input)
2. Type 2 systems
1
𝑒𝑠𝑠 = (non-zero value)
𝐾𝑎
3. Type 3 or higher systems
𝑒𝑠𝑠 = 0 (steady-state error eliminated)
29
Parabolic response of Type 2
30
Summary
Input “level”
System Steady-state Error (ess)
Types Unit Step input Unit Ramp input Unit Parabolic input
1
System “level”
Type 0 ∞ ∞
1 + 𝐾𝑝
1
Type 1 0 ∞
𝐾𝑣
1
Type 2 0 0
𝐾𝑎
Type 3 0 0 0
Input “Level” higher than System “level” 𝑒𝑠𝑠 → ∞
Input “Level” equal to System “level” 𝑒𝑠𝑠 is non-zero
Input “Level” lower than System “level” 𝑒𝑠𝑠 = 0
31
Discussion
▪ Steady-state errors are related to Kp, Kv, and Ka
▪ Increasing system type requires an integrator in the
forward path but this will have destabilizing effect
▪ Designing a stable system with more than two
integrators in the forward path is generally difficult
32
Acknowledgement
Professor Cuong Professor Tegoeh
33