Controllability
$\dot{x(k)}$ = A x(k) + B u(k) ---(1)
y(k) = C x(k) + D u(k)
The necessary and sufficient condition for controllability is that rank of the composite matrix Qc is n,
Qo = [B: AB : $A^2B$ : ---------$A^{n-1}B$]
Defination : The equation (1) is said to be completely state controllable if for initial state X(0) and any final state X(N), there exists an input sequence, K= 0,1,2,----,N, which transfers X(0) to X(N) for some finite N otherwise the equation (1) is uncontrollable
Observability
Defination :- The equation (1) is said be observative if any initial state X(0) can be uniquely determined from the knowledge of output y(k) and input sequence u(k), for k=0,1,2______,N where N is some finite time, otherewise the state moded/equation (1) is unobservable.
A system is completely observable if and only if the rank of the composite matrix Qo is n.
where => Qo = [$c^T : A^Tc^T :------(A^T)^{n-1}c^T$]
OR
Qo = $\begin{bmatrix}C \\\ C A \\\ C A^2 \\\ C A^{n-1}\end{bmatrix}$
Given =>
$\dot{x} = \begin{bmatrix} 0 & 6 & -5\\\ 1 & 0 & 2\\\ 3&2&4 \end{bmatrix} \space x + \begin{bmatrix} 0 \\\ 1 \\\ 2 \end{bmatrix} \space u $
$ y = \begin{bmatrix} 1 & 3 & 0 \end{bmatrix} \space x$
we first check for controllability,
Here, A= $\begin{bmatrix}0 & 6 & -5\\\ 1 & 0 & 2\\\ 3&2&4 \end{bmatrix}$
A = 3*3 matrix
n = 3
B = $ \begin{bmatrix} 0 \\\ 1 \\\ 2 \end{bmatrix}$ , C= $\begin{bmatrix} 1 & 3 & 0 \end{bmatrix}$
The necessary and sufficient condition for controllability is,
$Q_o$ = [B : AB : ------$A^{n-1}$B]
since, n=3
$Q_o$ = [B:AB:$A^2$B] -----(1)
B = $ \begin{bmatrix} 0 \\\ 1 \\\ 2 \end{bmatrix}$ -------(2)
AB= $\begin{bmatrix}0 & 6 & -5\\\ 1 & 0 & 2\\\ 3&2&4 \end{bmatrix} \space \begin{bmatrix} 0 \\\ 1 \\\ 2 \end{bmatrix}$
AB = $\begin{bmatrix}-4 \\\ 4 \\\ 10 \end{bmatrix}$ -----------(3)
$A^2B$ = A.[A B] = $\begin{bmatrix}0 & 6 & -5\\\ 1 & 0 & 2\\\ 3&2&4 \end{bmatrix}\begin{bmatrix}-4 \\\ 4 \\\ 10 \end{bmatrix}$
$A^2B$ = $\begin{bmatrix} -26 \\\ 16 \\\ 36 \end{bmatrix}$ -----------(4)
Put (2),(3),(4) in (1)
$Q_o$ = $\begin{bmatrix}0 & -4 & -26\\\ 1 & 4 & 16\\\ 2 & 10 & 36 \end{bmatrix}$
Now find determinant of |$Q_c$|
|$Q_o$| = -36
|$Q_o$| $\neq$ 0
Since the determinant of $Q_c$ is non zero, therefore the rank of $Q_c$ = n = 3
Hence the system is completely controllable.
Observability =>
Given,
B = $ \begin{bmatrix} 0 \\\ 1 \\\ 2 \end{bmatrix}$ , B' = $ \begin{bmatrix} 0 & 1 & 2 \end{bmatrix}$
C = $ \begin{bmatrix} 1 & 3 & 0 \end{bmatrix}$ , C' = $ \begin{bmatrix} 1 \\\ 3 \\\ 0 \end{bmatrix}$
A = $\begin{bmatrix} 0 & 6 & -5\\\ 1 & 0 & 2\\\ 3&2&4 \end{bmatrix}$ , A' = $\begin{bmatrix} 0 & 1 & 3\\\ 6 & 0 & 2\\\ -5 & 2 & 4 \end{bmatrix}$
The necessary and sufficient condition for observability.
$Q_o = \begin{bmatrix} C^{T} & A^{T}C^{T} & ---- & { (A^{T}) }^{ n-1 }C^{T} \end{bmatrix}$
For n=3,
$Q_o =\begin{bmatrix} C^{T} & A^{T}C^{T} & { (A^{T}) }^{ 2 }C^{T} \end{bmatrix}-----(5)$
$C^{T}=\begin{bmatrix} 1 \\\ 3 \\\ 0 \end{bmatrix}$-----(6)
$ A^{T}C^{T}=\begin{bmatrix} 0 & 1 & 3 \\\ 6 & 0 & 2 \\\ -5 & 2 & 4 \end{bmatrix}\begin{bmatrix} 1 \\\ 3 \\\ 0 \end{bmatrix}$
$ A^{T}C^{T}=\begin{bmatrix} 3 \\\ 6 \\\ 1 \end{bmatrix}$-----(7)
$ (A^{T})^{2}C^{T}=A^{T} \cdot (A^{T}C^{T})=\begin{bmatrix} 0 & 1 & 3 \\\ 6 & 0 & 2 \\\ -5 & 2 & 4 \end{bmatrix}\begin{bmatrix} 3 \\\ 6 \\\ 1 \end{bmatrix}$
$ (A^{T})^{2}C^{T}=\begin{bmatrix} 9 \\ 20 \\ 1 \end{bmatrix}$-----(8)
Put equations (6), (7), (8) in equation (5),
$Q_o =\begin{bmatrix} 1 & 3 & 9 \\\ 3 & 6 & 20 \\\ 0 & 1 & 1 \end{bmatrix}$
Now, find the determinant of $Q_o$
$|Q_o|=\begin{vmatrix} 1 & 3 & 9 \\\ 3 & 6 & 20 \\\ 0 & 1 & 1 \end{vmatrix}$
$|Q_o|= 4$
Since, $|Q_o| \neq 0$, the rank of $Q_o$ is n=3.
$\therefore$ The system is completely observable.