302
Optimal & Predictive Control Optimal & Predictive Control and some related topics . . . Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France Optimal & Predictive Control 1/125

Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Optimal & Predictive Controland some related topics . . .

Mazen Alamir

French National Research Center (CNRS)Gipsa-lab, Control Systems Department.

University of GrenobleFrance

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 1/125

Page 2: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Table of contents

Temporary download location:

http://www.mazenalamir.fr/files/predictive_ense3.pdf

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 2/125

Page 3: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Illustrative Example (1)

System equations:

x = f(x, u, w)yc = hm(x, u, w)yr = hr(x, u, w)

x state vector

yc constrained output vector

yr vector of regulated variables

u manipulated variable (control input)

w vector of non measured disturbances

Boeing 747

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 3/125

Page 4: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Illustrative Example (1)

System equations:

x = f(x, u, w)yc = hm(x, u, w)yr = hr(x, u, w)

Control objective

Keep the regulated output yr as close as pos-sible to some desired value ydr while respect-ing the constraints. Boeing 747

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 3/125

Page 5: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Illustrative Example (1)

System equations:

x = f(x, u, w)yc = hm(x, u, w)yr = hr(x, u, w)

Operational constraints

yminc ≤ yc(t) ≤ ymaxc

umin ≤ u(t) ≤ umax

δmin ≤ u(t+ τ)− u(t)) ≤ δmaxBoeing 747

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 3/125

Page 6: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Illustrative Example

0 2 4 6 8 10 12-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

1

time (sec)

State Evolution

0 2 4 6 8 10 12-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

1

time (sec)

Regulated output Evolution

0 2 4 6 8 10 12-6

-4

-2

0

2

4

6

time (sec)

Control Input Evolution

0 2 4 6 8 10 12-3

-2

-1

0

1

2

3

time (sec)

Control Input Slope

yminc = −10,−10 ; y

maxc = +10,+10

umin

= −4,−4 ; umax

= +4,+4δ

min= −50,−50 ; δ

max= +50,+50 ; no disturbance w = 0

Boeing 747

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 4/125

Page 7: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Illustrative Example

0 2 4 6 8 10 12-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

1

time (sec)

State Evolution

0 2 4 6 8 10 12-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

time (sec)

Regulated output Evolution

0 2 4 6 8 10 12-6

-4

-2

0

2

4

6

time (sec)

Control Input Evolution

0 2 4 6 8 10 12-1

-0.5

0

0.5

1

1.5

2

2.5

3

3.5

time (sec)

Control Input Slope

yminc = −0.5,−10 ; y

maxc = +10,+10

umin

= −4,−4 ; umax

= +4,+4δ

min= −50,−50 ; δ = +50,+50 ; no disturbance w = 0

Boeing 747

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 4/125

Page 8: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Illustrative Example

0 2 4 6 8 10 12-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

1

time (sec)

State Evolution

0 2 4 6 8 10 12-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

time (sec)

Regulated output Evolution

0 2 4 6 8 10 12-6

-4

-2

0

2

4

6

time (sec)

Control Input Evolution

0 2 4 6 8 10 12-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

time (sec)

Control Input Slope

yminc = −0.5,−10 ; y

maxc = +10,+10

umin

= −4,−4 ; umax

= +4,+4δ

min= −0.5,−0.5 ; δ = +1,+1 ; no disturbance w = 0

Boeing 747

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 4/125

Page 9: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Illustrative Example

0 2 4 6 8 10 12-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

1

time (sec)

State Evolution

0 2 4 6 8 10 12-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

1

time (sec)

Regulated output Evolution

0 2 4 6 8 10 12-6

-4

-2

0

2

4

6

time (sec)

Control Input Evolution

0 2 4 6 8 10 12-3

-2

-1

0

1

2

3

4

time (sec)

Control Input Slope

yminc = −10,−10 ; y

maxc = +10,+10

umin

= −4,−4 ; umax

= +4,+4δ

min= −50,−50 ; δ

max= +50,+50 ; disturbance w = (0.2, 0.2)

Boeing 747

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 4/125

Page 10: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Illustrative Example

0 2 4 6 8 10 12-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

time (sec)

State Evolution

0 2 4 6 8 10 12-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

time (sec)

Regulated output Evolution

0 2 4 6 8 10 12-6

-4

-2

0

2

4

6

time (sec)

Control Input Evolution

0 2 4 6 8 10 12-2

-1

0

1

2

3

4

time (sec)

Control Input Slope

yminc = −0.5,−10 ; y

maxc = +10,+10

umin

= −4,−4 ; umax

= +4,+4δ

min= −50,−50 ; δ = +50,+50 ; disturbance w = (0.2, 0.2)

Boeing 747

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 4/125

Page 11: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Illustrative Example

0 2 4 6 8 10 12-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

1

time (sec)

State Evolution

0 2 4 6 8 10 12-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

time (sec)

Regulated output Evolution

0 2 4 6 8 10 12-6

-4

-2

0

2

4

6

time (sec)

Control Input Evolution

0 2 4 6 8 10 12-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

time (sec)

Control Input Slope

yminc = −0.5,−10 ; y

maxc = +10,+10

umin

= −4,−4 ; umax

= +4,+4δ

min= −0.5,−0.5 ; δ = +1,+1 ; disturbance w = (0.2, 0.2)

Boeing 747

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 4/125

Page 12: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Illustrative Example

0 2 4 6 8 10 12-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

1

time (sec)

State Evolution

0 2 4 6 8 10 12-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

time (sec)

Regulated output Evolution

0 2 4 6 8 10 12-6

-4

-2

0

2

4

6

time (sec)

Control Input Evolution

0 2 4 6 8 10 12-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

time (sec)

Control Input Slope

yminc = −0.5,−10 ; y

maxc = +10,+10

umin

= −4,−4 ; umax

= +4,+4δ

min= −0.5,−0.5 ; δ = +1,+1 ; disturbance w = (1, 1)

Boeing 747

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 4/125

Page 13: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Advantages of Model Predictive Control

1 Control of multi-variable coupled dynamical systems

2 Handling constraints on the state and on the control input

3 Express optimality concerns

4 Conceptually easy handling of nonlinearities in the system model.

5 Systematic design

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 5/125

Page 14: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Advantages of Model Predictive Control

1 Control of multi-variable coupled dynamical systems

2 Handling constraints on the state and on the control input

3 Express optimality concerns

4 Conceptually easy handling of nonlinearities in the system model.

5 Systematic design

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 5/125

Page 15: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Advantages of Model Predictive Control

1 Control of multi-variable coupled dynamical systems

2 Handling constraints on the state and on the control input

3 Express optimality concerns

4 Conceptually easy handling of nonlinearities in the system model.

5 Systematic design

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 5/125

Page 16: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Advantages of Model Predictive Control

1 Control of multi-variable coupled dynamical systems

2 Handling constraints on the state and on the control input

3 Express optimality concerns

4 Conceptually easy handling of nonlinearities in the system model.

5 Systematic design

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 5/125

Page 17: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Illustrative example

Advantages of Model Predictive Control

1 Control of multi-variable coupled dynamical systems

2 Handling constraints on the state and on the control input

3 Express optimality concerns

4 Conceptually easy handling of nonlinearities in the system model.

5 Systematic design

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 5/125

Page 18: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

What is model predictive control ?

Feedback implementation of optimalcontrol using:

Finite prediction horizon

on-line computation

> 5800 successful industrialapplications in

Petrochemical Industry

Food industry

Aerospace, car industryR. Findeisen: NMPC for Fast Nonlinear Systems (Workshop CDC 2006, San Diego)

Non-exhaustive MPC Vendor List

• ABB• ACT• Adaptics• Adaptive Resources• Adersa Home Page• Aspen Technology• Aurel Systems Inc.• Batch CAD• Bonner and Moore• Brainwave• C.F. Picou and Associates• Chemstations• Comdale Technologies• Control Arts Inc.• Control Consulting Inc.• Control Dynamics Homepage• Controlsoft Incorporated• Cybosoft• DOT Products• Trieber Controls• Yokogawa APC• US Process Control L.L.C.• Eldridge Engineering Inc.

• Elsag Bailey• Envision Systems Inc.• Gensym• Enterprise Control Technologies• Fantoft Process Group• MATHWORKS• Honeywell• Hyprotech• Inferential Control Company• IntellOpt• Knowledgescape• MDC Technology• Neuralware• Nexus Engineering• Objectspace• Optimal Control Research• Pavilion Technologies• Predictive Control Ltd.• Process System Consultants• RSI• Simulation and Advanced Controls Inc.• Simtech• Texas Controls Inc.

Typically linear applications and tools

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 6/125

Page 19: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

What is model predictive control ?

Feedback implementation of optimalcontrol using:

Finite prediction horizon

on-line computation

> 5800 successful industrialapplications in

Petrochemical Industry

Food industry

Aerospace, car industryR. Findeisen: NMPC for Fast Nonlinear Systems (Workshop CDC 2006, San Diego)

Non-exhaustive MPC Vendor List

• ABB• ACT• Adaptics• Adaptive Resources• Adersa Home Page• Aspen Technology• Aurel Systems Inc.• Batch CAD• Bonner and Moore• Brainwave• C.F. Picou and Associates• Chemstations• Comdale Technologies• Control Arts Inc.• Control Consulting Inc.• Control Dynamics Homepage• Controlsoft Incorporated• Cybosoft• DOT Products• Trieber Controls• Yokogawa APC• US Process Control L.L.C.• Eldridge Engineering Inc.

• Elsag Bailey• Envision Systems Inc.• Gensym• Enterprise Control Technologies• Fantoft Process Group• MATHWORKS• Honeywell• Hyprotech• Inferential Control Company• IntellOpt• Knowledgescape• MDC Technology• Neuralware• Nexus Engineering• Objectspace• Optimal Control Research• Pavilion Technologies• Predictive Control Ltd.• Process System Consultants• RSI• Simulation and Advanced Controls Inc.• Simtech• Texas Controls Inc.

Typically linear applications and tools

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 6/125

Page 20: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

What is model predictive control ?

Feedback implementation of optimalcontrol using:

Finite prediction horizon

on-line computation

> 5800 successful industrialapplications in

Petrochemical Industry

Food industry

Aerospace, car industry

R. Findeisen: NMPC for Fast Nonlinear Systems (Workshop CDC 2006, San Diego)

Non-exhaustive MPC Vendor List

• ABB• ACT• Adaptics• Adaptive Resources• Adersa Home Page• Aspen Technology• Aurel Systems Inc.• Batch CAD• Bonner and Moore• Brainwave• C.F. Picou and Associates• Chemstations• Comdale Technologies• Control Arts Inc.• Control Consulting Inc.• Control Dynamics Homepage• Controlsoft Incorporated• Cybosoft• DOT Products• Trieber Controls• Yokogawa APC• US Process Control L.L.C.• Eldridge Engineering Inc.

• Elsag Bailey• Envision Systems Inc.• Gensym• Enterprise Control Technologies• Fantoft Process Group• MATHWORKS• Honeywell• Hyprotech• Inferential Control Company• IntellOpt• Knowledgescape• MDC Technology• Neuralware• Nexus Engineering• Objectspace• Optimal Control Research• Pavilion Technologies• Predictive Control Ltd.• Process System Consultants• RSI• Simulation and Advanced Controls Inc.• Simtech• Texas Controls Inc.

Typically linear applications and tools

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 6/125

Page 21: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

What is model predictive control ?

Feedback implementation of optimalcontrol using:

Finite prediction horizon

on-line computation

> 5800 successful industrialapplications in

Petrochemical Industry

Food industry

Aerospace, car industryR. Findeisen: NMPC for Fast Nonlinear Systems (Workshop CDC 2006, San Diego)

Non-exhaustive MPC Vendor List

• ABB• ACT• Adaptics• Adaptive Resources• Adersa Home Page• Aspen Technology• Aurel Systems Inc.• Batch CAD• Bonner and Moore• Brainwave• C.F. Picou and Associates• Chemstations• Comdale Technologies• Control Arts Inc.• Control Consulting Inc.• Control Dynamics Homepage• Controlsoft Incorporated• Cybosoft• DOT Products• Trieber Controls• Yokogawa APC• US Process Control L.L.C.• Eldridge Engineering Inc.

• Elsag Bailey• Envision Systems Inc.• Gensym• Enterprise Control Technologies• Fantoft Process Group• MATHWORKS• Honeywell• Hyprotech• Inferential Control Company• IntellOpt• Knowledgescape• MDC Technology• Neuralware• Nexus Engineering• Objectspace• Optimal Control Research• Pavilion Technologies• Predictive Control Ltd.• Process System Consultants• RSI• Simulation and Advanced Controls Inc.• Simtech• Texas Controls Inc.

Typically linear applications and tools

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 6/125

Page 22: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

What is model predictive control ?

This commercial products mean that

1 MPC is useful

2 MPC is generic

3 MPC is not that straightforward

Let us try to understand the basic idea of MPC . . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 7/125

Page 23: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

What is model predictive control ?

This commercial products mean that

1 MPC is useful

2 MPC is generic

3 MPC is not that straightforward

Let us try to understand the basic idea of MPC . . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 7/125

Page 24: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

What is model predictive control ?

This commercial products mean that

1 MPC is useful

2 MPC is generic

3 MPC is not that straightforward

Let us try to understand the basic idea of MPC . . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 7/125

Page 25: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

What is model predictive control ?

This commercial products mean that

1 MPC is useful

2 MPC is generic

3 MPC is not that straightforward

Let us try to understand the basic idea of MPC . . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 7/125

Page 26: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

What is model predictive control ?

This commercial products mean that

1 MPC is useful

2 MPC is generic

3 MPC is not that straightforward

Let us try to understand the basic idea of MPC . . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 7/125

Page 27: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

Control keywords

System model (State, control, measurement, disturbance)

Constraints (on state, control)

performance index (Operational cost, consumption, performance)

Stability

Robustness

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 8/125

Page 28: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

Control keywords

System model (State, control, measurement, disturbance)

Constraints (on state, control)

performance index (Operational cost, consumption, performance)

Stability

Robustness

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 8/125

Page 29: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

Control keywords

System model (State, control, measurement, disturbance)

Constraints (on state, control)

performance index (Operational cost, consumption, performance)

Stability

Robustness

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 8/125

Page 30: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

Control keywords

System model (State, control, measurement, disturbance)

Constraints (on state, control)

performance index (Operational cost, consumption, performance)

Stability

Robustness

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 8/125

Page 31: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

Control keywords

System model (State, control, measurement, disturbance)

Constraints (on state, control)

performance index (Operational cost, consumption, performance)

Stability

Robustness

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 8/125

Page 32: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

Control keywords

System model (State, control, measurement, disturbance)

Constraints (on state, control)

performance index (Operational cost, consumption, performance)

Stability

Robustness

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 8/125

Page 33: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

NMPC: An intuitive Strategy

Current state

Desired state

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 9/125

Page 34: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

NMPC: An intuitive Strategy

Current state

Desired state

State constraint

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 9/125

Page 35: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

NMPC: An intuitive Strategy

Current state

Desired state

Performance index :

=

Length of the steering path

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 9/125

Page 36: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

NMPC: An intuitive Strategy

Current state

Desired state

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 9/125

Page 37: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

NMPC: An intuitive Strategy

Current state

Desired state

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 9/125

Page 38: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

NMPC: An intuitive Strategy

Current state

Desired state

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 9/125

Page 39: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

NMPC: An intuitive Strategy

Current state

Desired state

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 9/125

Page 40: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

NMPC: An intuitive Strategy

Current state

Desired state

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 9/125

Page 41: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

NMPC: An intuitive Strategy

Current state

Desired state

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 9/125

Page 42: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

NMPC: An intuitive Strategy

Current state

Desired state

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 9/125

Page 43: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

NMPC: An intuitive Strategy

Current state

Desired state

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 9/125

Page 44: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

NMPC: An intuitive Strategy

Desired state

Initially computed trajectory

Closed loop trajectory

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 9/125

Page 45: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

A simple feedback principle (informal)

At each decision instant, evaluate the situation

Based on the evaluation, compute the best strategy

Apply the beginning of the strategy until the next decision instant

Re-evaluate the situation

Recompute the best strategy

