Main Content

State-Space Models

State-space models with free, canonical, and structured parameterizations; equivalent ARMAX and output-error (OE) models

State-space models are models that use state variables to describe a system by a set of first-order differential or difference equations, rather than by one or more nth-order differential or difference equations. If the set of first-order differential equation is linear in the state and input variables, the model is referred to as a linear state space model.

Note

Generally, the System Identification Toolbox™ documentation refers to linear state space models simply as state-space models. You can also identify nonlinear state space models using grey-box and neural state-space objects. For more information, see Available Nonlinear Models.

The linear state-space model structure is a good choice for quick estimation because it requires you to specify only one parameter, the model order n. The model order is an integer equal to the dimension of x(t) and relates to, but is not necessarily equal to, the number of delayed inputs and outputs used in the corresponding linear difference equation. State variables x(t) can be reconstructed from the measured input/output data, but are not themselves measured during an experiment.

Defining a parameterized state-space model in continuous time is often easier than in discrete time because physical laws are most often described in terms of differential equations. In continuous time, the linear state-space description has the following form:

x˙(t)=Fx(t)+Gu(t)+K˜w(t)y(t)=Hx(t)+Du(t)+w(t)x(0)=x0

The matrices F, G, H, and D contain elements with physical significance—for example, material constants. K contains the disturbance matrix. x0 specifies the initial states.

You can estimate a continuous-time state-space model using both time-domain and frequency-domain data.

The discrete-time linear state-space model structure is often written in the innovations form, which describes noise:

x(kT+T)=Ax(kT)+Bu(kT)+Ke(kT)y(kT)=Cx(kT)+Du(kT)+e(kT)x(0)=x0

Here, T is the sample time, u(kT) is the input at the time instant kT, and y(kT) is the output at the time instant kT.

You cannot estimate a discrete-time state-space model using continuous-time frequency-domain data.

For more information, see What Are State-Space Models?

Apps

System IdentificationIdentify models of dynamic systems from measured data

Live Editor Tasks

Estimate State-Space ModelEstimate state-space model using time or frequency data in the Live Editor (Since R2019b)

Functions

expand all

idssState-space model with identifiable parameters
ssestEstimate state-space model using time-domain or frequency-domain data
ssregestEstimate state-space model by reduction of regularized ARX model
n4sidEstimate state-space model using subspace method with time-domain or frequency-domain data
eraEstimate state-space model from impulse response data using Eigensystem Realization Algorithm (ERA) (Since R2022b)
pemPrediction error minimization for refining linear and nonlinear models
delayestEstimate time delay (dead time) from data
findstatesEstimate initial states of model
ssformQuick configuration of state-space model structure
initSet or randomize initial parameter values
idparCreate parameter for initial states and input level estimation
idssdataState-space data for identified system
getpvecObtain model parameters and associated uncertainty data
setpvecModify values of model parameters
getparObtain attributes such as values and bounds of linear model parameters
setparSet attributes such as values and bounds of linear model parameters
ssestOptionsOption set for ssest
ssregestOptionsOption set for ssregest
n4sidOptionsOption set for n4sid
findstatesOptionsOption set for findstates

Topics

State-Space Model Basics

  • What Are State-Space Models?
    State-space models are models that use state variables to describe a system by a set of first-order differential or difference equations, rather than by one or more nth-order differential or difference equations.
  • State-Space Model Estimation Methods
    Choose between noniterative subspace methods, iterative methods that use prediction error minimization algorithm, and noniterative methods.
  • Estimate State-Space Model With Order Selection
    Select a model order for a state-space model structure in the app and at the command line.
  • State-Space Realizations
    A state-space model can be expressed in an infinite number of realizations. Common forms, sometimes called canonical forms, include modal, companion, observable, and controllable forms.
  • Data Supported by State-Space Models
    You can use time-domain and frequency-domain data that is real or complex and has single or multiple outputs.

Estimate State-Space Models

Structured Estimation, Innovations Form

Set State-Space model Options