Analog.com Analog Dialogue Wiki 简体中文
EngineerZone
EngineerZone
  • Log In
  • Site
  • Search
  • User
  • Support

    Popular Forums

    • RF and Microwave
    • Power Management
    • Video
    • FPGA Reference Designs
    • Precision ADCs
    • Linux Software Drivers
    • SigmaDSP Processors & SigmaStudio Dev. Tool

    Product Forums

    • A2B
    • Amplifiers
    • Analog Microcontrollers
    • Clock and Timing
    • Data Converters
    • Direct Digital Synthesis (DDS)
    • Energy Monitoring and Metering
    • Interface and Isolation
    • MEMS Inertial Sensors
    • Processors and DSP
    • Switches/Multiplexers
    • Temperature Sensors
    • Voltage References
    View All

    Application Forums

    • Audio
    • Automated Test Equipment (ATE)
    • Condition-Based Monitoring
    • Depth, Perception & Ranging Technologies
    • Embedded Vision Sensing Library
    • Motor Control Hardware Platforms
    • Optical Sensing
    • Precision Technology Signal Chains Library
    • Video
    • Wireless Sensor Networks Reference Library

    Design Center Forums

    • ACE Evaluation Software
    • ADEF System Platforms
    • Design Tools and Calculators
    • FPGA Reference Designs
    • Linux Software Drivers
    • Microcontroller no-OS Drivers
    • Reference Designs
    • Signal Chain Power (SCP)
    • Software Interface Tools
    • System Demonstration Platform (SDP) Support
  • Learn

    Highlighted Webinar

    Audio Design Solutions for Augmented and Virtual Reality (AR/VR) Glasses

    Recent Discussions

    • Standalone Data logging using ADALM2000
    • About sdr.tx(). Can I change the transmitter frequency after call this function?
    • About the values of CurV1,2 displayed in the cursors frame of scopy.
    • Purpose of "Load" in Scopy signal generator configuration GUI
    • about the transient response experiment example of RL Circuit using adalm2000

    Places

    • ADI Education Home
    • ADI Education China
    • ADI Education India
    • ADI Education Philippines
    • StudentZone (Analog Dialogue)
    • Virtual Classroom

    Latest Webinars

    • Audio Design Solutions for Augmented and Virtual Reality (AR/VR) Glasses
    • Robust Industrial Motor Encoder Signal Chain Solutions
    • Precision Low Power Measurement Solutions for Intelligent Edge
    • Advantages of Integrating Digital Power System Management (DPSM) into your Design
    • Optimizing GaN and GaAs RF Amplifier Performance Using Novel Biasing Techniques
    View All Webinars
  • Community Hub

    Challenge Yourself!

      KCC's Quizzes AQQ231 about Birthdays and Cake Candles
    View All

    Places

    • Community Help
    • Logic Lounge

    Resources

    • EZ Code of Conduct
    • Getting Started Guide
    • ADI: Words Matter
    • Community Help Videos
    View All
  • Blogs

    Highlighted Blogs

    Understanding Public Key Infrastructures

     

    Share Your Insights! How Can We Improve Your Engineering Design Needs?

    Latest Blogs

    • 10BASE-T1L Makes Powering Intelligent Field Instruments Painless
    • Using Python To Control The Pluto Radio And Plot Data
    • Resistance is NOT Futile
    • What is The Continuity of Engineering?
    • Move Over Sensors: Actuators Are Entering The Smart Factory Stage
    Read All Blogs

    ADI Blogs

    • EZ Spotlight
    • The Engineering Mind
  • Partners

    Electronic Design Services - PartnerZone

    • Boston Engineering
    • Calian, Advanced Technologies
    • Colorado Engineering Inc. (DBA CAES AT&E)
    • Clockworks Signal Processing
    • Epiq Solutions
    • Fidus
    • PalmSens
    • Richardson RFPD
    • Tri-Star Design, Inc.
    • VadaTech
    • Vanteon
    • X-Microwave
    View All
SigmaDSP Processors & SigmaStudio Dev. Tool
  • Processors and DSP
