Discrete State Space

Purpose

Model discrete linear time-invariant system as state-space model

Library

Control / Discrete

Description

../../_images/discretestatespace.svg

The Discrete State Space block models a discrete state-space system of the form

\[\begin{split}\mathbf{x}_{i+1}&=\mathbf{Ax}_i+\mathbf{Bu}_i\\ \mathbf{y}_i&=\mathbf{Cx}_i+\mathbf{Du}_i\end{split}\]

where \(\mathbf{x}_i\) is the state vector at sample time step \(i\), \(\mathbf{u}\) is the input vector, and \(\mathbf{y}\) is the output vector. The widths of the input and output signals are determined by the number of columns of the \(\mathbf{B}\) matrix and the number of rows of the \(\mathbf{C}\) matrix, respectively.

For a single-input system (i.e. if the \(\mathbf{B}\) matrix has only one column), the State Space block performs scalar expansion: If the input signal is a vector, the state-space model is applied to each element of the input vector individually, and the output signal is a concatenated vector of all system outputs.

Parameters

A, B, C, D

The coefficient matrices for the discrete state-space system are shown in Fig. 161. The dimensions for the coefficient matrices must conform to the dimensions shown in the diagram below:

../../_images/state_space.svg

Fig. 161 Coefficient matrices for a discrete state-space system

where \(n\) is the number of states, \(m\) is the width of the input signal and \(p\) is the width of the output signal.

If the matrix \(\mathbf{D}\) is empty, it is internally expanded to a zero matrix of the size \(p\times m\).

Sample time

A scalar specifying the sampling period or a two-element vector specifying the sampling period and offset, in seconds \((\mathrm{s})\). See also the Discrete-Periodic sample time type in section Sample Times.

Initial condition

A vector of initial values for the state vector, \(\mathbf{x} = [x_0, x_1\ldots x_n]\).

Note

A scalar initial condition will be applied to all internal states.

Note

In case of scalar expansion (the system is a single-input system with multiple input signals), the initial condition can also be a matrix, where each row defines the initial condition for the individual inputs.

Probe Signals

Input

The input vector, \(\mathbf{u}\).

Output

The output vector, \(\mathbf{y}\).

State

The state vector, \(\mathbf{x}\).