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
Filter type
Order N4
Cutoff (×Nyquist)0.20
Chebyshev ripple1.0 dB
While the sweep runs, the order N changes periodically; the poles move inside the unit circle and the response sharpens. Moving any slider switches to manual design. The bilinear transform keeps every pole inside the unit circle (stable).
Results
—
Filter type
—
Order N
—
Cutoff (−3 dB)
—
Roll-off
z-plane & Frequency Response (real-time design)
Left = z-plane poles (× red) and zeros (○ yellow) / right = magnitude response |H| (blue) with cutoff f_c (green). Higher order N sharpens the roll-off, and every pole stays inside the unit circle (stable).
Theory & Key Formulas
The analog Butterworth low-pass filter has a maximally flat magnitude in the passband. Its squared magnitude is:
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 $-55.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.
Set the cutoff frequency f_c (Hz) using the slider—typical range 100 Hz to 10 kHz for audio/control applications.
Define the stopband frequency f_s (Hz) where attenuation A_s (dB) must be met; for a 48 kHz audio system, set f_s = 24 kHz and A_s = 60 dB.
The simulator calculates minimum filter order N_min, displays the Bode magnitude response |H(jω)|, and shows attenuation at f_s and 2·f_c.
Worked Example
Using the default values (f_c=100 Hz, N=4, stopband edge f_s=500 Hz, required attenuation A_s=40 dB), the attenuation at f_s is about -55.9 dB, the minimum required order is N_min=3, the roll-off is -24 dB/oct, and attenuation at f=200 Hz is about -24.1 dB. Choosing N=4 gives one order of margin over N_min and exceeds the 40 dB requirement by about 16 dB.
Practical Notes
Higher filter order increases roll-off (−6N dB/octave) but adds group delay; for seismic sensors at 0.5 Hz cutoff with 10 dB/decade slope, N = 2 balances phase distortion.
Butterworth filters offer maximally flat passband—no ripple—ideal for precision measurement; Chebyshev designs sacrifice flatness for sharper cutoff when space-constrained.
Verify that computed |H(j·2π·f_s)| meets your stopband specification before implementation in DSP or analog circuits.