Questions tagged [infinite-impulse-response]

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

Filter by
Sorted by
Tagged with
4
votes
1answer
1k views

How does this “simple filter” work?

I'm new to DSP, and I'm using this basic "1-pole LPF" Param Smooth filter which "smooth" param when I change it. The code is pretty simple: ...
3
votes
3answers
840 views

Berchin's FDLS arbitrary filter design algorithm

I'm trying to use Berchin's FDLS methods (for those that don't know what it is, it's a way to design arbitrary magnitude and phase of an IIR Eq) I tried different things but neither gave me what i ...
24
votes
5answers
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 ...
22
votes
2answers
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 ...
14
votes
1answer
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 ...
8
votes
2answers
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 ...
8
votes
6answers
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?
2
votes
1answer
3k 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, ...
5
votes
2answers
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 ...
2
votes
3answers
1k views

How to design very narrow, sharp lowpass filters - Only DC needed?

I asked exact the same here one year ago: One year ago question I asked this question again here, because after one year, I have learned more about DSP and am thinking ways to improve it. Filter ...
3
votes
1answer
853 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 ...
4
votes
1answer
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 ...
10
votes
1answer
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 ...
20
votes
3answers
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 <...
4
votes
1answer
185 views

Advancing a causal IIR filter's impulse response

Given an infinite impulse response (IIR) filter as coefficients in a topology of your choice, what is a straightforward way to modify the filter so that the impulse response is shifted in time (...
1
vote
2answers
2k views

How to design a filter with custom group delay — why is it an IIR?

Say I have an FIR filter with desired magnitude characteristics. I could imagine using an allpass IIR in series with the FIR to alter the group delay characteristic to provide both a 'magnitude ...
2
votes
1answer
393 views

Design Lowpass Filter With -7.5 dB/Octave Rolloff

I am working on a project that needs a lowpass filter with a -7.5 dB/Octave rolloff. This is somewhere between the rolloff of a one-pole and two-pole filter, so I wanted to ask what some standard ...
4
votes
2answers
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 ...
3
votes
2answers
988 views

Matlab `filtfilt` provides excessive transient

I observed that filtfilt suffers from an undesired behavior when I provide IIR bandpass filters having steep transition bands. Specifically, the output signal exhibits excessive transient response; ...
3
votes
1answer
661 views

Complex IIR to Real IIR

I have created an IIR design algorithm that generates complex coefficients (there is no symmetry in the poles and zeros). However, the IIRs will be used to filter a real signal. Is there a closed form ...
1
vote
1answer
141 views

Shall a $1^{\rm st}$ order IIR filter include $x[n-1]$ term?

I have seen a $1^{\rm st}$ order IIR filter in the following form: $$y[n] = \alpha x[n] + (1 - \alpha) y[n - 1]$$ Such as: another post in this forum However, the filters generated by Matlab, such ...
0
votes
1answer
324 views

Custom nearly-linear-phase IIR filter computation gone wrong

I'm using the code in this book: Algorithms for the constrained design of digital filters with arbitrary phase and magnitude responses to compute nearly-linear-phase IIR EQs. ...
5
votes
6answers
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 ...
15
votes
3answers
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 ...
17
votes
2answers
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, ...
3
votes
2answers
3k views

Hilbert transform filter for audio applications: Using IIR half-band parallel all pass structure

Does anyone have any experience designing wideband IIR Hilbert transform filters with audio applications in mind? I am using the filter for single side band modulation audio effects discussed in this ...
14
votes
2answers
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 ...
8
votes
2answers
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 ...
7
votes
1answer
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 ...
4
votes
1answer
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 ...
3
votes
3answers
2k views

Is there a way to derive an FIR filter using an IIR filter?

I know there's a thread similar to this one here, but the OP is asking the reverse of what I'm trying to find here. I've done some research on the web with very few sources coming up with actual ...
2
votes
1answer
3k views

Cutoff frequency of a first order recursive filter

I've implemented a very simple first order recursive low pass filter in c using the algorithm: ...
8
votes
3answers
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 ...
5
votes
6answers
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 ...
3
votes
0answers
290 views

IIR filters with variable roll-off

I have a filter design problem in which lowpass filters have to be designed with varying roll-off. E.g: 2.7 db/ocatve or 1.4 db/ocave. See picture below. This is easy to achieve with a FIR filter, ...
2
votes
1answer
163 views

Given Gain function, how to design a causal, stable and minimum phase IIR filter?

I am given $|H(\omega)|$, I wonder if minimum phase stable causal filter is unique and how to calculate it.
1
vote
1answer
484 views

Zero-Phase Algorithm in Matlab

From this document it's says 1.Filter the Data 2.Flip that 3.Filter again 4.and Flip that again for zero-phase filter. but when i do this in matlab , i'm compare ...
1
vote
2answers
2k views

Check if a filter is IIR or FIR

I have the following equation: $$H(z) = \frac{z^3+5z^2+3z+1}{10z^3}$$ I want to find out whether if its IIR or FIR. Here is the steps I have gone so far: $$H(z) = \frac{1}{10}\frac{z^3+5z^2+3z+1}{z^...
0
votes
1answer
522 views

DFT in IIR filters

To further summarize, I want to create a function in matlab that finds the time domain signal $y(n)$ and its $n$ time components ($n=0,1,2,...$) given the numerator and denominator of a transfer ...
8
votes
2answers
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 ...
5
votes
1answer
1k views

DC blocking IIR filter clipping?

I'm processing audio data for voice input from a mic. The data arrives in 32 bit floats [-1 ~ +1]. My first filter is to remove DC: ...
3
votes
1answer
711 views

How does parallel structure implementation of IIR speed up the process ? What happens in case of FIR?

I was learning about digital filter structures and there I came to know that parallel implementation of IIR filters speeds up the process and I understand that.But what I am not convinced of is that ...
3
votes
2answers
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 ...
2
votes
1answer
163 views

How would I calculate the state-variables of digital biquad filter (direct form II transposed) at steady-state?

I'm attempting to calculate the steady-state state variables for a digital biquad filter direct form II (transposed). Illustration For example, let assume the filter is fed a constant input of ...
2
votes
1answer
2k views

Fitting an IIR filter to a complex transfer function

anybody knows of better ways to fit an IIR filter to a complex transfer function than Matlab's invfreqz.m? I'm implementing a little transfer function fitting ...
2
votes
2answers
491 views

Find reverse one pole lowpass filter

I need to find a filter that revert the one pole filter of the current signal, a function using Python (or MATLAB) scipy.signal.filtfilt or ...
1
vote
1answer
195 views

Real-time modulated IIR filter

I've been learning to implement an IIR filter for a synthesizer project. It is now more or less stable when the parameters are constant, but ultimately I want the parameters to be arbitrarily ...
1
vote
1answer
219 views

Group cascading IIR filters of different orders

Is it possible to make one IIR filter from various cascading IIR filters of different orders? I know it is possible to do it from filters of the same order, but what about filters with different ...
0
votes
0answers
102 views

Estimating frequency when there's little isolation between signal and noise frequencies

Say I have a signal which is guaranteed to have a frequency between 110-120 Hz but is corrupted by interference signals that're very close to this frequency range. For example, let the interference ...
0
votes
1answer
170 views

Is initializing a digital filter's output with no “momentum” a non-trivial task?

I'm working on implementing a filter with a very slow step response. This filter is implemented as a cascaded second-order-section filter (transposed direct form 2). I'm using the output of this ...