StateSpaceTransform[sys,{p,q}]
transforms the state-space model sys using the matrices p and q.
StateSpaceTransform[sys,{{x1p1[z],…},{z1q1[x],…}}]
transforms using the variable transformations {x1p1[z],…} and {z1q1[x],…}.
StateSpaceTransform
StateSpaceTransform[sys,{p,q}]
transforms the state-space model sys using the matrices p and q.
StateSpaceTransform[sys,{{x1p1[z],…},{z1q1[x],…}}]
transforms using the variable transformations {x1p1[z],…} and {z1q1[x],…}.
Details and Options
- StateSpaceTransform returns a transformed model where the state variables have been transformed. The transformation can be a similarity, equivalence, or restricted equivalence transformation.
- The system sys can be a standard or descriptor StateSpaceModel, AffineStateSpaceModel, or NonlinearStateSpaceModel.
- For a standard StateSpaceModel[{a,b,c,d}], the original and transformed systems are related by the transformation
and the corresponding equations are given by: -




- Typically p and q are inverses, in which case the transformation is a similarity transformation. The following defaults for p and q are used for standard StateSpaceModel transformations:
-
p or {p,Automatic} {p,Inverse[p]} {Automatic,q} {Inverse[q],q} - For a descriptor StateSpaceModel[{a,b,c,d,e}], the original and transformed systems related by the transformation
and the corresponding equations are given by: -




- Typically p and q are invertible matrices but not inverses, in which case the transformation is an equivalence transformation. The following defaults are used for descriptor StateSpaceModel transformations:
-
p or {p,Automatic} {p,IdentityMatrix[n]} {Automatic,q} {IdentityMatrix[n],q} - For an AffineStateSpaceModel[{a,b,c,d},x] and NonlinearStateSpaceModel[{f,g},x,u] with j the Jacobian matrix D[p[z],{z}], the original and transformed systems are related by the transformation
, and the corresponding equations are given by: -




