TransWikia.com

State Space Model in Controllable Canonical Form

Mathematica Asked by user74620 on February 24, 2021

Mathematica by default puts state space model realizations in controllable companion form, as seen here:

tfsys = TransferFunctionModel[(b1 s^2 + b2 s + b3)/(s^3 + a1 s^2 + 
      a2 s + a3 ), s];
StateSpaceModel[tfsys]

Which outputs a block matrix like:
$$
begin{bmatrix}0 & 1 & 0 & 0 0 & 0 & 1 & 0 -a_3 & -a_2 & -a_1 & 1 b_3 & b_2 & b_1 & 0end{bmatrix}
$$

However, I want it in controllable canonical form, which should look like:
$$
begin{bmatrix}-a_1 & -a_2 & -a_3 & 1 1 & 0 & 0 & 0 0 & 1 & 0 & 0 b_1 & b_2 & b_3 & 0end{bmatrix}
$$

StateSpaceModel offers the StateSpaceRealization option but it only has ControllableCompanion and ObservableCompanion, neither of which is what I want. Is there a simple way of getting the right state space form?

One Answer

StateSpaceModel[TransferFunctionModel[(b1 s^2 + b2 s + b3)/(s^3 + a1 s^2 + a2 s + a3), s]]

enter image description here

And we can get the form you want by selecting the states in the desired order.

SystemsModelExtract[%, All, All, Reverse@Range@3]

enter image description here

There doesn't seem to be a consensus on which of the above is the correct 'controllable canonical form'. Here are some sources (link, link) that call what is returned by Mathematica as the controllable canonical form.

Answered by Suba Thomas on February 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP