Examples of general system descriptions

An electrical series circuit.

Consider an inductor (L) in series with a resistor (R) two capacitors (C1, C2) and an ideal voltage source (u). Variables: voltage over C1, voltage over C2, current, voltage over L, voltage over R.  The outputs are the voltages over the capacitors. The system matrix is

gP={{C1 s,0,-1,0,0,0},{0,C2 s,-1,0,0,0},{0,0,L s,-1,0,0},{1,1,0,1,1,1},{0,0,R,0,-1,0},{-1,0,0,0,0,0},{0,-1,0,0,0,0}}

MatrixForm[%]

Check controllability

SmithForm[gP[[1;;5,1;;6]],s]

MatrixForm[%]

There is an uncontrollable mode corresponding to a pole at the origin.

Check observability.

SmithForm[gP[[1;;7,1;;5]],s]

MatrixForm[%]

The system is observable.

Check the poles

SmithForm[gP[[1;;5,1;;5]],s]

So there is one pole in the origin and two (possibly complex) poles in the left half plane.

Check for zeros.

SmithForm[gP,s]

MatrixForm[%]

No zeros.

DC motor example

dcP={{s,-1,0},{0,s+1,1},{-1,0,0},{0,-1,0}}

dcU1=IdentityMatrix[4]+Normal[SparseArray[{{2,1}->s+1},{4,4}]]

MatrixForm[%]

dcU2=IdentityMatrix[4]+Normal[SparseArray[{{4,1}->-1},{4,4}]]

dcU=dcU2.dcU1

dcV1={{0,1,0},{-1,0,0},{0,0,1}}

dcV2={{1,-s,0},{0,1,0},{0,0,1}}

dcV=dcV1.dcV2

dcU.dcP.dcV

MatrixForm[%]