({{, (RefLink[StateSpaceRealization, paclet:ref/StateSpaceRealization]) 
is an option to (RefLink[StateSpaceModel, paclet:ref/StateSpaceModel]) that specifies its canonical representation.}})

OpenersNotesSection(Spacer1)Details

The following settings can be used:

The controllable form is obtained by computing the controllable companion form of the subsystems corresponding to each input and combining the results.

For the proper transfer-function matrix (((Subscript[β, n])(s^n)+(Subscript[β, n-1])(s^(n-1))+⋯+(Subscript[β, 0]))/((s^n)+(Subscript[α, n-1])(s^(n-1))+⋯+(Subscript[α, 0]))), the controllable companion form is

x'(t)==(({{0, (Subscript[I, p]), 0, …, 0}, {0, 0, (Subscript[I, p]), …, 0}, {⋮, ⋮, ⋮,  , ⋮}, {0, 0, 0, …, (Subscript[I, p])}, {-(Subscript[α, 0])(Subscript[I, p]), -(Subscript[α, 1])(Subscript[I, p]), -(Subscript[α, 2])(Subscript[I, p]), ⋯, -(Subscript[α, n-1])(Subscript[I, p])}}))x(t)+(({{0}, {0}, {⋮}, {0}, {(Subscript[I, p])}})) .u(t)

y(t)==(({{(Subscript[β, 0])-(Subscript[α, 0])(Subscript[β, n]), ({{({{(Subscript[β, 1])-(Subscript[α, 1])(Subscript[β, n]), ⋯}}), (Subscript[β, n-1])-(Subscript[α, n-1])(Subscript[β, n])}})}})).x(t)+(Subscript[β, n]).u(t)

The identity matrix (Subscript[I, p]) has dimension p.

The observable form is obtained by computing the observable companion form of the subsystems corresponding to each output and combining the results.

For the proper transfer-function matrix (((Subscript[β, n])(s^n)+(Subscript[β, n-1])(s^(n-1))+⋯+(Subscript[β, 0]))/((s^n)+(Subscript[α, n-1])(s^(n-1))+⋯+(Subscript[α, 0]))), the observable companion form is

x'(t)==(({{0, 0, …, 0, -(Subscript[α, 0])(Subscript[I, q])}, {(Subscript[I, q]), 0, …, 0, -(Subscript[α, 1])(Subscript[I, q])}, {0, (Subscript[I, q]), ⋯, 0 , -(Subscript[α, 2])(Subscript[I, q])}, {⋮, ⋮, ⋮, ⋮, ⋮}, {0, 0, …, (Subscript[I, q]), -(Subscript[α, n-1])(Subscript[I, q])}})).x(t)+(({{(Subscript[β, 0])-(Subscript[α, 0])(Subscript[β, n])}, {(Subscript[β, 1])-(Subscript[α, 1])(Subscript[β, n])}, {(Subscript[β, 2])-(Subscript[α, 2])(Subscript[β, n])}, {⋮}, {(Subscript[β, n-1])-(Subscript[α, n-1])(Subscript[β, n])}})). u(t)

y(t)==(({{0, 0, ⋯, 0, (Subscript[I, q])}})).x(t)+(Subscript[β, n]).u(t)

The realizations are similar for discrete-time systems.

For the improper transfer-function (Subscript[γ, m]) (s^m)+⋯+(Subscript[γ, 1]) s+(((Subscript[β, n]) (s^n)+(Subscript[β, n-1]) (s^(n-1))+⋯+(Subscript[β, 0]))/((s^n)+(Subscript[α, n-1]) (s^(n-1))+⋯+(Subscript[α, 0]))), the polynomial part is realized using descriptor variables, and the proper rational part is realized using the specified form. »

(RefLink[StateSpaceModel, paclet:ref/StateSpaceModel])[tfm,StateSpaceRealization->(RefLink[Automatic, paclet:ref/Automatic])] gives the controllable realization of the transfer-function model tfm.

OpenersPrimaryExamplesSection(Spacer1)Examples  (7)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Controllable and observable realizations of a SISO system:

sys=(TransferFunctionModelFull[(((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]))), , , ]);

StateSpaceModel[sys,StateSpaceRealization->"Controllable"]

StateSpaceModel[sys,StateSpaceRealization->"Observable"]

OpenersExampleSection1(Spacer1)Scope  (2)

A multi-input, multi-output transfer-function model:

tfm=(TransferFunctionModelFull[((3+s)/(6+s)), (3/(6+s)), (1/(4+s)), ((1+s)/(4+s)), , , ]);

