Anda di halaman 1dari 50

Introduction to Model Predictive

Control

Professor Jay H. Lee


Korea Advanced Institute Of Science and
Technology

Workshop at CPC-FOCAPO, Tucson, AZ


January 8, 2017
MPC: Basic Setup

Process
PID Gp

Actuator / Low-Level Loops


Sensor
Measureme
Optimal process Up-to-date Process
adjustment nt
Information

Dynamic Process Model


Numerical Optimization Solver Objective function and constraints
Workstation,
DCS
History

Dynamic process
model Optimal
+ process
Process Adjustment
measurements

“Real-time” prediction & optimization (min to s)

• Some early applications in the 50s and 60s


•(Re-)emerged in the early 80s
• Used for both process optimization and control
• Standard APC method for refineries and petrochemical plants
• Widespread industrial applications
• Many vendors marketing software and engineering service
–Aspen Tech, Honeywell, Invensys, etc.
• Embedded MPC for small, fast, high performance applications
Traditional vs. Embedded MPC
Some Key Features
• Computer based: Sampled-data control
• Model based: Requires a dynamic process model
(fundamental or empirical)
• Predictive: Based on explicit prediction of the future
time behavior of CVs within a chosen time window.
• Optimization Based: Performs optimization (numerical
search) on-line for optimal control adjustments.
Typically, no explicit form of control law – just model,
objective, and constraints are specified.
– Exceptions: unconstrained LMPC or explicit MPC
Explicit MPC

Table lookup

Bemporad, Morari, Pistikopoulos


Some Key Features
• Computer based: Sampled-data control
• Model based: Requires a dynamic process model
(fundamental or empirical)
• Predictive: Based on explicit prediction of the future
time behavior of CVs within a chosen time window.
• Optimization Based: Performs optimization (numerical
search) on-line for optimal control adjustments.
Typically, no explicit form of control law – just model,
objective, and constraints are specified.
• Integrated constraint handling and economic
optimization with regulatory and servo control.
• Receding Horizon Control: Repeats the prediction and
optimization at each sample time step to update the
optimal input trajectory after a feedback update.
Receding Horizon Control
A Short Review of Linear MPC
Important Ingredients of MPC Algorithm

• Observer: open-loop or a state estimator (e.g.,


Kalman filter)
• Multi-step prediction model
– Predicted future outputs = Function of current “state”
+ feedforward measurement + (feedback
measurement correction) + future input adjustments
• Objective function and constraints
• Optimization solver
• Receding horizon implementation
Step Response Model

x(k  1)  M
 1 x ( k )  S
 v(k )
shift step response
State Space Model
Conventional:
x(k  1)  Ax (k )  Bu (k )  Bd d (k )  Bw w*(k  1)
y(k )  Cx(k )  Dw w(k )
* Separate model (e.g., integrators) is typically needed.

Differenced (naturally puts integrators into the formulation):

x(k  1)  A 0 x(k )  B 


 y (k  1)   CA I   y (k )   CB  u (k )
      
 Bd   Bw 
  d (k )    w(k  1)
CBd  CBw  Dw 
x(k )
y (k )  0 I  
 y ( k ) 
Prediction Equation
Regardless of the model form used, for linear systems,

• If an open-loop observer is used

 yk 1|k  From open-loop observer


 u (k ) 
  u 
   Lx
x ( k
 )  L d
d ( k )  Le
e ( k )  L   
 y k  p| k  known  b ( k ) u (k  p  1)

   
Y (k ) U ( k )

• If a state estimator (e.g., Kalman filter) is used instead

 yk 1|k  state estimate  u (k ) 


  u 
   Lx
ˆ
x (
 k | k )  L d
d ( k )  L   
 y k  p| k  known  b ( k ) u (k  p  1)

   
Y (k ) U ( k )
Objective Function
• Minimization function: Quadratic cost (Why?)
p m 1
V (k )   ( y(k  i | k )  y*)  ( y(k  i | k )  y*)   u T (k  i)u u (k  i)
T y

i 1 i 0

– Consider only m input moves by assuming u(k+j)=0 for


jm
– Penalize the tracking error as well as the magnitudes of
adjustments
• Use the prediction equation. First m columns of Lu

V (k )  Y (k )  Y * diag (y )Y (k )  Y *  U mT (k )diag (u )U m (k )


T

Substitute
(condense)? Y (k )  b(k )  Lum U m (k )

V (k )  U mT (k ) HU m (k )  g T (k )U m (k )  c(k ) constant


Constraints

Substitute the prediction


equation and rearrange to

CU m (k )  h(k )
Optimization Problem (QP)
• “Condensed” (full hessian, but only inequality
constraint)