SigmaDSP Processors & SigmaStudio Dev. Tool
Documents My IIR filter is outputting a value, even when the input goes to zero. Is this a bug?
  • Forums
  • Members
  • Tags
  • More
  • Cancel
  • Documents
  • +AD193x: FAQ
  • +ADAU1401AEBZ: FAQ
  • +ADAU144x: FAQ
  • +ADAU1452: FAQ
  • +ADAU145x: FAQ
  • +ADAU1701: FAQ
  • +ADAU1701MINIZ- FAQ
  • +ADAU1761: FAQ
  • +ADAU1772: FAQ
  • +ADI: FAQ
  • +AN-951: FAQ
  • +bitwise logic: FAQ
  • +Compressor Table Format: FAQ
  • +Creating a simple balance crossfade control: FAQ
  • +Creating constant-dB envelope decay using an existing linear decay algorithm: FAQ
  • +Crossover with more than 3 bands: FAQ
  • +E2PROM: FAQ
  • +EEPROM: FAQ
  • +EVAL DAU144XEBZ: FAQ
  • +EVAL-ADAU1781Z: FAQ
  • +Excluding Cells from the Exported System Files: FAQ
  • +GPIO button: FAQ
  • +GPIOs or Aux ADCs: FAQ
  • +How do I execute a software safeload write?: FAQ
  • +IIR coefficient filter: FAQ
  • -IIR filter: FAQ
    • My IIR filter is outputting a value, even when the input goes to zero. Is this a bug?
  • +Peak Full Range Compressor: FAQ
  • +Preserving "Ear-candy": FAQ
  • +Push Button Volume: FAQ
  • +self-boot EEPROM image: FAQ
  • +Sigma300 Family Products: FAQ
  • +SigmaDSP: FAQ
  • +SigmaStudio: FAQ
  • +single precision VS double precision: FAQ
  • +Stimulus-Probe Capability and Limitations: FAQ
  • +Stopwatch to Count Successive Samples: FAQ
  • +Toolbox into the schematic tab: FAQ
  • +USB communications between the PC and SigmaDSP: FAQ
  • +Using Hierarchy Boards to create re-usable code: FAQ

My IIR filter is outputting a value, even when the input goes to zero. Is this a bug?

I have a tone generator in SigmaStudio connected to a filter and then a peak detector. When I turn the tone on, I get the expected peak value. However, when I turn the tone off, the value doesn't quite reach zero. It just decays to a very small number. When I remove the filter and try again, the output value goes to zero. What's going on? Is this a bug?

This is not a bug. What you are seeing is a limitation in the biquad implementation of the IIR filters. IIR filters in the biquad architecture have several feedback loops that are summed with the input signal.

(image from Wikimedia Commons)

If the input signal instantly goes to zero, then x[n] becomes 0, and on the subsequent sample x[n-1] becomes 0, and on the subsequent sample x[n-2] becomes 0. However, -a1*x[n-1] and –a2*x[n-2] are being added back into the input signal, and b1*x[n-1] and b2*x[n-2] are being added into the output signal, y[n].

With infinite precision, the output will eventually fade to zero. However, a fixed-point DSP does not have infinite precision. The coefficients (a1, a2, b0, b1, b2) are quantized when they are stored in memory, along with the audio data. This means that at some point, the audio signal and the coefficients become very small, but due to rounding in the calculation, they may reach an idle value (or oscillating idle tone) instead of decaying completely to zero.

Slide 12 of this lecture from the University of Texas shows a good example of how quantization of coefficients causes the impulse response of a filter to decay to a nonzero value.

In this example image (taken from the lecture in the above link), the filter's impulse response decays to a fixed value. In some cases, the filter output decays to an oscillating signal with a fixed amplitude instead of a single value. This is referred to as a “Limit Cycle.”

More information on this topic can also be found here at the Bores DSP course site.

So, this is not a SigmaDSP or SigmaStudio bug. It’s just a limitation of fixed-point IIR filter design.

Switching to double-precision filters usually will alleviate this limit cycle issue.

This FAQ was generated from the following discussion: My IIR filter is outputting a value, even when the input goes to zero. Is this a bug?

  • filter
  • sigmastudio
  • sigmadsp
  • limit_cycle
  • Share
  • History
  • More
  • Cancel
Related
Recommended
Social
Quick Links
  • About ADI
  • ADI Signals+
  • Analog Dialogue
  • Careers
  • Contact us
  • Investor Relations
  • News Room
  • Quality & Reliability
  • Sales & Distribution
  • Incubators
Languages
  • English
  • 简体中文
  • 日本語
Newsletter

Interested in the latest news and articles about ADI products, design tools, training and events? Subscribe today!

Sign Up
Analog Logo
©1995 - 2023 Analog Devices, Inc. All Rights Reserved
沪ICP备09046653号-1
  • Sitemap
  • Legal
  • Privacy & Security
  • Privacy Settings
EngineerZone Uses cookies to ensure you get the best experience in our community. For more information on cookies, please read our Privacy & Security Statement.