- Typically p[z] and q[x] are inverses, in which case the transformation is an invertible mapping.
-
{{x1->p1[z],…},{z1,…}} q[x] is computed if needed {Automatic,{z1->q[x],…}} p[z] is computed - When variable transformation matrices {p,q} are given, the resulting system is of the same type as the input. In the case of nonlinear state-space models, these are taken to represent the transformation rules {{x1->p〚1〛.z,…},{z1->q〚1〛.x,…}}.
- When variable transformation rules {{x1->p1[z],…},…} are given, the resulting system is always AffineStateSpaceModel or NonlinearStateSpaceModel.
- StateSpaceTransform accepts the option DescriptorStateSpace.
Examples
open all close allBasic Examples (1)
{ssm, p} = {StateSpaceModel[{{{0.5195, 0.2959}, {0.3081, 0.9136}}, {{0.0987}, {-1}}, {{1, 0}}, {{0}}},
SamplingPeriod -> None, SystemsModelLabels -> None], p = (| | |
| --- | -- |
| 0.5 | 0 |
| 1 | -1 |)};StateSpaceTransform[ssm, p]StateSpaceTransform[ssm, {p, Inverse[p]}]Scope (15)
Linear Transformations (10)
The similarity transformation
:
StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}}},
SamplingPeriod -> None, SystemsModelLabels -> None], {{p}}]StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}}},
SamplingPeriod -> None, SystemsModelLabels -> None], {{{p}}, {{(1/p)}}}]Specify the transformation as
:
StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}}},
SamplingPeriod -> None, SystemsModelLabels -> None], {Automatic, {{(1/p)}}}]The similarity transform
for a descriptor system:
StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}},
{{e}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {{{p}}, {{(1/p)}}}]The equivalence transform
for a descriptor system:
StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}},
{{e}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {{p}}]The corresponding matrix pair specification:
StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}},
{{e}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {{{p}}, {{1}}}]Obtain an equivalent descriptor system with the state equations premultiplied by a matrix q:
StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}},
{{e}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {Automatic, {{q}}}]The new states are essentially the old states, i.e.
:
StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}},
{{e}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {{{1}}, {{q}}}]For a descriptor system, the transformation with an invertible p and q gives an equivalent system:
StateSpaceTransform[StateSpaceModel[{{{Subscript[a, 11], Subscript[a, 12]},
{Subscript[a, 21], Subscript[a, 22]}},
{{Subscript[b, 11]}, {Subscript[b, 21]}},
{{Subscript[c, 11], Subscript[c, 12]}},
{{Subscript[d, 11]}}, {{Subscript[e, 11],
Subscript[e, 12]}, {Subscript[e, 21],
Subscript[e, 22]}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {(| | |
| --- | --- |
| p11 | p12 |
| p21 | p22 |), (| | |
| --- | --- |
| q11 | q12 |
| q21 | q22 |)}]StateSpaceTransform[%, Inverse /@ {(| | |
| --- | --- |
| p11 | p12 |
| p21 | p22 |), (| | |
| --- | --- |
| q11 | q12 |
| q21 | q22 |)}]A noninvertible p or q gives a system with restricted equivalence:
StateSpaceTransform[StateSpaceModel[{{{Subscript[a, 11], Subscript[a, 12]},
{Subscript[a, 21], Subscript[a, 22]}},
{{Subscript[b, 11]}, {Subscript[b, 21]}},
{{Subscript[c, 11], Subscript[c, 12]}},
{{Subscript[d, 11]}}, {{Subscript[e, 11],
Subscript[e, 12]}, {Subscript[e, 21],
Subscript[e, 22]}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {(| | |
| --- | --- |
| p11 | p12 |
| 0 | 0 |), (| | |
| --- | - |
| q11 | 0 |
| q21 | 0 |)}]Linear discrete-time systems behave just like continuous-time systems under matrix transformations:
StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}}},
SamplingPeriod -> τ, SystemsModelLabels -> None], {{p}}]Transform an AffineStateSpaceModel according to
:
StateSpaceTransform[AffineStateSpaceModel[{{a[x]}, {{b[x]}},
{c[x]}, {{d[x]}}}, {x},
Automatic, {Automatic}, Automatic, SamplingPeriod -> None], {{p}}]Specify the transformation in terms of the new variable z:
StateSpaceTransform[AffineStateSpaceModel[{{a[x]}, {{b[x]}},
{c[x]}, {{d[x]}}}, {x},
Automatic, {Automatic}, Automatic, SamplingPeriod -> None], {{x -> p z}, {z}}]Specify the transformation as
:
StateSpaceTransform[AffineStateSpaceModel[{{a[x]}, {{b[x]}},
{c[x]}, {{d[x]}}}, {x},
Automatic, {Automatic}, Automatic, SamplingPeriod -> None], {Automatic, {{(1/p)}}}]StateSpaceTransform[AffineStateSpaceModel[{{a[x]}, {{b[x]}},
{c[x]}, {{d[x]}}}, {x},
Automatic, {Automatic}, Automatic, SamplingPeriod -> None], {{x}, {z -> (1/p)x}}]Specify the transformation and its inverse:
StateSpaceTransform[AffineStateSpaceModel[{{a[x]}, {{b[x]}},
{c[x]}, {{d[x]}}}, {x},
Automatic, {Automatic}, Automatic, SamplingPeriod -> None], {{{p}}, {{(1/p)}}}]StateSpaceTransform[AffineStateSpaceModel[{{a[x]}, {{b[x]}},
{c[x]}, {{d[x]}}}, {x},
Automatic, {Automatic}, Automatic, SamplingPeriod -> None], {{x -> p z}, {z -> (1/p)x}}]Transform a NonlinearStateSpaceModel according to
:
StateSpaceTransform[NonlinearStateSpaceModel[{{f[x, u]},
{g[x, u]}}, {x}, {u},
{Automatic}, Automatic, SamplingPeriod -> None], {{p}}]In terms of the new variable z:
StateSpaceTransform[NonlinearStateSpaceModel[{{f[x, u]},
{g[x, u]}}, {x}, {u},
{Automatic}, Automatic, SamplingPeriod -> None], {{x -> p z}, {z}}]In terms of the inverse transformation:
StateSpaceTransform[NonlinearStateSpaceModel[{{f[x, u]},
{g[x, u]}}, {x}, {u},
{Automatic}, Automatic, SamplingPeriod -> None], {{x}, {z -> (1/p)x}}]The transformation and its inverse:
StateSpaceTransform[NonlinearStateSpaceModel[{{f[x, u]},
{g[x, u]}}, {x}, {u},
{Automatic}, Automatic, SamplingPeriod -> None], {{x -> p z}, {z -> (1/p)x}}]For orthogonal matrices, Transpose can be used instead of Automatic or Inverse:
p = (| | |
| ----------- | ------------ |
| (1/Sqrt[2]) | (1/Sqrt[2]) |
| (1/Sqrt[2]) | -(1/Sqrt[2]) |);p.p//MatrixFormStateSpaceTransform[StateSpaceModel[{{{Subscript[a, 1, 1], Subscript[a, 1, 2]},
{Subscript[a, 2, 1], Subscript[a, 2, 2]}},
{{Subscript[b, 1, 1]}, {Subscript[b, 2, 1]}},
{{Subscript[c, 1, 1], Subscript[c, 1, 2]}},
{{Subscript[d, 1, 1]}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {p, p}]Nonlinear Transformations: (5)
Nonlinear transformations of a StateSpaceModel:
StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}}},
SamplingPeriod -> None, SystemsModelLabels -> None], {{x -> p[z]}, {z}}]StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}}},
SamplingPeriod -> None, SystemsModelLabels -> None], {{x}, {z -> q[x]}}]Nonlinear transformations of an AffineStateSpaceModel:
StateSpaceTransform[AffineStateSpaceModel[{{a[x]}, {{b[x]}},
{c[x]}, {{d[x]}}}, {x},
Automatic, {Automatic}, Automatic, SamplingPeriod -> None], {{x -> p[z]}, {z}}]StateSpaceTransform[AffineStateSpaceModel[{{a[x]}, {{b[x]}},
{c[x]}, {{d[x]}}}, {x},
Automatic, {Automatic}, Automatic, SamplingPeriod -> None], {{x}, {z -> q[x]}}]Nonlinear transformations of a NonlinearStateSpaceModel:
StateSpaceTransform[NonlinearStateSpaceModel[{{f[x, u]},
{g[x, u]}}, {x}, {u},
{Automatic}, Automatic, SamplingPeriod -> None], {{x -> p[z]}, {z}}]StateSpaceTransform[NonlinearStateSpaceModel[{{f[x, u]},
{g[x, u]}}, {x}, {u},
{Automatic}, Automatic, SamplingPeriod -> None], {{x}, {z -> q[x]}}]Specify a nonlinear transformation and its inverse:
StateSpaceTransform[StateSpaceModel[{{{Subscript[a, 1, 1], Subscript[a, 1, 2]},
{Subscript[a, 2, 1], Subscript[a, 2, 2]}},
{{Subscript[b, 1, 1]}, {Subscript[b, 2, 1]}},
{{Subscript[c, 1, 1], Subscript[c, 1, 2]}},
{{Subscript[d, 1, 1]}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {{Subscript[x, 1] -> Subscript[z, 1] + Subscript[z, 1]Subscript[z, 1], Subscript[x, 2] -> Subscript[z, 2] + Subscript[z, 1]}, {Subscript[z, 1] -> (1/2) (-1 + Sqrt[1 + 4 Subscript[x, 1]]), Subscript[z, 2] -> (1/2) (1 - Sqrt[1 + 4 Subscript[x, 1]] + 2 Subscript[x, 2])}}]The inverse of a nonlinear transformation is required only if operating points are specified:
StateSpaceTransform[AffineStateSpaceModel[{{a[x]}, {{b[x]}},
{c[x]}, {{d[x]}}},
{{x, Subscript[x, 0]}}, Automatic, {Automatic}, Automatic,
SamplingPeriod -> None], {{x -> p z}, {z -> (1/p)x}}]Generalizations & Extensions (2)
A non-square orthogonal matrix selects a subsystem:
ssm = StateSpaceModel[{{{Subscript[a, 1], 0, 0}, {0, Subscript[a, 2], 0},
{0, 0, Subscript[a, 3]}}, {{0, 0}, {Subscript[b, 1], 0},
{0, Subscript[b, 2]}}, {{Subscript[c, 1], 0, 0},
{0, 0, Subscript[c, 3]}},
{{Subscript[d, 11], Subscript[d, 12]},
{Subscript[d, 21], Subscript[d, 22]}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];p = {{0, 0}, {1, 0}, {0, 1}};StateSpaceTransform[ssm, p]The corresponding matrix pair:
StateSpaceTransform[ssm, {p, p}]For nonlinear transformations, a partitioned inverse specification selects a subsystem:
assm = AffineStateSpaceModel[{{Subscript[a, 1]*Subscript[x, 1],
Subscript[a, 2]*Subscript[x, 2],
Subscript[a, 3]*Subscript[x, 3]},
{{Subscript[b, 1]}, {Subscript[b, 2]}, {Subscript[b, 3]}},
{Subscript[c, 1]*Subscript[x, 1],
Subscript[c, 2]*Subscript[x, 2]},
{{Subscript[d, 1]}, {Subscript[d, 2]}}},
{Subscript[x, 1], Subscript[x, 2], Subscript[x, 3]},
Automatic, {Automatic, Automatic}, Automatic, SamplingPeriod -> None];
pp = {Subscript[x, 1] -> Subscript[z, 1], Subscript[x, 2] -> Subscript[z, 2], Subscript[x, 3] -> Subscript[z, 3]};
qq = {{Subscript[z, 1] -> Subscript[x, 1], Subscript[z, 2] -> Subscript[x, 2]}, {Subscript[z, 3] -> Subscript[x, 3]}};StateSpaceTransform[assm, {pp, qq}]StateSpaceTransform[assm, {pp, Flatten[qq]}]Options (1)
DescriptorStateSpace (1)
Treat a standard StateSpaceModel as a descriptor system:
StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}}},
SamplingPeriod -> None, SystemsModelLabels -> None], {{p}}, DescriptorStateSpace -> True]It gives the same result as an explicit descriptor specification:
StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}},
{{1}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {{p}}]Similar results can be obtained with the inverse transformation as well:
StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}}},
SamplingPeriod -> None, SystemsModelLabels -> None], {Automatic, {{q}}}, DescriptorStateSpace -> True]StateSpaceTransform[StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}},
{{1}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {Automatic, {{q}}}]Applications (6)
A function to obtain the controllable companion form of a single-input system:
ControllableCompanion[ssm_StateSpaceModel] /; ControllableModelQ[ssm] := Module[{A = First@Normal@ssm, dim, cv, coeffsList, mat, s1},
dim = Last@Dimensions@A;
coeffsList = CoefficientList[Det[cv IdentityMatrix[dim] - A], cv];
mat = HankelMatrix[Rest[coeffsList] / Last[coeffsList]];
s1 = ControllabilityMatrix[ssm].mat;
StateSpaceTransform[ssm, s1]]ControllableCompanion[StateSpaceModel[{{{1, -1, 1}, {1, 2, 1}, {-1, 1, 2}}, {{1}, {-1}, {0}}, {{1, -1, 0}}, {{0}}},
SamplingPeriod -> None, SystemsModelLabels -> None]]A function to obtain the observable companion form of a single-output system:
ObservableCompanion[ssm_StateSpaceModel] /; ObservableModelQ[ssm] := Module[{A = First@Normal@ssm, dim, cv, coeffsList, mat, s1},
dim = Last@Dimensions@A;
coeffsList = CoefficientList[Det[cv IdentityMatrix[dim] - A], cv];
mat = HankelMatrix[Rest[coeffsList] / Last[coeffsList]];
s1 = mat.ObservabilityMatrix[ssm];
StateSpaceTransform[ssm, {Inverse@s1, s1}]]ObservableCompanion[StateSpaceModel[{{{1, -1, 1}, {1, 2, 1}, {-1, 1, 2}}, {{1}, {-1}, {0}}, {{1, -1, 0}}, {{0}}},
SamplingPeriod -> None, SystemsModelLabels -> None]]ssm = StateSpaceModel[{{{Subscript[a, 11], Subscript[a, 12],
Subscript[a, 13], Subscript[a, 14]},
{Subscript[α, 21], Subscript[α, 22], Subscript[α, 23],
Subscript[α, 24]}, {Subscript[Α, 31],
Subscript[Α, 32], Subscript[Α, 33],
Subscript[Α, 34]}, {Subscript[a, 41], Subscript[a, 42],
Subscript[a, 43], Subscript[a, 44]}},
{{Subscript[b, 1]}, {Subscript[β, 2]},
{Subscript[Β, 3]}, {Subscript[b, 4]}},
{{Subscript[c, 11], Subscript[γ, 12], Subscript[Γ, 13],
Subscript[c, 14]}, {Subscript[c, 21], Subscript[γ, 22],
Subscript[Γ, 23], Subscript[c, 24]}},
{{Subscript[d, 1]}, {Subscript[d, 2]}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];StateSpaceTransform[ssm, (| | | | |
| - | - | - | - |
| 1 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 0 | 0 | 1 |)]Convert the model of a simple pendulum in Cartesian coordinates to polar coordinates:
The model in Cartesian coordinates:
asys = AffineStateSpaceModel[
{{v, (-v^2)*(x/(L^2 - x^2)) -
(g*x*Sqrt[L^2 - x^2])/L^2},
{{0}, {Sqrt[L^2 - x^2]/(L^2*m)}},
{ArcSin[x/L]}, {{0}}}, {x, v},
{τ}, {Automatic}, Automatic, SamplingPeriod -> None];The model in polar coordinates:
StateSpaceTransform[asys, {{x -> L Sin[θ], v -> L Cos[θ] ω}, {θ, ω}}]//PowerExpandApply a direct quadrature (dq) transformation to a permanent magnet stepper motor model: »
motor = AffineStateSpaceModel[{{((-R)*Subscript[i, a] +
ω*Sin[θ*Subscript[n, r]]*
Subscript[K, m])/L,
((-R)*Subscript[i, b] -
ω*Cos[θ*Subscript[n, r]]*
Subscript[K, m])/L,
((-b)*ω -
Sin[θ*Subscript[n, r]]*
Subscript[i, a]*Subscript[K, m] +
Cos[θ*Subscript[n, r]]*
Subscript[i, b]*Subscript[K, m])/J,
ω}, {{1, 0}, {0, 1}, {0, 0}, {0, 0}}, {θ, ω},
{{0, 0}, {0, 0}}}, {Subscript[i, a],
Subscript[i, b], ω, θ},
{Subscript[v, a], Subscript[v, b]},
{Automatic, Automatic}, Automatic, SamplingPeriod -> None];Apply the dq transformation to the currents
and
:
StateSpaceTransform[motor, {{Subscript[i, a] -> Subscript[i, d] Cos[Subscript[n, r]θ] - Subscript[i, q] Sin[Subscript[n, r]θ], Subscript[i, b] -> Subscript[i, d] Sin[Subscript[n, r]θ] + Subscript[i, q] Cos[Subscript[n, r]θ], ω -> ω, θ -> θ}, {Subscript[i, d], Subscript[i, q], ω, θ}}]Apply the dq transformation to the input voltages as well:
SystemsModelSeriesConnect[TransferFunctionModel[{{{Cos[θ*Subscript[n, r]],
-Sin[θ*Subscript[n, r]]},
{Sin[θ*Subscript[n, r]],
Cos[θ*Subscript[n, r]]}}, 1}, ], %]//SimplifyConvert aircraft equations of motion from body to wind coordinates:
nsys = NonlinearStateSpaceModel[{{r*v - q*w +
X/m - g*Sin[θ],
(-r)*u + p*w +
Y/m + g*Cos[θ]*Sin[ϕ],
q*u - p*v + Z/m +
g*Cos[θ]*Cos[ϕ]}, {}},
{u, v, w}, {X, Y,
Z}, Automatic, Automatic, SamplingPeriod -> None, SystemsModelLabels -> {{}, None}];Simplify[StateSpaceTransform[nsys, {{u -> V Cos[α] Cos[β], v -> V Sin[β], w -> V Sin[α] Cos[β]}, {V, α, β}}]]Properties & Relations (8)
The output response is invariant under a similarity transformation:
ssm1 = StateSpaceModel[{{{-0.75, 0.25}, {-0.01, -1}}, {{0.005}, {0.05}}, {{1, 0}}, {{0}}},
SamplingPeriod -> None, SystemsModelLabels -> None];
ssm2 = StateSpaceTransform[ssm1, {{1, -1}, {0, 1}}];Grid[{Table[Plot[Evaluate@OutputResponse[s, 1, {t, 10}], {t, 0, 10}, ImageSize -> Small], {s, {ssm1, ssm2}}]}, Spacings -> 2]Similar systems have identical transfer functions:
ssm1 = StateSpaceModel[{{{a}}, {{b}}, {{c}}, {{d}}},
SamplingPeriod -> None, SystemsModelLabels -> None];
ssm2 = StateSpaceTransform[ssm1, {{p}}];TransferFunctionModel[ssm1][s] == TransferFunctionModel[ssm2][s]The eigenvalues (and hence, stability) are invariant under a similarity transformation:
ssm1 = StateSpaceModel[{{{Subscript[a, 11], Subscript[a, 12]},
{Subscript[a, 21], Subscript[a, 22]}},
{{Subscript[b, 1]}, {Subscript[b, 2]}},
{{Subscript[c, 1], Subscript[c, 2]}}, {{0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];
ssm2 = StateSpaceTransform[ssm1, {{Subscript[p, 11], Subscript[p, 12]}, {Subscript[p, 21], Subscript[p, 22]}}];{a1, a2} = First /@ Normal /@ {ssm1, ssm2};Simplify[Eigenvalues[a1] == Eigenvalues[a2]]Controllability and observability are invariant under a similarity transformation:
ssm1 = StateSpaceModel[{{{Subscript[a, 11], 0}, {0, Subscript[a, 22]}},
{{Subscript[b, 1]}, {0}},
{{Subscript[c, 1], Subscript[c, 2]}}, {{0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];
ssm2 = StateSpaceTransform[ssm1, {{Subscript[p, 11], Subscript[p, 12]}, {Subscript[p, 21], Subscript[p, 22]}}];ControllableModelQ /@ {ssm1, ssm2}ObservableModelQ /@ {ssm1, ssm2}The Hankel singular values
are invariant under similarity transformation:
hankelSingularValues[sys_] :=
Module[{ns = N[sys]}, wc = ControllabilityGramian[ns];wo = ObservabilityGramian[ns];Sqrt[Eigenvalues[wc.wo]]];ssm1 = StateSpaceModel[{{{-1, 0, 3}, {2, -1, 3}, {1, -1, -1}}, {{1}, {1}, {2}}, {{0, 1, -1}}, {{0}}},
SamplingPeriod -> None, SystemsModelLabels -> None];
ssm2 = StateSpaceTransform[ssm1, {{1, -1, 1}, {0, 1, 0}, {1, 0, 0}}];hankelSingularValues[ssm1] - hankelSingularValues[ssm2]//NormSystems model decompositions all use state transformations:
ssm = StateSpaceModel[{{{0, 1}, {-12, -7}}, {{0}, {1}}, {{2, 1}}, {{0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];ControllableDecomposition based on ControllabilityMatrix:
{p, ssmt} = ControllableDecomposition[ssm];
{StateSpaceTransform[ssm, p], ssmt}ObservableDecomposition based on ObservabilityMatrix:
{p, ssmt} = ObservableDecomposition[ssm];
{StateSpaceTransform[ssm, p], ssmt}InternallyBalancedDecomposition based on ObservabilityGramian:
{p, ssmt} = InternallyBalancedDecomposition[ssm];
{StateSpaceTransform[ssm, p], ssmt}//NJordanModelDecomposition based on JordanDecomposition:
{p, ssmt} = JordanModelDecomposition[ssm];
{StateSpaceTransform[ssm, p], ssmt}{p, ssmt} = KroneckerModelDecomposition[ssm];
{StateSpaceTransform[ssm, p], ssmt}The linearization using coordinate transformations is also related using StateSpaceTransform:
𝒮 = StateTransformationLinearize[asys = AffineStateSpaceModel[{{4*Subscript[x, 1], 7*Subscript[x, 1]^2 +
Subscript[x, 2]}, {{1}, {-1 + 2*Subscript[x, 1]}},
{Subscript[x, 1]}, {{0}}}, {Subscript[x, 1],
Subscript[x, 2]}, {{Subscript[, 1], 0}}, {Automatic}, Automatic,
SamplingPeriod -> None]];{StateSpaceTransform[asys, 𝒮[{"StateTransformation", "InverseStateTransformation"}]], 𝒮["TransformedSystem"]}A state transformation is an intermediate step in feedback linearization:
asys = AffineStateSpaceModel[{{Subscript[x, 2] + Subscript[x, 2]^2,
Subscript[x, 3] - Subscript[x, 1]*Subscript[x, 4] +
Subscript[x, 4]*Subscript[x, 5],
-Subscript[x, 2]^2 + Subscript[x, 2]*Subscript[x, 4] +
Subscript[x, 1]*Subscript[x, 5], Subscript[x, 5],
Subscript[x, 2]^2}, {{0, 1}, {0, 0},
{Cos[Subscript[x, 1] - Subscript[x, 5]], 1}, {0, 0}, {0, 1}},
{Subscript[x, 1] - Subscript[x, 5], Subscript[x, 4]},
{{0, 0}, {0, 0}}}, {Subscript[x, 1], Subscript[x, 2],
Subscript[x, 3], Subscript[x, 4], Subscript[x, 5]},
{Subscript[u, 1], Subscript[u, 2]}, {Automatic, Automatic}, Automatic,
SamplingPeriod -> None];
ℱ = FeedbackLinearize[asys]Apply the feedback and then the state transformation to get the transformed system:
SystemsModelSeriesConnect[ℱ["FeedbackCompensator"], asys];StateSpaceTransform[%, {Automatic, ℱ["InverseStateTransformation"]}]The property "TransformedSystem" gives the same result:
NonlinearStateSpaceModel[ℱ["TransformedSystem"]]Possible Issues (2)
The transformation matrix must be orthonormal or invertible:
p = {{2, 1, 1}, {1, 0, -1}, {1, 1, 2}};StateSpaceTransform[StateSpaceModel[{RandomReal[2, {3, 3}], RandomReal[1, {3, 1}], {{1, 0, 0}}}], p]It is neither orthonormal nor invertible:
{p.p == IdentityMatrix[3], MatrixRank[p] == 3}If there are multiple inverse solutions, only one is chosen:
assm = AffineStateSpaceModel[{{-Subscript[x, 1] + Subscript[x, 2],
-Subscript[x, 1]}, {{1 + Subscript[x, 2]},
{Subscript[x, 1]}}, {Subscript[x, 1]}, {{0}}},
{{Subscript[x, 1], 0}, {Subscript[x, 2], 0}}, Automatic, {Automatic},
Automatic, SamplingPeriod -> None];pp = {Subscript[x, 1] -> Subscript[z, 1] + Subsuperscript[z, 2, 2], Subscript[x, 2] -> Subscript[z, 2] + Subscript[z, 1]Subscript[z, 2]};
qq = {Subscript[z, 1], Subscript[z, 2]};StateSpaceTransform[assm, {pp, qq}]There are 3 inverse solutions:
sols = Solve[Equal@@@pp, qq];
Length[sols]StateSpaceTransform[assm, {pp, sols[[3]]}]Related Guides
History
Introduced in 2010 (8.0) | Updated in 2012 (9.0) ▪ 2014 (10.0)
Text
Wolfram Research (2010), StateSpaceTransform, Wolfram Language function, https://reference.wolfram.com/language/ref/StateSpaceTransform.html (updated 2014).
CMS
Wolfram Language. 2010. "StateSpaceTransform." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/StateSpaceTransform.html.
APA
Wolfram Language. (2010). StateSpaceTransform. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StateSpaceTransform.html
BibTeX
@misc{reference.wolfram_2026_statespacetransform, author="Wolfram Research", title="{StateSpaceTransform}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/StateSpaceTransform.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_statespacetransform, organization={Wolfram Research}, title={StateSpaceTransform}, year={2014}, url={https://reference.wolfram.com/language/ref/StateSpaceTransform.html}, note=[Accessed: 13-June-2026]}