Questions tagged [infinite-impulse-response]
Infinite impulse response (IIR) is a property of signal processing systems.
547
questions
38
votes
3
answers
43k
views
What is the advantage of MATLAB's filtfilt
MATLAB's filtfilt does a forward-backward filtering, i.e., filter, reverse the signal, filter again and then reverse again. Apparently this done to reduce phase ...
37
votes
2
answers
59k
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]$$
...
31
votes
2
answers
61k
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 ...
25
votes
5
answers
20k
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 ...
20
votes
3
answers
12k
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 <...
18
votes
2
answers
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, ...
17
votes
1
answer
7k
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 ...
17
votes
5
answers
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?
15
votes
3
answers
2k
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 ...
15
votes
2
answers
17k
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 ...
14
votes
2
answers
2k
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 ...
13
votes
3
answers
978
views
Mapping of Classic Filters for Digital Filter Design
Of the four classic analog filter types: Butterworth, Chebyshev, Elliptic and Bessel- are any of these relegated to obsolescence for purposes of digital filter design in comparison to optimized ...
12
votes
2
answers
2k
views
What kind of filter is that? Is it IIR?
I am trying to answer the following question:
Is the system described by equation:
$$y[n]=0.5y[n-1]+x[n]-0.5x[n-1]$$
an IIR filter? My answer is yes.
Thank you
12
votes
1
answer
3k
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 ...
10
votes
6
answers
7k
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?
10
votes
1
answer
2k
views
What is the maximum output of an IIR filter?
I am implementing an IIR filter in an embedded device based on ARM. It is implemented as a cascaded biquad structure (series of second order filters put back to back). The filter can be considered ...
10
votes
5
answers
2k
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 ...
10
votes
3
answers
4k
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 ...
9
votes
2
answers
7k
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 ...
9
votes
2
answers
2k
views
FFT-based fast convolution vs IIR filtering
I'm doing an multichannel audio equalizer system on a chip, which is parametric EQ, usually implemented in cascaded biquad IIR filters.
My problem is that I use a lot of IIR filters due to multiple ...
9
votes
2
answers
3k
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 ...
9
votes
5
answers
10k
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 ...
9
votes
2
answers
2k
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 ...
8
votes
6
answers
13k
views
Meaning of Phase response of a filter? In simple words?
What is meant by phase response of a filter? Often it is associated with restoration of signal shape,so if a filter has linear phase response, its output looks like input otherwise output is ...
8
votes
3
answers
559
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 ...
8
votes
7
answers
8k
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 ...
8
votes
1
answer
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 ...
8
votes
1
answer
4k
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 ...
8
votes
2
answers
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 ...
8
votes
2
answers
1k
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 ...
7
votes
2
answers
21k
views
Single-pole IIR low-pass filter - which is the correct formula for the decay coefficient?
A single-pole IIR low-pass filter can be defined in discrete time as y += a * (x - y), where y is the output sample, ...
7
votes
2
answers
589
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 ...
7
votes
4
answers
2k
views
Examples where non-linear phase filters are used
I stumbled apon this old question:
Why is a linear phase important?
There the explanation of why linear-phase processing (filtering) is important is very clear. Also the effects on waveforms due to ...
7
votes
1
answer
353
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 ...
7
votes
1
answer
134
views
Who first coined "Direct Form I" and "Direct Form II"?
I see "Direct Form I" and "Direct Form II" commonly in literature to refer to FIR / IIR implementation from the filter transfer function, and reference it myself, but where did ...
6
votes
2
answers
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 ...
6
votes
4
answers
6k
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 ...
6
votes
2
answers
877
views
How Is the MATLAB `filter()` Function So Fast?
How is the filter() implemented in MATLAB? How is it so fast?
What's the fastest implementation of a FIR filter?
6
votes
1
answer
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 ...
5
votes
6
answers
1k
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 ...
5
votes
3
answers
11k
views
How to find the group delay of IIR filters in Python/SciPy
I sent a square wave signal (red) through a IIR filter (butterworth in this case), to make it more "realistic". Then there's a slight group delay in my output signal (blue). Is there a way to find out ...
5
votes
2
answers
2k
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 ...
5
votes
3
answers
3k
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] $
5
votes
3
answers
1k
views
Why does the Direct form I become our first choice for fixed-point implementation?
I heard that the Direct form II transposed is better for floating-point and the Direct form I is better for fixed-point. Is it true?
I understand that DF2 and DF1T should never be used in fixed-point ...
5
votes
1
answer
1k
views
Why can't realisable IIR filters have linear phase?
I am studying IIR Filter Design and came across this arbitrary statement in my textbook which says that 'physically realisable and stable IIR filters can not have linear phase'. Would really ...
5
votes
1
answer
385
views
Jacobian Computation in Least Squares IIR Filter Design
Long time lurker and first time poster - but unfortunately I haven't had any joy untangling this on my own.
I've been studying Mathias Lang's thesis, Algorithms for the Constrained Design of Digital ...
5
votes
1
answer
21k
views
What is zero-phase filtering and forward-backward filtering?
I am pretty familiar with IIR and FIR filtering and I have implemented them in my several projects. However, recently i found something called zero phase filtering. I have tried to understand it but ...
5
votes
1
answer
2k
views
Design $ {L}_{2} $ Norm Optimal Infinite Impulse Response (IIR) Filters
It is widely known that matching a FIR filter of fixed length to a band model is an unconstrained QP-problem. The MATLAB function firls() implements a solution to ...
5
votes
1
answer
6k
views
Analytically designing a notch-filter for specified frequency 50 Hz
I tried to analytically construct a causal notch filter that stops frequencies at 50Hz and I thought if zeros are more than poles it will be non-causal so I chose equal amount of poles and zeros ...
5
votes
2
answers
9k
views
FIR butterworth also possible or just IIR?
can we use butterworth and other such filters like chebyshev,elliptic etc with FIR
or they can be only used with IIR?