I have the following linear difference equation (which is an discrete-time SISO ARX model):
$y(k)+\sum_{i=1}^{n}a_iy(k-i)=\sum_{i=1}^{n}b_iu(k-i)$
and I need to transform it in an equivalent state-space model in controllable canonical form, that is:
$\begin{pmatrix}x_1(k+1)\\ x_2(k+1)\\ \vdots\\ x_{n-1}(k+1)\\ x_n(k+1)\end{pmatrix} = \begin{pmatrix}0 & 1 & 0 & \ldots & 0 \\ 0 & 0 & 1 & \ldots & 0 \\ \vdots & \vdots & \vdots & \ldots & \vdots \\ 0 & 0 & 0 & \ldots & 1 \\ -a_n & -a_{n-1} & -a_{n-2} & \ldots & -a_1\end{pmatrix}\begin{pmatrix}x_1(k)\\ x_2(k)\\ \vdots\\ x_{n-1}(k)\\ x_n(k)\end{pmatrix}+\begin{pmatrix}0\\ 0\\ \vdots\\ 0\\ 1\end{pmatrix}u(k),$ $y(k) = \begin{pmatrix}b_n & b_{n-1} & \ldots & b_2 & b_1\end{pmatrix}\begin{pmatrix}x_1(k)\\ x_2(k)\\ \vdots\\ x_{n-1}(k)\\ x_n(k)\end{pmatrix}$
I am unable to find a connection between $y(\cdot)$ and $x_i(\cdot)$ variables, so that if I have data representing $y$ values I can find the related $x_i$ values. I need this because I want to use state-feedback control (e.g., LQR).
Can someone help me?
Any hint for the MIMO case?
Thank you very much!!