ChatPPG Editorial

PPG Peak Detection Algorithms: Finding Systolic Peaks in Noisy Waveforms

PPG peak detection algorithms work best as a pipeline: filtering, adaptive thresholds, refractory periods, and beat-by-beat peak refinement in noisy data.

ChatPPG Research Team
9 min read
PPG Peak Detection Algorithms: Finding Systolic Peaks in Noisy Waveforms

The best PPG peak detection algorithms do not rely on a single threshold. In noisy waveforms, the reliable approach is a pipeline: band-limit the signal, build a slope or energy cue, apply an adaptive threshold plus a refractory period, then refine the final systolic location on the original waveform.

If you need background on the waveform itself, start with PPG waveform basics, bandpass filter design for PPG, and PPG signal quality assessment. This article stays focused on operational peak finding, not general PPG theory.

First, define what peak you are trying to detect

Many teams say peak detection when they actually mean one of three different fiducial points:

  • the systolic apex, which is the local amplitude maximum
  • the pulse foot, which is closer to pulse arrival timing work
  • the maximum slope point, which often appears earlier than the apex

Those are not interchangeable. If your endpoint is pulse rate, the apex is often fine. If your endpoint is pulse transit time, the apex can be too late and too morphology-dependent. If your endpoint is derivative feature extraction, the signal may need a different detector entirely.

This is why peak detection should be tuned to the measurement goal. A detector that gives low heart-rate error can still be bad for beat-to-beat timing because heart rate averages hide systematic timing bias.

What makes peak detection hard in PPG

ECG R-peak detection is hard enough. PPG adds a different set of problems.

Amplitude is unstable

Pulse amplitude changes with vasoconstriction, contact pressure, posture, respiration, and LED gain control. A fixed threshold that works for the first 10 seconds often fails two minutes later.

Shape is not fixed

A young, well-perfused finger waveform has a sharp systolic rise and clear apex. A wrist waveform during motion can be broad, flattened, or multi-peaked. In older or stiffer vasculature, reflected waves can distort the apex enough that a simple local-maximum rule becomes fragile.

Noise overlaps the physiology

Motion artifact often lives in the same band as the cardiac signal. That means you cannot solve peak detection with filtering alone. The detector needs temporal rules, local context, and usually some signal-quality gating.

Sampling rate limits timing precision

At 25 Hz, one sample is 40 ms. At 100 Hz, one sample is 10 ms. The detector may be algorithmically correct and still have visible timing jitter because the grid is coarse. Interpolation can help, but only after a robust discrete candidate is found.

The main families of PPG peak detection algorithms

There are several algorithm families that show up again and again in PPG work. In practice, the strongest production detectors borrow pieces from more than one family.

1. Local maxima with amplitude thresholding

This is the simplest method: find local maxima above a threshold and enforce a minimum distance between peaks.

It works on clean, stable PPG and fails quickly when amplitude changes or noise creates extra maxima. It is useful as a final refinement stage, but it is rarely enough as the full detector in wearable conditions.

2. Derivative-based detectors

Derivative methods look for the steep systolic upstroke first, then search forward for the corresponding apex. This is usually more stable than looking for raw maxima directly because the upstroke is often easier to identify than the final peak.

Common variants use:

  • first-derivative threshold crossing
  • slope-sum functions over short windows
  • zero crossings of the derivative after a large positive slope

Derivative detectors are a strong default for real-time systems, but they amplify high-frequency noise. They need clean preprocessing and careful refractory logic.

3. Elgendi-style moving-average detectors

A popular classical method is the dual-moving-average approach associated with Elgendi's work on PPG systolic peak detection. It builds an envelope that highlights likely beat regions, then searches for local maxima inside those zones. The appeal is that it adapts to local energy and does not depend on one fragile absolute threshold.

This style of detector still holds up well because it is explainable, light enough for embedded deployment, and easy to benchmark against simpler rules.

4. Template, wavelet, and learned detectors

Template, wavelet, and learned detectors all have a place, especially in research or controlled hardware. For most production wearable systems, though, they should be judged against a strong classical baseline with adaptive thresholds and clear beat-level validation.

The default pipeline that works well in practice

For most teams, the best starting point is not a research novelty. It is a disciplined classical stack.

