# The system is not completely reachable, Is state x1 reachable from x0?

The system is $$x(k+1)=\begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} x(k)+\begin{bmatrix} 0 \\ 1 \\ 1\end{bmatrix} u(k) \\ y(k) =\begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 0 \end{bmatrix} x(k) \\C=\begin{bmatrix}B & AB &A^2B \end{bmatrix} =\begin{bmatrix} 0&1&2\\1&1&1\\1&1&1\end{bmatrix}$$

The rank of C is 2 that is not equal to the full rank. The means the system is not reachable. However, the system can be not completely reachable if the state that the system should go to is linearly dependent to the basis of C

Let the state x1= \begin{bmatrix}3\\2\\2\end{bmatrix} that reachable form the zero state.

My questions are

1) how to determinate the minimum number of step to reach x1?

2) What input do I need? and how do I verify my answers?

Let's take them to be the first two $u_0$ and $u_1$. This gives $$x_1=B u_0$$ $$\ \ \ \ \ \ \ \ \ \ \ \ \ x_2=B u_1+A B u_0$$ Substituting values $$\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left( \begin{array}{c} 3 \\ 2 \\ 2 \\ \end{array} \right) = \left( \begin{array}{cc} 0 & 1 \\ 1 & 1 \\ 1 & 1 \\ \end{array} \right)\left( \begin{array}{c} u_1 \\ u_0 \\ \end{array} \right)$$
The solution is $u_0=3, u_1=-1$. I got this by observation, but in general you can solve the above using the pseudo inverse.