Introduction to Mpc

download Introduction to Mpc

of 40

description

mpc

Transcript of Introduction to Mpc

1

1Introduction to Model Predictive Control Technology Hao-Yeh LeeProcess System Engineering LaboratoryDepartment of Chemical Engineering National Taiwan UniversityMay 12, 20052OutlineIntroductionModel Forms for MPCDynamic Matrix Control (DMC)SISO formulationMIMO formulationQuadratic Dynamic Matrix Control (QDMC)MATLAB tools for MPCCase StudyFuture work3Introduction The main idea of model predictive control (MPC) is to choose the control action by repeatedly solving on line an optimal control problem. This aims at minimizing a performance criterion over a future horizon, possibly subject to constraints on the manipulated inputs and outputs, where the future behavior is computed according to a model of the plant. 4Advantages of MPCEasy to use for MIMO system and easy to handle process interactionsEasy to handle time delays, inverse response, as well as other difficult process dynamics.Only few tuning parameters are needed.

5A History of MPCMAC, IDCOM (Richalet et al. , 1976, 1978)using a discrete-time Finite Impulse Response (FIR) model. Dynamic Matrix Control (DMC), (Cutler and Ramaker, 1979)linear step response model for the plant quadratic performance objective over a finite prediction horizon future plant output behavior specified by trying to follow the setpoint as closely as possible optimal inputs computed as the solution to a least-squares problem 6A History of MPC (contd)Quadratic Dynamic Matrix Control (QDMC), (Garca and Morshedi, 1984)linear step response model for the plant quadratic performance objective over a finite prediction horizon future plant output behavior specified by trying to follow the setpoint as closely as possible subject to process constraints optimal inputs computed as the solution to a quadratic program Generalized Predictive Control (GPC) (Clarke et al., 1987)Transfer function model for the plantNonlinear Model Predictive Control (NMPC)7Basic Elements of MPCReference Trajectory SpecificationProcess Output PredictionControl Action Sequence ComputationError Prediction Update 8Model Forms for MPCConvolution model Step response model

Impulse response model

Discrete state-space modelDiscrete transfer function model

finite step response (FSR) finite impulse response (FIR)9Dynamic Matrix ControlUnconstrained Model Predictive Control

10Step Response ModelFor SISO system

11Finite Step Response Modelprocess output at time kstep response coefficient at time icontroller output at time kModel horizon

12Finite Step Response Model (contd)If the Hm is large enough, the process output will be approached to steady state for the stable process

The finite step response model (FSR)

13Impulse response model It is easy to convert the impulse response model as step response model

14The Concept of Moving Horizon

15

16After Hc steps, the manipulating variable rates are all the same, then

17Process Output PredictionDefine the past input effect term:

Dynamic matrix18Process Output Prediction (contd)Define error prediction update term

Future outputFuture input effectpast input effect19Control Action Sequence ComputationDMC control law

20Control Action Sequence Computation (contd)

21Control Action Sequence Computation (contd)To apply the concept of moving horizon

22MIMO system formulationFor nu ny MIMO systemStep response model

23MIMO system formulation (contd)

24Selection of Tuning ParametersSystematic parametersSampling interval (Ts)Ts should be small enough to capture the dynamics of the process, large enough to permit the on-line computations necessary for implementationModel horizon (Hm)Major tuning parametersPrediction horizon (Hp)Longer Hp tends to produce more aggressive control action, more overshoot, faster response and more sensitive to disturbancesControl horizon (Hc)Control horizon should be less or equal to prediction horizonThe effect of increasing is very similar to prediction horizon25Selection of Tuning Parameters (contd)Weighting parametersPenalty factor ( f )A input weighting factor usually is set less than 10% of the output penalty to achieve good closed-loop performance.Weighting matrix (G)Output penalty matrix26Quadratic Dynamic Matrix ControlQDMC is the DMC extended to concern the system constraints It uses quadratic programming technique to solve the optimization problem.Quadratic programming form:

27Process constraintsManipulated variable constraints

28Process constraints (contd)Manipulated variable rate constraints

29Process constraints (contd)Output variable constraints

30

31Quadratic Programming

Control law:32Limitations of Existing Technology impulse and step response models are limit application of the algorithm to strictly stable processes sub-optimal solution of the dynamic optimization constant output disturbance assumptiontuning is required to achieve nominal stability model uncertainty is not addressed adequately 33MATLAB Tools for MPCMATLAB code for DMC[yp,u,ym] = mpcsim(plant,model,Kmpc,tend,r,usat,... tfilter,dplant,dmodel,dstep) Kmpc = mpccon(model,ywt,uwt,M,P) plant = tfd2step(tfinal,delt2,nout,g1,...,g25) plant = ss2step(phi, gam, c, d, tfinal)MATLAB code for QDMC[yp,u,ym] = cmpc(plant,model,ywt,uwt,M,P,tend,... r,ulim,ylim,tfilter,dplant,dmodel,dstep) 34Case Study2x2 ExampleWood and Berry process

35MATLAB Code for MPCSetpoint changeg11=poly2tfd(12.8,[16.7 1],0,1);g21=poly2tfd(6.6,[10.9 1],0,7);g12=poly2tfd(-18.9,[21.0 1],0,3);g22=poly2tfd(-19.4,[14.4 1],0,3);delt=3; ny=2; tfinal=90;model=tfd2step(tfinal,delt,ny,g11,g21,g12,g22);plant=model;P=6; M=2; ywt=[ ]; uwt=[1 1];tend=30; r=[0 1];ulim=[-inf -0.15 inf inf 0.1 100];ylim=[ ];[y,u]=cmpc(plant,model,ywt,uwt,M,P,tend,r,ulim,ylim);plotall(y,u,delt)36

37Disturbance rejectiongd11=poly2tfd(3.8,[14.9 1],0,8.1);gd21=poly2tfd(4.9,[13.2 1],0,3.4);

dmodel=tfd2step(tfinal,delt,ny,gd11,gd21);dplant=dmodel;r=[0 0]; dstep=1; tfilter = [];[y,u]=cmpc(plant,model,ywt,uwt,M,P,tend,r,ulim,ylim, tfilter,dplant,dmodel,dstep);plotall(y,u,delt)38

39ConclusionThe major advantage of the MPC algorithm is easy to handle multivariable system. Quadratic dynamic matrix control can concern the system constraints and the optimization problem can be solved by quadratic programming.MATLAB tools for MPC is easy to use for process simulation.40Future workApply MPC to EtAc reactive distillation processDMCQDMCNMPCOptimization

Plant

LinearModel

u

e

r

y

d

+

+

-

DMC

-

Input

Dynamic System

Output

Time

0

0

Ts

2Ts

3Ts

Output

kTs

Past

Future

Target

Horizon

k

k+1

k+2

k+Hc-1

k+Hp