You are on page 1of 166

Linear Quadratic Optimal Control

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

1/16/2014 State Feedback Control 2


Automation Lab
IIT Bombay
Plant Wide Control Framework

Long Term Scheduling


and Planning Market
Demands /
Raw material
availability
On-line Optimization
Slow Parameter
Setpoints PV, MV drifts
Multivariable / Nonlinear Control
Advanced

Regulatory (PID) Control Control


MV PV
Fast Load
Plant Disturbances

1/16/2014 State Feedback Control 3


Automation Lab
IIT Bombay
Hierarchy of control system functions

1/16/2014 State Feedback Control 4


Automation Lab

Control Problem
IIT Bombay

 Why advanced control?


 Complex multi-variable interactions
 Operating constraints
 Safety limits
 Input saturation constraints
 Product quality constraints
 Control over wide operating range
 Process nonlinearities
 Changing process parameters / conditions

 Conventional approach
 Multi-loop PI: difficult to tune
 Ad-hoc constraint handling using logic programming
(PLCs): lack of coordination
 Nonlinearity handling by gain scheduling

1/16/2014 State Feedback Control 5


Automation Lab

Optimal State Estimation


IIT Bombay

Thus, given stochastic state space model


x(k  1)  x(k )  u(k )  w (k )
y (k )  Cx(k )  v (k )
where w(k) and v(k) are uncorrelated (in time
and with each other) random sequences with
zero mean and know variances
E w (k )w (k )T   Q ; E v(k ) v(k )T   R

Q quantify uncertainties in state dynamics


and/or modeling errors
R quantifies variability of measurement errors
How to design an optimal state feedback controller?
1/16/2014 State Feedback Control 6
Automation Lab

Controller Design
IIT Bombay

Aim: Design state feedback controller


 Step 1: Assume the states are measurable and
design a stable control law / controller
 Step 2: Design a stable state estimator using
measurements
 Step 3: Implement the controller using estimated
states
Separation principle ensures nominal closed loop
stability with state estimator-controller pair
Advantage: Multi-variable systems can be
controlled relatively easily
1/16/2014 State Feedback Control 7
Automation Lab
IIT Bombay

Reachability and Controllability


Consider ideal situation where
 disturbances and measurement errors are absent

 model is perfect

Problem: Given an arbitrary initial condition x(0)


together with state space model
x(k  1)  x(k )  u(k )
y (k )  Cx(k )
Question
Can we find input sequence u(0), u(1), ….,u(k),…
such that the discrete system can be moved
from any arbitrary initial state, say x(0), to
any arbitrary final state, say xf ?
1/16/2014 State Feedback Control 8
Automation Lab

Input Sequence
IIT Bombay

Given initial state estimate x(0) and input sequence


u(0), u(1),…, the discrete system evolves according to

x(1)  x(0)  u(0)

x(2)  x(1)  u(1)


  2 x(0)  u(0)  u(1)

x(3)   3 x(0)   2 u(0)  ....  u(2)


.............................................................
x(n )  n x(0)  n 1u(0)  ....  u(n  1)
Question: Can we reach x(n) = xf ?

1/16/2014 State Feedback Control 9


Automation Lab
IIT Bombay
Condition for Reachability
The above set of linear equations can be
rearranged as follows
 u(n  1) 
u(n  2)

  ... n 1  
 ... 

  x  n x(0)
f 
 
 u ( 0) 

Necessary condition for reachability: the


discrete dynamic system is reachable if
following rank condition holds

rank   .... n 1   n


n  state dimension
1/16/2014 State Feedback Control 10
Automation Lab

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

0.185 - 0.01 0.005 0.13  0.06


x (k  1)    x(k )    u(k )    d (k )
 73.49 1.33  - 0.73 - 1.8   3 .9 
y (k )  0 1x (k )

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 

1/16/2014 State Feedback Control 11


Automation Lab
IIT Bombay

Reachability: CSTR Example


Can we move concentration and temperature
from any initial condition to any final condition
using manipulation of coolant flow-rate ?

 0.185 - 0.008  0.0026


   
73.492 1.333  - 0.7335
Reachabili
ty Matrix Wc
 0.002 0.0064 
Wc     
- 0.7335 - 0.7876

rank Wc  2

Linear Perturbation model is Reachable


1/16/2014 State Feedback Control 12
Automation Lab

Quadruple Tank System


IIT Bombay

Discrete Time State Space Model


Sampling Time T = 5 sec

x(k  1)  Φx(k )  Γu(k )


y (k )  Cx(k )

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

Quadruple Tank System


IIT Bombay


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 

Rank of reachability matrix = 4


Quadruple Tank System is Reachable

Levels in Tank 1 to Tank 4 can be moved from


Any initial state to Any final state
by suitable input manipulations

1/16/2014 State Feedback Control 14


Automation Lab
IIT Bombay
SISO Pole Placement Controller
Coordinate Transforma tion :  (k)  Tx(k)

Original Model Controllab le Cannonical Form


x(k  1)  x(k )  u (k ) .......(I )  (k  1)  c (k )  cu (k ) .......(II )
y (k )  Cx(k ) y (k )  C c (k )

