Questions tagged [infinite-impulse-response]

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

Filter by
Sorted by
Tagged with
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 ...
user avatar
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]$$ ...
stackoverflowuser2010's user avatar
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 ...
Bar's user avatar
  • 437
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 ...
Royi's user avatar
  • 19.6k
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 <...
anasimtiaz's user avatar
  • 1,059
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, ...
datageist's user avatar
  • 4,897
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 ...
bitwise's user avatar
  • 273
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?
anasimtiaz's user avatar
  • 1,059
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 ...
Phonon's user avatar
  • 5,216
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 ...
jeremy's user avatar
  • 509
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 ...
learnvst's user avatar
  • 1,513
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 ...
Dan Boschen's user avatar
  • 51.3k
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
Black Yasmin's user avatar
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 ...
Alexander Zhang's user avatar
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?
Andrea's user avatar
  • 539
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 ...
Simactricals's user avatar
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 ...
user1132968's user avatar
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 ...
Phonon's user avatar
  • 5,216
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 ...
sai priya's user avatar
  • 125
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 ...
DSP novice's user avatar
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 ...
user4234's user avatar
  • 133
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 ...
gpuguy's user avatar
  • 1,370
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 ...
user967493's user avatar
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 ...
DSP_CS's user avatar
  • 1,910
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 ...
Jeff's user avatar
  • 89
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 ...
user2561747's user avatar
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 ...
learnvst's user avatar
  • 1,513
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 ...
albin's user avatar
  • 183
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 ...
Andreas's user avatar
  • 1,968
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 ...
Bjorn Roche's user avatar
  • 1,006
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, ...
Mark's user avatar
  • 173
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 ...
Jonas Schwarz's user avatar
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 ...
Todor Petkov's user avatar
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 ...
Alan Wolfe's user avatar
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 ...
Dan Boschen's user avatar
  • 51.3k
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 ...
user967493's user avatar
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 ...
adr's user avatar
  • 185
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?
random_dsp_guy's user avatar
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 ...
ion_one's user avatar
  • 195
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 ...
burnpanck's user avatar
  • 169
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 ...
LWZ's user avatar
  • 181
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 ...
filaton's user avatar
  • 217
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] $
MaxRunFast's user avatar
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 ...
ZR Han's user avatar
  • 3,228
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 ...
Devesh Lohumi's user avatar
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 ...
Nick M's user avatar
  • 73
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 ...
Zahi Azmi's user avatar
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 ...
user7358's user avatar
  • 1,100
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 ...
dekuShrub's user avatar
  • 153
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?
DSP_CS's user avatar
  • 1,910

1
2 3 4 5
11