# How to find out the transfer function of a FIR filter?

$$h[n]=\begin{cases}a^n & \text{if } 0 \le n < N \\ 0 & \text{otherwise}\end{cases}$$ And for which values of $a$ the filter is stable

I know that the transfer function will be

$$H(z)=\frac{z}{z-a}~,~|z|>a$$

how to find out the values of $a$ for it's stability ?

• what happened to $N$? why does not $N$ appear as a parameter in your transfer function? Commented Jun 22, 2017 at 14:00
• i might be wrong then @robertbristow-johnson Commented Jun 22, 2017 at 14:23
• you can use the finite geometric summation series: $$\sum\limits_{n=0}^{N-1} x^n = \frac{1 - x^N}{1-x}$$ to obtain your transfer function. Commented Jun 22, 2017 at 15:04
• how do you know that is the transfer function? that is the Z-transform of $a^n \cdot u[n]$, but $h[n] = a^n \cdot (u[n] - u[n-N])$ Commented Jun 22, 2017 at 18:52
• @oxuf, that was the main point i was trying to gently tell the OP. and i had to correct a general statement that "FIRs are always stable". this particular FIR can be implemented as a tail-cancelling IIR (also called Truncated IIR filters or TIIR), in a manner similar to the moving-average filter. then, even though the result is FIR, internal stability can be an issue. Commented Jun 22, 2017 at 20:48

\begin{align} y[n] &= h[n] * x[n]\\ &= h[0]x[n] + h[1]x[n-1] + \ldots + h[N-2]x[n-(N-2)] + h[N-1]x[n-(N-1)]\\ &= a^{0}x[n] +a^{1}x[n-1] + \ldots + a^{N-2} x[n-(N-2)] + a^{N-1} x[n-(N-1)] \end{align} So

$$\mathcal Z\{y[n]\} = Y(z) = X(z)\left(1 + az^{-1} + ... + a^{N-2}z^{-(N-2)} + a^{N-1}z^{-(N-1)}\right)$$

and

$$H(z) = \dfrac{Y(z)}{X(z)} = 1 + az^{-1} + ... + a^{N-2}z^{-(N-2)} + a^{N-1}z^{-(N-1)}$$

For $a$ finite, $H(z)$ is finite and thus stable for finite input values.