# Finding the equation that is described by this block diagram

I have the following block diagram

The exercise asks to find the equation that describes the system.

What I did: I called what going into the $-1$ multiplier as $x_{1}$and I got $2$ equations

$$y(k)=u(k-2)-x_{1}(k-2)+y(k-3)$$ $$x_{1}(k)=u(k-1)-x_{1}(k-1)+y(k-2)$$

How can I continue from here ? or maybe what I did is not a good way to solve the question, what alternative way may be good here ?

-
After each block, name the signal, say $v_1$, $v_2$, etc... and then it should become clear. – Emily Oct 18 '12 at 17:25
@EdGorcenski - I denoted $x_2(k)$ as what comes out from the $+$ block, $x_4$ is for the one the comes out of the $-1$, $x_3$ is for what comes out from the lower Delay block.I wrote $4$ equations and got $x_2(k)=u(k)-x_2(k-1)+y(k-1)$. I just can't get rid out of the $x_i$ and have the relation between $y(k)$ and other $y$'s and $u$'s – Belgi Oct 18 '12 at 17:31

I've labeled signals in your block diagram.

Let's just walk back up the chain. There's a good chance I made some mistakes in my subscripts and delays, since I tried solving this on a post-it note... please feel free to edit if there are :D

\begin{align*} y(k) &= v_3(k) \\ &= v_2(k-1) \\ &= v_1(k-2) \\ &= v_4(k-2) + v_5(k-2) + u(k-2) \\ \end{align*}

Now, let's figure out what $v_5(k)$ and $v_4(k)$ are.

$$v_5(k) = v_3(k-1) = y(k-1)$$ so $$v_5(k-2) = y(k-3).$$

Next, for $v_4(k)$, \begin{align*} v_4(k) &= -v_2(k) \\ &= -v_1(k-1) \\ &= v_4(k-1)-y(k-2)-u(k-1). \end{align*} This means that $$v_4(k-2) = v_4(k-3)-y(k-4)-u(k-3).$$

Plugging this all in,

$$y(k) = u(k-2)+y(k-3)+v_4(k-3)-y(k-4)-u(k-3)$$

This makes sense, since we write our observable state in terms of previous state observations $y(k-3),y(k-4)$, control input $u(k-2), u(k-3)$, and a single direct state measurement $v_4(k-3)$.

Edit: now the signal names match the diagram.

-
Can't you just say $v_4(k)=y(k-1)$ and get rid of the internal state? I think $v_5(k)$ should be $-y(k-1)$ so we get $y(k)=y(k-3)-y(k-1)+u(k-2)$ – Ross Millikan Oct 18 '12 at 20:11
Actually, I made a mistake here in my labeling. My hand-drawn diagram switches $v_4$ and $v_5$. I should edit. But yes, that is exactly what I did $v_5(k) = y(k-1)$. I am still not certain I can remove the internal state. – Emily Oct 18 '12 at 20:22
With the new labeling, $v_4(k-2)=-y(k-1),$ so $y(k)=-y(k-1)+y(k-3)+u(k-2)$, still the same. – Ross Millikan Oct 18 '12 at 20:57