element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
FPGA
  • Technologies
  • More
FPGA
Blog The Art of FPGA Design Season 2 - Post 20
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join FPGA to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fpgaguru
  • Date Created: 31 Jul 2025 7:09 PM Date Created
  • Views 338 views
  • Likes 7 likes
  • Comments 2 comments
  • xilinx
  • fpgafeatured
  • fpga
  • dsp
  • guest writer
Related
Recommended

The Art of FPGA Design Season 2 - Post 20

fpgaguru
fpgaguru
31 Jul 2025

IIR Filters 101

I will try to keep the math side of things as light as possible but we cannot avoid it completely, so I will use the hand waving proof technique. If you have any doubts or questions about the statements made here without any proof, please use the comments and I will try to address them there. 

The first thing we will need is the z transform, the discrete version of the Laplace transform. For a sequence of discrete samples x(n), its z transform is defined as: 

image

where

image

and

image

Here T is the sample period, fs is the sample rate and f is the frequency at which z and X(z) are being evaluated. The other important thing to know is that if we delay the time sequence x(n) by one clock, in the z domain this is equivalent to multiplying X(z) by z-1. So the transfer function of a register delay is z-1.

In general an IIR of order N is defined by the time domain finite difference equation: 

image

that is the next output sample y(n) is a linear function of the previous N-1 output samples and N input samples. FIRs are just particular forms of IIRs when all ak=0. Trying to derive the IIR filter impulse response and frequency transfer function from the a and b coefficients is no longer obvious and that's where the z transform helps. In the z domain the time domain difference equation becomes: 

image

With a bit of rearranging this gives us the z domain IIR filter transfer function H(z):  

image

For N=2 we get the famous biquads, with 5 non-trivial coefficients. Any even order N IIR can be decomposed into a cascade of N/2 biquads, each one with 5 coefficients, with an extra first order section with 3 coefficients if N is odd. 

H(z) can now be evaluated for any frequency f using image, which gives us H(f), the IIR filter frequency domain transfer function. H(f) is always a complex function, even when all coefficients are real, and if represented in polar coordinates 

image

are the filter's attenuation and phase as a function of frequency, while

image

is the filter's group delay (the one which is a constant for linear phase FIRs). So with a bit of trigonometry and complex algebra the attenuation, phase and group delays of any IIR of any order N can be evaluated for any frequency f. 

As mentioned earlier, large order IIRs are never implemented directly due to coefficient sensitivity problems, cascades of second order biquad sections are always used, things like this: 

image

or its dual form: 

image 

While this might make sense from a mathematical point of view, we will see in the next blog post that especially for FPGA hardware implementations, there are much better ways to build IIR filters. 

Back to the top: The Art of FPGA Design Season 2

  • Sign in to reply
  • fpgaguru
    fpgaguru 1 month ago

    Wait until you see the next blog post! 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Andrew J
    Andrew J 1 month ago

    Glad you kept the maths simple Smiley

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube