Model Predictive Control Toolbox    
mod2step, step format

Uses a model in the mod format to calculate the step response of a SISO or MIMO system in MPC step format.

Syntax

[plant,dplant] = mod2step(mod,tfinal,delt2,nout)

Description
The input variable mod is assumed to be a model in the mod format (see mod in the online MATLAB Function Reference for a description). You would normally create it using ss2mod, tfd2mod, or th2mod. The input variable tfinal is the time at which you would like to end the step response.

The optional input variable delt2 is the desired sampling period for the step response. If you use delt2=[ ] or omit it, the default is equal to the sampling period of mod (contained in the minfo vector of mod).

The optional input variable nout is the output stability indicator. For stable systems, set nout equal to the number of outputs, ny. For systems with one or more integrating outputs, nout is a column vector of length ny with nout(i)=0 indicating an integrating output and nout(i)=1 indicating a stable output. If you use nout=[ ] or omit it, the default is nout=ny (only stable outputs).

plant and dplant are matrices in MPC step format containing the calculated step responses. plant is the response to the manipulated variables, and dplant is the response to the disturbances (if any), both measured and unmeasured. The overall dimensions of these matrices are:

plant n-by-ny + ny + 2 rows, nu columns.

dplant n-by-ny + ny + 2 rows, nd + nw columns.

where n = round (tfinal/delt2)

It is assumed that stable step responses are nearly constant after n sampling periods, while integrating responses increase with a constant slope after n - 1 sampling periods.

Each column gives the step response with respect to the corresponding input variable. Within each column, the first ny elements are the response for each output at time t = T, the next ny elements give each output at time t = 2T, etc.

The last ny + 2 rows contain nout, ny and delt2, respectively (all in column 1 -- any remaining elements in these rows are set to zero). In other words, for plant the arrangement is as follows:

where

Skji is the ith step response coefficient describing the effect of input j on output k.

The arrangement of dplant is similar; the only difference is in the number of columns.

Example
The following process has 3 inputs and 4 outputs:

We first calculate its step response for 4 samples (including the initial condition) with respect to each of the inputs using the Control Toolbox function, dstep:

The results are:


Response to u1
Response to u2
Response to u3
Time
y1
y2
y3
y4
y1
y2
y3
y4
y1
y2
y3
y4
0
1
0
0
0
0
0
0
0
0
0
0
0
T
2
0
0
0
0
0
1
1
0
1
1
0
2T
2.3
0
0
0
0
0
1.7
1.7
0
0.3
0.3
0
3T
2.39
0
0
0
0
0
2.19
2.19
0
0.79
0.79
0

We then use mod2step to do the same job:

obtaining the results:

See Also
plotstep, ss2step, tfd2step



mod2ss mpcaugss