Questions tagged [finite-impulse-response]

A finite impulse response (FIR) filter is a type of a signal processing filter whose impulse response is of finite duration.

Filter by
Sorted by
Tagged with
17
votes
3answers
53k views

FIR filter with linear phase, 4 types

I know there are 4 types of FIR filters with linear phase, i.e. constant group delay: (M = length of impulse response) Impulse response symmetrical, M = odd Imp. resp. symmetrical, M = even Imp. resp....
22
votes
3answers
7k views

FIR Filter Design: Window vs Parks McClellan and Least Squares

Are there any advantages to use a window approach over Parks-McClellan (further abbreviated here as PMcC) or Least Squares algorithms for FIR filter design of a low pass filter? Assume with today's ...
11
votes
2answers
6k views

Why would one use a Hann or Bartlett window?

Suppose we're designing a low-pass FIR filter, and I want to use one of these three windows: Bartlett, Hann or Hamming. From Oppenheim & Schafer's Discrete-Time Signal Processing, 2nd Ed, p. 471:} ...
8
votes
2answers
797 views

Gaussian FIR filter with no multipliers?

What is the simplest way to implement a Gaussian FIR filter with unity gain coefficients and no multipliers? Please preface your answer with spoiler notation by typing the following two characters ...
28
votes
6answers
32k views

Why is a linear phase important?

If symmetry conditions are met, FIR filters have a linear phase. This is not true for IIR filters. However, for what applications is it bad to apply filters that do not have this property and what ...
27
votes
2answers
51k views

What is the cut-off frequency of a moving average filter?

I need to design a moving average filter that has a cut-off frequency of 7.8 Hz. I have used moving average filters before, but as far as I'm aware, the only parameter that can be fed in is the number ...
17
votes
1answer
6k 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 ...
6
votes
5answers
5k views

3dB-Cut off frequency of moving average

I've read the thread: Cut off frequency of moving average And I use the second answer in my algorithm to calculate the 3dB cut off frequency of my filter, which works great, as my filter length is ...
13
votes
2answers
11k 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
5k 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?
16
votes
5answers
32k views

Why are FIR filters still stable even though they contain poles?

How come FIR filters are always stable? Since they contain poles, shouldn't they be more affected by stability issues than others?
6
votes
3answers
38k views

Group delay of the FIR filter

For an FIR filter, with symmetrical tap values $h[N-1-n]=h[n]$, why is the group delay $\frac{N-1}{2} T$ (where $N$ is the number of taps of the FIR filter and $T$ is the sampling time)? Why is ...
3
votes
3answers
3k 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
2answers
197 views

Can I set a constraint on the first tap of an FIR filter such that its inverse is stable?

Let's say I have the following FIR filter $h[n]$, so the output $y[n]$ for an input $x[n]$ is $$ y[n] = \sum_{k=0}^{m-1}x[n-k]h[k] $$ The inverse of this filter is given by the IIR difference ...
2
votes
3answers
2k 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 ...
4
votes
2answers
1k views

Are SOS structures better for linear phase FIR filters?

I've seen many discussions suggesting that SOS's are often/usually the preferred structure for fixed point hardware filter implementations, since they preserve conjugate pairs, etc., but I've never ...
3
votes
2answers
902 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 ...
1
vote
3answers
984 views

Help in understanding the formula of Signal-to-Noise-Ratio (SNR) - Part 1

Question 1: Consider an Autoregressive model : \begin{align} y[n] &= y[n-1] + x[n]\\ z[n] &= y[n] + w[n] \end{align} where $y$ is the output observation, $x$ is a random input and $w$ is ...
31
votes
2answers
48k 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]$$ ...
11
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 ...
2
votes
1answer
648 views

FIR to linear-phase FIR

I am trying to convert an FIR impulse into linear-phase FIR impulse, I need to remove the phase response, so when it is applied to a sound it only changes the amplitude response. Here is my code ...
3
votes
5answers
4k views

How to design very narrow band, very sharp low pass filters - Only DC needed?

I am using a DSP processor to sample signals at 108kHz and I only want to get the DC part out of it. Such a high sampling rate is used because I want to use oversampling to reduce quantization noises. ...
0
votes
3answers
395 views

How to reliably compute the group delay of a comb filter

I applied the following FIR comb filter in real-time: y[n]=x[n]-x[n-40] Since this is an FIR, the group delay is D=(N-1)/2=20 samples. After applying the filter ...
5
votes
2answers
9k views

Given the input and the output, how to determine the impulse response?

I would like to find the impulse response, $h[n]$, of an LTI system given the input $$x[n] = [1,-3,2]$$ and the output $$y[n] = [1,-1,-4,4]$$ I know that $y[t]=x[t]*h[t]$, but I am having hard ...
4
votes
1answer
3k views

Interpolating/Decimating CIC Filter Group Delay

I have an Interpolating Cascaded Integrator Comb (CIC) filter designed as so: Rate Change = 100 Number of Stages = 4 Differential Delay = 1 I'd like to calculate ...
3
votes
2answers
784 views

Raised-Cosine Filter - calculating phase response

I want to compute phase response of an raised-cosine FIR filter. I have trouble finding the complex transfer function of the filter in literature (there is a real valued transfer function of frequency)...
2
votes
1answer
370 views

Obtaining phase and magnitude of 2 spectral components after ADC

