MPC Introduction Overview Basic Concept of MPC History - - PowerPoint PPT Presentation

mpc introduction
SMART_READER_LITE
LIVE PREVIEW

MPC Introduction Overview Basic Concept of MPC History - - PowerPoint PPT Presentation

MPC Introduction Overview Basic Concept of MPC History Optimization Formulation Models Analytical Solution to Unconstrained Problem Summary Limitations & a Look Ahead B. Wayne Bequette Chemical and Biological


slide-1
SLIDE 1

Chemical and Biological Engineering

MPC Introduction

  • B. Wayne Bequette
  • Overview
  • Basic Concept of MPC
  • History
  • Optimization Formulation
  • Models
  • Analytical Solution to Unconstrained Problem
  • Summary
  • Limitations & a Look Ahead
slide-2
SLIDE 2
  • B. Wayne Bequette

Motivation: Complex Processes

LC PC PC PC PC LC LC LC cooling water Toluene Hydrogen purge Hydrogen, Methane fuel gas steam steam steam Diphenyl Benzene product CH4 Recycle Toluene CC TC TC Reactor Recycle Column Benzene Column Stabilizer Flash Recycle Compressor cooling water CW CW quench TC LC LC LC TC

  • pen

FC FC FC FC TC CC TC

slide-3
SLIDE 3
  • B. Wayne Bequette

Important Issues in Petroleum Refining

l Multivariable, Large Scale

Ø Challenge to tune individual SISO controllers

l Operation at Constraints

Ø Anti-reset windup and other strategies for PID

l Economic Payout for Advanced Control

Ø Economic return justifies capital and on-going maintenance costs

l Model Predictive Control

Ø Evolved independently in the US and France refining industry

slide-4
SLIDE 4
  • B. Wayne Bequette

How is MPC used?

Unit 1 - PID Structure

Global Steady-State Optimization (every day) Local Steady-State Optimization (every hour) Dynamic Constraint Control (every minute) Supervisory Dynamic Control (every minute) Basic Dynamic Control (every second) Plant-Wide Optimization Unit 1 Local Optimization Unit 2 Local Optimization High/Low Select Logic PID Lead/Lag PID SUM SUM

Model Predictive Control (MPC)

Unit 1 Distributed Control System (PID) Unit 2 Distributed Control System (PID)

FC PC TC LC FC PC TC LC

Unit 2 - MPC Structure From Tom Badgwell, 2003 Spring AIChE Meeting, New Orleans

slide-5
SLIDE 5
  • B. Wayne Bequette

Model Predictive Control (MPC)

t k

current step

setpoint

y

actual outputs (past)

P

Prediction Horizon past control moves

u

max min

M

Control Horizon

past future model prediction

t k+1

current step

setpoint

y

actual outputs (past)

P

Prediction Horizon past control moves

u

max min

M

Control Horizon

model prediction from k new model prediction

Find current and future manipulated inputs that best meet a desired future output

  • trajectory. Implement first

“control move”.

l Type of model for predictions? l Information needed at step k for predictions? l Objective function and optimization technique? l Correction for model error?

Chapter 16

slide-6
SLIDE 6
  • B. Wayne Bequette

Model Predictive Control (MPC)

t k

current step

setpoint

y

actual outputs (past)

P

Prediction Horizon past control moves

u

max min

M

Control Horizon

past future model prediction

t k+1

current step

setpoint

y

actual outputs (past)

P

Prediction Horizon past control moves

u

max min

M

Control Horizon

model prediction from k new model prediction

At next sample time:

Correct for model mismatch, then perform new optimization. This is a major issue – “disturbances” vs. model uncertainty Find current and future manipulated inputs that best meet a desired future output

  • trajectory. Implement first

“control move”.

slide-7
SLIDE 7
  • B. Wayne Bequette

MPC History

l Intuitive

Ø Basically arose in two different “camps”

l Dynamic Matrix Control (DMC)

Ø 1960’s and 1970’s – Shell Oil - US Ø Related to techniques developed in France (IDCOM) Ø Large-scale MIMO Ø Formulation for constraints important

l Generalized Predictive Control (GPC)

Ø Evolved from adaptive control Ø Focus on SISO, awkward for MIMO

Charlie Cutler

(1976)

slide-8
SLIDE 8
  • B. Wayne Bequette

Objective Functions ( )

∑ ∑

− = + = + +

Δ + − =