min U mT (k ) HU m (k )  g T (k )U m (k )


U m ( k )

such that CU m (k )  h(k )

• “Uncondensed” (diagonal hessian, but equality and


inequality constraint)
min
U ( k ),Y ( k )
Y (k )  Y * diag (y )Y (k )  Y *  U mT (k )diag (u )U m (k )
T

U m (k )
such that D    g ( k ) and Y ( k )  b ( k )  Lm U m ( k )
u

 Y (k ) 
Quadratic Program
• Minimization of a quadratic function subject to linear
constraints (inequalities and equalities).
• Convex and therefore fundamentally tractable.
• Solution methods
– Active set method: Iteratively update the working active set of
constraints until the KKT condition is satisfied.
– Interior point method: Use a (logarithmic) barrier function to
“trap” the solution inside the feasible region, solve via Newton
iteration. Primal, or more popularly, primal-dual method.
– First order method (e.g., fast dual gradient)
• Solvers
– Off-the-shelf software, e.g., CPLEX, IPOPT, QPSOL
– Customization is desirable for large-scale problems requiring
fast sample rates (Wang and Boyd, IEEE TAC, 2010)
Other Types of Penalty Function
• There are four ways to specify future output behavior: setpoint, zone,
reference trajectory and funnel
• Move suppression is necessary when reference trajectory is not used

quadratic penalty quadratic penalty

Setpoint Reference trajectory

past future past future

quadratic penalty
quadratic penalty
Zone Funnel
past future past future
Output Horizon
There are two ways to parameterize the output horizon; finite horizon and
coincidence points

Finite horizon

past future prediction horizon P

Coincidence points
Infeasibility and Constraint Relaxation
Constraint Relaxation Strategy (1)
Constraint Relaxation Strategy (2)
“Softening” of Constraints

Use 1-norm penalty for exact softening!


Beyond Linear Models
Hybrid System Models
Hybrid MPC

• Presence of integer
variables in the model
and constraints
• Mixed Integer LP or QP
• Well–studied
• BUT NP Complete.
• Not suitable for on-line
use. => Explicit MPC?
Nonlinear Models
Variational, indirect
(Pontryagin, 1952)

Sequential: Discretization
dx
 f ( x, z , u ) of control variable and
single shooting NLP
dt
(Vassiliadis, 1994)
0  g ( x, z , u )
Discretization of some state
& control variables and
multiple shooting NLP
DAE system (Bock, Diehl, 1999-2000)

Simultaneous: Full discretization


via collocation (Biegler, 2001)

F ( x(k ), z(k ), X (k ), Z (k ),U (k ))  0 A very large system of


algebraic equations
Nonlinear Models
min ( X (k ), Z (k ),U (k ))
X ( k ), Z ( k ),U ( k ) nonlinear, nonconvex
F ( x(k ), z (k ), X (k ), Z (k ),U (k ))  0
G ( X (k ), Z (k ),U (k ))  0
H ( X (k ), Z (k ),U (k ))  0

• Results in a large-scale, nonconvex NLP in general.


• Typically solved via SQP or its variations (e.g., the primal-
dual interior point method).
• Can be challenging numerically (given the time limit).
• Linearization of F along
– the trajectory corresponding to a constant input (Garcia)
– the trajectory predicted from the previous step’s calculation
– the current step solution assuming no new disturbance (~Biegler)
Multi-Scenario Models (expressing
uncertainties)

……..
Multi-Stage MPC

Prediction horizon
Analogy to Chess Playing

The opponent’s
move a new
Opponent board position
(The Environment)

my move
You
his move
(The Decision-maker)
my move

Exponentially exploding
# of scenarios w.r.t. depth
of moves!
Industrial Use of MPC
Industrial Use of MPC
• Some trial of computer based control during 50s-60s.
• Initiated at Shell Oil and other refineries during late
70s and early 80s.
• Various commercial software
– DMCplus – Aspen Tech
– RMPCT – Honeywell
– Connoisseur - Invensys
– Dozen+ other players (e.g., Predict and Control by ABB)
• 10s or 100s of thousands of worldwide installations
• Predominantly in the oil and petrochemical industries
but the range of applications is rapidly expanding.
• Models used are predominantly empirical models
developed through plant testing.
• Technology is used not only for multivariable control,
but for real-time optimization
Result of A Survey in 1999 (Qin and Badgwell)
Nonlinear MPC (Qin and Badgwell)
Advantages of MPC over Traditional APC

