How can I transpose the output of state space model in Mathematica?
trying the following code would transpose the top right symbol s
instead of the matrices.
Transpose @ StateSpaceModel @ TransferFunctionModel[{{a^2/(s^2 + b s + c)}}, s]
How can I transpose the output of state space model in Mathematica?
trying the following code would transpose the top right symbol s
instead of the matrices.
Transpose @ StateSpaceModel @ TransferFunctionModel[{{a^2/(s^2 + b s + c)}}, s]
I am not sure what a valid transpose of a StateSpaceModel
is but here is an attempt:
ssm = StateSpaceModel @ TransferFunctionModel[{{a^2/(s^2 + b s + c)}}, s]
Transpose /@ #[[{1, 3, 2, 4}]] & /@ ssm
StateSpaceModel@(Transpose /@ #[[{1, 3, 2, 4}]] &@(Normal@ssm))
for it to work). While that's a valid model, it's patently unclear what OP is after. Congratulations on 150, btw, and +1 here.
$\endgroup$
To not be at the mercy of the internal representation of StateSpaceModel
use DualSystemsModel
.
ssm = StateSpaceModel @ TransferFunctionModel[{{a^2/(s^2 + b s + c)}}, s];
DualSystemsModel[ssm]
Simplify[%, Element[a, Reals] && Element[b, Reals] && Element[c, Reals]]
It will also work for descriptor systems.
ssm1 = StateSpaceModel@TransferFunctionModel[{{a^2 s^3/(s^2 + b s + c)}}, s];
DualSystemsModel[ssm1]
Normal
the model, operate on parts as desired,StateSpaceModel
the result... $\endgroup$Norm
, instead ofNormal
? $\endgroup$