Transfer Fundtion  a1  a2  a`3 ....  an  1


 1 0 0.... 0  0
b1z  b2z
n 1
 ......  bn
n 2 c      
y(k)  u (k )  .... .... .... ....  c ....
z n  a1z n 1  ....  an  0
 0 .... 0  0
 
C c  b1 b2 ..... bn 
Design Procedure
 Transform the model to controllable canonical form
 In transformed coordinates, choose controller vector such that
poles of are placed at desired location
 Express the controller gain matrix in the original co-ordinate
system

1/16/2014 State Feedback Control 15


Automation Lab
IIT Bombay
SISO Pole Placement Controller
Design Controller in transformed coordinates
 (k  1)  c (k )  cu (k ) ; u (k )   Gc (k )
 a1  gc ,1  a 2  gc , 2 0....  an  gc ,n 
 1 0 .... 0 
c  cGc   
 .... .... .... .... 
 
 0 0 .... 0 
 detI  (c  cGc )  n  a1  gc ,1 n 1  .......  (an  gc ,n )
Let the desired observer characteristic polynomial be
P ( )  n  p1n 1  .......  pn
where polynomial on R.H.S. has poles at the desired location

Equating coefficients of P( ) with detI  (c  c Gc ), we have


pi  ai  gc ,i  gc ,i  pi  ai for i  1,2...n

Transform the observer Gc back to original state space as G  GcT

1/16/2014 State Feedback Control 16


Automation Lab
IIT Bombay
SISO Pole Placement Controller

Coordinate Transforma tion Inverse Coordinate Transforma tion


 Tx ~ 1
T 1  WCON WCON  
~
T  WCON WCON 1  1 a1 ... an 1 
0 1 ... an 2 
~
WCON  c c c ...  n 1
c  
c

WCON
~

1

... ... ... ... 

WCON    ... n 1  0 0
 ... 1 

Note that the above coordinate transformation


is possible only if the original system is
reachable, i.e.
Rank( Wcon) = n

1/16/2014 State Feedback Control 17


Automation Lab
IIT Bombay
Nominal Closed Loop Stability

Assumption: Perfect Model


Plant Dynamics
x(k  1)  Φx(k )  Γu(k )
y (k )  Cx(k )

Controller implementation using Luenberger Observer


xˆ (k | k  1)  xˆ (k  1 | k  2)  u(k  1)  L P y (k  1)  Cxˆ (k  1 | k  2)
u(k )  Gxˆ (k | k  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)

1/16/2014 State Feedback Control 18


Automation Lab
IIT Bombay
Nominal Closed Loop Stability
Combined Closed Loop Dynamics This image cannot currently be display ed.

 x(k  1)  Φ  ΓG  ΓG   x(k ) 


ε(k  1 | k )   [0]   LC ε(k | k  1)
  

Closed Loop Characteristic Equation


I  Φ  ΓG   ΓG 
det 
0  I    LC   det I  Φ  ΓG  det I    LC  0
 [ ] 

Note : Matrices G and L have been selected such that


 Φ  ΓG   1 and    LC  1
 Eigenvalues of the closed loop equation inside the unit circle

Thus, even though the observer and controller are


designed separately to be a-stable, the nominal closed
loop system, implemented using the observer based
feedback controller, is asymptotically stable
1/16/2014 State Feedback Control 19
Automation Lab

CSTR Example
IIT Bombay

Linearized (Original) State Space Model


0.185 - 0.01 0.005
x(k  1)    x (k )   - 0.73 u (k )
 73.49 1.33   
y (k )  0 1x(k )
Controllab le Canonical form
1.518 - 0.836 1 
 (k  1)    (k )   u (k )
 1 0  0 
y (k )  - 0.7335 0.3256 (k )

G  p1  1.518 p2  0.836T


1
1 1.518  0.0026 0.0064 
T WCON WCON   
~ 1

0 1  - 0.7335 - 0.7876


123.8870 - 0.9260 
 
 278.8236 0.9841
1/16/2014 State Feedback Control 20
Automation Lab

CSTR Example
IIT Bombay

Closed Loop Poles Controller Gain Vector


[0.8, 0.8] [-64.8345 -0.1165]
[0.4, 0.4] [-99.6531 -1.3300]
[0,0] (Dead Beat) [-45.2481 -2.2286]

In general, the state feedback controller becomes


more and more aggressive as
closed loop poles move closer to origin
Controller-Observer Pair Selected
Poles of (  G )  [0.6 0.6]
Poles of (  LC )  [0.4 0.4]
1/16/2014 State Feedback Control 21
Automation Lab
IIT Bombay
CSTR: Pole Placement Controller
State Evolution
State Dynamics
0.4

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

1/16/2014 State Feedback Control 22


Automation Lab
IIT Bombay
CSTR: Pole Placement Controller
Manipulated Inputs
20

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

1/16/2014 State Feedback Control 23


Automation Lab
IIT Bombay
CSTR: Pole Placement Controller
Observer Error Dynamics
0.15

Error in Conc. Estimate


0.1

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

Difficulty with Pole Placement Design


Consider a MIMO system with u  R m
X (k  1)  x (k )  u(k )
With state feedback controller law
u(k)  -Gx(k)
where G is a (m  n) matrix.
The closed loop dynamics is governed by
X (k  1)    G x (k )
If we intend to place poles of closed loop at the roots of
n  p1n 1  ......  pn  0
then equating coefficien ts of detI -   G   0
with the desired closed loop polynmial gives only n equations.
Number of unknowns  (n  m) elements of G
Difficulty : Under - determined system of equations.

1/16/2014 State Feedback Control 25


Automation Lab

Linear Quadratic Regulator


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

1/16/2014 State Feedback Control 26


Automation Lab
IIT Bombay
Solution by Dynamic Programming

Solution Strategy: Bellman’s dynamic programming


Basic Idea
Solve problem at instant (k) by assuming that
problem up to time (k-1) has been solved optimally.

1/16/2014 State Feedback Control 27


Automation Lab
IIT Bombay
Solution by Dynamic Programming

1/16/2014 State Feedback Control 28


Automation Lab
IIT Bombay
Solution by Dynamic Programming

Consider a scalar quadratic function

The minimum value of F(u) is obtained by setting u  - A -1z

1/16/2014 State Feedback Control 29


Automation Lab
IIT Bombay
Solution by Dynamic Programming

The optimal solution can be expressed as

which gives minimum loss function

where,

Similar arguments yield

1/16/2014 State Feedback Control 30


Automation Lab
IIT Bombay
Solution by Dynamic Programming

The procedure can be repeated backward in time.


Discrete time Riccati equation

where

Control Law
u(k )  G (k )x(k )
1/16/2014 State Feedback Control 31
Automation Lab
IIT Bombay
Summary: Quadratic Optimal Control

Time varying state feedback control law


u(k)  -G(k)x(k)
Gain matrix computed by solving Discrete time Riccati Equation
 1
G(k)  Wu  T S (k  1) T S (k  1)
S (k )  [  G (k )]T S (k  1)[  G (k )]T Wx  G (k )T Wu G (k )
Equation solved backward in time
starting from N, N - 1, ....1 with
S(N)  WN
s(k) : Symmetric and  ve definite for each k
which ensures optimality of solution at each stage

N should be known a-priori and gain matrices


have to be saved : not quite practical in many situations
1/16/2014 State Feedback Control 32
Automation Lab

Algebraic Riccati Equation


IIT Bombay

When N becomes large, S(k)  S ; G(k)  G


which can be computed by solving
Algebraic Riccati Equation (ARE) as
 1
G  Wu  T S  T S 
T
S  [  G ]T S [  G ]T Wx  G Wu G

and control law assumes form


u(k)  -G x(k)
ARE has many solutions. However, if (, ) is controllab le
and if (, ) is observable where
Wu  T 
then there exists a unique symmetric and non negative
definite solution to ARE.
1/16/2014 State Feedback Control 33
Automation Lab

Nominal Stability Analysis


IIT Bombay

Theorem 1: Consider the time invariant dynamic model


together with the LQ loss function. Assume that a
positive-definite steady state solution exists for the
algebraic Riccati equations. Then the steady state
optimal strategy

gives an asymptotically stable closed-loop system

Proof: Define Lyapunov function

Note : S is a  ve definite matrix


1/16/2014 State Feedback Control 34
Automation Lab

Nominal Stability Analysis


IIT Bombay

 Thus, the closed loop system is asymptotically stable for any


choice of positive definite Wx and positive semi-definite Wu
matrices
 Simultaneously guarantees closed loop stability and good closed
loop performance
 By selecting Wx and Wu appropriately, it is easy to compromise
between speed of recovery and magnitude of control signals.

1/16/2014 State Feedback Control 35


Automation Lab

Closed Loop Poles


IIT Bombay

The poles of the closed loop system obtained


by solving the characteristic equation

It can be shown that the poles are the n stable


eigenvalues of the generalized eigenvalue problem

This equation is called the Euler equation of the LQ problem.

Theorem 1 shows that LQ controller gives a stable closed loop system,


i.e. all poles of  - G  are inside the unit circle.

1/16/2014 State Feedback Control 36


Automation Lab
Linear Quadratic Optimal IIT Bombay

Output Regulator
In many situations we are only interested in
controlling certain outputs of a system

The above modified objective function can be rearranged as follows

and by setting

we can use the Riccati equations derived above for controller design.

1/16/2014 State Feedback Control 37


Automation Lab
IIT Bombay
Linear Quadratic Gaussian Regulator

Linear Quadratic Gaussian (LQG) Regulator


 Design optimal state estimator (Kalman Predictor /
Kalman Filter)
 Implement control law using estimated states

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)

Is the closed loop stable under the nominal conditions?


1/16/2014 State Feedback Control 38
Automation Lab
IIT Bombay
Nominal Closed Loop Stability
Combined Closed Loop Dynamics
 x(k  1)  Φ  ΓG   ΓG    x(k )  I [0]  w (k )
ε(k  1 | k )   [ 0]    
  L C ε(k | k  1) I L    v(k ) 
  

Closed Loop Characteristic Equation


I  Φ  ΓG    ΓG 
det 
0  I   L C

  
  det I  Φ  ΓG   det I    L  C  0

 [ ]  

Note : Through Lyapunov stability arguments, we have established that


 Φ  ΓG    1 and    L C  1
 Eigenvalues of the closed loop equation inside the unit circle

Thus, even though the observer and controller are


designed separately to be a-stable, the nominal closed
loop system, implemented using the observer based
feedback controller, is asymptotically stable
1/16/2014 State Feedback Control 39
Automation Lab
IIT Bombay
Realistic LQOC Formulation

 Linear quadratic regulator designed above can


generate an offset if
 the unmeasured disturbances are non-stationary, i.e. they
have slowly drifting behavior
 mismatch exists between the plant and the model.
 In order to deal with such situations, it is
necessary to introduce integral action in the
controller.
 Also, the regulator designed above only solves the
restricted problem of moving the system from any
initial state to the origin. If it is desired to move
the system from any initial condition to an
arbitrary setpoint, the state feedback control
laws has to be modified.
1/16/2014 State Feedback Control 40
Automation Lab

LQ Controller Design
IIT Bombay

Consider the problem of designing a LQ controller for


a general system governed by difference equation

such that it is controlled at an arbitrarily specified setpoint r

Further, assume that

are known apriori.


41
Automation Lab

LQ Controller Design
IIT Bombay

The steady state behavior of this system is given by

From the steady state equation, it follows that

and

When number of manipulated inputs equals the


number of controlled outputs, it follows that
42
Automation Lab

LQ Controller Design
IIT Bombay

Pseudo-inverse of matrix Ku can be used in the above expression


When No. of manipulated inputs >= No. of controlled outputs

Now, subtracting the steady state model equations


from the dynamic model equation

43
Automation Lab

LQ Controller Design
IIT Bombay

the transformed system dynamics is given by

An LQ controller is developed for the transformed system as follows

which regulated the transformed system at the origin. This is


equivalent to achieving offset free behavior for the original
system for the specified stepoint and the disturbance level.
Thus, the LQ control law that solves servo and regulatory
problems simultaneously can be expressed as follows

44
Automation Lab
IIT Bombay
Realistic LQOC Formulation

Thus, the problem of regulation in the face of unknown drifting


disturbances / plant-model mismatch and tracking an arbitrary
setpoint trajectory is solved by modifying the regulatory
control law as follows

1/16/2014 State Feedback Control 45


Automation Lab

Innovation Bias Approach


IIT Bombay

By this approach, the observer is implemented as follows

When the model is perfect, the innovation sequence {e(k)} is


a zero mean white noise signal.
However, in the presence of

1/16/2014 State Feedback Control 46


Automation Lab

Innovation Bias Approach


IIT Bombay

and / or

In fact, the sequence {e(k)} becomes colored noise.

1/16/2014 State Feedback Control 47


Automation Lab

Innovation Bias Approach


IIT Bombay

The low frequency drifting mean of {e(k)} can be estimated


using a simple unity gain first order filter of the form

Choice of this parameter influences the regulatory


(disturbance rejection) behavior of the LQG controller
Typical value of i is 0.9.
Choosing i  0 sets ei,f (k)  ei (k) and the filtering of the high frequency
component is eliminated, which makes the controller quite aggressive

Signal ef (k) contains informatio n on low frequency drifting unmeasured


disturbances and model plant mismatch influencin g the plant dynamics.
1/16/2014 State Feedback Control 48
Automation Lab

Unity Gain Filter


IIT Bombay

Consider a unity gain 1'st order transfer function


used for filtering a signal y(t) to generated yf (t )
1
yf (s )  y (s )
s  1
In discrete time (with sampling interval T), this is equivalent to
(1   )
yf (z )  y (z ) where   exp(-T/ )
z 
Note : 0    1 for any   0
Or in time domain
yf (k  1)  yf (k )  (1   ) y(k )
The filter is often implemented by removing the unit delay, i.e.
yf (k )  yf (k  1)  (1   ) y(k )

49
Automation Lab

Unity Gain Filtering of e(k)


IIT Bombay

50
Automation Lab

Innovation Bias Approach


IIT Bombay

The following assumptions are made in the innovation bias


formulation regarding the state and the output disturbances

Further it is assumed that these disturbances remain constant


over the future, i.e. these disturbances behave according the
following linear difference equations

51
Automation Lab

Innovation Bias Approach


IIT Bombay

To achieve offset free closed loop behavior and setpoint


tracking, the control law is now implemented as follows

{r(k)} represents setpoint trajectory


1/16/2014 State Feedback Control 52
Automation Lab
IIT Bombay
State Augmentation Approach
By this approach, the state space model is augmented with
extra artificial states as follows

1/16/2014 State Feedback Control 53


Automation Lab
IIT Bombay
State Augmentation Approach
Output bias formulation: A simple approach is to view the
drifting disturbances as causing a bias in the measured
outputs, i.e., we can choose

Input Bias Formulation: The elements of vector can be viewed


as bias in r manipulated inputs. When number of manipulated
inputs equals the number of measured outputs (r = m), then we
can choose

Disturbance bias formulation: When the state space model


is derived from a mechanistic model, it is possible to choose

1/16/2014 State Feedback Control 54


Automation Lab
IIT Bombay
State Augmentation Approach

The above set of equations can be combined into an augmented


state space model of the form

1/16/2014 State Feedback Control 55


Automation Lab
IIT Bombay
State Augmentation Approach
Together with covariance matrices

This augmented model can be used for developing a Kalman predictor

1/16/2014 State Feedback Control 56


Automation Lab
IIT Bombay
State Augmentation Approach

The steady state Kalman gain is obtained by solving the


corresponding steady state Riccati equations

In order to maintain the observability of the artificially


introduced states, the number of additional states
introduced in the augmented model should not exceed
the number of measured outputs.

When the state space model is observable and stable with


no integrating modes, the augmented state space model
will be observable (detectable) in most of the cases.

1/16/2014 State Feedback Control 57


Automation Lab
IIT Bombay
State Augmentation Approach
At k’th instant, the steady state targets are computed by
solving for

1/16/2014 State Feedback Control 58


Automation Lab
IIT Bombay
State Augmentation Approach

For the case m = r; two special cases of quadratic optimal tracking


control law are as follows

1/16/2014 State Feedback Control 59


Automation Lab

Inferential Control of CSTR


IIT Bombay

 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

 Control problem: Compare performances for step


change in conc. setpoint at k=50 followed by step
disturbance at t = 150
1/16/2014 State Feedback Control 60
Automation Lab

State Observer Design


IIT Bombay

We introduce artificial state as bias in disturbance, i.e.


0.06
we select    
 3 . 9 
Augmented system for state estimation
 0.185 - 0.01 0.06   0.005 0.13    0.06 
 x (k  1)     x ( k ) 
  (k  1)    73.49

1.33   3.9       - 0.73 - 1.8  u(k )    3.9  d (k )
   0   (k )    
 0  1   0 0    0 
 x(k ) 
y (k )  0 1 0   { Note : Only temperatur e is measured }
  (k )
0.012 0 
State & Measuremen t Noise Covariance s : Qa   2  ; R a  0.1
2

 0   
Choice of Tuning Parameter :    (0.01) 2
2

Steady stste gain for Klaman Filter (current state estimator)


LC ,  0.0016 0.8006 0.0447 
T

1/16/2014 State Feedback Control 61


Automation Lab
IIT Bombay
CSTR: Kalman Filter Performance
State Estimation

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

CSTR: Kalman Filter Performance


State Estimation

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.3 True Case)


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 63
Automation Lab

CSTR : Inferential LQC


IIT Bombay

Conol of reactor temperature and estimated reactor concentration,


1 0
i.e., we have Cr   
0 1
Controller Design Parameters
LQC1 : Small Input weighting (relatively aggressive control action)
100 0  1 0  47.37  0.7614 
Wx    ; W  0 1 ; G   6.94 0.0312 
u 
 0 1   
LQC2 : Large Input Weighting (relatively less aggressive control action)
100 0 100 0   1.3163  0.0183 
Wx    ; W   0 100  ; G   6.177 0.0444 
u 
 0 1   
Linear Quadratic Control Law
1 0   1.6  10 17  ˆ
xs(k)    r(k )   15 
 (k | k )
0 1   1 . 857  10 
89.52 0.3226 
u(k )   r (k )  G xˆ (k | k )  xs(k)
4.356 0.0537 
1/16/2014 State Feedback Control 64
Automation Lab
IIT Bombay

CSTR: Multi-Loop PI Performance


Controlled Outputs
0.4 PID Pairing
CA - Fc
Conc.(mol/m3)

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

CSTR: PI with gain Decoupling


Controlled Outputs
0.45
PID Pairing
Conc.(mol/m3)

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

CSTR: PI with gain Decoupling


IIT Bombay

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 68
Automation Lab

CSTR: PI with gain Decoupling


IIT Bombay

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

CSTR: PI with gain Decoupling


Coolent Flow (m3/min)
Manipulated Inputs and Disturbance
30

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

CSTR: LQG Performance


IIT Bombay

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

CSTR: LQG Performance


IIT Bombay

Coolent Flow (m3/min)


Manipulated Inputs and Disturbance
30

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

CSTR: LQG Performance


IIT Bombay

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

CSTR: LQC Performance


IIT Bombay

Coolent Flow (m3/min)


Manipulated Inputs and Disturbance
30

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

Difficulties with LQG


IIT Bombay

 Difficult to incorporate operating constraints


explicitly
 Limits on manipulated inputs / rate of change of
manipulated inputs
 Limits of process outputs (arising from product
quality, safety considerations)
 Difficult to deal systematically with Plant-Model
mismatch
 Algebraic Riccati Equations: AREs is notoriously
difficult to solve for large dimensional systems

1/16/2014 State Feedback Control 75


Automation Lab

Model Predictive Control


IIT Bombay

 Multivariable Control based on On-line use


of Dynamic Model
 Most widely used multivariable control scheme in
process industries over last 25 years
 Dynamic Matrix Control (DMC) developed by Shell in
U.S.A. (Cutler and Ramaker, 1979)
 Model Algorithmic Control developed by Richalet et. al.
(1978) in France
 Used for controlling critical unit operations (such
as FCC / crude column) in refineries world over
 Mature technology
 Can be used for controlling complex large dimensional
systems

1/16/2014 State Feedback Control 76


Automation Lab

Advantages of MPC
IIT Bombay

 Modified form of classical optimal control


problem
 Can systematically and optimally handle
 Multivariable interactions
 Operating input and output constraints
 Process nonlinearities
 Basic Idea
Given a reasonably accurate model for plant
dynamics, possible consequences of the current
and future input moves on the future plant
behavior (such as possible constraint violations
in future etc.) can be forecasted on-line and
used while deciding the input moves
1/16/2014 State Feedback Control 77
Automation Lab

MPC: Schematic Diagram


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)

1/16/2014 State Feedback Control 78


Automation Lab

MPC: Basic Idea


IIT Bombay

 Finite Horizon formulation: Optimization


problem is formulated over a finite window of
time starting from current instant
 At each sampling instant, a constrained
optimization problem is formulated over the
window and solved
 Moving horizon / window: The time window keeps
moving or receding
FROM [k, k+p] TO [k+1, k+p+1] …. and so on
 Pro-active constraint management: Given a good
dynamic model, we can perform on-line
forecasting and foresee any possible constraint
violations over the time window

1/16/2014 State Feedback Control 79


Automation Lab

Moving Horizon Formulation


IIT Bombay

Output
Constraints

(Kothare et al, (2000), IEEE Control Systems Technology)

1/16/2014 State Feedback Control 80


Automation Lab

Components of MPC
IIT Bombay

 Internal model and state estimator


 Discrete Linear State Space Model developed from
mechanistic approach or time series modeling
(FIR or Finite Step Response models were used initially)
 State Estimator: Open loop observer / Kalman Predictor/
Kalman Filter / Luenberger Observer / Innovation form of
state observer developed from ARX / ARMAX / BJ model
 Prediction of Future Plant Behavior
 Key issue: Handling unmeasured drifting disturbances and
plant model mismatch
 On-line constrained optimization strategy
 Quadratic programming
 Linear programming
1/16/2014 State Feedback Control 81
Automation Lab

MPC with State Estimation


IIT Bombay

On-line Optimizer Dynamic


Model
(Kothare et al, (2000), IEEE Control Systems Technology)

1/16/2014 State Feedback Control 82


Automation Lab
IIT Bombay
State Estimation and Prediction

Consider state estimation and prediction using prediction


form of observer

Such a observer can be developed using any of the


following approaches
 Kalman predictor
 Luenberger predictor
 State realization of ARX / ARMAX / BJ model

Prediction estimate of the current state and innovation

1/16/2014 State Feedback Control 83


Automation Lab
IIT Bombay
State Estimation and Prediction

Innovation Bias Approach:


Effect of model plant mismatch and /or unmeasured
disturbance signal is extracted by filtering the innovation
through a unity gain low pass filter

model predictions over future time window [k + 1; k + p] are


generated using the discrete dynamic model as follows

1/16/2014 State Feedback Control 84


Automation Lab
IIT Bombay
Future Trajectory Prediction

Future instant (k+1)

Future instant (k+2)

1/16/2014 State Feedback Control 85


Automation Lab
IIT Bombay
Future Trajectory Prediction

Future instant (k+p)

1/16/2014 State Feedback Control 86


Automation Lab
IIT Bombay
Future Trajectory Prediction

Interpretation of p step output prediction equation

Future output Effect of the past 


  
prediction   state on future outputs 
Effect of future 
 
 inputs on future outputs 
Effect of Plant Model Mismatch and Unmeasured 
 
Disturbanc es on future outputs 

‘p’ is called as Prediction Horizon


1/16/2014 State Feedback Control 87
Automation Lab
IIT Bombay
Future Trajectory Prediction
Note: The predictions generated using the innovation
bias approach is equivalent to carrying out predictions
using the observer augmented with an artificially
introduced integrated white noise model, i.e. prediction
Generated using the following dynamic system

Introduction of integrated white noise in predictions


helps in achieving offset free closed loop behavior
1/16/2014 State Feedback Control 88
Automation Lab

Constraints on Inputs
IIT Bombay

To reduce the degree dimension of the on-line optimization


problem, degrees of freedom available for shaping the future
trajectory are often restricted to first q moves

by imposing input constraints of the form

q is called the Control Horizon

In a practical implementation
control horizon (q) << prediction horizon (p)
1/16/2014 State Feedback Control 89
Automation Lab

Constraints on Inputs
IIT Bombay

Bounds on the manipulated inputs

Bounds on rate of change of manipulated inputs

Since predictions are carried out online at each control


instant, it is possible to choose future inputs moves such
That the above constraints are respected
1/16/2014 State Feedback Control 90
Automation Lab
IIT Bombay

Control Horizon
Schematic Representation of Control Horizon and Input Bounds

91
Automation Lab
IIT Bombay
Future Setpoint Trajectory

In addition to predicting the future output trajectory, at each


instant, a filtered future setpoint trajectory is generated using
a reference system of the form

1/16/2014 State Feedback Control 92


Automation Lab

Future Setpoint Trajectory


IIT Bombay

93
Automation Lab
IIT Bombay
Steady State Target Computation

Case: Number of manipulated inputs equals the number of


controlled outputs and unconstrained solution exists

1/16/2014 State Feedback Control 94


Automation Lab

Constrained MPC formulation


IIT Bombay

Given the prediction model, input constraints and desired set


point trajectory, the MPC problem at sampling instant k is
formulated as follows

1/16/2014 State Feedback Control 95


Automation Lab
IIT Bombay

Constrained MPC formulation


Subject to following constraints
(a) Model Prediction Equations

(b) Bounds on future inputs and predicted outputs

1/16/2014 State Feedback Control 96


Automation Lab

Constrained MPC formulation


IIT Bombay

WE is a symmetric positive definite error weighting matrix


and WU is symmetric positive semidefinite input weighting matrix
These matrices are treated as tunig parameters,
which are used to shape the closed loop input and output behavior

The terminal state weighting matrix W can be found by solving


discrete Lyapunov equation. When poles of  are inside the unit
circle, W can be found by solving discrete Lyapunov equation

When some poles of Φ are outside unit circle, the procedure


for computing the terminal weighting matrix is given in
Muske and Rawlings (1993)

1/16/2014 State Feedback Control 97


Automation Lab
IIT Bombay
Moving Horizon Implementation

The resulting constrained optimization problem is solved on-


line each sampling instant using any standard constrained
optimization method.

The controller is implemented in a moving horizon framework.

Thus, after solving the optimization problem


over window [k,k+p], only the first optimal move
is implemented on the plant, i.e.

The optimization problem is reformulated at the next sampling


instant over time windows [k+1, k+p+1] based on the updated
information from the plant and resolved.

1/16/2014 State Feedback Control 98


Automation Lab

Moving Horizon Formulation


IIT Bombay

 Optimization problem transformed to Quadratic


Programming (QP) problem for improving computing
efficiency on-line and solved using efficient QP
solvers available commercially.
 MPC formulation can control Non-square multi-variable
systems i.e. systems with number of controlled
outputs not equal to the number of manipulated
inputs.
 In many practical situations, not all outputs have to be
controlled at fixed setpoints but need to be
maintained in some “zone”. Such zones can be easily
defined using constraints on predicted outputs.

1/16/2014 State Feedback Control 99


Automation Lab

Quadratic Programming (QP)


IIT Bombay

A constrained optimization problem is called as


Quadratic Programming (QP) formulation if it
Has following standard form
Min 1
UT HU  F T U
U 2
Subject to
AU  b
A large dimensional QP formulation can be solved
very quickly using an efficient search method
Through a series of algebraic manipulations, the
Constrained MPC formulation can be transformed
to a Quadratic Programming (QP) Problem
100
Automation Lab

QP Formulation
IIT Bombay

To understand how the MPC optimization problem can be


transformed to a quadratic programming problem, consider
MPC formulation without terminal state weighting

the prediction model can be expressed as follows

(Note: QP formulation can be carried out with terminal state weighting


also. It has been neglected here to keep the expressions relatively simple)
101
Automation Lab

QP Formulation
IIT Bombay

Matrix relating the Matrix relating the effect of


effect of past states past unmeasured disturbances
to future predictions and model plant mismatch on
the future predictions
102
Automation Lab

QP Formulation
IIT Bombay

Matrix relating the effect of future manipulated inputs


On future predictions
Consists of impulse response coefficients of the model
Referred to as Dynamic Matrix in MPC literature
103
Automation Lab
IIT Bombay
Unconstrained QP Formulation

Using these notations, unconstrained version of MPC problem


can be stated as follows

104
Automation Lab
IIT Bombay
Unconstrained QP Formulation

105
Automation Lab
IIT Bombay
Unconstrained QP Formulation

The unconstrained optimization problem can be reformulated


as a Quadratic Programming problem as follows

The optimum solution to above minimization problem is

106
Automation Lab
IIT Bombay
Unconstrained QP Formulation

Since only the first input move is implemented on the process

With some algebraic manipulations, the above control law can


be rearranged as follows

From the above expression, it is easy to see that


unconstrained MPC is a form of state feedback control law

Advantage of unconstrained formulation: closed form


control law can be obtained and, as a consequence,
on-line computation time is small

107
Automation Lab

Constrained QP Formulation
IIT Bombay

The constrained MPC formulation at k’th sampling instant

can be re-cast as

108
Automation Lab

Constrained QP Formulation
IIT Bombay

109
Automation Lab
IIT Bombay
Alternate Formulations

 To achieve offset free control, it is possible to develop MPC


formulation based on the augmented state space model
(see Muske and Rawlings, 1993; Yu et al., 1994) as described
in the case of LQG (on slides 46 to 50).
 Early formulations of MPC, such as Dynamic Matrix Control
(DMC), were based on ‘open loop observer’ and were meant
for open loop stable systems. These formulations can be
derived by setting the observer gain to zero in the
innovation bias formulation.
 MPC formulation in this presentation has been developed
using Kalman predictor only for the sake of convenience. It
is straightforward to develop similar formulations based on
the Kalman filter with innovation bias approach or state
augmentation approach.

110
Automation Lab

Tuning of MPC
IIT Bombay

Facilitates Performance specification

Unknown
Set Point Filter Disturbances

Inputs Outputs
MPC Process

Set Point
Dynamic
Model
Robustness
Plant-model mismatch
Filter

Guard again plant-model mismatch


111
Automation Lab

Tuning of MPC
IIT Bombay

 Prediction Horizon: Typically chosen close to open


loop settling time (60 to 100 samples)
 Control Horizon: Typically chosen small (5 to 10)
to avoid model inversion problems
 Input rate constraints
Zone / Range Control: Not necessary to specify

set points on each output. Instead, high and


low limits can be defined within which output
should be maintained

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

Output Constraints  0.5  y1  0.5


 0.5  y 3
Sampling
We  diag 1 1 0 interval
Wu  1.5 diag 1 0.1 1 (T) = 2 min

Prediction Horizon : 40 Control Horizon : 5


1/16/2014 State Feedback Control 115
Automation Lab

SCP: PID Tuning Parameters


IIT Bombay

 Multi-loop PID control: Three independent PID


controllers with no coordination among them

 PID Pairing and Tuning


 (y1) Top End Point - (u1) Top Draw
Kc = 0.3 , Ti = 13 min, Td = 0

 (y2) Side Endpoint - (u2) Side Draw


Kc = 0.23 , Ti = 30 min, Td = 0

 (y3) Bottom Reflux - (u3) Bottom Reflux Duty


Kc = 0.28 , Ti = 9 min, Td = 0

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

(Open Loop Observer Based MPC Formulation)


119
Automation Lab
Comparison of Regulatory IIT Bombay

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

1/16/2014 State Feedback Control 122


Automation Lab
IIT Bombay
SCP: Sequential Servo Changes
Shell Control Problem
0.5

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

1/16/2014 State Feedback Control 123


Automation Lab
IIT Bombay
Improved Disturbance Rejection
Kalman Predictor Based MPC
Disturbance:
Step Jumps

Open loop
Observer Output constraint
Based MPC handling
1/16/2014 State Feedback Control 124
Automation Lab
IIT Bombay
Linear MPC: Nominal Stability

 Approach 1: Formulate infinite prediction horizon and


finite control horizon problem
 m
   u(k  i | k ) W
2 2
ef (k  i | k) W
e e
i 1 i 1

Stability is proved by using Lipunov’s approach


 Approach 2: Impose terminal Constraints on
predicted state x(k+p) = 0 or introduce large weighting
on terminal state
 Approach 3: Impose contraction constraints
x(k  p | k ) R   x(k | k ) R
R :  ve definite,   [0,1)
1/16/2014 State Feedback Control 125
Automation Lab

Nominal Stability
IIT Bombay

Infinite Horizon Formulation (Muske and Rawlings,1993)


Let ( s x ) and ( u x ) be projection s of x on to stable
unstable eigen - spaces of  matrix, respective ly
 m 1
 
m 1 
 x (k  i | k ) T
W e x (k  i | k )    u(k  i | k) T
 Wu u(k  i | k) 
   i 1 i 0 
 T 
  x ( k  m | k )T
 s W 
s s x ( k  m | k ) 
Subject to
 u x(k  m | k )  0
Input and state constraints
W : Positive definite solution to Liapunov Equation
  
 T
s
T
 s T Ws  s  s   Ws   s 
T
We  
 T
s  0
 s  Ts ( s Ts ) 1
1/16/2014 State Feedback Control 126
Automation Lab

Linear MPC: Robustness


IIT Bombay

 Approach 1:Uncertainty modeled as interval


uncertainty / ellipsoidal bounds on FIR coefficient
 Optimization problem formulated as min-max problem
(minimize worst case value of objective functions taken
over the set of uncertain plants)
 Approach 2: Multi-model description of uncertainty
x (k  1)  x(k )  u(k )
y (k )  Cx(k )
s s 
[, ]   i [ i , i ] |  i  1 ; i  0
 i 1 i 1 

 Use Linear Matrix Inequalities framework to solve robust


control problem
1/16/2014 State Feedback Control 127
Automation Lab

Commercial Products
IIT Bombay

(Ref.: Qin and Badgwell, 2003)

1/16/2014 State Feedback Control 128


Automation Lab
IIT Bombay
Linear MPC Applications (2003)

(Ref.: Qin and Badgwell, 2003)


1/16/2014 State Feedback Control 129
Automation Lab
IIT Bombay
Industrial Application: Ammonia Plant

(Ref.: Qin and Badgwell, 2003)


1/16/2014 State Feedback Control 130
Automation Lab

Need for Nonlinear Control


IIT Bombay

 Linear prediction model based MPC:


limits applicability to small regions around
operating point
 Real systems are nonlinear: use of linear
controllers can generate sub-optimal
performance
 Nonlinear MPC
 Need to achieve tight control of highly nonlinear
systems
 Control of time varying (batch / semi-batch)
systems
 Grade transition problems in polymer processing

1/16/2014 State Feedback Control 131


Automation Lab
IIT Bombay

Models for Nonlinear MPC (NMPC)


First Principles / Phenomenological
/ Mechanistic / Grey Box
 Based on physics of the problem
 Energy and material balances
 Thermodynamic models
 Conservation laws: conservation of charge
 Valid over wide operating range
 Provide insight in the internal working of systems
 Development and validation process: difficult and
time consuming, requires a domain expert for
development

1/16/2014 State Feedback Control 132


Automation Lab

Models for Nonlinear MPC


IIT Bombay

 Data Driven / Black Box Models


Dynamic models developed directly from input-
output data
 Model Forms
 Nonlinear Difference Equations
 Artificial Neural Networks

 Limitations
 Valid over limited operating range
 Provide no insight into internal working of systems

 Development process: much less time consuming


and comparatively easy

1/16/2014 State Feedback Control 133


Automation Lab
IIT Bombay

Discrete Time Series Models


Dynamic Models: Given observed data

Set of past Inputs :U (k )  u (1) u ( 2) ... u (k )


Measured Outputs :Y (k )  y (1) y ( 2) ... y (k )

we are looking for relationship


y(k )  U (k 1) ,Y (k 1) ,    e (k )

such that noise (residuals) e(k) are


as small as possible
  R d represents parameter vector
identified from data

1/16/2014 State Feedback Control 134


Automation Lab

Black Box Models: Examples


IIT Bombay

Nonlinear Output Error (NOE)


x (k )  F x (k  1),.....x (k  n ), u(k  1),..., u(k  d )
y (k )  x (k )  e(k )
Example : Dynamic model using Recurrent ANN
Volverra Series Models
Block Oriented Hammerstei n and Weiner Models

Nonlinear ARX Model (NARX)


y (k )  F y (k  1),.....y (k  n ),u(k  1),..., u(k  d )  e(k )
Examples : Dynamic model using Feed Forward ANN
Nonlinear State Observers with NARX structure

1/16/2014 State Feedback Control 135


Automation Lab

Nonlinear MPC Formulation


IIT Bombay

Let r(k+i|k), i= 1, 2,…P denote desired future setpoint


trajectory
Then, defining future prediction error

e(k  i | k )  r (k  i | k )  yˆ (k  i | k )

MPC problem at the k’th instant is formulated as a


constrained nonlinear optimization problem
min
u(k | k ),...u (k  m
q 1 | k  e f (k  1 | k ),...., ef (k  p | k )

Subject to
Model Prediction Equations
Input Constraints Variety of Control
Output Constrinats objectives can be
specified

1/16/2014 State Feedback Control 136


136
Automation Lab
Example: Control of Tennessee IIT Bombay

Eastman Problem

Primary controlled variables: Product concentration of G


Product Flow rate
1/16/2014 State Feedback Control 137
Automation Lab
IIT Bombay
TE Problem: Objective Function

1/16/2014 State Feedback Control 138


Automation Lab
IIT Bombay
TE Problem: Operating Constraints

1/16/2014 State Feedback Control 139


Automation Lab
IIT Bombay
TE Problem: Transition Control

Primary Controlled Outputs

1/16/2014 State Feedback Control 140


Automation Lab
IIT Bombay
TE Problem: Transition Control

Secondary Controlled Outputs

1/16/2014 State Feedback Control 141


Automation Lab
IIT Bombay
TE Problem: Transition Control

Manipulated Inputs

1/16/2014 State Feedback Control 142


Automation Lab
IIT Bombay
TE Problem: Transition Control

Manipulated Inputs

1/16/2014 State Feedback Control 143


Automation Lab
IIT Bombay

Model for Predictive Control


Model Type Origin Linear/Nonlinear Stable/unstable
PDE, ODE Physics L, NL S, U
State Space Physics, L, NL S, U
Data
Transfer Function Physics, LTI S, U
Data
ARX, ARMAX Physics, L S, U
Data
Convolution* Data LTI Stable
(Impulse, Step)
Neural Network Data L, NL S, U

1/16/2014 State Feedback Control 144


Automation Lab
IIT Bombay
Heater Mixer Setup at IIT Bombay

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

Variation of unmeasured Disturbances

149
Automation Lab
IIT Bombay
NMPC on Heater-Mixer Setup

Manipulated Inputs

150
Automation Lab

Nonlinear MPC: Vendors


IIT Bombay

(Ref.: Qin and Badgwell, 2003)

1/16/2014 State Feedback Control 151


Automation Lab

NMPC: Applications (2003)


IIT Bombay

(Ref.: Qin and Badgwell, 2003)

1/16/2014 State Feedback Control 152


Automation Lab

Summary
IIT Bombay

 Model Predictive Control


 provides a coordinated approach to handling of multi-
variable interactions and operating constraints
 deal with control problems of non-square systems
 transparent way of tuning controller through objective
function weights and rate limits to achieve desirable
closed loop performance
 nonlinear systems
 Flexible control tool for addressing wide variety
of control problems
 Increasingly being applied in diverse application
areas: robotics, fuel cells, internet search engines,
planning and scheduling, control of drives, bio-
medical applications
1/16/2014 State Feedback Control 153
Automation Lab

Current Research Directions


IIT Bombay

 Developing reliable nonlinear models capturing


effects of unmeasured disturbances
 Incorporating robustness at design stage
 Integrating fault diagnosis with MPC/NMPC
formulations
 Development of improved state estimation
schemes
 Embedding MPC / NMPC on a chip
 Fast NMPC for robotic and other fast
applications
 Improving MPC relevant optimization schemes

1/16/2014 State Feedback Control 154


Automation Lab

References
IIT Bombay

Books with excellent material on LQOC and MPC


 Astrom, K. J. and B. Wittenmark, Computer Controlled
Systems, Prentice Hall, 1990.
 Camacho, E. C. and C. Bourdons, 1999, "Model Predictive
Control", Springer Verlag, London.
 Franklin, G. F. and J. D. Powell, Digital Control of Dynamic
Systems, Addison-Wesley, 1989.
 Goodwin, G., Graebe, S. F., Salgado, M. E., Control System
Design, Phi Learning, 2009.
 Glad, T., Ljung, L. Control Theory: Multivariable and
Nonlinear Methods, Taylor and Francis, 2000.
 Sodderstrom, T. Discrete Time Stochstic Systems.
Springer, 2003.

155
Automation Lab

References
IIT Bombay

MPC and Related Important Review Articles


 Garcia, C. E., Prett, D. M. , Morari, M. Model predictive control:
Theory and practice - A survey. Automatica, 25 (1989), 335-348.
 Morari, M. , Lee, J.H., Model Predictive Control: Past, Present and
Future, Comp. Chem. Engg., 23 (1999), 667-682.
 Henson, M.A. (1998). Nonlinear Model Predictive Control : Current
status and future directions. Computers and Chemical Engg,23 ,
187- 202.
 Lee, J.H. (1998). Modeling and Identification for Nonlinear Model
Predictive control:Requirements present status and future needs.
International Symposium on Nonlinear Model Predictive
control,Ascona, Switzerland.
 Meadows, E.S. , Rawlings, J. B. Nonlinear Process Control, ( M.A.
Henson and D.E. Seborg (eds.), New Jersey: Prentice Hall, Chapter
5.(1997).
 Qin, S.J., Badgwell, T.A. A servey of industrial model predictive
control technology, Control Engineering Practice 11 (2003) 733-
764.

156
Automation Lab

References
IIT Bombay

Useful / Important Papers


 Muske, K. R. , Rawlings, J. B. ; Model Predictive control with
linear models, AIChE J., 39 (1993), 262-287.
 Muske, K. R. ;Badgwell, T. A. Disturbance modeling for
offset-free linear model predictive control. Journal of
Process Control, 12 (2002), 617-632.
 Patwardhan S.C. and S.L. Shah (2005) From data to diagnosis
and control using generalized orthonormal basis filters. Part
I: Development of state observers, Journal of Process
Control,15,7, 819-835.
 Ricker, N. L., Model Predictive Control with State Estimation,
Ind. Eng. Chem. Res., 29 (1990), 374-382.
 Yu, Z. H. , Li , W., Lee, J.H. , Morari, M. State Estimation
Based Model Predictive Control applied to Shell Control
Problem: A Case Study, Chem. Eng. Sci., (1994), 14-22.

157
Automation Lab
IIT Bombay

Appendix
Automation Lab

Input Blocking Constraints


IIT Bombay

The degree of freedom for shaping the future trajectory is


typically restricted by imposing input blocking constraints

q is called the Control Horizon

In a practical implementation
control horizon (q) << prediction horizon (p)
1/16/2014 State Feedback Control 159
Automation Lab

Input Blocking Constraints


IIT Bombay

Bounds on the manipulated inputs

Bounds on rate of change of manipulated inputs

Since predictions are carried out online at each control


instant, it is possible to choose future inputs moves such
That the above constraints are respected

1/16/2014 State Feedback Control 160


Automation Lab
IIT Bombay

Input Blocking and Bounds


Schematic Representation of Input Blocking and Input Bounds

161
Automation Lab

QP Formulation
IIT Bombay

To understand how the MPC optimization problem can be


transformed to a quadratic programming problem, consider
MPC formulation without terminal state weighting

the prediction model can be expressed as follows

(Note: QP formulation can be carried out with terminal state weighting


also. It has been neglected here to keep the expressions relatively simple)
162
Automation Lab

QP Formulation
IIT Bombay

163
Automation Lab

QP Formulation
IIT Bombay

164
Automation Lab
IIT Bombay
Unconstrained QP Formulation

Using these notations, unconstrained version of MPC problem


can be stated as follows

165
Automation Lab
IIT Bombay
Unconstrained QP Formulation

166

You might also like