# Reproduce the StateSpaceModel example given in the documentation?

Posted 4 months ago
735 Views
|
3 Replies
|
3 Total Likes
|
 I tried to reproduce an example from the documentation running M12 on Windows10 but failed to get same result: eqns = {L i'[t] == Subscript[v, l][t], Subscript[v, c]'[t] == 1/C i[t], R i[t] == Subscript[v, r][t], Subscript[v, l][t] + Subscript[v, c][t] + Subscript[v, r][t] == Subscript[v, s][t]}; m2 = StateSpaceModel[ eqns, {i[t], Subscript[v, l][t], Subscript[v, c][t], Subscript[v, r][t]}, {Subscript[v, s][t]}, {i[t]}, t] The result that I get looks likeEach of the grey squares represents a complicated expression which can be view im Mathematica while hovering over it. The representation of the state space model looks complete different compared to the one given in the documentation:Any ideas?
3 Replies
Sort By:
Posted 4 months ago
 Michael,I agree it no longer works the same in V12. I reported the bug to Support.If you do not do the Descriptor system and use one of the options for StateSpaceRealization, it works: StateSpaceModel[eqns, {i[t], Subscript[v, l][t], Subscript[v, c][t], Subscript[v, r][t]}, {Subscript[v, s][t]}, {i[t]}, t, StateSpaceRealization -> "ControllableCompanion"] Also, to view all of the StateSpaceModel terms, you can click on the "S" in the upper right corner and it will expand the gray squares.Regards,Neil