23 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 ...
Dan Boschen's user avatar
  • 50.3k
23 votes
Accepted

Exponential moving average cut-off frequency

The discrete recurrence relation given on the linked page is $y[n] = (1-\alpha)y[n-1] + \alpha x[n]$ with $x[n]$ being the input samples and $y[n]$ being the output samples. So taking the Z-transform $...
Andy Walls's user avatar
  • 2,710
17 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 ...
Matt L.'s user avatar
  • 89.6k
15 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 ...
Dan Boschen's user avatar
  • 50.3k
15 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 ...
robert bristow-johnson's user avatar
14 votes

What is the name of a low-pass filter that tracks rate of change?

I was able to remember how the filter works. The idea is very simple, a second low-pass filter tracks the steady-state error in the result of the first one, and it is then added to the output: Based ...
jpa's user avatar
  • 703
12 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 ...
jojeck's user avatar
  • 11.1k
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 ...
Television's user avatar
10 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 ...
Cedron Dawg's user avatar
  • 7,550
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, (...
Dan Boschen's user avatar
  • 50.3k
9 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 ...
Matt L.'s user avatar
  • 89.6k
9 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 ...
xxx374562's user avatar
  • 241
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 ...
AlexTP's user avatar
  • 6,585
9 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 ...
TimWescott's user avatar
  • 12.6k
9 votes
Accepted

Why the sum of filter coefficients of an FIR filter does not add to 1?

I'm assuming your FIR filters are nonrecursive tapped-delay line FIR filters. For such filters the sum of a filter's coefficients will equal the filter's gain at zero Hz (DC). This property results ...
Richard Lyons's user avatar
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 ...
Peter K.'s user avatar
  • 25.7k
8 votes

Savitzky–Golay filter vs. IIR or FIR linear filter

Since the discussion in the existing answers and comments has mainly focused on what Savitzky-Golay filters actually are (which was very useful), I will try to add to the existing answers by providing ...
Matt L.'s user avatar
  • 89.6k
8 votes
Accepted

Why is implementing a digital LPF with low cutoff frequency but high sampling frequency infeasible?

Also, any advice related to how to implement a 100 Hz cutoff LPF on a signal with a high sampling frequency would be appreciated. Easy: use second order representation (...
Hilmar's user avatar
  • 44.1k
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 ...
jodag's user avatar
  • 235
7 votes
Accepted

2-d circularly symmetric low-pass filter

Excerpted from Jae S.Lim 2D signal and image processing ch.1, as an example of $2$-D circularly symmetric lowpass filter with a cutoff frequency of $\omega_c$ radians per sample, whose impulse ...
Fat32's user avatar
  • 28.1k
7 votes

Why is implementing a digital LPF with low cutoff frequency but high sampling frequency infeasible?

In addition to Hilmar's good comments in his own answer, see this question as well as Rick Lyon's interesting blog post which shows similar pole pattern graphs, demonstrating why very low cut-off ...
Dan Boschen's user avatar
  • 50.3k
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)....
Arnfinn's user avatar
  • 1,035
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 ...
jojeck's user avatar
  • 11.1k
6 votes

Simple software low pass filter

A first order lowpass filter is usually implemented like this: $$p[n] = \alpha p[n-1] + (1-\alpha) pi[n]$$ Where $p[n]$ is your filtered power estimation, $p[n-1]$ is the previous result, $pi[n]$ is ...
Juancho's user avatar
  • 5,016
6 votes

"fred harris rule of thumb":

You can find the formula for (at least) one "Harris method" or "Harris approximation" in Multirate Signal Processing for Communication Systems, Fredric J. Harris, 2004, page 216, equation (8.16), ...
Laurent Duval's user avatar
6 votes

How to smoothen signal with missing values before differentiation?

The best tool for this job is normalized convolution. It can deal with missing samples as well as uncertainty. The paper describing the method is "Normalized and Differential Convolution -- Methods ...
Cris Luengo's user avatar
  • 2,474
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 ...
Matt L.'s user avatar
  • 89.6k
6 votes

Where do RBJ's analog shelving filters come from?

If you use a parameterization with a (pole or zero) frequency and a Q-factor for numerator and denominator of a biquadratic function you get the following general second-order transfer function $$H(s)=...
Matt L.'s user avatar
  • 89.6k
6 votes

What is the name of a low-pass filter that tracks rate of change?

I do not think that there's a specific name for this type of lowpass filter. There are indeed similarities between the cascade of two lowpass filters as suggested in the OP's answer, and a combination ...
Matt L.'s user avatar
  • 89.6k
5 votes
Accepted

Filtering an acceleration signal

I believe the best strategy is to filter prior to calculating the magnitude. To see this easily, consider the low pass filtering as an averaging process and consider the noise as a zero mean Gaussian ...
Dan Boschen's user avatar
  • 50.3k

Only top scored, non community-wiki answers of a minimum length are eligible