({{, (RefLink[StateSpaceModel, paclet:ref/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.}, {, (RefLink[StateSpaceModel, paclet:ref/StateSpaceModel])[{a,b,c,d,e}]
represents a descriptor state-space model with descriptor matrix e.}, {, (RefLink[StateSpaceModel, paclet:ref/StateSpaceModel])[sys] 
gives a state-space model corresponding to the systems model sys.}, {, (RefLink[StateSpaceModel, paclet:ref/StateSpaceModel])[eqns,{{(Subscript[x, 1]),(Subscript[x, 10])},…},{{(Subscript[u, 1]),(Subscript[u, 10])},…},{(Subscript[g, 1]),…},τ]
gives the state-space model obtained by Taylor linearization about the point ((Subscript[(Subscript[x, i]), 0]),(Subscript[(Subscript[u, i]), 0])) of the differential or difference equations eqns with outputs (Subscript[g, i]) and independent variable τ.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[StateSpaceModel, paclet:ref/StateSpaceModel]) can represent scalar and multivariate systems in continuous or discrete time.

Time delays can be represented in any state-space model, by using (RefLink[SystemsModelDelay, paclet:ref/SystemsModelDelay]) in any of the matrices.

A continuous-time system modeled by the equations x'(t)==a.x(t)+b.u(t), y(t)==c.x(t)+d.u(t) with states x∈(ℝ^n), control inputs u∈(ℝ^p), and outputs y∈(ℝ^q) can be specified as (RefLink[StateSpaceModel, paclet:ref/StateSpaceModel])[{a,b,c,d}].

A discrete-time system modeled by the equations x(k+1)==a.x(k)+b.u(k), y(k)==c.x(k)+d.u(k) with states x∈(ℝ^n), control inputs u∈(ℝ^p), outputs y∈(ℝ^q), and sampling period τ can be specified as (RefLink[StateSpaceModel, paclet:ref/StateSpaceModel])[{a,b,c,d},(RefLink[SamplingPeriod, paclet:ref/SamplingPeriod])->τ].

Continuous-time and discrete-time descriptor state-space systems can be specified as follows:

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:

In (RefLink[StateSpaceModel, paclet:ref/StateSpaceModel])[sys] the following systems can be converted:

When converting from transfer-function model sys, the controllable realization is used.

For equational input, default linearization points (Subscript[x, (Subscript[i, 0])]) and (Subscript[u, (Subscript[j, 0])]) are taken to be zero.

The following options can be given:

OpenersPrimaryExamplesSection(Spacer1)Examples  (67)

OpenersExampleSection0(Spacer1)Basic Examples  (5)

A state-space model of an integrator:

StateSpaceModel[{{{0}},{{1}},{{1}}}]

A second-order single-input, single-output system:

StateSpaceModel[{{{(Subscript[a, 1]),(Subscript[a, 2])},{(Subscript[a, 3]),(Subscript[a, 4])}},{{(Subscript[b, 1])},{(Subscript[b, 2])}},{{(Subscript[c, 1]),(Subscript[c, 2])}}}]

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

StateSpaceModel[(TransferFunctionModelFull[(1/(-a+s)), (1/(-b+s)), , , ])]

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

StateSpaceModel[{DiagonalMatrix[{(Subscript[a, 1]),(Subscript[a, 2]),(Subscript[a, 3])}],Table[1,{3},{1}], Table[1,{1},{3}]},SamplingPeriod->τ]

The state-space model of a set of ODEs:

StateSpaceModel[{m (Subscript[ϕ, 1])''[t]-m (Ω^2)(Subscript[ϕ, 1])[t]+((Subscript[ϕ, 1])[t]-(Subscript[ϕ, 2])[t])k/2==0,m (Subscript[ϕ, 2])''[t]-m (Ω^2)(Subscript[ϕ, 2])[t]-((Subscript[ϕ, 1])[t]-(Subscript[ϕ, 2])[t])k/2==u[t]},{{(Subscript[ϕ, 1])'[t],0},{(Subscript[ϕ, 1])[t],0},{(Subscript[ϕ, 2])[t],0},{(Subscript[ϕ, 2])'[t],0}},{{u[t],0}},{(Subscript[ϕ, 2])[t]},t]

OpenersExampleSection1(Spacer1)Scope  (31)

OpenersExampleSubsection0(Spacer1)Basic Uses  (17)

A second-order system:

StateSpaceModel[{{{-1,0},{0,-2}},{{1},{2}},{{1,1}},{{1}}}]

A fourth-order system:

StateSpaceModel[{{{-1,0,1,3},{0,-2,1,2},{-1,0,1,0},{0,0,1,-1}}, {{1},{-1},{0},{0}},{{1,0,0,1}},{{0}}}]

A system with two inputs:

StateSpaceModel[{{{1,-1,0},{-1,4,1},{-2,2,1}}, {{-1, 0.2},{-1, 1},{0, 2}}, {{1, -1, 0}}}]

A system with two outputs:

StateSpaceModel[{{{-1,2,2,0},{-1,-2,-1,-1},{-2,0,2,-2},{2,1,0,-1}}, {{1},{2},{0},{-1}},{{1,-1,0,0},{0,0,1,-1}},{{0},{0}}}]

Direct feedthrough is assumed to be zero:

StateSpaceModel[{{{-1,2},{1,-4}},{{1},{1}},{{1,1}}}]

Specify feedthrough:

StateSpaceModel[{{{-1,1},{2,-1}},{{1},{1}},{{1,1}},{{f}}}]

The feedthrough is the sum of the inputs:

StateSpaceModel[{{{1,0},{-2,-1}},{{-2,1,-1},{1,-1,-1}},{{-1,0}},{{1,1,1}}}]

A discrete-time model:

StateSpaceModel[{{{0,1,0,0},{-0.1,-0.001,0.1,0.001},{0,0,0,1}, {0.05,0.005,-0.5,-0.005}},{{0},{0},{0},{1}},{{1,0,0,0 }}}, SamplingPeriod->0.1]

A symbolic model:

StateSpaceModel[{{{0,1},{-k/m,-c/m}},{{c/m},{k/m-(((c/m))^2)}},{{1,0}}}]

The state-space model of a transfer function:

StateSpaceModel[TransferFunctionModel[{{(1/s),(1/((s+1)(s+3)))}},s]]

Perform symbolic conversions:

StateSpaceModel[TransferFunctionModel[ (1/(a (s^2)+b s+c)),s]]

Taylor linearize an (RefLink[AffineStateSpaceModel, paclet:ref/AffineStateSpaceModel]):

StateSpaceModel[(AffineStateSpaceModelFull[(Subscript[x, 1])+(Subscript[x, 2]^2), -(Subscript[x, 1]) (Subscript[x, 2]), 1, (Subscript[x, 1]), (Subscript[x, 1]), 0, (Subscript[x, 1]), (Subscript[x, 2]), \[Null], \[Null], {u}Automatic, ])]

The linearization of an (RefLink[AffineStateSpaceModel, paclet:ref/AffineStateSpaceModel]) with nonzero equilibrium values:

StateSpaceModel[(AffineStateSpaceModelFull[(Subscript[x, 1])+2 (Subscript[x, 2])+(Subscript[x, 2]^2), 1-(Subscript[x, 1])+(Subscript[x, 2])-(Subscript[x, 1]) (Subscript[x, 2]), 1, (Subscript[x, 1]), -1+(Subscript[x, 1]), 0, {(Subscript[x, 1]),1}, {(Subscript[x, 2]),-1}, \[Null], \[Null], {u}Automatic, ])]

Taylor linearize a (RefLink[NonlinearStateSpaceModel, paclet:ref/NonlinearStateSpaceModel]):

StateSpaceModel[(NonlinearStateSpaceModelFull[-1+u x, -1+x, {x,1}, \[Null], \[Null], {{u,1}}Automatic, ])]

Linearize a nonlinear state-space model:

StateSpaceModel[{{x2-(x3^2),x3+2 (x1^2)x3+2 x3 u,(x1^2)+u,-x1-(x1^2)x2},{x1+u}},{{x1,0},{x2,0},{x3,0},{x4,0}},{{u,0}}]

The linear state-space model of an ODE:

StateSpaceModel[{(Subscript[a, 3]) x'''[t]+(Subscript[a, 2]) x''[t]+(Subscript[a, 1]) x'[t]+(Subscript[a, 0]) x[t]==f[t]},{{x[t],0},{x'[t],0},{x''[t],0}},{{f[t],0}},{x[t]},t]

An ODE with a derivative control term:

StateSpaceModel[{(Subscript[K, 3]) ϕ'''[t]+(Subscript[K, 2])ϕ''[t]+(Subscript[K, 1]) ϕ'[t]+(Subscript[K, 0])ϕ[t]==(Subscript[K, a]) δ'[t]+(Subscript[K, b]) δ[t]},{{ϕ[t],0},{ϕ'[t],0},{ϕ''[t],0}},{{δ[t],0}},{ϕ[t]},t]

Use (RefLink[Normal, paclet:ref/Normal]) to obtain the matrices:

{aa,bb,cc,dd}=Normal[StateSpaceModel[{Array[a,{2,2}],Array[b,{2,1}],Array[c,{1,2}],Array[d,{1,1}]}]]

OpenersExampleSubsection1(Spacer1)Descriptor Systems  (8)

A descriptor system:

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

A singular descriptor system:

StateSpaceModel[{{{-3,1},{0,1}},{{0},{1}},{{1,0}},{{0}},{{1,1},{0,0}}}]

Use (RefLink[Automatic, paclet:ref/Automatic]) to create a descriptor system with default outputs:

StateSpaceModel[{{{1,0},{-2,-1}},{{1},{0}},Automatic,Automatic,{{1,-.5},{0,1}}}]

Systems can include both differential and algebraic equations:

dynamics=(Subscript[x, 1])'[t]==-3(Subscript[x, 1])[t]+(Subscript[x, 2])[t]+u[t];
constraint=(Subscript[x, 2])[t]+(Subscript[x, 1])[t]==0;

The resulting model has a singular descriptor matrix:

StateSpaceModel[{dynamics,constraint},{(Subscript[x, 1])[t],(Subscript[x, 2])[t]},{u[t]},(Subscript[x, 1])[t],t]

A discrete-time descriptor system from difference equations:

StateSpaceModel[{x[k+1]==.5x[k],y[k]==-x[k]+u[k]},{x[k],y[k]},{u[k]},{x[k]},k]

A zero descriptor matrix gives an algebraic system:

StateSpaceModel[{{{-3}},{{1}},{{2}},{{1/2}},{{0}}}]

For descriptor systems, (RefLink[Normal, paclet:ref/Normal]) returns all five matrices:

MatrixForm/@Normal[(StateSpaceModel[(Subscript[e, 1]), (Subscript[e, 2]), (Subscript[a, 1]), (Subscript[a, 2]), (Subscript[b, 1]), (Subscript[e, 3]), (Subscript[e, 4]), (Subscript[a, 3]), (Subscript[a, 4]), (Subscript[b, 2]), (Subscript[c, 1]), (Subscript[c, 2]), (Subscript[d, 1]), ])]

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

StateSpaceModel[(StateSpaceModel[(Subscript[e, 1]), 0, (Subscript[a, 1]), 0, (Subscript[b, 1]), 0, (Subscript[e, 2]), 0, (Subscript[a, 2]), (Subscript[b, 2]), (Subscript[c, 1]), (Subscript[c, 2]), d, ]), DescriptorStateSpace->False]

OpenersExampleSubsection2(Spacer1)Time-Delay Systems  (5)

An output-delay system:

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

A system with two input delays:

StateSpaceModel[{{{0, 1}, {-1, -(1/2)}}, {{SystemsModelDelay[1]/2}, {2*SystemsModelDelay[2]}}, {{1, 0}}, 
   {{0}}}, SamplingPeriod -> None, SystemsModelLabels -> None]

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

StateSpaceModel[{{{(Subscript[a\[SystemsModelDelay], δ])}},{{b}},{{c}}},SamplingPeriod->T]

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

StateSpaceModel[{x'[t]==-x[t-3]+u[t]},{x[t]},{u[t]},{x[t]},t]

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

eqs={(Subscript[x, 1])'[t]==-.5(Subscript[x, 1])[t]+(Subscript[x, 2])[t],(Subscript[x, 2])'[t]==-.2(Subscript[x, 1])'[t-2]-3(Subscript[x, 2])[t]+u[t]};

StateSpaceModel[eqs,{(Subscript[x, 1])[t],(Subscript[x, 2])[t]},{u[t]},(Subscript[x, 1])[t],t]

OpenersExampleSection2(Spacer1)Generalizations & Extensions  (2)

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

Normal[StateSpaceModel[{{{(Subscript[a, 1]),(Subscript[a, 2])},{(Subscript[a, 3]),(Subscript[a, 4])}},{{(Subscript[b, 1])},{(Subscript[b, 2])}},{{(Subscript[c, 1]),(Subscript[c, 2])}}}]]//Last

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

Normal[StateSpaceModel[{{{(Subscript[a, 1]),(Subscript[a, 2])},{(Subscript[a, 3]),(Subscript[a, 4])}},{{(Subscript[b, 1])},{(Subscript[b, 2])}}}]][[3;;4]]

OpenersExampleSection3(Spacer1)Options  (8)

OpenersExampleSubsection3(Spacer1)SamplingPeriod  (4)

A continuous-time model:

StateSpaceModel[{{{0,1},{-0.01,-1}},{{1},{-1}},{{1,0}}}]

A discrete-time model with sampling period 2:

StateSpaceModel[{{{1,-1},{-0.1,-1}},{{0},{1}},{{1,1}}},SamplingPeriod->2]

(RefLink[SamplingPeriod, paclet:ref/SamplingPeriod]) is (RefLink[None, paclet:ref/None]) for continuous-time systems:

StateSpaceModel[{{{0,1},{-0.01,-1}},{{1}, {-1}},{{1, 0}}},SamplingPeriod->None]

A symbolic sampling period:

ss=StateSpaceModel[{{{1,0.5},{-0.5,0.5}},{{1},{0}},{{1,0}}},SamplingPeriod->T]

Specify a numerical value:

ss/.T->0.2

OpenersExampleSubsection4(Spacer1)StateSpaceRealization  (3)

The controllable companion form:

tf=(TransferFunctionModelFull[(1/(4+3 s+2 (s^2)+(s^3))), , , ]);

ssc=StateSpaceModel[tf]

The observable companion form:

sso=StateSpaceModel[tf,StateSpaceRealization->"ObservableCompanion"]

The Jordan form:

Last[JordanModelDecomposition[ssc]]//N//Chop

The realizations of a discrete-time model:

tf=(TransferFunctionModelFull[((b3+b2 z+b1 (z^2)+b0 (z^3))/(a3+a2 z+a1 (z^2)+(z^3))), T, , ]);

ssc=StateSpaceModel[tf]

sso=StateSpaceModel[tf,StateSpaceRealization->"ObservableCompanion"]

Last[JordanModelDecomposition[sso/.{b0->1,b1->2,b2->3,b3->4,a1->-1,a2->-2,a3->-3}]]//N//Chop

OpenersExampleSubsection6(Spacer1)SystemsModelLabels  (1)

Label the inputs, outputs, and states:

StateSpaceModel[{{{0,0,1},{0,-1.4,1},{0,-10,-0.1}},{{0,0},{-0.707,-0.2},{3,-1}},{{1,0,0},{0,0,1},{1,-1,0}}},SystemsModelLabels->{{"(Subscript[δ, c])","(Subscript[δ, f])"},{"θ","(Overscript[θ, •])","γ"},{"θ","α","(Overscript[θ, •])"}}]

OpenersExampleSection4(Spacer1)Applications  (7)

OpenersExampleSubsection7(Spacer1)Chemical Systems  (1)

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

stage1=(Subscript[v, 1]) (Subscript[c, 1])'[t] == (Subscript[q, 1]) (Subscript[c, f1])[t]+r (Subscript[c, 2])[t-α]+(Subscript[q, d])(Subscript[c, d])[t] - ((Subscript[q, 1])+r+(Subscript[q, d]))(Subscript[c, 1])[t]-(Subscript[v, 1])(Subscript[k, 1])(Subscript[c, 1])[t];
stage2=(Subscript[v, 2 ])(Subscript[c, 2])'[t]== ((Subscript[q, 1])+r+(Subscript[q, d])-(Subscript[q, p1]))(Subscript[c, 1])[t] +(Subscript[q, 2])(Subscript[c, f2])[t]-((Subscript[q, p2])+r)(Subscript[c, 2])[t] - (Subscript[v, 2])(Subscript[k, 2])(Subscript[c, 2])[t];

A state-space model for the reactor:

reactor=StateSpaceModel[{stage1, stage2},{(Subscript[c, 1])[t],(Subscript[c, 2])[t]},{(Subscript[c, f1])[t],(Subscript[c, f2])[t],(Subscript[c, d])[t]},{(Subscript[c, 1])[t-(Subscript[τ, 1])],(Subscript[c, 2])[t-(Subscript[τ, 2])]},t]

Control the inputs with unity feedback:

closedloop=SystemsModelFeedbackConnect[reactor,{{1,1},{2,2}}]

Substitute numeric values and simulate the response to a disturbance:

closedloop=closedloop/.{α->1, (Subscript[τ, 1])->3, (Subscript[τ, 2])->2, (Subscript[v, 1])->1, (Subscript[v, 2])->1,(Subscript[q, 1])->.4, (Subscript[q, d])->.6, (Subscript[q, 2])->.5, r->.5, (Subscript[k, 1])->.5, (Subscript[k, 2])->.5, (Subscript[q, p1])->1,(Subscript[q, p2])->1};
response=OutputResponse[{closedloop,{1,0}},{0,0,0},{t,0,12}];

Plot[response,{t,0,12}, PlotRange->All]

OpenersExampleSubsection8(Spacer1)Electrical Systems  (2)

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

eqns={L q''[t]+R q'[t]+(1/C) q[t]==V[t]};

m1=StateSpaceModel[eqns,{{q[t],0},{q'[t],0}},{{V[t],0}},{q'[t]},t]

The same RLC circuit modeled as a descriptor state space:

eqns={L i'[t]==(Subscript[v, l])[t],(Subscript[v, c])'[t]==1/C i[t],R i[t]==(Subscript[v, r])[t],
(Subscript[v, l])[t]+(Subscript[v, c])[t]+(Subscript[v, r])[t]==(Subscript[v, s])[t]};

m2=StateSpaceModel[eqns,{i[t],(Subscript[v, l])[t],(Subscript[v, c])[t],(Subscript[v, r])[t]},{(Subscript[v, s])[t]},{i[t]},t]

Both models are equivalent:

TransferFunctionModel[m1][s]

TransferFunctionModel[m2][s]

Simplify[%%-%]

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

components={L (Subscript[i, 2])'[t]==(Subscript[v, l])[t],(Subscript[v, c1])'[t]==(((Subscript[i, 1])[t])/(Subscript[C, 1])),(Subscript[v, c2])'[t]==(((Subscript[i, 2])[t])/(Subscript[C, 2]))};kirchhoff={R ((Subscript[i, 1])[t]+(Subscript[i, 2])[t])==(Subscript[v, r])[t],(Subscript[v, c1])[t]+(Subscript[v, r])[t]==(Subscript[v, s])[t],(Subscript[v, c1])[t]==(Subscript[v, l])[t]+(Subscript[v, c2])[t]};

The resulting state-space model includes the algebraic constraints:

StateSpaceModel[Join[components,kirchhoff],{ (Subscript[v, c1])[t], (Subscript[v, c2])[t], (Subscript[i, 2])[t],(Subscript[i, 1])[t],(Subscript[v, r])[t], (Subscript[v, l])[t]}, (Subscript[v, s])[t], (Subscript[v, c2])[t],t]

OpenersExampleSubsection9(Spacer1)Mechanical Systems  (4)

Linearize an inverted pendulum model:

StateSpaceModel[{(M+m)x''[t]-m l Sin[θ[t]] ((θ'[t])^2)+m l Cos[θ[t]] θ''[t]==F[t], m x''[t] Cos[θ[t]]+m l θ''[t]==m g Sin[θ[t]]},{{θ[t],0},{θ'[t],0},{x[t],0},{x'[t],0}},{{F[t],0}},{θ[t],x[t]},t]

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

StateSpaceModel[{M x''[t]+C x'[t]+K x[t]==F[t]},{{x[t],0},{x'[t],0}},{{F[t],0}},{x[t]},t]

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

eqns={m2 x2''[t]+b2 (x2'[t]- x1'[t])+k2(x2[t]-x1[t])-g x1[t-τ]==0,m1 x1''[t]+(b1+b2)x1'[t]-b2 x2'[t]+(k1+k2)x1[t] - k2 x2[t]+g x1[t-τ]==0};

StateSpaceModel[eqns,{x2[t],x2'[t],x1[t],x1'[t]},{u[t]},{x2[t],x1[t]},t]

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

StateSpaceModel[k x[t]+c x'[t]+m x''[t]==-α (f[t]+x[t]-x[t-τ]),{x[t],x'[t]},{f[t]},x[t],t]

OpenersExampleSection5(Spacer1)Properties & Relations  (14)

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

{ssm= StateSpaceModel[{{{-2.7121,3.9238},{-4.2371,1.9429}},{{-2.3857},{4.4438}},{{1,1}}}],
ssmt=StateSpaceTransform[ssm,{{-0.842,2.6891},{-4.6641,3.3886}}]}

Similar state-space models have identical transfer functions:

TransferFunctionModel/@ {ssm,ssmt}

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

tfm=(TransferFunctionModelFull[(((s^3) (Subscript[b, 0])+(s^2) (Subscript[b, 1])+s (Subscript[b, 2])+(Subscript[b, 3]))/((s^3)+(s^2) (Subscript[a, 1])+s (Subscript[a, 2])+(Subscript[a, 3]))), , , ]);

{ssc,sso}=Table[StateSpaceModel[tfm,StateSpaceRealization->form],{form,{"ControllableCompanion","ObservableCompanion"}}]

Compute their dual representations:

Table[Refine[DualSystemsModel[model],{(Subscript[b, _]),(Subscript[a, _])}∈Reals],{model,{ssc,sso}}]

The eigenvalues of the state matrix are invariant:

{ssm= StateSpaceModel[{{{3.5483,-4.1308},{3.1786,2.8758}},{{4.5882},{2.8867}},{{-1.192,-2.7873}}}],
ssmt=StateSpaceTransform[ssm,{{2.3878,-3.243},{-3.9273,-3.4311}}]}

Map[Composition[Eigenvalues,First,Normal],{ssm,ssmt}]

The state matrix satisfies its characteristic equation (Cayley–Hamilton theorem):

ssm=StateSpaceModel[{Array[a,{3,3}],Array[b,{3,1}],Array[c,{1,3}],{{d[1,1]}}}]

(A=Composition[First,Normal][ssm])//MatrixForm

CoefficientList[CharacteristicPolynomial[A,s],s].Table[MatrixPower[A,n],{n,0,3}]//Simplify

A controllable system:

StateSpaceModel[{DiagonalMatrix[{(Subscript[λ, 1]),(Subscript[λ, 2]),(Subscript[λ, 3])}],{{(Subscript[b, 1])},{(Subscript[b, 2])},{(Subscript[b, 3])}}}]
ControllableModelQ[%]

An uncontrollable system:

StateSpaceModel[{DiagonalMatrix[{(Subscript[λ, 1]),(Subscript[λ, 2]),(Subscript[λ, 3])}],{{(Subscript[b, 1])},{(Subscript[b, 2])},{0}}}]
ControllableModelQ[%]

A controllable system with non-distinct eigenvalues:

StateSpaceModel[{{{(Subscript[λ, 1]),1,0},{0,(Subscript[λ, 1]),0},{0,0,(Subscript[λ, 3])}},{{0},{(Subscript[b, 2])},{(Subscript[b, 3])}}}]
ControllableModelQ[%]

An uncontrollable system with non-distinct eigenvalues:

StateSpaceModel[{{{(Subscript[λ, 1]),1,0},{0,(Subscript[λ, 1]),0},{0,0,(Subscript[λ, 3])}},{{(Subscript[b, 1])},{0},{(Subscript[b, 3])}}}]
ControllableModelQ[%]

An observable system:

StateSpaceModel[{DiagonalMatrix[{(Subscript[λ, 1]),(Subscript[λ, 2]),(Subscript[λ, 3])}],{{(Subscript[b, 1])},{(Subscript[b, 2])},{(Subscript[b, 3])}},{{(Subscript[c, 1]),(Subscript[c, 2]),(Subscript[c, 3])}}}]
ObservableModelQ[%]

An unobservable system:

StateSpaceModel[{DiagonalMatrix[{(Subscript[λ, 1]),(Subscript[λ, 2]),(Subscript[λ, 3])}],{{(Subscript[b, 1])},{(Subscript[b, 2])},{(Subscript[b, 3])}},{{(Subscript[c, 1]),(Subscript[c, 2]),0}}}]
ObservableModelQ[%]

An observable system with non-distinct eigenvalues:

StateSpaceModel[{{{(Subscript[λ, 1]),1,0},{0,(Subscript[λ, 1]),0},{0,0,(Subscript[λ, 3])}},{{(Subscript[b, 1])},{(Subscript[b, 2])},{(Subscript[b, 3])}},{{(Subscript[c, 1]),0,(Subscript[c, 3])}}}]
ObservableModelQ[%]

An unobservable system with non-distinct eigenvalues:

StateSpaceModel[{{{(Subscript[λ, 1]),1,0},{0,(Subscript[λ, 1]),0},{0,0,(Subscript[λ, 3])}},{{(Subscript[b, 1])},{(Subscript[b, 2])},{(Subscript[b, 3])}},{{0,(Subscript[c, 2]),(Subscript[c, 3])}}}]
ObservableModelQ[%]

Obtain the transfer function representation:

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

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

StateSpaceModel[(TransferFunctionModelFull[(((-2+s) (((4+s))^2))/(1+s)), , , ])]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[TransferFunctionModel, paclet:ref/TransferFunctionModel])  ▪  (RefLink[ToContinuousTimeModel, paclet:ref/ToContinuousTimeModel])  ▪  (RefLink[ToDiscreteTimeModel, paclet:ref/ToDiscreteTimeModel])  ▪  (RefLink[AffineStateSpaceModel, paclet:ref/AffineStateSpaceModel])  ▪  (RefLink[NonlinearStateSpaceModel, paclet:ref/NonlinearStateSpaceModel])  ▪  (RefLink[CreateSystemModel, paclet:ref/CreateSystemModel])  ▪  (RefLink[SystemModelLinearize, paclet:ref/SystemModelLinearize])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Nonlinear Control Systems, paclet:guide/NonlinearControlSystems])}, {▪(RefLinkPlain[Delay Control Systems, paclet:guide/DelayControlSystems])}, {▪(RefLinkPlain[Basic Systems Modeling, paclet:guide/Modeling])}, {▪(RefLinkPlain[Control Systems, paclet:guide/ControlSystems])}, {▪(RefLinkPlain[Descriptor Control Systems, paclet:guide/DescriptorControlSystems])}, {▪(RefLinkPlain[Time Series Processes, paclet:guide/TimeSeriesProcesses])}, {▪(RefLinkPlain[Systems Modeling, paclet:guide/SystemsModeling])}, {▪(RefLinkPlain[System Model Analytics & Design, paclet:guide/SystemModelAnalyticsDesign])}})}})