# 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? – robert bristow-johnson Jun 22 '17 at 14:00
• i might be wrong then @robertbristow-johnson – Zeno San Jun 22 '17 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. – robert bristow-johnson Jun 22 '17 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])$ – oxuf Jun 22 '17 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. – robert bristow-johnson Jun 22 '17 at 20:48

$$\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)$$
$$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.