Apply the first part until the next decision instant

Keep doing

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 10/125

Page 46: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

A simple feedback principle (informal)

At each decision instant, evaluate the situation

Based on the evaluation, compute the best strategy

Apply the beginning of the strategy until the next decision instant

Re-evaluate the situation

Recompute the best strategy

Apply the first part until the next decision instant

Keep doing

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 10/125

Page 47: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

A simple feedback principle (informal)

At each decision instant, evaluate the situation

Based on the evaluation, compute the best strategy

Apply the beginning of the strategy until the next decision instant

Re-evaluate the situation

Recompute the best strategy

Apply the first part until the next decision instant

Keep doing

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 10/125

Page 48: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

A simple feedback principle (informal)

At each decision instant, evaluate the situation

Based on the evaluation, compute the best strategy

Apply the beginning of the strategy until the next decision instant

Re-evaluate the situation

Recompute the best strategy

Apply the first part until the next decision instant

Keep doing

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 10/125

Page 49: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

A simple feedback principle (informal)

At each decision instant, evaluate the situation

Based on the evaluation, compute the best strategy

Apply the beginning of the strategy until the next decision instant

Re-evaluate the situation

Recompute the best strategy

Apply the first part until the next decision instant

Keep doing

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 10/125

Page 50: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

A simple feedback principle (informal)

At each decision instant, evaluate the situation

Based on the evaluation, compute the best strategy

Apply the beginning of the strategy until the next decision instant

Re-evaluate the situation

Recompute the best strategy

Apply the first part until the next decision instant

Keep doing

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 10/125

Page 51: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Model Predictive Control: An intuitive Presentation

A simple feedback principle (informal)

At each decision instant, evaluate the situation

Based on the evaluation, compute the best strategy

Apply the beginning of the strategy until the next decision instant

Re-evaluate the situation

Recompute the best strategy

Apply the first part until the next decision instant

Keep doing

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 10/125

Page 52: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Formal Definition: The System Model

We consider a discrete-time dynamical system given by:

x(k + 1) = f(x(k), u(k))

x ∈ Rn is the state vector

u ∈ Rm is the vector of manipulated variables (input vector)

x(k) is a short notation for x(kτ) where τ is some sampling period

u(k) is a constant control applied during [kτ, (k + 1)τ ]A sequence of future control inputs on [k, k +Nτ ]:

u(k) =(u(k) . . . u(k +N − 1)

)T ; u(k + i) ∈ Rm

The short notation k+ is sometimes used to denote k + 1Similarly, x+(k) is sometimes used to denote x(k + 1) = x(k+)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 11/125

Page 53: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Formal Definition: The System Model

We consider a discrete-time dynamical system given by:

x(k + 1) = f(x(k), u(k))

x ∈ Rn is the state vector

u ∈ Rm is the vector of manipulated variables (input vector)

x(k) is a short notation for x(kτ) where τ is some sampling period

u(k) is a constant control applied during [kτ, (k + 1)τ ]A sequence of future control inputs on [k, k +Nτ ]:

u(k) =(u(k) . . . u(k +N − 1)

)T ; u(k + i) ∈ Rm

The short notation k+ is sometimes used to denote k + 1Similarly, x+(k) is sometimes used to denote x(k + 1) = x(k+)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 11/125

Page 54: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Formal Definition: The System Model

We consider a discrete-time dynamical system given by:

x(k + 1) = f(x(k), u(k))

x ∈ Rn is the state vector

u ∈ Rm is the vector of manipulated variables (input vector)

x(k) is a short notation for x(kτ) where τ is some sampling period

u(k) is a constant control applied during [kτ, (k + 1)τ ]A sequence of future control inputs on [k, k +Nτ ]:

u(k) =(u(k) . . . u(k +N − 1)

)T ; u(k + i) ∈ Rm

The short notation k+ is sometimes used to denote k + 1Similarly, x+(k) is sometimes used to denote x(k + 1) = x(k+)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 11/125

Page 55: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Formal Definition: The System Model

We consider a discrete-time dynamical system given by:

x(k + 1) = f(x(k), u(k))

x ∈ Rn is the state vector

u ∈ Rm is the vector of manipulated variables (input vector)

x(k) is a short notation for x(kτ) where τ is some sampling period

u(k) is a constant control applied during [kτ, (k + 1)τ ]

A sequence of future control inputs on [k, k +Nτ ]:

u(k) =(u(k) . . . u(k +N − 1)

)T ; u(k + i) ∈ Rm

The short notation k+ is sometimes used to denote k + 1Similarly, x+(k) is sometimes used to denote x(k + 1) = x(k+)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 11/125

Page 56: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Formal Definition: The System Model

We consider a discrete-time dynamical system given by:

x(k + 1) = f(x(k), u(k))

x ∈ Rn is the state vector

u ∈ Rm is the vector of manipulated variables (input vector)

x(k) is a short notation for x(kτ) where τ is some sampling period

u(k) is a constant control applied during [kτ, (k + 1)τ ]A sequence of future control inputs on [k, k +Nτ ]:

u(k) =(u(k) . . . u(k +N − 1)

)T ; u(k + i) ∈ Rm

The short notation k+ is sometimes used to denote k + 1Similarly, x+(k) is sometimes used to denote x(k + 1) = x(k+)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 11/125

Page 57: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Formal Definition: The System Model

We consider a discrete-time dynamical system given by:

x(k + 1) = f(x(k), u(k))

x ∈ Rn is the state vector

u ∈ Rm is the vector of manipulated variables (input vector)

x(k) is a short notation for x(kτ) where τ is some sampling period

u(k) is a constant control applied during [kτ, (k + 1)τ ]A sequence of future control inputs on [k, k +Nτ ]:

u(k) =(u(k) . . . u(k +N − 1)

)T ; u(k + i) ∈ Rm

The short notation k+ is sometimes used to denote k + 1

Similarly, x+(k) is sometimes used to denote x(k + 1) = x(k+)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 11/125

Page 58: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Formal Definition: The System Model

We consider a discrete-time dynamical system given by:

x(k + 1) = f(x(k), u(k))

x ∈ Rn is the state vector

u ∈ Rm is the vector of manipulated variables (input vector)

x(k) is a short notation for x(kτ) where τ is some sampling period

u(k) is a constant control applied during [kτ, (k + 1)τ ]A sequence of future control inputs on [k, k +Nτ ]:

u(k) =(u(k) . . . u(k +N − 1)

)T ; u(k + i) ∈ Rm

The short notation k+ is sometimes used to denote k + 1Similarly, x+(k) is sometimes used to denote x(k + 1) = x(k+)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 11/125

Page 59: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Simple Feedback Principle (Formal Definition)

At decision instant k, measure the state x(k)

Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period [k, k + 1]At decision instant k + 1, measure the state x(k + 1)Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 12/125

Page 60: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Simple Feedback Principle (Formal Definition)

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)

Apply the control u0(k;x(k)) on the sampling period [k, k + 1]At decision instant k + 1, measure the state x(k + 1)Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 12/125

Page 61: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Simple Feedback Principle (Formal Definition)

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period [k, k + 1]

At decision instant k + 1, measure the state x(k + 1)Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 12/125

Page 62: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Simple Feedback Principle (Formal Definition)

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period [k, k + 1]At decision instant k + 1, measure the state x(k + 1)

Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 12/125

Page 63: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Simple Feedback Principle (Formal Definition)

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period [k, k + 1]At decision instant k + 1, measure the state x(k + 1)Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)

Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 12/125

Page 64: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Simple Feedback Principle (Formal Definition)

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period [k, k + 1]At decision instant k + 1, measure the state x(k + 1)Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]

. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 12/125

Page 65: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Simple Feedback Principle (Formal Definition)

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period [k, k + 1]At decision instant k + 1, measure the state x(k + 1)Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 12/125

Page 66: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Simple Feedback Principle (Formal Definition)

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period [k, k + 1]At decision instant k + 1, measure the state x(k + 1)Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 13/125

Page 67: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Sampled State Feedback

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period [k, k + 1]At decision instant k + 1, measure the state x(k + 1)

A state feedback

We have defined a sampled state feedback

u(k) = u0(k;x(k))

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 14/125

Page 68: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Key Task: optimization

At decision instant k, measure the state x(k)

Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period [k, k + 1]At decision instant k + 1, measure the state x(k + 1)Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 15/125

Page 69: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Key Task: optimization

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)

Apply the control u0(k;x(k)) on the sampling period [k, k + 1]At decision instant k + 1, measure the state x(k + 1)Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 15/125

Page 70: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Key Task: optimization

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period [k, k + 1]

At decision instant k + 1, measure the state x(k + 1)Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 15/125

Page 71: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Key Task: optimization

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period [k, k + 1]At decision instant k + 1, measure the state x(k + 1)

Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 15/125

Page 72: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Key Task: optimization

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period [k, k + 1]At decision instant k + 1, measure the state x(k + 1)Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)

Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 15/125

Page 73: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Key Task: optimization

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period [k, k + 1]At decision instant k + 1, measure the state x(k + 1)Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]

. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 15/125

Page 74: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Key Task: optimization

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period [k, k + 1]At decision instant k + 1, measure the state x(k + 1)Based on x(k + 1), compute the best sequence of actions :

u0(x(k + 1)) :=(u0(k + 1;x(k + 1)) u0(k + 2;x(k + 1)) . . .

)Apply the control u0(k + 1;x(k + 1)) on the sampling period[k + 1, k + 2]. . .

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 15/125

Page 75: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A Key Task: optimization

At decision instant k, measure the state x(k)Based on x(k), compute the best sequence of actions :

u0(x(k)) :=(u0(k; x(k)) u0(k + 1; x(k)) . . . u0(k + i; x(k)) . . .

)Apply the control u0(k;x(k)) on the sampling period

We need an optimization problem (time invariant systems)

P(x(k)) : minu

V (x(k),u) | u ∈ U(x(k))

u0(x(k)) is A solution of P(x(k))

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 16/125

Page 76: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Brief recalls on optimization

An optimization, problem is defined by the following elements:

A cost function to be minimized V (u)A vector of decision variable u (degrees of freedom)

A set of admissible values of u, say U

The formal expression of an optimization problem is given by:

minu∈U

V (u)

which has to be interpreted as follows:

Minimize the cost function V (u) in the decision variable uunder the constraint u ∈ U

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 17/125

Page 77: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Brief recalls on optimization

An optimization, problem is defined by the following elements:

A cost function to be minimized V (u)

A vector of decision variable u (degrees of freedom)

A set of admissible values of u, say U

The formal expression of an optimization problem is given by:

minu∈U

V (u)

which has to be interpreted as follows:

Minimize the cost function V (u) in the decision variable uunder the constraint u ∈ U

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 17/125

Page 78: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Brief recalls on optimization

An optimization, problem is defined by the following elements:

A cost function to be minimized V (u)A vector of decision variable u (degrees of freedom)

A set of admissible values of u, say U

The formal expression of an optimization problem is given by:

minu∈U

V (u)

which has to be interpreted as follows:

Minimize the cost function V (u) in the decision variable uunder the constraint u ∈ U

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 17/125

Page 79: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Brief recalls on optimization

An optimization, problem is defined by the following elements:

A cost function to be minimized V (u)A vector of decision variable u (degrees of freedom)

A set of admissible values of u, say U

The formal expression of an optimization problem is given by:

minu∈U

V (u)

which has to be interpreted as follows:

Minimize the cost function V (u) in the decision variable uunder the constraint u ∈ U

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 17/125

Page 80: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Brief recalls on optimization

An optimization, problem is defined by the following elements:

A cost function to be minimized V (u)A vector of decision variable u (degrees of freedom)

A set of admissible values of u, say U

The formal expression of an optimization problem is given by:

minu∈U

V (u)

which has to be interpreted as follows:

Minimize the cost function V (u) in the decision variable uunder the constraint u ∈ U

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 17/125

Page 81: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Brief recalls on optimization

An optimization, problem is defined by the following elements:

A cost function to be minimized V (u)A vector of decision variable u (degrees of freedom)

A set of admissible values of u, say U

The formal expression of an optimization problem is given by:

minu∈U

V (u)

which has to be interpreted as follows:

Minimize the cost function V (u) in the decision variable uunder the constraint u ∈ U

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 17/125

Page 82: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A simple example (1)

Let us take the oversimplified example:

x+ = x+ u

and apply the Model Predictive Control (MPC) design to regulate xaround xd = 1. Moreover assume:

A given prediction horizon Npu(0) = u(1) = · · · = u(Np − 1) = p ∈ [umin, umax]

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 18/125

Page 83: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A simple example (1)

Let us take the oversimplified example:

x+ = x+ u

and apply the Model Predictive Control (MPC) design to regulate xaround xd = 1. Moreover assume:

A given prediction horizon Np

u(0) = u(1) = · · · = u(Np − 1) = p ∈ [umin, umax]

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 18/125

Page 84: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A simple example (1)

Let us take the oversimplified example:

x+ = x+ u

and apply the Model Predictive Control (MPC) design to regulate xaround xd = 1. Moreover assume:

A given prediction horizon Npu(0) = u(1) = · · · = u(Np − 1) = p ∈ [umin, umax]

U =u | u(j) = p ∀j ∈ 0, . . . , Np−1

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 18/125

Page 85: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A simple example (1)

Let us take the oversimplified example:

x+ = x+ u

and apply the Model Predictive Control (MPC) design to regulate xaround xd = 1. Moreover assume:

A given prediction horizon Npu(0) = u(1) = · · · = u(Np − 1) = p ∈ [umin, umax]

U =u | u(j) = p ∀j ∈ 0, . . . , Np−1

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 18/125

Page 86: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A simple example (1)

Let us take the oversimplified example:

x+ = x+ u

and apply the Model Predictive Control (MPC) design to regulate xaround xd = 1. Moreover assume:

A given prediction horizon Npu(0) = u(1) = · · · = u(Np − 1) = p ∈ [umin, umax]

U =u | u(j) = p ∀j ∈ 0, . . . , Np−1

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 18/125

Page 87: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A simple example (1)

Let us take the oversimplified example:

x+ = x+ u

and apply the Model Predictive Control (MPC) design to regulate xaround xd = 1. Moreover assume:

A given prediction horizon Npu(0) = u(1) = · · · = u(Np − 1) = p ∈ [umin, umax]

U =u | u(j) = p ∀j ∈ 0, . . . , Np−1

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 18/125

Page 88: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A simple example (1)

Let us take the oversimplified example:

x+ = x+ u

and apply the Model Predictive Control (MPC) design to regulate xaround xd = 1. Moreover assume:

A given prediction horizon Npu(0) = u(1) = · · · = u(Np − 1) = p ∈ [umin, umax]

V (x(k), p) =Np∑i=1

|x(k + i, p)− 1|2

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 18/125

Page 89: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A simple example (1)

Let us take the oversimplified example:

x+ = x+ u

and apply the Model Predictive Control (MPC) design to regulate xaround xd = 1. Moreover assume:

A given prediction horizon Npu(0) = u(1) = · · · = u(Np − 1) = p ∈ [umin, umax]

V (x(k), p) =Np∑i=1

|[x(k)− 1] + i · p|2

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 18/125

Page 90: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A simple example (1)

Let us take the oversimplified example:

x+ = x+ u

and apply the Model Predictive Control (MPC) design to regulate xaround xd = 1. Moreover assume:

A given prediction horizon Npu(0) = u(1) = · · · = u(Np − 1) = p ∈ [umin, umax]

V (x(k), p) = ‖

x(k)− 1x(k)− 1

...x(k)− 1

+

12...

Np

· p‖2

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 18/125

Page 91: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A simple example (2)

V (x(k), p) = ‖

x(k)− 1x(k)− 1

...x(k)− 1

︸ ︷︷ ︸

ψ0(x(k))

+

12...Np

︸ ︷︷ ︸ψ1

·p‖2

Therefore,

V (x(k), p) =[ψT1 ψ1

]· p2 +

[2ψT1 ψ0(x(k))

]· p+ ψ2

0(x(k))

The unconstrained optimal solution is therefore given by:

punc(x(k)) = −ψT1 ψ0(x(k))ψT1 ψ1

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 19/125

Page 92: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A simple example (2)

V (x(k), p) = ‖

x(k)− 1x(k)− 1

