IIR Filter Designer Back
Signal Processing Simulator

IIR Filter Designer — Butterworth Low-Pass Magnitude Response

Design a continuous-time Butterworth low-pass filter and visualize its gain |H(jω)| on a Bode plot. Tune cutoff and order to see how the attenuation rolls off and find the minimum order needed.

Parameters
Cutoff frequency f_c
Hz
Order N
Stopband edge f_s
Hz
Stopband attenuation A_s
dB

The passband ripple A_p at the cutoff edge is fixed at 3 dB (Butterworth cutoff definition) when computing N_min.

Results
Attenuation at f_s, |H(j·2π·f_s)|
Minimum required order N_min
Roll-off (-6N dB/oct)
Attenuation at 2·f_c
Bode Plot |H(jω)| (dB)

Blue solid = Butterworth gain / green dashed = cutoff f_c / red solid = stopband edge f_s / gray dashed = required −A_s

Theory & Key Formulas

The analog Butterworth low-pass filter has a maximally flat magnitude in the passband. Its squared magnitude is:

$$|H(j\omega)|^2 = \frac{1}{1 + (\omega/\omega_c)^{2N}}$$

Here ω_c is the cutoff angular frequency and N is the order. In decibels:

$$G(\omega) = 20\,\log_{10}|H(j\omega)|$$

For a required attenuation of −A_p at ω_p (3 dB at the cutoff by default) and at least −A_s at ω_s, the minimum required order is:

$$N_{\min} = \left\lceil \frac{\log_{10}\!\left(\dfrac{10^{A_s/10}-1}{10^{A_p/10}-1}\right)}{2\,\log_{10}(\omega_s/\omega_p)} \right\rceil$$

The high-frequency asymptotic roll-off is −6N dB/oct (= −20N dB/dec). Higher orders give steeper transitions.

What is the IIR Filter Designer

🙋
I have heard the term "IIR filter", but what does "Butterworth" mean? Where do I start in this tool?
🎓
Roughly speaking, Butterworth is "the low-pass with the flattest possible passband". A single formula does it: $|H(j\omega)|^2 = 1/(1+(\omega/\omega_c)^{2N})$. The blue curve in the simulator is exactly this, plotted in dB. You can see it crosses $-3$ dB right at the green dashed line — the cutoff $f_c$.
🙋
Yes. As I sweep the order N from 1 to 12, the curve becomes much steeper after the cutoff.
🎓
That is the roll-off. Asymptotically it falls at $-6N$ dB/oct: $-24$ for N=4, $-48$ for N=8. The "Roll-off" card shows this. For the defaults (f_c=100, f_s=500, N=4) the "attenuation at f_s" card reads about $-57.9$ dB, because $5^8 \approx 3.9\times 10^5$ inside the formula.
🙋
What is the "minimum required order N_min" card for?
🎓
It is the smallest order that meets your spec. Say you want at most $-3$ dB at $f_p$ and at least $-40$ dB at $f_s$. Then $N_{\min} = \lceil \log_{10}((10^{A_s/10}-1)/(10^{A_p/10}-1))\,/\,(2\log_{10}(f_s/f_p)) \rceil$. With the defaults this gives N_min = 3. We use N=4 to leave a little margin for component tolerance.
🙋
So why not just crank N up to 12 and be done with it?
🎓
That is the trap. The poles move very close to the imaginary axis, the coefficients become hypersensitive, and a fixed-point DSP will easily go unstable from rounding noise. The standard cure is to factor the filter into second-order sections (SOS / biquads). Group delay also blows up and step responses ring. A practical rule: use N_min plus one or two as your margin.

Frequently Asked Questions

If passband flatness matters most, pick Butterworth. If you need the steepest transition at a given order, pick elliptic (Cauer). Chebyshev sits in between: Type I allows passband ripple and Type II allows stopband ripple. Audio and measurement systems often prefer Butterworth for its gentler phase, while communication channel-selection filters often use elliptic to maximize selectivity per order.
The most common route is the bilinear transform: s = (2/T)·(1−z⁻¹)/(1+z⁻¹) maps the left half-plane onto the unit circle. There is no aliasing, but the frequency axis is warped as ω_a = (2/T)·tan(ω_d·T/2), so you must pre-warp the target cutoff before designing the analog prototype. Impulse-invariant transformation preserves the impulse shape better but suffers from aliasing for anything other than strictly band-limited responses.
FIR filters have a finite-length impulse response: they can be exactly linear-phase and are always stable, but achieving steep selectivity takes many taps. IIR filters use feedback, so they get steep responses with few coefficients, but they have non-linear phase and can become unstable due to coefficient quantization. Real-time control and low-latency DSP often pick IIR; image processing or scientific time series that cannot tolerate phase distortion typically pick FIR.
Implementing a high-order filter as a single Direct Form I or II structure is dangerous: coefficient quantization moves the poles and the filter goes unstable. Standard practice is to decompose into cascaded second-order sections (biquads), pair nearby pole pairs, and scale gains to avoid overflow. In fixed-point DSPs you also need to manage rounding-noise recirculation. MATLAB's zp2sos and SciPy's sosfilt are the standard tools.

Real-World Applications

Sensor signal conditioning: Accelerometers and pressure sensors pick up high-frequency electrical noise and structural vibration on top of the measurement. Butterworth low-pass filters, with their flat passband and well-behaved phase, are widely used as anti-aliasing and smoothing stages that preserve the amplitude information of the measurement while removing out-of-band noise.

Audio equipment: Speaker crossover networks, anti-aliasing before sampling, and reconstruction filters after DACs all use IIR low-pass filters. Butterworth's smooth, ripple-free response gives a neutral character, which is why it is a common starting point for hi-fi filter design.

Communications and radio: Baseband processing in modems, IF/RF band limiting, and channel selection in software-defined radios all rely on IIR filters to keep just the desired band. When sharp selectivity matters, designers reach for elliptic; when group delay matters, they reach for Butterworth.

Control systems and servos: IIR notches and low-passes suppress mechanical resonances and high-frequency noise that ride on the servo loop. Because added phase lag eats away at stability margin, you should not over-filter — pick the smallest order that meets your spec. Butterworth's mild phase response makes it easier to bound the impact on the control bandwidth.

Common Misconceptions and Cautions

The most common misconception is "higher order always gives a better filter". Yes, higher orders give steeper roll-off, but the poles also crowd toward the imaginary axis, coefficient sensitivity skyrockets, and any quantization noise can drive the filter unstable. The N=12 curve looks ideal in the simulator, but in a real implementation you will almost always have to split it into second-order sections. The practical rule is "start from N_min and add only a small margin".

The next mistake is to think that the cutoff f_c "cuts cleanly". A Butterworth cutoff is the frequency where the gain has dropped to $-3$ dB, not where the signal is gone. $-3$ dB is only half the power, an amplitude factor of about 0.707; energy at frequencies near $f_c$ still passes through. If you want strong rejection, set the stopband edge $f_s$ and the required attenuation $A_s$ explicitly and compute $N_{\min}$ from them.

Finally, remember that this simulator shows an analog (continuous-time) magnitude response. To run it as a digital IIR filter you must discretize, usually with the bilinear transform, which warps the frequency axis. Even if you aimed for a particular $f_c$ in the analog prototype, a low sampling rate $f_s^{(\text{sa})}$ will push the actual digital cutoff away from your target. The recipe is: design in continuous time, pre-warp the target frequencies, then apply the bilinear transform.