Professional Documents
Culture Documents
Predictive Control:
Solution to Tracking Problem
Xiang Cheng
Associate Professor
Department of Electrical & Computer Engineering
The National University of Singapore
T ( z)
(orH ff )
R( z )
y
u ff
+ S ( z) u fb +u B( z )
R( z ) System A( z )
– + +
Disturbance v
Step Three: Choose T or Hff at the final stage, to satisfy other design requirements.
The order of controller can be increased in order to meet other design requirements.
2
Two-Degree-of-Freedom Controller
uc Bm ( z ) yr
Reference Model
Am ( z )
Feedforward
controller
y
u ff
u fb + u
Feedback System to be controlled
+ controller
– +
Objective: To make the closed loop model follow the reference model as close as
possible.
This approach can be applied to most of the linear systems with models available.
•Can we make the output follow arbitrary command signal directly without using
the reference model? 3
The answer is yes in theory, but with a price to pay.
r u y
A( z ) B( z )
Controller System
B( z ) A( z )
u (k )
yr((kk +1)
1)
y (k ) 5
y
General Case: u B( z )
System
A( z )
B( z )
U→ →Y B( z −1 )
A( z ) U→ →Y
A( z −1 )
A(q −1 ) y (k ) = B(q −1 )u (k )
2 z −2 2 2 z −2
Example: z2 +1 =
z − 2 ( z 2 + 1) 1 + z − 2
How to write down the difference equation?
•It is the time that you have to wait for the system to respond!
6
One-Step-Ahead Control: The case of time delay d=1
Controller:
y (k + 1) = r (k + 1)
Isn’t it simple?
Yes.
7
How about d>1? Let’s consider a simple example first:
y (k ) − y (k − 1) = u (k − 2) What is d? d=2
We want to have an equation with u(k) since we want to use it to compute the input.
How to convert the above equation so that it contains the input u(k)?
Forward shift both sides by 2! y (k + 2) = y (k + 1) + u (k )
Let y (k + 2) = r (k + 2)
r (k + 2)= y (k + 1) + u (k ) u (k ) = r (k + 2) − y (k + 1)
y (k + 2) = y (k + 1) + u (k ) is not a predictor!
y (k + 2) = y (k + 1) + u (k ) is not a predictor!
•Can we predict the future value y(k+1) using the present and past information?
y (k + 2) = y (k + 1) + u (k ) = y (k ) + u (k − 1) + u (k )
Is it a predictor now? Yes!
The next step is simple: just try to match the predicted output with the desired one!
y (k + 2) = r (k + 2)
r (k + 2)= y (k ) + u (k − 1) + u (k ) u (k ) = r (k + 2) − y (k ) − u (k − 1)
9
General Case: A(q −1 ) y (k ) = B(q −1 )u (k ) = q − d B ' (q −1 )u (k )
Can we express the output of the system at time t + d in the following predictor form?
y (k + d ) = α (q −1 ) y (k ) + β (q −1 )u (k )
Predictor form: Only present and past values of the inputs and outputs
(RHS) are used to predict the future (LHS)!
10
General Case:
We want to have an equation with u(k) since we want to use it to compute the input.
So we simply rewrite the original equation by forward shift of d steps:
y (k + d ) = α (q −1 ) y (k ) + β (q −1 )u (k )
12
Let’s check whether all the signals are bounded.
y (k + d ) = r (k + d ) y (k ) r (k );
= k≥d
A( z −1 )
U ( z) = −1
R( z )
B( z )
What is the condition to guarantee that the input is bounded?
•B(z) is stable!
y (k + 1) = ay 2 (k ) + bu (k ) + nu (k ) y (k )
Is it in the form of the predictor? Sure!
Match the predicted output with the desired output:
1) ay 2 (k ) + bu (k ) + nu (k ) y (k )
r (k +=
r (k + 1) − ay 2 (k )
Controller: u (k ) =
b + ny (k )
y (k + 1) = r (k + 1)
The one-step-ahead feedback control law only minimizes the squared prediction error:
1
J1 (k + d=
) [ y (k + d ) − r (k + d )]2
2
In reality, we need to achieve
a compromise between bringing y(k + d) to r(k + d) and the cost of the control effort.
16
Review of Part I: Lectures One to Six
17
A-D Algorithm D-A Process
+
–
18
State-space Model
Laplace Transform
sX ( s ) − x(0) = AX ( s ) + bU ( s )
X ( s ) = ( sI − A) −1 x(0) + ( sI − A) −1 bU ( s )
Zero-order hold
x(k + 1) = Φx(k ) + Γu (k )
y (k ) = cx(k )
Φ = e Ah
h
Γ = ( ∫ e As ds )b ( sI − A) −1
At
How to calculate e ? e At
0
19
f(k)
x(0)=0
X ( z ) = ( zI − Φ ) −1 zx(0) + ( zI − Φ ) −1 ΓU ( z )
Y ( z ) = cX ( z ) = c( zI − Φ ) −1 zx(0) + c( zI − Φ ) −1 ΓU ( z )
Y ( z ) = c( zI − Φ ) −1 ΓU ( z ) = H ( z )U ( z )
U (z ) H(z) Y(z)
−1 Q( z )
H ( z ) = c( zI − Φ ) Γ =
P( z )
21
P( z ) = det{zI − Φ}
U (z ) H(z) Y(z)
What can you do with the transfer functions?
•Given a transfer function, you can write down the difference equations, and vice versa
q ( forward − time − shift ) ⇔ z
•Calculate the output, Y(z)=H(z)U(z) when initial conditions are zero.
But in general, −1
Y ( z ) = c( zI − Φ ) zx(0) + H ( z )U ( z )
Linear
23
•How to check the stability without solving the equation?
an
Reverse the order: ×
a0
Eliminate the last element an
ann−−11
× n −1
Repeat the process a0
are positive!
24
Controllability
Is it possible to steer a system from any given initial state to any other
state in finite time?
u (1)
x(2)
x(1)
u (0)
x*
x(0)
Controllability Matrix
25
Observability: u(k) y(k)
What is the state x(k)?
Can we determine the state x(k) from observations of inputs and outputs?
Objective: To make the system OUTPUT and the desired REFERENCE as close
as possible, i.e., to make the ERROR as small as possible.
overshoot
±1%
1
0.9
M p
1.8 πζ 4.6
tr ≅
−
1−ζ 2 ts ≅
ωn Mp =e ζωn
ωn2 Bm ( z )
H ( s)
= H m ( z)
⇒= 29
s 2 + 2ζωn s + ωn2 Am ( z )
•Model-reference control:
uc yr
Reference Model
+
u y
Controller System to be controlled
+ +
–
Objective: To make the closed loop model follow the reference model as close as
possible.
30
Two-Degree-of-Freedom Controller
uc Bm ( z ) yr
Reference Model
Am ( z )
Feedforward
controller
y
u ff
u fb + u
Feedback System to be controlled
+ controller
– +
u = u fb + u ff
Match Am (z ) Match Bm (z ) 31
State-space approach
x(k + 1) = Φx(k ) + Γu (k )
y (k ) = cx(k )
uc Bm ( z ) yr
Reference Model
Am ( z )
H ff
+ u
-Lw + B( z ) ω
∑ Process y
-L + A( z ) x
Observer
32
Step One: Proportional Control --- State Feedback Control
u x
r = 0+ L Process
–
If the system is uncontrollable, can we still assign the poles to any desired locations?
Some of the poles cannot be changed!
•If the uncontrollable poles are stable, then we can still control the system to
some degree.
•Stabilizable. 33
u y
Step 2: observer
Process
Measure
+
–
Observer
Compare
Correct
K
x(k + 1) = Φx(k ) + Γu (k )
y (k ) = cx(k )
e(k + 1) = (Φ − Kc)e(k )
How to choose K?
•Ackermann’s formula
Another way is direct comparison:
| zI − (Φ − Kc ) | Ao (z )
-Lw + u ω
∑ Process
-L + x
u (k ) = − Lc z (k ) = − Lx (k ) − Lωω (k )
x(k + 1) Φ Φ xω x(k ) Γ x(k ) Φ − ΓL Φ xω − ΓLω x(k )
ω (k + 1) = 0 Φ ω (k ) − 0 [L Lω ]ω (k ) = 0 Φ ω (k )
ω ω
y (k ) = [c 0]z (k )
ω (z ) H ω (z ) Y(z)
If the disturbance is constant, how to make its output ZERO?
Make the steady-state gain H ω (1) = 0 35
The disturbance can be estimated by the observer!
Tracking Problem: how to match the reference model?
B( z )
The closed loop T.F. H ff
Am ( z )
Bm ( z )
•How to design the feedforward controller? H ff =
B( z )
•Under what conditions is perfect tracking attainable? How to make sure that the
inputs and outputs are bounded?
Y ( z ) Bm ( z )
=
U c ( z ) Am ( z )
U ( z ) A( z ) Bm ( z ) B(z) is stable!
=
U c ( z ) B ( z ) Am ( z )
Can we cancel out B(z)? Yes if B(z) is stable! Design R such that it contains B.
Choose R(z) and S(z) such that Acl ( z ) = A( z ) R( z ) + B( z ) S ( z ) = Am ( z ) Ao ( z ) B( z )
How to choose T(z) to match the reference model? T ( z ) = Bm ( z ) Ao ( z )
Y ( z) T ( z ) B( z ) B ( z ) Ao ( z ) B ( z ) Bm ( z ) 37
= = m =
U c ( z ) A( z ) R ( z ) + B ( z ) S ( z ) Am ( z ) Ao ( z ) B ( z ) Am ( z )
Two degree of freedom controller:
uc Bm ( z ) yr
Reference Model
Am ( z )
T ( z)
H ff (z )
R( z )
y
u ff
+ S ( z) u fb + u B( z )
System
– R( z ) + A( z )
T ( z)
(orH ff )
R( z )
y
u ff
+ S ( z) u fb +u B( z )
R( z ) System A( z )
– + +
Disturbance v
Step Three: Choose T or Hff at the final stage, to satisfy other design requirements.
The order of controller can be increased in order to meet other design requirements.
39
y
Predictive control u B( z )
System
A( z )
•System A(q −1 ) y (k ) = B(q −1 )u (k )
•Controller Design: just match the prediction with the desired output!
y (k + d ) = r (k + d )
40
y
One-step-ahead control u B( z )
System
A( z )
•System
41
What is next ?
The one-step-ahead feedback control law only minimizes the squared prediction error:
1
J1 (k + d=
) [ y (k + d ) − r (k + d )]2 y(k+d)=r(k+d)
2
The resulting control signal u(k) might be too big to be implemented!
42
u y
The observer design
Process
Measure
+
–
Observer
Compare
Correct
K
x(k + 1) = Φx(k ) + Γu (k )
y (k ) = cx(k )
How to choose K?
44