Skip to content

Infinite Impulse Response (IIR) filters and Finite Impulse Response (FIR) filters

License

Notifications You must be signed in to change notification settings

Nariman-Z/IIR-Filters-and-FIR-Filters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Repo Banner - IIR-Filters-and-FIR-Filters

IIR Filters and FIR Filters
- Infinite Impulse Response (IIR) filters and Finite Impulse Response (FIR) filters -

Definition and Basic Characteristics:

IIR Filters:

  • Infinite Impulse Response (IIR) filters have an impulse response that theoretically continues indefinitely.
  • Characteristics:
    • Can achieve a desired frequency response with a lower order (fewer coefficients) compared to FIR filters.
    • Often implemented using recursive algorithms, meaning the output depends on previous outputs.
    • Commonly designed using analog filter design methods and then transformed into digital filters.
    • More efficient in terms of computational resources due to fewer coefficients.
    • May suffer from stability issues if not properly designed.

FIR Filters:

  • Finite Impulse Response (FIR) filters have an impulse response that settles to zero in a finite number of steps.
  • Characteristics:
    • Non-recursive: the output depends only on current and past input values.
    • Always stable, as they do not rely on feedback.
    • Easier to design with exact linear phase characteristics.
    • Require more coefficients to achieve a similar frequency response as IIR filters, making them potentially more computationally intensive.

Mathematical Representation:

IIR Filters:

  • The output of an IIR filter is given by the following difference equation:
    • $y[n]=-\sum_{k = 1}^{M} aky[n-k]+\sum_{k = 0}^{N} bkx[n-k]$
  • Where:
    • $y[n]$ is the output signal at time $n$.
    • $x[n]$ is the input signal at time $n$.
    • $ak$ and $bk$ are the filter coefficients.
    • $M$ is the order of the feedback part (denominator).
    • $N$ is the order of the feedforward part (numerator).

FIR Filters:

  • The output of an FIR filter is given by:
    • $y[n]=\sum_{k = 0}^{N} bkx[n-k]$
  • Where:
    • $y[n]$ is the output signal at time $n$.
    • $x[n]$ is the input signal at time $n$.
    • $bk$ is the filter coefficient.
    • $N$ is the order of the filter (number of taps minus one).

Design and Implementation

Design of IIR Filters:

  • Typically designed using analog filter design techniques (e.g., Butterworth, Chebyshev, Elliptic filters) and then transformed into digital form using methods like bilinear transformation.
  • Design involves determining the poles and zeros of the transfer function to meet specific criteria such as passband, stopband, ripple, and attenuation.

Design of FIR Filters:

  • FIR filters can be designed using windowing techniques (e.g., Hamming, Hanning, Blackman windows) or by optimization methods like the Parks-McClellan algorithm.
  • Design involves directly specifying the filter coefficients to achieve a desired frequency response.

Applications

IIR Filters:

  • Suitable for applications where computational efficiency is critical, such as real-time signal processing.
  • Commonly used in audio processing, communications, and control systems.

FIR Filters:

  • Ideal for applications requiring a linear phase response, such as data transmission and image processing.
  • Often used in applications where filter stability is paramount.

Comparison

  • Efficiency: IIR filters are generally more efficient due to fewer coefficients.
  • Stability: FIR filters are inherently stable, while IIR filters can be unstable if not designed carefully.
  • Phase Response: FIR filters can be designed to have a linear phase, which is challenging for IIR filters.
  • Design Complexity: IIR filters are usually more complex to design due to the need for stability considerations.

Summary

Understanding the fundamental differences and appropriate applications of IIR and FIR filters is crucial for designing efficient and effective digital signal processing systems. Each filter type has its own strengths and trade-offs, making them suitable for different kinds of applications based on specific requirements related to stability, phase linearity, and computational efficiency.

License:

This project is licensed under the MIT License - see the LICENSE.md file for details.



Made with ♥️ by: Nariman_Z

See also: My Website

Last Edited on: June 14, 2024

About

Infinite Impulse Response (IIR) filters and Finite Impulse Response (FIR) filters

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages