38
votes
Accepted
How many taps does an FIR filter need?
Citing Bellanger's classic Digital Processing of Signals – Theory and Practice, the point is not where your cut-off frequency is, but how much attenuation you need, how much ripple in the signal you ...
22
votes
Accepted
Transfer function of second order notch filter
For digital notch filters, I like to use the following form for a notch filter at DC ( $ \omega $=0):
$$ H(z) = \frac{1+a}{2}\frac{(z-1)}{(z-a)} $$
where $a$ is a real positive number < 1. The ...
21
votes
Accepted
Why do digital filters work?
Consider a discrete-time input signal of the form:
$$ x[n] = \cos(\omega_0 n) ~~~,~~~-\infty < n < \infty, ~~~~~ n\in \mathcal{Z}$$
where the radian frequency $\omega_0$ is set between 0 and $\...
17
votes
How many taps does an FIR filter need?
For a quick and very practical estimate, I like fred harris' rule-of-thumb:
$$ N_{taps} = \frac{Atten}{22*B_T}$$
where:
Atten is the desired attenuation in dB,
$B_T$ is the normalized transition ...
12
votes
What is the maximum output of an IIR filter?
I would like to know,if there is any way to estitmate what could be the maximum limits of the output
Yes. It's
$$y_{max} = x_{max} \cdot \sum_{n = 0}^{\infty} |h[n]| $$
I.e. the maximum gain is the ...
12
votes
Accepted
Why don't unit circle poles lead to infinite amplitude response for Butterworth lowpass?
You've made an understandable mistake. You are probably looking at this picture:
That is not the unit circle, and it isn't even in the $z$ domain.
What you are looking at is the locations of the ...
11
votes
Accepted
Exponential weighted moving average time constant
If I understood you correctly, you want to compute the value of $\alpha$ that results in a specified 3dB cut-off frequency for an exponentially weighted moving average filter. If you square your last ...
11
votes
Digital filter coefficients from low-pass to high-pass
You can apply a so-called all-pass transformation to a discrete-time low-pass prototype filter in order to convert it to other standard filters (such as high-pass, band-pass, and band-stop). This is ...
9
votes
Accepted
High Dynamic Range FIR Filters
Like @MattL. and @aconcernedcitizen say, the issue is numerical.
Python's scipy.signal.firls uses internally the solver ...
8
votes
Precise Centre frequency of an All-pole digital filter
For a filter consisting of a complex conjugate pair of poles, the $z$-domain transfer function is:
$$H(z) = \frac{a}{\left(1-r(\cos{\theta}-i\sin{\theta})z^{-1}\right)\left(1-r(\cos{\theta}+i\sin{\...
8
votes
How many taps does an FIR filter need?
Adding to the accepted answer, a few additional references. I won't write the formulas which can be involved. Those formulae mostly yield rule-of-thumbs or approximations to start from. You can fiddle ...
8
votes
Accepted
What is the largest "safe" order for the digital Butterworth filter of a given signal?
One cause is that higher order Butterworth filters have poles closer to the unit circle. This nearby infinite gain point increases the likelihood of numerical instabilities. (e.g. rounding/...
8
votes
Accepted
What's Logic Behind the Construction of Sobel's Filter in Image Processing?
A first rationale is to be very short, as there was a time when computing on images was expensive. Then, a contour or an edge often present a fast variation in image intensities, that can be enhanced ...
8
votes
Accepted
3 dB cut-off frequency of first-order IIR high-pass filter
A discrete-time first-order high pass filter with unity gain at Nyquist and a zero at DC is described by the following difference equation:
$$y[n]=\frac{1+\alpha}{2}\big(x[n]-x[n-1]\big)+\alpha y[n-1],...
8
votes
Accepted
Take FFT of audio represented in PDM
In a PDM microphone, the sigma-delta convertor pushes the noise to frequency regions above the 0-20kHz spectrum. So if you'd take the FFT of the signal that comes directly from the PDM microphone, the ...
8
votes
Half power frequencies is -6dB or -3dB
The definition of the cut-off frequency is arbitrary. Different design methods use different definitions. If you define the cut-off at $-6\textrm{ dB}$, it means that the amplitude of a sinusoidal ...
7
votes
Curve Fit of Step Function with Boundary on the 2nd Derivative
Hmmmmmmmmm, interesting question.
Since you want to use the second derivative as your criteria, it would seem that you would want to have the maximum second derivative absolutie value for as short of ...
7
votes
Accepted
Protect an IIR filter from being reverse-engineered
Short answer:
You can't. If an attacker can insert a signal that covers the whole bandwidth (e.g. a white signal, or at least one that has no spectral zeros) into the system (and he can do that over ...
7
votes
High Dynamic Range FIR Filters
The problem lies in the formulation of the desired response, and especially in the "don't care" region, which is extremely wide for the chosen filter length. Even though I can't give any ...
6
votes
Why do digital filters work?
You have probably used filtering a lot already. A moving average is a filter!
Think of general filtering as performing a fancy moving average where instead of averaging every component in a window ...
6
votes
Accepted
What Is the Transfer Function of a Moving Average (FIR Filter)?
The frequency response of the moving average is called the asinc or psinc, the aliased sinc or periodic sinc (sinc for cardinal sine), or the Dirichlet function.
Since the sum of the moving average ...
6
votes
Detect valleys of a signal
First, you'll probably have better luck posting this on dsp.stackexchange. That's a more specialized group that does stuff like this all the time.
In terms of your problem, here's a couple of ...
6
votes
Numerically Stable IIR filter
First of all, what is the order of your IIR filter? The highest order I have ever used was an order-10 IIR filter for a control loop application. I feel like it is unlikely that you need more that ...
6
votes
Filtering Angular Measurements
If a first-order IIR will do, modify that slightly, and you're done.
So the usual first-order low-pass filter can be defined as $y_n = h(\theta_n)$ such that $y_n = y_{n-1} + a(\theta_n - y_{n-1})$. ...
6
votes
Accepted
Designing digital low pass filter with low pass-band group delay
Minimum phase filters will not give you a near constant group delay. You can design a non-linear phase FIR filter with a linear desired passband phase with a specified group delay that is smaller than ...
6
votes
OFDM use a pulse shaping filter or not?
The purpose of pulse shaping filters is not to overcome ISI as is implied in the OP's question. The only reason for using a pulse shaping filter is spectral efficiency, and in the process ISI can be ...
6
votes
Why must the order of a Band-Pass and Notch filter always be even?
In principle there is no reason why the filter order of a general bandpass or bandstop filter must be even. Such a restriction is a consequence of a specific design procedure. In classic IIR filter ...
6
votes
Filter odd or even harmonics with notch or inverse notch filter
What you are looking for are what we, in the audio space, call comb filters. Comb filters may or may not have a feedback path, just like FIR and IIR filters. In fact, there is a generalized theory ...
6
votes
Series vs Parallel Biquad Filters
It really depends on your filter.
In my experience serial is has almost always the potential to be better. The reason for this is quite simple. The parallel representation is unique. There is one ...
5
votes
Why do digital filters work?
I think you're looking for intuition as to why you get a certain frequency domain behavior when computing a weighted sum of input samples. As you know, the output signal of a causal length $N$ FIR ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
digital-filters × 499filters × 187
filter-design × 142
matlab × 72
finite-impulse-response × 60
discrete-signals × 58
lowpass-filter × 55
infinite-impulse-response × 51
digital-communications × 37
signal-analysis × 23
frequency-response × 23
z-transform × 22
filtering × 22
butterworth × 22
bandpass × 19
transfer-function × 18
linear-systems × 15
python × 12
highpass-filter × 12
audio × 11
poles-zeros × 11
analog-to-digital × 11
fourier-transform × 9
convolution × 9
phase × 9