19
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 ...
16
votes
Accepted
Single-pole IIR low-pass filter - which is the correct formula for the decay coefficient?
The given single-pole IIR filter is also called exponentially weighted moving average (EWMA) filter, and it is defined by the following difference equation:
$$y[n]=\alpha x[n]+(1-\alpha)y[n-1],\qquad ...
13
votes
Accepted
Why would one use a Hann or Bartlett window?
In reviewing Fred Harris Figures of Merit for various windows (Table 1 in this link) the Hamming is compared to the Hanning (Hann) at various values of $\alpha$ and from that it is clear that the Hann ...
12
votes
Where do RBJ's analog shelving filters come from?
If you remove (for the time being) that leading factor $A$ as a constant gain factor:
$$H(s)=\frac{s^2+\left(\frac{\sqrt{A}}{Q}\right)s + A}{As^2 + \left(\frac{\sqrt{A}}{Q}\right)s + 1}$$
what you get ...
11
votes
Can you turn a square wave into a sine wave using a low pass filter?
To be able to analyze what a low pass filter does first you would need to understand what a Fourier transform is, hence some theory first.
The Fourier transform essentially represents the time-domain ...
10
votes
Accepted
How to produce a high-pass filter from a low-pass one?
The result will indeed be a high pass filter. From your difference equation, the transfer function of the low pass filter is
$$H_l(z)=\frac{\beta}{1-(1-\beta)z^{-1}}\tag{1}$$
with $\beta=1/\alpha$.
...
10
votes
Accepted
Apply Low pass Butterworth filter in Python
You should not be using the analog filter - use a digital filter instead. You want the filter to be defined in Z-domain, not S-domain. Also, you should define the ...
9
votes
Accepted
Is a high-passed signal the same as a signal minus a low-passed signal?
In general you can't simply subtract a low-pass filtered version of a signal from the original one to obtain a high-pass filtered signal. The reason is as follows. What you're actually doing is ...
9
votes
Fast Integer 8 Hz 2nd Order LP for Microcontroller
This answer provides a quick introduction to decimation concepts and CIC filters which I would consider as one solution given the description.
Bottom Line First
Given your use of a microcontroller, (...
9
votes
Accepted
Shannon interpolation formula for downsampled data with an "almost ideal" low pass filter
I don't get your downsample step when you downsampled by factor $M$.
Let me go from scratch with the spectrum visualization below, with time domain, continuous frequency domain and discrete frequency ...
9
votes
Accepted
What is the name of this digital low pass filter?
I'm new, so I can't add this comment to Matt L.'s answer.
It is not an exponential filter, the equation is actually:
$$ y[n] \ = \ \alpha \, x[n] \ + \ ( 1 - \alpha ) \, x[n-1] $$
So it is a very ...
8
votes
Accepted
Smoothed Square Wave
Yes. This looks like it's a typical first order low pass. The time constant can be determined by looking at the time it takes for the falling edge to drop to 37% of the max amplitude ($e^{-1}$). The ...
8
votes
Accepted
Kalman filter after lowpass filter: bad idea?
The Kalman filter is the optimal filter under various assumptions. You need to check whether those assumptions hold in your case:
a) the model perfectly matches the real system,
b) the entering noise ...
8
votes
Accepted
Cutoff frequency of a first order recursive filter
That formula for the cut-off frequency is a very inaccurate approximation. In this answer I derived the exact relation between the coefficient of a first order recursive averaging filter and its 3-dB ...
8
votes
What is the intuition of "averaging is a low pass filter"?
Consider a sequence of numbers
x = [1, 100, 1, 100, 1, 100]
If we send this sequence through an averaging transformation
...
7
votes
Accepted
once again,confusion between phase and group delay
If you are looking for a frequency-independent delay applied to any given input signal by the filter (apart from amplifying and attenuating certain frequency components), then you won't be able to ...
7
votes
Accepted
FIR vs IIR filter
Typically the advantages of an FIR filter are that it is easy to obtain a linear phase response, and numerical stability is not normally a problem.
An IIR filter typically requires fewer taps (as you ...
7
votes
Accepted
How is the lowpass to bandpass transformation derived?
In the $s$-domain, the LPF-to-BPF transformation doubles the order of the filter. that is because the LPF has one transition from passband to stopband, but the BPF has two such transitions.
Remember ...
7
votes
Accepted
Complex low pass filters
A low pass filter has a frequency response that satisfies
$$|H(\omega)|\approx 0,\quad |\omega|>\omega_c\tag{1}$$
where $\omega_c$ is the cut-off frequency. A complex low pass filter must also ...
7
votes
Accepted
How to Get Rid of Ripples from a Gradient Image of a Smoothed Image?
I think it happens due to 2 things:
Quantization
You are working using UINT8 Image, try convert it into floating Point Image.
You may do this by ...
7
votes
Why is the median filter called 'edge-preserving'?
Non-linearity
A linear filter is mathematically described by the convolution sum (for discrete signals) and the convolution integral for continuous signals. The median cannot be found using a linear ...
7
votes
Accepted
How to Classify a Kernel as Low Pass Filter (LPF) or High Pass Filter (HPF)? How to Transform an LPF Kernel into HPF Kernel?
General
We assume 2 modes of filters: LPF or HPF.
Classifying Filter Type
Usually, if it is a well planned LPF and well Planned HPF a simple test will do.
Calculate the sum of all coefficients.
The ...
7
votes
Accepted
What are the advantages and disadvantages of Kalman filter compared with FIR, IIR and low pass filter to filter data with noise?
Kalman filters really aren't that special, and you seem to be missing the point of a Kalman filter. A Kalman filter is really just a generally time-varying, generally IIR, generally multi-input ...
6
votes
Difference Between Equiripple & Least Squares Design for FIR Digital Filters
While I completely agree with Jason R's answer, I would like to add a few things that I consider important. First of all, it is a misunderstanding to believe that for least squares designs the ...
6
votes
Digital Anti Aliasing Filter For Waveform Band Limiting
Let us say your sample rate is 48kHz.
You are generating a sawtooth wave at a fundamental frequency of 10kHz, using your code.
First harmonic is at 10kHz. Second harmonic at 20kHz. Third harmonic at ...
6
votes
Accepted
Digital Anti Aliasing Filter For Waveform Band Limiting
I am generating my waves in a "Raw" mathematical way, meaning that i am creating a ramp for a saw wave and my square wave consists of pure 1's and 0's. The issue is that this technique is inherently ...
6
votes
How to produce a high-pass filter from a low-pass one?
For an LTI system another method to generate a highpass filter impulse response $h_{hp}[n]$, from an existing lowpass filter impulse reponse $h_{lp}[n]$ is the following:
$$h_{high}[n]=(-1)^n h_{low}[...
6
votes
Accepted
How to test the FIR filter in C++?
The first basic test could be to use a unit impulse as an input signal and see if the output signal equals the impulse response (i.e. the filter coefficients). Another simple test signal is a unit ...
6
votes
Accepted
Why Butterworth filter always starts my signal from from zero mark (amplitude)?
Filters do have a delay (a lag) since they do not act immediately on your signal. Also all samples before the time 0 are zeros, thus in general you will start from the "zero mark", as you said (just ...
6
votes
Can you turn a square wave into a sine wave using a low pass filter?
In principle you can, in practice you almost can. The square wave consits of sinusoids with frequencies that are at multiples of the fundamental one (the inverse of the length of one high and one low)....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
lowpass-filter × 624filters × 236
filter-design × 164
matlab × 72
finite-impulse-response × 67
digital-filters × 50
highpass-filter × 46
discrete-signals × 45
infinite-impulse-response × 43
image-processing × 37
fft × 36
python × 34
signal-analysis × 29
audio × 27
bandpass × 26
butterworth × 26
sampling × 24
frequency-response × 22
filtering × 21
fourier-transform × 19
noise × 18
convolution × 17
moving-average × 16
interpolation × 15
scipy × 13