Step 1: Preprocess for the endpoint

Use a band suited to the task. For adult heart-rate and beat detection, 0.5 to 8 Hz is a common starting point. For higher-motion wrist data, some teams narrow that to 0.7 to 5 or 6 Hz. If morphology matters, keep more harmonics and validate that the filter is not softening the apex too much.

If powerline contamination is present, handle it with a targeted stage as described in our guide to notch filtering for PPG. If motion is severe, consider Kalman filtering for PPG motion artifact suppression or other motion-aware denoising before asking the detector to do impossible work.

Step 2: Build a candidate signal

A robust candidate signal is often not the raw PPG. Options include:

  • rectified first derivative
  • slope-sum over 80 to 150 ms
  • moving energy or envelope signal
  • dual moving-average difference signal

The candidate signal should make true beats stand out while suppressing small ripples and slow drift.

Step 3: Use an adaptive threshold, not a fixed one

A running mean, percentile, or exponentially weighted threshold is usually better than a fixed level. The threshold should track recent amplitude but stay resistant to single noisy bursts.

A practical pattern is to maintain:

  • a short memory for recent candidate amplitude
  • a lower bound to avoid chasing noise in weak signals
  • a quality gate that raises the threshold when the waveform becomes unreliable

Step 4: Enforce a refractory period

Once a beat is accepted, suppress new detections for a physiologically reasonable interval. This prevents one wide or noisy pulse from generating two or three peaks.

For many adult applications, a refractory period of 250 to 350 ms is a solid starting range. That corresponds to a maximum plausible rate of roughly 170 to 240 beats per minute. For pediatrics, exercise, or tachycardia studies, the value should be shortened and justified.

Step 5: Refine the peak on the original waveform

After a candidate beat region is found, search on the original or lightly filtered waveform for the local systolic maximum in a constrained forward window. This gives better amplitude and timing than reporting the candidate-signal maximum directly.

Step 6: Search back for missed beats

If the interval since the last accepted beat grows much longer than recent median beat spacing, search the intervening region with a relaxed threshold. This catches missed low-amplitude pulses without globally lowering the threshold.

A practical algorithm sketch

A compact baseline looks like this:

  1. bandpass for the endpoint
  2. build a derivative or slope-energy cue
  3. set an adaptive threshold from recent history
  4. enforce a refractory period
  5. refine the accepted beat on the original waveform
  6. search back when the recent interval becomes implausibly long

That is usually enough to expose whether the failure is in filtering, thresholding, or validation rather than in some mysterious detector logic.

Refractory periods and physiological rules

A detector without physiological rules is fragile. The refractory period is the most obvious one, but not the only one.

Useful rules include:

  • minimum beat interval based on the target population
  • maximum beat interval before search-back is triggered
  • plausible beat-to-beat interval change limits
  • optional amplitude consistency checks over recent beats

These rules should be soft enough to allow real physiology and strong enough to block obvious false detections. If you are analyzing arrhythmia or ectopy, be careful not to clean away the event you are trying to measure.

Why signal quality gating belongs before peak trust

One pattern shows up in almost every failed wearable detector: the algorithm keeps producing beats even when the signal is clearly bad.

A lightweight PPG signal quality assessment stage helps decide whether to trust, down-weight, or suppress detections in a given window. Useful quality cues include template correlation, spectral concentration, clipping rate, perfusion index, and consistency of recent beat intervals.

This does two things. First, it prevents nonsense outputs from reaching the application layer. Second, it makes your validation honest, because you can report performance both before and after quality gating.

Validation mistakes that make weak detectors look good

Peak detection papers and internal dashboards often overstate performance because they validate the wrong thing.

Reporting only heart-rate error

A detector can miss every other beat and still look decent in smoothed heart-rate output for some windows. Report beat-level sensitivity, positive predictive value, and timing error, not only BPM error.

Using very wide matching windows

If you match detected peaks to reference beats with a tolerance of plus or minus 150 ms, a sloppy detector can look accurate. Use a tolerance consistent with the intended endpoint.

Comparing PPG apex timing directly to ECG R-peaks

ECG and PPG peaks are separated by pulse transit time. If you compare the absolute timestamps without accounting for that physiology, you can mistake normal pulse delay for detector error. For beat detection, it is usually better to compare interval consistency or align by expected delay.

