0% found this document useful (0 votes)
143 views32 pages

ECE5590 MPC Problem Formulation

Uploaded by

Pablo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views32 pages

ECE5590 MPC Problem Formulation

Uploaded by

Pablo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

ECE5590: Model Predictive Control 4–1

Model Predictive Control Problem Formulation

The objective of a model predictive control strategy is to:


Compute a trajectory of future control inputs that optimizes the future
behavior of plant output, where the optimization is carried out within a
limited time window

An Application Example

! Let’s examine how this might work for a golf game.


– Prior to tee-off, we analyze the course and game-time weather
conditions.
– Based on this knowledge - and the physical principles governing
ball trajectories as a function of club - we develop a model.
– Using this model, we develop a strategy for the next n golf strokes
that will land the ball in the hole.
– We execute the next shot in this optimal sequence.
– We then assess our success and use information gained to plan
the next series of shots.
! Of course a key difference in golf is that our horizon is ever-
shortening (we hope!)
! In practice, our actual play sequence will differ from the original set of
n shots in the optimal sequence.
c 2010-2015, M. Scott Trimboli
Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–2

! A part of this difference is due to unknowns (like how close to our


potential we perform).
N OTE : In practice, we will have limitations (e.g., known injuries,
maximum shot distance, etc.) that we will build in as constraints during
pre-game analysis.
Key principles of MPC demonstrated by this example include:
1. Moving prediction horizon window
2. Receding horizon control that only executes the next step
3. Need for current-time information to make the next prediction
4. Model that describes system dynamics used for prediction
5. Objective criterion based on measured difference between desired &
actual response

Model Choice for MPC

! Three popular approaches to system modeling for predictive control


design are:
– Finite Impulse Response (FIR)
– Step Response (SR)
– Transfer Function (TF)
– State-Space (SS)
! Each approach exhibits certain advantages and disadvantages - the
development in this course will focus on state-space models
! FIR, SR and TF models are of historical interest and will be presented
for completeness
! All models will assume a discrete-time setting
c 2010-2015, M. Scott Trimboli
Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–3
Finite Impulse Response

! Also known as weighting sequence, the output is related to the input


via the convolution operator
! For the single-input-single-output (SISO) case, we write
X
N
yk D gi uk#i
i D1

where uk and yk denote the input and output sequence elements,


respectively.
! The sequence gi comprises the first N coefficients of an infinite
Taylor series in the unit time delay operator, z #1 , representing the
dynamic process g.z/:
X
1
g.z/ D gi z #1
iD0

– This sequence will always decay to zero for the stable case.

! The first N values of the infinite series give a finite impulse response
which will capture the main process dynamics.
! A FIR model can be viewed as a representation of the discrete-time
pulse response (expected value of the output y in response to a
single unit pulse u).
! This model generalizes easily to the multi-input-multi-output (MIMO)
case by use of appropriate matrices.

Step Response

! Integrating the unit pulse response will give the unit step response,
c 2010-2015, M. Scott Trimboli
Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–4

X
1
h.z/ D hi z #1
i D1

where
g.z/
h.z/ D
4.z/
and 4.z/ is the one-step difference operator, 1 # z #1.
! The following plot shows the relationship between the impulse and
step response.

h4 = h3 + g 4

h3 g4

Transfer Function

! Again considering the SISO case we can write


a.z/yk D b.z/uk
b.z/
where the form gives a transfer function representation for the
a.z/
output-input ratio of the corresponding z-transforms.

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–5

! The polynomials assume the forms:


a.z/ D 1 C a1z #1 C a2z #2 C $ $ $ C anz #n
b.z/ D b0 C b1z #1 C b2z #2 C $ $ $ C bmz #m

N OTE: Performing the long division b.z/=a.z/ will yield the corresponding
unit pulse response g.z/.

State-Space

! We shall assume a linearized, discrete-time, state-space model of the


