Main Content


Eliminates structurally disconnected states, delays, and blocks


Use sminreal to eliminate the states of a state-space model that do not affect the input-output response of the model.

In state-space models, sminreal eliminates all states and internal delay signals that are structurally disconnected from the inputs and outputs. The simplified model is structurally minimal, that is, generically minimal when randomizing the nonzero entries of state matrices.

In generalized models, sminreal further eliminates all tunable or uncertain blocks that are structurally disconnected from the inputs and outputs.

In gridded LTV and LPV models, sminreal eliminates states and internal delays that are structurally disconnected for all models in the grid. The remaining states and internal delay signals are the same for all models across the grid.

msys = sminreal(sys) eliminates the states of the state-space model sys that don't affect the input-output response and returns the simplified model msys. All of the states of the resulting state-space model msys are also states of sys and the input/output response of msys is equivalent to that of sys.

[msys,xkeep] = sminreal(sys) also returns a logical vector xkeep indicating the retained (1) and discarded (0) states.


[msys,xkeep] = sminreal(sys,"consistent") performs the state-consistent reduction for state-space arrays or gridded LTV or LPV models with uniform state dimension. This means that the syntax removes only those states and delays that do not contribute to the I/O map for all models in sys. xkeep is always a vector in this case.


collapse all

This example shows how to use sminreal perform a state-consistent state elimination in a state-space array.

Load the model.

load ssarray.mat
6x1 array of state-space models.
Each model has 1 outputs, 1 inputs, and 3 states.

Perform the state-elimination. With "consistent" option, the function removes only those states and delays that do not contribute to the I/O map for all models.

[rsys,xkeep] = sminreal(asys,"consistent");
6x1 array of state-space models.
Each model has 1 outputs, 1 inputs, and 1 states.
xkeep = 3×1 logical array


sminreal eliminates first and third states from all models in the array. For state-space arrays with uniform state dimension, sminreal eliminates states and delays that are structurally nonminimal for all models in the array, taking offsets into account.


Figure contains an axes object. The axes object contains 12 objects of type line. These objects represent asys, rsys.

As you can see, the responses are identical.

Input Arguments

collapse all

State-space model to simplify, specified as one of the following.

  • Continuous-time or discrete-time numeric state-space models, such as ss or dss models.

  • Generalized or uncertain state-space models, such as genss or uss (Robust Control Toolbox) models. (Using uncertain models requires Robust Control Toolbox™ software.)

    For such models, the state transformation is applied only to the state vectors of the numeric portion of the model. For more information about decomposition of these models, see getLFTModel and Internal Structure of Generalized Models.

  • Identified state-space idss (System Identification Toolbox) models. (Using identified models requires System Identification Toolbox™ software.)

  • Sparse state-state model, such as sparss or mechss.

  • Gridded linear parameter-varying or time-varying models created using ssInterpolant.

  • Array of ss models, such as the ones you obtain when batch linearizing Simulink® models or sampling lpvss and ltvss.

Output Arguments

collapse all

Simplified model, returned as a model of same type as sys.

Logical vector indicating retained or discarded states, returned as a vector with the same size as the number of states in sys. The entries of the vector indicate the 1 for retained and 0 for discarded at the index corresponding to the state.

xkeep is always a vector when you use "consistent" input argument.


The model resulting from sminreal(sys) is not necessarily minimal, and may have a higher order than one resulting from minreal(sys). However, sminreal(sys) retains a subset of the original states of sys, while, in general, minreal(sys) does not.

Alternative Functionality

Command Line


Live Editor Task

Reduce Model Order

Version History

Introduced before R2006a

expand all