# Transposition of state space form of a transfer function

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] • Normal the model, operate on parts as desired, StateSpaceModel the result... – ciao Jul 17 '15 at 5:31
• @ciao, I don't understand what you mean. – ar2015 Jul 17 '15 at 5:34
• You'll find all the details of those functions here – ciao Jul 17 '15 at 5:44
• @ciao, i uesd normal. It tries to give me norm!! – ar2015 Jul 17 '15 at 5:50
• I'd venture you used Norm, instead of Normal? – ciao Jul 17 '15 at 6:09

## 2 Answers

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 • Looks like perhaps they snuck some changes in either structure or made transpose aware of structure in 10.x: Latter code blows up on 9.x (I used 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. – ciao Jul 17 '15 at 10:13

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] 