• 검색 결과가 없습니다.

nlcmpc

문서에서 Model Predictive Control Toolbox (페이지 162-167)

nlcmpc

4-71 ryuwt

Equals [r ywt uwt].ris a setpoint matrix consisting of N rows and ny columns, where nyis the number of output variables, y:

Where ri(k) is the setpoint for output i at time t = kT, and T is the sampling period (as specified in the step format of model). If the simulation time is larger than NT, the setpoints vary for the first N periods in the simulation, as specified byr, and are then held constant at the values given in the last row of rfor the remainder of the simulation. In many simulations one wants the setpoints to be constant for the entire time, in which caserneed only contain a single row of nyvalues.

ywt

Must have nycolumns, where nyis the number of outputs. All weights must be

≥0.

You may vary the weights at each step in the prediction horizon by including up toProws inywt. Then the first row of nyvalues applies to the tracking errors in the first step in the prediction horizon, the next row applies to the next step, etc. Seempcconfor details on the form of the optimization objective function.

If you supply only nrow rows, where 1nrow <P,nlcmpcwill use the last row to fill in any remaining steps. Thus if you wish the weighting to be the same for allPsteps, you need only specify a single row.

uwt

Has the same format asywt, except thatuwtapplies to the changes in the manipulated variables. Ifuwt¦[ ], it must have nucolumns, where nuis the number of manipulated variables.

Notice that the number of rows forr,ywt, anduwtshould be the same. If not, one can enter the variable asparpart(r, ywt, uwt). The functionparpart

r

r1( )1 r2( )1 … rn

y( )1 r1( )2 r2( )2 … rn

y( )2

r1( )N r2( )Nrn

y( )N

= … … …

nlcmpc

1-72

appends extra rows tor,ywt, and/oruwt so that they have the same number of rows. The default isr=y0, where y0 is the initial condition for the output, equal (unity) weighting of all outputs over the entire prediction horizon and zero weighting of all input.

mp

Equals[M P]. Pequals the last element ofMP. There are two ways to specifyM: If it is a scalar,nlcmpcinterprets it as the input horizon (number of moves) as in DMC; if it is a row vector containing nbelements, each element of the vector indicates number of the steps over which∆u(k) = 0 during the optimization and nlcmpcinterprets it as a set of nbblocking factors. There may be 1≤nb≤P blocking factors, and their sum must be≤P. If you setM=[ ], the default is M = P, which is equivalent toM=ones(1,P). Pis the number of sampling periods in the prediction horizon.

yulim

Equals [ylim ulim].ulimis a matrix giving the limits on the manipulated variables. Its format is as follows:

, ,

, ,

, ,

, ( ) , ( )

, ,

, ,

, ,

, ( ) , ( )

ulim

umin 1, ( )1 … umin n

, u( )1 umin 1, ( )2 … umin n

, u( )2

um in 1, ( )Numin n

, u( )N

=

∆um ax 1, ( )1 … ∆um ax n

, u( )1

∆um ax 1, ( )2 … ∆um ax n

, u( )2

∆umax 1, ( )N … ∆umax n

, u( )N um ax 1, ( )1 … um ax n

, u( )1 um ax 1, ( )2 … um ax n

, u( )2

um ax 1, ( )Numax n

, u( )N

… ……… ……

nlcmpc

4-73 Note that it contains three matrices of N rows. In this case, the limits on N are 1≤Nnb, where nbis the number of times the manipulated variables are to change over the input horizon. If you supply fewer than nbrows, the last row is repeated automatically.

The first matrix specifies the lower bounds on the numanipulated variables.

For example, umin,j(2) is the lower bound for manipulated variable j for the second move of the manipulated variables (where the first move is at the start of the prediction horizon). If umin,j(k) = –inf, manipulated variable j will have no lower bound for that move.

The second matrix gives the upper bounds on the manipulated variables. If umax,j(k) = inf, manipulated variable j will have no upper bound for that move.

The lower and upper bounds may be either positive or negative (or zero) as long as umin,j(k)umax,j(k).

The third matrix gives the limits on the rate of change of the manipulated variables. In other words,cmpcwill force|uj(k) – uj(k – 1)|≤ ∆umax,j(k). The limits on the rate of change must be nonnegative and finite. If you want it to be unbounded, set the bound to a large number (but not too large — a value of 106 should work well in most cases).

ylim has the same format asulim, but for the lower and upper bounds of the outputs. The first row applies to the first point in the prediction horizon.

Note that the number of rows forylimandulimshould be the same. If the number of rows forylimandulimdiffers, one can useparpart(ylim, ulim). The functionparpartappends extra rows toylimorulimso that they have the same number of rows. If you setyulim = [ ], then umin= –inf, umax= inf,∆umax

= 106, ymin= –inf and ymax= inf.

tfilter

Is a matrix of time constants for the noise filter and the unmeasured

disturbances entering at the plant output. The first row of nyelements gives the noise filter time constants and the second row of nyelements gives the time constants of the lags through which the unmeasured disturbance steps pass. If tfilteronly contains one row, the unmeasured disturbances are assumed to be steps. If you settfilter= [ ], no noise filtering and steplike unmeasured disturbances are assumed.

nlcmpc

1-74

ud0

Equals[u0 d0]. u0are initial values of the manipulated variables arranged in a row vector having nuelements; nuis the number of the manipulated variables computed bynlcmpc.d0are initial values of the measured disturbances arranged in a row vector having ndelements; ndis the number of the measured disturbances. The default isu0 = 0andd0 = 0.

Notes • Initial conditions for the manipulated variables that are calculated by nlcmpcare specified throughnlcmpcwhile initial conditions for the controlled variables are specified through the S-function for the nonlinear plant.

• You may use a different number of rows in the matricesr,ulimandylim, should that be appropriate for your simulation.

• Theulimconstraints used here are fundamentally different from theusat constraints used in thenlmpcsimblock. Theulimconstraints are defined relative to the beginning of the prediction horizon, which moves as the simulation progresses. Thus at each sampling period, k, theulimconstraints apply to a block of calculated moves that begin at sampling period k and extend for the duration of the input horizon. Theusatconstraints, on the other hand, are relative to the fixed point t = 0, the start of the simulation.

• For unconstrained problems,nlcmpcandnlmpcsimshould give the same results. The latter will be faster because it uses an analytical solution of the QP problem, whereasnlcmpcsolves it by iteration.

Example See the examples fornlmpcsimwith one modification: replace the block nlmpcsimwithnlcmpc. Clearly, additional variables should be defined appropriately.

See Also cmpc,nlmpcsim

문서에서 Model Predictive Control Toolbox (페이지 162-167)

관련 문서