MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060...

94
MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology Email: [email protected] SC4060 Model Predictive Control (February-March 2011) Preliminaries - slide 1

Transcript of MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060...

Page 1: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

MODEL PREDICTIVE CONTROL

SC4060

Ton J.J. van den Boom

Delft Center for Systems and Control

Delft University of Technology

Email: [email protected]

SC4060 Model Predictive Control (February-March 2011) Preliminaries - slide 1

Page 2: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

COURSE SCHEDULE 2008-2009

Tue 01 Feb : Introduction/Basics (C1/C2) Thu 03 Mar : Stability (C6)

Thu 03 Feb : Basics (C2) Tue 08 Mar : cancelled

Tue 08 Feb : Prediction (C3) Thu 10 Mar : Tuning (C8)

Thu 10 Feb : Standard formulation (C4) Tue 15 Mar : cancelled

Tue 15 Feb : Solution of the SPCP (C5) Thu 17 Mar : cancelled

Thu 17 Feb : cancelled Tue 22 Mar : reserve

Tue 01 Mar : Solution of the SPCP (C5) Thu 24 Mar : Question hour

Tuesday 10:45-12:30 3mE Room-J (Coenraad Storkzaal)

Thursday 08:45-10:30 3mE Room-J (Coenraad Storkzaal)

SC4060 Model Predictive Control (February-March 2011) Preliminaries - slide 2

Page 3: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

EXAMINATION

• Written exam on Tuesday April 4 , 9:00-11:00 hrs

• Homework assignment set (MATLAB)

Available in week 9, Hand-in on Monday April 18

QUESTIONS

Minh Dang Doan

Room: 8C-3-10, tel: 015-278 1362, email: [email protected]

SC4060 Model Predictive Control (February-March 2011) Preliminaries - slide 3

Page 4: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Some properties of discrete time systems

CONTINUOUS TIME DISCRETE TIME

state space model

d x(t)d t

= Ax(t)+Bu(t) x(k +1) = Ax(k)+Bu(k)

y(t) = C x(t)+Du(t) y(k) = C x(k)+Du(k)

operators

Sx(t) =d x(t)

d tqx(k) = x(k +1)

transfer function

H(s) = C (s I−A)−1B+D H(z) = C (z I −A)−1B+D

SC4060 Model Predictive Control (February-March 2011) Preliminaries - slide 4

Page 5: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Consider two systems with common A and C matrices

H1 H2

x1(k +1) = Ax1(k)+B1u1(k) x2(k +1) = Ax2(k)+B2u2(k)

y1(k) = C x1(k)+D1u1(k) y2(k) = C x2(k)+D2u2(k)

Connect the systems

y(k) = y1(k)+ y2(k)

New system becomes:

x(k +1) = Ax(k)+B1u1(k)+B2u2(k)

y(k) = C x(k)+D1u1(k)+D2u2(k)

H1

H2

- - -

?

?d

u1(k)

u2(k)

y(k)y1(k)

y2(k)

SC4060 Model Predictive Control (February-March 2011) Preliminaries - slide 5

Page 6: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

CHAPTER 1

INTRODUCTION

SC4060 Model Predictive Control (February-March 2011) Notes chapter 1 - slide 6

Page 7: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Model predictive control

Enormous challenge for industry:

• Tighter product quality specifications

• Increasing productivity demands

• Fast changes in the economical market

Model Predictive Control (MPC) is able to respond

in an effective way to these demands.

MPC is more a methodology, not a single technique.

Differences in translation into a mathematical formulation.

• Model Predictive Control (MPC)

• Model Based Predictive Control (MBPC)

• Receding Horizon Control (RHC)

• Moving Horizon Control (MHC)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 1 - slide 7

Page 8: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

SC4060 Model Predictive Control (February-March 2011) Notes chapter 1 - slide 8

Page 9: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

SC4060 Model Predictive Control (February-March 2011) Notes chapter 1 - slide 9

Page 10: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Ingredients of MPC

Five ingredients are recognizable:

• Process + disturbance model

• Performance index

• Constraint handling

• Optimization

• Receding horizon principle

Theory:

• analysis is difficult

Practice:

• accurate tuning for stability & robustness

SC4060 Model Predictive Control (February-March 2011) Notes chapter 1 - slide 10

Page 11: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

History of MPC

• pioneered by Richalet (1979) and Cutler & Ramaker (1979)

• well accepted by industry:

- MPC can handle multivariable processes with

large time-delays, non-minimum-phase, unstable poles

- easy concept, easy tuning

- MPC can handle constraints

- MPC can handle structure changes and actuator failures

• academic interest

- Self-tuning control & Minimum Variance control

- Generalized Predictive Control (GPC)

• many successful applications have been reported

SC4060 Model Predictive Control (February-March 2011) Notes chapter 1 - slide 11

Page 12: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

COURSE SETUP

2. Basics of MPC

? ?

3. Prediction 4. Standard formulation

- �5. Solving the MPC problem

