## FIR filter vs IIR filter

This page on FIR filter vs IIR filter describes **difference between FIR filter and IIR filter** .

**FIR filter** uses only current and past input digital samples to obtain a current output sample value.
It does not utilize past output samples.Simple FIR equation is mention below.

y(n)= h(0)x(n) + h(1)x(n-1) + h(2)x(n-2) + h(3)x(n-3) + h(4)x(n-4)

**IIR filter** uses current input sample value, past input and output samples to obtain current output sample value.Simple IIR equation is mention below.

y(n)= b(0)x(n) + b(1)x(n-1) + b(2)x(n-2) + b(3)x(n-3) + a(1)y(n-1) + a(2)y(n-2) + a(3)y(n-3)

Transfer function of FIR filter will have only zeros, need more memory, while transfer function of IIR filter will have both zeros and poles and will
require less memory than FIR counterpart.

FIR filters are preferred due to its linear phase response and also they are non-recursive. Feedback is not involved in FIR, hence they are stable.
IIR filters are not stable as they are recursive in nature and feedback is also involved in the process of calculating output sample values.

FIR filter consume low power and IIR filter need more power due to more coefficients in the design.

IIR filters have analog equivalent and FIR have no analog equivalent.

FIR filters are less efficient while IIR filters are more efficient.

FIR filters are used as anti-aliasing,low pass and baseband filters. IIR filters are used as notch(band stop),band pass functions.

FIR filter need higher order than IIR filter to achieve same performance. Delay is more than IIR filter. It has lower sensitivity than IIR filter. These are disadvantages of FIR filters.

### FIR/IIR filter MATLAB Functions/Tools

**fir1** function- It used to obtain FIR filter coefficients.

**filter(chn,X)** function- It is used to filter baseband data vector X with 'chn' filter coefficients

**FDATOOL** - Filter design and analysis tool

**FIRRCOS** function- Raised cosine FIR filter design

butter,bessel,cheby1,cheby2,ellip are IIR filters of various types.

### MATLAB Source codes

FIR Filter

IIR Filter

Low Pass FIR

### Low Pass FIR Filter Verilog

### Useful Links

https://www.mathworks.in/

https://www.fourier-series.com/ - Simulation with audio in interactive mode

### What is Difference between

difference between FDM and OFDM

Difference between SC-FDMA and OFDM

Difference between SISO and MIMO

Difference between TDD and FDD

Difference between 802.11 standards viz.11-a,11-b,11-g and 11-n

OFDM vs OFDMA

CDMA vs GSM

Bluetooth vs zigbee

Fixed wimax vs mobile