1 2 1 2

ˆ

M i i k P i i k i k

u w y r J

Quadratic Objective Function, Prediction Horizon (P) = 3, Control Horizon (M) = 2

With linear models, results in analytical solution (w/o constraints)

General Representation of a Quadratic Objective Function

( ) ( ) ( )

2 1 2 2 3 3 2 2 2 2 1 1

ˆ ˆ ˆ

+ + + + + + +

Δ + Δ + − + − + − =

k k k k k k k k

u w u w y r y r y r J

Weight 2 control moves 3 steps into future

slide-9
SLIDE 9
  • B. Wayne Bequette

Alternative Objective Functions ( )

∑ ∑

− = + = + +

+ − =

1 2 1 2

ˆ

M i i k P i i k i k

u w y r J

∑ ∑

− = + = + +

Δ + − =

1 1

ˆ

M i i k P i i k i k

u w y r J

Penalize u rather than Δu Sum of absolute values (results in LP) Will usually result in “offset” Existing LP methods are efficient, but solutions hop from one constraint to another

slide-10
SLIDE 10
  • B. Wayne Bequette

Models

l State Space l ARX (auto-regressive, exogenous input) l Step Response l Impulse (Pulse) Response l Nonlinear, Fundamental (First-Principles) l ANN (Artificial Neural Networks) l Hammerstein (static NL with linear dynamics) l Volterra l Multiple Model

slide-11
SLIDE 11
  • B. Wayne Bequette

Discrete Linear Models used in MPC

∞ − ∞ + − − + − − ∞ = −

+ + + + + = =∑

k N N k N N k N k i i k i k

u h u h u h u h u h y  

1 1 1 1 1 k k k k k

Cx y u x x = Γ + Φ =

+1

State Space Input-Output (ARX)

m k m k k k n k n k k k

u b u b u b u b y a y a y a y

− − − − − −

+ + + + + − − − − =  

2 2 1 1 2 2 1 1

Step Response

usually b0 = 0 Some texts/papers have different sign conventions

Impulse Response

∞ − ∞ + − − + − − ∞ = −

Δ + + Δ + Δ + + Δ = Δ =∑

k N N k N N k N k i i k i k

u s u s u s u s u s y  

1 1 1 1 1

slide-12
SLIDE 12
  • B. Wayne Bequette
  • 2

2 4 6 8 0.5 1 1.5 2 temp, deg C discrete-time step

  • 2

2 4 6 8 0.2 0.4 0.6 0.8 1 discrete-time step psig

s

1

s s s s

2 4 5 3 Etc.

S = s1 s2 s3 s4 s5 L sN

[ ]

T

Example Step Response Model

Used in DMC

slide-13
SLIDE 13
  • B. Wayne Bequette
  • 2

2 4 6 8 10 0.2 0.4 0.6 0.8 1 discrete-time step psig

  • 2

2 4 6 8 10

  • 0.2

0.2 0.4 0.6 0.8 1 discrete-time step temp, deg C

h h h 1 2 3

hi = si − si−1 si = hj

j=1 i

Example Impulse Response Model

Impulse and step response coefficients are related

Used in IDCOM

slide-14
SLIDE 14
  • B. Wayne Bequette

Step & Impulse Models from State Space Models

Γ Φ =

−1 i i

C H

∑ ∑

= = −

= Γ Φ =

k i i k i i k

H C S

1 1 1 k k k k k

Cx y u x x = Γ + Φ =

+1

slide-15
SLIDE 15
  • B. Wayne Bequette

MPC based on State Space Models

k k k k k

x C y u x x

1

= Γ + Φ =

+

with known current state, easy to propagate estimates

k k k k k k k

u C x C Cx y u x x Γ + Φ = = Γ + Φ =

+ + + 1 1 1

and, using control changes

k k k k k k k

u C u C x C y u u u ΓΔ + Γ + Φ = Δ + =

− + − 1 1 1

slide-16
SLIDE 16
  • B. Wayne Bequette

Use ^ notation for model states

k k k k k k

u C u C x C y ΓΔ + Γ + Φ =

− + 1 | | 1

ˆ ˆ

Measurements through k Estimate at k+1 Estimate at k Measurements through k Predicted

  • utput

State estimate Previous input Current Input change

Now, propagate the prediction for P steps into the future

slide-17
SLIDE 17
  • B. Wayne Bequette

Output Predictions

                                       

