# Determine whether the system is a FIR or IIR by looking the transfer function

I have the following system: $$y[n]=\frac{1}{3}(x[n+1]+x[n]+x[n-1])$$ After the Z-Transform we get

$$\frac{y[z]}{x[z]}=\frac{z^2+z+1}{3z}$$ which is of course the transfer function of the system. Now, I know that it would be a FIR if $\sum h(z) < \infty$ with $h(z)$ the impulse response. But As far as I know, it should be clear if it is FIR or IIR by just looking the transfer function. How can I know that?

• Your system is not causal as your current output y[n] depends on a future input x[n+1]. If your system were causal then it would definitely be an FIR. – Ben Oct 12 '17 at 12:59
• @Ben: An FIR filter need not be causal. – Jason R Oct 12 '17 at 13:03
• Yeah, you're right. My DSP theory needs some brushing up ;) – Ben Oct 12 '17 at 13:05

The forward $z$-transform is written with negative powers on $z$. So, $z$ transform of your difference equation would be:

$$Y(z) = \frac{1}{3}\left(zX(z) + X(z) + z^{-1}X(z)\right)$$

yielding a transfer function of:

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

The easiest way to determine whether a filter is IIR or FIR is to identify its pole locations. For FIR filters, there is a rule for this that is based on the structure of the impulse response:

• If the system is causal (i.e. it is zero for all $n < 0$), then it is FIR if all of its poles are located at the origin ($z=0$).
• If the system is anticausal (i.e. it is zero for all $n \ge 0$), then it is FIR if all of its poles are located at $z=\infty$.

Your system is neither causal nor anticausal. Instead, it has a causal component ($\frac{1}{3}(x[n] + x[n-1])$) and an anticausal component ($\frac{1}{3}x[n+1]$). So, it can be helpful to look at each component separately:

• $\frac{1}{3}(x[n] + x[n-1])$: The $z$-transform of the causal portion of the transfer function is $\frac{1}{3}(1 + z^{-1})$. This expression $\to \infty$ as $z \to 0$, so it has a pole at $z = 0$. This meets the criterion for an FIR response.

• $\frac{1}{3}x[n+1]$: The $z$-transform of the anticausal portion of the transfer function is $z$. This expression $\to \infty$ as $z \to \infty$, so it has a pole at $z = \infty$. This meets the criterion for an FIR response.

This would imply that you gave a difference equation for a non-causal FIR filter.

• An easier test might be to see if $H(z)$ is a polynomial in $z^{-1}$, or a polynomial in $z$ or the sum thereof (as in this case) and if so, the filter is an FIR filter (non causal in this case). In applying this test, one needs to distinguish between polynomials and series in order to decide whether we have an FIR filter or an IIR filter. This meets the desired criterion of "just looking at the transfer function" that the OP wants. – Dilip Sarwate Oct 13 '17 at 15:04

If you go by the definition of FIR and IIR filters

1. FIR filters : depend only on present and past input

2. IIR filters : depend on present and past input as well as past outputs

So if your difference equation has no terms involving past outputs then it is a FIR filter

• This definition is not fully true. Sure, most of the time there is a correlation between IIR and usage of past outputs. However, as the name suggests - it's about an infinite impulse response, not a recursive difference equation. For example, a filter defined as $$y[n]=0.5y[n-1]+x[n]-0.5x[n-1]$$ depends on previous outputs but its impulse response is finite ($[1]$). Therefore it's FIR despite being defined by a recursive difference equation. So what you can say for sure is that every IIR is recursive and every non-recursive filter is an FIR -> what you've mentioned in the end.. – jojek Mar 3 at 12:45

Transfer function with only zeros is FIR. If both zeros and poles are present, then it is IIR. Please avoid pole zero cancellation for this identification method.

New contributor
anjaley jojo is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• anjaley, causal FIR filters have poles at the origin ($z=0$). and you need to read up on Truncated IIR filters which are FIR yet have feedback. There are poles not located at the origin that are cancelled by zeros. – robert bristow-johnson Apr 15 at 20:54