State-space models rely on linear differential equations or difference equations to describe system dynamics. Control System Toolbox™ software supports SISO or MIMO state-space models in continuous or discrete time. State-space models can include time delays. You can represent state-space models in either explicit or descriptor (implicit) form.
State-space models can result from:
Linearizing a set of ordinary differential equations that represent a physical model of the system.
State-space model identification using System Identification Toolbox™ software.
State-space realization of transfer functions. (See Conversion Between Model Types for more information.)
ss model objects to represent
Explicit continuous-time state-space models have the following form:
A discrete-time explicit state-space model takes the following form:
where the vectors x[n], u[n], and y[n] are the state, input, and output vectors for the nth sample.
Use the commands described in the following table to create state-space models.
This example shows how to create a continuous-time single-input, single-output
(SISO) state-space model from state-space matrices using
Create a model of an electric motor where the state-space equations are:
where the state variables are the angular position θ and angular velocity dθ/dt:
u is the electric current, the output y is the angular velocity, and the state-space matrices are:
To create this model, enter:
A = [0 1;-5 -2]; B = [0;3]; C = [0 1]; D = 0; sys = ss(A,B,C,D);
sys is an
ss model object, which is a data
container for representing state-space models.
To represent a system of the form:
dss. This command creates a
ss model with a nonempty
also called a descriptor state-space model. See MIMO Descriptor State-Space Models for an