response "forced" 1 1 1 1 1 1 1 made) are moves control more no (if response" unforced "

  • r

"free" 1 1 1 | 2 | | 2 | 1

ˆ ˆ ˆ ˆ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Δ Δ Δ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Γ Φ Γ Φ Γ Γ + ΦΓ Γ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Γ Φ Γ + ΦΓ Γ + ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Φ Φ Φ = ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡

− + + − = − = − − = − + + +

∑ ∑ ∑

M k k k P i i P i i k P i i k k P k P k k k k k

u u u C C C C C C u C C C C x C C C y y y

f

S

f

u Δ

f Y ˆ

slide-18
SLIDE 18
  • B. Wayne Bequette

Output Predictions

                               

response "forced" 1 1 1 1 1 2 1 made) are moves control more no (if response" unforced "

  • r

"free" 1 2 1 | 2 | | 2 | 1

ˆ ˆ ˆ ˆ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Δ Δ Δ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ + ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Φ Φ Φ = ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡

− + + + − − − + + + M k k k M P P P k P k k P k P k k k k k

u u u S S S S S S u S S S x C C C y y y

f

S

f

u Δ

f Y ˆ

Step response coefficients

slide-19
SLIDE 19
  • B. Wayne Bequette

Optimization Problem

( ) ( )

T i k M i u T i k P i k i k k i k y T k i k k i k u

u W u y r W y r J

f

+ − = + = + + + + Δ

Δ Δ + − − =

∑ ∑

1 1 | | | |

ˆ ˆ min

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ =

y y Y

W W W  ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ =

u u U

W W W 

E W E

Y T

ˆ ˆ

f U T f

u W u Δ Δ

Where

f f

u S f r Y r E Δ − − = − = ˆ ˆ

E

f f

u S E E Δ − = ˆ

and so “unforced” (free response) error future setpoints

slide-20
SLIDE 20
  • B. Wayne Bequette

Optimization Problem

( ) ( )

f f Y T f T f Y T f T f Y T f f Y T f f Y T

u S W S u E W S u E W E u S E W u S E E W E Δ Δ + Δ − = Δ − Δ − = 2 ˆ ˆ

f U T f

u W u Δ Δ +

=

Δ

J

f

u

min

E W E

Y T

ˆ ˆ

( )

E W S u u W S W S u

Y T f T f f U f Y T f T f

Δ − Δ + Δ 2

=

Δ

J

f

u

min

so can be written

= Δ ∂ ∂

f

u J

and the unconstrained solution is found from

slide-21
SLIDE 21
  • B. Wayne Bequette

Unconstrained Solution

In practice, do not actually invert a matrix. Solve as set of simultaneous equations (or use \ in MATLAB)

( )

E W S W S W S u

Y T f U f Y T f f

\ + = Δ

Analytical Solution for Unconstrained System

( )

E W S W S W S u

Y T f U f Y T f f 1 −

+ = Δ

“unforced” error

slide-22
SLIDE 22
  • B. Wayne Bequette

Vector of Control Moves

     

moves future and current 1 1

⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Δ Δ Δ = Δ

− + + M k k k f

u u u u Although a set of control moves is computed, only the first move is implemented The next output at k+1 is obtained, then a new

  • ptimization problem is solved

k

u Δ

slide-23
SLIDE 23
  • B. Wayne Bequette

MPC Tuning Parameters

l Prediction Horizon, P l Control Horizon, M l Manipulated Input Weighting, W

u

Usually, P >> M for robustness (less aggressive action). Sometimes M = 1, with P varied for desired performance. Sometimes larger input weights for robustness

slide-24
SLIDE 24
  • B. Wayne Bequette

Pre-Summary

l Concise overview of MPC l State space model, unconstrained solution l Have not discussed

Ø State estimation and “corrected outputs”

n The additive disturbance assumption of DMC is

covered in the slides that follow (this is identical to the plant-model mismatch term in IMC)

Ø Disturbances Ø Constraints Ø Other model forms

slide-25
SLIDE 25
  • B. Wayne Bequette

Original DMC Approach to Plant-Model Mismatch

k k k k k k k k k k k

p y y y y p

| 1 | | 1 | |

ˆ ˆ ˆ ˆ ˆ + = − =

− −

1 | 1 | 1 1 | 1 1 |

ˆ ˆ ˆ ˆ

− − − − − −

= Γ + Φ =

k k k k k k k k k

x C y u x x

Notice that Model States are Not “Corrected”

1 | |

ˆ ˆ

=

k k k k

x x

Prediction at step k, based

  • n information at k-1

Model output predicted from k-1 Measured

  • utput

“additive output” disturbance assumption (previously dk) Forces the model “corrected output” equal to measured output

slide-26
SLIDE 26
  • B. Wayne Bequette

Model Prediction to k+1

k k k k k k k k k k k k k k k k k k k k k k k k k k

p u C u C x C p u C x C p x C y p p u x x

| 1 1 | | 1 | | 1 | 1 | 1 | | 1 | | 1

ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆ

+ − + + + + + +

+ ΓΔ + Γ + Φ = + Γ + Φ = = + = = Γ + Φ =

Assumes future corrections equal to current correction

slide-27
SLIDE 27
  • B. Wayne Bequette

Continue Output Predictions

                                            

response "forced" 1 1 1 1 1 1 1 made) are moves control more no (if response" unforced "

  • r

"free" 1 1 1 | | 2 | | 2 | 1

ˆ ˆ ˆ ˆ ˆ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Δ Δ Δ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Γ Φ Γ Φ Γ Γ + ΦΓ Γ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Γ Φ Γ + ΦΓ Γ + ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ + ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Φ Φ Φ = ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡

− + + − = − = − − = − + + +

∑ ∑ ∑

M k k k P i i P i i k P i i k k k k P k P k k k k k

u u u C C C C C C u C C C C p I I I x C C C y y y

f

S

f

u Δ

f Y ˆ

slide-28
SLIDE 28
  • B. Wayne Bequette

Output Predictions

                                    

response "forced" 1 1 1 1 1 2 1 made) are moves control more no (if response" unforced "

  • r

"free" 1 2 1 | | 2 | | 2 | 1

ˆ ˆ ˆ ˆ ˆ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Δ Δ Δ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ + ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ + ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Φ Φ Φ = ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡

− + + + − − − + + + M k k k M P P P k P k k k k P k P k k k k k

u u u S S S S S S u S S S p I I I x C C C y y y

f

S

f

u Δ

f Y ˆ

slide-29
SLIDE 29
  • B. Wayne Bequette

Cain F Cb F Example Inverse Response Process: Van de Vusse

Constant V,T, ρ

A B C

k1 k2

A+A D

k3

dCa dt = -k1Ca - k3Ca2 + (Cain - Ca)u dCb dt = k1Ca - k2Cb - Cbu where u = F/V

slide-30
SLIDE 30
  • B. Wayne Bequette

Example: Inverse Response Process

10 20 30 40 50

  • 0.1

0.1 0.2 0.3 0.4 0.5 0.6 discrete time index, i s(i) step response coefficients

First four coefficients are negative Sum of first eight coefficients is positive

slide-31
SLIDE 31
  • B. Wayne Bequette

Closed-Loop: Compare P=10, M=1 with P=25, M=1

1 2 3 4 5 6

  • 0.5

0.5 1 1.5 y, mol/l time, min 1 2 3 4 5 6 1 2 3 u, min-1 time, min P = 10, M = 3 P = 25, M = 1 P = 10, M = 3 P = 25, M = 1

Short prediction horizons & long control horizons lead to more aggressive action

slide-32
SLIDE 32
  • B. Wayne Bequette

Results

1 2 3 4 5 6

  • 1.5
  • 1
  • 0.5

0.5 1 1.5 y, mol/l time, min P = 8 P = 7 1 2 3 4 5 6

  • 6
  • 4
  • 2

2 u, min-1 time, min P = 8 P = 7

Control Horizon: M = 1, Weighting: W = 0 P=7: Unstable

slide-33
SLIDE 33
  • B. Wayne Bequette

Stability of Inverse Response Systems with DMC

l For a control horizon, M = 1, closed-loop MPC will be stable

for a prediction horizon where the sum of the impulse response coefficients has the same sign as the process gain

min

1

>

= P i i

s

For the example, Pmin = 8, so P = 7 = unstable

slide-34
SLIDE 34
  • B. Wayne Bequette

Summary

l Concise overview of MPC l State space model, unconstrained solution l The additive disturbance assumption of DMC is

used for plant-model mismatch

l Upcoming topics

Ø Disturbances and state estimation (Kalman filtering

framework)

Ø Constraints Ø Other model forms