Model Predictive Control Toolbox    
mod2ss

Extracts the standard discrete-time state-space matrices and other information from a model stored in the MPC mod format.

Syntax

Description

Consider the process shown in the above block diagram. mod2ss assumes that mod is a description of the above process in the MPC mod format (see mod in the online MATLAB Function Reference for more details). An equivalent state-space representation is:

where x is a vector of n state variables, u represents the nu manipulated variables, d represents nd measured but freely-varying inputs (i.e., measured disturbances), w represents nw unmeasured disturbances, y is a vector of ny plant outputs, z is measurement noise, and , u, etc., are constant matrices of appropriate size. The variable (k) represents the plant output before the addition of measurement noise. Define:

           = [u d w]

    D = [Du Dd Dw]

mod2ss extracts the , , C, and D matrices from the input variable, mod. It also extracts the vector minfo, which contains additional information about the sampling period, number of each type of input and output, etc. see mod in the online MATLAB Function Reference for more details on minfo.

Examples

   1.
See the example in the description of dlqe2.
   2.
Suppose you have a plant with the structure

where the inputs and outputs are all scalars, and you have constructed mod1 and mod2 using the commands:

Now you want to calculate the response to a step change in d2, which is the fourth input to the composite system, pmod. One way to do it is:

The results of the mod2ss call are:

And the step response is:

See Also
mod, ss2mod



mod2mod mod2step, step format