...x(k)− 1

︸ ︷︷ ︸

ψ0(x(k))

+

12...Np

︸ ︷︷ ︸ψ1

·p‖2

Therefore,

V (x(k), p) =[ψT1 ψ1

]· p2 +

[2ψT1 ψ0(x(k))

]· p+ ψ2

0(x(k))

The unconstrained optimal solution is therefore given by:

punc(x(k)) = −ψT1 ψ0(x(k))ψT1 ψ1

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 19/125

Page 93: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A simple example (2)

V (x(k), p) = ‖

x(k)− 1x(k)− 1

...x(k)− 1

︸ ︷︷ ︸

ψ0(x(k))

+

12...Np

︸ ︷︷ ︸ψ1

·p‖2

Therefore,

V (x(k), p) =[ψT1 ψ1

]· p2 +

[2ψT1 ψ0(x(k))

]· p+ ψ2

0(x(k))

The unconstrained optimal solution is therefore given by:

punc(x(k)) = −ψT1 ψ0(x(k))ψT1 ψ1

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 19/125

Page 94: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A simple example (2)

p0(x(k)) =

umin if punc(x(k)) < uminumax if punc(x(k)) > umaxpunc(x(k)) otherwise

Therefore,

V (x(k), p) =[ψT1 ψ1

]· p2 +

[2ψT1 ψ0(x(k))

]· p+ ψ2

0(x(k))

The unconstrained optimal solution is therefore given by:

punc(x(k)) = −ψT1 ψ0(x(k))ψT1 ψ1

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 19/125

Page 95: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

A simple example (3)

This gives the state feedback law:

u = p0(x(k))

where

p0(x(k)) =

umin if punc(x(k)) < uminumax if punc(x(k)) > umaxpunc(x(k)) otherwise

in which

punc(x(k)) = −ψT1 ψ0(x(k))ψT1 ψ1

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 20/125

Page 96: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Simulation of the closed-loop evolutionNsim=20;Np=2;lesx=zeros(Nsim,1);lesx(1)=0;lesu=zeros(Nsim,1);umin=-0.2;umax=+0.2;for i=1:Nsim-1,

lesu(i)=Kdex(lesx(i),Np,umin,umax)lesx(i+1)=lesx(i)+lesu(i);

endlesu(Nsim)=Kdex(lesx(Nsim),Np,umin,umax);subplot(211),plot(lesx,’m-o’,’LineWidth’,2);grid on;xlim([1 Nsim]);xlabel(’sampling period’,’FontSize’,16);hold on;title(’State Evolution’,’FontSize’,16);subplot(212),stairs(lesu,’m-o’,’LineWidth’,2);grid on;xlim([1 Nsim]);xlabel(’sampling period’,’FontSize’,17);hold on;title(’State Evolution’,’FontSize’,16);figure(gcf)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 21/125

Page 97: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Simulation of the closed-loop evolution%--------------------------------------------function u=Kdex(x,Np,umin,umax)

inter=p_unc(x,Np);u=max(umin,min(umax,inter));

return%--------------------------------------------function f=p_unc(x,Np)

inter1=psi1(Np);inter0=psi0(x,Np);f=-inter1’*inter0/(inter1’*inter1);

return%--------------------------------------------function f=psi1(Np)

f=cumsum(ones(Np,1));return%-------------------------------------------function f=psi0(x,Np)

f=ones(Np,1)*(x-1);return%-------------------------------------------

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 21/125

Page 98: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Simulation of the closed-loop evolution

2 4 6 8 10 12 14 16 18 200

0.2

0.4

0.6

0.8

1

sampling period

State Evolution

2 4 6 8 10 12 14 16 18 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

sampling period

Control Evolution

Unconstrained case umin = −∞, umax = +∞

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 22/125

Page 99: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Simulation of the closed-loop evolution

2 4 6 8 10 12 14 16 18 200

0.2

0.4

0.6

0.8

1

sampling period

State Evolution

2 4 6 8 10 12 14 16 18 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

sampling period

Control Evolution

Constrained case umin = −0.4, umax = +0.4

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 22/125

Page 100: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Simulation of the closed-loop evolution

2 4 6 8 10 12 14 16 18 200

0.2

0.4

0.6

0.8

1

sampling period

State Evolution

2 4 6 8 10 12 14 16 18 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

sampling period

Control Evolution

Constrained case umin = −0.2, umax = +0.2

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 22/125

Page 101: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Closed-loop versus Open-Loop

Remember the introductory example:

Desired state

Initially computed trajectory

Closed loop trajectory

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 23/125

Page 102: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Closed-loop versus Open-Loop

Remember that the admissible open-loop control profile for productionsatisfies:

u(0) = u(1) = · · · = u(Np − 1) = p ∈ [umin, umax]

while the closed-loop was such that:

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 23/125

Page 103: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Closed-loop versus Open-Loop

Remember that the admissible open-loop control profile for productionsatisfies:

u(0) = u(1) = · · · = u(Np − 1) = p ∈ [umin, umax]

while the closed-loop was such that:

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 23/125

Page 104: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Crucial property of MPC

Property of MPC

Simple open-loop profiles may still lead to Very rich resulting closed-looptime profiles of control input

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 24/125

Page 105: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Back to the example

Note that in the unconstrained case:

u(k) = punc(x(k)) = −[ ψT1ψT1 ψ1

]· ψ0(x(k))

where

ψ0(x) =

x(k)− 1...

x(k)− 1

and ψ1(x) =

1...Np

which can clearly be put in the following form:

u(k) = −[K(Np)

]· x(k) + v(Np)

which nothing but a linear state feedback with a feed-forward term

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 25/125

Page 106: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Crucial property of MPC

Property 1 of MPC

Simple open-loop profiles may still lead to Very rich resulting closed-looptime profiles of control input

Property 2 of MPC

In the linear unconstrained case, MPC is just a systematic way to define alinear state feedback.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 26/125

Page 107: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Back to the example

In the example, we assumed that the sequence of future control satisfies:

u(k) = u(k + 1) = · · · = u(k +Np − 1) = p

This can also be written as follows:

u(k + i, p) = p ∈ R

This means that the degree of freedom is p, and once p is known, thewhole control sequence if known.

This is called a control parameterization.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 27/125

Page 108: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Trivial control parameterization

In the general case where u ∈ Rm, when the following choice is done:

p =

u(k)

u(k + 1)...

u(k +Np − 1)

∈ RNp·m

The corresponding parameterization is called the trivial parameterization.Namely, all the unknowns are taken as degrees of freedom.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 28/125

Page 109: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Back to the example

Remember that the cost function was given by:

V (x(k), p) =Np∑i=1

|x(k + i, p)− 1|2

A particular feature of the example lies in the fact that the future statetrajectory is given by

x(k + i, p) = x(k) + i · p (Affine in the decision variable p)

The fact that V is quadratic in x(k + i, p) induced a cost function thatwas quadratic in the decision variable p. This highly simplified theoptimization.

Question: To what extent is this feature general ?

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 29/125

Page 110: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Back to the example

Remember that the cost function was given by:

V (x(k), p) =Np∑i=1

|[x(k)− 1] + i · p|2

A particular feature of the example lies in the fact that the future statetrajectory is given by

x(k + i, p) = x(k) + i · p (Affine in the decision variable p)

The fact that V is quadratic in x(k + i, p) induced a cost function thatwas quadratic in the decision variable p. This highly simplified theoptimization.

Question: To what extent is this feature general ?

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 29/125

Page 111: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Back to the example

Remember that the cost function was given by:

V (x(k), p) =Np∑i=1

|[x(k)− 1] + i · p|2

A particular feature of the example lies in the fact that the future statetrajectory is given by

x(k + i, p) = x(k) + i · p (Affine in the decision variable p)

The fact that V is quadratic in x(k + i, p) induced a cost function thatwas quadratic in the decision variable p. This highly simplified theoptimization.

Question: To what extent is this feature general ?

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 29/125

Page 112: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Formal Definition

Back to the example

Remember that the cost function was given by:

V (x(k), p) =Np∑i=1

|[x(k)− 1] + i · p|2

A particular feature of the example lies in the fact that the future statetrajectory is given by

x(k + i, p) = x(k) + i · p (Affine in the decision variable p)

The fact that V is quadratic in x(k + i, p) induced a cost function thatwas quadratic in the decision variable p. This highly simplified theoptimization.

Question: To what extent is this feature general ?

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 29/125

Page 113: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Case of time invariant linear system

Consider the linear time invariant (LTI) system given by:

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

According to the system dynamics, one has:

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

= A[Ax(k) +Bu(k)

]+Bu(k + 1)

= A2x(k) + [AB,B](

u(k)u(k + 1)

)and more generally:

x(k + i) = Aix(k) + [Ai−1B, . . . , AB,B]

u(k)

...u(k + i− 2)u(k + i− 1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 30/125

Page 114: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Case of time invariant linear system

Consider the linear time invariant (LTI) system given by:

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

According to the system dynamics, one has:

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

= A[Ax(k) +Bu(k)

]+Bu(k + 1)

= A2x(k) + [AB,B](

u(k)u(k + 1)

)

and more generally:

x(k + i) = Aix(k) + [Ai−1B, . . . , AB,B]

u(k)

...u(k + i− 2)u(k + i− 1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 30/125

Page 115: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Case of time invariant linear system

Consider the linear time invariant (LTI) system given by:

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

According to the system dynamics, one has:

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

= A[Ax(k) +Bu(k)

]+Bu(k + 1)

= A2x(k) + [AB,B](

u(k)u(k + 1)

)and more generally:

x(k + i) = Aix(k) + [Ai−1B, . . . , AB,B]

u(k)

...u(k + i− 2)u(k + i− 1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 30/125

Page 116: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Case of time invariant linear system

x(k + i) = Aix(k) + [Ai−1B, . . . , AB,B]

u(k)

...u(k + i− 2)u(k + i− 1)

(1)

and using the notation of the trivial parameterization, namely:

p =

u(k)

u(k + 1)...

u(k +Np − 1)

∈ RNp·m

Equation (2) becomes:

x(k + i) = Aix(k) +(

[Ai−1B, . . . , AB,B] ·Π(m,Np)1→i

)p

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 31/125

Page 117: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

State prediction of LTI systems

For a LTI system given by x+ = Ax + Bu, the prediction of the futurestate trajectory under the trivial parameterization is given by:

x(k + i, p) =[Φi]x(k) +

[Ψi

]p

Φi = Ai

Ψi = [Ai−1B, . . . , AB,B] ·Π(m,Np)1→i

Π(m,Np)1→i :=

(I(i·m) Oi·m×(Np−i)·m

)

This generalizes the example case where:

x(k + i, p) = x(k) + i · p = [1]x(k) + [i]p

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 32/125

Page 118: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

State prediction of LTI systems

For a LTI system given by x+ = Ax + Bu, the prediction of the futurestate trajectory under the trivial parameterization is given by:

x(k + i, p) =[Φi]x(k) +

[Ψi

]p

Φi = Ai

Ψi = [Ai−1B, . . . , AB,B] ·Π(m,Np)1→i

Π(m,Np)1→i :=

(I(i·m) Oi·m×(Np−i)·m

)This generalizes the example case where:

x(k + i, p) = x(k) + i · p = [1]x(k) + [i]p

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 32/125

Page 119: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Output prediction of LTI systems

For a LTI system given by x+ = Ax + Bu with the output y = Cx, theprediction of the future output trajectory under the trivial parameterizationis given by:

y(k + i, p) =[CΦi

]x(k) +

[CΨi

]p

Φi = Ai

Ψi = [Ai−1B, . . . , AB,B] ·Π(m,Np)1→i

Π(m,Np)1→i :=

(I(i·m) Oi·m×(Np−i)·m

)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 33/125

Page 120: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Prediction using outputs

Since the prediction of the state can be obtained from output predictionby using:

C = I

We shall work exclusively with output prediction.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 34/125

Page 121: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Back to the example

Remember that in order to regulate at xr = 1, the cost functionV (x(k), p) has been defined by:

V (x(k), p) =Np∑i=1

|x(k + i, p)− xr|2

Now, more generally, assume some output reference trajectory yr(k + i),we need to compute the quadratic cost:

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 35/125

Page 122: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Back to the example

Remember that in order to regulate at xr = 1, the cost functionV (x(k), p) has been defined by:

V (x(k), p) =Np∑i=1

|x(k + i, p)− xr|2

Now, more generally, assume some output reference trajectory yr(k + i),we need to compute the quadratic cost:

V (x(k), p) =Np∑i=1

‖y(k + i, p)− yr(k + i)‖2Q

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 35/125

Page 123: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Back to the example

Remember that in order to regulate at xr = 1, the cost functionV (x(k), p) has been defined by:

V (x(k), p) =Np∑i=1

|x(k + i, p)− xr|2

Now, more generally, assume some output reference trajectory yr(k + i),we need to compute the quadratic cost:

V (x(k), p) =Np∑i=1

∥∥[CΦi]x(k) +

[CΨi

]p− yr(k + i)

∥∥2

Q

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 35/125

Page 124: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Back to the example

Remember that in order to regulate at xr = 1, the cost functionV (x(k), p) has been defined by:

V (x(k), p) =Np∑i=1

|x(k + i, p)− xr|2

Now, more generally, assume some output reference trajectory yr(k + i),we need to compute the quadratic cost:

V (x(k), p) =Np∑i=1

∥∥[CΨi

]p+

[CΦi

]x(k)− yr(k + i)

∥∥2

Q

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 35/125

Page 125: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Back to the example

Remember that in order to regulate at xr = 1, the cost functionV (x(k), p) has been defined by:

V (x(k), p) =Np∑i=1

|x(k + i, p)− xr|2

Now, more generally, assume some output reference trajectory yr(k + i),we need to compute the quadratic cost:

V (x(k), p) =Np∑i=1

∥∥∥∥∥∥∥[CΨi

]︸ ︷︷ ︸Ωi,1

p+[CΦi

]x(k)− yr(k + i)︸ ︷︷ ︸

Ωi,0

∥∥∥∥∥∥∥2

Q

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 35/125

Page 126: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Back to the example

Remember that in order to regulate at xr = 1, the cost functionV (x(k), p) has been defined by:

V (x(k), p) =Np∑i=1

|x(k + i, p)− xr|2

Now, more generally, assume some output reference trajectory yr(k + i),we need to compute the quadratic cost:

V (x(k), p) =Np∑i=1

∥∥[Ωi,1]p+[Ωi,0(x(k), yr(k + i))

]∥∥2

Q

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 35/125

Page 127: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Back to the example

Remember that in order to regulate at xr = 1, the cost functionV (x(k), p) has been defined by:

V (x(k), p) =Np∑i=1

|x(k + i, p)− xr|2

Now, more generally, assume some output reference trajectory yr(k + i),we need to compute the quadratic cost:

V (x(k), p) =Np∑i=1

pT[ΩTi,1QΩi,1

]p+ 2

[ΩTi,0QΩi,1

]p+

[ΩTi,0QΩi,0

]

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 35/125

Page 128: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Back to the example

Remember that in order to regulate at xr = 1, the cost functionV (x(k), p) has been defined by:

V (x(k), p) =Np∑i=1

|x(k + i, p)− xr|2

Now, more generally, assume some output reference trajectory yr(k + i),we need to compute the quadratic cost:

V (x(k), p) = pT

[Np∑i=1

[ΩTi,1QΩi,1

]]p+2

[Np∑i=1

[ΩTi,0QΩi,1

]]p+

[Np∑i=1

[ΩTi,0QΩi,0

]]

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 35/125

Page 129: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

The Quadratic Cost Expression

Given a LTI system x+ = Ax+Bu and the trivial parameterization definedby p ∈ RmNp , the cost function:

V (x(k), p) =Np∑i=1

‖y(k + i, p)− yr(k + i)‖2Q

where y = Cx, can be put in the following quadratic form:

V (x(k), p) = pT[H2

]p+ 2

[h1(x(k), yr(k + ·))

]p+

[h0(x(k), yr(k + ·))

]where

H2 =∑Np

i=1

[ΩTi,1QΩi,1

]where Ωi,1 = CΨi

h1 =∑Np

i=1

[ΩTi,0QΩi,1

]where Ωi,0 = [CΦi]x(k)− yr(k + i)

h0 =∑Np

i=1

[ΩTi,0QΩi,0

]Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 36/125

Page 130: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

The Quadratic Cost Expression

Given a LTI system x+ = Ax+Bu and the trivial parametrization definedby p ∈ RmNp , the cost function:

V (x(k), p) =Np∑i=1

‖y(k + i, p)− yr(k + i)‖2Q

where y = Cx, can be put in the following quadratic form:

V (x(k), p) = pT[H2

]p+ 2

[h1(x(k), yr(k + ·))

]p+

[h0(x(k), yr(k + ·))

]Unique solution if H2 > 0 which gives the unconstrained state feedback:

u(k) = Π(m,Np)1→1 · punc

(x(k), yr(k + ·)

)avec

punc(x(k), yr(k + ·)

)= −H−1

2 · hT1(x(k), yr(k + ·)

)Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 37/125

Page 131: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

The Quadratic Cost Expression

In order to obtain H2 > 0, penalties are added on the control such that

V (x(k), p) =Np∑i=1

[‖y(k + i, p)− yr(k + i)‖2Q + . . .

+‖Π(m,Np)i→i · p︸ ︷︷ ︸u(k+i)

‖2R

which leads to a slight modification on H2 that becomes:

H2 =Np∑i=1

[ΩTi,1QΩi,1

]+[Π(m,Np)i→i

]TR[Π(m,Np)i→i

]

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 38/125

Page 132: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Unconstrained State Feedback (LTI systems)

u(k) = Π(m,Np)1→1 · punc

(x(k), yr(k + ·)

)

which takes the general form:

u(k) = −[K(Np)

]· x(k) + v(Np, yr(k + ·))

with

K(Np) = Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1QCΦi

]v(Np, yr(k + ·)) := Π(m,Np)

1→1 ·H−12 ·

Np∑i=1

[ΩTi,1Q · yr(k + i)

]

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 39/125

Page 133: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Unconstrained State Feedback (LTI systems)

u(k) = Π(m,Np)1→1 · punc

(x(k), yr(k + ·)

)︸ ︷︷ ︸−H−1

2 ·hT1

(x(k),yr(k+·)

)

which takes the general form:

u(k) = −[K(Np)

]· x(k) + v(Np, yr(k + ·))

with

K(Np) = Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1QCΦi

]v(Np, yr(k + ·)) := Π(m,Np)

1→1 ·H−12 ·

Np∑i=1

[ΩTi,1Q · yr(k + i)

]

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 39/125

Page 134: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Unconstrained State Feedback (LTI systems)

u(k) = −Π(m,Np)1→1 ·H−1

2 · hT1(x(k), yr(k + ·)

)

which takes the general form:

u(k) = −[K(Np)

]· x(k) + v(Np, yr(k + ·))

with

K(Np) = Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1QCΦi

]v(Np, yr(k + ·)) := Π(m,Np)

1→1 ·H−12 ·

Np∑i=1

[ΩTi,1Q · yr(k + i)

]

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 39/125

Page 135: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Unconstrained State Feedback (LTI systems)

u(k) = −Π(m,Np)1→1 ·H−1

2 · hT1

(x(k), yr(k + ·)︸ ︷︷ ︸∑Np

i=1

[ΩT

i,1QΩi,0(x(k),yr(k+i)]

which takes the general form:

u(k) = −[K(Np)

]· x(k) + v(Np, yr(k + ·))

with

K(Np) = Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1QCΦi

]v(Np, yr(k + ·)) := Π(m,Np)

1→1 ·H−12 ·

Np∑i=1

[ΩTi,1Q · yr(k + i)

]

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 39/125

Page 136: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Unconstrained State Feedback (LTI systems)

u(k) = −Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1QΩi,0(x(k), yr(k + i)

]

which takes the general form:

u(k) = −[K(Np)

]· x(k) + v(Np, yr(k + ·))

with

K(Np) = Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1QCΦi

]v(Np, yr(k + ·)) := Π(m,Np)

1→1 ·H−12 ·

Np∑i=1

[ΩTi,1Q · yr(k + i)

]

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 39/125

Page 137: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Unconstrained State Feedback (LTI systems)

u(k) = −Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1QΩi,0(x(k), yr(k + i)︸ ︷︷ ︸[

CΦi

]x(k)−yr(k+i)

]

which takes the general form:

u(k) = −[K(Np)

]· x(k) + v(Np, yr(k + ·))

with

K(Np) = Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1QCΦi

]v(Np, yr(k + ·)) := Π(m,Np)

