Reproduce the StateSpaceModel example given in the documentation?

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 like

Each 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?

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

Thank you for your reply, I was not aware of the trick with clicking the the “S”.

Best regards, Michael

Michael,

I forgot to mention that if you click it again, it will compress back to the gray squares. This also works on TransferFunctionModels. This feature is missing from the documentation – I’ll report the omission. We found it by accident.

Regards,

Neil