I am currently implementing a digital filter to obtain the output of a PID controller. The control loop is carried out by applying a 1kHz sine wave at the input of the system and reading the output ...
2
votes
2answers
1k views

Inter-filter bit width

I'm designing a $2$-stage filter and was simulating the effect of quantization to a certain number of bits at the filter output. The result I got was far from expected - and would appreciate any ...
2
votes
1answer
1k views

Minimum phase FIR method

I am trying to make a minimum phase filter (in wxMaxima) according to these steps: first create a "normal" FIR (a simple sinc, wc=0.4, random example, but in the pictures a remez with Octave) ...
0
votes
1answer
931 views

Removing an unwanted sinusoidal signal using FIR filter

I am learning about the $\mathcal Z$-transform and FIR filters and I do have problem with the following exercise: There is given signal $$x[n] = s[n]+\sin\left(2\pi f_n n\right)$$ where $s[n]$ is a ...
0
votes
2answers
96 views

What should be the cut off frequency of a Filter operating on an OFDM signal?

I have a time domain OFDM signal and to this I need to apply different linear filter however I am not sure on the cut off frequency. I am simulating for multiple symbols where each symbol has 1200 ...
0
votes
3answers
180 views

What is the need of IIR filter? When FIR have generally good/desirable characteristics?

FIR filters are generally stable and have linear phase response. These two characteristics are often desired in dsp So why do we need and use IIR filters,despite the fact that IIR filters often have ...
-1
votes
1answer
36 views

What exactly is stored in the buffer array in the code below? Is it the values of x[n-k] or something else?

What exactly is stored in the buffer array in the FIR Filter code below? Is it the values of x[n-k] or something else? ...
7
votes
6answers
4k 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 ...
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 ...
3
votes
1answer
8k views

Vector length output of discrete time convolution

Suppose that the impulse response of a discrete time filter is $h[i]$ where $i=0,1,2,...,N-1$ and the input sequence to the filter is $x[i]$ for $i=0,1,2,.., M-1,$ what would be the length of output ...
4
votes
4answers
3k views

Negative result from filtering a positive signal with a band-pass filter

I have used scipy.signal.remez to calculate the coefficients for a band-pass filter and when I use it to filter a sinusoidal signal that goes between 0 and some positive number (e.g. $2^{16}$) I get ...
3
votes
3answers
477 views

Force Linear Phase for a FIR Filter Synthesized Using Berchin's FDLS?

As a follow-on to this post, how would you force linear phase for a FIR filter you synthesized using Berchin's FDLS?
3
votes
2answers
12k views

Difference Between Equiripple & Least Squares Design for FIR Digital Filters

For an efficient and optimized digital FIR filter design, there are two methods available broadly, Equiripple filter design & Least Squares filter design. A general method for designing a filter ...
20
votes
7answers
9k views

Where can I get an open source implementation of the Parks-McClellan optimal FIR filter design algorithm?

Background: Often times I am doing some sort of signal processing task that requires a unique filter. Usually at this point I go to MATLAB and generate a new unique filter using $\tt firpm()$. The ...
5
votes
2answers
305 views

Practical Least Squares FIR filter design: How to find a realistic desired response

I'm using Matt. L.'s lslevin.m function to design long ($N\approx 400$) filters to an arbitrary phase and magnitude specification. The specification is the result of a numeric optimization and does ...
2
votes
1answer
962 views

Multi-Stage digital FIR filter vs Single stage FIR filter. Which is better?

Can anyone provide an insight to select a filter structure out of multi-stage and single stage FIR filter?(it will be great help if references are also provided) Let's say I have to make 50 tap filter....
0
votes
2answers
6k views

Causal and non-causal systems in real world

Causal systems are defined as the systems whose : Output depends on present as well as past inputs and the impulse response; and sometimes depends also on the past outputs (in case of recursive ...
9
votes
3answers
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 ...
5
votes
1answer
4k views

What exactly is Savitzky-Golay differentiation filter?

I could understand Savitzky-Golay filter as being smoothing filter, but then there also seems to be Savitzky-Golay differentiation filter, though for some reason, details do not seem to be clear. So ...
3
votes
1answer
965 views

Discrepancies between FFT-based Hilbert Transform and FIR filter results

I compared the results of Hilbert Transform as provided in scipy.signal.hilbert() (which is uses I/FFT as you can see in the source code) with its approximation implemented as FIR filter using coeffs ...
3
votes
2answers
3k views

Determining which Filter from a Z-Plane Plots?

How do i determine which FIR filter (LP, HP, BS, BP) it is from looking at it's z-plane plot?
2
votes
2answers
12k views

Determining the Filter Coefficients of an FIR Filter

I need to find the filter coefficients of an FIR filter that will block sinusoids of frequency $200\ \rm Hz$ if the sinusoid is sampled at $1.2\ \rm kHz$. I feel like this is a fairly simple problem,...
2
votes
2answers
3k views

Conjugate reciprocal pairs of zeros and poles in FIR design

Assuming the impulse response $h[n]$ of an FIR filter is real for all $n$, Why are zeros and poles in FIR design found in reciprocal and conjugate pairs? Is the assumption necessary for this ...
2
votes
3answers
2k views

getting frequency response from input and output signal

How does one get the frequency response of a filter, given an input signal and the signal output by the filter?