1→1 ·H−12 ·

Np∑i=1

[ΩTi,1Q · yr(k + i)

]

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 39/125

Page 138: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Unconstrained State Feedback (LTI systems)

u(k) = −Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1Q · [

[CΦi

]x(k)− yr(k + i)]

]

which takes the general form:

u(k) = −[K(Np)

]· x(k) + v(Np, yr(k + ·))

with

K(Np) = Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1QCΦi

]v(Np, yr(k + ·)) := Π(m,Np)

1→1 ·H−12 ·

Np∑i=1

[ΩTi,1Q · yr(k + i)

]

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 39/125

Page 139: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Unconstrained State Feedback (LTI systems)

u(k) = −Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1Q · [

[CΦi

]x(k)− yr(k + i)]

]which takes the general form:

u(k) = −[K(Np)

]· x(k) + v(Np, yr(k + ·))

with

K(Np) = Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1QCΦi

]v(Np, yr(k + ·)) := Π(m,Np)

1→1 ·H−12 ·

Np∑i=1

[ΩTi,1Q · yr(k + i)

]Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 39/125

Page 140: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Unconstrained State Feedback (LTI systems)

u(k) = −Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1Q · [

[CΦi

]x(k)− yr(k + i)]

]which takes the general form:

u(k) = −[K(Np)

]· x(k) + v(Np, yr(k + ·))

The feedback gain K(Np) depends only on Np

The feed-forward term v(Np, yr(k + ·)) depends on Np and thereference trajectory yr(·)

The stability of the closed-loop system depends on eigenvalues ofthe closed-loop matrix:

Acl(Np) := A−B ·K(Np)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 40/125

Page 141: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Deeper in the unconstrained feed-forward term

Recall that the feed-forward term is given by:

v(Np, yr(k + ·)) := Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1Q · yr(k + i)

]This can be put in the following form:

v(Np, yr(k + ·)) :=

Π(m,Np)1→1 ·H−1

2 ·(ΩT1,1Q, . . . ,Ω

TNp,1

Q)·

yr(k + 1)...

yr(k +Np)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 41/125

Page 142: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Deeper in the unconstrained feed-forward term

Recall that the feed-forward term is given by:

v(Np, yr(k + ·)) := Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1Q · yr(k + i)

]This can be put in the following form:

v(Np, yr(k + ·)) :=

Π(m,Np)1→1 ·H−1

2 ·(ΩT1,1Q, . . . ,Ω

TNp,1

Q)︸ ︷︷ ︸

G(Np)

·

yr(k + 1)...

yr(k +Np)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 41/125

Page 143: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Unconstrained State Feedback (LTI Systems)

The predictive control law for a linear time invariant system with noconstraints:

u(k) = −[K(Np)

]· x(k) +

[G(Np)

] yr(k + 1)...

yr(k +Np)

with

K(Np) := Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1QCΦi

]G(Np) := Π(m,Np)

1→1 ·H−12 ·

(ΩT1,1Q, . . . ,Ω

TNp,1

Q)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 42/125

Page 144: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Particular case: Constant Set-point

In the case where yr(k + ·) = yr is constant, one obtains:

u(k) = −[K(Np)

]· x(k) +

[Gc(Np)

]· yr

with

K(Np) := Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1QCΦi

]Gc(Np) := Π(m,Np)

1→1 ·H−12 ·

Np∑i=1

ΩTi,1Q

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 43/125

Page 145: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

%==========================================================================% This function computes the feedback gains for a given prediction% horizon Np and given weighting matrices Q and R%==========================================================================function [K,G,Gc]=K_Np(A,B,C,Np,Q,R)

[n,m]=size(B);[ny,n]=size(C);H=H2(A,B,C,Np,Q,R);inter=zeros(Np*m,n);interG=zeros(Np*m,Np*ny);interGc=zeros(Np*m,ny);for i=1:Np,

O1i=Omega_i_1(A,B,C,Np,i);Phii=Phi_i(A,i);inter=inter+O1i’*Q*C*Phii;interG(:,(i-1)*ny+1:i*ny)=O1i’*Q;interGc=interGc+O1i’*Q;

endK=Pi_select(m,Np,1,1)*(H\inter);G=Pi_select(m,Np,1,1)*(H\interG);Gc=Pi_select(m,Np,1,1)*(H\interGc);

return%==========================================================================

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 44/125

Page 146: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Example: The Triple Integrator

Example: The triple integrator

Let us take the triple integrator system

x1 = x2

x2 = x3

x3 = u

y = x1

Obtain the discrete-time representation

Compute K(Np) for Np = 1, . . . , 15plot the stability indicator:

S(Np) := maxi∈1,2,3

