How can I read/deduce matrices A, B, C, and D in state space?

Hello,

I am trying to convert a continuous time transfer function to its equivalent continuous state space representation, and I can’t figure out what the matrices A, B, C, and D would be in Mathematica.

Matlab:

https://www.mathworks.com/help/signal/ref/tf2ss.html

Mathematica:

Result = TransferFunctionModel[(2*s + 3)/(s^2 + 0.4*s + 1), s]
m1 = StateSpaceModel[Result]
TransferFunctionModel[m1][s]

My question here is how to deduce/read the matrices A, B, C, and D in Mathematica from that syntax StateSpaceModel, just as it shows in Matlab when you want to switch from the transfer function to its equivalent state space representation? Is it possible such a thing, as Matlab can do?

Mathematica 13.2 Notebook file attached.

Thank you.

Untitled-14.nb (8.54 KB)

Not my area of expertise…

Normal@m1
MatrixForm /@ Normal@m1

Looks like maybe a difference in row/column representation?

Normal@m1
MatrixForm /@ Normal@m1

It seems that Mathematica rotates the lines between them and the columns between them…

As pointed out, the matrices can be obtained using Normal.

tfm = TransferFunctionModel[(2*s + 3)/(s^2 + 0.4*s + 1), s];
ssm = StateSpaceModel[tfm];
{a, b, c, d} = Normal[ssm];
MatrixForm /@ {a, b, c, d}

Screenshotfrom2023-02-1512-07-43.png

State space representations are not unique. Matlab ordered the states differently. To get that result in this case, do

MatrixForm /@ Normal[StateSpaceTransform[ssm, {{0, 1}, {1, 0}}]]

Screenshotfrom2023-02-1512-07-58.png