? ?6. Stability - 8. Tuning

?

7. LMI-based MPC

SC4060 Model Predictive Control (February-March 2011) Notes chapter 1 - slide 12

Page 13: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

COURSE SETUP

2. Basics of MPC

? ?

3. Prediction 4. Standard formulation

- �5. Solving the MPC problem

? ?6. Stability - 8. Tuning

?

7. LMI-based MPC

SC4060 Model Predictive Control (February-March 2011) Notes chapter 1 - slide 13

Page 14: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

CHAPTER 2

THE BASICS OF MODEL PREDICTIVE CONTROL

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 14

Page 15: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

BASICS OF MODEL PREDICTIVE CONTROL

Discuss the five ingredients of MPC:

• 1. Process + disturbance model

• 2. Performance index

• 3. Constraint handling

• 4. Optimization

• 5. Receding horizon principle

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 15

Page 16: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

BASICS OF MODEL PREDICTIVE CONTROL

Discuss the five ingredients of MPC:

• 1. Process + disturbance model

• 2. Performance index

• 3. Constraint handling

• 4. Optimization

• 5. Receding horizon principle

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 16

Page 17: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

1. The process & disturbance model

The models applied in MPC serve two purposes:

• Prediction of the behavior of the future output of the process on the basis

of inputs and known disturbances applied to the process in the past

• Calculation of the input signal to the process that minimizes the given

objective function

These models are not necessarily the same.

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 17

Page 18: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Two types of IO models are applied:

• Direct Input-Output models (IO models) in which the input signal is directly

applied to the model.

• Increment Input-Output models (IIO models) in which the increments of the

input signal are applied to the model instead of the input directly.

Model assumptions:

• Linear

• Time-invariant

• Discrete time

• Causal

• Finite order

• State space description

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 18

Page 19: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Input-output (IO) Model

y(k)= Go(q)u(k)

where

Go(q)= strictly proper plant model

∆u(k)= ∆(q)u(k) = u(k)−u(k−1)

Increment-input-output (IIO) Model

y(k)= Gi(q)∆u(k)

where

∆u(k)= ∆(q)u(k) = u(k)−u(k−1)

∆(q)= (1−q−1)

Gi(q)= strictly proper plant model

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 19

Page 20: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

State space description:

IO-model IIO-model

xo(k+1) = Aoxo(k)+Bou(k) xi(k+1) = Aixi(k)+Bi∆u(k)

y(k) = Coxo(k) y(k) = Cixi(k)

Relation IO Model and IIO model:

Introduce new state xi =

[

y(k−1)

∆xo(k)

]

and define the system matrices Ai =

I Co

0 Ao

Bi =

0

Bo

Ci =[

I Co

]

then Gi(q) = Go(q)∆(q)−1

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 20

Page 21: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Advantage of using IIO models

Example 1: Given an IO system with ‖Go(1)‖ < ∞.

Minimize an IO-performance index

J(k) =N2

∑j=1

‖y(k + j)− r(k + j)‖2 +λ2‖u(k + j−1)‖2

Let r(k) = rss 6= 0 for k −→ ∞.

Jss = ‖yss − rss‖2 +λ2‖uss‖

2

= ‖Go(1)uss − rss‖2 +λ2‖uss‖

2

= uTss

(

GTo (1)Go(1)+λ2I

)

uss −2uTssG

To (1)rss + rT

ssrss

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 21

Page 22: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Minimizing Jss over uss means that

uss=(

GTo (1)Go(1)+λ2I

)−1GT

o (1)rss

yss= Go(1)(

GTo (1)Go(1)+λ2I

)−1GT

o (1)rss

It is clear that yss 6= rss for λ > 0.

Conclusion: There will be a steady-state error.

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 22

Page 23: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Example 2: Given an IIO system Gi(q) = ∆−1(q)Go(q) with ‖Go(1)‖ < ∞.

Minimize an IIO-performance index

J(k) =N2

∑j=1

‖y(k + j)− r(k + j)‖2+λ2‖∆u(k + j−1)‖2

Let r(k) = rss 6= 0 for k −→ ∞.

Jss = ‖yss − rss‖2 +λ2‖∆uss‖

2

Minimum Jss = 0 is reached for uss = G−1o (1)rss which gives yss = rss and

∆uss = 0. It is clear that yss = rss for any λ > 0.

Conclusion: There will be no steady-state error.

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 23

Page 24: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Standard model

IO Model

xo(k +1) = Ao xo(k)+Bo u(k)

y(k) = Co xo(k)

IIO Model

xi(k +1) = Ai xi(k)+Bi ∆u(k)

