Filter Design

How to Create a Fractional-Delay Filter

Figure 1. Impulse response (left) and frequency response (right) of a 0.3 samples fractional delay filter with 21 coefficients.

With fractional delay, I mean a delay of a fraction of a sampling period. Introducing a delay of an integer number of samples is easy, since you can do that by simply skipping a number of samples, or buffering them if you don’t want to…

Tom Mon, 06/17/2019 - 09:43
Apply a Filter Twice for Greatly Improved Performance

Figure 3. Impulse response of the filter of Figure 1 convolved with itself.

Say that you have implemented a low-pass FIR filter with the correct cut-off frequency and transition band, but that you are not quite happy with the suppression of frequencies in the stop band. A straightforward trick to put in your toolbox is that you can double the suppression by…

Tom Mon, 02/26/2018 - 13:01
The Phase Response of a Filter

Figure 2. Frequency (left) and phase (right) response of a moving-average filter.

The article Why use Symmetrical FIR Filters with an Odd Length? mentiones that symmetrical FIR filters are linear phase. In this follow-up article, I simply want to show you what the phase response of these filters actually looks like…

Tom Thu, 02/08/2018 - 17:39

How to Create a Configurable Filter Using a Kaiser Window

Figure 3. Frequency response of a low-pass filter with a Kaiser window; A=60.

This article explains how to create a windowed-sinc filter with a Kaiser (or Kaiser-Bessel) window. The windowed-sinc filters in previous articles typically had two parameters, the cutoff frequency and the transition bandwidth (or rolloff). With a Kaiser window, there is a third input parameter, the ripple. For the specific case of the Kaiser window, the same…

Submitted on 26 December 2016

The Transition Bandwidth of a Filter Depends on the Window Type

Figure 1. Low-pass filter with Blackman window, r=4.0 (filter has 41 taps).

This article contains more detailed information on setting the transition bandwidth (or roll-off) from How to Create a Simple Low-Pass Filter. That article suggest to use, as the filter length N, an odd number close to 4/b, where b is the required transition bandwidth. This is a good basic rule. However, in…

Submitted on 6 December 2016

The Moving Average in the Financial Sector

Figure 4. Impulse (left), step (middle), and frequency (right) responses for Spencer’s 15-point moving average.

When researching what to include in The Moving Average as a Filter and Variations on the Moving Average, I came across a lot of references to applications in the financial sector. This is not my forte, but, just for fun, I gave a few of the moving averages that are used there the same treatment as the filters in…

Submitted on 29 February 2016