dt_ility - detectability test
Detectability test for sl, a linear system in state-space representation. U is a basis whose k first columns span the unstable, unobservable subspace of Sl (intersection of unobservable subspace of (A,C) and unstable subspace of A). Detectability means k=0.
Sld = (U'*A*U,U'*B,C*U,D) displays the "detectable part" of Sl=(A,B,C,D), i.e.
[*,*,*] U'*A*U = [0,*,*] [0,0,*] C*U = [0,0,*]
with (A33,C3) observable (dimension nx-n), A22 stable (dimension n-k) and A11 unstable (dimension k).
A=[2,1,1;0,-2,1;0,0,3]; C=[0,0,1]; X=rand(3,3);A=inv(X)*A*X;C=C*X; W=syslin('c',A,[],C); [k,n,U,W1]=dt_ility(W); W1("A") W1("C")