Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

MPC Elements

Eduardo F. Camacho
Univ.of Sevilla

E.F. Camacho ECCI MPC Course Paris

Outline

• Process models
• Disturbance models
• Objective functions
• Reference trajectories
• Free and force response
• Solving procedure
• Some examples

E.F. Camacho ECCI MPC Course Paris

1
Process models
• Time:
– Continuous dx/dt=f(x,u)
– Discretized x(t+T)=f(x(t),u(t))
• Variables
– Continuous
– Discrete
– Mixed (hybrid model)
• Functions
– Linear
– Nonlinear

State space models

x(t+1)=A x(t) + b u(t)


y(t) =C x(t)
Prediction

Pros: compact, simple prediction equations, unstable and


stable processes, stability
Cons: More abstract

E.F. Camacho ECCI MPC Course Paris

2
Transfer function models
A(z-1) y(t) = B(z-1 ) u(t)
with
A(z-1)= 1+ a1 z-1 + a2 z-2 + ... + ana z-na
B(z-1)= b0 + b1 z-1 + b2 z-2 + ... + bnb z-nb

The predictions are given by

Pros: Compact, stable and unstable processes


Cons: Less intuitive

E.F. Camacho ECCI MPC Course Paris

Impulse response models

Impulse response.

E.F. Camacho ECCI MPC Course Paris

3
Impulse response models (2)

Sometimes the sum can be truncated (FIR systems)

y (t)= hi u (t – 1)= H (z-1) u (t)

H (z-1) = h1 z-1 + h2 z-2 + … + hN z-N

Pros: Intuitive
Cons: Many coefficients, Only stable models

E.F. Camacho ECCI MPC Course Paris

Impulse response models (3)

The prediction will be given by:

Multivariable processes:

E.F. Camacho ECCI MPC Course Paris

4
Step response models

y (t)= y0 + gi u (t – i) = y0 + G (z-1) (1 – z-1) u (t)

E.F. Camacho ECCI MPC Course Paris

Step response models (2)

Prediction

As an impulse can be considered as the difference


between two steps with a lag of one sampling period

E.F. Camacho ECCI MPC Course Paris

5
Disturbances Models

e(t) is a white noise, zero mean


D(z−1) explicitly includes the integrator △ = 1−z−1
C(z−1) is the coloring polynomial

When C(z-1)=1, using the Diophantine equation:

1= Ek(z−1)D(z−1) + z−kFk(z−1)

E.F. Camacho ECCI MPC Course Paris

Disturbances Models (2)

The noise prediction

Making D(z-1)=A(z-1) (1- z-1)

The k-step ahead predictor

E.F. Camacho ECCI MPC Course Paris

6
Disturbances Models (3)
In the particular case of ARIMA the constant
disturbance

whose best predictions will be


Used on DMC and related methods.
An extension is the drift disturbance used in PFC

with (t + k | t) = n (t) + (n (t) – n (t – 1))


E.F. Camacho ECCI MPC Course Paris

Free and Forced Response

The control sequence


u (t) = uf (t) + uc (t)
uf (t) is made equal to zero in the past and equal
to the next control moves in the future.

E.F. Camacho ECCI MPC Course Paris

7
Objetive Function

Parameters: N1, Nu, , λ(j).

For example: An exponential weight.

E.F. Camacho ECCI MPC Course Paris

Objetive Function (other)

E.F. Camacho ECCI MPC Course Paris

8
Reference Trajectory

r (t + k) is known before hand in many


applications

Another strategy PFC, the reference trajectory used to


specify closed-loop behaviour; defining an auxiliary
output

deadbeat control in is achieved so that

E.F. Camacho ECCI MPC Course Paris

Solving procedure
Define u=[u(t),u(t+1),...u(t+Nu)]
y=[y(t+N1), .... Y(t+N2)]

Find the predictions equation along the horizon


y=F(u,x(t)) (1)

Substitute (1) in the ojective function so


J(y,w,u)=J(F(u,x(t),w,u)=J1(u,w,x(t))

Solve u*=arg minu J1(u,w,x(t))

Use the first component of u* and disregard the rest.

E.F. Camacho ECCI MPC Course Paris

9
Some examples: a gas heater

E.F. Camacho ECCI MPC Course Paris

Some examples: a gas heater

Type of model ?

N1=?, N2=?, Nu=?, δ(j)=?, λ(j)=?


E.F. Camacho ECCI MPC Course Paris

10
Some examples: a jacket cooled reactor

E.F. Camacho ECCI MPC Course Paris

Some examples: a jacket cooled reactor

Y1(s) = 2/(1+4s) U1(s) + 3/(1+5s) U2(s)

Y2(s) = 1/(1+7s) U1(s) + 7/(1+6s) U2(s)

Type of model ?

N1=?, N2=?, Nu=?, δ(j)=?, λ(j)=?


E.F. Camacho ECCI MPC Course Paris

11
Some examples: Stock control

Y(t+1) = Y(t) – Y(t)*LossCoeff – Sales(t) + Orders(t-d)

Type of model ?
N1=?, N2=?, Nu=?, δ(j)=?, λ(j)=?
Constraints ?
E.F. Camacho ECCI MPC Course Paris

Some examples:
The SIR Model for Spread of Disease (covid-19)

S(t) the susceptible population


I(t) the infected population
R(t) the recovered population

S(t)=S(t-1)- b I(t) S(t)/N


R(t)=R(t-1) + k I(t)
I(t)=I(t-1)+b I(t) S(t)/N- k I(t)

Manipulated variable ?, Objective function ?


Constraints ? Linear ? N1, N2, Nu ?
E.F. Camacho ECCI MPC Course Paris

N1=?, N2=?, Nu=?, δ(j)=?, λ(j)=? Constraints ? 12


A Mixing Process example

1. Filled and stirred at the same time until the level in the tank
reaches the maximum height H.
2. At this point the outlet valve opens, letting the product out until
the level in the tank is below the empty level.

xb = 0 the process in the filling-mixing state


xb = 1 when the process is in the empty state.

A Mixing Process example

1. Filled and stirred at the same time until the level in the tank
reaches the maximum height H.
2. Keep temperature at Tsp for 20 minutes
3. At this point the outlet valve opens, letting the product out until
the level in the tank is below the empty level.

xb = 0 the process in the filling-mixing state


xb = 1 when the process is in the empty state.

13

You might also like