plant:
x.k C 1/ D Ax.k/ C Bu.k/
y.k/ D Cy x.k/
z.k/ D Cz x.k/
where x is an n-dimensional state vector, u is an `-dimensional input
vector, y is an my -dimensional vector of measured outputs, and z is an
mz -dimensional vector of outputs which are to be controlled.
! Since there is always finite delay between measuring y.k/ and
applying u.k/, there is no direct feed-through term.
– Hence our model is strictly proper.
! For simplicity, we shall often assume y % z in which case C will
denote both Cy and Cz .
Relationship to FIR Model

We can use the discrete-time state equations to determine the sequence


parameters resulting from a unit pulse input:

x.0/ D 0
c 2010-2015, M. Scott Trimboli
Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–6
x.1/ D B
x.2/ D AB
x.3/ D A2B
:::
x.n/ D An#1B

y.0/ D C x.0/ C Du.0/


DD
y.1/ D CB
y.2/ D CAB
y.3/ D CA2B
:::
y.n/ D CAn#1B
! Hence the FIR model sequence is given by:
g.z/ D D C CBz #1 C CABz #2 C CA2Bz #3 C CAn#1Bz #n
Relationship to Transfer Function Model

! Applying the z-transform to the state-space model,


zX.z/ D AX.z/ C BU.z/
.zI # A/X.z/ D BU.z/
X.z/ D .zI # A/#1BU.z/
and
Y.z/ D C.zI # A/#1BU.z/
! So that,
Y.z/
G.z/ D D C.zI # A/#1B
U.z/
c 2010-2015, M. Scott Trimboli
Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–7
State-Space Model with Embedded Integrator

! Returning to our state-space representation, we consider the SISO


system
xm.k C 1/ D Amxm.k/ C Bmu.k/
y.k/ D Cmxm.k/

! Recall from your study of feedback control that in order to eliminate


steady-state error from a control system we need to include integral
action.
! For model predictive controllers, a convenient way to introduce
integral action is by modifying the state-space model.
! Taking a difference operation on both sides of the state equation we
get
x m.k C 1/ # x m.k/ D Am.x m.k/ # xm.k # 1// C Bm.u.k/ # u.k # 1//

! Denote the difference of the state variable by


4x m.k C 1/ D xm.k C 1/ # xm.k/
4x m.k/ D xm.k/ # xm.k # 1/
and of the control variable by
4u.k/ D u.k/ # u.k # 1/

! Then the difference of the state equation is:


4xm.k C 1/ D Am4xm.k/ C Bm4u.k/

! We now have to compute the corresponding expression for the output


y.k/.
! Define a new augmented state vector

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–8
" #
4xm.k/
x.k/ D
y.k/
! Note that
y.k C 1/ # y.k/ D Cm.xm.k C 1/ # x m.k// D Cm4xm.k C 1/
D CmAm4x m.k/ C CmBm4u.k/

! Putting the above expressions together we get the augmented model:


" # " #" # " #
T
4x m.k C 1/ Am 0m 4x m.k/ Bm
D C 4u.k/
y.k C 1/ CmAm 1 y.k/ CmBm
" #
h i 4x .k/
m
y.k/ D 0m 1
y.k/
or simply,

x.k C 1/ D Ax.k/ C B4u.k/


" #
4x m.k/
y.k/ D C
y.k/
Example (Wang, pg. 34)

! Given a discrete-time system where


" # " #
1 1 0:5 h i
Am D Bm D Cm D 1 0
0 1 1
! Find the matrices of the augmented system .A; B; C / and calculate
the eigenvalues of A.

S OLUTION .
h i
! We have n D 2 and 0m D 0 0 .
c 2010-2015, M. Scott Trimboli
Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–9
! Then,
x.k C 1/ D Ax.k/ C B4u.k/
y.k/ D C x.k/
where

2 3
" 1 1 0 #
6
Am 0Tm 7
AD D40 1 05
CmAm I
1 1 1
2 3
" # 0:5
Bm 6 7
BD D4 1 5
CmBm
0:5
h i h i
C D 0m 1 D 0 0 1

! The eigenvalues of A are found as the roots of the characteristic


equation, .! # 1/3 D 0; or !1 D !2 D !3 D 1.

Predictive Control: SISO Case

! We will first develop the case for a simple SISO system for which the
states are directly measureable.

– The more general case will be discussed later.

! Future control inputs are denoted by:


4u.ki /; 4u.ki C 1/; : : : ; 4u.ki C Nc # 1/
where ki represents a particular time step and Nc is the control horizon.
! Information x.ki / permits prediction up to Np samples ahead; Np is
called the prediction horizon.
c 2010-2015, M. Scott Trimboli
Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–10
! Future state variables are given by:
x.ki C 1jki /; x.ki C 2jki /; : : : x.ki C mjki /; : : : ; x.ki C Np jki /
N OTE : Nc & Np .

P REDICTION .
! Future state variables:
x.ki C 1jki / D Ax.ki / C B4u.ki /
x.ki C 2jki / D Ax.ki C 1jki / C B4u.ki C 1/
D A2x.ki / C AB4u.ki / C B4u.ki C 1/
:::
x.ki C Np jki / D ANp x.ki / C ANp #1B4u.ki / C ANp #2B4u.ki C 1/
C : : : C ANp #Nc B4u.ki C Nc # 1/

! Predicted outputs:
y.ki C 1/ D CAx.ki / C CB4u.ki /
y.ki C 2/ D CA2x.ki / C CAB4u.ki / C CB4u.ki C 1/
y.ki C 3/ D CA3x.ki / C CA2B4u.ki / C CAB4u.ki C 1/
C CB4u.ki C 2/
:::
y.ki C Np jki / D CANp x.ki / C CANp #1B4u.ki / C CANp #2B4u.ki C 1/
C : : : C CANp #Nc B4u.ki C Nc # 1/

! Gathering up the the predicted output sequence into the vector

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–11

2 3
y.ki C 1/ j ki
6 7
6 y.ki C 2/ j ki 7
6 7
Y D6
6 y.ki C 3/ j ki
7
7
6 ::: 7
4 5
y.ki C Np / j ki
! Gather future input increments into the vector
2 3
4u.ki /
6 7
6 4u.ki C 1/ 7
6 7
4U D 6 4u.ki C 2/ 7
6
7I
6 ::: 7
4 5
4u.ki C Nc # 1/
! Now we can write
Y D F x.ki / C ˆ4U
where
2 3 2 3
CA CB 0 0 $$$ 0
6 7 6 7
6 CA2 7 6 CAB CB 0 $$$ 0 7
6 7 6 7
6 3 7
F D 6 CA 7 I ˆD6 CA2B $$$ 7
6 CAB CB 0 7
6 :: 7 6 ::: 7
4 : 5 4 5
CANp CANp #1B CANp #2B CANp #3B $ $ $ CANp #Nc B
O PTIMIZATION .
! For a given set-point signal r.ki / at sample time ki , the objective is to
find the best control parameter 4U such that an error function is
minimized.
! Define

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–12

2 3
1
6 7
617
Rs D 6 7
6 ::: 7 r.ki /
4 5
1
! Then we can define a cost function J as
J D .Rs ! Y /t .Rs ! Y / C 4U tR4U

! Optimal 4U that minimizes J is found from the solution of


@J
D0
@4U
! Expand J as

J D .Rs #F x.ki //t .Rs #F x.ki //#24U t ˆT .Rs #F x.ki //C4U t .ˆT ˆCR/4U
to give
@J
D #2ˆT .Rs # F x.ki // C 2.ˆT ˆ C R/4U D 0
@4U
! Solving,

4U " D .ˆT ˆ C R/#1ˆT .Rs # F x.ki //

Example

! Consider a simple first-order system:


xm.k C 1/ D axm.k/ C bu.k/
y.k/ D cxm.k/
where, a D 0:8; b D 0:1 and c D 1:0. Let Np D 10 and Nc D 4.
! Assume ki D 10, andh at this value,
i the reference r.ki / D 1 and the
t
state vector x.ki / D 0:1 0:2 .

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–13

! Determine the optimal solution 4U ' for the cases: 1) R D Œ0" and 2)
R D 10 $ I , where R is the weighting on the control input.

S OLUTION .
! Form the augmented state-space system:
" # " #" # " #
4x m.k C 1/ a 0 4x m.k/ b
D C 4u.k/
y.k C 1/ a 1 y.k/ b
" #
h i 4x .k/
m
y.k/ D 0 1
y.k/
! Therefore, F and ˆ take the following form:
2 3 2 3
CA CB 0 0 0
6 7 6 7
6 CA2 7 6 CAB CB 0 0 7
6 7 6 7
6 CA3 7 6 CA2B CAB 7
6 7 6 CB 0 7
6 CA4 7 6 CA3B CA2B 7
6 7 6 CAB CB 7
6 7 6 7
6 CA5 7 6 CA4B CA3B CA2B CAB 7
F D6 7 6
6 CA6 7 I ˆ D 6 CA5B CA4B
7
7
6 7 6 CA3B CA2B 7
6 7 6 7
6 CA 7
7 6 CA6B CA5B CA4B CA3B 7
6 7 6 7
6 CA8 7 6 CA7B CA6B CA5B CA4B 7
6 7 6 7
6 9 7 6 7
4 CA 5 4 CA8B CA7B CA6B CA5B 5
CA10 CA9B CA8B CA7B CA6B
! Note that the elements of ˆ comprise the discrete pulse response of
the system arranged in the form of a Toeplitz matrix.
! Substituting values we obtain:

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–14

2 3
1:1541 1:0407 0:91160:7726
6 7
6 1:0407 0:9549 0:84750:7259 7
ˆT ˆ D 6
6 0:9116 0:8475
7
4 0:76750:6674 7
5
0:7726 0:7259 0:66740:5943
2 3 2 3
9:2325 3:2147 3:2147
6 7 6 7
6 8:3259 2:7684 7 6 2:7684 7
T
ˆ F D66 7I T 6
ˆ Rs D 6 7
7 7
4 7:2927 2:3355 5 4 2:3355 5
6:1811 1:9194 1:9194
! For case 1) where R D Œ0", the optimal input sequence is
2 3
7:2
6 7
6 #6:4 7
4U D .ˆT ˆ/#1.ˆT Rs # ˆT F x.ki // D 6 6 0 7
7
4 5
0

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–15

! For case 2) where R D 10 $ I , we obtain


2 3
0:1269
6 7
6 0:1034 7
4U D .ˆT ˆ C 10 $ I /#1.ˆT Rs # ˆT F x.ki // D 6 7
6 0:0829 7
4 5
0:065

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–16

Receding Horizon Control

! Although the optimal parameter vector 4U contains the control


values 4u.ki /; 4u.ki C 1/,4u.ki C 2/,: : : 4u.ki C NC # 1/ , we only
implement the first sample of the sequence.
! Consider again the first-order system with state-space description
x m.k C 1/ D 0:8x m.k/ C 0:1u.k/
h it
! Let rw D 0; initial conditions are x.10/ D 0:1 0:2 and u.9/ D 0.
! As found previously, at sample time ki D 10, the optimal control was
found to be 4u.10/ D 7:2:
! Assuming 4u.9/ D 0, then we have the control signal to the plant is
u.10/ D u.9/ C 4u.10/ D 7:2.
! Compute the next plant state variable:
c 2010-2015, M. Scott Trimboli
Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–17

x m.11/ D 0:8x m.10/ C 0:1u.10/ D 0:88

! At ki D 11, new plant information is


4x m.11/ D 0:88 # 0:2 D 0:68
y.11/ D 0:88
which gives
" #
0:68
x.11/ D
0:88
! We can then calculate:
2 3
#4:24
6 7
6 #0:96 7
T #1 T T 6
4U D .ˆ ˆ/ .ˆ Rs # ˆ F x.11// D 6 7
7
4 0 5
0
and thus the optimal control input u.11/ D u.10/ C 4u.11/ D 2:96.
! Propagate the state again,
x m.12/ D 0:8x m.11/ C 0:1u.11/ D 1:0

! At ki D 12, the new plant information is


4x m.12/ D 1:0 # 0:88 D 0:12
y.12/ D 1:0
which gives
" #
0:12
x.12/ D
1:0
and

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–18

2 3
#0:96
6 7
6 0 7
4U D .ˆT ˆ/#1.ˆT Rs # ˆT F x.12// D 6
6
7
4 0 7 5
0
! Continuing,
x m.13/ D ax m.12/ C bu.12/ D 1:0
y.13/ D 1:0

4x m.13/ D 1:0 # 1:0 D 0


y.13/ D 1:0
2 3
0
6 7
607
4U D .ˆT ˆ/#1.ˆT Rs # ˆT F x.13// D 6
607
7
4 5
0
Stacking
h the the computed
i values of 4U for time instants
ki D 10 11 12 13 column-wise we obtain
2 3
7:2 #4:24 #0:96 0
6 7
6 #6:4 #0:96 0 0 7
4U ALL D 6
6 0
7
4 0 0 075
0 0 0 0
where the optimal control input sequence is given by the first row.
The optimal response follows:

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–19

Closed Loop Control System

! We’ve shown that at a given time ki , the optimal control input vector
4U is solved from
4U D .ˆT ˆ C R/ N #1.ˆT Rs # ˆT F x.ki //

N #1ˆT Rs corresponds to the


– Here, the first term, .ˆT ˆ C R/
set-point change
– The second term, .ˆT ˆ C R/ N #1ˆT F corresponds to state
feedback control (within the context of predictive control)

! We take just the first element of 4U at time ki as the incremental


control,
h i
4U .ki / D 1 0 $ $ $ 0 .ˆT ˆ C R/ N #1.ˆT RN s r.ki / # ˆT F x.ki //

D Ky r.ki / # Kmpc x.ki /


c 2010-2015, M. Scott Trimboli
Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–20
N #1ˆT Rs and Kmpc is the
where Ky is the first element of .ˆT ˆ C R/
N #1ˆT F .
first row of .ˆT ˆ C R/
! These relationships depict linear time-invariant state feedback control.
! The closed-loop system is found by using the augmented system
equation to write
x.k C 1/ D Ax.k/ # BKmpc x.k/ C BKy r.k/
D .A # BKmpc /x.k/ C BKy r.k/
– Closed-loop eigenvalues are then the roots of the closed-loop
characteristic equation:
detŒ!I # .A # BKmpc /" D 0

Predictive Control with Unmeasured States


State Estimation
! In the design of model predictive controllers, we initally assume that
the information x.ki / is available at time ki , which assumes all state
variables are measurable.
! In practice this is not the case and we must instead estimate state
values from the available process measurements.
– The general construction we devise for this task is termed an
observer.
! Assume a plant state-space model,
x m.k C 1/ D Amx m.k/ C Bmu.k/
! We can then calculate an estimate of the state variable,
xO m.k/; k D 1; 2; : : :, with an initial condition xO m.0/ and input signal
u.k/ as
c 2010-2015, M. Scott Trimboli
Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–21

xO m.k C 1/ D AmxO m.k/ C Bmu.k/


! What’s the problem with this estimate model?
– open loop prediction
– works only if initial condition is accurate
– requires stable plant - convergence only if eigenvalues of A inside
unit circle
– can’t regulate convergence rate
! Better approach ! Use feedback that relies on an error measure to
improve the estimate:
! "
xO m.k/ D AmxO m.k/A C Bmu.k/ C Kob y.k/ # CmxO m.k/
where Kob is an observer gain matrix.
! First term propagates the original model
! Second term is a correction
– Correction based on the error between the measured output and
the predicted value based on the state estimate.
! How do we choose the observer gain, Kob ?
– Define the error state to be x O m.k/; then
f .k C 1/ D x .k/ # x
m m

f .k C 1/ D A x
x m m fm .k/ # Kob Cm x
f .k/
m
D .Am # Kob Cm/x
f .k/
m

– With an initial error state xm.0/, we have


f .k/ D .A # K C /k x
x m m ob m fm .0/

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–22
! Unlike the open-loop estimator case, now we can exploit the degrees
of freedom in the observer gain matrix to affect the estimator
convergence rate.
! One way to do this is to place the closed-loop poles of the error
system matrix at desired locations in the complex plane.
Example
! The linearized equation of motion of a simple pendulum is:
d 2# 2
C ! # Du
dt 2
! Design an observer that reconstructs the pendulum angle, #, from
measurements of its angular velocity, d#=dt . Assume ! D 2 rad/sec
and sampling interval 4t D 0:1 sec.
! Select states, x1.t/ D # and x2.t / D #P ; the continuous time
state-space model is,
" # " #" # " #
xP 1.t/ 0 1 x1.t/ 0
D C u.t/
xP 2.t/ #! 2 0 x2.t/ 1
" #
h i x .t/
1
y.t/ D 0 1 :
x2.t/
! The discrete-time model is found from the Matlab function [sysd] =
c2d(sysc, .1):
" # " #" # " #
x1.k C 1/ 0:9801 0:0993 x1.k/ 0:0050
D C u.k/
x2.k C 1/ #:3973 0:9801 x2.k/ 0:0993
" #
h i x .k/
1
y.k/ D 0 1
x2.k/

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–23

! What if we just use the pendulum model alone for (open-loop)


prediction?

– Assume u.k/ D 0, and the initial conditions, #.0/ D x1.0/ D 1 and


#.0/ D xP2.0/ D 0:
– Now let’s assume we take a guess at the initial conditions of the
estimator as xO 1.0/ D 0:3 and xO 2.0/ D 0.
– Results are as follows:

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–24

– It’s easy to see that the open-loop estimation was unable to


recover from an error in the initial conditions.

! Now let us design and implement an observer to predict the angle of


the pendulum.
h it
– Assume the observer gain is given by Kob D $1 $2 .
– The close-loop characteristic polynomial of the observer is
det .!I # ŒAm # Kob Cm"/ D .!#0:9801/.!C$2#:9801/#:3973(.$1#:0993/

– Let’s set the observer poles at 0:1 and 0:2 for good convergence
speed.
– Equating the above expression to the desired closed cloop
characteristic equation for the observer, namely
.! # 0:9801/.! C $2 # :9801/ # :3973 ( .$1 # :0993/ D .! # 0:1/.! # 0:2/

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–25

we can solve for the unknown observer gains

" #" # " #


0 1 $1 1:6601
D
#:3973 #:9801 $2 #0:9800
" # " #
$1 #1:6284
D
$2 1:6601
" #" # " #
0 1 $1 1:6601
D
#:3973 #:9801 $2 #0:9800
" # " #
$1 #1:6284
D
$2 1:6601
– Implementing the estimator with the computed observer gives the
results depicted below.

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–26

– Here we see the observer quickly converges to the true value in


approximately three time steps.

Predictive Control Using State Estimates

! In cases where the state variable x.ki / at time ki is not measurable,


we use an observer in the implementation of predictive control.
O i C 1/ D Ax.k
x.k O i / C B4u.ki / C Kob .y.ki / # C x.k
O i //
! "
! Note that the state matrices, A; B; C represent the augmented
model used for predictive controller design.
! The corresponding modified cost function J can then be written
O i //T .RN s r.ki /#F x.k
J D .Rs #F x.k O i //#24U T ˆT .Rs #F x.k
O i //C4U T .ˆT ˆC

– The optimal solution is thus:

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–27

N #1ˆT .Rs # F x.k


4U ' D .ˆT ˆ C R/ O i //

! Application of receding horizon control leads to the optimal solution at


time ki :
O i/
4u.ki / D Ky r.ki / # Kmpc x.k

– This is standard state feedback control with estimate x.k


O i /.

! Let’s now examine the close-loop properties of this system.


! First, for the closed-loop state equations,
x.k C 1/ D Ax.k/ C B4u.k/
O
D Ax.k/ C BKy r.k/ # BKmpc x.k/

! The closed-loop observer error equation is:


Q C 1/ D .A # Kob C /x.k/
x.k Q

where
Q
x.k/ D x.k/ # x.k/
O

! Substituting for x.k/


O we can write:
Q
x.k C 1/ D .A # BKmpc /x.k/ # BKmpc x.k/ C BKy r.k/

! Combining the error and system state equations,


" # " #" # " #
Q C 1/
x.k A # Kob C 0n(n Q
x.k/ 0n(m
D C r.k/
x.k C 1/ #BKmpc A # BKmpc x.k/ BKy
– Since the system matrix is lower block diagonal, the eigenvalues
are given by the eigenvalues of the diagonal blocks, A # Kob C and
A # BKmpc respectively (separation principle).

Example
c 2010-2015, M. Scott Trimboli
Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–28

The augmented model for a double integrator plant is given by

x.k C 1/ D Ax.k/ C B4u.k/


y.k/ D C x.k/
where
2 3 2 3
1 1 0 0:5 h i
6 7 6 7
A D 4 0 1 0 5; B D 4 1 5; C D 0 0 1
1 1 1 0:5
! Design a state estimate predictive control system and simulate the
closed-loop response for a set-point change.
! Design specifications:
Nc D 5
Np D 30
rw D 10

! Place the observer poles at: 0:01, 0:0105, 0:011 to give fast dynamic
response.
! The open-loop plant has three eigenvalues at one (by inspection), two
from the double-integrator and one from the embedded integrator
structure. Using the Matlab function place, we find the observer gains
from:

h i
Pole D 0:01 0:0105 0:011 I
! "
Kob D place A C Pole 0I
0 0

which gives,

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
ECE5590, Model Predictive Control Problem Formulation 4–29

2 3
1:9685
6 7
Kob D 4 0:9688 5
2:9685
! Using the given performance parameters, the state feedback
controller gain is computed to be,
h i
Kmpc D 0:8984 1:3521 0:4039

! The resulting closed-loop eigenvalues are at 0:3172 ˙ j 0:4089 and


0:3624.

c 2010-2015, M. Scott Trimboli


Lecture notes prepared by M. Scott Trimboli. Copyright "
(mostly blank)
(mostly blank)
(mostly blank)

You might also like