State-space model
Use ss
to create real-valued or complex-valued state-space
models, or to convert dynamic system models to
state-space model form. You can also use ss
to create generalized
state-space (genss
) models or uncertain state-space
(uss
(Robust Control Toolbox)) models.
A state-space model is a mathematical representation of a physical system as a set of
input, output, and state variables related by first-order differential equations. The state
variables define the values of the output variables. The ss
model object
can represent SISO or MIMO state-space models in continuous time or discrete time.
In continuous-time, a state-space model is of the following form:
Here, x
, u
and y
represent the states, inputs and outputs respectively, while A
,
B
, C
and D
are the state-space
matrices. The ss
object represents a state-space model in MATLAB® storing A
, B
, C
and
D
along with other information such as sample time, names and delays
specific to the inputs and outputs.
You can create a state-space model object by either specifying the state, input and output
matrices directly, or by converting a model of another type (such as a transfer function model
tf
) to state-space form. For more information, see State-Space Models. You
can use an ss
model object to:
Perform linear analysis
Represent a linear time-invariant (LTI) model to perform control design
Combine with other LTI models to represent a more complex system
creates a continuous-time state-space model object of the following form:sys
= ss(A
,B
,C
,D
)
For instance, consider a plant with Nx
states,
Ny
outputs, and Nu
inputs. The state-space
matrices are:
A
is an Nx
-by-Nx
real-
or complex-valued matrix.
B
is an Nx
-by-Nu
real-
or complex-valued matrix.
C
is an Ny
-by-Nx
real-
or complex-valued matrix.
D
is an Ny
-by-Nu
real-
or complex-valued matrix.
converts to sys
= ss(ltiSys
,component
)ss
object form the measured component, the noise
component or both of specified component
of an identified linear
time-invariant (LTI) model ltiSys
. Use this syntax only when
ltiSys
is an identified (LTI) model such as an idtf
(System Identification Toolbox), idss
(System Identification Toolbox), idproc
(System Identification Toolbox), idpoly
(System Identification Toolbox) or idgrey
(System Identification Toolbox) object.
returns the minimal state-space realization with no uncontrollable or unobservable
states. This realization is equivalent to sys
= ss(ssSys
,'minimal')minreal(ss(sys))
where
matrix A
has the smallest possible dimension.
Conversion to state-space form is not uniquely defined in the SISO case. It is also not guaranteed to produce a minimal realization in the MIMO case. For more information, see Recommended Working Representation.
returns an explicit state-space realization (E = I) of the dynamic
system state-space model sys
= ss(ssSys
,'explicit')ssSys
. ss
returns an
error if ssSys
is improper. For more information on explicit
state-space realization, see State-Space Models.
The following lists contain a representative subset of the functions you can use with
ss
model objects. In general, any function applicable to Dynamic System Models is
applicable to an ss
object.