Skip to content
CoreSource checked

High-Pass Filter

Attenuates low-frequency signal components while preserving rapid changes.

Quick Facts

Compact metadata for implementation and discovery.

Category
Signal Processing
Difficulty
Beginner
Family
Filtering
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
3
Code example
Not ready
Visualization
Ready
Aliases
HPF

Overview

A high-pass filter suppresses slow trends or DC offsets and keeps components above a chosen cutoff. It is often used to emphasize edges, changes, or fast oscillations.

Core Concepts

signal samplesfilter kernelfilteringsample windowsignal transformnoise handling

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(n)

Average

O(n)

Worst

O(n)

Space

O(1)

When to Use

  • Use when slow variation is nuisance signal and fast variation is informative.
  • Use when the cutoff can be chosen relative to the sampling rate.

When Not to Use

  • Avoid when absolute level or slow trend is meaningful.
  • Avoid when phase distortion around events is unacceptable.

What It Does

  • Defines a cutoff between suppressed slow components and passed fast components
  • Removes baseline drift or low-frequency trend
  • Outputs rapid variations in the signal

Use Cases

  • Removing DC offset or baseline drift
  • Detecting rapid changes
  • Preprocessing signals before feature extraction

Inputs

  • Signal
  • Cutoff frequency

Outputs

  • Filtered signal

Key Formulas (1)

Simple high-pass filter

y[i] = α · (y[i − 1] + x[i] − x[i − 1])
y[i] = alpha * (y[i - 1] + x[i] - x[i - 1])

Keeps faster changes while reducing slow-moving components.

Pseudocode

  1. 1.Choose sample rate, cutoff, and filter design
  2. 2.Compute coefficients or recursive update state
  3. 3.For each sample, update the filter
  4. 4.Subtract or attenuate low-frequency content according to the design
  5. 5.Return the high-pass output

Canonical Example

Input
signal = slow ramp plus small rapid pulses
Output
pulses emphasized while the ramp is reduced
Explanation
The filter suppresses low-frequency drift and preserves faster changes.

Implementation Notes

  • Document startup initialization and boundary behavior.
  • Check frequency response with known low and high sine inputs.
  • Choose FIR or IIR design based on phase and latency requirements.

Common Pitfalls

  • Cutoff frequency must be interpreted against the sample rate.
  • Startup transients can look like real high-frequency events.
  • Over-filtering can amplify noise or remove useful baseline context.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Show slow drift removed while sharp changes remain.

High-Pass Filter mechanism walkthrough step 1 of 5x₀x₁x₂x*
Step 1 of 5: Choose sample rate, cutoff, and filter design
detail-waveform

Notes

High-pass filters are sensitive to boundary handling and startup transients.

Sources (1)

What each reference supports for this entry.

Discrete-Time Signal Processing

Book

Signal-processing reference covering digital filter behavior and frequency-selective filtering.

Open source

Explore Next

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

Alternative toLow-Pass Filter

High-pass filters preserve rapid changes, while low-pass filters smooth them away.

Conceptual neighborBand-Pass Filter

Band-pass filters combine low- and high-frequency rejection.

Tags

Signal ProcessingFilteringHigh Pass