# Questions tagged [infinite-impulse-response]

Infinite impulse response (IIR) is a property of signal processing systems.

327 questions
Filter by
Sorted by
Tagged with
40k views

### Filter order vs number of taps vs number of coefficients

I'm learning DSP slowly and trying to wrap my head around some terminology: Question 1: Suppose I have the following filter difference equation: $$y[n] = 2 x[n] + 4 x[n-2] + 6 x[n-3] + 8 x[n-4]$$ ...
15k views

### What Is the Best First Order IIR (AR Filter) Approximation to a Moving Average Filter (FIR Filter)?

Assume the following first order IIR Filter: $$y[n] = \alpha x[n] + (1 - \alpha) y[n - 1]$$ How can I choose the parameter $\alpha$ s.t. the IIR approximates as good as possible the FIR which is ...
29k views

### Applying filter in scipy.signal: Use lfilter or filtfilt?

I saw in a SO thread a suggestion to use filtfilt which performs backwards/forwards filtering instead of lfilter. What is the ...
10k views

### How does cascading biquad sections for higher order filters work?

I'm trying to implement an 8th order IIR filter and every application note and textbook I've read says that it is best to implement any filter of order more than 2 as second order sections. I used <...
3k views

### Are there any standard implementation forms for tunable Butterworth filters?

One of the standard ways to implement a Butterworth filter is with a cascade of second-order sections, each corresponding to a pair of complex-conjugate poles. For a fourth-order filter, for example, ...
2k views

### What factors should I consider when choosing an IIR filter realization?

IIR filters may be implemented as direct form 1 or 2. But how do you decide which form to use? What are the pros and cons of each?
1k views

### How can I design a very narrow filter?

Suppose I've got an audio signal sampled at $48000$ Hz, and I'd like to design a low-pass filter that isolates everything below ~$60$Hz. In the digital world, this is a low-pass filter with the ...
5k views

### Digital filter design basic principles (IIR/FIR)

Although I have a solid experience in designing audio engines and such, I am fairly new to the realm of Digital Filter Design, particularly IIR and FIR filters. In other words, I'm trying to learn as ...
1k views

### What bandpass filter design will yield the shortest impulse response?

Designing a simple 2nd order IIR bandpass Buterworth filter with a centre frequency of 500 Hz and a 1 octave bandwidth gives me the following frequency response ... Now, if I take the impulse ...
2k views

### What's the advantage of adaptive IIR filter against FIR?

Adaptive IIR filters is not straightforward, and may be unstable. Many people say that adaptive IIR filters use less coefficients than FIR filters. What I'm curious about is how many coefficients can ...
1k views

### How can I vectorize the computations for a first-order recursive filter?

I have a simple single pole low pass filter (for parameter smoothing) that can be explained by the following formula: $$y[n] = (1-a) y[n-1] + a x[n]$$ The architecture that I'm using has access ...
2k views

### IIR Filter for Smoothing (Low Pass Filter)

I am using IIR filter for smoothing $$y[n] = ax[n]+(1-a)y[n-1]$$ My question is, if I add another IIR filter, will it be the second order of IIR filter? If not, what it can be called? My second ...
8k views

### What is the exact meaning of unstable system in DSP?

