Multi-Variables Control (1)
Multi-Variables Control (1)
(Multi-variables Control)
AE3200 (II-2020/2021) 1
Multi-variable Control : Pole Placement
State Feedback
Controlled system
D
UC + u +
.
x x
+ y
B C
_ +
+
AE3200 (II-2020/2021) 2
State Feedback Control signal
K is a (m x n) matrix
m is the size of input vector
(number of column of B)
n is the size of state variable
vector
can be inserted in the feedback loop, giving the following closed loop system
𝑥̄̇ 𝑡 = 𝐴 − 𝐵𝐾 𝑥̄ 𝑡 + 𝐵𝑢̄ 𝑡
𝑎 𝑎 … 𝑎 𝑏 𝑎 −𝑏 𝑘 𝑎 −𝑏 𝑘 ⋯ 𝑎 −𝑏 𝑘
𝑎 ⋱ ⋮ 𝑏 𝑎 −𝑏 𝑘 ⋱ ⋮
𝐴 = 𝐴 − 𝐵𝐾 = ⋮ − 𝑘 𝑘 ⋯ 𝑘 =
⋮ ⋮
𝑎 … 𝑎 𝑏 𝑎 −𝑏 𝑘 ⋯ 𝑎 −𝑏 𝑘
Closed loop system characteristic:
𝑎 −𝑏 𝑘 𝑎 −𝑏 𝑘 ⋯ 𝑎 −𝑏 𝑘
𝑎 −𝑏 𝑘 ⋱ ⋮
det 𝑠𝐼 − 𝐴 = det 𝑠𝐼 − =𝑠 +𝑏 𝑠 + ⋯+ 𝑏 = 𝑠 − 𝑝 𝑠−𝑝 ⋯ 𝑠−𝑝 =0
⋮
𝑎 −𝑏 𝑘 ⋯ 𝑎 −𝑏 𝑘
AE3200 (II-2020/2021) 4
Suppose we want the closed loop system to have a particular dynamics
characteristic/behaviour, which is reflected by a pre-defined poles location:
𝑏 =𝑑
𝑏 =𝑑
⋮
𝑏 =𝑑
where bn-1, bn-2, …, b0 are functions of k1,k2,…,kn
AE3200 (II-2020/2021) 5
Example :
Poles :
2 0 −5 0
𝑥̄̇ 𝑡 = 3 −1 0 𝑥̄ 𝑡 + −1 𝑢̄ 𝑡
-2.4107
0 1 0 0
1.7054 + 1.8204i
1.7054 - 1.8204i
Fully controllable
We want to move the poles to new locations : -2.5 ; -0.7+0.4i ; -0.7-0.4i
by implementing a feedback loop with state feedback gain K=[k1 k2 k3]
The closed loop system is represented as :
2 0 −5 0 2 0 −5
𝐴 = 𝐴 − 𝐵𝐾 = 3 −1 0 − −1 𝑘 𝑘 𝑘 = 3+𝑘 −1 + 𝑘 𝑘
0 1 0 0 0 1 0
𝑠−2 0 5
det 𝑠𝐼 − 𝐴 = det − 3 + 𝑘 𝑠 − −1 + 𝑘 −𝑘
0 −1 𝑠
= 𝑠 − 2 𝑠 − −1 + 𝑘 𝑠 − 𝑘 +5 3+𝑘
= 𝑠 + −1 − 𝑘 𝑠 + −2 + 2𝑘 − 𝑘 𝑠 + 5𝑘 + 2𝑘 + 15
AE3200 (II-2020/2021) 6
Based on the desired poles locations, the following characteristic polynomial
can be obtained :
−2 + 2𝑘 − 𝑘 = 4.15 ⇒ 𝑘 = −15.95
5𝑘 + 2𝑘 + 15 = 1.625 ⇒ 𝑘 = 3.7
Implementing this gain matrix in the feedback loop gives the following
closed loop system matrix:
0 1 0 0 0 1 0
𝐴 = 𝐴 − 𝐵𝐾 = 0 0 1 − 0 𝑘 𝑘 𝑘 = 0 0 1
−𝑎 −𝑎 −𝑎 1 −𝑎 − 𝑘 −𝑎 − 𝑘 −𝑎 − 𝑘
AE3200 (II-2020/2021) 8
The characteristic polynomial is :
𝑠 −1 0
det 𝑠𝐼 − 𝐴 = det 0 𝑠 −1
𝑎 +𝑘 𝑎 +𝑘 𝑠+ 𝑎 +𝑘
=𝑠 + 𝑎 +𝑘 𝑠 + 𝑎 +𝑘 𝑠+ 𝑎 +𝑘
AE3200 (II-2020/2021) 9
So, if the system under consideration is represented in a controllable
canonical form, the feedback gain matrix can be computed easily by
evaluating the coefficients of the system characteristic polynomial and
those of the desired polynomial
Note that the state feedback algorithm already explained is valid for a
single input system (SIMO).
The problem is how to transform a system into a canonical form.
AE3200 (II-2020/2021) 10
Controllable Canonical Form
and,
Which means that the eigenvalues (characteristic polynomial and its roots) of A’
is equal to those of A the coefficients of the characteristic polynomial of A is
equal to those of A’
Suppose a gain matrix K is applied in the feedback loop, such that the closed
loop system becomes:
AE3200 (II-2020/2021) 11
Incorporating the matrix T :
𝐴 =𝑇 𝐴 − 𝐵𝐾 𝑇 = 𝑇 𝐴𝑇 − 𝑇 𝐵𝐾𝑇 = 𝐴 − 𝐵 𝐾
= det 𝑠𝐼 − 𝐴 − 𝐵 𝐾
=𝑠 +𝑏 𝑠 + ⋯+ 𝑏
Suppose the desired closed loop poles are represented by the following
polynomial:
𝑃 𝑠 = 𝑠−𝑝 𝑠−𝑝 … 𝑠−𝑝 =𝑠 +𝑑 𝑠 + ⋯+ 𝑑 𝑠 + 𝑑
So that,
AE3200 (II-2020/2021) 12
Computing T
Evaluating :
𝐴 =𝑇 𝐴𝑇 ⇒ 𝑇𝐴 = 𝐴𝑇 (∗) , 𝐵 =𝑇 𝐵 ⇒ 𝐵 = 𝑇𝐵 (∗∗)
From (*)
0 1 0 0
0 0 1 0
𝐴𝑇 = 𝑇𝐴 ⇒ 𝐴 𝑡 𝑡 ⋯ 𝑡 = 𝑡 𝑡 ⋯ 𝑡 0 0
0 0 1
−𝑎 −𝑎 −𝑎
AE3200 (II-2020/2021) 13
Since tn is already determined, the last (nth)column of the equation above can be
used for computing tn-1
0 1 0 0
0 0 1 0
𝐴𝑡 𝑡 ⋯ 𝑡 = 𝑡 𝑡 ⋯ 𝑡 0 0 ⇒ 𝐴𝑡
0 0 1
−𝑎 −𝑎 −𝑎
0
Hence, 0
= 𝑡 𝑡 ⋯ 𝑡 ⋮
1
−𝑎
Evaluating the (n-1)th column, we get
0 1 0 0 0
0 0 1 0 ⋮
𝐴𝑡 𝑡 ⋯ 𝑡 = 𝑡 𝑡 ⋯ 𝑡 0 0 ⇒ 𝐴𝑡 = 𝑡 𝑡 ⋯ 𝑡 1
0 0 1 0
−𝑎 −𝑎 −𝑎 −𝑎
Hence,
AE3200 (II-2020/2021) 14
Repeating the procedure until the 1st column of AT, we get the recursive
calculation for obtaining T :
AE3200 (II-2020/2021) 15
Example: Poles:
−0,254 0 −1,76 0,322 0 -8.4328
−9,08 −8,4 2,19 0 29
𝑥̄̇ = 𝑥̄ + 𝑢̄
2,55 −0,35 −0,76 0 −0.222 -0.4934 + 2.3352i
0 1 0.0875 0 0
-0.4934 - 2.3352i
0.0056
𝑃(𝑠) = s + 9.41s + 13.97s + 47.96s−0.27
a3 = 9.41 ; a2 = 13.97 ; a1= 47.96 ; a0 = -0.27
And we get
0 1 0 0
0 0 1 0
𝐴 =𝑇 𝐴𝑇 =
0 0 0 1
0.27 −47.96 −13.97 −9.41
0
0
𝐵 =𝑇 𝐵=
0
1
AE3200 (II-2020/2021) 17
Suppose, by adding a feedback, we want the closed loop system to have poles in
the following locations :
s= -10
s= -1.5 + 2i
s= -1.5 - 2i
s= -1.2
Then we have the desired characteristic polynomial :
𝑃 (𝑠) = s + 14.2s + 51.85s + 106s + 75
Since the system already transformed into a canonical form, hence we can get
the feedback gain as :
𝐾 = 𝐾𝑇 = 𝑘 𝑘 𝑘 𝑘
= 𝑑 −𝑎 𝑑 −𝑎 𝑑 −𝑎 𝑑 −𝑎
AE3200 (II-2020/2021) 18
Applying the feedback gain matrix on the original system, we get:
AE3200 (II-2020/2021) 19
Ackermann’s Formula
Ackermann formula can be used for obtaining the state feedback gain matrix for
system with single input, provided that the system is controllable.
Suppose a feedback gain controller K is needed to make the closed loop poles
reside at s=pd1, s=pd2, …, s=pdn . This poles configuration is represented by a
polynomial
AE3200 (II-2020/2021) 20
The required gain matrix K can be computed using Ackermann’s formula:
This formula can also be used for obtaining the estimator gain.
AE3200 (II-2020/2021) 21
Example:
Poles:
−0,254 0 −1,76 0,322 0
−9,08 −8,4 2,19 0 29 -8.4328
𝑥̄̇ = 𝑥̄ + 𝑢̄
2,55 −0,35 −0,76 0 −0.222
0 1 0.0875 0 0 -0.4934 + 2.3352i
-0.4934 - 2.3352i
0.0056
The controllability matrix:
0 0.39 26.8 −251
29 −244.09 2025 −17050
𝐶𝑜 = 𝐵 𝐴𝐵 𝐴 𝐵 𝐴 𝐵 =
−0.222 −9.98 94 −712
0 28.98 −245 2033
Suppose, by adding a feedback, we want the closed loop system to have poles in
the following locations :
s= -10
s= -1.5 + 2i
s= -1.5 - 2i
s= -1.2
Then we have the desired characteristic polynomial :
𝑃 (𝑠) = s + 14.2s + 51.85s + 106s + 75
AE3200 (II-2020/2021) 22
d3 = 14.2 ; d2 = 51.85 ; d1= 106 ; d0 = 75
𝑞(𝐴) = 𝐴 + d A + d A + d A + d I
and,
= A + 14.2A + 51.85A + 106A + 75I
whose poles are located at : s= -10 ; s= -1.5 + 2i ; s= -1.5 - 2i ; s= -1.2 (as required)
AE3200 (II-2020/2021) 23
Multi-variable Control : Linear Quadratic Control
For a dynamical system :
AE3200 (II-2020/2021) 24
Optimization formulation
• The control u = -Kx can be obtained by solving the
following optimization problem :
= 𝐴 − 𝐵𝐾 𝑥̄ ∗
Assuming that (A-BK) is stable (all of its poles has negative real part) and inserting
the definition of control u into the cost function gives:
= 𝑥̄ 𝑄𝑥̄ + 𝑥̄ 𝐾 𝑅𝐾𝑥̄ 𝑑𝑡
= 𝑥̄ 𝑄 + 𝐾 𝑅𝐾 𝑥̄ 𝑑𝑡
AE3200 (II-2020/2021) 26
Defining
𝑉 𝑥̄ = 𝑥̄ 𝑃𝑥̄
Hence
𝑑 𝑑
− 𝑉 𝑥̄ = − 𝑥̄ 𝑃𝑥̄ = −𝑥̄̇ 𝑃𝑥̄ − 𝑥̄ 𝑃𝑥̄̇
𝑑𝑡 𝑑𝑡
Equating the equation above to the terms inside the integral operator on the
previous equation:
𝑥̄ 𝑄 + 𝐾 𝑅𝐾 𝑥̄ = − 𝐴 − 𝐵𝐾 𝑥̄ 𝑃𝑥̄ − 𝑥̄ 𝑃 𝐴 − 𝐵𝐾 𝑥̄
= −𝑥̄ 𝐴 − 𝐵𝐾 𝑃𝑥̄ − 𝑥̄ 𝑃 𝐴 − 𝐵𝐾 𝑥̄
= −𝑥̄ 𝐴 − 𝐵𝐾 𝑃 + 𝑃 𝐴 − 𝐵𝐾 𝑥̄
AE3200 (II-2020/2021) 27
Then it can be seen that
𝐴 − 𝐵𝐾 𝑃 + 𝑃 𝐴 − 𝐵𝐾 = − 𝑄 + 𝐾 𝑅𝐾 ∗∗
system matrix A has its Eigenvalues on the Left Half side of complex plane.
And there exists a positive definite Hermitian P such that
AE3200 (II-2020/2021) 28
Since (A-BK) is assumed to be stable, then as t inf, x(inf) 0, hence
Then the cost J can be determined based only the initial condition.
AE3200 (II-2020/2021) 29
Consider the following :
𝐴 − 𝐵𝐾 𝑃 + 𝑃 𝐴 − 𝐵𝐾 = − 𝑄 + 𝐾 𝑅𝐾
𝐴 − 𝐾 𝐵 𝑃 + 𝑃 𝐴 − 𝐵𝐾 + 𝐾 𝑅𝐾 + 𝑄 = 0 ; 𝑃 =𝑃
𝐴 𝑃 − 𝐾 𝐵 𝑃 + 𝑃𝐴 − 𝑃𝐵𝐾 + 𝐾 𝑇 𝑇𝐾 + 𝑄 = 0 ; 𝑅=𝑇 𝑇
𝐴 𝑃 + 𝑃𝐴 + 𝑄 + 𝐾 𝑇 𝑇𝐾 − 𝐾 𝐵 𝑃 − 𝑃𝐵𝐾 = 0
𝐾 𝑇 𝑇𝐾 − 𝐾 𝐵 𝑃 − 𝑃𝐵𝐾
AE3200 (II-2020/2021) 30
𝐾 𝑇 𝑇𝐾 − 𝐾 𝐵 𝑃 − 𝑃𝐵𝐾
𝐾 𝑇 𝑇𝐾 − 𝐾 𝑇 𝑇 𝐵 𝑃 − 𝑃𝐵𝑇 𝑇𝐾
Hence,
= 𝑇𝐾 − 𝑇 𝐵 𝑃 𝑇𝐾 − 𝑇 𝐵 𝑃 − 𝑇 𝐵 𝑃 𝑇 𝐵 𝑃
AE3200 (II-2020/2021) 31
𝑇𝐾 − 𝑇 𝐵 𝑃 𝑇𝐾 − 𝑇 𝐵 𝑃 − 𝑃𝐵𝑇 𝑇 𝐵 𝑃
= 𝑇𝐾 − 𝑇 𝐵 𝑃 𝑇𝐾 − 𝑇 𝐵 𝑃 − 𝑃𝐵𝑅 𝐵 𝑃
𝐴 𝑃 + 𝑃𝐴 + 𝑄 + 𝑇𝐾 − 𝑇 𝐵 𝑃 𝑇𝐾 − 𝑇 𝐵 𝑃 − 𝑃𝐵𝑅 𝐵 𝑃=0
𝑇𝐾 − 𝑇 𝐵 𝑃=0
AE3200 (II-2020/2021) 33
AE3200 (II-2020/2021) 34
Consider the cost function :
AE3200 (II-2020/2021) 36
PID Controller
The controller Gb(s) can be applied either in feedback loop or forward loop
(before the plant G(s)
The coefficients Kp, Ki, and Kd must be determined such that good closed loop
characteristics/response is obtained
If Ki = Kd = 0 proportional controller root locus, Ki = 0 PD controller, Kd
= 0 PI controller
AE3200 (II-2020/2021) 37
PID Control : Ziegler-Nichols Method – Closed Loop
Km= 14.68
ωm= 14
AE3200 (II-2020/2021) 39
K=13
K=14
K=15
AE3200 (II-2020/2021) 40
𝐾 = 0,6. 𝐾
Kp = 8.8080
𝐾 .𝜔
𝐾 =
𝜋 Ki = 39.2514
𝐾 =
𝐾 .𝜋 Kd = 0.4941
4𝜔
AE3200 (II-2020/2021) 41
• Other PID Coefficients Table
AE3200 (II-2020/2021) 42
Ziegler-Nichols : Open Loop / Step Response Method
Suppose a step input is given to the plant, and its response is obtained
Parameters T and L
AE3200 (II-2020/2021) 43
• Open Loop / Step Response Method
Using the parameters T and L, the PID controller coefficients can be determined as:
AE3200 (II-2020/2021) 44
• Effects of Kp, Ki, Kd on system response
AE3200 (II-2020/2021) 45
Final Value & Initial Value Theorem
Suppose a system G(s) is excited by an input (example:step function), then the
output will be y(s)=G(s)u(s).
The steady state value of y can also be obtained from its formulation in
Laplace domain using final value theorem:
→ →
Also, the output y when t 0 can also be known using initial value
theorem:
→
→ →
AE3200 (II-2020/2021) 46
Steady state error (tracking):
→ →
In Laplace domain:
𝐸 𝑠 =𝑅 𝑠 −𝑌 𝑠 =𝑅 𝑠 −𝐺 𝑠 𝐸 𝑠
𝐸 𝑠 +𝐺 𝑠 𝐸 𝑠 =𝑅 𝑠
1
⇒ 𝐸 𝑠 = 𝑅 𝑠
1+𝐺 𝑠
→ → Position Error
constant
→ → Velocity Error
constant
→
acceleration Error
→ → constant
AE3200 (II-2020/2021) 48
Tracking Controller
Reguator problem
Changing the closed loop
characteristics
Modifying transient response
Tracking problem :
y(t) r(t)
To control system variable so
that it can follow a given
reference command r(t)
AE3200 (II-2020/2021) 49
Tracking Control – Multivariable system
A. System with integrator
AE3200 (II-2020/2021) 50
Tracking Control – Multivariable system
AE3200 (II-2020/2021) 51
Tracking Control – Multivariable system
AE3200 (II-2020/2021) 52
Tracking Control – Multivariable system
AE3200 (II-2020/2021) 53
Tracking Control – Multivariable system
AE3200 (II-2020/2021) 54
Tracking Control – Multivariable system
AE3200 (II-2020/2021) 56
Tracking Control – Multivariable system
AE3200 (II-2020/2021) 57
Tracking Control – Multivariable system
AE3200 (II-2020/2021) 58
Tracking Control – Multivariable system
AE3200 (II-2020/2021) 59
Tracking Control – Multivariable system
B. Tracking with intergral action
AE3200 (II-2020/2021) 60
Tracking Control – Multivariable system
AE3200 (II-2020/2021) 61
Tracking Control – Multivariable system
AE3200 (II-2020/2021) 62
Tracking Control – Multivariable system
AE3200 (II-2020/2021) 63
Tracking Control – Multivariable system
AE3200 (II-2020/2021) 64
Tracking Control – Multivariable system
AE3200 (II-2020/2021) 65
Tracking Control – Multivariable system
AE3200 (II-2020/2021) 66
AE3200 (II-2020/2021) 67
AE3200 (II-2020/2021) 68
AE3200 (II-2020/2021) 69
Open loop poles:
Suppose another set of closed poles is chosen : 0.0000 + 0.0000i
• -10.5000 + 0.0000i -2.5000 + 2.5960i
• -7.0000 + 2.0000i -2.5000 - 2.5960i
• -7.0000 - 2.0000i
• -5.7500 + 0.0000i
Then the following K is obbtained :
• K = [ -13.1915 -1.9573 -1.8281 151.6293 ]
• Giving the following tracking response
AE3200 (II-2020/2021)
Choosing new poles that are farther away from the open loop poles will require 70
more control effort
Tracking Controller : Optimal Control
AE3200 (II-2020/2021) 71
Tracking Controller : Optimal Control
AE3200 (II-2020/2021) 72
Tracking Controller : Optimal Control
AE3200 (II-2020/2021) 73
Tracking Controller : Optimal Control
AE3200 (II-2020/2021) 74
Tracking Controller : Optimal Control
AE3200 (II-2020/2021) 75
Tracking Controller : Optimal Control
• R element value is
bigger, than the system
will limit the value of
control variable to
smaller value
• It will affect the system
variables response
AE3200 (II-2020/2021) 76
Tracking Controller : Optimal Control
The 4th state is the “error” state the error is suppressed more
AE3200 (II-2020/2021) 77
Tracking Controller : Optimal Control