|λi(A−B ·K(Np)|

using different Q’s, R = 1 and C = (1, 0, 0) and τ = 0.1.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 45/125

Page 147: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Example: The Triple Integrator

%==========================================================================% Example: Triple integrator.%==========================================================================A=[0 1 0;0 0 1;0 0 0];B=[0;0;1];C=[1 0 0];Q=5;R=1;tau=0.1;[Ad,Bd]=c2d(A,B,tau);S=zeros(15,1);Np_max=35;Np=(1:1:Np_max)’;n_Np=length(Np);for Np=1:Np_max,

[K,G,Gc]=K_Np(Ad,Bd,C,Np,Q,R);S(Np)=max(abs(eig(Ad-Bd*K)));

endplot(S,’g-o’,’LineWidth’,2);grid on;xlabel(’Prediction Horizon N_p’,’FontSize’,16);title(’Stability indicator S(N_p)’,’FontSize’,16);xlim([1 Np_max]);figure(gcf);hold on;plot(ones(size(S)),’r’,’LineWidth’,2);set(gca,’FontSize’,16)%==========================================================================

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 46/125

Page 148: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Example: The Triple Integrator

5 10 15 20 25 30 35 40 45 500.92

0.94

0.96

0.98

1

1.02

1.04

Prediction Horizon Np

Stability indicator S(Np)

Q=1Q=2Q=5Q=10stability bound

(R = 1,τ = 0.1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 47/125

Page 149: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Example: The Triple Integrator

Stability vs the prediction horizon & the cost function

Consequently, under the conditions:

C = (1, 0, 0)R = 1

the stability conditions are given by:

Weighting matrix Q stability condition1 Np ≥ 202 Np ≥ 175 Np ≥ 14

10 Np ≥ 13

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 48/125

Page 150: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Penalizing The State Trajectory

Penalizing the state trajectory

Suppose that we define the cost function

V (x(k), p) =Np∑i=1

[‖x(k + i, p)‖2Q + ‖u(k + i)‖2R

]This can be done using the same algorithm provided that:

C = I3×3

%=================================% Example: Triple integrator.%=================================A=[0 1 0;0 0 1;0 0 0];B=[0;0;1];C=eye(3);Q=eye(3);R=1;......

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 49/125

Page 151: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Penalizing The State Trajectory

5 10 15 20 25 30 35 40 45 500.92

0.94

0.96

0.98

1

1.02

1.04

Prediction Horizon Np

Stability indicator S(Np)

Q=1Q=2Q=5Q=10C=eye(3), Q=eye(3)stability bound

(R = 1,τ = 0.1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 50/125

Page 152: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Penalizing The State Trajectory

Penalizing the state trajectory

Stability is obtained for all prediction horizon !This is a generic property of Model Predictive Control:

Penalizing the whole state vector increases the stability.

Observe that when Np →∞, one obtains the infinite horizon LQregulator that minimizes the cost function:

V (x(k), p) =+∞∑i=1

[‖x(k + i, p)‖2Q + ‖u(k + i)‖2R

]that can be obtained using the Matlab command:

[K,S,E] = DLQR(A,B,Q,R,N) calculates the optimal gain matrix Ksuch that the state-feedback law u[n] = -Kx[n] minimizes thecost function

J = Sum x’Qx + u’Ru + 2*x’Nu

subject to the state dynamics x[n+1] = Ax[n] + Bu[n].

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 51/125

Page 153: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Penalizing The State Trajectory

Penalizing the state trajectory

Stability is obtained for all prediction horizon !This is a generic property of Model Predictive Control:

Penalizing the whole state vector increases the stability.

Observe that when Np →∞, one obtains the infinite horizon LQregulator that minimizes the cost function:

V (x(k), p) =+∞∑i=1

[‖x(k + i, p)‖2Q + ‖u(k + i)‖2R

]

that can be obtained using the Matlab command:

[K,S,E] = DLQR(A,B,Q,R,N) calculates the optimal gain matrix Ksuch that the state-feedback law u[n] = -Kx[n] minimizes thecost function

J = Sum x’Qx + u’Ru + 2*x’Nu

subject to the state dynamics x[n+1] = Ax[n] + Bu[n].

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 51/125

Page 154: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Penalizing The State Trajectory

Penalizing the state trajectory

Stability is obtained for all prediction horizon !This is a generic property of Model Predictive Control:

Penalizing the whole state vector increases the stability.

Observe that when Np →∞, one obtains the infinite horizon LQregulator that minimizes the cost function:

V (x(k), p) =+∞∑i=1

[‖x(k + i, p)‖2Q + ‖u(k + i)‖2R

]that can be obtained using the Matlab command:

[K,S,E] = DLQR(A,B,Q,R,N) calculates the optimal gain matrix Ksuch that the state-feedback law u[n] = -Kx[n] minimizes thecost function

J = Sum x’Qx + u’Ru + 2*x’Nu

subject to the state dynamics x[n+1] = Ax[n] + Bu[n].

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 51/125

Page 155: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

MPC for Unconstrained LTI Systems

Penalizing The State Trajectory

10 20 30 40 50 60 70 80 90 1000

0.5

1

1.5

2

2.5

Prediction Horizon Np

Components of K(Np) (*) / components of K

LQR

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 52/125

Page 156: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

Unconstrained Tracking of Exogenous Signal

Remember that the unconstrained MPC state feedback is given by:

u(k) = −[K(Np)

]· x(k) +

[G(Np)

] yr(k + 1)...

yr(k +Np)

Let us try this formulaes to force the output of the triple integrator totrack the following reference signal:

yr(t) = sin(2π5t)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 53/125

Page 157: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

%--------------------------------------------------------------------------x0=[1;0;0];Np=20;tsim=20;lest=(0:tau:tsim)’;nt=size(lest,1);yref=sin(2*pi/5*(0:tau:2*tsim)’);Q=diag(10000);R=1;[K,G,Gc]=K_Np(Ad,Bd,C,Np,Q,R);lesx=zeros(nt,3);lesy=zeros(nt,1);lesu=zeros(nt,1);%--------------------------------------------------------------------------yref=sin(2*pi/5*(0:tau:2*tsim)’);lesx(1,:)=x0’;lesy(1)=C*lesx(1,:)’;for i=1:nt-1,

yref_pred=yref(i+1:i+Np);u=-K*lesx(i,:)’+G*yref_pred;lesu(i,:)=u’;xplus=Ad*lesx(i,:)’+Bd*u;lesx(i+1,:)=xplus’;lesy(i+1)=C*xplus;

end

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 54/125

Page 158: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

Unconstrained Tracking of Exogenous Signal: Results (1)

0 2 4 6 8 10 12 14 16 18 20-1

-0.5

0

0.5

1

time

Tracking results with Q=100

0 2 4 6 8 10 12 14 16 18 20-2

-1

0

1

2

time

Control Evolution with Q=100

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 55/125

Page 159: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

Unconstrained Tracking of Exogenous Signal: Results (2)

0 2 4 6 8 10 12 14 16 18 20-1

-0.5

0

0.5

1

time

Tracking results with Q=1000

0 2 4 6 8 10 12 14 16 18 20-6

-4

-2

0

2

4

time

Control Evolution with Q=1000

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 56/125

Page 160: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

Unconstrained Tracking of Exogenous Signal: Results (3)

0 2 4 6 8 10 12 14 16 18 20-1

-0.5

0

0.5

1

time

Tracking results with Q=10000

0 2 4 6 8 10 12 14 16 18 20-30

-20

-10

0

10

20

time

Control Evolution with Q=10000

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 57/125

Page 161: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

Unconstrained Tracking a Square Reference

0 2 4 6 8 10 12 14 16 18 20-0.5

0

0.5

1

1.5

time

Tracking results with Q=100

0 2 4 6 8 10 12 14 16 18 20-10

-5

0

5

time

Control Evolution with Q=100

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 58/125

Page 162: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

Unconstrained Tracking a Square Reference

0 2 4 6 8 10 12 14 16 18 20-0.5

0

0.5

1

1.5

time

Tracking results with Q=10000

0 2 4 6 8 10 12 14 16 18 20-100

-50

0

50

time

Control Evolution with Q=10000

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 58/125

Page 163: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

Unconstrained Tracking a Square Reference

0 2 4 6 8 10 12 14 16 18 20-0.5

0

0.5

1

1.5

time

Tracking results with Q=100000000

0 2 4 6 8 10 12 14 16 18 20-2000

-1000

0

1000

2000

3000

time

Control Evolution with Q=100000000

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 58/125

Page 164: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

Unconstrained Tracking a Square Reference

0 2 4 6 8 10 12 14 16 18 20-0.5

0

0.5

1

1.5

time

Tracking results with Q=10000000000

0 2 4 6 8 10 12 14 16 18 20-5000

0

5000

time

Control Evolution with Q=10000000000

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 58/125

Page 165: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

What about actuator saturations . . . ?

The last plots shows that handling the actuator saturations is mandatory.

Imagine that the control input u is constrained, namely:

u ∈ [umin,+umax] ; umax = −umin = 1000

What happens if we brutally saturate the computed feedback, that is:

u(k) = minumax,max

umin,KMPC(x(k))

(2)

=: Sat(u(k), umin, umax

)(3)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 59/125

Page 166: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

Constrained Tracking a Square Reference

0 2 4 6 8 10 12 14 16 18 20-0.5

0

0.5

1

1.5

time

Tracking results with Q=10000000000

0 2 4 6 8 10 12 14 16 18 20-5000

0

5000

time

Control Evolution with Q=10000000000

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 60/125

Page 167: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

Constrained Tracking a Square Reference

0 2 4 6 8 10 12 14 16 18 20-0.5

0

0.5

1

1.5

time

Tracking results with Q=100000000 with saturation at umax

=1000

0 2 4 6 8 10 12 14 16 18 20

-1000

-500

0

500

1000

time

Tracking results with Q=100000000 with saturation at umax

=1000

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 60/125

Page 168: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

Constrained Tracking a Square Reference

0 2 4 6 8 10 12 14 16 18 20-10

-5

0

5

10

time

Tracking results with Q=100000000 with saturation at umax

=1000

0 2 4 6 8 10 12 14 16 18 20

-1000

-500

0

500

1000

time

Tracking results with Q=100000000 with saturation at umax

=1000

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 60/125

Page 169: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

Constrained Tracking a Square Reference

0 2 4 6 8 10 12 14 16 18 20-1000

-500

0

500

1000

time

Tracking results with Q=100000000 with saturation at umax

=1000

0 2 4 6 8 10 12 14 16 18 20

-1000

-500

0

500

1000

time

Tracking results with Q=100000000 with saturation at umax

=1000

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 60/125

Page 170: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Unconstrained Tracking of Exogenous Signal

Constrained Tracking a Square Reference

0 2 4 6 8 10 12 14 16 18 20-1

-0.5

0

0.5

1x 10

5

time

Tracking results with Q=100000000 with saturation at umax

=1000

0 2 4 6 8 10 12 14 16 18 20

-1000

-500

0

500

1000

time

Tracking results with Q=100000000 with saturation at umax

=1000

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 60/125

Page 171: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Constraints need to be handled Explicitly . . . !

There is no actuator without constraints

Many state variables (or combinaison of state variables) have to beconstrained:

Either for safety reasons,

Or in order to meet the specification requirements,

etc.

High performance requirement generally steers the system to theboundary of the admissible operating domain and therefore leads toactive constraints.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 61/125

Page 172: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Constraints need to be handled Explicitly . . . !

There is no actuator without constraints

Many state variables (or combinaison of state variables) have to beconstrained:

Either for safety reasons,

Or in order to meet the specification requirements,

etc.

High performance requirement generally steers the system to theboundary of the admissible operating domain and therefore leads toactive constraints.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 61/125

Page 173: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Constraints need to be handled Explicitly . . . !

There is no actuator without constraints

Many state variables (or combinaison of state variables) have to beconstrained:

Either for safety reasons,

Or in order to meet the specification requirements,

etc.

High performance requirement generally steers the system to theboundary of the admissible operating domain and therefore leads toactive constraints.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 61/125

Page 174: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Constraints need to be handled Explicitly . . . !

There is no actuator without constraints

Many state variables (or combinaison of state variables) have to beconstrained:

Either for safety reasons,

Or in order to meet the specification requirements,

etc.

High performance requirement generally steers the system to theboundary of the admissible operating domain and therefore leads toactive constraints.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 61/125

Page 175: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Constraints need to be handled Explicitly . . . !

There is no actuator without constraints

Many state variables (or combinaison of state variables) have to beconstrained:

Either for safety reasons,

Or in order to meet the specification requirements,

etc.

High performance requirement generally steers the system to theboundary of the admissible operating domain and therefore leads toactive constraints.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 61/125

Page 176: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Constraints need to be handled Explicitly . . . !

There is no actuator without constraints

Many state variables (or combinaison of state variables) have to beconstrained:

Either for safety reasons,

Or in order to meet the specification requirements,

etc.

High performance requirement generally steers the system to theboundary of the admissible operating domain and therefore leads toactive constraints.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 61/125

Page 177: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

General Form of Constraints

Three kinds of constraints will be considered for LTI systems:

1 Trajectory constraints:

CT · x(k + i) +DT · u(k + i− 1) ≤ bT for all i ∈ 1, . . . , Np

2 Final constraints:

CF · x(k +Np) +DF · u(k +Np − 1) = bF

3 Rate constraints on control inputs

u(k+ i) ∈ u(k+ i−1) + [δmin, δmax] for all i ∈ 0, . . . , Np − 1

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 62/125

Page 178: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

General Form of Constraints

Three kinds of constraints will be considered for LTI systems:

1 Trajectory constraints:

CT · x(k + i) +DT · u(k + i− 1) ≤ bT for all i ∈ 1, . . . , Np

2 Final constraints:

CF · x(k +Np) +DF · u(k +Np − 1) = bF

3 Rate constraints on control inputs

u(k+ i) ∈ u(k+ i−1) + [δmin, δmax] for all i ∈ 0, . . . , Np − 1

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 62/125

Page 179: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

General Form of Constraints

Three kinds of constraints will be considered for LTI systems:

1 Trajectory constraints:

CT · x(k + i) +DT · u(k + i− 1) ≤ bT for all i ∈ 1, . . . , Np

2 Final constraints:

CF · x(k +Np) +DF · u(k +Np − 1) = bF

3 Rate constraints on control inputs

u(k+ i) ∈ u(k+ i−1) + [δmin, δmax] for all i ∈ 0, . . . , Np − 1

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 62/125

Page 180: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

General Form of Constraints

Three kinds of constraints will be considered for LTI systems:

1 Trajectory constraints:

CT · x(k + i) +DT · u(k + i− 1) ≤ bT for all i ∈ 1, . . . , Np

2 Final constraints:

CF · x(k +Np) +DF · u(k +Np − 1) = bF

3 Rate constraints on control inputs

u(k+ i) ∈ u(k+ i−1) + [δmin, δmax] for all i ∈ 0, . . . , Np − 1

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 62/125

Page 181: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

General Form of Constraints

Three kinds of constraints will be considered for LTI systems:

1 Trajectory constraints:

CT · x(k + i) +DT · u(k + i− 1) ≤ bT for all i ∈ 1, . . . , Np

2 Final constraints:

CF · x(k +Np) +DF · u(k +Np − 1) = bF

3 Rate constraints on control inputs

u(k+ i) ∈ u(k+ i−1) + [δmin, δmax] for all i ∈ 0, . . . , Np − 1

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 62/125

Page 182: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Trajectory Constraints

Trajectory constraints

CT · x(k + i) +DT · u(k + i− 1) ≤ bT

+Cc−CcOO

x(k + i) +

OO+I−I

u(k + i− 1) ≤

+ymaxc

−yminc

+umax

−umin

yc(k + i) = Cc · x(k + i) ≤ ymaxc

yc(k + i) = Cc · x(k + i) ≥ yminc

u(k + i− 1) ≤ umax

u(k + i− 1) ≥ umin

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 63/125

Page 183: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Trajectory Constraints

Trajectory constraints

CT · x(k + i) +DT · u(k + i− 1) ≤ bT

where

CT :=

+Cc−CcOO

; DT :=

OO+I−I

; bT :=

+ymaxc

−yminc

+umax

−umin

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 64/125

Page 184: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Trajectory Constraints Re-writing

CT · x(k + i) +DT · u(k + i− 1) ≤ bT

Consequently, the trajectory constraints given by:

CT · x(k + i) +DT · u(k + i− 1) ≤ bT

is equivalent to the following linear system of inequalities:[Γ(i)T

]· p ≤ Θ(i)

T where

Γ(i)T := CTΨi +DT ·Π

(m,Np)i→i and

Θ(i)T := bT −

[CTΦi

]x(k)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 65/125

Page 185: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Trajectory Constraints Re-writing

CT · x(k + i, p) +DT ·Π(m,Np)i→i · p ≤ bT

Consequently, the trajectory constraints given by:

CT · x(k + i) +DT · u(k + i− 1) ≤ bT

is equivalent to the following linear system of inequalities:[Γ(i)T

]· p ≤ Θ(i)

T where

Γ(i)T := CTΨi +DT ·Π

(m,Np)i→i and

Θ(i)T := bT −

[CTΦi

]x(k)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 65/125

Page 186: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Trajectory Constraints Re-writing

CT · x(k + i, p)︸ ︷︷ ︸[CT Φi

]x(k)+

[CT Ψi

]p

+DT ·Π(m,Np)i→i · p ≤ bT

Consequently, the trajectory constraints given by:

CT · x(k + i) +DT · u(k + i− 1) ≤ bT

is equivalent to the following linear system of inequalities:[Γ(i)T

]· p ≤ Θ(i)

T where

Γ(i)T := CTΨi +DT ·Π

(m,Np)i→i and

Θ(i)T := bT −

[CTΦi

]x(k)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 65/125

Page 187: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Trajectory Constraints Re-writing

[CTΦi

]x(k) +

[CTΨi +DT ·Π

(m,Np)i→i

]p ≤ bT

Consequently, the trajectory constraints given by:

CT · x(k + i) +DT · u(k + i− 1) ≤ bT

is equivalent to the following linear system of inequalities:[Γ(i)T

]· p ≤ Θ(i)

T where

Γ(i)T := CTΨi +DT ·Π

(m,Np)i→i and

Θ(i)T := bT −

[CTΦi

]x(k)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 65/125

Page 188: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Trajectory Constraints Re-writing

[CTΨi +DT ·Π

(m,Np)i→i

]p ≤ bT −

[CTΦi

]x(k)

Consequently, the trajectory constraints given by:

CT · x(k + i) +DT · u(k + i− 1) ≤ bT

is equivalent to the following linear system of inequalities:[Γ(i)T

]· p ≤ Θ(i)

T where

Γ(i)T := CTΨi +DT ·Π

(m,Np)i→i and

Θ(i)T := bT −

[CTΦi

]x(k)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 65/125

Page 189: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Trajectory Constraints Re-writing

[CTΨi +DT ·Π

(m,Np)i→i

]p ≤ bT −

[CTΦi

]x(k)

Consequently, the trajectory constraints given by:

CT · x(k + i) +DT · u(k + i− 1) ≤ bT

is equivalent to the following linear system of inequalities:[Γ(i)T

]· p ≤ Θ(i)

T where

Γ(i)T := CTΨi +DT ·Π

(m,Np)i→i and

Θ(i)T := bT −

[CTΦi

]x(k)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 65/125

Page 190: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Trajectory Constraints Re-writing

Therefore, by concatenating the constraints for i = 1, . . . , Np:Γ(1)T...

Γ(Np)T

· p ≤

Θ(1)T...

Θ(Np)T

that can be written in the following condensed form:

[ΓT]· p ≤

[ΘT

]=[ΘT

]1

+[ΘT

]2· x(k)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 66/125

Page 191: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Trajectory Constraints Re-writing

Therefore, by concatenating the constraints for i = 1, . . . , Np:Γ(1)T...

Γ(Np)T

︸ ︷︷ ︸

ΓT

·p ≤

Θ(1)T...

Θ(Np)T

︸ ︷︷ ︸

ΘT

that can be written in the following condensed form:

[ΓT]· p ≤

[ΘT

]=[ΘT

]1

+[ΘT

]2· x(k)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 66/125

Page 192: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Trajectory Constraints Re-writing

where

[ΘT

]1

=

bT...bT

∈ RNp·nyc

[ΘT

]2

= −

CTΦ1

...CTΦNp

∈ R(Np·nyc )×n

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 67/125

Page 193: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Trajectory Constraints Re-writing

%--------------------------------------------------------------------------% Function that computes the matrices Gamma_T, Theta_T_1 and Theta_T_2% enabling trajectory constraints handling.%--------------------------------------------------------------------------function [Gamma_T,Theta_T_1,Theta_T_2]=...

traj_constr(A,B,Cc,Np,yc_min,yc_max,u_min,u_max)[n,m]=size(B);nyc=size(Cc,1);C_T=[Cc;-Cc;zeros(m,n);zeros(m,n)];D_T=[zeros(2*nyc,m);eye(m);-eye(m)];b_T=[yc_max;-yc_min;u_max;-u_min];Gamma_T=zeros(Np*nyc,Np*m);Theta_T_1=zeros(Np*size(b_T,1),1);Theta_T_2=zeros(Np*size(b_T,1),n);for i=1:Np,

ind=((i-1)*size(b_T,1)+1:i*size(b_T,1))’;Phi=Phi_i(A,i);Psi=Psi_i(A,B,Np,i);Gamma_i=C_T*Psi+D_T*Pi_select(m,Np,i,i);Theta_T_1(ind,:)=b_T;Theta_i_2(ind,:)=-C_T*Phi;Gamma_T(ind,:)=Gamma_i;

endreturn%--------------------------------------------------------------------------

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 68/125

Page 194: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Final Equality Constraints

Final Equality Constraints

CF · x(k +Np) +DF · u(k +Np − 1) = bF

(Cfinal

O

)x(k +Np) +

(OI

)u(k +Np − 1) =

(yfinalufinal

)

Cfinal · x(k +Np) = yfinal

u(k +Np − 1) = ufinal

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 69/125

Page 195: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Final Equality Constraints

Final Equality Constraints

CF · x(k +Np) +DF · u(k +Np − 1) = bF

where

CF =(CfinalOm×n

); DF =

(Onyfinal

×mIm×m

); bF =

(yfinalufinal

)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 70/125

Page 196: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Final Equality Constraints

Final Equality Constraints

CF · x(k +Np) +DF · u(k +Np − 1) ≤ bF

Using the same development as for the trajectory constraints, the abovecondition becomes:[

ΓF]· p =

[ΘF

]=[ΘF

]1

+[ΘF

]2· x(k) where

ΓF := CFΨNp+DF ·Π

(m,Np)Np→Np

and

[ΘF ]1 := bF

[ΘF ]2 = −[CFΦNp

]Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 71/125

Page 197: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Final Equality Constraints

%--------------------------------------------------------------------------% Function that computes the matrices Gamma_F, Theta_F_1 and Theta_F_2% enabling final (terminal) constraints handling.%--------------------------------------------------------------------------function [Gamma_F,Theta_F_1,Theta_F_2]=final_constr(A,B,Cfinal,Np,yfinal,ufinal)

[n,m]=size(B);nyfinal=size(Cfinal,1);C_F=[Cfinal;zeros(m,nyfinal)];D_F=[zeros(nyfinal,m);eye(m)];b_F=[yfinal;ufinal];Gamma_F=C_F*Psi_i(A,B,Np,Np)+D_F*Pi_select(m,Np,Np,Np);Theta_F_1=b_F;Theta_F_2=-C_F*Phi_i(A,Np);

return%--------------------------------------------------------------------------

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 72/125

Page 198: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Rate constraints on Control Inputs

Rate constraints on Control Inputs

u(k + i) ∈ u(k + i− 1) + [δmin, δmax] for all i ∈ 0, . . . , Np − 1

This can be written as follows:

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 73/125

Page 199: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Rate constraints on Control Inputs

Rate constraints on Control Inputs

u(k + i) ∈ u(k + i− 1) + [δmin, δmax] for all i ∈ 0, . . . , Np − 1

This can be written as follows:

δmin ≤ u(k)− u(k − 1) ≤ δmaxδmin ≤ u(k + 1)− u(k) ≤ δmax...

......

δmin ≤ u(k +Np − 1)− u(k +Np − 2) ≤ δmax

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 73/125

Page 200: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Rate constraints on Control Inputs

Rate constraints on Control Inputs

u(k + i) ∈ u(k + i− 1) + [δmin, δmax] for all i ∈ 0, . . . , Np − 1

This can be written as follows:

δmin ≤[Π(m,Np)

1→1

]p− u(k − 1) ≤ δmax

δmin ≤ u(k + 1)− u(k) ≤ δmax...

......

δmin ≤ u(k +Np − 1)− u(k −+Np − 2) ≤ δmax

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 73/125

Page 201: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Rate constraints on Control Inputs

Rate constraints on Control Inputs

u(k + i) ∈ u(k + i− 1) + [δmin, δmax] for all i ∈ 0, . . . , Np − 1

This can be written as follows:

δmin ≤[Π(m,Np)

1→1

]p− u(k − 1) ≤ δmax

δmin ≤[Π(m,Np)

2→2 −Π(m,Np)1→1

]p ≤ δmax

......

...

δmin ≤ u(k +Np − 1)− u(k −+Np − 2) ≤ δmax

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 73/125

Page 202: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Rate constraints on Control Inputs

Rate constraints on Control Inputs

u(k + i) ∈ u(k + i− 1) + [δmin, δmax] for all i ∈ 0, . . . , Np − 1

This can be written as follows:

δmin ≤[Π(m,Np)

1→1

]p− u(k − 1) ≤ δmax

δmin ≤[Π(m,Np)

2→2 −Π(m,Np)1→1

]p ≤ δmax

......

...

δmin ≤[Π(m,Np)Np→Np

−Π(m,Np)

(Np−1)→(Np−1)

]p ≤ δmax

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 73/125

Page 203: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Rate constraints on Control Inputs

Rate constraints on Control Inputs

u(k + i) ∈ u(k + i− 1) + [δmin, δmax] for all i ∈ 0, . . . , Np − 1

This can be written as follows:

δminδmin

...δmin

Π(m,Np)1→1

Π(m,Np)2→2 −Π(m,Np)

1→1...

Π(m,Np)Np→Np

−Π(m,Np)

(Np−1)→(Np−1)

p−

u(k − 1)Om×1

...Om×1

≤δmaxδmax

...δmax

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 73/125

Page 204: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Rate constraints on Control Inputs

Rate constraints on Control Inputs

u(k + i) ∈ u(k + i− 1) + [δmin, δmax] for all i ∈ 0, . . . , Np − 1

This can be written as follows:

δminδmin

...δmin

︸ ︷︷ ︸δmin

Π(m,Np)

1→1

Π(m,Np)2→2 −Π(m,Np)

1→1...

Π(m,Np)Np→Np

−Π(m,Np)

(Np−1)→(Np−1)

︸ ︷︷ ︸

∆(m,Np)

p−

u(k − 1)Om×1

...Om×1

︸ ︷︷ ︸T ·u(k−1)

δmaxδmax

...δmax

︸ ︷︷ ︸δmax

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 73/125

Page 205: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Rate constraints on Control Inputs

Rate constraints on Control Inputs

u(k + i) ∈ u(k + i− 1) + [δmin, δmax] for all i ∈ 0, . . . , Np − 1

This can be written as follows:

(+∆(m,Np)

−∆(m,Np)

)p ≤

(+δmax−δmin

)+(

+T−T

)· u(k − 1)

where

δmin ∈ Rm·Np ; δmax ∈ Rm·Np ; ∆(m,Np) ∈ R(m·Np)×(m·Np)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 73/125

Page 206: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Rate constraints on Control Inputs

%--------------------------------------------------------------------------% Function that computes the matrices Delta_bar, delta_bar and T_bar% enabling rate constraints to be handled.%--------------------------------------------------------------------------function [Delta_bar,delta_bar,Tbar]=rate_constr(Np,delta_min,delta_max)

m=size(delta_min);delta_bar_min=zeros(Np*m,1);delta_bar_max=zeros(Np*m,1);Delta=zeros(m*Np,Np*m);T=zeros(Np*m,m);T(1:m,1:m)=eye(m);for i=1:Np,

ind=((i-1)*m+1:i*m)’;delta_bar_min(ind)=delta_min;delta_bar_max(ind)=delta_max;if (i==1),

Delta(ind,:)=Pi_select(m,Np,1,1);else

Delta(ind,:)=Pi_select(m,Np,i,i)-Pi_select(m,Np,i-1,i-1);end

endDelta_bar=[Delta;-Delta];delta_bar=[delta_bar_max;-delta_bar_min];Tbar=[T;-T];

return%--------------------------------------------------------------------------

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 74/125

Page 207: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Summary of The Constraints

Summary of the Constraints1 Trajectory constraints:[

ΓT]· p ≤

[ΘT

]1

+[ΘT

]2· x(k)

2 Rate constraints on control inputs(+∆(m,Np)

−∆(m,Np)

)p ≤

(+δmax−δmin

)+(

+T−T

)· u(k − 1)

3 Final constraints:[ΓF]· p =

[ΘF

]1

+[ΘF

]2· x(k)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 75/125

Page 208: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Summary of The Constraints

Summary of the Constraints

The whole set of constraints can be split into Inequality and Equalityconstraints as follows:[

Aineq]· p ≤

[Bineq

(x(k), u(k − 1)

)][Aeq

]· p =

[Beq

(x(k)

)]withAineq = R(2Np·(nyc +2m))×(Np·m)

Aeq ∈ R(n+m)×(Np·m)

n is the state vector dimension

m is the control vector dimension

Np is the prediction horizon length

nycis the constrained output vector dimension

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 76/125

Page 209: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Summary of The Constraints

Summary of the Constraints

The whole set of constraints can be split into Inequality and Equalityconstraints as follows:[

Aineq]· p ≤

[Bineq

(x(k), u(k − 1)

)][Aeq

]· p =

[Beq

(x(k)

)]with

Aeq := ΓF ; Beq := [ΘF ]1 + [ΘF ]2 · x(k)

Aineq :=

ΓT+∆(m,Np)

−∆(m,Np)

Bineq :=

[ΘT ]1+δmax−δmin

+

[ΘT ]2OO

· x(k) +

O+T−T

u(k − 1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 76/125

Page 210: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Summary of The Constraints

Summary of the Constraints

The whole set of constraints can be split into Inequality and Equalityconstraints as follows:[

Aineq]· p ≤

[Bineq

(x(k), u(k − 1)

)][Aeq

]· p =

[Beq

(x(k)

)]with

Aeq := ΓF ; Beq := [ΘF ]1 + [ΘF ]2 · x(k)

Aineq :=

ΓT+∆(m,Np)

−∆(m,Np)

Bineq :=

[ΘT ]1+δmax−δmin

+

[ΘT ]2OO

· x(k) +

O+T−T

u(k − 1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 76/125

Page 211: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

The Constrained Optimization Problem

The Constrained Optimization Problem

We have the following optimization problem to solve at the decisioninstant k:

minp

[pT[H2

]p+ 2

[h1(x(k), yr(k + ·))

]p]

under the constraints[Aineq

]· p ≤

[Bineq

(x(k), u(k − 1)

)];[Aeq

]· p =

[Beq

(x(k)

)]

There are quite efficient solvers for this problem known as a QuadraticProgramming (QP) problem

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 77/125

Page 212: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Matlab help for QuadProg Solver

>> help quadprog

QUADPROG Quadratic programming.

X=QUADPROG(H,f,A,b) attempts to solve the quadratic programming problem:

min 0.5*x’*H*x + f’*x subject to: A*x <= bx

X=QUADPROG(H,f,A,b,Aeq,beq) solves the problem above while additionallysatisfying the equality constraints Aeq*x = beq.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 78/125

Page 213: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Expression of the feedback law

Expression of the feedback law

The solution of the Quadratic Programming Problem is denoted by:

p(x(k), u(k − 1))

and according by receding-horizon principle, the feedback law is:

u(k) = Π(m,Np)1→1 · p

(x(k), u(k − 1)

)

Note that there is no more explicit expression of the state feedback.

This is no more an affine-in-the-state feedback.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 79/125

Page 214: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Expression of the feedback law

The Constrained Optimization Problem

We have the following optimization problem to solve at the decisioninstant k:

minp

[pT[H2

]p+ 2

[h1(x(k), yr(k + ·))

]p]

under the constraints[Aineq

]· p ≤

[Bineq

(x(k), u(k − 1)

)];[Aeq

]· p =

[Beq

(x(k)

)]

We need to examine more closely how to compute h1.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 80/125

Page 215: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Expression of the feedback law

Unconstrained State Feedback (LTI systems)

u(k) = −Π(m,Np)1→1 ·H−1

2 · hT1

(x(k), yr(k + ·)

)︸ ︷︷ ︸∑Np

i=1

[ΩT

i,1QΩi,0(x(k),yr(k+i)]

Therefore, we can write:

avec

Yr(k) :=

yr(k + 1)...

yr(k +Np)

∈ Rnyr ·Np

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 81/125

Page 216: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Expression of the feedback law

Unconstrained State Feedback (LTI systems)

u(k) = −Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1QΩi,0(x(k), yr(k + i))

]︸ ︷︷ ︸

hT1 (x(k),yr(k+·))

Therefore, we can write:

avec

Yr(k) :=

yr(k + 1)...

yr(k +Np)

∈ Rnyr ·Np

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 81/125

Page 217: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Expression of the feedback law

Unconstrained State Feedback (LTI systems)

u(k) = −Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1QΩi,0(x(k), yr(k + i)︸ ︷︷ ︸[

CΦi

]x(k)−yr(k+i)

]︸ ︷︷ ︸

hT1 (x(k),yr(k+·))

Therefore, we can write:

avec

Yr(k) :=

yr(k + 1)...

yr(k +Np)

∈ Rnyr ·Np

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 81/125

Page 218: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Expression of the feedback law

Unconstrained State Feedback (LTI systems)

u(k) = −Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1Q ·

[CΦi

]x(k)− yr(k + i)]

]︸ ︷︷ ︸

hT1 (x(k),yr(k+·))

Therefore, we can write:

avec

Yr(k) :=

yr(k + 1)...

yr(k +Np)

∈ Rnyr ·Np

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 81/125

Page 219: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Expression of the feedback law

Unconstrained State Feedback (LTI systems)

u(k) = −Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1Q ·

[CΦi

]x(k)− yr(k + i)]

]︸ ︷︷ ︸

hT1 (x(k),yr(k+·))Therefore, we can write:

hT1 =

[Np∑i=1

[ΩTi,1Q ·

[CΦi

]]]· x(k)−

Np∑i=1

[ΩTi,1Q · yr(k + i)

]

avec

Yr(k) :=

yr(k + 1)...

yr(k +Np)

∈ Rnyr ·Np

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 81/125

Page 220: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Expression of the feedback law

Unconstrained State Feedback (LTI systems)

u(k) = −Π(m,Np)1→1 ·H−1

2 ·Np∑i=1

[ΩTi,1Q ·

[CΦi

]x(k)− yr(k + i)]

]︸ ︷︷ ︸

