I am trying to answer the following question:
Is the system described by equation:
$$y[n]=0.5y[n-1]+x[n]-0.5x[n-1]$$
an IIR filter? My answer is yes.
Thank you
I am trying to answer the following question:
Is the system described by equation:
$$y[n]=0.5y[n-1]+x[n]-0.5x[n-1]$$
an IIR filter? My answer is yes.
Thank you
This is the FIR filter, although it looks like an IIR. If you calculate the coefficients you get finite impulse response:
$h[n]=\delta[n]$
This happens due to zero-pole cancellation:
$Y(z)-0.5Y(z)z^{-1}=X(z)-0.5X(z)z^{-1}$
$H(z)=\dfrac{Y(z)}{X(z)}=\dfrac{1-0.5z^{-1}}{1-0.5z^{-1}}=1 $
Yes, it can be tricky. Seeing $y[n-k]$ coefficients in LCCDE (Linear Constant Coefficients Difference Equation) doesn't necessarily mean it's an IIR filter. It might be just a recursive FIR filter.
pwelch
with appropriate window.
$\endgroup$
Jojek's answer is of course correct. I would just like to add some more information because much too often have I seen the terms "IIR" and "recursive" confused. The following implications always hold:
$$\begin{align}\text{IIR}& \Longrightarrow\text{recursive}\\ \text{non-recursive}&\Longrightarrow\text{FIR}\end{align}$$
i.e. every IIR filter (i.e. a discrete-time filter having an infinitely long impulse response) must be implemented recursively (unless you have infinite memory available), and every non-recursive LTI system has a finite impulse response (again, unless you have infinite memory).
However, the reverse is generally not true. A recursive filter can have a finite impulse response, as is the case for the example in the question. Another famous example is a moving average filter. This a non-recursive implementation of a moving average (necessarily FIR):
$$y[n]=\frac{1}{N}\sum_{k=n-N+1}^nx[k]$$
And this is a recursive implementation of the same filter (also FIR): $$y[n]=y[n-1]+\frac{1}{N}(x[n]-x[n-N])$$