From discrete transfer function to state space model

577 Views Asked by At

I have been trying to make state space model from discrete function typed bellow. I have tried to solve it in many ways, but was unable to find appropriate model. What I have is this discrete funcion of a system:

\begin{equation}\label{eq:eq1} y(k) = a_1 \cdot y(k-1) + a_2\cdot y(k-2) + b \cdot u(k-1) + r \end{equation}

I would like to make description of the same system in state space. I need it in discrete form, because I need to implement it later for predictive regulator.

What I done so far is the following:

I wrote down two rules: \begin{equation}\label{eq:eq3} \begin{array}{l} x_1(k+1) = x_2(k) \\ x_2(k+1) = y(k+2) \end{array} \end{equation}

I considered the second rule in system equation (first equation): \begin{equation}\label{eq:eq44} x_2(k+1) = a_1x_2(k) +a_2x_2(k-1)+bu(k+1)+r \end{equation}

I considered the first rule in system equation: \begin{equation}\label{eq:eq4} x_2(k+1) = a_1x_2(k) +a_2x_1(k)+bu(k+1)+r \end{equation}

Than I wrote again the two equations which I would like to write in form of state space: \begin{equation}\label{eq:eq5} \begin{array}{l} x_1(k+1) = x_2(k) \\ x_2(k+1) = a_1x_2(k) +a_2x_1(k)+bu(k+1)+r \end{array} \end{equation}

Then I wrote them in matrix form: \begin{equation}\label{eq:eq6} \begin{array}{l} \begin{bmatrix} x_1(k+1) \\ x_2(k+1) \end{bmatrix} = \begin{bmatrix} 0& 1 \\ a_1& a_2 \end{bmatrix} \begin{bmatrix} x_1(k) \\ x_2(k) \end{bmatrix} + \begin{bmatrix} 0 \\ b \end{bmatrix}u(k+1) + \begin{bmatrix} 0 \\ r \end{bmatrix} \end{array} \end{equation}

At the end I figured out that I would also need to change u(k+1) to u(k), but was unable to do so. Can anyone suggest me how can I repair that?

So to summorize the system equation in matrix form should look something like this:

\begin{equation}\label{eq:eq7} \begin{array}{l} \begin{bmatrix} x_1(k+1) \\ x_2(k+1) \end{bmatrix} = \begin{bmatrix} 0& 1 \\ a_1& a_2 \end{bmatrix} \begin{bmatrix} x_1(k) \\ x_2(k) \end{bmatrix} + \begin{bmatrix} 0 \\ b \end{bmatrix}u(k) + \begin{bmatrix} 0 \\ r \end{bmatrix} \end{array} \end{equation}

1

There are 1 best solutions below

2
On

The system is almost already in state-space form :) Let $x_1(k) = y(k)$ and $x_2(k) = y(k-1)$, then $$x_1(k) = a_1 x_1(k-1) + a_2 x_2(k-1) +b u(k-1) +r,$$ to which you add $$ x_2(k) = x_1(k-1).$$

And you get the system you want $$ \left[ x_1(k) \atop x_2(k) \right ] = \begin{bmatrix} a_1 & a_2 \\ 1 & 0 \end{bmatrix} \left[ x_1(k-1) \atop x_2(k-1)\right] + \left[ b \atop 0 \right]u(k-1) + \left[r \atop 0 \right],$$ together with the observation equation $$y(k) = \left[1 \; 0\right]\left[x_1(k)\atop x_2(k)\right].$$