functiontoSimilarForm
Perform the similarity transformation z = Tx (or x = inv(T)z) which leads to Az=T*A*inv(T), Bz=T*B, Cz=C*inv(T), Dz=D (or Az=inv(T)*A*T, Bz=inv(T)B, Cz=C*T, Dz=D)
Information
Syntax
tss = StateSpace.Transformation.toSimilarForm(ss, T, inverted)
Description
This function calculates a similar state space system, i.e.
der(z) = T*A*inv(T)*z + T*B*u
y = C*T*z + D*u
if inverted==false and
der(z) = inv(T)*A*T*z + inv(T)*B*u
y = C*inv(T)*z + D*u
if inverted=true. Matrix T has to be invertible. The transformed system has the same eigenvalues.
Example
Modelica_LinearSystems2.StateSpace ss=Modelica_LinearSystems2.StateSpace(
A=[-1, 1; 0, -2],
B=[1; 0],
C=[0, 1],
D=[0]);
Real T[2,2]=[1, 1;0, sqrt(2)];
algorithm
tss:=Modelica_LinearSystems2.StateSpace.Transformation.toSimilarForm(ss, T, false);
// tss=StateSpace(
A=[-1, 0; 0, -2],
B=[1; 0],
C=[0, 1/sqrt82)],
D=[0])
See also
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| StateSpace | ss | State space system | |
| Real[size(ss.A, 2),size(ss.A, 1)] | T | identity(size(ss.A, 1)) | Transformation matrix |
| Boolean | inverted | false | Is false (default) for transformation z = Tx, true for x = Tz |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| StateSpace | tss | Transformed state space system |