In physical systems I understand what is the meaning of stability or unstability. An operational amplifier for example, if working in positive feedback will either saturate or start osscilating (i.e ...
3k views

### Convert a FIR to an equivalent IIR

Is there a way to convert a FIR to an IIR filter with the most similar behavior?
7k views

### Filter Order Rule of Thumb

Is there a rule of thumb for calculating the approximate filter order of a FIR/IIR based on passband vs sample rate? I seem to remember reading about it once in Undergrad. I'd think you could make a ...
3k views

### Downsampling lowpass filter for audio: FIR or IIR?

I'm working on a real-time audio processing project in which I have to downsample a 44.1 kHz to a yet-to-be-determined lower sampling rate essentially for reducing computational complexity. I'm ...
6k views

### How does MATLAB handle IIR filters?

MATLAB has a butter, which constructs a Butterworth filter given an order and relative cutoff frequency. The filter created can be used to ...
952 views

### complementary IIR filters

I would like a pair of complementary IIR filters (lowpass/highpass). By complementary, I mean, when the output from the two filters is summed, the original signal is recovered. I thought I could build ...
348 views

### Protect an IIR filter from being reverse-engineered

I created a somewhat unique IIR filter and I want to protect the filter from being reverse-engineered I think you all know it is quite easy to get all the different weights of an IIR by using impulse ...
2k views

### Do FFT-based filtering methods add intrinsic latency to a real time algorithm?

In a current audio processing application, I am working entirely in the time domain using IIR filters. This is so I can use an audio buffer of just 3 or 4 samples and can guarantee that there will be ...
141 views

### Why can adaptive IIR filters result in unstable solutions?

For adaptive filtering, both finite and infinite impulse response (FIR/IIR) filters can be utilized. As an advantage of FIR filters in this context, guaranteed stability is often mentioned, while IIR ...
3k views

### Realtime fixed point IIR filter implementation in C

I would like to implement a fourth order fixed point low-pass IIR filter in C (with Q15 arithmetic), and I will prepare this filter by using two stages cascaded direct form-II bi-quad filters. I have ...
994 views

### Zero Phase Filter: Determining Initial Conditions for Forward Backward Filtering

Is anybody familiar with Gustafson's algorithm for minimizing transients in forward backward filtering [1]? I'm trying to implement it and my first guess was to check Matlab's filtfilt.m, since they ...
290 views

### Designing an IIR to generate a specific data sequence

I know that it's possible to design an IIR with specific poles and zeroes to create specific frequency responses. Is it also possible to design an IIR such that when you give it an impulse, it ...
1k views

### Complex Least Squares FIR filter design using Levinson' s algorithm

i'm trying to implement an arbitrary IIR filter design. I'm decomposing all the algorithm into smaller pieces that i can test. I currently am on the part where it designs a FIR filter from an ...
413 views

### Optimal $n$ -th Order IIR /AR Approximation of a Moving Average Filter

I would like to approximate a moving average filter with an IIR filter of much lower order than the tap-length of the moving average filter. Optimality shall refer to the $L_2$ norm of the impulse ...
4k views

### best implementation of a real-time, fixed-point iir filter with constant coefficients

I have implemented IIR filter in direct form, parallel form, and cascade form. The input in all the cases is a kronecker delta function. How to judge which implementation is better is in real time and ...
2k views

### Frequency Domain Filtering

Can you create a zero phase IIR filter by transforming its impulse response into frequency domain and only taking the magnitude of that frequency repsone? I have seen this in an open source project ...
2k views

### Why is the first value in digital first-order IIR filter impulse response not the largest?

When I create a digital first-order IIR low-pass filter with scipy (code below), I get the following coefficients: B: [ 0.1367 0.1367] A: [ 1. -0.7265] The ...
871 views

### Is there a common name for the first order IIR averaging filter?

Is there a term to describe this IIR averaging/smoothing filter? $y[n] = \alpha x[n] + (1 - \alpha) y[n - 1]$
592 views

### Understanding $\mathcal Z$-transforms and pole locations

I am trying to gain a better understanding of pole locations in the $z$-plane of a given discrete transfer function, $H(z)$. I think I have a pretty good understanding of how to use the $\mathcal Z$-...
3k views

### Design of a digital A-weighting filter with arbitrary sample rate

I want to A-weight a time series with arbitrary sample rate. An analog A-weighting filter is defined exactly by IEC 61672-1. But there's no definition for a digital filter. One method is to use the ...
322 views

1k views

### Step response overshoot in IIR filters

Is there an analytic expression by which it is possible to calculate overshoot of step-response of second order IIR digital filter? I have tried to search through Mitra's signal processing book and ...
3k views

### Is it possible to design noncausal filters in Matlab?

I'm trying to design a lowpass IIR filter with 5Hz cutoff frequency (sample frequency is 200Hz). i know how to create it with fdatool, or with functions such as 'butter' or 'ellip'. However, i think ...
1k views

### Least-squares digital IIR filter design (with arbitrary responses)

I'm studying the IIR filter design that is described in the book: Algorithms for the constrained design of digital filters with arbitrary phase and magnitude responses. You can get the code at page ...
177 views

### references for techniques to reduce recursive filter startup transients

I am trying to track down references (published articles or reports ideally) that establish the basis for some of the techniques being used to minimize the effect of recursive digital filter startup ...
522 views

### How to implement a FIR filter with correction of group delay on c#?

I read respect to digital filters, and implemented both IIR and FIR filters and I found that this type of filters have a called "group delay". Now I know that the IIR have a non-linear group delay and ...
420 views

### Discrete-time Biquad filter: Relation between peak frequency and pole frequency

This question arose from a discussion in the comments to this question and its answer. The author of that question discussed a discrete-time second order filter described by the following difference ...
5k views

### Are all IIR filters unstable in nature?

I know this question has been asked here numerous times. But I am still unclear here :( My book says, A linear time-invariant system is stable if its impulse response is absolutely summable. (G. ...
582 views

### Design a linear-phase FIR filter approximating the magnitude of a given IIR filter

I have a biquad IIR filter from which I want to get a linear-phase FIR. I saw that related question but the OP does not care much about phase. I have troubles getting the exact same magnitude curve ...