hT1 (x(k),yr(k+·))Therefore, we can write:

hT1 =

[Np∑i=1

[ΩTi,1Q ·

[CΦi

]]]︸ ︷︷ ︸

F1

·x(k)−[ Np∑i=1

[ΩTi,1Q ·Π

(nyr ,Np)i→i

]]︸ ︷︷ ︸

F2

·Yr(k)

avec

Yr(k) :=

yr(k + 1)...

yr(k +Np)

∈ Rnyr ·Np

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 81/125

Page 221: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Expression of the feedback law

To summarize:

hT1 =[F1

]· x(k) +

[F2

]· Yr(k)

where

F1 :=∑Np

i=1

[ΩTi,1Q ·

[CΦi

]]F2 := −

∑Np

i=1

[ΩTi,1Q ·Π

(nyr ,Np)i→i

]

Yr(k) :=

yr(k + 1)...

yr(k +Np)

∈ Rnyr ·Np

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 82/125

Page 222: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Expression of the feedback law

%==========================================================================% This function computes the matrices needed to define the quadratic cost%==========================================================================function [H,F1,F2]=quad_pb_mat(A,B,C,Np,Q,R)

[n,m]=size(B);[ny,n]=size(C);F1=zeros(Np*m,n);F2=zeros(Np*m,Np*ny);H=H2(A,B,C,Np,Q,R);for i=1:Np,

O1i=Omega_i_1(A,B,C,Np,i);Phii=Phi_i(A,i);F1=F1+O1i’*Q*C*Phii;F2=F2-O1i’*Q*Pi_select(ny,Np,i,i);

endreturn%==========================================================================

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 83/125

Page 223: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

Constrained Tracking a Square Reference

0 2 4 6 8 10 12 14 16 18 20-0.5

0

0.5

1

1.5

time

Tracking results with Q=100000000 with saturation at umax

=1000

0 2 4 6 8 10 12 14 16 18 20

-1000

-500

0

500

1000

time

Tracking results with Q=100000000 with saturation at umax

=1000

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 84/125

Page 224: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

Constrained tracking of a triple integrator (1)Let us see how constrained MPC performs ?

%--------------------------------------------------------------------------% Constrained Tracking for a triple integrator%--------------------------------------------------------------------------clear all;clfA=[0 1 0;0 0 1;0 0 0];B=[0;0;1];C=[1 0 0];tau=0.1;[n,m]=size(B);[Ad,Bd]=c2d(A,B,tau);%--------------------------------------------------------------------------

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 85/125

Page 225: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

Constrained tracking of a triple integrator (1)

%--------------------------------------------------------------------------x0=[1;0;0];Np=20;tsim=20;lest=(0:tau:tsim)’;nt=size(lest,1);T=5;r=0.5;Q=diag(1e8);R=1;Cc=[1 0 0;0 1 0];Cfinal=[0 0 0];yfinal=0;ufinal=0;yc_min=[-inf;-inf];yc_max=[+inf;+inf];u_min=-1000;u_max=+1000;delta_min=[-inf];delta_max=[+inf];%---------------------------------

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 86/125

Page 226: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

Constrained tracking of a triple integrator (1)

%--------------------------------------------------------------------------[A_ineq,B_ineq_1,B_ineq_2,B_ineq_3,A_eq,B_eq_1,B_eq_2]=...

mat_constr(Ad,Bd,Cc,Cfinal,Np,yc_min,yc_max,yfinal,...u_min,u_max,ufinal,delta_min,delta_max);

%--------------------------------------------------------------------------[H,F1,F2]=quad_pb_mat(Ad,Bd,C,Np,Q,R);%--------------------------------------------------------------------------

Remember the quadprog syntaxe:

>> help quadprog

QUADPROG Quadratic programming.

X=QUADPROG(H,f,A,b) attempts to solve the quadratic programming problem:

min 0.5*x’*H*x + f’*x subject to: A*x <= bx

X=QUADPROG(H,f,A,b,Aeq,beq) solves the problem above while additionallysatisfying the equality constraints Aeq*x = beq.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 87/125

Page 227: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

Constrained tracking of a triple integrator (1)

%--------------------------------------------------------------------------[A_ineq,B_ineq_1,B_ineq_2,B_ineq_3,A_eq,B_eq_1,B_eq_2]=...