y(k) = Ci xi(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 24

Page 25: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Standard model

Standard Model

x(k +1) = Ax(k)+Bv(k)

y(k) = C x(k)

IO Model

xo(k +1) = Ao xo(k)+Bo u(k)

y(k) = Co xo(k)

IIO Model

xi(k +1) = Ai xi(k)+Bi ∆u(k)

y(k) = Ci xi(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 25

Page 26: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Standard model

State space model:

x(k +1) = Ax(k)+Bv(k)+B2w(k)+B3 v3(k)

y(k) = C x(k)+D11e(k)+D12w(k)

where

x(k) is the state of the system

v(k) is the input of the system (either u or ∆u)

y(k) is the output of the system

e(k) is zero-mean white noise (unmeasurable disturbances)

w(k) denotes of all known signals (measurable disturbances)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 26

Page 27: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Standard model

State space model:

x(k +1) = Ax(k)+B1e(k)+B2w(k)+B3v(k)

y(k) = C x(k)+D11e(k)+D12w(k)

where

x(k) is the state of the system

v(k) is the input of the system (either u or ∆u)

y(k) is the output of the system

e(k) is zero-mean white noise (unmeasurable disturbances)

w(k) denotes of all known signals (measurable disturbances)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 27

Page 28: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Standard model

Input-Output relation:

y(k)= H(q)e(k)+F(q)w(k)+G(q)v(k)

Transfer functions:

G(q)=C (qI−A)−1B3

F(q)=C (qI−A)−1B2 +D11

H(q)=C (qI−A)−1B1 +D12=C (qI−A)−1(qI −A)−1B

Noise signal:

e(k) is ZMWN

IO-model: H(q)e(k) is zero-mean

IIO-model: H(q)e(k) is NOT zero-mean, but gives a trend.

G

F

H

- - -

6

6

?

?d

v(k)

e(k)

w(k)

y(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 28

Page 29: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Standard model

Input-Output relation:

y(k)= H(q)e(k)+F(q)w(k)+G(q)v(k)

Noise signal:

0 10 20 30 40 50 60 70 80 90 100−3

−2

−1

0

1

2

3

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

He(

k)→

He(

k)→

k −→

IO-model:

IIO-model:

G

F

H

- - -

6

6

?

?d

v(k)

e(k)

w(k)

y(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 29

Page 30: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Other model descriptions

Impulse and step response models

• Process industry: no detailed models

• Reliable models: step/impulse response

• Simple experiments

• First MPC models were step/impulse response models (Richalet, Cutler)

Polynomial models

• Model on basis of physical laws

• Model on basis of system identification

• Less parameters than in impulse or step response models

• Suitable for SISO systems

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 30

Page 31: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Choice of model description

For all models: Resulting performance ≈ the same

Differences:

• effort of modeling

• model accuracy

• computational power

Step response models:

• more parameters

• more uncertainty

• intuitive

• less a priori information

• easy to understand

• cheap experiments

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 31

Page 32: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Polynomial model:

• very compact

• gives good physical insight

• controller is compact and low order

• making predictions is cumbersome

• not tractable for MIMO systems

State space models:

• especially suited for MIMO systems

• compact model description

• compact and low order controller

• computations are well conditioned

• algorithms easy to implement

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 32

Page 33: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

BASICS OF MODEL PREDICTIVE CONTROL

Discuss the five ingredients of MPC:

• 1. Process + disturbance model

• 2. Performance index

• 3. Constraint handling

• 4. Optimization

• 5. Receding horizon principle

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 33

Page 34: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

2. Performance index:

The MPC controller minimize the standard performance index at time k:

J(v,k)=N

∑j=Nm

zT1 (k+ j−1|k)z1(k+ j−1|k)+

N

∑j=1

zT2 (k+ j−1|k)z2(k+ j−1|k)

where z1 reflects tracking error and z2 reflects the control action.

and where zi(k+ j−1|k) is prediction of zi(k+ j−1) at time k.

In MPC literature three performance indices often appear:

• Generalized Predictive Control (GPC) performance index

• Linear Quadratic Predictive Control (LQPC) performance index

• Zone performance index

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 34

Page 35: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

GPC performance index:

J(u,k) =N

∑j=Nm

∣ yp(k + j|k)− r(k + j|k)∣

2+λ2

Nc

∑j=1

|∆u(k + j−1) |2

r(k) is the reference trajectory

y(k) is the process output signal

∆u(k) is the process control increment signal

yp(k) = P(q)y(k)

Nm is the minimum cost- horizon

N is the prediction horizon

Nc is the control horizon

λ is the weighting on the control signal

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 35

Page 36: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

LQPC performance index:

J(u,k) =N

∑j=Nm

xT (k+ j|k)Qx(k+ j|k)+N

∑j=1

uT (k+ j−1)Ru(k+ j−1)

x(k) is the state signal vector

u(k) is the process control signal

Q is the state weighting matrix

R is the control weighting matrix

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 36

Page 37: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Zone-control performance index:

J(u,k) =N

∑j=Nm

ε2(k+ j|k)+λ2Nc

∑j=1

∆u2(k+ j−1)

where

ε(k) =

0 for | y(k)−r(k) | ≤ δmax

y(k)−r(k)−δmax for y(k)−r(k) ≥ δmax

y(k)−r(k)+δmax for y(k)−r(k) ≤−δmax

δmax is the size of the zone

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 37

Page 38: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Tracking error(

y(k)− r(k))

0 2 4 6 8 10 12 14 16 18 20−3

−2

−1

0

1

2

3

0 2 4 6 8 10 12 14 16 18 20−1.5

−1

−0.5

0

0.5

1

1.5

y(k)−

r(k)

→ε(

k)→

k −→

+δmax

−δmax

zone performance signal ε(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 38

Page 39: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Performance index - GPC ↔ Standard

Choose:

z(k) =

z1(k)

z2(k)

=

yp(k +1)− r(k +1)

λ∆u(k)

Then:

J(k)=N

∑j=1

zT1 (k+ j−1|k)z1(k+ j−1|k)+ zT

2 (k+ j−1|k)z2(k+ j−1|k)

=N

∑j=1

∣ yp(k + j|k)− r(k + j|k)∣

2+λ2 |∆u(k + j−1|k) |2

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 39

Page 40: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Performance index - LQPC ↔ Standard

Choose:

z(k) =

z1(k)

z2(k)

=

Q1/2x(k +1)

R1/2u(k)

Then:

J(k)=N

∑j=1

zT1 (k+ j−1|k)z1(k+ j−1|k)+ zT

2 (k+ j−1|k)z2(k+ j−1|k)

=N

∑j=1

xT (k + j|k)Qx(k + j|k)+uT (k + j−1|k)Ru(k + j−1|k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 40

Page 41: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Performance index (Minimum cost horizon)

Choose

Γ( j) =

Γ1( j) 0

0 Γ2( j)

=

[

0 00 I

]

for 0≤ j < Nm−1

[

I 00 I

]

for Nm−1≤ j ≤ N

Then

J=N

∑j=Nm

zT1 (k+ j−1|k)z1(k+ j−1|k)+

N

∑j=1

zT2 (k+ j−1|k)z2(k+ j−1|k)

=N−1

∑j=0

zT1 (k+ j|k)Γ1( j)z1(k+ j|k)+ zT

2 (k+ j|k)Γ2( j)z2(k+ j|k)

=N−1

∑j=0

zT (k+ j|k)Γ( j)z(k+ j|k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 41

Page 42: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

BASICS OF MODEL PREDICTIVE CONTROL

Discuss the five ingredients of MPC:

• 1. Process + disturbance model

• 2. Performance index

• 3. Constraint handling

• 4. Optimization

• 5. Receding horizon principle

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 42

Page 43: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

3. Constraint handling

Inequality constraints:

umin ≤ u(k) ≤ umax ∆umin ≤ ∆u(k) ≤ ∆umax

ymin ≤ y(k) ≤ ymax xmin ≤ x(k) ≤ xmax

or

ψ(k) ≤ Ψ(k) ∀k

For future values we use the predicted value of ψ:

ψ(k+ j|k)≤ Ψ(k+ j) ∀ j > 0

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 43

Page 44: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Equality constraints:

Motivated by control algorithm itself:

Control horizon constraint: ∆u(k+ j|k) = 0 for j ≥ Nc

The state end-point constraint: x(k +N|k) = xss

or

φ(k) = 0 k ∈ κ

For future values we use the predicted value of φ:

A j φ(k + j|k) = 0 ∀ j > 0

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 44

Page 45: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Multiple constraints can be combined by stacking

Equality constraints:

φ1(k) = 0...

φn(k) = 0

φ(k) =

φ1(k)...

φn(k)

= 0

Inequality constraints:

ψ1(k) ≤ Ψ1(k)...

ψm(k) ≤ Ψm(k)

ψ(k) =

ψ1(k)...

ψm(k)

Ψ1(k)...

Ψm(k)

= Ψ(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 45

Page 46: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Two-sided inequality constraint

Ψ1,min(k) ≤ ψ1(k) ≤ Ψ1,max(k)

can be translated into one-sided inequality constraint

ψ(k) =

ψ1(k)

−ψ1(k)

Ψ1,max(k)

−Ψ1,min(k)

= Ψ(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 46

Page 47: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Structuring the input signal

To obtain tractable optimization problem.

Decrease the degrees of freedom in

{ u(k) , u(k +1) , . . . , u(k +N −1) }

• Control horizon Nc.

u(k+ j|k) = u(k+Nc−1|k) for j ≥ Nc

• Blocking.

u(k+ j|k) = u(k+mℓ−1|k) for mℓ ≤ j < mℓ+1, ℓ = 1, . . . ,nbl

• Basis functions.

u(k+ j|k) = ∑Mi=0Si( j)αi(k)

- Si( j) are the basis functions

- αi(k), i = 1, . . . ,M are scalar parameters

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 47

Page 48: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Control horizon

0

SNc−1

SNc−2

SNc−3

SNc−4

SNc−5

S0

S1

S2

Nc−1

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 48

Page 49: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Blocking

0

SM

SM−1

SM−2

SM−3

SM−4

S0

S1

S2

N−1

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 49

Page 50: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

BASICS OF MODEL PREDICTIVE CONTROL

Discuss the five ingredients of MPC:

• 1. Process + disturbance model

• 2. Performance index

• 3. Constraint handling

• 4. Optimization

• 5. Receding horizon principle

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 50

Page 51: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Standard Predictive Control Problem:

The MPC controller minimizes the following performance index at time k:

J(v,k) =N−1

∑j=0

zT (k + j|k)Γ( j)z(k + j|k)

subject to the constraints

A j φ(k + j|k) = 0 ∀ j ≥ 0

ψ(k + j|k) ≤ Ψ(k + j) ∀ j ≥ 0

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 51

Page 52: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

An optimization algorithm will be applied to compute a sequence of future

control signals that minimizes the performance index subject to the given

constraints.

For

• linear models

• linear constraints

• quadratic (2-norm) performance index

we can use quadratic programming algorithms.

For 1-norm or ∞- norm performance index: linear programming algorithms.

Both types of algorithms are convex and show fast convergence.

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 52

Page 53: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

BASICS OF MODEL PREDICTIVE CONTROL

Discuss the five ingredients of MPC:

• 1. Process + disturbance model

• 2. Performance index

• 3. Constraint handling

• 4. Optimization

• 5. Receding horizon principle

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 53

Page 54: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

RECEDING HORIZON PRINCIPLE

• a time k: Performance index J(k) is minimized

• first element of optimal control sequence v(k) is applied to the system

• horizon shifted

• optimization restarted for time k +1

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 54

Page 55: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

RECEDING HORIZON PRINCIPLE

� -

-

bb

b

b

bb

b

b

b

b

b

b

bb b b b b b

Nm Nc N

z(k)

v(k)

k k+ j

PAST FUTURE

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 55

Page 56: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

RECEDING HORIZON PRINCIPLE

� -

-

bb

b

b

b

bbbb

z(k)

v(k)

z(k +1)z(k +1|k)

k+1 k+ j

PAST FUTURE

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 56

Page 57: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

RECEDING HORIZON PRINCIPLE

� -

-

bb

b

b

b

b b

b

b

b

b

b

bb b

b b b b b

Nm Nc N

z(k)

v(k)

k+1 k+ j

PAST FUTURE

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 57

Page 58: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

RECEDING HORIZON PRINCIPLE

� -

-

bb

b

b

b

b

bb

bb

z(k)

v(k)

z(k +1)z(k +1|k)

k+2 k+ j

PAST FUTURE

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 58

Page 59: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

RECEDING HORIZON PRINCIPLE

� -

-

bb

b

b

b

b

b

b

b

b

b

b

bb b b b b b b b

Nm Nc N

z(k)

v(k)

k+2 k+ j

PAST FUTURE

SC4060 Model Predictive Control (February-March 2011) Notes chapter 2 - slide 59

Page 60: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

CHAPTER 3

PREDICTION

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 60

Page 61: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

PREDICTION MODEL

Prediction on basis of model:

x(k+1) = Ax(k)+B1e(k)+B2w(k)+B3v(k)

y(k) = C1x(k)+D11e(k)+D12w(k)

p(k) = Cpx(k)+Dp1e(k)+Dp2w(k)+Dp3v(k)

x(k) is the state

v(k) is the control signal (u / ∆u)

e(k) is ZMWN

w(k) consists of all known signals (r /di /do )

p(k) is a signal, to be predicted.

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 61

Page 62: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

At time instant k:

- make a set of j-step ahead predictions of p(k + j).

Prediction, denoted as p(k + j|k)

- using information given at time k

- future values of the control signal v(k + j)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 62

Page 63: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

p(k)=Cpx(k)+Dp1e(k)+Dp2w(k)+Dp3v(k)

Define

p(k) =

p(k|k)

p(k+1|k)...

p(k+N−1|k)

v(k) =

v(k)

v(k+1)...

v(k+N−1)

w(k) =

w(k)

w(k+1)...

w(k+N−1)

Goal: find p0(k) and Dp3 such that

p(k) = p0(k)+ Dp3 v(k)

with free-response signal:

p0(k)=Cpx(k)+ Dp1e(k)+ Dp2w(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 63

Page 64: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Noiseless case

The model:

x(k +1) = Ax(k)+B2w(k)+B3v(k)

p(k) = Cpx(k)+Dp2w(k)+Dp3v(k)

Successive substitution:

x(k+ j|k) = Ax(k + j−1|k)+B2w(k+ j−1)+B3v(k+ j−1)

= A2x(k+ j−2|k)+AB2w(k+ j−2)+AB3v(k+ j−2)

+B2w(k + j−1)+B3v(k + j−1)...

= A jx(k)+j

∑i=1

Ai−1B2w(k+ j−i)+j

∑i=1

Ai−1B3v(k+ j−i)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 64

Page 65: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

p(k+ j|k) = Cp x(k+ j|k)+Dp2w(k+ j)+Dp3v(k+ j)

= Cp A jx(k)+j

∑i=1

Cp Ai−1B2w(k + j− i)

+j

∑i=1

Cp Ai−1B3v(k + j− i)+Dp2w(k+ j)+Dp3v(k + j)

and so

p(k) = Cp x(k)+ Dp2 w(k)+ Dp3 v(k)

= p0(k)+ Dp3 v(k)

with free-response

p0(k) = Cp x(k)+ Dp2 w(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 65

Page 66: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

where

Cp =

Cp

CpA

CpA2

...

CpAN−1

Dp2=

Dp2 0 · · · 0 0

CpB2 Dp2 · · · 0 0

CpAB2 CpB2. . .

......

.... . . Dp2 0

CpAN−2B2 · · · CpB2 Dp2

Dp3=

Dp3 0 · · · 0 0

CpB3 Dp3 · · · 0 0

CpAB3 CpB3. . .

......

.... . . Dp3 0

CpAN−2B3 · · · CpB3 Dp3

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 66

Page 67: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Noisy case

The model:

x(k+1) = Ax(k)+B1e(k)+B2w(k)+B3v(k)

y(k) = C1x(k)+D11e(k)+D12w(k)

p(k) = Cpx(k)+Dp1e(k)+Dp2w(k)+Dp3v(k)

Successive substitution:

x(k+ j|k) = A jx(k)+j

∑i=1

Ai−1B3v(k+ j−i)+j

∑i=1

Ai−1B1e(k+ j−i|k)

+j

∑i=1

Ai−1B2w(k+ j−i)

Prediction of noise: e(k + j|k) = 0 for j > 0

and e(k) = D−111

(

y(k)−C1x(k)−D12w(k))

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 67

Page 68: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

x(k+ j|k) = A jx(k)+j

∑i=1

Ai−1B3v(k+ j−i)+A j−1B1e(k)

+j

∑i=1

Ai−1B2w(k+ j−i)

and so:

p(k+ j|k) = Cp x(k + j|k)+Dp2w(k + j)+Dp3v(k + j)

= Cp A jx(k)+CpA j−1B1e(k)+j

∑i=1

Cp Ai−1Bpw(k + j− i)

+j

∑i=1

Cp Ai−1B3v(k + j− i)+Dp2w(k + j)+Dp3v(k + j)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 68

Page 69: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

p(k)= Cpx(k)+ Dp1e(k)+ Dp2w(k)+ Dp3v(k)

= p0(k)+ Dp3v(k)

where

Dp1 =

Dp1

CpB1

CpAB1...CpAN−2B1

and free-response signal:

p0(k)= Cpx(k)+ Dp1e(k)+ Dp2w(k)

= Cpx(k)+ Dp1D−111 (y(k)−C1x(k)−D12w(k))+ Dp2w(k)

= (Cp−Dp1D−111 C1)x(k)+ Dp1D−1

11 y(k)+(Dp2−Dp1D−111 D12Ew)w(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 69

Page 70: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Summary

On basis of model:

x(k+1) = Ax(k)+B1e(k)+B2w(k)+B3v(k)

y(k) = C1x(k)+D11e(k)+D12w(k)

p(k) = Cpx(k)+Dp1e(k)+Dp2w(k)+Dp3v(k)

we make prediction:

p(k) = Cpx(k)+ Dp1e(k)+ Dp2w(k)+ Dp3 v(k)

= p0(k)+ Dp3 v(k)

where e(k) = D−111

(

y(k)−C1x(k)−D12w(k))

and

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 70

Page 71: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

where

Cp =

Cp

CpA

CpA2

...

CpAN−1

Dp2=

Dp2 0 · · · 0 0

CpB2 Dp2 · · · 0 0

CpAB2 CpB2. . .

......

.... . . Dp2 0

CpAN−2B2 · · · CpB2 Dp2

Dp1 =

Dp1

CpB1

CpAB1...CpAN−2B1

Dp3=

Dp3 0 · · · 0 0

CpB3 Dp3 · · · 0 0

CpAB3 CpB3. . .

......

.... . . Dp3 0

CpAN−2B3 · · · CpB3 Dp3

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 71

Page 72: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

The use of a priori knowledge

w(k) =

w(k)

w(k+1)

. . .

w(k+N−1)

We assume w(k + j|k) to be known at time k.

If not we choose

w(k) =

w(k|k)

w(k+1|k)

. . .

w(k+N−1|k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 72

Page 73: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Zero-th order extrapolation:

We assume w(k + j) = w(k−1) for j ≥ 0.

This results in

w(k) =

w(k−1)

w(k−1)

. . .

w(k−1)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 73

Page 74: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Linear (first order) extrapolation:

We assume w(k + j) = w(k−1)+ j (w(k−1)−w(k−2)) for j ≥ 0.

This results in

w(k) =

2w(k−1)−w(k−2)

3w(k−1)−2w(k−2)

. . .

(N +1)w(k−1)−Nw(k−2)

Polynomial (higher order) extrapolation:

For an nth order extrapolation we use n+1 past values of w. The error

estimate will grow with the degree of the polynomial extrapolation.

SC4060 Model Predictive Control (February-March 2011) Notes chapter 3 - slide 74

Page 75: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

CHAPTER 4

STANDARD FORMULATION

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 75

Page 76: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Standard formulation

Many kinds of performance indices

• LQPC performance index

• GPC performance index

• zone performance index

Many types of constraints

• equality constraints

• inequality constraints

Standard formulation:

• transform performance index

• formalize constraints

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 76

Page 77: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Performance index

Consider the system

x(k +1) = Ax(k)+B1e(k)+B2w(k)+B3v(k)

y(k) = C1x(k)+D11e(k)+D12w(k)

Define performance index

J(v,k) =N−1

∑j=0

zT (k + j|k)Γ( j)z(k + j|k)

where

z(k) = C2x(k)+D21e(k)+D22w(k)+D23v(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 77

Page 78: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

LQPC:

J(u,k) =N

∑j=Nm

xT (k + j|k)Qx(k + j|k)+N

∑j=1

uT (k + j−1)Ru(k + j−1)

z(k) =

Q1/2x(k +1)

R1/2u(k)

GPC:

J(u,k) =N

∑j=Nm

∣ yp(k + j|k)− r(k + j|k)∣

2+λ2

Nc

∑j=1

|∆u(k + j−1) |2

z(k) =

yp(k +1)− r(k +1)

λ∆u(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 78

Page 79: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

LQPC performance index

Consider IO-model

xo(k+1) = Aoxo(k)+Koeo(k)+Lodo(k)+Bou(k)

y(k) = Coxo(k)+DHeo(k)+DFdo(k)

Choose x(k) = xo(k) , v(k) = u(k) , w(k) = do(k) , e(k) = eo(k), then

x(k+1) = Ao x(k)+Ko e(k)+Lo d(k)+Bo v(k)

= Ax(k)+B1e(k)+B2w(k)+B3v(k)

y(k) = C1x(k)+D11e(k)+D12w(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 79

Page 80: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

z(k) =

Q1/2x(k +1)

R1/2v(k)

=

Q1/2Aox(k)+Q1/2Koe(k)+Q1/2Low(k)+Q1/2Bov(k)

R1/2v(k)

=

Q1/2Ao

0

x(k)+

Q1/2Ko

0

e(k)+

Q1/2Lo

0

w(k)+

Q1/2Bo

R1/2

v(k)

= C2x(k)+D21e(k)+D22w(k)+D23v(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 80

Page 81: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

GPC performance index

Consider the IIO-output model:

xi(k+1)=Aixi(k)+Kiei(k)+Lidi(k)+Bi∆u(k)

y(k)=Cixi(k)+DHei(k)

The realization yp(k) = P(q)y(k) described by:

xp(k +1) = Ap xp(k)+Bp y(k)

yp(k) = Cp xp(k)+Dp y(k)

Choose e(k) = ei(k) , v(k) = ∆u(k),

w(k) =

di(k)

r(k +1)

, and x(k) =

xp(k)

xi(k)

,

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 81

Page 82: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

then

xp(k+1)

xi(k+1)

=

Ap BpCi

0 Ai

xp(k)

xi(k)

+

BpDH

Ki

ei(k)+

0 0

Li 0

di(k)

r(k +1)

+

0

Bi

∆u(k)

= Ax(k)+B1e(k)+B2w(k)+B3v(k)

y(k) = Cix(k)+DHe(k)

= C1x(k)+D11e(k)+D12w(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 82

Page 83: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

For yp(k) we find:

yp(k) =[

Cp DpCi

]

x(k)+DpDHe(k)

and we obtain the estimate yp(k+1):

yp(k+1) =[

CpAp CpBpCi +DpCiAi

]

xp(k)

xi(k)

+

[

CpBpDH +DpCiKi

]

ei(k)+

[

DpCiLi 0]

di(k)

r(k +1)

+[

DpCiBi

]

v(k)

where we used the fact that ei(k +1|k) = 0.

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 83

Page 84: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Now we find:

z(k) =

yp(k +1)− r(k +1)

λ∆u(k)

=

CpAp CpBpCi +DpCiAi

0 0

xp(k)

xi(k)

+

CpBpDH +DpCiKi

0

ei(k)+

DpCiLi −I

0 0

di(k)

r(k +1)

+

DpCiBi

λ I

v(k)

= C2x(k)+D21e(k)+D22w(k)+D23v(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 84

Page 85: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Standard performance index

Define vector z(k) with predictions of z(k + j|k):

z(k) =

z(k|k)

z(k+1|k)...

z(k+N−1|k)

Then using the formulas of chapter 3 we obtain:

z(k) = C2x(k)+ D21e(k)+ D22w(k)+ D23v(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 85

Page 86: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

where

C2=

C2

C2A

C2A2

...

C2AN−1

D22=

D22 0 · · · 0 0

C2B2 D22 · · · 0 0

C2AB2 C2B2. . .

......

.... . . D22 0

C2AN−2B2 · · · C2B2 D22

D21 =

D21

C2B1

C2AB1...C2AN−2B1

D23=

D23 0 · · · 0 0

C2B3 D23 · · · 0 0

C2AB3 C2B3. . .

......

.... . . D23 0

C2AN−2B3 · · · C2B3 D23

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 86

Page 87: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Now define

Γ =

Γ(0) 0 . . . 0

0 Γ(1) 0...

. . ....

0 0 . . . Γ(N −1)

then

J(v,k) =N−1

∑j=0

zT (k + j|k)Γ( j)z(k + j|k)

= zT (k)Γz(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 87

Page 88: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Handling constraints

Equality constraints

A jφ(k + j|k) = 0

Stack all constraints at time k on predicted φ in one vector:

φ(k) =

A1φ(k +1|k)

A2φ(k +2|k)...

AN φ(k +N|k)

In standard framework, we can express the equality constraints in the form:

φ(k) = C3x(k)+ D31e(k)+ D32w(k)+ D33v(k) = 0

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 88

Page 89: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

State end-point constraint:

x(k +N|k) = ANx(k)+[

AN−1B2 AN−2B2 · · · B2

]

w(k)+

+AN−1B1e(k)+[

AN−1B3 AN−2B3 · · · B3

]

v(k)

= 0

by defining

C3 = AN D31 = AN−1B1 D32 =[

AN−1B2 AN−2B2 · · · B2

]

D33 =[

AN−1B3 AN−2B3 · · · B3

]

we obtain:

φ(k)=C3x(k)+D31e(k)+D32w(k)+D33v(k)=0

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 89

Page 90: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Inequality constraints

ψ(k) ≤ Ψ(k)

where ψ reflect states, inputs, outputs and Ψ reflects limitations.

Example:

x1,min ≤ x1(k) ≤ x1,max

v(k) ≤ vmax

ymin ≤ y(k)

result in :

ψ(k) =

x1(k)

−x1(k)

v(k)

−y(k)

Ψ(k) =

x1,max

−x1,min

vmax

−ymin

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 90

Page 91: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

So:

ψ(k) =

E1

−E1

0−C1

x(k)+

000

−D11

e(k)+

000

−D12

w(k)+

00I0

v(k)

= C4x(k)+D41e(k)+D42w(k)+D43v(k)

where E1 = [ 1 0 . . . 0 ] .

Now we obtain the inequality constraint:

ψ(k) = C4x(k)+D41e(k)+D42w(k)+D43v(k) ≤ Ψ(k)

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 91

Page 92: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Now consider the inequality constraint

ψ(k) = C4x(k)+D41e(k)+D42w(k)+D43v(k) ≤ Ψ(k)

Stack all constraints at time k on predicted ψ in one vector:

ψ(k) =

ψ(k +1|k)

ψ(k +2|k)...

ψ(k +N|k)

Ψ(k +1|k)

Ψ(k +2|k)...

Ψ(k +N|k)

= Ψ(k)

Using the formulas of chapter 3, the inequality constraints can be written in the

form

ψ(k) = C4x(k)+ D41e(k)+ D42w(k)+ D43v(k) ≤ Ψ(k)

where

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 92

Page 93: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

C4=

C4

C4A

C4A2

...

C4AN−1

D42=

D42 0 · · · 0 0

C4B2 D42 · · · 0 0

C4AB2 C4B2. . .

......

.... . . D42 0

C4AN−2B2 · · · C4B2 D42

D41 =

D41

C4B1

C4AB1...C4AN−2B1

D43=

D43 0 · · · 0 0

C4B3 D43 · · · 0 0

C4AB3 C4B3. . .

......

.... . . D43 0

C4AN−2B3 · · · C4B3 D43

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 93

Page 94: MODEL PREDICTIVE CONTROL - TU Delftsc4060/transp/transp01.pdf · MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology

Standard formulation

Consider the systemx(k +1) = Ax(k)+B1e(k)+B2w(k)+B3v(k)

y(k) = C1x(k)+D11e(k)+D12w(k)

z(k) = C2x(k)+ D21e(k)+ D22w(k)+ D23v(k)

φ(k) = C3x(k)+ D31e(k)+ D32w(k)+ D33v(k)

ψ(k) = C4x(k)+ D41e(k)+ D42w(k)+ D43v(k)

Minimize performance index

J(v,k) =N−1

∑j=0

zT (k + j|k)Γ( j)z(k + j|k)

= zT (k)Γz(k)

subject to the constraints φ(k) = 0 and ψ(k) ≤ Ψ(k).

SC4060 Model Predictive Control (February-March 2011) Notes chapter 4 - slide 94