Tuning on cleaned data only

A detector that looks excellent on hand-curated clean segments can collapse on the actual production stream. Validation should include rest, motion, low perfusion, broad peaks, clipped peaks, and packet gaps, with subject-wise splits whenever possible.

Common failure patterns in noisy wearable PPG

Broad peaks can produce double detections, shallow vasoconstricted beats can be missed, and motion bursts can pull the detector onto cadence instead of pulse. Over-smoothed preprocessing makes all of these harder to see by hiding timing damage behind a smoother plot.

Which algorithm should you start with?

Start with a classical detector you can debug: derivative or slope-energy cues for wearables, Elgendi-style region detection for cleaner data, and morphology-aware refinement when timing matters. Add learned models only after the baseline is honestly benchmarked beat by beat.

FAQ

What is the best PPG peak detection algorithm for noisy signals?

For noisy PPG, the best practical choice is usually a pipeline that combines task-specific filtering, a derivative or envelope-based candidate signal, adaptive thresholds, a refractory period, and peak refinement on the original waveform.

Why do simple local-max detectors fail on wrist PPG?

Because wrist PPG amplitude and shape change constantly with motion, contact pressure, and perfusion. A raw local-max rule is too easy to fool with broad peaks, shoulders, and motion-induced ripples.

What refractory period should I use for PPG peak detection?

For many adult applications, 250 to 350 ms is a strong starting range. The exact value should reflect the target population, expected maximum heart rate, and whether exercise or pediatric data are included.

Should I detect the systolic peak or the pulse foot?

It depends on the endpoint. Use the systolic peak for many heart-rate tasks, but use the pulse foot or another earlier fiducial point when timing precision and pulse transit analyses matter.

Can filtering alone solve false peaks in PPG?

No. Filtering helps, but motion artifact often overlaps the cardiac band. Reliable detectors also need adaptive thresholds, physiological rules, and usually signal-quality gating.

How should I validate a PPG peak detector?

Report beat-level sensitivity, positive predictive value, and timing error against a reference, then test across clean and noisy conditions with subject-wise splits. Do not rely only on smoothed heart-rate error.

References

  1. Elgendi M, Norton I, Brearley M, Abbott D, Schuurmans D. Systolic peak detection in acceleration photoplethysmograms measured from emergency responders in tropical conditions. PLOS ONE. 2013. https://doi.org/10.1371/journal.pone.0076585
  2. Allen J. Photoplethysmography and its application in clinical physiological measurement. Physiological Measurement. 2007. https://doi.org/10.1088/0967-3334/28/3/R01
  3. Orphanidou C, et al. Signal-quality indices for the electrocardiogram and photoplethysmogram: derivation and applications to wireless monitoring. IEEE Journal of Biomedical and Health Informatics. 2015. https://doi.org/10.1109/JBHI.2014.2338351
  4. Charlton PH, et al. Assessing hemodynamics from the photoplethysmogram to gain insights into vascular age. American Journal of Physiology-Heart and Circulatory Physiology. 2022. https://doi.org/10.1152/ajpheart.00392.2021

Frequently Asked Questions

What is the best PPG peak detection algorithm for noisy signals?
For noisy PPG, the best practical choice is usually a pipeline that combines task-specific filtering, a derivative or envelope-based candidate signal, adaptive thresholds, a refractory period, and peak refinement on the original waveform.
Why do simple local-max detectors fail on wrist PPG?
Because wrist PPG amplitude and shape change constantly with motion, contact pressure, and perfusion. A raw local-max rule is too easy to fool with broad peaks, shoulders, and motion-induced ripples.
What refractory period should I use for PPG peak detection?
For many adult applications, 250 to 350 ms is a strong starting range. The exact value should reflect the target population, expected maximum heart rate, and whether exercise or pediatric data are included.
Should I detect the systolic peak or the pulse foot?
It depends on the endpoint. Use the systolic peak for many heart-rate tasks, but use the pulse foot or another earlier fiducial point when timing precision and pulse transit analyses matter.
How should I validate a PPG peak detector?
Report beat-level sensitivity, positive predictive value, and timing error against a reference, then test across clean and noisy conditions with subject-wise splits. Do not rely only on smoothed heart-rate error.