Skip to content
ExtendedSource checked

Butterworth Filter

Filters signals with a smooth passband and monotonic frequency response.

Quick Facts

Compact metadata for implementation and discovery.

Category
Signal Processing
Difficulty
Intermediate
Family
Digital Filter
Tier
Extended
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
2
Code example
Ready
Visualization
Ready

Overview

A Butterworth Filter is designed to be maximally flat in the passband, making it a common general-purpose low-pass, high-pass, or band-pass filter.

Core Concepts

cutoff frequencyfilter orderfrequency responseIIR filter

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(n)

Average

O(n * order)

Worst

O(n * order)

Space

O(order)

When to Use

  • Use when a smooth passband is preferred over sharp ripple behavior.
  • Use when audio filtering is a central requirement.

When Not to Use

  • Avoid when a very sharp transition band is required with low order.
  • Avoid when the sampling rate, window size, or stationarity assumptions do not hold.

What It Does

  • Computes digital filter within Digital Filter workloads (O(n * order) time, O(order) space).
  • Works by Filters signals with a smooth passband and monotonic frequency response.
  • Maintains key invariants across cutoff frequency, filter order, frequency response.

Use Cases

  • Audio filtering
  • Sensor smoothing
  • Signal conditioning

Inputs

  • Signal samples
  • Cutoff frequency
  • Filter order

Outputs

  • Filtered signal

Key Formulas (1)

Magnitude response

|H(f)| = 1 / √1 + (f / cutoff)(2 · order)
|H(f)| = 1 / sqrt(1 + (f / cutoff)^(2 * order))

Describes the smooth Butterworth low-pass rolloff.

Pseudocode

  1. 1.Choose filter type, cutoff, and order
  2. 2.Compute or load filter coefficients
  3. 3.Process samples through the filter recurrence
  4. 4.Return filtered output

Canonical Example

Input
signal = noisy sensor samples, cutoff = 5 Hz
Output
output = smoothed samples
Explanation
Frequencies above the cutoff are attenuated smoothly.

Implementation Notes

  • Use stable second-order sections for higher-order IIR filters.
  • Plot or inspect both the original and processed signal for small test cases.
  • Keep a tiny example with expected output beside the implementation.

Common Pitfalls

  • Designing with normalized frequency incorrectly shifts the cutoff.
  • Boundary handling and phase response can change the result in visible or audible ways.
  • Not defining boundary, empty, or degenerate inputs before implementation.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Show a smooth frequency response that rolls off after the cutoff.

Butterworth Filter mechanism walkthrough step 1 of 4x₀x₁x₂x*
Step 1 of 4: Choose filter type, cutoff, and order
signal-transform

Notes

Higher order gives steeper rolloff but can add numerical sensitivity.

Sources (1)

What each reference supports for this entry.

Discrete-Time Signal Processing

Book

Reference text for digital filters, Fourier analysis, and discrete-time signal-processing methods.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Variant ofLow-Pass Filter

Butterworth filters are often designed as maximally flat low-pass filters.

Tags

Signal ProcessingFilteringFilter DesignLow Pass