Professional Documents
Culture Documents
and
Model Predictive Control
(LQOC and MPC)
Sachin C. Patwardhan
Dept. of Chemical Engineering
I.I.T. Bombay
Email: sachinp@iitb.ac.in
Automation Lab
Outline
IIT Bombay
Motivation
Reachability
Pole Placement Controller Design
Linear Quadratic Optimal Control
Linear Model Predictive Control Formulation
Introduction to Nonlinear Model Predictive
Control Formulation
Conclusions and References
Control Problem
IIT Bombay
Conventional approach
Multi-loop PI: difficult to tune
Ad-hoc constraint handling using logic programming
(PLCs): lack of coordination
Nonlinearity handling by gain scheduling
Controller Design
IIT Bombay
model is perfect
Input Sequence
IIT Bombay
CSTR Example
IIT Bombay
dC A
f1 (C A ,T , F , Fc ,C A0 ,Tcin )
dt
dT
f 2 (C A ,T , F , Fc ,C A0 ,Tcin )
dt
Discrete linear perturbation model
Sampling Time (T) = 0.1 min
C (t ) C A F (t ) F
x (t ) A ; u ( t ) ; d (t ) C Ai (t ) C Ai
T (t ) T Fc (t ) Fc
0.9233 0 0.1813 0
0 0.9462 0 0.1493
0 0 0.8112 0
0 0 0 0.8465
0.4001 0.02276
0.01209 0.3055
0.5 0 0 0
C
0 0.2159 0 0.5 0 0
0.1438 0
1/16/2014 State
State
Feedback
Estimation
Control 13
Automation Lab
WC 2 3
0.4000 0.0238 0.3692 0.0626 0.3407 0.0904 0.3145 0.1097
0.0121 0.3056 0.0328 0.2892 0.0492 0.2736 0.0619 0.2589
0 0.2148 0 0.1725 0 0.1384 0 0.1111
0.1438 0 0.1218 0 0.1031 0 0.0874 0
WCON ... n 1 0 0
... 1
Combined Dynamics
Observer Error Dynamics
x(k 1) Φx(k ) ΓGxˆ (k | k 1)
ε(k 1 | k ) ( LC)ε(k | k 1)
Φx(k ) ΓG x(k ) ε(k | k 1)
ε(k | k 1) x(k ) xˆ (k | k 1)
Φ ΓG x(k ) ΓGε (k | k 1)
CSTR Example
IIT Bombay
CSTR Example
IIT Bombay
Conc.(mod/m3)
0.3
0.2
0.1
0
0 1 2 3 4 5
Sampling Instant
415
410
Temp.(K)
405
400
395
390
0 1 2 3 4 5
Sampling Instant
Coolent Flow
15
10
5
0 1 2 3 4 5
Sampling Instant
1.5
Inflow
0.5
0
0 1 2 3 4 5
Sampling Instant
0.05
-0.05
0 1 2 3 4 5
Time (min)
10
Error in Temp. Estimate
-5
0 1 2 3 4 5
Time (min)
1/16/2014 State Feedback Control 24
Automation Lab
MIMO Systems: IIT Bombay
Model: x (k 1) Ax (k ) Bu(k )
y (k ) Cx(k )
Objective
Regulate the process at origin of the state space
in the face of sudden impulse like, disturbances,
which result in non-zero initial conditions
Determine input sequence u(0),...., u(N 1) such that
Final State x (N )T WN x(N )
min N 1
u(0),...., u(N 1) x(k )T W x x(k ) u(k) T Wu u(k)
k 0
Square of Subject to Penalize
distance Large
x(k 1) x(k) u(k )
from Origin manipulated
y(k) Cx(k) inputs
W x, Wu , WN : Symmetric Positive Definite seighting matrices
where,
where
Control Law
u(k ) G (k )x(k )
1/16/2014 State Feedback Control 31
Automation Lab
IIT Bombay
Summary: Quadratic Optimal Control
Output Regulator
In many situations we are only interested in
controlling certain outputs of a system
and by setting
we can use the Riccati equations derived above for controller design.
Process Dynamics
x(k 1) x(k ) u(k ) w (k )
y (k ) Cx(k ) v(k )
Controller implementation using Kalman Predictor
e(k 1) y (k 1) Cxˆ (k 1 | k 2)
xˆ (k | k 1) xˆ (k 1 | k 2) u(k 1) L e(k 1)
u(k ) G xˆ (k | k 1)
LQ Controller Design
IIT Bombay
LQ Controller Design
IIT Bombay
and
LQ Controller Design
IIT Bombay
43
Automation Lab
LQ Controller Design
IIT Bombay
44
Automation Lab
IIT Bombay
Realistic LQOC Formulation
and / or
49
Automation Lab
50
Automation Lab
51
Automation Lab
Control schemes
Measure only temperature
Estimate concentration and temperature using state
observer
Develop MIMO / Multi-loop control schemes to control
estimated concentration and temperature
Controllers developed
Multi-loop PI
Multi-loop PI with gain decoupling
LQC
0
Choice of Tuning Parameter : (0.01) 2
2
0.35
Conc.(mol/m3)
0.3
0.25 Linear
Plant
0.2
Simulation
0 1 2 3 4 5
Time (min)
6 7 8 9 10
(No Plant
Model
Mismatch
Case)
Inlet Conc. (mol/m3)
2.3 True
2.2 Estimated
2.1
1.9
0 1 2 3 4 5 6 7 8 9 10
Time (min)
1/16/2014 State Feedback Control 62
Automation Lab
IIT Bombay
0.35
Conc.(mol/m3)
0.3
0.25
Non-Linear
0.2 Plant
0 1 2 3 4 5 6 7 8 9 10 Simulation
Time (min) (Plant
Model
Mismatch
Inlet Conc. (mol/m3)
2.1
1.9
0 1 2 3 4 5 6 7 8 9 10
Time (min)
1/16/2014 State Feedback Control 63
Automation Lab
0.35
T-F
0.3
0.25
Linear
0.2
0 5 10 15 20 25 Plant
Time (min) Simulation
400
k c1 6.34
Temp.(K)
395
I ,1 0.2
390 k c ,2 0.0028
I , 2 0.3
385
0 5 10 15 20 25
Time (min)
1/16/2014 State Feedback Control 65
Automation Lab
IIT Bombay
CSTR: Multi-Loop PI Performance
Coolent Flow (m3/min) Manipulated Inputs and Disturbance
30
20
10
0 5 10 15 20 25
Time (min)
1.5
Linear
Inflow (m3/min)
1 Plant
Simulation
0.5
0 5 10 15 20 25
Time (min)
2.5
Inlet Conc. (mol/m3)
1.5
0 5 10 15 20 25
Time (min)
1/16/2014 State Feedback Control 66
Automation Lab
IIT Bombay
0.4
CA – m1
0.35
T – m2
0.3
0.25
0.2 Linear
0 5 10 15 20 25
Time (min) Plant
Simulation
405
Temp.(K)
400 k c 1 0 .1
I ,1 0.2
395
k c , 2 0 .1
390 I , 2 0 .2
0 5 10 15 20 25
Time (min)
1/16/2014 State Feedback Control 67
Automation Lab
20
10
0 5 10 15 20 25
Time (min)
1.5
Linear
Inflow (m3/min)
1
Plant
Simulation
0.5
0 5 10 15 20 25
Time (min)
2.5
Inlet Conc. (mol/m3)
1.5
0 5 10 15 20 25
Time (min)
1/16/2014 State Feedback Control 68
Automation Lab
Controlled Outputs
0.8
0.6
Conc.(mol/m3)
0.4
0.2
0 Non-Linear
0 5 10 15 20 25
Time (min) Plant
Simulation
430
420
Temp.(K)
410
400
390
380
0 5 10 15 20 25
Time (min)
1/16/2014 State Feedback Control 69
Automation Lab
IIT Bombay
20
10
0 5 10 15 20 25
Time (min)
2
Inflow (m3/min)
Non-Linear
1.5
Plant
1
Simulation
0.5
0 5 10 15 20 25
Time (min)
Inlet Conc. (mol/m3)
2.5
1.5
0 5 10 15 20 25
Time (min)
1/16/2014 State Feedback Control 70
Automation Lab
Controlled Outputs
0.45
0.4
Conc.(mol/m3)
0.35
0.3 Linear
0.25 Plant
0.2 Simulation
0 5 10
Time (min)
15 20 25
(No Plant
Model
398
Mismatch
396 Case)
Temp.(K)
394
392
390
388
0 5 10 15 20 25
Time (min)
1/16/2014 State Feedback Control 71
Automation Lab
20
10
0 5 10 15 20 25 Linear
Time (min) Plant
3
Inflow (m3/min)
Simulation
2
(No Plant
1 Model
0
0 5 10 15 20 25
Mismatch
Time (min) Case)
Inlet Conc. (mol/m3)
2.5
1.5
0 5 10 15 20 25
Time (min)
1/16/2014 State Feedback Control 72
Automation Lab
Controlled Outputs
0.45
Conc.(mol/m3)
0.4
0.35
0.3 Non-Linear
0.25
Plant
Simulation
0.2
0 5 10 15 20 25 (Plant
Time (min) Model
400 Mismatch
Case)
Temp.(K)
395
390
385
0 5 10 15 20 25
Time (min)
1/16/2014 State Feedback Control 73
Automation Lab
20
10 Non-Linear
0 5 10 15 20 25
Sampling Instant Plant
3 Simulation
Inflow (m3/min)
2 (Plant
1
Model
Mismatch
0
0 5 10 15 20 25 Case)
Sampling Instant
Inlet Conc. (mol/m3)
2.5
1.5
0 5 10 15 20 25
1/16/2014 Sampling
StateInstant
Feedback Control 74
Automation Lab
Advantages of MPC
IIT Bombay
Disturbances
Optimization Inputs Outputs
Process
Dynamic
Prediction Dynamic
Model Model
MPC
Plant-model mismatch
Set point Trajectory
Dynamic Model: used for on-line forecasting
over a moving time horizon (window)
Output
Constraints
Components of MPC
IIT Bombay
Constraints on Inputs
IIT Bombay
In a practical implementation
control horizon (q) << prediction horizon (p)
1/16/2014 State Feedback Control 89
Automation Lab
Constraints on Inputs
IIT Bombay
Control Horizon
Schematic Representation of Control Horizon and Input Bounds
91
Automation Lab
IIT Bombay
Future Setpoint Trajectory
93
Automation Lab
IIT Bombay
Steady State Target Computation
QP Formulation
IIT Bombay
QP Formulation
IIT Bombay
QP Formulation
IIT Bombay
104
Automation Lab
IIT Bombay
Unconstrained QP Formulation
105
Automation Lab
IIT Bombay
Unconstrained QP Formulation
106
Automation Lab
IIT Bombay
Unconstrained QP Formulation
107
Automation Lab
Constrained QP Formulation
IIT Bombay
can be re-cast as
108
Automation Lab
Constrained QP Formulation
IIT Bombay
109
Automation Lab
IIT Bombay
Alternate Formulations
110
Automation Lab
Tuning of MPC
IIT Bombay
Unknown
Set Point Filter Disturbances
Inputs Outputs
MPC Process
Set Point
Dynamic
Model
Robustness
Plant-model mismatch
Filter
Tuning of MPC
IIT Bombay
112
Automation Lab
IIT Bombay
Example: Shell Control Problem
Controlled Outputs :
(y1) Top End Point
(y2) Side Endpoint
(y3) Bottom Reflux
Temperature
Manipulated Inputs :
(u1) Top Draw
(u2) Side Draw
(u3) Bottom Reflux Duty
Unmeasured Disturbances:
(d1) Upper reflux
(d2) Intermediate reflux
1/16/2014 State Feedback Control 113
Automation Lab
IIT Bombay
Shell Control Problem (SCP)
y ( s ) Gu ( s ) u ( s ) G d ( s ) d ( s )
4.05e 27 s 1.77e 28 s 5.88e 27 s
50 s 1 60 s 1 50 s 1
5.39e 18 s 5.72e 14 s 6.9e 15 s
Gu ( s )
50 s 201s 60 s 1 40 s 1
4.38e 4.42e 22 s 7.2e 19 s
33s 1 44 s 1 19 s 1
1.2e 27 s 1.44e 27 s
45s 1 40s 1 Characteristics
1.52e 15 s 1.83e 15 s Large time delays
Gd ( s ) `
25s 1 20s 1 High degree of
1.14 1.26 multivariable
27 s 1 32 s 1 interactions
1/16/2014 State Feedback Control 114
Automation Lab
IIT Bombay
SCP: MPC Tuning Parameters
Operating Constraints
Input Limits 0.5 ui 0.5 for i 1,2,3
0.5 d i 0.5 for i 1,2
Rate Limits 0.05 ui 0.05 for i 1,2,3
116
Automation Lab
IIT Bombay
Comparison of Servo Responses
Controlled Outputs
117
Automation Lab
IIT Bombay
Comparison of Servo Responses
Manipulated Inputs
118
Automation Lab
Comparison of Regulatory IIT Bombay
Responses
Controlled Outputs
Responses
Manipulated Inputs
120
Automation Lab
Comparison of Regulatory IIT Bombay
Responses
Unmeasured Disturbances
121
Automation Lab
IIT Bombay
SCP: Sequential Servo Changes
Shell Control Problem
0.5 With drifting
Unmeasured
0.4
disturbances
0.3
0.2 y(1)
y(3) Note:
Decoupled
Measured Outputs
0.1
Servo
0 Response.
Change in
-0.1
one
-0.2 Setpoint
-0.3 y(2) Does not
affect the
-0.4
other
-0.5 outputs
0 50 100 150 200 250
Sampling instant
0.4
u(1)
0.3
0.2
Manipulated Inputs
0.1 u(2)
0
-0.1 u(3)
-0.2
-0.3
-0.4
-0.5
0 50 100 150 200 250
Sampling instant
Open loop
Observer Output constraint
Based MPC handling
1/16/2014 State Feedback Control 124
Automation Lab
IIT Bombay
Linear MPC: Nominal Stability
Nominal Stability
IIT Bombay
Commercial Products
IIT Bombay
Limitations
Valid over limited operating range
Provide no insight into internal working of systems
e(k i | k ) r (k i | k ) yˆ (k i | k )
Subject to
Model Prediction Equations
Input Constraints Variety of Control
Output Constrinats objectives can be
specified
Eastman Problem
Manipulated Inputs
Manipulated Inputs
145
Automation Lab
Unmeasured Disturbances: IIT Bombay
Typical variation
146
Automation Lab
IIT Bombay
Open loop behavior
Typical open-loop output variation in the
presence of stationary and non-stationary disturbances
147
Automation Lab
IIT Bombay
NMPC on Heater-Mixer Setup
148
Automation Lab
IIT Bombay
NMPC on Heater-Mixer Setup
149
Automation Lab
IIT Bombay
NMPC on Heater-Mixer Setup
Manipulated Inputs
150
Automation Lab
Summary
IIT Bombay
References
IIT Bombay
155
Automation Lab
References
IIT Bombay
156
Automation Lab
References
IIT Bombay
157
Automation Lab
IIT Bombay
Appendix
Automation Lab
In a practical implementation
control horizon (q) << prediction horizon (p)
1/16/2014 State Feedback Control 159
Automation Lab
161
Automation Lab
QP Formulation
IIT Bombay
QP Formulation
IIT Bombay
163
Automation Lab
QP Formulation
IIT Bombay
164
Automation Lab
IIT Bombay
Unconstrained QP Formulation
165
Automation Lab
IIT Bombay
Unconstrained QP Formulation
166