LQG_MPC_ppt_07

50
1 Linear Quadratic Optimal Control and Model Predictive Control Sachin C. Patwardhan Dept. of Chemical Engineering I.I.T. Bombay Email: [email protected] June-April, 07 APC 2007 2 Automation Lab IIT Bombay Outline Motivation Linear Quadratic Optimal Control Prediction Models and State Estimation Linear Model Predictive Control Formulation Examples: Shell Control Problem Tennessee Eastman Control Problem Motivation for Nonlinear Control Models for Nonlinear MPC Nonlinear MPC Formulation Experimental Case Study Conclusions and References

description

m

Transcript of LQG_MPC_ppt_07

1Linear Quadratic Optimal ControlandModel Predictive Control Sachin C. PatwardhanDept. of Chemical EngineeringI.I.T. Bombay Email: [email protected] une-April, 07 APC 2007 2Automation LabIIT BombayOutline Motivation Linear Quadratic Optimal Control Prediction Models and State Estimation Linear Model Predictive Control Formulation Examples: Shell Control Problem Tennessee Eastman Control Problem Motivation for Nonlinear Control Models for Nonlinear MPC Nonlinear MPC Formulation Experimental Case Study Conclusions and References 2J une-April, 07 APC 2007 3Automation LabIIT BombayLong Term Scheduling and Planning On-line OptimizationMultivariable / Nonlinear ControlRegulatory (PID) ControlPlantSlow Parameter drifts MarketDemands /Raw materialavailabilityMVFast Load DisturbancesPVAdvanced ControlSetpointsPV, MVPlant Wide Control FrameworkJ une-April, 07 APC 2007 4Automation LabIIT BombayHierarchy of control system functions3J une-April, 07 APC 2007 5Automation LabIIT BombayControl Problem 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 J une-April, 07 APC 2007 6Automation LabIIT BombayDynamic Model [ ] [ ][ ]Td dTdT Tdr m ndQ R k w k w Ek d k wR k v k v E Q k d k d ER k dR y R u R xk v k Cx k yk d k u k x k x = = == = + = + + = +12) ( ) () ( ) ( Defining; ) ( ) ( ; ) ( ) (and mean zero with sequences noise white : v(k) d(k),es disturbanc load Unmeasured : ) (; ;) ( ) ( ) () ( ) ( ) ( ) 1 (model space state stochastic GivenR1quantify uncertainties in state dynamics due to load disturbances and/or modeling errorsR2quantifies variability of measurement errors 4J une-April, 07 APC 2007 7Automation LabIIT BombayController DesignAim: 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 pairAdvantage: Multi-variable systems can be controlledrelatively easilyJ une-April, 07 APC 2007 8Automation LabIIT BombayReachability and Controllability) ( ) () ( ) ( ) (k Cx k yk u k x k x= + = +1QuestionCan we find input sequence u(0), u(1), .,u(k),such that the discrete system can be moved from x(0) to any arbitrary final state, say xf?Consider ideal situation where disturbances and measurement errors are absent model is perfectProblem: Given an arbitrary initial condition x(0) together with state space model 5J une-April, 07 APC 2007 9Automation LabIIT BombayInput SequenceGiven initial state estimate x(0) and input sequence u(0), u(1),, the discrete system evolves according to) ( .... ) ( ) ( ) (. .......... .......... .......... .......... .......... ..........) ( .... ) ( ) ( ) () ( ) ( ) () ( ) ( ) () ( ) ( ) (1 0 02 0 0 31 0 01 1 20 0 112 32 + + + = + + + = + + = + = + =n u u x n xu u x xu u xu x xu x xn nQuestion: Can we reach x(n) = xf? J une-April, 07 APC 2007 10Automation LabIIT BombayCondition for Reachability[ ] [ ] ) () (...) () (... 00211x xun un unfn = Necessary condition for reachability: thediscrete dynamic system is reachable if following rank condition holds The above set of linear equations can be rearranged as follows [ ]dimension state....== nn rankn 16J une-April, 07 APC 2007 11Automation LabIIT BombayReachability: CSTR Example[ ][ ] 2 == == = Wc rank0.7876 -0.7335 -0.00640.002WcWc Matrix ty Reachabili0.7335 -0.0026 1.333 73.4920.008 - 0.185Can we move concentration and temperature from any initial condition to any final condition using manipulation of coolant flow-rate ? Linear Perturbation model is ReachableJ une-April, 07 APC 2007 12Automation LabIIT BombaySISO Pole Placement Controllernn nnn na z a zb z b zk Cx k yI k u k x k x+ + ++ + +== + = + .......... by(k)Fundtion Transfer) ( ) () .......( ) ( ) ( ) 1 (Model Original112211[ ]n ccnccc cb b b Ca a a ak C k yII k u k k................. .... .... ............) ( ) () .......( ) ( ) ( ) (Form Cannonical le Controllab`2 13 2 10010 0 00 0 0 11== = = + = + 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 system7J une-April, 07 APC 2007 13Automation LabIIT BombaySISO Pole Placement Controller Design Controller in transformed coordinates [ ]G T Gas space state original to back G observer the Transform1,2...n i for phave we ts, coefficien equating IBylocation desired the at poles has R.H.S. on polynomial where....... ) ( detbe polynomial stic characteri observer desired the Let........ .... .... ............) ( ) ( ; ) ( ) ( ) (Space d Transforme in Controller Designc1 -c, , in, , ,== = + =+ + + = = = + = +i iicic innc c cnc n c cc c cc c ca p g g ap p G Ig a g a g aGk G k u k u k k1122110 0 00 0 101 J une-April, 07 APC 2007 14Automation LabIIT BombaySISO Pole Placement Controller[ ][ ][ ] = ===111nCONcnc c c c CONCON CONWWW W TTx......~~tion Transforma CoordinateNote that the above coordinate transformation is possible only if the original system is reachable, i.e. Rank( Wcon) = n[ ][ ]==1 0 01 0121 1111...... ... ... .........~~tion Transforma Coordinate InversennCONCON CONaa aWW W T8J une-April, 07 APC 2007 15Automation LabIIT BombayCSTR Example[-45.2481 -2.2286] [0,0] (Dead Beat) [-99.6531 -1.3300] [0.4, 0.4][-64.8345 -0.1165] [0.8, 0.8] Controller Gain VectorClosed Loop Poles In general, the state feedback controller becomes more and more aggressive as closed loop poles move closer to originController-Observer Pair Selected0.4] 4 . [ ) ( of Poles0.6] 6 . [ ) ( of Poles00= = LCGJ une-April, 07 APC 2007 16Automation LabIIT BombayCSTR: Pole Placement Controller State Evolution 0 1 2 3 4 500.10.20.30.4Sampling InstantConc.(mod/m3)State Dynamics0 1 2 3 4 5390395400405410415Sampling InstantTemp.(K)9J une-April, 07 APC 2007 17Automation LabIIT BombayCSTR: Pole Placement Controller0 1 2 3 4 55101520Sampling InstantCoolent FlowManipulated Inputs0 1 2 3 4 500.511.52Sampling InstantInflowJ une-April, 07 APC 2007 18Automation LabIIT BombayCSTR: Pole Placement Controller0 1 2 3 4 5-0.0500.050.10.15Time (min)Error in Conc. EstimateObserver Error Dynamics0 1 2 3 4 5-50510Time (min)Error in Temp. Estimate10J une-April, 07 APC 2007 19Automation LabIIT BombayPrediction Estimation and Current State Estimation[ ][ ][ ]P C cCCPL L or Lk k C L Ik k x C k y L k k x k k xk u k k x k k xk k xk k x C k y L k u k k x k k x1PLas related are matrices gainestimator state Current and estimator Prediction) 1 | ( k) | 1 (kdynamics error Estimation) 1 | ( ) ( ) 1 | ( ) | ( ) 1 ( ) 1 | 1 ( ) 1 | ( estimator state Currentdelayn informatio Unit : ge Disadvanta(k) instant time to up n informatio on based1) (k instant time at state of estimate Prediction : ) | 1 ( ) 1 | ( ) ( ) ( ) 1 | ( ) | 1 ( estimation prediction to s corresponddesigned have we observer The = = = + + = + = + + + + = + J une-April, 07 APC 2007 20Automation LabIIT BombayCSTR Example [ ][ ][ ] 0.185 - 73.4921 01.333 73.4921 0 1 1.5180 1~T836 . 0518 . 1) ( 0 1 ) () (10.18 - 0.32561.797 - 0.7335 -) (0 0.836 -1 1.518) 1 (form Canonical Observable) ( 1 0 ) () (1.8 - 0.73 -0.13 0.005) (1.33 73.490.01 - 0.185) 1 (Model Space State (Original) Linearized1121 1== =+==+= +=+= +OBS OBSpW WppT Lk k yk u k kk x k yk u k x k x 11J une-April, 07 APC 2007 21Automation LabIIT Bombay MIMO Systems: Difficulty with Pole Placement Design ( )( ) [ ]equations. of system determined - Under : DifficultyG of elements m) (n unknowns of Numberequations. n only gives polynmial loop closed desired the with- I det of ts coefficien equating thenof roots the at loop closed of poles place to intend we Ifby governed is dynamics loop closed The matrix. n) (m a is G where-Gx(k) u(k)law controller feedback state WithR u with system MIMO a Considerm == = + + + = += + = +00 ......) ( ) 1 () ( ) ( ) 1 (11Gp pk x G k Xk u k x k Xnn n J une-April, 07 APC 2007 22Automation LabIIT BombayLinear Quadratic Regulator) ( ) () ( ) ( ) 1 (k Cx k yk Bu k Ax k x=+ = +Model: ObjectiveRegulate the process at origin of the state space in the face of sudden impulse like, disturbances, which result in non-zero initial conditions( ) ( ) [ ]matrices seighting Definite Positive Symmetric: W , W WCx(k) y(k)) ( x(k) 1) x(ku(k) W u(k) ) ( ) () ( ) () 1 ( ),...., 0 (minthat such ) 1 ( ),...., 0 ( sequence input DetermineN x,10uTuNkxTNTk uto Subjectk x W k xN x W N xN u uN u u= + = +++=12J une-April, 07 APC 2007 23Automation LabIIT BombaySolution Strategy Approach: Dynamic programmingSolve problem at instant (k) by assuming that problem up to time (k-1) has been solved optimally. [ ]stage each at solution of optimality ensures whichk each for definite ve and Symmetric : s(k)W S(N)with ....1 1, - N N, from startingtime in backward solved Equation) ( ) ( )] ( )[ 1 ( )] ( [ ) () 1 ( ) 1 ( W G(k)-G(k)x(k) u(k)Equation Riccati time Discrete : SolutionN1u+=+ + + = + + + ==k G W k G W k G k S k G k Sk S k SuTxT TT TJ une-April, 07 APC 2007 24Automation LabIIT BombayAlgebraic Riccati Equation[ ]ARE. to solution definitenegative non and symmetric unique a exists there thenWwhere observable is ) , ( if andle controllab is ) , ( if However, solutions. many has ARE x(k) -G u(k)becomes law control andG G ] G [ S ] G [ SS S W Gas (ARE) Equation Riccati Algebraicsolving by computed be can whichG G(k) ; S S(k) large, becomes N Whenu1u = =+ + = + = TuTxT TT TW W13J une-April, 07 APC 2007 25Automation LabIIT BombayProperties of LQRProperties By selecting weighting matrices Wxand Wu, it is easy to compromise between speedof recovery and magnitude of control signal When system is controllable and the objective function is symmetric and +ve definite, LQ controller will always give stable closed loop responseLinear Quadratic Gaussian (LQG) control Design optimal state estimator (Kalman Filter) Implement control law using estimated states) | ( ) ( ) ( k k x k L k u =J une-April, 07 APC 2007 26Automation LabIIT BombayKalman Filter Kalman filter form uses information up to kth instant to estimate statePrediction:[ ] ) 1 | ( ) ( ) ( ) 1 | ( ) | ( + = k k x C k y k L k k x k k xKalman Gain and Covariance matrix update[ ] ) 1 | ( ) ( ) | () ) 1 | ( ( ) | ( ) () 1 | 1 ( ) 1 | (121 = + =+ = k k P C k L I k k PC k k CP R C k k P k LR k k P k k PcT TcT) 1 ( ) 1 | 1 ( ) 1 | ( + = k u k k x k k xCorrection:14J une-April, 07 APC 2007 27Automation LabIIT Bombay Linear Quadratic OptimalTracking Problem( ) ( ) [ ]{ }) ( ) ( L - ) ( u(k)) N (for lawcontrol Resultingmatrices seighting Definite Positive Symmetric: W , W Wtrajectory setpoint defines .... 1 , 0 : ) () ( ) ( ) (Cx(k) y(k)) ( x(k) 1) x(ku(k) W u(k) ) ( ) () ( ) () 1 ( ),...., 0 (minthat such ) 1 ( ),...., 0 ( sequence input Determinecontroller tracking trajecorySetpointrN e,10uTk x L k r k uN k k rk y k r kk uto Subjectk W kN W NEN u uN u uxuNkeTNT = = = = = + = +++ee ee eJ une-April, 07 APC 2007 28Automation LabIIT BombayCSTR Example Ai Aic cA AC t C t dF t FF t Ft uT t TC t Ct x === ) ( ) ( ;) () () ( ;) () () ([ ] ) ( 1 0 ) () (9 . 306 . 0) (1.8 - 0.73 -0.13 0.005) (1.33 73.490.01 - 0.185) 1 (k x k yk d k u k x k x=++= +Discrete linear perturbation modelSampling Time (T) = 0.1 min ) , , , , , () , , , , , (0 20 1cin A c Acin A c AAT C F F T C fdtdTT C F F T C fdtdC==15J une-April, 07 APC 2007 29Automation LabIIT BombayInferential Control of CSTR 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 J une-April, 07 APC 2007 30Automation LabIIT BombayState Observer Design[ ] [ ][ ] [ ]( )( )[ ]TCa aLR Qkk xk yk d k ukk xkk x0447 . 0 8006 . 0 0016 . 0estimator) state (current Filter Klaman for gain stste Steady ) 01 . 0 ( : Parameter Tuning of Choice1 . 0 ;00 0.01: s Covariance Noise t Measuremen & State} measured is e temperatur Only: Note {) () (0 1 0 ) () (09 . 306 . 0) (0 01.8 - 0.73 -0.13 0.005) () ( 1 0 09 . 306 . 01.33 73.490.01 - 0.185) 1 () 1 (estimation state for system Augmented9 . 306 . 0select we i.e. e, disturbanc in bias as state artificial introduce We,2 2222=====++=++= 16J une-April, 07 APC 2007 31Automation LabIIT BombayCSTR: Kalman Filter PerformanceLinear PlantSimulation(No PlantModelMismatchCase)0 1 2 3 4 5 6 7 8 9 100.20.250.30.35Time (min)Conc.(mol/m3)State Estimation0 1 2 3 4 5 6 7 8 9 101.922.12.22.3Time (min)Inlet Conc. (mol/m3)TrueEstimatedJ une-April, 07 APC 2007 32Automation LabIIT BombayCSTR: Kalman Filter PerformanceNon-Linear PlantSimulation(PlantModelMismatchCase)0 1 2 3 4 5 6 7 8 9 100.20.250.30.35Time (min)Conc.(mol/m3)State Estimation0 1 2 3 4 5 6 7 8 9 101.922.12.22.3Time (min)Inlet Conc. (mol/m3)TrueEstimated17J une-April, 07 APC 2007 33Automation LabIIT BombayCSTR : Inferential LQC [ ] xs(k)xs(k)Law Control Quadratic LinearWaction) control aggressive less y (relativel Weighting Input Large : LQC2Waction) control aggressive y (relativel weighting Input Small : LQC1Parameters Design ControllerC have we i.e.,ion, concentrat reactor estimated and e temperatur reactor of Conolxxr = += === ====) | ( ) (0537 . 0 356 . 43226 . 0 52 . 89) () | (10 857 . 110 6 . 1) (1 00 10444 . 0 177 . 60183 . 0 3163 . 1;100 00 100;1 00 1000312 . 0 94 . 67614 . 0 37 . 47;1 00 1;1 00 1001 00 11517k k x G k k uk k kG WG Wuurr J une-April, 07 APC 2007 34Automation LabIIT BombayCSTR: Multi-Loop PI PerformanceLinear PlantSimulationPID PairingCA - FcT - F3 . 00028 . 02 . 034 . 62 ,2 ,1 ,1====IcIckk0 5 10 15 20 250.20.250.30.350.4Time (min)Conc.(mol/m3)Controlled Outputs0 5 10 15 20 25385390395400Time (min)Temp.(K)18J une-April, 07 APC 2007 35Automation LabIIT BombayCSTR: Multi-Loop PI Performance Linear PlantSimulation0 5 10 15 20 25102030Time (min)CoolentFlow (m3/min)Manipulated Inputs and Disturbance0 5 10 15 20 250.511.5Time (min)Inflow (m3/min)0 5 10 15 20 251.522.5Time (min)Inlet Conc. (mol/m3)J une-April, 07 APC 2007 36Automation LabIIT BombayCSTR: PI with gain DecouplingLinear PlantSimulationPID PairingCA m1T m22 . 01 . 02 . 01 . 02 ,2 ,1 ,1====IcIckk0 5 10 15 20 250.20.250.30.350.40.45Time (min)Conc.(mol/m3)Controlled Outputs0 5 10 15 20 25390395400405Time (min)Temp.(K)19J une-April, 07 APC 2007 37Automation LabIIT BombayCSTR: PI with gain DecouplingLinear PlantSimulation0 5 10 15 20 25102030Time (min)CoolentFlow (m3/min)Manipulated Inputs and Disturbance0 5 10 15 20 250.511.5Time (min)Inflow (m3/min)0 5 10 15 20 251.522.5Time (min)Inlet Conc. (mol/m3)J une-April, 07 APC 2007 38Automation LabIIT BombayCSTR: PI with gain DecouplingNon-Linear PlantSimulation0 5 10 15 20 2500.20.40.60.8Time (min)Conc.(mol/m3)Controlled Outputs0 5 10 15 20 25380390400410420430Time (min)Temp.(K)20J une-April, 07 APC 2007 39Automation LabIIT BombayCSTR: PI with gain DecouplingNon-Linear PlantSimulation0 5 10 15 20 25102030Time (min)CoolentFlow (m3/min)Manipulated Inputs and Disturbance0 5 10 15 20 250.511.52Time (min)Inflow (m3/min)0 5 10 15 20 251.522.5Time (min)Inlet Conc. (mol/m3)J une-April, 07 APC 2007 40Automation LabIIT BombayCSTR: LQG PerformanceLinear PlantSimulation(No PlantModelMismatchCase)0 5 10 15 20 250.20.250.30.350.40.45Time (min)Conc.(mol/m3)Controlled Outputs0 5 10 15 20 25388390392394396398Time (min)Temp.(K)21J une-April, 07 APC 2007 41Automation LabIIT BombayCSTR: LQG PerformanceLinear PlantSimulation(No PlantModelMismatchCase)0 5 10 15 20 25102030Time (min)CoolentFlow (m3/min)Manipulated Inputs and Disturbance0 5 10 15 20 250123Time (min)Inflow (m3/min)0 5 10 15 20 251.522.5Time (min)Inlet Conc. (mol/m3)J une-April, 07 APC 2007 42Automation LabIIT BombayCSTR: LQG PerformanceNon-Linear PlantSimulation(PlantModelMismatchCase)0 5 10 15 20 250.20.250.30.350.40.45Time (min)Conc.(mol/m3)Controlled Outputs0 5 10 15 20 25385390395400Time (min)Temp.(K)22J une-April, 07 APC 2007 43Automation LabIIT BombayCSTR: LQC1 PerformanceNon-Linear PlantSimulation(PlantModelMismatchCase)0 5 10 15 20 25102030Sampling InstantCoolent Flow (m3/min)Manipulated Inputs and Disturbance0 5 10 15 20 250123Sampling InstantInflow (m3/min)0 5 10 15 20 251.522.5Sampling InstantInlet Conc. (mol/m3)J une-April, 07 APC 2007 44Automation LabIIT BombayDifficulties with LQG 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 ARE is notoriously difficult to solve for large dimensional systems 23J une-April, 07 APC 2007 45Automation LabIIT BombayModel Predictive Control Multivariable Control based on On-line use of Dynamic Model Most widely used multivariable control scheme inprocess industries over last 25 years DynamicMatrixControl(DMC)developedbyShellin U.S.A. (Cutler and Ramaker, 1979) ModelAlgorithmicControldevelopedbyRichalet 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 J une-April, 07 APC 2007 46Automation LabIIT BombayAdvantages of MPC Modified form of classical optimal control problem Can systematically and optimally handle Multivariable interactions Operating input and output constraints Process nonlinearities Basic IdeaGiven a model for plant dynamics, possible consequences of the current 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 moves24J une-April, 07 APC 2007 47Automation LabIIT BombayClassical Optimal Control:Difficulties 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 Control law computations require solutions of Algebraic Riccati Equations (ARE). ARE is notoriously difficult to solve for large dimensional systems J une-April, 07 APC 2007 48Automation LabIIT BombayMPC: Schematic Diagram ProcessDynamic ModelDynamic PredictionModelOptimization MPCSet point TrajectoryDisturbances Dynamic Model: used for on-line forecasting over a moving time horizon (window) Plant-model mismatchInputs Outputs25J une-April, 07 APC 2007 49Automation LabIIT BombayBasic Idea Finite Horizon formulation: Optimization problem is formulatedover 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 (k) to (k+P), (k+1) to (k+P+1) . and so on Predictive Control: Given a good dynamic model,we can perform on-line forecasting and foresee any possible constraint violations over the time window (Pro-active constraint management) J une-April, 07 APC 2007 50Automation LabIIT BombayMoving Horizon Formulation (Kothare et al, (2000), IEEE Control Systems Technology)Output Constraints26J une-April, 07 APC 2007 51Automation LabIIT BombayComponents of MPC Internal model and state estimator Linear perturbation model (Finite Impulse Response, Finite step response) Nonlinear models: Mechanistic / Nonlinear time series State Estimator: Open loop/ Kalman filter / Extended Kalman Filter Prediction of Future Plant Behavior Handling unmeasured disturbances / plant model mismatch On-line constrained optimization strategy Quadratic programming Linear programming J une-April, 07 APC 2007 52Automation LabIIT BombayMPC with State EstimationDynamicModel (Kothare et al, (2000), IEEE Control Systems Technology)On-line Optimizer 27J une-April, 07 APC 2007 53Automation LabIIT BombayOpen Loop Predictions[ ] [ ]horizon prediction : p1,2,....p i for ) | ( C k) | i (k youtputs future on inputsfuture of Effectoutputs future on pastof Effects predictionstate Future) | ( .... ) | 1 ( k) | (k x ) | ( .... .......... ..........) | ( ) | 1 ( k) | (k x) | 1 ( k) | 1 (k x k) | 2 (k x) | ( k) | (k x k) | 1 (k xs prediction perform to used be can process the of model Dynamic k) | 1 - p ....u(k k), | 1 u(k k), | u(k saymoves input future of guess a given instant, th k' At1 22= + = ++= + + + + = + + + + =+ + + = + + = ++ +k i k xk k u k p k u k p k xk k u k k uk k uk k upJ une-April, 07 APC 2007 54Automation LabIIT BombayCorrection for Plant-Model MismatchSimple model for estimating plant-modelMismatch k instant at s prediction loop open : ) | ( k instant at s prediction corrected : ) | (~) | ( ) ( ) | () | ( ) | 1 () | ( ) | ( ) | (~k i k yk i k yk k Cx k y k kk i k k i kk i k k i k y k i k y++ =+ = + ++ + + = + Signal d(k) contains information about Plant-Model mismatchUnmeasured disturbances Limitation: deals only with low frequency disturbances28J une-April, 07 APC 2007 55Automation LabIIT BombayOffset Removal: Stochastic Case) ( st measuremen of No. ) ( states extra of No.Parameters Tuning : (k) w (k), of s Covariancemean zero with sequences noise white mean zero : (k) w (k),states e disturbanc Artificial : ,;) ( ) ( ) ( ) () ( ) ( ) 1 () ( ) ( ) 1 () ( ) ( ) ( ) ( ) 1 (model space state stochastic Given2 12 1r n nwwR Rk v k C k Cx k yk w k kk w k kk k d k u k x k xn nd + + + =+ = ++ = + + + + = + Design Kalman filter using model augmented with artificial statesJ une-April, 07 APC 2007 56Automation LabIIT Bombay( ) ( ) [ ]matrices seighting Definite Positive Symmetric W Wy k) | 1 - i (k y~y : Limits OutputM i for 0 k) | 1 - i u(kM i for u k) | 1 - i u(k uLimits Rate Inputu k) | 1 - i u(k u : Limits Inputk) | 1 - i u(k - k) | i u(k k) | i u(kk) | 1 - i u(k W k) | 1 - i u(k ) k | i k ( ) k | i k (function objective minimizes that) | 1 ( ),...., | ( sequence input Determinee,HLLHL1uTupieTto SubjectWk P k u k k u + = + < + + + + = + + + + + + = +=e e Typical MPC Formulation Control Horizon29J une-April, 07 APC 2007 57Automation LabIIT BombayMoving Horizon Formulation Optimization problem transformed to Quadratic Programming (QP) problem for improving computing efficiency on-line Only first input move is implemented Optimization problem reformulated at (k+1)over horizon [k+1,k+p+1] Non-square systems (No. Outputsnot equal to No. Inputs) can be handled ) | ( ) ( k k u k uopt=J une-April, 07 APC 2007 58Automation LabIIT BombayExample: Shell Control ProblemControlled Outputs :(y1) Top End Point (y2) Side Endpoint(y3) Bottom Reflux TemperatureManipulated Inputs :(u1) Top Draw (u2) Side Draw (u3) Bottom Reflux DutyUnmeasured Disturbances:(d1) Upper reflux (d2) Intermediate reflux 30J une-April, 07 APC 2007 59Automation LabIIT Bombay+ + ++ + ++ + += 1 192 . 71 4442 . 41 3338 . 41 409 . 61 6072 . 51 5039 . 51 5088 . 51 6077 . 11 5005 . 4) (19 22 2015 14 1827 28 27seseseseseseseseses Gs s ss s ss s su) ( ) ( ) ( ) ( ) ( s d s G s u s G s yd u+ =`1 3226 . 11 2714 . 11 2083 . 11 2552 . 11 4044 . 11 452 . 1) (15 1527 27+ ++ ++ += s sseseseses Gs ss sdCharacteristics Large time delays High degree of multivariable interactionsShell Control Problem (SCP)J une-April, 07 APC 2007 60Automation LabIIT BombaySCP: MPC Tuning Parameters Operating Constraints315 . 05 . 0 5 . 0yy Input Limits ( )( ) 2 , 1 5 . 0 5 . 03 , 2 , 1 5 . 0 5 . 0= = i for di for uii( ) 3 , 2 , 1 05 . 0 05 . 0 = i for ui Rate LimitsOutput ConstraintsPrediction Horizon : 40 Control Horizon : 3 [ ][ ] 1 1 . 0 1 5 . 10 1 1diag Wdiag Wue==Sampling interval(T) =2 min31J une-April, 07 APC 2007 61Automation LabIIT BombaySCP: Servo Response0 50 100 150 200 250-0.5-0.4-0.3-0.2-0.100.10.20.30.40.5Sampling instantMeasured OutputsShell Control Problemy(1)y(2)y(3)J une-April, 07 APC 2007 62Automation LabIIT BombaySCP: Servo Response0 50 100 150 200 250-0.5-0.4-0.3-0.2-0.100.10.20.30.40.5Sampling instantManipulated InputsShell Control Problemu(1)u(2)u(3)32J une-April, 07 APC 2007 63Automation LabIIT BombayExample: Shell Control ProblemRegulatory ControlOutput constrainthandling Disturbance:Step JumpsJ une-April, 07 APC 2007 64Automation LabIIT BombayLinear MPC: Nominal Stability Approach 1: Formulate infinite prediction horizon and finite control horizon problemStability is proved by using Lipunovs theorem Approach 2: Impose terminal Constraints on predicted state x(k+p) = 0 or introduce large weighting on terminal state Approach 3: Impose contraction constraints ==+ + +miWiWfe ek i k u k i k e1212) | ( ) | ([0,1) definite, ve :) | ( ) | ( + +Rk k x k p k xR R33J une-April, 07 APC 2007 65Automation LabIIT BombayNominal Stability ( ) ( ) [ ]( ) ( ) ( )( ) ( ) ( ) [ ]1us s10uT11u s) (0Equation Liapunov to solution definite Positive :s constraint state and Input0 ) | () | ( ) | (k) | i u(k W k) | i u(k ) k | i k ( ) k | i k (ly respective matrix, of spaces - eigen unstablestable to on xof s projection be ) ( and ) ( Let ++ + + +== = = + = + + + ++ + + + += Ts sTs sTs eTs s s s sTsTTssT TmimieTW W WWk m k xto Subject k m k x W k m k xx W xx xInfinite Horizon Formulation (Muske and Rawlings,1993)J une-April, 07 APC 2007 66Automation LabIIT BombayLinear MPC: Robustness 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 Use Linear Matrix Inequalities framework to solve robust control problem = = = + = + = =0 ; 1 | ] , [ ] , [) ( ) () ( ) ( x ) 1 (1 1isii i isiik Cx k yk u k k x 34J une-April, 07 APC 2007 67Automation LabIIT BombayTennessee Eastman ProblemPrimary controlled variables: Product concentration of GProduct Flow rate J une-April, 07 APC 2007 68Automation LabIIT BombayTE Problem: Objective Function35J une-April, 07 APC 2007 69Automation LabIIT BombayTE Problem: Operating ConstraintsJ une-April, 07 APC 2007 70Automation LabIIT BombayTE Problem: Transition Control Primary Controlled Outputs36J une-April, 07 APC 2007 71Automation LabIIT BombayTE Problem: Transition ControlSecondary Controlled OutputsJ une-April, 07 APC 2007 72Automation LabIIT BombayTE Problem: Transition ControlManipulated Inputs37J une-April, 07 APC 2007 73Automation LabIIT BombayTE Problem: Transition ControlManipulated InputsJ une-April, 07 APC 2007 74Automation LabIIT BombayCommercial Products38J une-April, 07 APC 2007 75Automation LabIIT BombayLinear MPC Applications (2003)J une-April, 07 APC 2007 76Automation LabIIT BombayNeed for Nonlinear Control Linear prediction model based MPC:limits applicabilityto 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 processing39J une-April, 07 APC 2007 77Automation LabIIT BombayModels 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 J une-April, 07 APC 2007 78Automation LabIIT BombayExample: Quadruple Tank System2 12 1242 2444 4131 1333 3222 2424222 2111 1313111 1h and h : Outputs Measuredv and v : Inputs d Manipulate) 1 (2) 1 (22 22 2vAkghAadtdhvAkghAadtdhvAkghAaghAadtdhvAkghAaghAadtdh+ =+ =+ + =+ + =Pump 2V2Pump1V1Tank3Tank 2Tank 1Tank 440J une-April, 07 APC 2007 79Automation LabIIT BombayMechanistic Models noise measureent : v ; state in yuncertaint : wvector Function : F(.) vector, Parameter :vector e Disturbanc : d vector, input d Manipulate : uvector variable dependent /State :, , ,) () , , , (xR R d R u R xv x G yw d u x Fdtdxp d m n + =+ =Abstract Form: Ordinary Differential EquationSimultaneous state and parameter estimation to deal with plant-model mismatch (removes offset in NMPC)J une-April, 07 APC 2007 80Automation LabIIT BombayModels for Nonlinear MPC Data Driven / Black Box ModelsDynamic 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 41J une-April, 07 APC 2007 81Automation LabIIT BombayDiscrete Time Series Models Dynamic Models: Given observed data[ ][ ] ) ( ... ) ( ) ( : Outputs Measured) ( ... ) ( ) ( : Inputs past of Set) () (k y y y Yk u u u Ukk2 12 1==we are looking for relationship( ) ) ( , , ) () ( ) (k e Y U kk k+ = 1 1ysuch that noise (residuals) e(k) are as small as possiblevector parameter representsdR identified from data J une-April, 07 APC 2007 82Automation LabIIT BombayBlack Box Models: Examples[ ]structure NARX with Observers State Nonlinear ANN Forward Feed using model Dynamic: Examples) ( ) ( ),..., 1 ( ), ( ),..... 1 ( ) ((NARX) Model ARX Nonlineark e d k u k u n k y k y F k y + =[ ]Models Weiner and n Hammerstei Oriented BlockModels Series Volverra ANN Recurrent using model Dynamic: Example) ( ) ( ) () ( ),..., 1 ( ), ( ),..... 1 ( ) ((NOE) Error Output Nonlineark e k x k yd k u k u n k x k x F k x+ = =42J une-April, 07 APC 2007 83Automation LabIIT BombayModel Type Origin Linear/Nonlinear Stable/unstablePDE, ODE Physics L, NL S, UState Space Physics, L, NL S, UDataTransfer Function Physics, LTI S, UDataARX, ARMAX Physics, L S, UDataConvolution*Data LTI Stable(Impulse, Step)Neural NetworkData L, NL S, UModel for Predictive ControlJ une-April, 07 APC 2007 84Automation LabIIT BombayNonlinear State EstimationState estimation using Extended Kalman Filtering Prediction:[ ] ) 1 | ( ) ( ) ( ) 1 | ( ) | ( + = k k x C k y k L k k x k k xKalman Gain and Covariance matrix update[ ][ ]= = = + =+ = )) 1 ( ), 1 | 1 ( ( ) 1 | 1 ( 121exp ) ( ; ) () 1 / ( ) ( ) ( ) / () ( ) 1 / ( ) ( ) ( ) / ( ) () ( ) 1 / 1 ( ) ( ) 1 / (k u k k x k k xT TTXFT kXGk Ck k P k C k L I k k Pk C k k P k C R k C k k P k LR k k k P k k k P[ ]+ + = 1, ), 1 ( ), ( ) 1 | 1 ( ) 1 | ( kkttd k u x F k k x k k x Correction:43J une-April, 07 APC 2007 85Automation LabIIT BombayNonlinear MPC Formulation) | (~) | ( ) | ( k i k y k i k r k i kf+ + = + eLet r(k+i|k), i= 1, 2,P denote desired future trajectory(set point) Defining future prediction error MPC problem at the kth instant is formulated as a constrained optimization problem { }{ }s Constrinat Outputs Constraint Inputto Subject) | ( ),...., | 1 (| 1 ( ),... | (mink p k k kk p k u k k uf f+ + +e eVariety of Control objectives can be specified J une-April, 07 APC 2007 86Automation LabIIT BombayHeater Mixer Setup at IIT Bombay44J une-April, 07 APC 2007 87Automation LabIIT BombayDifficulties in ControlSingular Operating PointProblem: Steady State Gain Changes Sign in Operating RegionJ une-April, 07 APC 2007 88Automation LabIIT BombayNMPC on Heater-Mixer Setup45J une-April, 07 APC 2007 89Automation LabIIT BombayNMPC on Heater-Mixer SetupJ une-April, 07 APC 2007 90Automation LabIIT BombayIndustrial Application: Ammonia Plant46J une-April, 07 APC 2007 91Automation LabIIT BombayNonlinear MPC: VendorsJ une-April, 07 APC 2007 92Automation LabIIT BombayNMPC: Applications (2003)47J une-April, 07 APC 2007 93Automation LabIIT BombaySummary Model Predictive Control provides a coordinated approach to handling of multi-variable interactions and operating constraints transparent way of tuning controller through objective function weights and rate limits to achieve desirable closed loop performance 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 drivesJ une-April, 07 APC 2007 94Automation LabIIT BombayCurrent Research Directions 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 schemes48J une-April, 07 APC 2007 95Automation LabIIT BombayReferencesJ une-April, 07 APC 2007 96Automation LabIIT BombayReferences49J une-April, 07 APC 2007 97Automation LabIIT BombayReferencesJ une-April, 07 APC 2007 98Automation LabIIT BombayReferences50J une-April, 07 APC 2007 99Automation LabIIT BombayReferences