# Question on FIR filter

I've been trying to do this problem for the last few hours. Could someone show me the workings on how it is done? Not just the answer.

The figure shows the structure of a FIR filter where $A = 1.5$, $B = 0.69$ and $C = 3.0$.

If $x[n] = u[n]$, what is the value of $y[n]$ for $n = 20$?

[EDITED] From left to right, try to find the impulse response. On the bottom branch, delay the unit pulse $d$ and get $d[n-1]$. Add $Ad[n]$. Delay twice and get $d[n-3] +Ad[n-2]$. Add $Bd[n]$. Add $Cd[n-1]$. So the FIR coefficients of the impulse response $h$ will be $[1,A,C,B]$, but in the reverse order (as correctly pointed out by colleagues), because $y[n] = \sum d[k]h[n-k]$. So your system is causal, and $h[0]=B$, $h[1]=C$, $h[2]=A$, $h[3]=1$.

However, at $n=20$, you are in a stabilized region of the signal (all the known samples are equal to $1$, so even if you make a mistake as I did first, the answer will be the same, $1+A+C+B$, as stated before by other colleagues.

• What's D and where did B go?!?! ;-)
– Peter K.
Commented Apr 25, 2016 at 20:29
• @Peter K. My first try on a smartphone is clumsy. Thx Commented Apr 25, 2016 at 20:39
• My reading of the block diagram says $[B,C,A,1]$. Though perhaps I'm doing the reverse of yours?
– Peter K.
Commented Apr 25, 2016 at 20:49
• oh i think i made a mistake in y[3] = 1xA + 1xB + 1xC. so that means its [B,C,A,1] is it? Also would that make y[20] = 6.19? Commented Apr 25, 2016 at 21:05
• Hope you don't mind me editing, just some unfortunate typos ... Commented Apr 26, 2016 at 8:32

If you start from the left, you have:

So if you want to calculate $y[20]$ when $x[n]=u[n]$, then you have to just replace these expressions in the general form of $y[n]$:

$$y[n] = B x[n] + C x[n-1] + A x[n-2] + x[n-3]$$ $$y[20] = B u[20] + C u[19] + A u[18] + u[17]$$ $$y[20] = B+C+A+1=6.19$$

• How did you produce the graph? Commented Apr 26, 2016 at 10:35
• @LaurentDuval using Paint. Commented Apr 26, 2016 at 13:16

Ok may be this simplified explanation fits:

1- if the input of a delay is x[n] then its output is x[n-1].

2- when there are k delays in series then it will be x[n-k].

3- based on 1 and 2, and following the signal paths: sum up all the signals: $$y[n] = B x[n] + C x[n-1] + A x[n-2] + x[n-3]$$

Now if x[n] = u[n], then by its very popular property of being = 1 for n>=0, all input values will be 1 for n>=3. Hence y[n] = A+B+C+1 = 6.19 for all n>=2.