StateSpaceModel

StateSpaceModel[{a,b,c,d}]

represents the standard state-space model with state matrix a, input matrix b, output matrix c, and transmission matrix d.

StateSpaceModel[{a,b,c,d,e}]

represents a descriptor state-space model with descriptor matrix e.

StateSpaceModel[sys]

gives a state-space model corresponding to the systems model sys.

StateSpaceModel[eqns,{{x1,x10},},{{u1,u10},},{g1,},τ]

gives the state-space model obtained by Taylor linearization about the point (xi0,ui0) of the differential or difference equations eqns with outputs gi and independent variable τ.

Details and Options

  • StateSpaceModel can represent scalar and multivariate systems in continuous or discrete time.
  • Time delays can be represented in any state-space model, by using SystemsModelDelay in any of the matrices.
  • A continuous-time system modeled by the equations with states , control inputs , and outputs can be specified as StateSpaceModel[{a,b,c,d}].
  • A discrete-time system modeled by the equations with states , control inputs , outputs , and sampling period τ can be specified as StateSpaceModel[{a,b,c,d},SamplingPeriod->τ].
  • Continuous-time and discrete-time descriptor state-space systems can be specified as follows:
  • StateSpaceModel[{a,b,c,d,e}]
    StateSpaceModel[{a,b,c,d,e},SamplingPeriod->τ]
  • For a system with n states, p inputs, and q outputs, the matrices a, b, c, d and e should have dimensions {n,n}, {n,p}, {q,n}, {q,p}, and {n,n}.
  • The following short inputs can be used:
  • StateSpaceModel[{a,b,c}]
    StateSpaceModel[{a,b}]
    StateSpaceModel[{a,b,c,Automatic,e}]e.x'(t)=a.x(t)+b.u(t), y(t)=c.x(t)
    StateSpaceModel[{a,b,Automatic,Automatic,e}]e.x'(t)=a.x(t)+b.u(t), y(t)=x(t)
  • In StateSpaceModel[sys] the following systems can be converted:
  • AffineStateSpaceModelapproximate Taylor conversion
    NonlinearStateSpaceModelapproximate Taylor conversion
    TransferFunctionModelexact conversion
  • When converting from transfer-function model sys, the controllable realization is used.
  • For equational input, default linearization points xi0 and uj0 are taken to be zero.
  • The following options can be given:
  • SamplingPeriodAutomaticthe sampling period
    StateSpaceRealizationAutomaticthe canonical realization
    DescriptorStateSpaceAutomaticstandard or descriptor realization
    SystemsModelLabelsAutomaticthe labels for the input, output, and state variables

Examples

open allclose all

Basic Examples  (5)

A state-space model of an integrator:

A secondorder single-input, single-output system:

The state-space model of a transfer-function object:

The state-space model of a system with sampling period τ:

The state-space model of a set of ODEs:

Scope  (31)

Basic Uses  (17)

A second-order system:

A fourth-order system:

A system with two inputs:

A system with two outputs:

Direct feedthrough is assumed to be zero:

Specify feedthrough:

The feedthrough is the sum of the inputs:

A discrete-time model:

A symbolic model:

The state-space model of a transfer function:

Perform symbolic conversions:

Taylor linearize an AffineStateSpaceModel:

The linearization of an AffineStateSpaceModel with nonzero equilibrium values:

Taylor linearize a NonlinearStateSpaceModel:

Linearize a nonlinear state-space model:

The linear state-space model of an ODE:

An ODE with a derivative control term:

Use Normal to obtain the matrices:

Descriptor Systems  (8)

A descriptor system:

A singular descriptor system:

Use Automatic to create a descriptor system with default outputs:

Systems can include both differential and algebraic equations:

The resulting model:

The model with the equations intact:

They are identical after pole-zero cancellations.

A discrete-time descriptor system from difference equations:

A zero descriptor matrix gives an algebraic system:

For descriptor systems, Normal returns all five matrices:

Invert the descriptor matrix to create a standard state-space model:

Time-Delay Systems  (5)

An output-delay system:

A system with two input delays:

A discrete-time system with a delay in the state matrix:

Create a time delay system directly from delay-differential equations:

Delays in the differential terms create neutral time-delay systems:

Generalizations & Extensions  (2)

If the transmission matrix is not specified, the model is assumed to have zero feedthrough:

If the outputs are not specified, they are assumed to be the states:

Options  (8)

SamplingPeriod  (4)

A continuous-time model:

A discrete-time model with sampling period 2:

SamplingPeriod is None for continuous-time systems:

A symbolic sampling period:

Specify a numerical value:

StateSpaceRealization  (3)

The controllable companion form:

The observable companion form:

The Jordan form:

The realizations of a discrete-time model:

SystemsModelLabels  (1)

Label the inputs, outputs, and states:

Applications  (7)

Chemical Systems  (1)

Equations governing the concentration in a two-stage chemical reactor with constant flow rate:

A state-space model for the reactor:

Control the inputs with unity feedback:

Substitute numeric values and simulate the response to a disturbance:

Electrical Systems  (2)

A series resistance-inductance-capacitance (RLC) circuit:

The same RLC circuit modeled as a descriptor state space:

Both models are equivalent:

A circuit with two loops modeled with Kirchhoff's laws:

The state-space model with the algebraic constraints:

A standard state-space representation:

Mechanical Systems  (4)

Linearize an inverted pendulum model:

State-space model of a typical mechanical mass-spring-damper system:

A two-stage mass-spring-damper system with delayed feedback:

The cutting force required in a lathe depends on the cutting depth from the previous rotation:

Properties & Relations  (14)

The state-space representation of a system is not unique:

Similar state-space models have identical transfer functions:

The controllable and observable companion forms are duals of each other:

Compute their dual representations:

The eigenvalues of the state matrix are invariant:

The state matrix satisfies its characteristic equation (CayleyHamilton theorem):

A controllable system:

An uncontrollable system:

A controllable system with non-distinct eigenvalues:

An uncontrollable system with non-distinct eigenvalues:

An observable system:

An unobservable system:

An observable system with non-distinct eigenvalues:

An unobservable system with non-distinct eigenvalues:

Obtain the transfer function representation:

The state-space model of an improper transfer function is singular:

Introduced in 2010
 (8.0)
 |
Updated in 2012
 (9.0)
2014
 (10.0)