The controllable realization:

StateSpaceModel[tfm,StateSpaceRealization->"Controllable"]

The controllable companion realization:

StateSpaceModel[tfm,StateSpaceRealization->"ControllableCompanion"]

The observable realization:

StateSpaceModel[tfm,StateSpaceRealization->"Observable"]

The observable companion realization:

StateSpaceModel[tfm,StateSpaceRealization->"ObservableCompanion"]

Controllable and controllable companion realizations are controllable:

tfm=(TransferFunctionModelFull[(1/(2+s)), (1/(1+s)), (1/(2+s)), (1/(3+s)), , , ]);

StateSpaceModel[tfm,StateSpaceRealization->"Controllable"]

ControllableModelQ[%]

StateSpaceModel[tfm,StateSpaceRealization->"ControllableCompanion"]

ControllableModelQ[%]

Observable and observable companion realizations are observable:

StateSpaceModel[tfm,StateSpaceRealization->"Observable"]

ObservableModelQ[%]

StateSpaceModel[tfm,StateSpaceRealization->"ObservableCompanion"]

ObservableModelQ[%]

OpenersExampleSection3(Spacer1)Properties & Relations  (4)

A two-output transfer-function model:

tfm=(TransferFunctionModelFull[(((1+s) (2+s))/(-1+(s^2))), (1/(-1+s)), , , ]);

The controllable and controllable companion realizations are controllable:

{(Subscript[ssm, c]),(Subscript[ssm, cc])}={StateSpaceModel[tfm,StateSpaceRealization->"Controllable"],StateSpaceModel[tfm,StateSpaceRealization->"ControllableCompanion"]}

{ControllableModelQ[(Subscript[ssm, c])],ControllableModelQ[(Subscript[ssm, cc])]}

They are not necessarily observable:

{ObservableModelQ[(Subscript[ssm, c])],ObservableModelQ[(Subscript[ssm, cc])]}

The observable and observable companion realizations are observable:

{(Subscript[ssm, o]),(Subscript[ssm, oc])}={StateSpaceModel[tfm,StateSpaceRealization->"Observable"],StateSpaceModel[tfm,StateSpaceRealization->"ObservableCompanion"]}

{ObservableModelQ[(Subscript[ssm, o])],ObservableModelQ[(Subscript[ssm, oc])]}

They are not necessarily controllable:

{ControllableModelQ[(Subscript[ssm, o])],ControllableModelQ[(Subscript[ssm, oc])]}

The controllable and controllable companion realizations are identical for single-input systems:

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

StateSpaceModel[tfm,StateSpaceRealization->"Controllable"]==StateSpaceModel[tfm,StateSpaceRealization->"ControllableCompanion"]

The observable and observable companion forms are identical for single-output systems:

tfm=(TransferFunctionModelFull[((1+s)/(6+s)), (1/(2+s)), (3/(3+s)), , , ]);

StateSpaceModel[tfm,StateSpaceRealization->"Observable"]==StateSpaceModel[tfm,StateSpaceRealization->"ObservableCompanion"]

(RefLink[StateSpaceRealization, paclet:ref/StateSpaceRealization]) affects the proper part of an improper transfer function:

{poly,proper}={(Subscript[γ, 2])(s^2)+(Subscript[γ, 1])s+(Subscript[γ, 0]),(((Subscript[β, 1])s+(Subscript[β, 0]))/((s^2)+(Subscript[α, 1])s+(Subscript[α, 0])))};

tfm=TransferFunctionModel[poly+proper,s];

The first two states use the specified realization:

ssm1=StateSpaceModel[tfm,StateSpaceRealization->"Controllable"]

ssm2=StateSpaceModel[tfm,StateSpaceRealization->"Observable"]

Divide the state-space model into the slow and fast subsystems:

{(Subscript[ssm1, s]),(Subscript[ssm1, f])}={SystemsModelExtract[ssm1,All,All,{1,2}],
SystemsModelExtract[ssm1,All,All,{3,4,5}]}

The slow subsystem models the strictly proper part of the transfer function:

TransferFunctionModel[(Subscript[ssm1, s]),s]

The fast subsystem models the polynomial part:

TransferFunctionModel[(Subscript[ssm1, f]),s]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[JordanModelDecomposition, paclet:ref/JordanModelDecomposition])  ▪  (RefLink[ControllableDecomposition, paclet:ref/ControllableDecomposition])  ▪  (RefLink[ObservableDecomposition, paclet:ref/ObservableDecomposition])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Basic Systems Modeling, paclet:guide/Modeling])}})}})