Digital Filter Design Tool Back
Signal Processing

Digital Filter Frequency Response Design Tool

Visualize magnitude and phase responses of Butterworth, Chebyshev and Bessel IIR filters in real time. Adjust filter type, order and cutoff frequency to understand filter design intuitively.

Filter Parameters
Filter Type
Filter Family
Order n
Cutoff Frequency fc
Hz
Sampling Rate fs
Ripple ε (dB)
dB
Presets
Filter Characteristics
Results
-3 dB Frequency
Attenuation @ fc×10
Phase at fc (°)
Roll-off (dB/oct)
Magnitude Response |H(f)| (dB)
Phase Response ∠H(f) (°)
Impulse Response h[n]
Theory & Key Formulas
Butterworth: $|H|^2 = \dfrac{1}{1+\left(\Omega/\Omega_c\right)^{2n}}$
Bilinear: $s = \dfrac{2f_s(z-1)}{z+1}$
Chebyshev: $|H|^2 = \dfrac{1}{1+\varepsilon^2 T_n^2(\Omega/\Omega_c)}$

What is a Digital Filter?

🙋
What exactly is a digital filter, and why would I use it instead of an analog circuit?
🎓
Basically, it's a mathematical algorithm that processes a stream of numbers (your signal) to remove unwanted frequencies. Unlike analog circuits with resistors and capacitors, digital filters are software, so they're perfectly repeatable and don't drift with temperature. In this simulator, when you change the "Filter Type" or "Order", you're reprogramming that algorithm in real-time.
🙋
Wait, really? So the "Butterworth", "Chebyshev", and "Bessel" options are just different math recipes? What's the practical difference?
🎓
Exactly! They trade off different properties. A Butterworth gives you the flattest possible passband. Chebyshev gives a sharper cutoff but lets you allow some "ripple" or waviness in the passband—try adjusting the "Ripple ε" slider with Chebyshev selected to see it. Bessel prioritizes a linear phase response, which is crucial for preserving the shape of a pulse. The best way to see this is to play with the "Filter Family" dropdown above.
🙋
Okay, that makes sense. But what does the "Order" slider actually do? I see the line gets steeper when I increase it.
🎓
Great observation! The order 'n' is the filter's complexity. In practice, it determines how sharply it transitions from passing frequencies to blocking them. For instance, a 2nd-order filter rolls off at about -40 dB per decade, while a 4th-order does -80 dB per decade—a much sharper "brick wall" effect. But higher order also means more computation and potential delay. Slide the "Order n" control and watch how the stopband attenuation plunges.

Physical Model & Key Equations

The core of an Infinite Impulse Response (IIR) filter design is defining its analog prototype's frequency response, characterized by its squared magnitude. This tells us how much of each frequency component is preserved.

$$|H(j\Omega)|^2 = \dfrac{1}{1 + \varepsilon^2 T_n^2(\Omega/\Omega_c)}$$

This is the generalized form for Chebyshev Type I filters. Here, $|H|^2$ is the power gain, $\Omega$ is the analog frequency, $\Omega_c$ is the cutoff frequency, $n$ is the filter order, and $\varepsilon$ controls the passband ripple. $T_n(x)$ is the Chebyshev polynomial of the first kind of order $n$.

To implement this in a digital system (like a microcontroller), we must convert the analog design to the discrete-time domain using the Bilinear Transform. This maps the complex analog frequency variable $s$ to the digital variable $z$.

$$s = \dfrac{2f_s(z-1)}{z+1}$$

Here, $f_s$ is the sampling rate you set in the simulator. This transformation warps the frequency axis but avoids the instability problems of other methods. It's the crucial step that turns our mathematical prototype into a set of coefficients a computer can use to process sample-by-sample data.

Real-World Applications

Audio Processing & Equalization: Every digital audio workstation uses filters like these. For instance, a graphic equalizer band might use a high-order Butterworth filter to precisely boost or cut bass frequencies without affecting the mids. The "Cutoff Frequency" slider in the tool directly controls this band's center point.

Noise Cancellation in Wearables: Smart earbuds use real-time digital filtering to remove ambient noise like engine hum. A Bessel filter might be chosen here because its linear phase response ensures the anti-noise signal is perfectly timed to cancel the original noise wave, preserving music quality.

Biomedical Signal Analysis (ECG/EEG): When measuring a heartbeat (ECG), the signal is contaminated with 50/60 Hz power line interference. A sharp, high-order digital notch filter (designed using principles here) can remove this specific frequency while leaving the crucial heart waveform intact.

Telecommunications & Demodulation: In a radio receiver, you need to isolate one channel from many. A Chebyshev filter is often used in the intermediate frequency (IF) stage because its sharp roll-off, controlled by the "Order", can separate adjacent channels effectively, even if it allows a small, controlled ripple in the passband.

Common Misconceptions and Points to Note

First, are you under the impression that the cutoff frequency is a sharp, complete barrier? In reality, the cutoff frequency typically refers to the point where the amplitude drops by -3dB (about 70%). For example, even if you design a 1kHz low-pass filter, a 1.5kHz signal won't become completely zero. This "gradualness of attenuation" is determined by the filter's order. Next, beware of the complacency that "phase issues can be sorted out later." Especially in real-time processing when cascading multiple filters, phase shifts accumulate and can severely distort the waveform. This can lead to a "muddy" sound in audio or become a cause of oscillation in control systems. Finally, avoid blind trust in presets. An "ECG preset" is just one example. In actual ECG measurement, you often need to add a "notch filter" to remove power line noise (50/60Hz) and fine-tune the bandwidth based on the patient's condition. Think of the tool's output as the "starting point" for your design.

How to Use

  1. Select filter type (Butterworth, Chebyshev, or Bessel) using the dropdown—Butterworth provides maximally flat passband; Chebyshev offers steeper roll-off with ripple; Bessel preserves phase linearity for pulse signals.
  2. Set filter order (2–8) via vOrder slider; higher orders increase attenuation slope (e.g., 6th-order Butterworth rolls off at 120 dB/decade vs. 20 dB/decade for 1st-order).
  3. Enter cutoff frequency (10 Hz–100 kHz range) in vFc field; simulator instantly plots magnitude and phase response, updating -3 dB point, stopband attenuation, and group delay.
  4. Adjust bandwidth for Chebyshev ripple tolerance or observe passband flatness metrics in real time.

Worked Example

Design a 4th-order Butterworth low-pass filter for a 1 kHz audio anti-aliasing application. Set vOrder=4, vFc=1000 Hz. Simulator returns: -3 dB frequency=1.0 kHz, attenuation at 10 kHz=80 dB (as expected: 4 poles × 20 dB/decade × 1 octave), phase shift at 1 kHz=-180°, roll-off=80 dB/oct. Compare against a 4th-order Chebyshev Type-I with 0.5 dB ripple: same cutoff but 10 kHz attenuation reaches 110 dB due to equiripple passband trading steepness for magnitude variations (±0.5 dB ripple between 0–1 kHz).

Practical Notes