# Transfer function block diagram

Can any one help with the $y[n]$ and $x[n]$ relationship in this block diagram, I just keep have a $t[n]$ in my answer that I can't get rid off.

On my best try I got to $y[n] = 2t[n]-x[n-1]-y[n-2]+x[n]$

If you could also tell me how you got there it would be great.

Thanks anyone for help.

• Are you allowed to use the $\mathcal{Z}$-transform? – Matt L. Mar 30 '15 at 9:40
• that unit-delay element in the middle is not legit. the two outputs are the same and it should be drawn that way explicitly. – robert bristow-johnson Mar 30 '15 at 18:01

I prefer to solve such problems using the $\mathcal{Z}$-transform. First, write down the time domain equations:

\begin{align}\tag{1} y[n]&=r[n]+x[n]\\ r[n]&=r[n-1]+t[n]+t[n-1]\\ t[n]&=t[n-1]+y[n-1]+y[n-2] \end{align}

Taking the $\mathcal{Z}$-transform of these equations gives

\begin{align}\tag{2} Y(z)&=R(z)+X(z)\\ R(z)&=z^{-1}R(z)+T(z)+z^{-1}T(z)\\ T(z)&=z^{-1}T(z)+z^{-1}Y(z)+z^{-2}Y(z) \end{align}

After simplification you get

\begin{align} R(z)&=T(z)\frac{1+z^{-1}}{1-z^{-1}}\\ T(z)&=Y(z)z^{-1}\frac{1+z^{-1}}{1-z^{-1}} \end{align}

from which

$$R(z)=Y(z)z^{-1}\frac{(1+z^{-1})^2}{(1-z^{-1})^2}\tag{3}$$

follows. Plugging (3) into the first equation of (2) gives

$$Y(z)=Y(z)z^{-1}\frac{(1+z^{-1})^2}{(1-z^{-1})^2}+X(z)\tag{4}$$

from which you finally obtain afters some algebra

$$H(z)=\frac{Y(z)}{X(z)}=\frac{(1-z^{-1})^2}{1-3z^{-1}-z^{-2}-z^{-3}}\tag{5}$$

In the time domain, Eq. (5) is equivalent to

$$y[n]-3y[n-1]-y[n-2]-y[n-3]=x[n]-2x[n-1]+x[n-2]\tag{6}$$

Two general suggestions: 1-Systematically write the equations at each node. 2-Time index can be changed to get new equations. For example in the top left node we have: $$r[n]=y[n]-x[n]$$, and thus: $$r[n-1]=y[n-1]-x[n-1]$$.

Answer: Write the equations at the two other nodes: $$t[n]-t[n-1]=y[n-1]+y[n-2](*)$$ $$t[n]+t[n-1]=r[n]-r[n-1]=y[n]-x[n]-y[n-1]+x[n-1]$$ Add two equations together: $$t[n]=\frac{y[n]+y[n-2]-x[n]+x[n-1]}{2}$$ change n to n-1 $$t[n-1]=\frac{y[n-1]+y[n-3]-x[n-1]+x[n-2]}{2}$$ replace $t[n]$ and $t[n-1]$ in (*)

$$y[n-1]+y[n-2]=-\frac{y[n-1]+y[n-3]-x[n-1]+x[n-2]}{2}+\frac{y[n]+y[n-2]-x[n]+x[n-1]}{2}$$ simplify....

Or you can use Z transform as above which gives a more compact solution.

• Your last equation is wrong. The easiest way to get the correct result is to plug the expressions for $t[n]$ and $t[n-1]$ into the equation above the starred one. If you do this you obtain the same result as I do. Basically, it's just the plus sign before the last term in your final equation which should be a minus sign. – Matt L. Mar 31 '15 at 19:09