Butterworth Filters and Group Delay
Understand the Butterworth low pass filter: flat response, cutoff and order, how to pick the order, and why group delay matters for pulses, with MATLAB code.
The flattest passband
A Butterworth filter is designed to have a response that is as flat as possible in the passband. It has no ripple, and the gain falls smoothly after the cutoff frequency. This is why it is called maximally flat. At the cutoff the gain is always 1/√2, which is −3 dB, whatever the order.
|H(jω)|² = 1 / (1 + (ω / ωc)^(2n)) roll off beyond cutoff = 20 n dB per decade = 6 n dB per octave
The order n is the number of poles. A higher order gives a sharper fall, but needs more parts and, as shown below, changes the delay.
Low order examples
The first order filter is the plain RC circuit. Its transfer function is H(s) = ωc / (s + ωc), where ωc = 1 / RC. It falls at 20 dB per decade.
The second order Butterworth has two poles at 45 degrees from the negative real axis, on a circle of radius ωc.
n = 1: H(s) = ωc / (s + ωc) n = 2: H(s) = ωc² / (s² + √2 ωc s + ωc²)
For n = 2 the factor √2 sets the damping so that the response has no bump near the cutoff. A different damping would give a peak or a gentle early roll off.
Choosing the order
You usually know how flat you need the passband and how much the stopband must be down. Let the passband edge be ωp with at most Ap dB of loss, and the stopband edge ωs with at least As dB of loss. The smallest order is found from this formula, rounded up.
n ≥ log10[ (10^(As/10) − 1) / (10^(Ap/10) − 1) ] / [ 2 log10(ωs / ωp) ]
Example: Ap = 3 dB, As = 40 dB, and ωs = 2 ωp. The ratio inside the logarithm is about 10 050, whose log is 4.00. The bottom is 2 log10(2) = 0.602. The result is 6.65, so the order is 7. A check at twice the cutoff gives 10 log10(1 + 2^14) = 42 dB, which meets the target.
What group delay is
A filter delays a signal as well as changing its size. Phase delay is the delay of one sine. Group delay is the delay of the envelope, the slow shape of a signal made from nearby frequencies.
group delay τg = − dθ / dω phase delay τp = − θ / ω
If τg is the same for all frequencies in the signal, the signal passes with its shape intact, only later. If τg changes with frequency, some parts arrive before others and the shape spreads out.
Delay of a Butterworth filter
At low frequency the group delay of a first order filter is 1 / ωc. For a cutoff of 1 kHz, ωc is 6283 rad/s and the delay is 159 microseconds. The second order Butterworth has a low frequency delay of √2 / ωc, which is 225 microseconds at the same cutoff. A higher order means a longer delay.
For order 2 and above, the group delay rises to a peak a little below the cutoff and then falls. The peak grows taller with the order. A pulse whose spectrum reaches into that region comes out with ringing and a smeared shape. This is the price of a very sharp filter.
Design in MATLAB
These commands design a digital Butterworth filter and plot its two key curves. The cutoff must be given as a fraction of the Nyquist frequency.
fs = 8000; [b, a] = butter(4, 1000/(fs/2)); freqz(b, a, 1024, fs) grpdelay(b, a, 1024, fs) y = filter(b, a, x);
The function filter delays the signal by the group delay. Use filtfilt instead if you need zero phase, which runs the filter forward and backward. It cannot be used in a real time circuit because it needs future samples.
How it compares with other filters
The Butterworth filter is one choice among several, each trading one good property for another.
| Filter | Passband | Roll off | Group delay |
|---|---|---|---|
| Butterworth | flat, no ripple | moderate | peak near cutoff |
| Chebyshev | ripple allowed | steeper | larger peak, more ringing |
| Bessel | gently rounded | slowest | nearly constant |
| Elliptic | ripple in both bands | steepest | largest peak |
Use a Butterworth filter when you want a clean passband and a simple design. Use a Bessel filter when the shape of a pulse must be kept. Use Chebyshev or elliptic when sharpness matters more than the flatness.
Try it in the virtual lab
SinBench has free 3D benches and interactive demos for this topic. Open one to try the ideas above with real instruments, no sign up needed.
Questions and answers
What is a Butterworth filter?
It is a filter with a maximally flat passband. Its gain is 3 dB down at the cutoff, and it falls at 20 dB per decade for each unit of order.
What is group delay?
Group delay is the time by which the envelope of a signal is delayed by a filter. It is the negative slope of the phase against angular frequency.
Why does a higher order filter ring more?
A sharper cutoff makes the group delay change more with frequency near the edge. Frequencies in that region are delayed by different times, which causes ringing on pulses.
How do I design a Butterworth filter in MATLAB?
Use [b,a] = butter(n, Wn) for a digital filter, where Wn is the cutoff divided by half the sample rate. For an analog filter use butter(n, wc, 's') with wc in radians per second.
Related topics
Fourier Transform Basics: From Time to Frequency
Learn what the Fourier transform does, how time and frequency views of a signal connect and how to read a spectrum, with worked examples and a free lab.
Communication SystemsFFT in MATLAB: Frequency Axis, fftshift and Spectral Leakage
Use the FFT in MATLAB correctly: build the frequency axis, scale the amplitude, apply fftshift, and understand spectral leakage, windows and zero padding.
Communication SystemsThe Envelope Detector for AM: Design and Distortion
How a diode envelope detector works, how to choose the RC time constant, and how to avoid diagonal clipping and negative peak clipping, with a worked design.