The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [filter-design]

Fiter design is the process of designing a filter.

Filter by
Sorted by
Tagged with
20
votes
4answers
25k views

How many taps does an FIR filter need?

I am looking to design a set of FIR filters to implement a low pass filter. I am also trying to reduce the latency of the signal through the filter so I am wondering what the minimum number of taps I ...
15
votes
2answers
26k views

How do I manually plot the frequency response of a bandpass Butterworth filter in MATLAB without freqz function?

I have code like below that applies a bandpass filter onto a signal. I am quite a noob at DSP and I want to understand what is going on behind the scenes before I proceed. To do this, I want to know ...
1
vote
3answers
3k views

how to make CIC compensation filter

I gotta wrap my head around to design CIC compensation filter I'm studying by referring these materials: Altera, "Understanding CIC compensation filters Hardware Efficient FIR Compensation Filter ...
16
votes
3answers
45k 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....
21
votes
3answers
4k 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 ...
12
votes
3answers
3k views

“Low-pass filter” in non-EE, software API contexts

I am an experienced software engineer and am working on smartphone sensors. I've taken fundamental EE classes in DSP and am trying to apply my knowledge. I believe that I understand convolution, ...
23
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 ...
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
5k 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 ...
2
votes
3answers
6k views

FIR filter design with frequency sampling method - setting proper phase response for IDFT

I'd like to implement freuqency sampling method for linear phase FIR filter design using IDFT transform. My procedure goes like this : determine desired magnitude response value in frequency points ...
1
vote
2answers
816 views

FIR Filter Design - input parameters conversion

I am new to DSP and filter design. I have developed a code in C++ to calculate FIR coefficients using Parks-McClellan algorithm. The inputs to calculations are: Filter type (Low-Pass, High-Pass) ...
0
votes
3answers
792 views

How to implement Polyphase filter?

I am trying to implement the following 4-Tap Polyphase window shown in figure below and used in : polyphase filters- radio astronomy: lecture #8 by Prof. Dale E. Gary on Matlab. I have tried splitting ...
3
votes
2answers
3k views

How to remove or filter the drift problem in measured Strain signal?

I have the strain signal of a lateral beam of a car measured at sampling rate 1,200Hz from data acquiring system. Even after using temperature compensation in strain gage, we are getting drift. So I ...
3
votes
5answers
4k 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 ...
43
votes
6answers
44k views

Simplest way of detecting where audio envelopes start and stop

Below is a signal which represents a recording of someone talking. I would like to create a series of smaller audio signals based on this. The idea being to detect when 'important' sound starts and ...
15
votes
6answers
21k 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 ...
7
votes
4answers
4k views

Audio EQ Cookbook without frequency warping

The famous http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt offers a set of [real] biquad filter calculation formulas that generally work fine. However, when filter's frequency approaches Nyquist ...
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
2k 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, ...
8
votes
2answers
4k 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:} ...
3
votes
1answer
792 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 ...
1
vote
1answer
208 views

Precise Centre frequency of an All-pole digital filter

I'm not an engineer and have essentially taught myself all I know - this present problem is giving me some problems. I have an all-pole filter (a gammatone filter - impulse response is essentially a ...
0
votes
2answers
425 views

my Butterworth lowpass formulas do not agree with Fisher webpage

I want to implement Butterworth low-pass filter. Thanks to this question, I have found out that the filter coefficients can be generated using Tony Fisher web-site or using his code. But the problem ...
4
votes
1answer
2k views

What is the relation of the transition band's width and the filter order for the FIR windowing method

When designing an FIR filter using the windowing method, how can one estimate the filter order ? It's obvious that the type of window and the transitions band's width has some effect on the order.
4
votes
1answer
365 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 ...
-1
votes
2answers
527 views

how filters noise of same frequencies(lms)

I am sharing my assumption. Please correct and guide me If I am wrong. I can't understand or thinking my assumption is wrong somewhere. We can decompose voice signal or noise signal into a number of ...
28
votes
4answers
27k views

What is the true meaning of a minimum phase system?

What is the true meaning of a minimum phase system? Reading the Wikipedia article and Oppenheim is some help, in that, we understand that for an LTI system, minimum phase means the inverse is causal ...
16
votes
9answers
21k views

