Anda di halaman 1dari 4

MATLAB Tools for MPC

Unconstrained MPC (DMC)

Kmpc = mpccon(model,ywt,uwt,M,P)
model : Step response coefficient matrix of model. ywt,uwt : output and input weighting matrices. M : control horizons. P : prediction horizon. Kmpc : Controller gain matrix

Calculate MPC controller gains for unconstrained case. Inputs:

Output:

model = tfd2step(tfinal,delt,nout,g1,...,g25)
tfinal: truncation time for step response model. delt: sampling interval for step response model. nout: number of outputs, ny. g1, g2,...: SISO transfer function ordered to be read in columnwise (by input). The number of transfer functions required is ny*nu. (nu=number of inputs). Limited to ny*nu <= 25. plant: step response coefficient matrix in MPC step format.
46

Model Predictive Control

Determines the step response model of a transfer function model. Inputs:

Output:

g = poly2tfd(num,den,delt,delay)

Create transfer functions for MPC toolbox Inputs:

g: transfer function.

num : Coefficients of the transfer function numerator. den : Coefficients of the transfer function denominator. delt : Sampling time. Can be 0 (for continuous-time system) or > 0 (for discrete-time system). delay : Pure time delay (dead time). Can be >= 0.

Output:

Model Predictive Control

47

Unconstrained MPC (DMC)

[yp,u,ym] = mpcsim(plant,model,Kmpc,tend,r,usat,... tfilter,dplant,dmodel,dstep)

Simulation of the unconstrained Model Predictive Controller. REQUIRED INPUTS:


plant(model): the step response coefficient matrix of the plant (model) generated by the function tfd2step. Kmpc: the constant matrix computed by the function mpccon. tend: final time of simulation. r: reference trajectory (set-point).

Model Predictive Control

OPTIONAL INPUTS:

usat: the matrix of manipulated variable constraints.It is a vector of the lower limits (Ulow), upper limits (Uhigh) and rate of change limits (DelU) on the manipulated variables. tfilter: time constants for noise filter and unmeasured disturbance lags. dplant: step response coefficient matrix for the disturbance generated by the function tfd2step. dmodel: step response coefficient matrix for the measured disturbance effect on the model output generated by the function tfd2step. dstep: matrix of disturbances to the plant.

OUTPUT:
48

y (system response), u (manipulated variable) and ym (model response)

Constrained MPC (QDMC)


tfilter,dplant,dmodel,dstep)

[yp,u,ym] = cmpc(plant,model,ywt,uwt,M,P,tend,r,ulim,ylim...

Simulation of the constrained Model Predictive Controller.

REQUIRED INPUTS:

plant, model, ywt, uwt, M, P, tend, r

OPTIONAL INPUTS:

Model Predictive Control

ulim: matrix of manipulated variable constraints. It is a trajectory of lower limits (Ulow), upper limits (Uhigh) and rate of change (DelU). ylim: matrix of output variable constraints. It is a trajectory of lower (Ylow) and upper limits (Yhigh) on the output variables. tfilter, dplant, dmodel, dstep

OUTPUT:

y (system response), u (manipulated variable) and ym (model response)

49

Anda mungkin juga menyukai