Main Content

ssdata

Access state-space model data

Description

[a,b,c,d] = ssdata(sys) extracts the matrix (or multidimensional array) data A, B, C, D from the state-space model (LTI array) sys. If sys is a transfer function or zero-pole-gain model (LTI array), it is first converted to state space. See ss for more information on the format of state-space model data.

If sys appears in descriptor form (nonempty E matrix), an equivalent explicit form is first derived.

If sys has internal delays, A, B, C, D are obtained by first setting all internal delays to zero (creating a zero-order Padé approximation). For some systems, setting delays to zero creates singular algebraic loops, which result in either improper or ill-defined, zero-delay approximations. For these systems, ssdata cannot display the matrices and returns an error. This error does not imply a problem with the model sys itself.

For generalized state-space (genss) models, ssdata returns the state-space models evaluated at the current, nominal value of all control design blocks. To access the dependency of a genss model on its static control design blocks, use the A, B, C, and D properties of the model.

[a,b,c,d] = ssdata(sys, 'cell') extracts the state-space matrices of each model as separate cells in the cell arrays a, b, c, and d for arrays of state-space models with variable numbers of states.

[a,b,c,d,Ts] = ssdata(sys) also returns the sample time Ts.

Input Arguments

collapse all

State-space model, specified as an ss model object.

Output Arguments

collapse all

State matrix, returned as an Nx-by-Nx matrix where, Nx is the number of states.

Input-to-state matrix, returned as an Nx-by-Nu matrix where, Nx is the number of states and Nu is the number of inputs.

State-to-output matrix, returned as an Ny-by-Nx matrix where, Nx is the number of states and Ny is the number of outputs.

Feedthrough matrix, returned as an Ny-by-Nu matrix where, Ny is the number of outputs and Nu is the number of inputs.

Sample time, returned as a scalar.

Version History

Introduced before R2006a