({{, (RefLink[MinimalStateSpaceModel, paclet:ref/MinimalStateSpaceModel])[sys] 
gives the minimal state-space model of the state-space model sys.}, {, (RefLink[MinimalStateSpaceModel, paclet:ref/MinimalStateSpaceModel])[sys,{(Subscript[z, 1]),…}]
specifies the new coordinates (Subscript[z, i]).}})

OpenersNotesSection(Spacer1)Details and Options

The minimal state-space model is both controllable and observable, and has the minimal number of states.

The system sys can be a standard or descriptor (RefLink[StateSpaceModel, paclet:ref/StateSpaceModel]) or (RefLink[AffineStateSpaceModel, paclet:ref/AffineStateSpaceModel]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (13)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Compute a minimal realization:

MinimalStateSpaceModel[(StateSpaceModelFull[(Subscript[a, 1]), 0, 0, (Subscript[b, 1]), 0, (Subscript[a, 2]), 0, (Subscript[b, 2]), 0, 0, (Subscript[a, 3]), 0, (Subscript[c, 1]), 0, (Subscript[c, 3]), 0, , , ])]

OpenersExampleSection1(Spacer1)Scope  (6)

Obtain a model with the minimal number of states:

MinimalStateSpaceModel[(StateSpaceModelFull[(1/2), (3/2), -1, -(5/2), -(7/2), 3, (1/2), (1/2), 0, , , ])]

A minimal realization of a symbolic model:

MinimalStateSpaceModel[(StateSpaceModelFull[0, 1, 0, 0, 0, 0, 1, 0, 0, -(Subscript[p, 2]) (Subscript[p, 3]), -(Subscript[p, 2])-(Subscript[p, 3]), 1, 0, (Subscript[z, 2]), 1, 0, , , ])]

A minimal realization does not contain uncontrollable modes:

MinimalStateSpaceModel[(StateSpaceModelFull[-1, 0, 0, 1, 0, -2, 0, 0, 0, 0, -3, 1, 1, 1, 1, 0, , , ])]

A minimal realization does not contain unobservable modes:

MinimalStateSpaceModel[(StateSpaceModelFull[-1, 0, 0, 1, 0, -2, 0, 1, 0, 0, -3, 1, 1, 0, 1, 0, , , ])]

The minimal realization of a descriptor system:

MinimalStateSpaceModel[(StateSpaceModelFull[0, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, -5, 1, 1, -14, 97, -512, 0, , , ])]

The minimal realization of an affine system:

asys=(AffineStateSpaceModelFull[-((Subscript[x, 1])/(1+(Subscript[x, 3]))), -(((Subscript[x, 1]) (Subscript[x, 3])+(Subscript[x, 2]) (1+(Subscript[x, 3])))/(1+(Subscript[x, 3]))), -(Subscript[x, 3]), (1/(1+(Subscript[x, 3]))), -1-(1/(1+(Subscript[x, 3]))), 0, (Subscript[x, 3])+(Subscript[x, 1]) (1+(Subscript[x, 3])), 0, (Subscript[x, 1]), (Subscript[x, 2]), (Subscript[x, 3]), \[Null], \[Null], AutomaticAutomatic, ]);

MinimalStateSpaceModel[asys]

Specify the new variable:

MinimalStateSpaceModel[asys,{(Subscript[z, 1])}]

OpenersExampleSection3(Spacer1)Applications  (2)

Remove any uncontrollable or unobservable modes:

MinimalStateSpaceModel[(StateSpaceModelFull[-1, 0, 0, 0, 1, 0, -2, 0, 0, 0, 0, 0, -3, 0, 1, 0, 0, 0, -4, 2, 1, 1, 0, 1, 0, , , ])]

A parallel mass-spring-damper system is not completely controllable and observable. Design a controller based on the minimal system:

A model of the system:

pars={m->1,g->9.8,k->64,c->4};

ssm = (StateSpaceModelFull[0, 1, 0, 0, 0, -(k/m), -(c/m), 0, 0, (1/(2 m)), 0, 0, 0, 1, 0, 0, 0, -(k/m), -(c/m), (1/(2 m)), (1/2), 0, (1/2), 0, 0, , F, y, (Subscript[x, 1]), (Subscript[(OverDot[x]), 1]), (Subscript[x, 2]), (Subscript[(OverDot[x]), 2]), , ]);

Compute the minimal model:

(Subscript[ssm, m])=MinimalStateSpaceModel[ssm]

Design a controller based on the minimal system:

κ=StateFeedbackGains[(Subscript[ssm, m]),{-4-2 I,-4+2 I}];
ℓ=EstimatorGains[(Subscript[ssm, m]),{-6,-8}];

𝒸=EstimatorRegulator[(Subscript[ssm, m]),{ℓ,κ}]//Simplify

The closed-loop system:

csys=SystemsModelFeedbackConnect[ssm,𝒸]/.pars

Simulate the response of the closed-loop system and compare it with the open-loop system:

orc=OutputResponse[{csys,{0.1,0,-0.3,0,0,0}},0,{t,0,10}];
or=OutputResponse[{ssm/.pars,{0.1,0,-0.3,0}},0,{t,0,10}];

Plot[{or,orc},{t,0,4},PlotRange->All,PlotLegends->{"Open-loop response","Closed-loop response"}]

OpenersExampleSection4(Spacer1)Properties & Relations  (4)

(RefLink[MinimalStateSpaceModel, paclet:ref/MinimalStateSpaceModel]) computes the subspace that is both controllable and observable:

ssm=(StateSpaceModelFull[(Subscript[a, 1]), 0, 0, 0, 0, 0, (Subscript[a, 2]), 0, (Subscript[b, 1]), 0, 0, 0, (Subscript[a, 3]), 0, (Subscript[b, 2]), (Subscript[c, 1]), 0, 0, (Subscript[d, 11]), (Subscript[d, 12]), 0, 0, (Subscript[c, 3]), (Subscript[d, 21]), (Subscript[d, 22]), , , ]);

{MinimalStateSpaceModel[ssm],Last[ObservableDecomposition[Last[ControllableDecomposition[ssm]]]]}

A minimal realization is both controllable and observable:

msys=MinimalStateSpaceModel[(StateSpaceModelFull[1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, , , ])];

{ControllableModelQ[msys],ObservableModelQ[msys]}

Minimal realizations are not unique:

ssm=(StateSpaceModelFull[-1, 0, 1, 0, 0, -1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, , , ]);

{(Subscript[ssm, m1])=MinimalStateSpaceModel[ssm],(Subscript[ssm, m2])=StateSpaceTransform[(Subscript[ssm, m1]),{{((-1)/2)}}]}

Both are minimal realizations of the same transfer function:

Table[Simplify[TransferFunctionModel[ss]],{ss,{(Subscript[ssm, m1]),(Subscript[ssm, m2])}}]

(RefLink[MinimalStateSpaceModel, paclet:ref/MinimalStateSpaceModel]) is equivalent to (RefLink[TransferFunctionCancel, paclet:ref/TransferFunctionCancel]) for scalar systems:

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

{TransferFunctionModel@MinimalStateSpaceModel@StateSpaceModel@tfm,TransferFunctionExpand@TransferFunctionCancel@tfm}

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

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Analysis of State-Space Models, paclet:guide/AnalysisOfStateSpaceModels])}, {▪(RefLinkPlain[Nonlinear Control Systems, paclet:guide/NonlinearControlSystems])}})}})