• Integrated solution
– automatic constraint handling
– Feedforward / feedback
– No need for decoupling or delay compensation
• Efficient Utilization of degrees of freedom
– Can handle non-square systems (e.g., more MVs and CVs)
– Assignable priorities, ideal settling values for MVs
• Consistent, systematic methodology
• Realized benefits
– Higher on-line times
– Cheaper implementation
– Easier maintenance
MPC as Constrained Multivariable Control
• MPC provides a systematic, consistent, and integrated solution
to process control problems with complex features:
– Delays, inverse responses and other complex dynamics.
– Strong interactions (e.g., large RGA)
– Constraints (e.g., actuator limits, output limits)

Supervisory More and more Process


Control optimization is Optimization
done at the MPC
level.
Selectors, Switches, Advanced MV Control
Delay Compensations, MPC
Anti-windups, Decouplers, etc.

Low-level Low-level
PID Loops PID Loops
To
control
valves
Integrating Control w/ On-Line Optimization
• Process optimization and control are often conflicting
objectives
– Optimization pushes the process to the boundary of
constraints.
– Quality of control determines how close one can push the
process to the boundary.
• Implications for process control
– High performance control is needed to realize on-line
optimization.
– Constraint handling is a must.
– The appropriate tradeoff between optimization and control is
time-varying and is best handled within a single framework

Model Predictive Control


Tradeoff Between Optimization and Control

w/ courtesy of Aspen Tech


Bi-Level Optimization Used in MPC

Economics Based
Steady-State Optimization Objective
(LP) (Maximum profit or
throughput, minimum
Optimal setting utility) Control Based
Steady-state
values for the Constraints
Prediction Model
inputs and outputs
(setpoints)

Dynamic Optimization Minimization of Error


(QP) (= Setpoint – Output & Input)
subject to
constraints on actuator limits
Adjustments to and safety-sensitive
New variables.
setpoints of low
Measurements
level loops or
(Feedback Update)
control valves
Economic MPC

Time-scale separation
may not hold, etc.

Economic MPC:
Combine them into a
single dynamic
optimization layer

A new research theme!


credit to J. Rawlings
Broadening Scope of Application

w/ courtesy of M. Morari
41
Broadening Scope of Application

w/ courtesy from Morari


42
Traditional vs. Embedded MPC
Modular manufacturing  More use of embedded MPC?
Remaining Challenges?
Importance of Modeling / ID
• Almost all models used in MPC are typically
empirical models “identified” through plant
tests rather than first-principles models.
– Step responses, pulse responses from plant tests.
– Transfer function models fitted to plant test data.
• Up to 80% of time and expense involved in
designing and installing a MPC is attributed to
modeling / system identification.  should be
improved.
• Keep in mind that obtained models are
imperfect (both in terms of structure and
parameters).
– Importance of feedback update of the model.
– Penalize excessive input movements.
Design Effort
Traditional Control: MPC:

Design and Modeling and


Tuning Identification
of Controller

Process Control
Analysis Specification
Challenges
• Efficient identification of control-relevant model
• Managing the sometimes exorbitant on-line
computational load
– Nonlinear models  Nonlinear Programs (NLP)
– Hybrid system models (continuous dynamics + discrete
events or switches, e.g., pressure swing adsorption) 
Mixed Integer Programs (NLP)
– Difficult to solve these reliably on-line for large-scale
problems (even though algorithms and computational
hardware continue to get better).
• Robust MPC formulation - accounting for modeled
uncertainties explicitly.
– Min-max formulation
– Stochastic formulation
– Curse of dimensionality
• Long-term maintenance of control system.
Conclusion
• MPC is a well-established advanced multivariable
control technique for the process industry. It is
already an indispensable tool and its importance and
domain are continuing to grow.
• Linear MPC is mature by now. Nonlinear MPC,
hybrid MPC, and multi-scenario (or robust) MPC are
still limited by their computational complexity.
• Economic MPC: It can be formulated to optimize
some economic function along with control and can
also be interfaced with a larger-scale (e.g., plant-
wide) optimization scheme.
• Obtaining and maintaining an accurate model and
having reliable sensors for key parameters are the
main current bottlenecks.
References
• Mayne, D.Q., Rawlings, J.B., Rao, C.V., and P.O.M.
Scokaert, “Constrained model predictive control:
stability and optimality”, Automatica, 2000.
• Morari, M. and J. H. Lee, “Model predictive control:
past, present, and future, Computers and Chem.
Engr., 1999.
• Qin, S. and Badgwell, T. A., “A survey of industrial
model predictive control technology,” Control
Engineering Practice, 2003.
• Lee, J. H., “Model Predictive Control: Review of the
Three Decades of Development,” International
Journal of Control, Automation, and Systems, 2011.

Anda mungkin juga menyukai