Function File: [sysbar, T, K] = obsvf (sys)
Function File: [sysbar, T, K] = obsvf (sys, tol)
Function File: [Abar, Bbar, Cbar, T, K] = obsvf (A, B, C)
Function File: [Abar, Bbar, Cbar, T, K] = obsvf (A, B, C, TOL)

If Ob=obsv(A,C) has rank r <= n = SIZE(A,1), then there is a similarity transformation Tc such that To = [t1;t2] where t1 is c and t2 is orthogonal to t1

Abar = To \\ A * To ,  Bbar = To \\ B ,  Cbar = C * To

and the transformed system has the form

       |Ao     0 |          |Bo  |
Abar = |----------|,   Bbar = |--- |,  Cbar = [Co |0 ].
       |A21   Ano|          |Bno |

where (Ao,Bo) is observable, and Co(sI-Ao)^(-1)Bo = C(sI-A)^(-1)B. And system is detectable if Ano has no eigenvalues in the right half plane. The last output K is a vector of length n containing the number of observable states.

Package: control