Butterworth Filter Design for PPG Signals: Cutoff Frequencies, Order Selection, and Implementation
How to design Butterworth IIR filters for PPG signal conditioning. Covers order selection, cutoff frequencies, passband ripple, phase response, and Python/embedded implementation.

Butterworth filters are the default choice for PPG signal conditioning because they offer a maximally flat passband with no ripple, which preserves the shape of the pulse waveform while suppressing noise outside the cardiac frequency band. A well-designed Butterworth bandpass filter centered on 0.5 to 8 Hz removes both low-frequency baseline drift and high-frequency sensor noise without distorting the systolic peak or dicrotic notch.
What Is a Butterworth Filter and Why Does It Suit PPG?
A Butterworth filter achieves its characteristic flatness by placing all poles on a circle in the s-plane, ensuring the magnitude response rolls off as smoothly as possible. Unlike Chebyshev or elliptic designs, there are no ripples in either the passband or stopband. For PPG, this matters enormously: ripple in the passband can create phantom peaks that fool beat detection algorithms, while ripple in the stopband can allow residual motion artifact through at specific frequencies.
The standard Butterworth magnitude response is:
|H(jΩ)|² = 1 / (1 + (Ω/Ωc)^(2N))
where N is the filter order and Ωc is the cutoff frequency. Higher N gives a steeper roll-off but also increases group delay, which can shift fiducial points and distort pulse transit time (PTT) measurements.
Typical PPG Frequency Content
Understanding the signal spectrum is the foundation of filter design:
- DC component: Offset from average tissue opacity (can be removed separately)
- Cardiac fundamental (0.5–4 Hz): Corresponds to 30–240 BPM
- Cardiac harmonics (up to ~10 Hz): Higher harmonics carry morphology information like the dicrotic notch
- Respiratory modulation (0.15–0.5 Hz): Amplitude and frequency modulation from breathing
- Motion artifact (0.1–10 Hz): Overlaps heavily with cardiac band, which is the core challenge
- High-frequency noise (>20 Hz): Shot noise from photodetector, ambient light flicker, EMI
For clean resting PPG (e.g., finger clip), a 4th-order Butterworth bandpass from 0.5 to 8 Hz works well. For wrist-worn devices during activity, the lower cutoff may be raised to 0.7 Hz and the upper cutoff lowered to 4 Hz to reduce motion overlap.
How to Select Butterworth Filter Parameters
Filter Order
Order selection is a trade-off between roll-off steepness and group delay:
- 2nd order: 40 dB/decade roll-off; minimal phase distortion; suitable for real-time heart rate (HR) monitoring where latency matters
- 4th order: 80 dB/decade; good rejection of low-frequency baseline wander; standard choice for most PPG applications
- 6th–8th order: Excellent suppression but ~20–50 ms group delay; use offline when morphology analysis is needed
A common design specification: passband 0.5–8 Hz with less than 0.5 dB ripple, stopband attenuation of 40 dB at 0.1 Hz and 20 Hz, with a sampling rate of 100 Hz.
Cutoff Frequency Selection
Lower cutoff (high-pass component): The respiratory frequency sits at 0.15–0.4 Hz. If you want to capture respiratory-induced amplitude variation (RIAV) for respiratory rate estimation, use a lower cutoff of 0.1–0.2 Hz. If you only need HR and want to suppress baseline drift, 0.5 Hz is the standard choice.
Upper cutoff (low-pass component): At rest, 4 Hz (240 BPM equivalent) captures all relevant cardiac harmonics. For pediatric populations with HR up to 200+ BPM, ensure the fundamental passes cleanly. During intense exercise, the upper cutoff can drop to 3 Hz without losing the fundamental.
At 100 Hz sampling, a 4 Hz cutoff is well within the Nyquist limit (50 Hz), leaving enough room for transition band.
Zero-Phase Filtering
Butterworth filters (like all IIR filters) introduce phase distortion that varies with frequency. This phase distortion shifts fiducial points and can cause systematic errors in PTT and pulse wave velocity (PWV) measurements. The solution is forward-backward filtering (also called zero-phase filtering), implemented as filtfilt in MATLAB/SciPy.
Zero-phase filtering doubles the effective filter order (a 4th-order design applied forward-backward becomes effectively 8th-order), so use a lower base order when applying this approach offline.
Note: Zero-phase filtering requires buffering the entire signal and cannot be used in real-time applications. For streaming systems, use causal filtering and accept the group delay.
Practical Implementation
Python Implementation with SciPy
from scipy.signal import butter, filtfilt, sosfiltfilt
import numpy as np
def design_ppg_butterworth(fs, lowcut=0.5, highcut=8.0, order=4):
"""
Design a Butterworth bandpass filter for PPG signals.
Parameters
----------
fs : float
Sampling frequency (Hz)
lowcut : float
Lower cutoff frequency (Hz), default 0.5 Hz
highcut : float
Upper cutoff frequency (Hz), default 8.0 Hz
order : int
Filter order per section (total order = 2*order for bandpass)
Returns
-------
sos : ndarray
Second-order sections representation (numerically stable)
"""
nyq = fs / 2.0
low = lowcut / nyq
high = highcut / nyq
# Use SOS format for numerical stability at higher orders
sos = butter(order, [low, high], btype='bandpass', output='sos')
return sos
def filter_ppg(signal, fs, lowcut=0.5, highcut=8.0, order=4):
"""Apply zero-phase Butterworth bandpass filter to PPG signal."""
sos = design_ppg_butterworth(fs, lowcut, highcut, order)
filtered = sosfiltfilt(sos, signal)
return filtered
# Example usage
fs = 100 # Hz
ppg_raw = np.array([...]) # Your raw PPG data
ppg_filtered = filter_ppg(ppg_raw, fs)
Why SOS format? The second-order sections (SOS) representation chains multiple 2nd-order biquad stages rather than using a single high-order polynomial. This prevents numerical overflow and coefficient quantization errors that occur when implementing high-order filters in direct form II, especially in fixed-point embedded systems.
Embedded C Implementation (Biquad Cascade)
For microcontrollers, implement the Butterworth filter as a cascade of biquad (second-order) sections using the Direct Form II transposed structure:
typedef struct {
float b0, b1, b2; // numerator coefficients
float a1, a2; // denominator coefficients (a0 = 1)
float z1, z2; // delay states
} BiquadSection;
float biquad_process(BiquadSection *s, float x) {
float y = s->b0 * x + s->z1;
s->z1 = s->b1 * x - s->a1 * y + s->z2;
s->z2 = s->b2 * x - s->a2 * y;
return y;
}
Cascade multiple BiquadSection instances (one per filter order pair) to implement higher-order Butterworth filters. Coefficients are pre-computed offline using a filter design tool and stored in flash memory.
Comparison with Other IIR Filter Types
| Filter Type | Passband | Stopband | Phase | PPG Use Case |
|---|---|---|---|---|
| Butterworth | Flat (no ripple) | Moderate roll-off | Monotonic | General-purpose PPG conditioning |
| Chebyshev I | Equiripple | Steeper roll-off | More distortion | When sharp cutoff matters more than flatness |
| Chebyshev II | Flat | Equiripple | Moderate | Suppressing specific interference |
| Elliptic | Equiripple | Equiripple | Most distortion | Minimum order for given spec |
| Bessel | Flat | Slow roll-off | Linear (best) | PTT/morphology where phase accuracy is critical |
For PTT measurements, a Bessel filter is often superior despite its slower roll-off, because the linear phase response ensures group delay is constant across all cardiac frequencies, preserving waveform timing relationships.
Common Pitfalls in PPG Butterworth Filtering
Pitfall 1: Not accounting for sample rate variation Many wearables (Apple Watch, Garmin, Fitbit) use adaptive sampling rates that vary with motion. Always verify fs before applying pre-designed filter coefficients. Redesign filters dynamically if fs changes.
Pitfall 2: Filtering very short segments
filtfilt pads the signal by 3× the filter order at each end. For a 4th-order filter, this requires at least 12 samples of padding. Segments shorter than ~2 seconds at 25 Hz may have significant edge artifacts. Use at least 5-second windows.
Pitfall 3: Not checking for saturation before filtering Saturated or clipped PPG samples (common with lossy wrist compression) should be interpolated or marked before filtering. A Butterworth filter will spread the saturation artifact over a window proportional to the filter order.
Pitfall 4: Ignoring frequency shift with activity Resting HR clusters at 1–2 Hz; exercise HR can reach 3.5 Hz (210 BPM). A fixed 4 Hz upper cutoff works for both, but some motion-robust filters adaptively lower the upper cutoff during rest to reduce motion artifact overlap.
Validation on PPG Databases
Several public datasets let you benchmark filter designs:
- MIMIC-III PPG (PhysioNet): Arterial line-verified ICU recordings; fingertip PPG at 125 Hz
- PPG-DaLiA (UCI ML Repository): Wrist PPG with simultaneous ECG and accelerometer during physical activities
- CAPNO database (PhysioNet): Capnography synchronized with fingertip PPG
A common validation metric is the mean absolute error (MAE) between HR extracted from filtered PPG vs. simultaneous ECG RR intervals. For a properly designed Butterworth bandpass, you should achieve MAE < 2 BPM at rest and MAE < 5 BPM during moderate activity (without additional motion artifact cancellation).
Internal Resources
- PPG Adaptive Filtering: LMS and NLMS Methods
- Wavelet Transform Denoising for PPG
- PPG Baseline Wander Removal
- Kalman Filtering for PPG Heart Rate
- PPG Signal Quality Assessment
FAQ
What order Butterworth filter should I use for PPG? A 4th-order Butterworth bandpass filter (0.5–8 Hz) is the standard starting point for most PPG applications. For real-time systems where latency is critical, a 2nd-order filter reduces group delay by half. For offline morphology analysis, 6th order with zero-phase filtering gives better roll-off characteristics.
What cutoff frequencies are best for PPG filtering? The standard recommendation is 0.5 Hz (high-pass) to 8 Hz (low-pass) for general PPG processing. The lower cutoff removes baseline drift while preserving respiratory modulation. The upper cutoff removes high-frequency noise while keeping cardiac harmonics up to the 3rd or 4th harmonic of peak HR (roughly 10–12 Hz at maximum HR). For SpO2 or PPG morphology, extend the upper cutoff to 10–15 Hz.
Should I use filtfilt or a causal filter for PPG?
Use filtfilt (zero-phase) for offline analysis when waveform shape and timing accuracy matter (PTT, PWV, morphology features). Use causal (one-pass) filtering for real-time streaming applications where latency must be minimized. The trade-off is about 20–50 ms of group delay for a 4th-order causal filter at 100 Hz.
Why does my Butterworth filter introduce ringing on PPG peaks? Ringing (Gibbs phenomenon) in the time domain is more commonly associated with FIR filters, not Butterworth IIR. If you see oscillations, check for: coefficient quantization errors in fixed-point implementations (switch to SOS format), filter order too high for your sample rate, or edge effects at signal boundaries.
Can I use a Butterworth filter to remove 50/60 Hz powerline noise from PPG? A Butterworth low-pass at 8–20 Hz removes powerline noise implicitly by attenuating everything above the cutoff. If powerline noise is severe, add a notch filter at 50 or 60 Hz before the bandpass. See our guide on PPG notch filter design for specifics.
How does a Butterworth filter affect PPG morphology and fiducial points? Zero-phase Butterworth filtering preserves relative timing between fiducial points (onset, systolic peak, dicrotic notch) because the phase response is cancelled. Causal filtering shifts all features by the group delay (~10–30 ms for a 4th-order filter at 100 Hz), which must be compensated when computing PTT or PWV. Order-dependent group delay is the primary limitation of IIR filters for precision timing measurements.
References
- Oppenheim, A.V., Schafer, R.W. (2009). Discrete-Time Signal Processing (3rd ed.). Prentice Hall. ISBN 978-0131988422.
- Elgendi, M. (2012). On the analysis of fingertip photoplethysmogram signals. Current Cardiology Reviews, 8(1), 14–25. https://doi.org/10.2174/157340312801215782
- Charlton, P.H., et al. (2022). Assessing hemodynamics from the photoplethysmogram to gain insights into vascular age: a review from VascAgeNet. American Journal of Physiology-Heart and Circulatory Physiology, 322(4), H493–H522. https://doi.org/10.1152/ajpheart.00392.2021
- Allen, J. (2007). Photoplethysmography and its application in clinical physiological measurement. Physiological Measurement, 28(3), R1–R39. https://doi.org/10.1088/0967-3334/28/3/R01