mat_constr(Ad,Bd,Cc,Cfinal,Np,yc_min,yc_max,yfinal,...u_min,u_max,ufinal,delta_min,delta_max);

%--------------------------------------------------------------------------[H,F1,F2]=quad_pb_mat(Ad,Bd,C,Np,Q,R);%--------------------------------------------------------------------------

Remember the quadprog syntaxe:

>> help quadprog

QUADPROG Quadratic programming.

X=QUADPROG(H,f,A,b) attempts to solve the quadratic programming problem:

min 0.5*x’*H*x + f’*x subject to: A*x <= bx

X=QUADPROG(H,f,A,b,Aeq,beq) solves the problem above while additionallysatisfying the equality constraints Aeq*x = beq.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 87/125

Page 228: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

Constrained tracking of a triple integrator (1)

%--------------------------------------------------------------------------lesx=zeros(nt,3);lesy=zeros(nt,1);lesu=zeros(nt,1);yref=yref_de_t((0:tau:2*tsim)’,T,r);lesx(1,:)=x0’;lesy(1)=C*lesx(1,:)’;u_=0;for i=1:nt-1,

disp(i);yref_pred=yref(i+1:i+Np);h1=(F1*lesx(i,:)’+F2*yref_pred)’;B_ineq=B_ineq_1+B_ineq_2*lesx(i,:)’+B_ineq_3*u_;B_eq=B_eq_1+B_eq_2*lesx(i,:)’;u_sol=quadprog(H,h1,A_ineq,B_ineq,A_eq,B_eq);u=u_sol(1:m);lesu(i,:)=u;u_=u;xplus=Ad*lesx(i,:)’+Bd*u;lesx(i+1,:)=xplus’;lesy(i+1)=C*xplus;

end%--------------------------------------------------------------------------

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 88/125

Page 229: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

Constrained tracking of a triple integrator (1)

%--------------------------------------------------------------------------subplot(311),plot(lest,yref(1:nt),’r-.’,lest,lesy,’m’,’LineWidth’,2);xlabel(’time’,’FontSize’,20,’FontName’,’garamond’);title([’Q=’,num2str(Q),’ / u_max= ’,...

num2str(u_max),’ / \delta_max=’,num2str(delta_max)],...’FontSize’,20,’FontName’,’garamond’);

set(gca,’FontSize’,16);grid on;figure(gcf);hold on;%--------------------------------------------------------------------------subplot(312),stairs(lest,lesu,’m’,’LineWidth’,2);xlabel(’time’,’FontSize’,20,’FontName’,’garamond’);title([’Control Evolution’],’FontSize’,20,’FontName’,’garamond’);set(gca,’FontSize’,16);grid on;figure(gcf);hold on;ylim([1.2*u_min,1.2*u_max])%--------------------------------------------------------------------------les_du=[diff(lesu);0];subplot(313),stairs(lest,les_du,’m’,’LineWidth’,2);xlabel(’time’,’FontSize’,20,’FontName’,’garamond’);title([’Evolution of \Delta u(k)=u(k)-u(k-1)’],...

’FontSize’,20,’FontName’,’garamond’);set(gca,’FontSize’,16);grid on;figure(gcf);hold on;ylim([1.2*delta_min,1.2*delta_max])%--------------------------------------------------------------------------

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 89/125

Page 230: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 2 4 6 8 10 12 14 16 18 20-2

0

2

time

Q=10000000000 / umax= Inf / δ

max=Inf

0 2 4 6 8 10 12 14 16 18 20-4000-2000

020004000

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20

-5000

0

5000

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 90/125

Page 231: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 2 4 6 8 10 12 14 16 18 20-2

0

2

time

Q=10000000000 / umax= 1000 / δ

max=Inf

0 2 4 6 8 10 12 14 16 18 20-1000

0

1000

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20

-1000

0

1000

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 90/125

Page 232: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 2 4 6 8 10 12 14 16 18 20-2

0

2

time

Q=10000000000 / umax= 1000 / δ

max=100

0 2 4 6 8 10 12 14 16 18 20-1000

0

1000

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-100

0

100

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 90/125

Page 233: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 2 4 6 8 10 12 14 16 18 20-0.5

00.5

11.5

time

Q=10000000000 / umax

= 1000 / δmax

=100 / yc

max= [0.9 Inf]

0 2 4 6 8 10 12 14 16 18 20-1000

0

1000

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-100

0

100

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 90/125

Page 234: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 2 4 6 8 10 12 14 16 18 20-0.5

00.5

11.5

time

Q=10000000000 / umax= 1000 / δ

max=100 / y

c

max= [Inf 1]

0 2 4 6 8 10 12 14 16 18 20-1000

0

1000

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-100

0

100

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 90/125

Page 235: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

%--------------------------------------------------------------------------x0=[0;0;0];Np=20;tsim=20;lest=(0:tau:tsim)’;nt=size(lest,1);T=5;r=0.5;Q=diag(1e10);R=1;Cc=[1 0 0;0 1 0];Cfinal=[0 0 0];yfinal=0;ufinal=0;yc_min=[-inf;-inf];yc_max=[+inf;+1];u_min=-1000;u_max=+1000;delta_min=[-100];delta_max=[+100];%--------------------------------------------------------------------------

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 91/125

Page 236: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

%--------------------------------------------------------------------------x0=[0;0;0];Np=20;tsim=20;lest=(0:tau:tsim)’;nt=size(lest,1);T=5;r=0.5;Q=diag(1e10);R=1;Cc=[1 0 0;0 1 0];Cfinal=[0 0 0];yfinal=0;ufinal=0;yc_min=[-inf;-1];yc_max=[+inf;+1];u_min=-1000;u_max=+1000;delta_min=[-100];delta_max=[+100];%--------------------------------------------------------------------------

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 92/125

Page 237: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 2 4 6 8 10 12 14 16 18 20-0.5

00.5

11.5

time

Q=10000000000 / umax= 1000 / δ

max=100 / y

c

max= [Inf 1] / y

c

min= [-Inf -1]

0 2 4 6 8 10 12 14 16 18 20-1000

0

1000

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-100

0

100

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 93/125

Page 238: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 2 4 6 8 10 12 14 16 18 20-0.5

00.5

11.5

time

Q=10000000000 / umax= 1000 / δ

max=100 / y

c

max= [Inf 2] / y

c

min= [-Inf -2]

0 2 4 6 8 10 12 14 16 18 20-1000

0

1000

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-100

0

100

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 93/125

Page 239: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 2 4 6 8 10 12 14 16 18 20-0.5

00.5

11.5

time

Q=10000000000 / umax= 1000 / δ

max=100 / y

c

max= [Inf 3] / y

c

min= [-Inf -3]

0 2 4 6 8 10 12 14 16 18 20-1000

0

1000

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-100

0

100

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 93/125

Page 240: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 2 4 6 8 10 12 14 16 18 20

-1

0

1

time

Q=10000000000 / umax= 1000 / δ

max=100 / y

c

max= [Inf 3] / y

c

min= [-Inf -3]

0 2 4 6 8 10 12 14 16 18 20-100

0

100

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-100

0

100

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 94/125

Page 241: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 2 4 6 8 10 12 14 16 18 20

-1

0

1

time

Q=10000000000 / umax= 1000 / δ

max=10 / y

c

max= [Inf 3] / y

c

min= [-Inf -3]

0 2 4 6 8 10 12 14 16 18 20-50

0

50

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-10

0

10

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 94/125

Page 242: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 2 4 6 8 10 12 14 16 18 20

-1

0

1

time

Q=10000000000 / umax= 1000 / δ

max=1 / y

c

max= [Inf 3] / y

c

min= [-Inf -3]

0 2 4 6 8 10 12 14 16 18 20-10

0

10

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-1

0

1

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 94/125

Page 243: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 2 4 6 8 10 12 14 16 18 20-2

0

2

time

Q=10000000000 / umax

= 1000 / δmax

=0.5 / yc

max= [Inf 3] / y

c

min= [-Inf -3] / N

p= 20

0 2 4 6 8 10 12 14 16 18 20-10

0

10

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-0.5

0

0.5

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 94/125

Page 244: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 2 4 6 8 10 12 14 16 18 20-2

0

2

time

Q=10000000000 / umax

= 1000 / δmax

=0.5 / yc

max= [Inf 3] / y

c

min= [-Inf -3] / N

p= 50

0 2 4 6 8 10 12 14 16 18 20-5

0

5

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-0.5

0

0.5

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 94/125

Page 245: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 10 20 30 40 50 60 70 80 90 100-2

0

2

time

Q=10000000000 / umax

= 1000 / δmax

=0.5 / yc

max= [Inf 3] / y

c

min= [-Inf -3] / N

p= 50

0 10 20 30 40 50 60 70 80 90 100-5

0

5

time

Control Evolution

0 10 20 30 40 50 60 70 80 90 100-0.5

0

0.5

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 94/125

Page 246: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Handling Constraint in MPC formulation

Back to the triple integrator example

0 2 4 6 8 10 12 14 16 18 20-2

0

2

time

Q=10000000000 / umax

= 10 / δmax

=10 / yc

max= [Inf 0.8] / y

c

min= [-Inf -0.8] / N

p= 50

0 2 4 6 8 10 12 14 16 18 20-10

0

10

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-10

0

10

time

Evolution of ∆ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 94/125

Page 247: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

Why to parameterize control profile ?

In the formulation used so far, the dimension of the decision variable (thenumber of degrees of freedom) is given by

np = Np ·m

where

m is the number of control variable [u ∈ Rm]

Np is the length of the prediction horizon

Example:

Tp = 1 s , τ = 10 ms m = 2 −→ np = 200 !!

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 95/125

Page 248: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

Why to parameterize control profile ?

In the formulation used so far, the dimension of the decision variable (thenumber of degrees of freedom) is given by

np = Np ·m

where

m is the number of control variable [u ∈ Rm]

Np is the length of the prediction horizon

Example:

Tp = 1 s , τ = 10 ms m = 2 −→ np = 200 !!

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 95/125

Page 249: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

First example of control profile parametrization

Assume that the degrees of freedom are represented by:

u(k) ; u(k +N1) and u(k +N2)

while the other u(k + i) are obtained by a linear interpolation, namely:

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 96/125

Page 250: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

First example of control profile parametrization

u(k + i) :=

u(k) + i

N1

[u(k +N1)− u(k)

]if i ≤ N1

u(k +N1) +i−N1

N2−N1

[u(k +N2)− u(k +N1)

]if i ∈ [N1, N2]

u(k +N2) otherwise

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 96/125

Page 251: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

First example of control profile parametrizationbut the expression

u(k + i) :=

u(k) + i

N1

[u(k +N1)− u(k)

]if i ≤ N1

u(k +N1) +i−N1

N2−N1

[u(k +N2)− u(k +N1)

]if i ∈ [N1, N2]

u(k +N2) otherwise

can be written equivalently as follows:

u(k + i) = Ri ·

u(k)u(k +N1)u(k +N2)

= Ri · p where p ∈ R3m

provided that Ri is defined by:

Ri =

(

(1− iN1

)I iN1

I O)

if i ≤ N1(O (1− i−N1

N2−N1)I i−N1

N2−N1I)

if i ∈ [N1, N2](O O I

)otherwise

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 97/125

Page 252: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

First example of control profile parametrizationbut the expression

u(k + i) :=

u(k) + i

N1

[u(k +N1)− u(k)

]if i ≤ N1

u(k +N1) +i−N1

N2−N1

[u(k +N2)− u(k +N1)

]if i ∈ [N1, N2]

u(k +N2) otherwise

can be written equivalently as follows:

u(k + i) = Ri ·

pr︷ ︸︸ ︷ u(k)u(k +N1)u(k +N2)

= Ri · pr where pr ∈ R3m

provided that Ri is defined by:

Ri =

(

(1− iN1

)I iN1

I O)

if i ≤ N1(O (1− i−N1

N2−N1)I i−N1

N2−N1I)

if i ∈ [N1, N2](O O I

)otherwise

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 97/125

Page 253: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

Therefore,

p =

u(k)

u(k + 1)...

u(k +Np)

p =

u(k)

u(k + 1)...

u(k +Np)

=

R0

R1

...RNp−1

︸ ︷︷ ︸

ΠR(Np)∈R(Np·m)×(3m)

·pr

To summarize, the reduced parametrization is given by:

p =[ΠR(Np)

]· pr

The number of degrees of freedom is 3m for any prediction horizon Np.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 98/125

Page 254: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

Therefore,

p =

u(k)

u(k + 1)...

u(k +Np)

p =

u(k)

u(k + 1)...

u(k +Np)

=

R0

R1

...RNp−1

︸ ︷︷ ︸

ΠR(Np)∈R(Np·m)×(3m)

·pr

To summarize, the reduced parametrization is given by:

p =[ΠR(Np)

]· pr

The number of degrees of freedom is 3m for any prediction horizon Np.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 98/125

Page 255: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

Therefore,

p =

u(k)

u(k + 1)...

u(k +Np)

p =

u(k)

u(k + 1)...

u(k +Np)

=

R0

R1

...RNp−1

︸ ︷︷ ︸

ΠR(Np)∈R(Np·m)×(3m)

·pr

To summarize, the reduced parametrization is given by:

p =[ΠR(Np)

]· pr

The number of degrees of freedom is 3m for any prediction horizon Np.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 98/125

Page 256: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

More generally:

u(k + i) is obtained by linear interpolation between u(k +Nji) andu(k +Nji+1) where i ∈ [Nji , Nji+1[

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 99/125

Page 257: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

u(k + i) = u(k +Nji) +i−Nji

Nji+1 −Nji

[u(k +Nji+1)− u(k +Nji)

]where

ji := maxj=1,...,nr

j such that Nj ≤ i

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 100/125

Page 258: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

u(k + i) = u(k +Nji) +i−Nji

Nji+1 −Nji

[u(k +Nji+1)− u(k +Nji)

]where

ji := maxj=1,...,nr

j such that Nj ≤ i

This leads to

u(k + i) = Ri ·

u(k)

u(k +N1)

.

.

.u(k +Nnr )

︸ ︷︷ ︸

pr

= Li · pr

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 101/125

Page 259: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

u(k + i) = u(k +Nji) +i−Nji

Nji+1 −Nji

[u(k +Nji+1)− u(k +Nji)

]where

ji := maxj=1,...,nr

j such that Nj ≤ i

This leads to

u(k + i) = Ri ·

u(k)

u(k +N1)

.

.

.u(k +Nnr )

︸ ︷︷ ︸

pr

= Li · pr

with Nj0 = 0 and for all i ∈ 1, . . . , Nnr− 1,

Ri =

O . . . (1−i−Nji

Nji+1 −Nji

)︸ ︷︷ ︸jith block

Im

i−NjiNji+1−Nji

Im O . . .O

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 101/125

Page 260: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

u(k + i) = u(k +Nji) +i−Nji

Nji+1 −Nji

[u(k +Nji+1)− u(k +Nji)

]where

ji := maxj=1,...,nr

j such that Nj ≤ i

This leads to

u(k + i) = Ri ·

u(k)

u(k +N1)

.

.

.u(k +Nnr )

︸ ︷︷ ︸

pr

= Li · pr

and for all i ≥ Nnr ,

Ri :=(O . . . O Im

)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 101/125

Page 261: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

Using the above notation, the previous parametrization can be given by:

p =[ΠR(Np)

]pr

where

[ΠR(Np)

]:=

R0

R1

...RNp−1

∈ R(Np·m)×((nr+1)·m)

Here, one has

nr = 2 ⇒ pr ∈ R3m

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 102/125

Page 262: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

Using the above notation, the previous parametrization can be given by:

p =[ΠR(Np)

]pr

where

[ΠR(Np)

]:=

R0

R1

...RNp−1

∈ R(Np·m)×((nr+1)·m)

Here, one has

nr = 2 ⇒ pr ∈ R3m

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 102/125

Page 263: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

%--------------------------------------------------------------------------% This function compute the parametrization matrix R used in the% expression p=R*p_r where p is the original piece-wise control profile% while p_r is the vector of reduced parametrization.%--------------------------------------------------------------------------function Pi_R=compute_Pi_R(lesN,Np,m)

lesN=[1;lesN];nr=length(lesN);Pi_R=zeros(Np*m,nr*m);for i=1:Np,

if (i==1),Pi_R(1:m,1:m)=eye(m);

elseif (i>=lesN(nr)),Pi_R((i-1)*m+1:i*m,(nr-1)*m+1:nr*m)=eye(m);

elseji=max(find(lesN<=i));Pi_R((i-1)*m+1:i*m,m*(ji-1)+1:m*ji)=...

(1-(i-lesN(ji))/(lesN(ji+1)-lesN(ji)))*eye(m);Pi_R((i-1)*m+1:i*m,m*ji+1:m*(ji+1))=...

(i-lesN(ji))/(lesN(ji+1)-lesN(ji))*eye(m);end

endreturn%--------------------------------------------------------------------------

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 103/125

Page 264: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

%--------------------------------------------------------------------------

% test compute_R

%--------------------------------------------------------------------------

clf;

m=1;

Np=10;

lesN=[5;8];

pr=[1;-1;0];

Pi_R=compute_Pi_R(lesN,Np,m);

plot((0:1:Np-1)’,R*pr,’b-’,’LineWidth’,2,’marker’,’o’);

grid on;hold on;

xlim([0 Np-1]);set(gca,’FontSize’,18);

ylim([-1.2 1.2])

xlabel(’i’,’FontSize’,18);ylabel(’u(k+i)’,’FontSize’,18)

plot([1;lesN]-1,pr,’ro’,’LineWidth’,12);

figure(gcf);

%--------------------------------------------------------------------------

-1 0 1 2 3 4 5 6 7 8 9

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

i

u(k+

i)

3 unknowns rather than 10

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 104/125

Page 265: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

%--------------------------------------------------------------------------

% test compute_R

%--------------------------------------------------------------------------

clf;

m=1;

Np=51;

lesN=[5;8;20];

pr=[1;-0.5;0.5;0];

Pi_R=compute_R(lesN,Np,m);

plot((0:1:Np-1)’,R*pr,’b-’,’LineWidth’,2,’marker’,’o’);

grid on;hold on;

xlim([-1 Np-1]);set(gca,’FontSize’,18);

ylim([-1.2 1.2])

xlabel(’i’,’FontSize’,18);ylabel(’u(k+i)’,’FontSize’,18)

plot([1;lesN]-1,pr,’ro’,’LineWidth’,12);

figure(gcf);

%--------------------------------------------------------------------------

0 5 10 15 20 25 30 35 40 45 50

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

i

u(k+

i)

4 unknowns rather than 51

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 105/125

Page 266: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Need for control profile parametrization

%--------------------------------------------------------------------------

% test compute_R

%--------------------------------------------------------------------------

clf;

m=2;

Np=51;

lesN=[5;8;20];

pr=[[1;-0.8];[-0.5;0.8];[0.5;-1];[0;0.2]];

Pi_R=compute_R(lesN,Np,m);

lesu=(reshape(R*pr,2,Np))’;

plot((0:1:Np-1)’,lesu(:,1),’b-’,(0:1:Np-1)’,lesu(:,2),’k-’,...

’LineWidth’,2,’marker’,’o’);

grid on;hold on;

xlim([-1 Np-1]);set(gca,’FontSize’,18);

ylim([-1.2 1.2])

xlabel(’i’,’FontSize’,18);ylabel(’u(k+i)’,’FontSize’,18)

plot([1;lesN]-1,(reshape(pr,2,length(pr)/2))’,’ro’,’LineWidth’,12);

figure(gcf);

%--------------------------------------------------------------------------

0 5 10 15 20 25 30 35 40 45 50

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

i

u(k+

i)

8 unknowns rather than 102

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 106/125

Page 267: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Modified Optimization Problem

There are different (many) other possible reduced parametrizationthat we do not discussed here.

How does the constrained MPC problem change when a reduceddimensional parametrization:

p = ΠR · pr

is used ?

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 107/125

Page 268: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Modified Optimization Problem

There are different (many) other possible reduced parametrizationthat we do not discussed here.

How does the constrained MPC problem change when a reduceddimensional parametrization:

p = ΠR · pr

is used ?

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 107/125

Page 269: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Modified Optimization Problem

The Constrained Optimization Problem

Remember that we had to solve the following constrained optimizationproblem:

minp

[pT[H2

]p+ 2

[F1x(k) + F2Yr(k)

]Tp]

under the constraints[Aineq

]· p ≤

[Bineq

(x(k), u(k − 1)

)][Aeq

]· p =

[Beq

(x(k)

)]

Now, we have the additional constraint

p = ΠR · pr

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 108/125

Page 270: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Modified Optimization Problem

The Constrained Optimization Problem

Remember that we had to solve the following constrained optimizationproblem:

minp

[pT[H2

]p+ 2

[F1x(k) + F2Yr(k)

]Tp]

under the constraints[Aineq

]· p ≤

[Bineq

(x(k), u(k − 1)

)][Aeq

]· p =

[Beq

(x(k)

)]

Now, we have the additional constraint

p = ΠR · pr

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 108/125

Page 271: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Modified Optimization Problem

The Constrained Optimization Problem

Remember that we had to solve the following constrained optimizationproblem:

minpr

[pTr[ΠTR ·H2 ·ΠR

]· pr + 2

[F1x(k) + F2Yr(k)

]TΠR · pr]

under the constraints[Aineq ·ΠR

]· pr ≤

[Bineq

(x(k), u(k − 1)

)][Aeq ·ΠR

]· pr =

[Beq

(x(k)

)]

Now, we have the additional constraint

p = ΠR · pr

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 109/125

Page 272: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

Modified Optimization Problem

The new optimization problem is given by:

minpr

[pTr[Hr

2 ] · pr + 2[hr1(x(k), Yr(k))

]· pr]

under the constraints:[Arineq

]pr ≤ Bineq

(x(k), u(k − 1)

)[Areq

]pr = Beq

(x(k)

)where:

Hr2 := ΠT

R ·H2 ·ΠR

hr1

(x(k), Yr(k)

):=

[F1x(k) + F2Yr(k)

]TΠR

Arineq := Aineq ·ΠR

Areq := Aeq ·ΠR

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 110/125

Page 273: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

validation of the reduced parametrization

Reconsider the tracking of a sinusoidal signal by the triple integrator.

First parametrization

Classical trivial piece-wiseparametrization.

Np = 7 → 7 degrees offreedom.

second parametrization

Np = 20nr = 5N1 = 2, N2 = 3, N3 = 4,N4 = 5, N5 = 155 degrees of freedom.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 111/125

Page 274: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

validation of the reduced parametrization

Classical parametrization with 7 degrees of freedom

0 2 4 6 8 10 12 14 16 18 20-2

0

2

time

Q=10000000000 / umax

= Inf / δmax

=10 / ycmax= [Inf Inf] / y

cmin= [-Inf -Inf] / N

p= 7

0 2 4 6 8 10 12 14 16 18 20-100

0

100

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-10

0

10

time

Evolution of Δ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 112/125

Page 275: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

validation of the reduced parametrization

Classical parametrization with 7 degrees of freedom

0 2 4 6 8 10 12 14 16 18 20-10

0

10

time

Q=10000000000 / umax

= Inf / δmax

=10 / ycmax= [Inf Inf] / y

cmin= [-Inf -Inf] / N

p= 7

0 2 4 6 8 10 12 14 16 18 20-100

0

100

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-10

0

10

time

Evolution of Δ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 112/125

Page 276: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

validation of the reduced parametrization

Classical parametrization with 7 degrees of freedom

0 2 4 6 8 10 12 14 16 18 20-2000

0

2000

time

Q=10000000000 / umax

= Inf / δmax

=10 / ycmax= [Inf Inf] / y

cmin= [-Inf -Inf] / N

p= 7

0 2 4 6 8 10 12 14 16 18 20-100

0

100

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-10

0

10

time

Evolution of Δ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 112/125

Page 277: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

validation of the reduced parametrization

Np=20;%--------------------------------------------------------------------------% Computing the reduced parametrization%--------------------------------------------------------------------------lesN=[2;3;4;5;15];%lesN=(2:1:Np)’;Pi_R=compute_R(lesN,Np,m);%--------------------------------------------------------------------------[A_ineq,B_ineq_1,B_ineq_2,B_ineq_3,A_eq,B_eq_1,B_eq_2]=...

mat_constr(Ad,Bd,Cc,Cfinal,Np,yc_min,yc_max,yfinal,...u_min,u_max,ufinal,delta_min,delta_max);

A_ineq_r=A_ineq*Pi_R;A_eq_r=A_eq*Pi_R;%--------------------------------------------------------------------------[H,F1,F2]=quad_pb_mat(Ad,Bd,C,Np,Q,R);Hr=Pi_R’*H*Pi_R;%--------------------------------------------------------------------------

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 113/125

Page 278: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

validation of the reduced parametrization

for i=1:nt-1,

disp(i);

yref_pred=yref(i+1:i+Np);

h1=(F1*lesx(i,:)’+F2*yref_pred)’*Pi_R;

B_ineq=B_ineq_1+B_ineq_2*lesx(i,:)’+B_ineq_3*u_;

B_eq=B_eq_1+B_eq_2*lesx(i,:)’;

pr_sol=quadprog(Hr,h1,A_ineq_r,B_ineq,A_eq_r,B_eq);

u_sol=Pi_R*pr_sol;

u=u_sol(1:m);lesu(i,:)=u;u_=u;

xplus=Ad*lesx(i,:)’+Bd*u;

lesx(i+1,:)=xplus’;

lesy(i+1)=C*xplus;

end

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 114/125

Page 279: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

validation of the reduced parametrization

Reduced parametrization with 5 degrees of freedom

0 2 4 6 8 10 12 14 16 18 20-2

0

2

time

Q=10000000000 / umax

= Inf / δmax

=10 / ycmax= [Inf Inf] / y

cmin= [-Inf -Inf] / N

p= 20

0 2 4 6 8 10 12 14 16 18 20

-10

0

10

time

Control Evolution

0 2 4 6 8 10 12 14 16 18 20-10

0

10

time

Evolution of Δ u(k)=u(k)-u(k-1)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 115/125

Page 280: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Control Profile Parametrization

validation of the reduced parametrization

Advantage of reduced dimensional parametrization

The reduced parametrization enables to conciliate:

A low number of degrees of freedom

A long prediction horizon that may be necessary for stability

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 116/125

Page 281: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Disturbance Handling

Assume that the dynamic system is affected by a disturbance vector w asfollows:

x(k + 1) = Adx(k) +Bdu(k) +Gdw(k)y(k) = Cx(k)

where

x is the state vector

u is the manipulated input vector

y is the measurement vector

w is the disturbance vector

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 117/125

Page 282: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Different configurations

The disturbance vector can be

Measured with known dynamics

Measured with unknown dynamics

Unmeasured with known dynamics

Unmeasured with unknown dynamics

In case where the disturbance is not modeled, predictive control need touse some assumption on the future behavior of w during the futureprediction horizon.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 118/125

Page 283: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Different configurations

The disturbance vector can be

Measured with known dynamics

Measured with unknown dynamics

Unmeasured with known dynamics

Unmeasured with unknown dynamics

In case where the disturbance is not modeled, predictive control need touse some assumption on the future behavior of w during the futureprediction horizon.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 118/125

Page 284: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Different configurations

The disturbance vector can be

Measured with known dynamics

Measured with unknown dynamics

Unmeasured with known dynamics

Unmeasured with unknown dynamics

In case where the disturbance is not modeled, predictive control need touse some assumption on the future behavior of w during the futureprediction horizon.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 118/125

Page 285: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Different configurations

The disturbance vector can be

Measured with known dynamics

Measured with unknown dynamics

Unmeasured with known dynamics

Unmeasured with unknown dynamics

In case where the disturbance is not modeled, predictive control need touse some assumption on the future behavior of w during the futureprediction horizon.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 118/125

Page 286: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Different configurations

The disturbance vector can be

Measured with known dynamics

Measured with unknown dynamics

Unmeasured with known dynamics

Unmeasured with unknown dynamics

In case where the disturbance is not modeled, predictive control need touse some assumption on the future behavior of w during the futureprediction horizon.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 118/125

Page 287: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Different configurations

The disturbance vector can be

Measured with known dynamics

Measured with unknown dynamics

Unmeasured with known dynamics

Unmeasured with unknown dynamics

In case where the disturbance is not modeled, predictive control need touse some assumption on the future behavior of w during the futureprediction horizon.

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 118/125

Page 288: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

presentpast future

time

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 119/125

Page 289: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

presentpast future

time

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 119/125

Page 290: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

presentpast future

time

Measured or estimated using observer

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 119/125

Page 291: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

presentpast future

time

Has to be computed in order to have an optimal behavior

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 119/125

Page 292: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

presentpast future

time

If not known, assumptionshave to be done

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 119/125

Page 293: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Standard assumptions on future disturbance behavior

In case where the dynamics of the uncertainty is not known:

presentpast future

time

constant behavior

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 120/125

Page 294: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Standard assumptions on future disturbance behavior

In case where the dynamics of the uncertainty is not known:

presentpast future

time

Vanishing behavior

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 120/125

Page 295: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Standard assumptions on future disturbance behavior

In case where the dynamics of the uncertainty is not known:

presentpast future

time

Vanishing behavior

How to estimate the Disturbance ?

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 120/125

Page 296: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Recall on observer design

Remember that for a discrete time linear system:

x+ = Ax+Bu

y = Cx

The observation paradigm is to know how to estimate the state x(k)using the past measurements:(

y(k), y(k − 1), . . . , y(k −NO + 1))

When is this possible ?

if this is possible, how to design the corresponding algorithm ?

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 121/125

Page 297: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Recall on observer design

Remember that for a discrete time linear system:

x+ = Ax+Bu

y = Cx

The observation paradigm is to know how to estimate the state x(k)using the past measurements:(

y(k), y(k − 1), . . . , y(k −NO + 1))

When is this possible ?

if this is possible, how to design the corresponding algorithm ?

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 121/125

Page 298: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Recall on observer design

Remember that for a discrete time linear system:

x+ = Ax+Bu

y = Cx

The observation paradigm is to know how to estimate the state x(k)using the past measurements:(

y(k), y(k − 1), . . . , y(k −NO + 1))

When is this possible ?

if this is possible, how to design the corresponding algorithm ?

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 121/125

Page 299: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Recall on observer design

Remember that for a discrete time linear system:

x+ = Ax+Bu

y = Cx

When is this possible ?

This is possible if the the following condition is satisfied:

rank(

CCA

...CAn−1

) = n (dimension of the state x)

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 122/125

Page 300: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Recall on observer design

Remember that for a discrete time linear system:

x+ = Ax+Bu

y = Cx

how to design the corresponding algorithm ?

The dynamic observer equation is given by:

x+ = (A− LC)x+Bu+ Ly

where L ∈ Rn×ny is computed such that:

maxi∈1,...,n

|λi(A− LC)| < 1

[for instance, use L = dlqr(AT , CT , Q,R,N)]

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 123/125

Page 301: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Disturbance Estimation

x+ = Ax+Bu+Gw

y = Cx

Generally, it is assumed that the disturbance has a constant dynamic:

x+ = Ax+Bu+Gw

w+ = w

y = Cx

This can be written equivalently as follows(xw

)+

=(

A 0nw×1

0nw×n Inw

)(xw

)+(

B0nw×nu

)u

y =(C 0ny×nw

)(xw

)Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 124/125

Page 302: Gipsa-lab - Optimal & Predictive Controlmazen.alamir/files/... · 2009. 12. 14. · 1 Control ofmulti-variablecoupled dynamical systems 2 Handlingconstraintson the state and on the

Optimal & Predictive Control

Disturbance handling

Disturbance Estimation

(xw

)+

=(

A 0nw×1

0nw×n Inw

)(xw

)+(

B0nw×nu

)u

y =(C 0ny×nw

)(xw

)that can be written shortly as follows:

x+ = Ax+ Bu

y = Cx

The same analysis and design can be done on this extended system:

rank(

CCA

...CAn−1

) = n+ nw

Mazen Alamir French National Research Center (CNRS) Gipsa-lab, Control Systems Department. University of Grenoble France

Optimal & Predictive Control 125/125