M o d e l P re d ic ti v e C o n tr o l Model Predictive Control (MPC)
Overview of Model Predictive Control
Impulse/Step Response Model Identification
Predictions for SISO and MIMO Models
Model Predictive Control Calculations
Selection of Design and Tuning Parameters
M o d e l P re d ic ti v e C o n tr o l
MPC - Motivation
• Practical Problems
– multivariable
– difficult dynamic behavior – nonlinear
– constraints (input, output)
• Overall Objectives of MPC
– Prevent violations of input and output constraints.
– Drive some output variables to their optimal set points, while maintaining other outputs within specified ranges.
– Prevent excessive movement of the input variables.
M o d e l P re d ic ti v e C o n tr o l
MPC - Basic Concepts
1. Future values of output variables are predicted using a dynamic model of the process and current measurements.
• Unlike time delay compensation methods, the predictions are made for more than one time delay ahead.
2. The control calculations are based on both future predictions and current measurements.
3. The manipulated variables, u(k), at the k-th sampling instant are calculated so that they minimize an objective function, J.
• Example: Minimize the sum of the squares of the deviations between predicted future outputs and specific reference
trajectory.
4. Inequality & equality constraints, and measured disturbances are included in the control calculations.
5. The calculated manipulated variables are implemented as set point for lower level control loops. (cf. cascade control).
M o d e l P re d ic ti v e C o n tr o l
MPC Block Diagram
Basic Elements of MPC
Reference Trajectory Specification
Process Output Prediction (using Model)
Control Action Sequence Computation (programming problem)
Error Prediction Update (feedback)
M o d e l P re d ic ti v e C o n tr o l
Control Hierarchy
M o d e l P re d ic ti v e C o n tr o l
MPC - Calculations
1. At the k-th sampling instant, the values of the manipulated
variables, u, at the next M sampling instants, {u(k), u(k+1), …, u(k+M -1)} are calculated.
• This set of M “control moves” is calculated so as to minimize the predicted deviations from the reference trajectory over the next P sampling instants while satisfying the constraints.
• Typically, an LP or QP problem is solved at each sampling instant.
• Terminology: M = control horizon, P = prediction horizon
2. Then the first “control move”, u(k), is implemented.
3. At the next sampling instant, k+1, the M-step control policy is re-calculated for the next M sampling instants, k+1 to k+M, and implement the first control move, u(k+1).
4. Then Steps 1 and 2 are repeated for subsequent sampling instants.
Note: This approach is an example of a receding horizon approach.
M o d e l P re d ic ti v e C o n tr o l
Figure 20.2 Basic concept for Model Predictive Control
M o d e l P re d ic ti v e C o n tr o l
Moving Horizon Concept of MPC
M o d e l P re d ic ti v e C o n tr o l
When Should MPC be Used?
1. Processes are difficult to control with standard PID algorithm (e.g., large time constants, substantial time delays, inverse response, etc.)
2. There is significant process interactions between u and y.
• i.e., more than one manipulated variable has a significant effect on an important process variable.
3. Constraints (limits) on process variables and
manipulated variables are important for normal control.
Terminology:
• y ↔ CV, u ↔ MV, d ↔ DV
M o d e l P re d ic ti v e C o n tr o l
MPC History
• Model Algorithmic Control (MAC) (1978)
– Finite impulse response model
• Dynamic Matrix Control (DMC) (1980)
– Step response model
– Control calculation by least-squares method (no constraints)
• Quadratic Dynamic Matrix Control (QDMC) (1984)
– Step response model
– Control calculation by quadratic programming (with constraints)
• Generalized Predictive Control (GPC) (1987)
– Transfer function model
• Nonlinear Model Predictive Control (NMPC)
•
Over 5000 applications of MPC since 1980 (Qin and Badgwell, 2003)M o d e l P re d ic ti v e C o n tr o l
Dynamic Models for MPC
• Could be either:
1. Physical or empirical (but usually empirical) 2. Linear or nonlinear (but usually linear)
3. Parametric or non-parametric
• Typical linear models used in MPC:
1. Impulse response models 2. Step response models 3. Transfer function models 4. State-space models
Note: Can convert one type of linear model to the other types
• Discrete-time models are more convenient for
prediction
M o d e l P re d ic ti v e C o n tr o l
Discrete Impulse Response Models
Consider a single input, single output process:
where u and y are deviation variables, u(k) and y(k) are their measurements at k-th sampling instant.
• Definition: impulse response is the response of a
relaxed process to a unit pulse (impulse) excitation at t = 0
• Process input-output relationship
{ } h
ii = 0 1 2 3 , , , , ⋯
( ) ( )
0 i i
y k h u k i
∞
=
= ∑ −
(convolution summation)u Process y
u (k) y (k)
M o d e l P re d ic ti v e C o n tr o l
• For a stable process: for i > N
Finite Impulse response (FIR)
• For a multivariable process with r inputs and m outputs, the representation becomes a impulse response
matrix
h
ij,k:
the FIR between the j-th input and the i-th output≈ 0 h
i( ) ( )
0 N
i i
y k h u k i
=
= ∑ −
11 1
1
0 1 2 3
r
m mr
,k ,k
k
,k ,k
h h
k , , , ,
h h
= =
H
⋯
⋮ ⋱ ⋮ ⋯
⋯
( ) ( )
0 N
i i
k k i
=
= ∑ −
y H u
(h0 = 0)
M o d e l P re d ic ti v e C o n tr o l
• Identification problem: given input u(k) and output measurement y(k) find the FIR, h
i• Assumptions:
– The input u(k) is a continuing driving function of the process.
We observe u(k) for where n > N.
– The output sequence y(k) for is also observed.
– The noise e(k) is a random sequence with zero mean and is uncorrelated with u(k).
FIR Identification
0 ≤ ≤ +k n N
N ≤ ≤ +k n N Process
(FIR, hi)
e(k)
u(k) + y(k)
(noise)
w(k)
M o d e l P re d ic ti v e C o n tr o l
• Using the input-output relationship, we have n+1 eqs.
• Written in vector form
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
0 1
0 1
0 1
1 0
1 1 1 1 1
1
N N
N
k N , y N h u N h u N h u e N
k N , y N h u N h u N h u e N
k N n, y N n h u N n h u N n h u n e N n
= = + − + + +
= + + = + + + + + +
= + + = + + + − + + + +
⋯
⋯
⋮ ⋮
⋯
y = Uh + e ( ( ) )
( )
( ( ) )
( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
0 1
1 0
1 1 1 1
; ; ;
N 1
y N e N h u N u N u
y N e N h u N u N u
y N n e N n h u N n u N n u n
−
+ + +
= = = =
+ + + + −
y e h U
⋯
⋯
⋮ ⋮ ⋮ ⋮ ⋮ ⋱ ⋮
⋯
n+1 equations, N+1 unknowns (n > N)
No exact solution
M o d e l P re d ic ti v e C o n tr o l
Least-Squares Estimation
• Estimate the unknown parameter vector h by the method of least-squares
(minimize the error criterion J = e
Te with respect to h
where )
• Accuracy of
– is an unbiased estimate of h, i.e.
– is a consistent estimate of h if
• Potential problems
– The selection of settling time parameter N (unknown a priori) – Usually needs to repeat the computation with progressively
increasing N values
– A large N value may cause computational difficulty
( )
1h ˆ = U U
T −U y
Thˆ
hˆ
n → ∞
hˆ
(Least-squares estimator)
( )
hˆ = hE e = −y Uh
Solution :
M o d e l P re d ic ti v e C o n tr o l
Multivariable FIR Identification
• Input-output relationship for the i-th output
• Least-squares estimation
( ) ( )
[ ]
1 0
1 2
r N
i ij , j
j
i r i i i i
y k h u k
= =
= −
⇒ = + = +
∑ ∑
y U U U h e U h e
ℓ ℓ
ℓ
⋯ ( ( ) )
( )
( ( ) )
( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
0 1
1 2
1 0
1 1
1 1
; ; ;
1
;
j j j
i i
j j j
i i
i i j
i i j j j
ij ,
ij , T T T T
ij i i i ir
ij ,N
u N u N u
y N e N
u N u N u
y N e N
y N n e N n u N n u N n u n
h h
h
−
+ + +
= = =
+ + + + −
= =
y e U
h h h h h
⋯
⋯
⋮ ⋮ ⋮ ⋮ ⋱ ⋮
⋯
⋮ ⋯
( )
T 1 Ti i
ˆ =
−h U U U y
M o d e l P re d ic ti v e C o n tr o l
Discrete Step Response Models
• The step response S
iis related to the impulse response h
i( ) ( )
0
0
N
k i
i k
k i
i
S y k h u k i
S h
=
=
= = −
⇒ =
∑
∑
For unit step input, u(k)=1
1
i i i
h = − S S
−or
(S0 = 0)
M o d e l P re d ic ti v e C o n tr o l
• The step response model of a stable SISO process
• Let k denote the current sampling instant and denote the prediction of
y(k+1)at time
kPrediction for SISO Step Response Models
( )
1( ) ( )
1
1 1 1
N
i N
i
y k + S u k i S u k N
−
=
⇒ =
∑
∆ − + + − +Si = the i-th step response coefficient N = an integer (the model horizon)
= change in the input from one sampling instant to the next
( ) ( ) (
1) ( )
1 1
1 1 1
N N
i i i
i i
y k h u k i S S − u k i
= =
+ =
∑
− + =∑
− − +( ) ( ) (
= − −1)
∆u k u k u k
(
1)
N 1 i(
1)
N(
1)
ˆy k + S u k i S u k N
=
∑
− ∆ − + + − +(
1)
ˆy k +
One-step-ahead prediction
M o d e l P re d ic ti v e C o n tr o l
• Rearrange as
• Two-step-ahead prediction (k = k+1)
• j -step ahead prediction
1 1
Effect of current 2
control action Effect of past control actions
ˆ( 1) ( ) ( 1) ( 1)
N
i N
i
y k S u k S u k i S u k N
−
=
+ = ∆ +
∑
∆ − + + − +
1
1 2
Effect of future Effect of current 3
control action control action Effect of past control actions
ˆ( 2) ( 1) ( ) ( 2) ( 2)
N
i N
i
y k S u k S u k S u k i S u k N
−
=
+ = ∆ + + ∆ +
∑
∆ − + + − +
1
1 1
ˆ( ) ( ) ( ) ( )
j N
i i N
i i j
Effects of current and Effects of past
future control actions control actions
y k j S u k j i S u k j i S u k j N
−
= = +
+ =
∑
∆ + − +∑
∆ + − + + −
1
ˆ( ) ( ) ˆ ( )
j
o i
i
y k j S u k j i y k j
=
+ =
∑
∆ + − + +Predicted unforced response (no current or future control actions, )u k
(
+ =i) (
u k −1)
for i ≥0M o d e l P re d ic ti v e C o n tr o l
• Example :
Derive a predictive control law based on thefollowing concept. A single control move, , is calculated so that the J-step-ahead prediction is equal to the set-point.
Assume for i > 0.
( )
∆u k
( ) 0
u k i
∆ + =
ˆ( ) J ( ) ˆo( )
y k + J = S ∆u k + y k + J Setting and rearranging gives the desired predictive controller
ˆ( ) sp
y k + J = y
ˆ ( )
( )
o sp
J
y y k J
u k S
− +
∆ =
A single prediction for J step ahead Solution:
Apply the predictive
control law to the process
( )
5( ) 1
( ) 5 1 Y s
U s = s +
Large J sluggish response
M o d e l P re d ic ti v e C o n tr o l
Vector Notation for Multiple Predictions
Define vectors:
: predicted response for the next P sampling instants : predicted unforced response
: control actions for the next M sampling instants
( )
( ( ) )
( )
1 1 2
ˆy k+
ˆy k+
ˆ k +
ˆy k+P
≜ ⋮
Y
(
1)
ˆ k + Y
(
1)
ˆ o k + Y
( )
k∆U
( )
( ) ( )
( )
1 1 2
o
o
o
ˆy k+
ˆy k+
ˆ k +
ˆy k+P
≜ ⋮ Yo
( )
( ) ( )
( )
1
1 u k k u k+
u k+M -
∆
∆
∆
∆
≜ ⋮
U
M o d e l P re d ic ti v e C o n tr o l
• The MPC control calculations are based on calculating so that the predicted outputs move optimally to the new set-point
• The model predictions can be written as
where S is the dynamic matrix
Dynamic Matrix Model
(
1) ( ) (
1)
ˆ k + = ∆ k + ˆ o k +
Y S U Y
0 0
0
0
1
2 1
M M -1 1
M +1 M 2
P P-1 P-M +1
S
S S
S S S
S S S
S S S
⋯
⋮
⋮ ⋮ ⋱
≜ ⋯
⋯
⋮ ⋮ ⋱ ⋮
⋯ S
P M×
( )
k∆U
M o d e l P re d ic ti v e C o n tr o l
Output feedback: Bias Correction
• Sources of inaccurate prediction:
–
model inaccuracy and unmeasured disturbance• The model predictions can be corrected by utilizing the latest measurement, y(k).
• The corrected prediction is defined to be:
• Adding this bias correction to each prediction gives
( ) ( ) ( )
( ) ( ) ( )
ˆ ˆ
y k + j y k + j + d k + j
ˆy k + j + y k − ˆy k
ɶ ≜
≜
( ) ( ) ( )
ˆ ˆ
d k + j = y k − y k
Estimated disturbance (Residual)
(
k +1)
= ∆( )
k + ˆ(
k +1)
+1y k( ) ( )
− ˆy k ɶ o
Y S U Y
Process
d(k)
u + y(k)
(disturbance)
( )
ˆy k
M o d e l P re d ic ti v e C o n tr o l
EXAMPLE
The benefits of using corrected predictions will be illustrated by a simple example, the first-order plus-time-delay model:
Assume that the disturbance transfer function is identical to the process transfer function, Gd(s)=Gp(s). A unit step change in u occurs at time t=2 min and a step disturbance, d=0.15, occurs at t=8 min. The sampling period is ∆t = 1 min.
(a) Compare the process response y(k) with the predictions that were made 15 steps earlier based on a step response model with N=80.
(b) Repeat part (a) for the situation where the step response coefficients are calculated using an incorrect model:
4 -2
20 1
Y(s) e s
U(s)= s + 5 2
15 1
Y(s) e- s
U(s)= s +
M o d e l P re d ic ti v e C o n tr o l
(a) Without model error. (b) With model error.
( ) ( ) ( )
( ) ( ) ( )
15 15 15
15 ˆ ˆ
y k + y k + + d k +
ˆy k + + y k − ˆy k
ɶ ≜
≜
Bias correction begins after t = 25 (k = 10)
Bias correction begins after t = 19 (k = 4)
M o d e l P re d ic ti v e C o n tr o l
• By the Principle of Superposition
• Let the output vector be and the input vector be
• The MIMO model for the corrected predictions
Prediction for MIMO Step Response Models
( ) ( ) ( ) 1 12 2( ) 12 2( )
1 1
11 1 11 1
1 1
N
,i ,
N
,i ,N
i
N i
S u k j i S u k j S u k
ˆy k + j N j i S u k j N
−
=
−
=
∆ + − − ∆ + − +
=
∑
+ + +∑
+ −( ) ( ) ( ) 1 22 2( ) 22 2( )
1 1
21 1 21 1
1 2
N
,i ,
N
,i ,N
i
N i
S u k j i S u k j S u k
ˆy k + j N j i S u k j N
−
=
−
=
∆ + − − ∆ + − +
=
∑
+ + +∑
+ −(
k +1)
= ∆( )
k + ˆ(
k +1)
+Φ y( ) ( )
k −ˆy k ɶ o
Y S U Y
[
y1 y2 ym]
T=
y ⋯
[
u1 u2 ur]
T=
u ⋯
( )
( ( ) )
( )
11 1 2
k+
k + k+
k+P ×
y y
y ɶ
ɶ ≜ ɶ
⋮
ɶ mP
Y ( )
( )
( )
( )
1 1 2
ˆ k+
ˆ k+
ˆ k +
ˆ k+P
o
o
o
y y
y
≜ ⋮
Yo
( )
( ) ( )
( )
11
1 k k k+
k+M -
×
∆
∆
∆
∆
u u
u
≜ ⋮
rM
U
M o d e l P re d ic ti v e C o n tr o l
• The matrix is defined as
where denotes the identity matrix
• The dynamic matrix is defined as
where S
iis the matrix of step response coefficients for the i-th time step
[ ]
times
T
P
= m m m
Φ I I ⋯ I
mP m× Φ
m m× Im
0 0
0
0
1
2 1
M M -1 1
M +1 M 2
P P-1 P-M +1 mP rM×
⋯
⋮
⋮ ⋮ ⋱
≜ ⋯
⋯
⋮ ⋮ ⋱ ⋮
⋯ S
S S
S S S S
S S S
S S S
11,i 1r,i i
S S
=
⋯
⋮ ⋱ ⋮
⋯ S
m r×
M o d e l P re d ic ti v e C o n tr o l
Example: Individual step-response models for a distillation column with three inputs and four outputs. Each model represents the step response for 120 minutes. Reference: Hokanson and Gerstle (1992).
M o d e l P re d ic ti v e C o n tr o l
Exponential Trajectory from y(k) to ysp(k)
A reasonable approach for the i-th output is to use:
for i=1,2,…, m and j=1, 2, …, P.
MPC Calculations
Reference Trajectory
• A reference trajectory can be used to make a gradual transition to the desired set point.
• Let the reference trajectory over the prediction horizon P be denoted as:
• The control objective is to calculate a set of control moves
(input changes) that make the corrected predictions as close to a reference trajectory as possible.
( )
( ( ) )
( )
11 1 2
k+
k + k+
k+P ×
≜ ⋮
r
r r
r mP
y Y y
y
( ) ( ) ( ) ( ) ( )
, j 1 j ,
i r i i i i sp
y k + =j α y k + − α y k
( ( )
αi j =0 ⇒ yr = ysp)
M o d e l P re d ic ti v e C o n tr o l
Unconstrained MPC
• The control calculations are based on minimizing the predicted deviations between the reference trajectory.
• The predicted error vector is defined as:
Similarly, the predicted unforced error, , is defined as
( ) ( ) ( )
o o
1 1 1
ˆ k + ≜ r k + − ɶ k +
E Y Y
• The objective of the control calculations is to determine the control moves, , for the next M time intervals.
• The rM-dimensional vector is calculated so that an
objective function (also called a performance index) is minimized.
(
1) (
1) (
1)
ˆ k + ≜ r k + − ɶ k +
E Y Y
(
k +1)
ˆ(
k +1)
+Φ y( ) ( )
k − ˆy k ɶo ≜ o
Y Y
( )
o 1
ˆ k + E
where the corrected prediction for unforced case is defined as
Note that all of the above vectors are of dimension, mP.
( )
k∆U
( )
k∆U
(
1)
o(
1) ( )
ˆ k + ˆ k + k
⇒ E = E − ∆S U
M o d e l P re d ic ti v e C o n tr o l
MPC Performance Index
• The rM-dimensional vector ∆U(k) is calculated so as to minimize:
a. The predicted errors over the prediction horizon, P.
b. The size of the control move over the control horizon, M.
• Example: Consider a quadratic performance index:
( 1 )
T( 1 ) ( )
T( )
( k )
ˆ ˆ
min k k k k
∆
= + + + ∆ ∆
U
Q
E E R
J U U
where Q and R are weighting matrices used to weight the most important outputs and inputs.
Both Q and R are usually diagonal matrices with positive diagonal elements.
M o d e l P re d ic ti v e C o n tr o l
MPC Control Law: Unconstrained Case
• The MPC control law that minimizes the quadratic objective function can be calculated analytically
( ) ( )
o( 1 )
where is the dynamic matrix.
T -1 T
ˆ
k = k +
∆ U S Q S + R S Q E
S
• This control law can be written in a more compact form
( )
k = c ˆ o(
k +1)
∆U K E
where controller gain matrix Kc is defined to be:
(
T)
-1 Tc ≜ +
K S Q S R S Q rM mP×
• Note that Kc can be evaluated off-line, rather than on-line,
provided that the dynamic matrix S and weighting matrices, Q and R, are constant.
Dimension:
(a multivariable, proportional control law based on the predicted error)
( )
k = 0∂
∂∆
J U
M o d e l P re d ic ti v e C o n tr o l
MPC Control Law:
Receding Horizon Approach
• Note that the controller gain matrix, Kc, is an matrix.
where:
• In the receding horizon control approach, only the first step of the M-step control policy, , is implemented.
• MPC control law:
where matrix Kc1 is defined to be the first r rows of Kc. Thus, Kc1 has dimensions of .r mP×
.
( )
k = 1 ˆ(
k +1)
∆u K Ec o
( )
k = c ˆ o(
k +1)
∆U K E
( )
( ) ( )
( )
11
1 k k k+
k+M -
×
∆
∆
∆
∆
u u
u
≜ ⋮
rM
U
( )
k∆u
rM ×mP
Advantage: new information in the form of the most recent measurement y(k) is utilized immediately
M o d e l P re d ic ti v e C o n tr o l
Unconstrained MPC (DMC) Algorithm
• The process output, y(k), is measured, and used to estimate the disturbance.
• The predicted unforced error, , is updated
(accounting for changes in set-point and effect of previous controller moves).
• Solve for control move.
• (first step only) is implemented.
• Counter is updated: k = k + 1.
( ) ( ) ( )
ˆ ˆ
d k + j = y k − y k
( ) ( ) ( ) ( ) ( )
o 1 1 1
ˆ k + = r k + − ˆ o k + −Φ y k − ˆy k
E Y Y
( )
o 1
ˆ k + E
( )
k =(
T)
-1 T ˆ o(
k +1)
∆U S Q S + R S Q E
( )
k∆u
M o d e l P re d ic ti v e C o n tr o l
MPC with Inequality Constraints
• Inequality constraints on input and output variables are important characteristics for MPC applications
– Input constraint: physical limitations on plant equipments such as limits on input value and rate-of-change
– Output constraint: related to plant operating strategy such as constraint on product quality
• MPC inequality constraints
• The introduction of inequality constraints results in a
constrained optimization problem– Can be solved numerically using linear or quadratic programming techniques
( ) ( ) ( )
( ) ( ) ( )
0,1, , 1
0,1, , 1
k k j k j M
k k j k j M
− +
− +
≤ + ≤ = −
∆ ≤ ∆ + ≤ ∆ = −
u u u
u u u
⋯
⋯
(
k j) (
k j) (
k j)
j 1, 2, ,P− + ≤ + ≤ + + =
y yɶ y ⋯
M o d e l P re d ic ti v e C o n tr o l
Selection of Design Parameters
Model predictive control techniques include a number of design parameters:
N : model horizon
∆ t : sampling period
P : prediction horizon (number of predictions)
M : control horizon (number of control moves)
Q : weighting matrix for predicted errors (Q > 0)
R : weighting matrix for control moves (R > 0)
M o d e l P re d ic ti v e C o n tr o l
Selection of Design Parameters
1. N and ∆∆∆∆t
These parameters should be selected so that N ∆t > open-loop settling time. Typical values of N:
30 < N < 120 2. Prediction Horizon, P
Increasing P results in less aggressive control action Set P = N + M
3. Control Horizon, M
Increasing M makes the controller more aggressive and increases computational effort, typically:
5 < M < 20 or N/3 < M < N/2 4. Weighting matrices Q and R
Diagonal matrices with largest elements corresponding to most important variables
– output weighting matrix Q : the most important variables having the largest weights
– input weighting matrix (move suppression matrix) R : increasing the values of weights tends to make the MPC controller more conservative by reducing the magnitudes of the input moves
M o d e l P re d ic ti v e C o n tr o l
Example: SISO system
(
10 1 5)(
1)
-
( )=
+ +
e s
G s s s Assume N = 70, t =∆ 1
The controller gain matrix, Kc, for two cases (Qii = 1, Rii = 0):
Set-point response [MPC vs. PID (ITAE set-point tuning)]
MPC: small settling time
M o d e l P re d ic ti v e C o n tr o l
Disturbance response [MPC vs. PID (ITAE disturbance tuning)]
MPC: small maximum deviations and non-oscillatory
M o d e l P re d ic ti v e C o n tr o l
• Wood and Berry process–
– Saturation limits of were imposed on each input
– +1% set-point change in XB at t=0, followed by two feed flow rate disturbances: +30% increase at t=50 and a return to the original value at t=100 (Fs = 2.45)
– Compare a variety of MPC controllers and a multi-loop control system (Lee et al., 1998)
MIMO Example:
Effects of MPC design parameters (M, P, Q, R)
1 min
∆t =
0 15.
±
7.21 0.85
XD – R
Kc
Control loop τI
M o d e l P re d ic ti v e C o n tr o l
Unconstrained MPC vs. Multi-loop Control
MPC is superior to the multi-loop control system (faster responses, less oscillation).
M o d e l P re d ic ti v e C o n tr o l
Effect of input weighting matrix R
When R are increased, the MPC inputs become smoother and the output
M o d e l P re d ic ti v e C o n tr o l
Effect of output weighting matrix Q
Control of the more heavily weighted output improves at the expense of
M o d e l P re d ic ti v e C o n tr o l
Effect of control horizon M
The y responses are similar, but the u responses are smoother for M = 5.
M o d e l P re d ic ti v e C o n tr o l
MATLAB Tools for MPC
• Unconstrained MPC (DMC)
– Kmpc = mpccon(model,ywt,uwt,M,P)
• Calculate MPC controller gains for unconstrained case.
• Inputs:
– model : Step response coefficient matrix of model.
– ywt,uwt : output and input weighting matrices.
– M : control horizons.
– P : prediction horizon.
• Output:
– Kmpc : Controller gain matrix
– model = tfd2step(tfinal,delt,nout,g1,...,g25)
• Determines the step response model of a transfer function model.
• Inputs:
– tfinal: truncation time for step response model.
– delt: sampling interval for step response model.
– nout: number of outputs, ny.
– g1, g2,...: SISO transfer function ordered to be read in columnwise (by input). The number of transfer functions required is ny*nu. (nu=number of inputs). Limited to ny*nu <= 25.
• Output:
M o d e l P re d ic ti v e C o n tr o l
– g = poly2tfd(num,den,delt,delay)
• Create transfer functions for MPC toolbox
• Inputs:
– num : Coefficients of the transfer function numerator.
– den : Coefficients of the transfer function denominator.
– delt : Sampling time. Can be 0 (for continuous-time system) or > 0 (for discrete-time system).
– delay : Pure time delay (dead time). Can be >= 0.
• Output:
– g: transfer function.