Why do we use window in time domain rather than do FFT modify the spectrum and than inverse FFT

I thought that DSP would be done by using FFT of portions of a signal, modify the samples that result from FFT (since they represent the spectrum of our signal + noise) and remove any unwanted signals ...
14
votes
2answers
5k views

Which IIR filters approximate a Gaussian filter?

So it recently dawned on me that Bessel filters, despite being listed along with the other common types, are really an oddball that belongs in a different "class", and I'm trying to learn more about ...
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 <...
6
votes
1answer
11k views

FIR filter gain

I'm writing a C function to generate bandpass FIR filter coefficients using a simple window method (more details here FIR filters by windowing) The important code snippet is the following (f1 and f2 ...
3
votes
3answers
25k 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 ...
4
votes
1answer
175 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 (...
5
votes
2answers
6k views

gabor filters for digital image processing

For the application of Gabor filters in feature-based (e.g. lines and edges in images) digital image processing, it is desired that the DC component is 0. Why is this so? What effect does it have ...
3
votes
4answers
15k views

Designing High Pass Filter to Remove DC Offset from a Signal

I want to design a high pass filter (f0*S/1+f0*S) in order to remove the dc offset from a signal ? (i.e. how to choose the frequency f0). Thanks, Hacene Ps : the filter is for MATLAB implementation, ...
4
votes
2answers
2k views

Realtime filtering on a microcontroller, with dynamic cut off frequencies

Is it possible to dynamically filter a signal in realtime on a microcontroller? What I mean by dynamically is to change the cut off frequency of the filter on the fly. I have some DSP knowledge ...
2
votes
1answer
319 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 ...
1
vote
1answer
174 views

Best way to process this signal

I am novice in signal processing, and i have to aplogise for my english level. The problem is the next: I work for foundries, in this sector the cast parts are manufactured pouring liquid metal in ...
2
votes
1answer
936 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) ...
2
votes
1answer
153 views

Estimate smartphone accelerometer bias

I was planning to develop Android / iOS applications that enable users to measure 3D length using their smartphones. According to this question, you need to know at least the time-varying bias that ...
1
vote
0answers
133 views

Issue with the Massberg Analog-Matched Low Pass Filter

Implemented the filter mentioned in title using Octave and couple sources Vicanek and Zeitlin (LPF.cpp). Got filter working otherwise but, ... when tested the responses against 'analog model' of the ...
1
vote
3answers
157 views

Complex Least Squares Approximation

In the case of frequency domain FIR filter design, the error function given by : $$E(\omega)=H(e^{j\omega})-D(e^{j\omega}) \tag{1}$$ is a linear function with respect to the unknown filter ...
1
vote
0answers
136 views

Basic “filtering” in digital communications

I am completely stuck on solving some problems for my digital communications class. Junior level undergrad class, so fairly basic. I have been searching around all day for related articles etc but can'...
1
vote
0answers
2k views

Filtering voice signal from randomly added frequencies

I have this assignment that I can't figure how to solve. I have a sound.wav human-voice file, and use matlab add-random-noise (monotonic) Goal: to remove the noise from the sound (and the sound from ...
0
votes
1answer
310 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
345 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 ...
3
votes
3answers
2k views

Filtering with STFT

I have sucessfully implemented a STFT (+inverseSTFT with perfect reconstruction of original signal, with overlap add, etc.) in order to work on audio files. Using this STFT / iSTFT framework, I have ...
20
votes
3answers
849 views

How were windows originally conceived?

I am aware of the common types of windows, (Hamming, Hanning, Kaiser, Tukey, etc etc). However while many books describe them - almost none tell me just how exactly they were derived. What is so ...
5
votes
1answer
3k views

Signal filtering using Python

I'm trying to create an application using python that is capable of recording an audio signal and detecting short glitches in the signal. For example, I could be recording a 1000Hz sine wave and ...
11
votes
3answers
3k views

How to create a distortion compensation filter

I am creating a channelizer that consists of a complex mixer, CIC decimator, and a FIR compensation/decimation filter. The final FIR filter may, if it matters, be implemented as more than one filter. ...