Professional Documents
Culture Documents
Control Systems
2018 Fall at NTUEE
• Grade distribution
Simple quizzes (30%)
• Up to fifteen times per semester (basically after every lecture)
• Pick top 3~12 for averaging
Midterm Exam (30%)
• Nov. 9th
• Covering everything up to week 8
• A little bit challenging (expected mean score = 65/100)
• Open book, close internet/laptop
Competitions (40%)
• Two competitions per semester (15% ea) plus final presentation (10%)
• Rules
#1: Let me know in advance if any help is needed.
#2: A written statement is required when you are trying to argue your scores.
#3: Arguing scores results in auditing the entire work.
Grade
15%
10%
5%
0% Control Cost
u P y
u P y ?
• “Controller” – C
• Desired reference(s) – r
• System output(s) – y (optional)
• System input(s) – u
r + C u
-
y
(optional)
r +
-
C u
?
y
min 𝑒 = min(𝑟 − 𝑦)
𝑢 𝑢
• Stability
Will the error e converge?
• Performance
How fast the transient response would disappear?
How large the steady state error e would be?
• Robustness
Will the disturbances affect the desired performance/stability?
• Optimality
Can we save the energy of input u?
• Adaptability
Can we learn to play?
https://danielpiedrahita.wordpress.com/portfolio/cart-pole-control/
https://www.youtube.com/watch?v=z9IV1GNkyyo&feature=youtu.be
https://truewestmagazine.com/road-trip/
https://www.youtube.com/watch?v=B8R148hFxPw&t=154s
𝑢(𝑡), 𝑦(𝑡) ∈ ℝ
𝑢1 (𝑡) → 𝑦1 (𝑡), 𝑢2 (𝑡) → 𝑦2 (𝑡) ⇒ 𝑎𝑢1 (𝑡) + 𝑏𝑢2 (𝑡) → 𝑎𝑦1 (𝑡) + 𝑏𝑦2 (𝑡)
𝑢(𝑡) → 𝑦(𝑡) ⇒ 𝑢(𝑡 − 𝜏) → 𝑦(𝑡 − 𝜏)
u + u
r C P y r C P y
-
min(𝑟 − 𝑦) min(𝑟 − 𝑦)
𝑢 𝑢
1
𝐶= 𝐶→∞
𝑃
• Performance
Transient response
Steady state error
• Stability
Pole/Zeros map
Root locus
Nyquist/Bode plot
• Robustness
Gain/Phase margin
Small gain theory
• Optimality (see Optimal Control, Convex Optimization…)
• Adaptability (see Adaptive Control/Filtering…)
• Hardware setup
• Modeling
• Control design
• Tuning
研
究 系統理論
所 (高等)線性系統、非線性系統、離散事件系統、混合系統…
𝑢 = arcmin(𝑟 − 𝑦)
𝑢
Laplace
Principles
Physical Transform Transfer
ODE
System Function
Parameters
Physical Transfer
System Function
Experiments and I/O data post processing
Laplace
Principles
Physical Transform Transfer
ODE
System Function
Parameters
i+ = i- = 0
Op-amp
v+ = v - = 0
The algebraic sum of currents leaving a junction or node equals the algebraic
sum of currents entering that node.
The algebraic sum of all voltages taken around a closed path in a circuit is zero.
• Newton’s Law
𝑭 = 𝒎𝒙ሷ
𝑚
[𝑁 = 𝑘𝑔 ∙ ]
𝑠2
𝑴 = 𝑰𝜽ሷ
𝑟𝑎𝑑
[𝑁 ∙ 𝑚 = (𝑘𝑔 ∙ 𝑚2 ) ∙ ]
𝑠2
= 𝑏𝑤
𝜕𝑓
𝑓 𝑥 = 𝑓 𝑥𝑠 + ቤ 𝑥 − 𝑥𝑠 + ℎ𝑖𝑔ℎ 𝑜𝑟𝑑𝑒𝑟 𝑡𝑒𝑟𝑚𝑠
𝜕𝑥 𝑥
𝑠
𝜕𝑓
⇒ 𝑓 𝑥 ≅ 𝑓 𝑥𝑠 + ቤ 𝑥 − 𝑥𝑠
𝜕𝑥 𝑥
𝑠
𝑓 𝑥
𝑥
𝑥𝑠
2018/9/12 NASA Lab - NTUEE 42
Example – Pendulum with Torque Input
P(s)
P
𝑔 𝜕𝑓
𝑓 𝜃 = 𝑠𝑖𝑛𝜃 ≅ 𝑓 𝜃𝑠 + ቤ 𝜃 − 𝜃𝑠
𝑙 𝜕𝜃 𝜃
𝑠
(𝜃𝑠 = 0)
(𝜃𝑠 = 𝜋)
Laplace
Principles
Physical Transform Transfer
ODE
System Function
Parameters
𝑌(s)
𝑃 𝑠 =
𝑈(s)
• Transfer function P(s) is the Laplace Transform of the system P’s impulse response p(t)
• Impulse response: the output y(t) when u(t) is a unit impulse
For any input u(t), the output y(t) would equal the convolution of p(t) and u(t)
𝑦 𝑡 = 𝑢(𝑡) ⊗ 𝑝(𝑡)
• FVT
• Proof:
• IVT
• Proof:
https://en.wikipedia.org/wiki/Laplace_transform
1 V4
3
V3
2 V2
KCL:
• LTI systems
Linearity
𝑢1 (𝑡) → 𝑦1 (𝑡), 𝑢2 (𝑡) → 𝑦2 (𝑡) ⇒ 𝑎𝑢1 (𝑡) + 𝑏𝑢2 (𝑡) → 𝑎𝑦1 (𝑡) + 𝑏𝑦2 (𝑡)
Time Invariance
𝑝 𝑡 = ℒ −1 {𝑃 𝑠 }
For any input u(t), the output y(t) would equal the convolution of p(t) and u(t)
𝑦 𝑡 =𝑝 𝑡 ⊗𝑢 𝑡 =ℒ −1 {𝑃 𝑠 𝑈(𝑠)}
• Series • Parallel
P1 P2 Pn P1
P P2
𝑃(𝑠) = ෑ 𝑃𝑖 (𝑠)
Pn
𝑖=1
𝑃(𝑠) = 𝑃𝑖 (𝑠)
𝑖=1
+ u
r C P y
-
H
𝑌(𝑠) 𝐶(𝑠)𝑃(𝑠)
𝐻 𝑠 = =
𝑅(𝑠) 1 + 𝐶(𝑠)𝑃(𝑠)
• TF form
• ZPK form
Why?
1
𝐻 𝑠 =
𝑠+1
Forced response
Natural response
• ODE
Complete solution = homogeneous solution + particular solution
• Control system
Complete response = Natural response (zero input) + forced response (zero state)
Natural response depends on the system’s pole location
Forced response depends on the system’s input u(t)
σ=1
= 0.37
• Impulse response
• For
• We have
• Example
add a zero
at -1.1
• Example
(𝑠 2 + 4) 1
𝑃 𝑠 = U 𝑠 =
(𝑠 + 1)(𝑠 + 5) (𝑠 2 + 4)
1
⇒ Y s = P(s)U 𝑠 =
(𝑠 + 1)(𝑠 + 5)
(input mode is filtered)
H0(s) Hd(s)
Original response Differentiation of
w/o adding zero original response
• Complete response = Natural response (zero input) + forced response (zero state)
𝑢 = 𝑎𝑟𝑐min(𝑟 − 𝑦)
𝑢
• Stability
Will the error e=r-y converge?
• Performance
How fast the transient response would disappear?
How large the steady state error e would be?
• Robustness
Will the disturbances affect the desired performance/stability?
• Optimality
Can we save the energy of input u?
• Adaptability
Can we learn to play?
𝑝 𝑡 = ℒ −1 {𝑃 𝑠 }
For any input u(t), the output y(t) would equal the convolution of p(t) and u(t)
𝑦 𝑡 =𝑝 𝑡 ⊗𝑢 𝑡 =ℒ −1 {𝑃 𝑠 𝑈(𝑠)}
• Stability is everything.
• One of the definitions of stability for LTI systems
P(s) is stable if p(t)0 as t∞
P(s) is neutrally stable (marginally stable) if |p(t)| < M, p(t)↛0 as t∞
P(s) is unstable if |p(t)| ∞ as t∞
p(t)
p(t)
p(t)
• P.S. Stability of nonlinear and time-varying systems is complicated
• https://www.youtube.com/watch?v=R4V6ByEIWt4
Why?
(Complex poles)
• Control spec: Stabilize the 3-rd order system by applying a P-controller (constant gain K)
106
P-Controller Design Using Ruth Stability Criteria
107
PI-Controller Design Using Routh Stability Criteria
• Control spec:
Remove the steady-state error of tracking a step function by applying a PI-controller.
Make sure the closed-loop system is stable.
• P.S. PI-controller removes the steady-state error of tracking a step function, but creates stability
issue simultaneously. We will discuss the steady-state error and PID controller design later.
• Stability is everything.
𝑢 = arcmin(𝑟 − 𝑦)
𝑢
• Stability
Will the error e converge? Check the system’s pole locations.
• Performance
How fast the transient response would disappear?
How large the steady state error e would be?
• Robustness
Will the disturbances affect the desired performance/stability?
• Optimality
Can we save the energy of input u?
• Adaptability
Can we learn to play?
𝑃(𝑠)
𝑝 𝑡 = ℒ −1 {𝑃 𝑠 }
For any input u(t), the output y(t) would equal the convolution of p(t) and u(t)
𝑦 𝑡 =𝑝 𝑡 ⊗𝑢 𝑡 =ℒ −1 {𝑃 𝑠 𝑈(𝑠)}
Problem: How to generate an impulse input in reality?
𝑃(𝑠)
• Step response
The system P(s)’s output when presented with a unity step as the input.
Integration of impulse response since t = 0
Feasible and common
𝑃(𝑠)
𝑃(𝑠)
(ln 𝑀𝑝 )2
𝜁=
𝜋 2 + (ln 𝑀𝑝 )2
• Control spec:
Settling time less than ts (sec)
(ln 𝑀𝑝 )2
𝜁≥
𝜋 2 + (ln 𝑀𝑝 )2
𝛽 = 𝑠𝑖𝑛−1 𝜁
• Control spec:
• The dominant modes (poles) is usually 5~10 times less than the other modes (poles)
• Since the other modes decay faster than the dominant modes, we can ignore them
• Example:
20
𝑃 𝑠 = ⇒ 𝑝𝑜𝑙𝑒𝑠 𝑎𝑡 − 10, −1 ± 𝑗
(𝑠 + 10)(𝑠 2 + 2𝑠 + 2)
20
= 𝑠
10( + 1)(𝑠 2 + 2𝑠 + 𝑠)
10
20 2 1
≅ = ⇒𝜁≅ , 𝑤𝑛 ≅ 2
10(𝑠 2 + 2𝑠 + 2) 𝑠 2 + 2𝑠 + 2 2
⇒ 𝑡𝑟 ≅ 1.27𝑠, 𝑡𝑠 ≅ 4.6𝑠 , 𝑀𝑝 ≅ 5%
• There are lots of approximation in control engineering. This necessitates design fine tuning when
implementation.
• MATLAB is our good friend
C(s) P(s)
C(s) P(s)
• BIBO stability
[u(t), y(t)] converge to zero when [r(t), w(t), v(t)] are impulses
• Tracking
y(t) follows r(t)
• Regulation
Keep y(t) near a constant setpoint r (e.g. zero) in the presence of w(t) and v(t)
• Control effort
Keep u(t) small (Do not exceed the actuator’s capacity)
e(t) u(t)
r(t) y(t)
500(𝑠 − 5) 1000(𝑠 − 5)
C 𝑠 = ⇒𝑌 𝑠 =P 𝑠 C 𝑠 𝑅 𝑠 = 𝑅 𝑠
𝑠 + 1000 (𝑠 − 5.0001)(𝑠 + 1000)
e
C(s) P(s)
• Stability
Char. Equation: 1 + 𝑃 𝑠 𝐶 𝑠 =0
⇒ Design C(s) to ensure closed-loop poles at LHP
• Performance
𝟏 𝑷 𝑪 𝑷𝑪
𝟏 + 𝑷𝑪 𝟏 + 𝑷𝑪 𝟏 + 𝑷𝑪 𝟏 + 𝑷𝑪
Tracking Regulation Ctrl Effort Reg/Ctrl
(E/R) (E/W) (U/R) (E/V, U/W)
Design trade-off
P(s) C(s)
PC
PC
C
PC
Transient response
+ e u
r C P y
-
Closed-loop system H(s)
𝑢 = arcmin(𝑟 − 𝑦)
𝑢
• Stability
Will the error e converge? Check the system’s pole locations.
• Performance
How fast the transient response would disappear?
How large the steady state error e would be?
• Robustness
Will the disturbances affect the desired performance/stability?
• Optimality
Can we save the energy of input u?
• Adaptability
Can we learn to play?
• Closed-loop steady state error can be analyzed and predicted by the open-loop plant model P(s)
and controller C(s)
• Closed-loop steady state error can be analyzed and predicted by the open-loop plant model P(s)
and controller C(s)
• Closed-loop steady state error can be analyzed and predicted by the open-loop plant model P(s)
and controller C(s)
• Closed-loop steady state error can be analyzed and predicted by the open-loop plant model P(s)
and controller C(s)
𝟏
𝑳 𝒔 =𝑷 𝒔 𝑪 𝒔 𝑬 𝒔 =
𝟏 + 𝑳(𝒔)
𝐿(𝑠)
(Steady state error of H s = )
1+𝐿(𝑠)
• How? By looking at the “system type” of L(s). (P.S. L(s) is also called “loop gain”)
PC
PC
PC
1 𝑘
Ex: 𝑷 𝒔 = 𝑠+1 𝑪(𝐬) = 𝑠
PC
• FVT
• The “Table of Steady State Error” is derived from FVT. Memorizing the table is not recommended.
If k=0 (L is type 0)
lim 𝑒 𝑡 → ∞
𝑡⟶∞
If k=1 (L is type 1)
𝑏(0) 1
lim 𝑒 𝑡 = ≜
𝑡⟶∞ 𝑎(0) 𝐾𝑣
If k>=2 (L at least type 2)
lim 𝑒 𝑡 = 0
𝑡⟶∞
2018/9/12 NASA Lab - NTUEE 155
Internal Model Principle
Asymptotic regulation w.r.t. an external signal is achieved by place the dynamics of the signal
in the feedback path between the input and output to be regulated.
• Translation: If we wanna track a ramp, make sure the “ramp” is included in our loop gain L(s)
• Example:
By applying an I-controller, type 0 plant can track a step without steady state error.
Type 1 plant (including one integrator / one pole at origin) itself can track a step without steady
state error. However, there is a non-zero steady state error when it tracks a ramp.
• To further eliminate the steady state error when it tracks a ramp, apply an I-controller.
Type 2 plant (including double integrators / two poles at origin) itself can track a ramp without
steady state error.
Notch filters
𝑢 = arcmin(𝑟 − 𝑦)
𝑢
• Stability
Will the error e converge? Check the system’s pole locations.
• Performance
How fast the transient response would disappear?
How large the steady state error e would be?
• Robustness
Will the disturbances affect the desired performance/stability?
• Optimality
Can we save the energy of input u?
• Adaptability
Can we learn to play?
• Closed-loop steady state error can be analyzed and predicted by the open-loop plant model P(s)
and controller C(s)
• The “Table of Steady State Error” is derived from FVT. Memorizing the table is not recommended.
+ e u
r C P y
-
Closed-loop System H(s)
Controller C(s)
PID, lead-lag, state observer feedback…
implemented on a digital computer or an analog circuit
𝐾𝐼
𝐶 𝑠 = 𝐾𝑃 + + 𝐾𝐷 𝑠
𝑠
𝑢 𝑡 = 𝐾𝑃 𝑒 𝑡 + 𝐾𝐼 න 𝑒 𝑡 𝑑𝑡 + 𝐾𝐷 𝑒(𝑡)
ሶ
0
• PID control
KP – Proportional: Faster response
KI – Integral: Better steady state response
KD – Derivative: Faster convergence
𝑃 1 −𝑐 ± 𝑐 2 − 4𝑚𝑘෨
𝐻= = ⇒ Poles at
1 + 𝑃𝐶 𝑚𝑠 2 + 𝑐𝑠 + (𝑘 + 𝐾𝑃 ) 2𝑚
𝑘෨
• Tuning KP
𝑐ǁ
• Tuning KD
C(s)
In general,
PD controller offers
Good transient.
• Tuning KI
C(s)
https://en.wikipedia.org/wiki/PID_controller
2018/9/12 NASA Lab - NTUEE 171
PID Tuning
https://en.wikipedia.org/wiki/PID_controller
2018/9/12 NASA Lab - NTUEE 172
PID Tuning
https://www.youtube.com/watch?v=fusr9eTceEo
r u y
Plant
• Discretization and approximation when Δt is sufficiently small (details will be covered in Digital Control)
Integral action:
Derivative action:
• Pseudo code
t ∞ t ∞
r=y r=y
e=0 e=0
𝑡
𝑢 𝑡 = 𝐾𝑃 𝑒 𝑡 + 𝐾𝐼 න 𝑒 𝑡 𝑑𝑡 + 𝐾𝐷 𝑒(𝑡)
ሶ
0
∞
⇒ 𝑢 ∞ = 𝐾𝐼 න 𝑒 𝑡 𝑑𝑡 = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡
0
reference
Gravity compensation
by integral action
Gravity
https://www.youtube.com/watch?v=w-J5NQDE7Co
• Lots of Calculation
• The “trajectories” of the closed-loop poles due to the changing of a constant control gain can be
directly derived by analyzing the open-loop system
• The “trajectories” of the closed-loop poles due to the changing of a constant control gain can be
directly derived by analyzing the open-loop system
• The “trajectories” of the closed-loop poles due to the changing of a constant control gain can be
directly derived by analyzing the open-loop system
• The “trajectories” of the closed-loop poles due to the changing of a constant control gain can be
directly derived by analyzing the open-loop system
𝐿(𝑠)
⇒𝑠+𝐾+𝑃 𝑠 =0
1
⇒1+𝐾 =0 ⇒ How do the roots move as K changes?
𝑠 + 𝑃(𝑠)
𝐿(𝑠)
• Problem formulation
Given L(s), plot the roots of 1+KL(s) on the complex plane as K:0∞
• The resulting trajectories are called the “root locus”
P.S. L(s) represents the open-loop plant excluding the control gain K. Here it is not the loop
gain we referred previously.
• MATLAB
rlocus(L)
• Hand sketching
This is why students hate control theory
Accurate hand drawing is not required, but knowing how to roughly sketch the root locus is
helpful in control design.
• For example, sometimes P-controllers cannot stabilize an open-loop unstable system.
Root locus will show us this property without any calculation.
G F E D CB A
∵𝑠→∞
∵ (1 − 𝑥)𝑛 ≅ 1 − 𝑛𝑥
-1
• Example
𝑑 𝑑𝐿(𝑠)
⟹ 1 + 𝐾𝐿 𝑠 ቤ = ቤ =0
𝑠 𝑠=𝜎
𝑠 𝑠=𝜎
𝑠+2
𝐿 𝑠 =
𝑠 2 + 2𝑠 + 2
𝑑𝐿(𝑠) 2𝑠 + 2 𝑠 + 2 − (𝑠 2 + 2𝑠 + 2)
=
𝑠 (𝑠 2 + 2𝑠 + 2)2
𝑠 2 + 4𝑠 + 2
= 2
(𝑠 + 2𝑠 + 2)2
𝑑𝐿(𝑠)
Let =0 ⇒ 𝑠 = −0.586, −3.414
𝑠
K<0 K>0
overshoot Mp = 5%
1 + 𝐾𝐿 𝑠 ቚ
𝑠=−1+𝑗
𝐾
=1+ ቤ
𝑠(𝑠 + 2) 𝑠=−1+𝑗
=0
⟹𝐾=2
• This case shows that P-controller won’t have stability issue on a second order system
• Larger K introduces bigger overshoot
• Open-loop pole at origin steady state error for step response = 0
overshoot Mp = 5%
C(s) P(s)
P(s)
C(s)
C(s)
C(s)
C(s)
C(s)
C(s)
C(s)
C(s) C(s)
Pick this
2018/9/12 NASA Lab - NTUEE 214
Lead Compensator
C(s)
C(s) C(s)
C(s)
C(s)
• Accurate hand drawing (of root locus) is not required, but knowing how to roughly sketch the root
locus is helpful in control design.
unity amplitude
𝑢 𝑡 = 𝑠𝑖𝑛 𝑤0 𝑡 1(𝑡)
𝑤0
𝑈 𝑠 =
𝑠 2 + 𝑤02
𝑤0
𝑌 𝑠 = 𝐺(𝑠)
𝑠 2 + 𝑤02
−1
Im 𝛼0
Disappear if G(s) is stable Magnitude Phase 𝜙 = tan ( )
Re 𝛼0
Same frequency as u(t)
• In steady state
𝑦 𝑡 = 2|𝛼0 |𝑠𝑖𝑛(𝑤0 𝑡 + 𝜙)
• Frequency response: “If a sine wave is injected into a system at a given frequency, a linear system
will respond at that same frequency with a certain magnitude and a certain phase angle relative to
the input.”
• Frequency response: “If a sine wave is injected into a system at a given frequency, a linear system
will respond at that same frequency with a certain magnitude and a certain phase angle relative to
the input.”
• Frequency response: “If a sine wave is injected into a system at a given frequency, a linear system
will respond at that same frequency with a certain magnitude and a certain phase angle relative to
the input.”
• Frequency response: “If a sine wave is injected into a system at a given frequency, a linear system
will respond at that same frequency with a certain magnitude and a certain phase angle relative to
the input.”
𝑢 𝑡 = 𝐴𝑠𝑖𝑛 𝑤0 𝑡 + 𝜃
G(s)
• Presenting the frequency response with regard to varying frequency components (w:0∞)
Bode plot
• Plotting magnitude and phase separately
Nyquist plot
• Plotting magnitude and phase jointly on the complex plane
• Why not just pick one?
Slope = +20dB
log scale
Slope = -20dB
log scale
Slope = -40dB
• Relative degree
• Low freq. behavior (DC gain)
• Number of poles, zeroes (expert level)
|L(jw)|
Minimum phase
Non-minimum phase
(RHP zero)
• Definition
𝐸 𝑠 1
𝑆≜ =
𝑅 𝑠 1 + 𝐿(𝑠)
• Example
• Some tips
1. L(-jw) = L(jw), therefore w:0∞ is symmetric to w:0-∞
2. The Nyquist plot must be continuous and smooth.
3. L(j∞) = 0 if n = # of pole > m = # of zero
4. Depart angle at w0 = -90*(System Type)
5. Arrival angle at w∞ = -90*(n-m)
6. Little skill
1 1 −𝑗𝜙
= 𝑒
𝑟𝑒 𝑗𝜙 𝑟
Im{L(jw)}
𝟏
𝒓=
𝜿
𝜽 = −𝜷
ς 𝜿𝒛
𝒓=
ς 𝜿𝒑
𝜽 = 𝜷𝒛 − 𝜷𝒑
• P.S. The Nyquist path must not touch any pole and zero
If there are poles or zeros on the imaginary axis, reroute the path around them with a small
radius
G(s)
• Robustness analysis
We hope our control design is robust to
1. Gain variation in the open-loop
2. Time delay in the open-loop
The stability and robustness of the closed-loop system can be directly derived by analyzing
the Nyquist plot of the (minimum-phase) loop gain
• The stability and robustness of the closed-loop system can be directly derived by analyzing the
Nyquist plot of the loop gain
• The stability and robustness of the closed-loop system can be directly derived by analyzing the
Nyquist plot of the loop gain
• The stability and robustness of the closed-loop system can be directly derived by analyzing the
Nyquist plot of the loop gain
𝐿(𝑠)
𝑳 𝒔 =𝑷 𝒔 𝑪 𝒔 Stability and robustness of
1+𝐿(𝑠)
Loop gain
𝑢 = arcmin(𝑟 − 𝑦)
𝑢
• Stability
Will the error e converge? Check the system’s pole locations.
• Performance
How fast the transient response would disappear?
How large the steady state error e would be?
• Robustness
Will the disturbances affect the desired performance/stability?
• Optimality
Can we save the energy of input u?
• Adaptability
Can we learn to play?
+ e u
r C P y
-
Closed-loop System H(s)
Controller C(s)
PID, lead-lag, state observer feedback…
designed based on the model P(s)
• Problem formulation
Nominal case: 𝜂 = 1, 𝜃 = 0. The closed-loop system is stable
Perturbed case: : 𝜂 ≠ 1, 𝜃 ≠ 0. Is the closed-loop system still stable?
+ e u
r C 𝜼𝒆−𝒋𝜽 P y
-
Actual plant
2018/9/12 NASA Lab - NTUEE 270
Nyquist Stability Criterion
• Assume the nominal closed-loop system (with loop gain 𝐿(𝑗𝑤)) is stable.
When the Nyquist plot of 𝜂𝑒 −𝑗𝜃 𝐿(𝑗𝑤) touches -1, the closed-loop system becomes marginally
stable.
−𝑗𝜃 𝜂𝑒 −𝑗𝜃 𝐿 𝑗𝑤
=1
1 + 𝜂𝑒 𝐿 𝑗𝑤 = 0 ⟺ ൝
∠𝜂𝑒 −𝑗𝜃 𝐿 𝑗𝑤 = −180°
−𝜼𝜶
−𝜶
−𝜼𝜶
𝟏
⇒ 𝐆𝐌 ≜
𝜶
𝜽 < 𝝓 ⇒ 𝐏𝐌 ≜ 𝝓
Phase
Crossover
Frequency
Gain
Crossover
Frequency
⇒ L(s) has
Closed-Loop System
STABLE GM < 1
⇍ PM > 0
𝑤𝑛2 𝐻 𝑠 𝑤𝑛2
𝐻 𝑠 = 2 2 ⟹ 𝐿 𝑠 = 1 − 𝐻 𝑠 = 𝑠(𝑠 + 2𝜁𝑤 )
𝑠 + 2𝜁𝑤𝑛 𝑠 + 𝑤𝑛 𝑛
⟹ 𝟎. 𝟓 < 𝝃 < 𝟏
H(j𝜔)
H(j𝜔)
H(j𝜔)
H(jw)
H(j𝜔𝐵𝑊 )
H(j𝜔)
H(jw)
|H(jw)|
|C| |C|
∠C ∠C
C(s)
PD
|C|
Lead
C(s) P(s)
C P
C(s)
C s = C(s) ෨
PC෨
PC
P
PC෨
PC PC
PC෨
P
1
P s =
s(s + 1)
• Design specification PC
kP
Steady state error < 0.1 for a unit-ramp
input kv > 10
Overshoot < 25% PM=45 °
• Choose
s
k = 10 +1
⟹ C s = 10 2
s
wz=2, wp=10 +1
10
1
P s =
s(s + 1)
PC
• Design specification kP
Steady state error < 0.1 for a unit-ramp
input kv > 10
Overshoot < 25% PM=45 °
• Choose
K=10 with wc=3, PM=20 °
For z=0.1, p=0.01, we have PM=50 °
s
+1
⟹ C s = 10 s 0.1
+1
0.01
Stabilization is achieved by keeping wc
to the region with favorable phase
characteristics
𝑢 = arcmin(𝑟 − 𝑦)
𝑢
• Stability
Will the error e converge? Check the system’s pole locations.
• Performance
How fast the transient response would disappear?
How large the steady state error e would be?
• Robustness
Will the disturbances affect the desired performance/stability?
• Optimality
Can we save the energy of input u?
• Adaptability
Can we learn to play?
• It’s okay in this class as long as your control design achieves the specifications
• Transfer functions
𝑌(𝑠)
𝑃 𝑠 =
𝑈(𝑠)
• State-space models
ሶ
𝒙(𝑡) = 𝐴𝒙(𝑡) + 𝐵𝑢(𝑡)
𝑦(𝑡) = 𝐶𝒙(𝑡) + 𝐷𝑢(𝑡)
• Loudspeaker example
• State-space representation
ሶ
𝒙(𝑡) = 𝐴𝒙(𝑡) + 𝐵𝑢(𝑡) 𝒙(𝑡) ≜ [𝑦 𝑦ሶ 𝑖]𝑇
𝑦(𝑡) = 𝐶𝒙(𝑡) + 𝐷𝑢(𝑡)
0 1 0 0
𝐴= 0 −𝑏/𝑀 0.63/𝑀 𝐵= 0 𝐶= 1 0 0 𝐷=0
0 −0.63/𝐿 −𝑅/𝐿 1/𝐿
ሶ
𝒙(𝑡) = 𝐴𝒙(𝑡) + 𝐵𝑢(𝑡)
𝑦(𝑡) = 𝐶𝒙(𝑡) + 𝐷𝑢(𝑡)
𝐴= 𝐵=
𝐶𝐶 = 𝐷=0
𝑌(𝑠)
𝑃 𝑠 =
𝑈(𝑠)
ሶ
𝒙(𝑡) = 𝐴𝒙(𝑡) + 𝐵𝑢(𝑡)
𝑦(𝑡) = 𝐶𝒙(𝑡) + 𝐷𝑢(𝑡)
𝒛 𝑡 = 𝑇𝒙 𝑡 𝒛 𝑡 = 𝑇 −1 𝒙 𝑡
ሶ
𝒛(𝑡) = 𝑇𝐴𝑇 −1 𝒛(𝑡) + 𝑇𝐵𝑢(𝑡)
𝑦(𝑡) = 𝐶𝑇 −1 𝒛(𝑡) + 𝐷𝑢(𝑡)
• State-space model
ሶ
𝒙(𝑡) = 𝐴𝒙(𝑡) + 𝐵𝑢(𝑡)
𝑦(𝑡) = 𝐶𝒙(𝑡) + 𝐷𝑢(𝑡)
• Transfer function
𝑌(𝑠)
𝑃 𝑠 = = 𝐶(𝑠𝐈 − 𝐴)−1 𝐵 + 𝐷
𝑈(𝑠)
• Impulse response
𝑝 𝑡 = 𝐶𝑒 𝐴𝑡 𝐵 + 𝐷𝛿(𝑡)
matrix exponential
• State-space model
ሶ
𝒙(𝑡) = 𝐴𝒙(𝑡) + 𝐵𝑢(𝑡)
𝑦(𝑡) = 𝐶𝒙(𝑡) + 𝐷𝑢(𝑡)
𝑌(𝑠)
𝑃 𝑠 = = 𝐶(𝑠𝐈 − 𝐴)−1 𝐵 + 𝐷
𝑈(𝑠)
1
= Ψ
det(𝑠𝐼 − 𝐴)
characteristic eqn.
• Coming soon..
• Closed-loop system
ሶ
𝒙(𝑡) = 𝐴𝒙(𝑡) + 𝐵𝑢(𝑡)
r(t) = 0 for regulation
𝑢 𝑡 = 𝑟 𝑡 − 𝐾𝒙(𝑡) = −𝐾𝒙(𝑡)
𝒙ሶ 𝑡 = 𝐴𝒙 𝑡 − 𝐵𝐾𝒙(𝑡)
= (𝐴 − 𝐵𝐾)𝒙 𝑡
𝒙 𝑡 → 0 as 𝑡 → ∞
• We can freely “assign” desired pole locations through state feedback if (A,B) is controllable
• Example
0 1 0 𝑦
𝑚𝑦ሷ + 𝑏𝑦ሶ + 𝑘𝑦 = 𝑢 ⇒ 𝐴 = −𝑘 −𝑏ൗ , 𝐵 = 1ൗ , 𝒙 = 𝑦ሶ
ൗ𝑚 𝑚 𝑚
Let K = 𝑘1 𝑘2 , 𝑢 = −𝐾𝒙
𝑠 −1
det 𝑠𝐈 − 𝐴 + 𝐵𝐾 = det( 𝑘 + 𝑘2 𝑏 + 𝑘1 )
𝑠+
𝑚 𝑚
𝑏 + 𝑘1 𝑘 + 𝑘2
= 𝑠2 + s+
𝑚 𝑚
To place the closed-loop poles at −𝛼1 and −𝛼2
𝑏 + 𝑘1
= 𝛼1 + 𝛼2
𝑚 𝑘1 = 𝑚 𝛼1 + 𝛼2 − 𝑏
𝑘 + 𝑘2 ⇒
= 𝛼1 𝛼2 𝑘2 = 𝑚𝛼1 𝛼2 − 𝑘
𝑚
• Controllability matrix 𝒞
𝒞 = [𝐵 𝐴𝐵 𝐴2 𝐵 … 𝐴𝑛−1 𝐵]
• An uncontrollable example:
State-space model
Transfer function
• It’s not a good idea to randomly assign the locations of closed-loop poles to be far away from the
origin
Trade-off: convergence speed (performance) vs. control energy
Aggressive (fast) poles bring a large K, which may saturate the control authority
• Next question: are you able to measure all the states x(t)?
• We can freely “assign” desired pole locations through state feedback if (A,B) is controllable
• In most cases, the full states x(t) are not available (we cannot install that many sensors)
• State observer = prediction (by the plant model) + measurement (of the output)
prediction measurement
• The observer gain L may be chosen so that the eigenvalues of A-LC are any desired values if (A,C)
is observable.
• Observability matrix 𝒪
𝒪 = [𝐶 𝐶𝐴 𝐶𝐴2 … 𝐶𝐴𝑛−1 ]𝑇
• An unobservable example:
State-space model
Transfer function
• Separation principle – we can separately place the poles for state feedback and state observer
• K = place(A,B,poles)
• [K,~,~] = lqr(SYS,Q,R,N)
• L = place(A’,C’,poles)’
• [~,L,~,~] = kalman(SYS,Q,R)
• We always check what are the control specifications before designing the controller
Time-domain specifications
• Rise time – Tr
• Settling time – Ts
• Overshoot – Mp
• Steady state error
Frequency-domain specifications
• Phase margin – PM
• Gain margin – GM
• Bandwidth
• Based on the control specification and the open-loop system, we first select which type of controllers
will be used
P
PI
PD
PID
Lead
Lag
…
• We then make sure the closed-loop poles are in LHP and reach the desired specifications
Design methods
• Time-domain root locus
• Frequency-domain loop shaping
• Computer software can help control design, but not parameter tuning.
Tuning requires knowledge and experiences.