Kalman Filter for PPG Motion Artifact Suppression
Kalman filtering gives PPG engineers a principled way to suppress motion artifact by modeling pulse dynamics, sensor noise, and motion disturbance as time-varying states rather than treating filtering as a fixed one-size-fits-all step.

Kalman filtering gives PPG engineers a principled way to suppress motion artifact by modeling pulse dynamics, sensor noise, and motion disturbance as time-varying states rather than treating filtering as a fixed one-size-fits-all step. In wearable photoplethysmography, that matters because motion contamination is not stationary. Cadence changes, contact pressure drifts, and optical path length shifts all evolve over time. A Kalman filter can adapt its estimate sample by sample, balancing trust in the incoming measurement against trust in the model.
For readers comparing approaches, our guides on PPG adaptive filtering, recursive least squares for PPG, and PPG HRV motion artifacts provide useful context. This article focuses on Kalman filtering specifically for motion artifact suppression, not just heart rate tracking.
Why Kalman filtering fits wearable PPG
A wrist PPG signal is a mixture of several processes. One process is the physiological pulsatile waveform driven by cardiac output and peripheral vascular compliance. Another is measurement noise from the photodiode, analog front end, quantization, and ambient light leakage. A third is motion-induced disturbance, which may be correlated with acceleration but does not behave like simple white noise.
Traditional fixed filters assume relatively stable frequency content. A bandpass filter can reject baseline wander and high-frequency noise, but it struggles when motion energy overlaps the cardiac band. Adaptive filters such as LMS and RLS can help if an accelerometer reference is available, yet they still frame the task as estimating a nuisance term from another input. Kalman filtering goes one level deeper by explicitly describing the hidden clean state and how it evolves over time.
The standard discrete Kalman filter assumes a linear Gaussian state-space model:
x_k = A x_{k-1} + w_k
y_k = H x_k + v_k
where x_k is the hidden state, y_k is the observed PPG sample or feature vector, A is the state transition matrix, H is the observation matrix, w_k is process noise with covariance Q, and v_k is measurement noise with covariance R. The filter recursively predicts the next state and then corrects that prediction using the new observation.
This formulation maps well onto PPG if the engineer is careful about what the state represents. The state can encode pulse amplitude, baseline drift, local slope, sinusoidal heart-rate components, or even latent motion terms. The model does not have to recreate every detail of vascular physiology. It only needs to capture enough structure that the prediction is better than blindly trusting the raw sample.
Motion artifact as a state estimation problem
Motion artifact in wearable PPG often comes from three pathways:
- Relative motion between sensor and skin, which changes coupling and pressure.
- Tissue deformation, which modulates blood volume and optical scattering.
- Periodic movement, such as walking or running, that introduces energy near the cardiac fundamental and harmonics.
If these disturbances were perfectly separable in frequency, a bandpass filter for PPG would be enough. In practice, walking cadence can sit near 1.5 to 2.5 Hz, exactly where adult heart rate often lives during activity. Kalman filtering helps because it uses temporal continuity, not just instantaneous spectral separation. The algorithm can prefer trajectories that look physiologically plausible and down-weight abrupt excursions that are more likely to be artifact.
A useful intuition is that the Kalman filter is constantly asking: given what the clean pulse should probably be doing right now, how surprising is the new sample? If the new sample is wildly inconsistent and the measurement covariance R is high, the update stays conservative. If the sample agrees with the model and the measurement looks trustworthy, the filter tracks it more aggressively.
Common Kalman model structures for PPG
1. Local level and slope model
A simple starting point treats the clean PPG as a slowly varying signal with a local slope:
x_k = [s_k, d_k]^T
where s_k is signal level and d_k is first derivative. The state transition may be:
A = [[1, Delta t], [0, 1]]
with observation matrix H = [1, 0]. This model works surprisingly well for smoothing and short-horizon prediction because it respects continuity in the waveform. It does not explicitly encode periodicity, but it can attenuate impulsive motion spikes while preserving the overall pulse contour.
2. Harmonic oscillator model
For heart-rate-centric processing, many engineers model the pulsatile component as a sinusoid or sum of sinusoids with slowly varying amplitude and frequency. A two-state oscillator can represent one narrowband component:
x_k = [c_k, s_k]^T
with rotational dynamics tied to angular frequency omega. This is attractive when the application is heart rate estimation rather than full morphology reconstruction. It is less ideal when you need notch depth, pulse width, or derivative features, because the true PPG waveform is not sinusoidal.
3. Augmented state with motion term
If accelerometer data are available, the state can be augmented with artifact terms driven by motion channels. For example, one may include a disturbance state that follows a random walk or autoregressive process and is partially observed through acceleration-derived features. This makes the filter a hybrid between classical adaptive cancellation and state estimation. It is often more robust than pure reference cancellation because the model can account for residual unexplained disturbance.
4. Extended or unscented Kalman variants
Real PPG systems are not perfectly linear. Contact pressure effects, LED intensity changes, and pulse amplitude modulation can be nonlinear. When the observation or transition model becomes nonlinear, an extended Kalman filter or unscented Kalman filter can be used. These are common in wearable sensor fusion, though they require more tuning and computation than the linear Kalman filter.
Prediction and update steps in practice
The standard Kalman filter runs two steps at each sample.
Prediction
State prediction:
x̂_k^- = A x̂_{k-1}
Covariance prediction:
P_k^- = A P_{k-1} A^T + Q
Update
Innovation:
ỹ_k = y_k - H x̂_k^-
Innovation covariance:
S_k = H P_k^- H^T + R
Kalman gain:
K_k = P_k^- H^T S_k^{-1}
State update:
x̂_k = x̂_k^- + K_k ỹ_k
Covariance update:
P_k = (I - K_k H) P_k^-
In PPG terms, the innovation is the disagreement between the predicted clean signal and the actual noisy measurement. Large innovation does not always imply bad data. It might mean the physiology changed. The art is in choosing Q and R so the filter distinguishes real physiology from noise contamination.
Tuning process noise and measurement noise
Tuning Q and R is the hardest part of Kalman filtering for PPG.
- Q too small: the filter becomes stubborn, overly smooth, and may flatten real pulse amplitude or miss heart rate transitions.
- Q too large: the filter chases noise and loses its advantage over simpler smoothing methods.
- R too small: the filter trusts noisy measurements too much.
- R too large: the filter becomes detached from reality and drifts according to the model.
A practical approach is to estimate R from quiet segments where the wearable is stationary, then increase R dynamically using accelerometer energy or a signal quality index guide style metric during motion. Q can be initialized from the variance of first differences or from residuals between a coarse bandpassed signal and a local prediction model.
Adaptive covariance schemes are often superior to static values. When wrist acceleration rises, contact pressure variance rises, or a quality detector flags clipping or ambient light leakage, increase R. During clean segments, reduce R so the filter follows the waveform more tightly.
Kalman filtering versus bandpass and adaptive filtering
Each approach has a distinct role:
- A bandpass filter is simple, cheap, and essential for baseline preprocessing.
- An adaptive filter is strong when a high-quality reference signal explains the artifact.
- A Kalman filter is strong when temporal modeling and uncertainty weighting matter.
This is why many of the best pipelines use them together. A typical wearable workflow is:
- Detrend or high-pass to control baseline drift.
- Apply a broad cardiac-band filter to remove obvious out-of-band noise.
- Use Kalman filtering to estimate the clean pulse or heart-rate state.
- Run peak detection or spectral estimation on the filtered output.
For high-motion settings, a motion-referenced Kalman model can outperform a standalone fixed filter because it adapts faster to changing reliability. For low-power embedded settings, a well-tuned linear Kalman filter can still be lighter than more complex decomposition methods such as wavelets or EMD.
Morphology preservation and feature extraction
One reason engineers hesitate to use aggressive denoising is fear of distorting morphology. PPG is not only about heart rate. Researchers often care about systolic upstroke time, reflection index, dicrotic notch visibility, pulse width, and derivative landmarks. If the filter oversmooths, those features become unreliable.
Kalman filtering can preserve morphology better than naive moving averages because the prediction model incorporates continuity without blindly averaging over large windows. In studies where pulse shape matters, filters are often evaluated with correlation to reference morphology, peak timing error, and derivative landmark preservation.
A second-order or low-order autoregressive state can preserve waveform shape adequately when tuned well. If morphology is the main outcome, validate against pulse-foot timing, systolic peak error, and normalized waveform correlation, not just SNR.
Literature and evidence base
Kalman ideas have appeared in biomedical monitoring for decades. Welch and Bishop's classic tutorial remains the standard engineering reference for implementation basics, though it is not PPG-specific. For biomedical wearables, state-space filtering has been used in pulse oximetry, respiratory estimation, and heart-rate tracking under motion.
Representative references worth reviewing include:
- Welch G, Bishop G. An Introduction to the Kalman Filter. University of North Carolina at Chapel Hill.
- Ram MR et al. A novel approach for motion artifact reduction in PPG signals based on spectrum estimation and Kalman filtering concepts. DOI: https://doi.org/10.1109/TBME.2011.2164297
- Warren KM et al. Improving pulse rate measurements during random motion using a wearable multichannel reflectance photoplethysmograph. DOI: https://doi.org/10.3390/s140202239
The key lesson from the literature is that Kalman filtering is usually most effective as one component in a broader artifact management stack, not as a magic standalone cure.
Embedded implementation considerations
Wearables impose tight constraints:
- low sampling-rate microcontrollers
- fixed-point arithmetic in some devices
- strict power budgets
- limited buffer memory
The good news is that a linear Kalman filter with a small state dimension is computationally modest. The main cost comes from matrix operations, but 2x2 and 4x4 systems are trivial on modern embedded processors. Precomputing constant terms and using stable covariance update forms can keep execution predictable.
For embedded deployment:
- Keep the state small.
- Use single precision unless you have strong evidence double precision is necessary.
- Bound covariance growth to prevent numerical instability.
- Add outlier rejection before update when raw samples are clearly corrupted.
- Log innovation statistics during field testing, because they reveal model mismatch quickly.
Validation strategy for wearable teams
A Kalman filter should not be judged only by pretty waveforms. It should be validated against task-relevant endpoints:
- Heart rate MAE against ECG.
- Beat-to-beat timing error.
- Peak detection sensitivity and positive predictive value.
- Morphology correlation on clean benchmark windows.
- Failure behavior during walking, running, and loose wear.
Public datasets with synchronized ECG and accelerometry are useful, but internal bench datasets matter too because sensor mechanics vary across industrial design choices. A filter tuned for a snug sport band may perform poorly on a looser daily-wear strap.
Recommended workflow for engineers
If you want to deploy Kalman filtering for motion artifact suppression in PPG, use this workflow:
- Start with a simple linear state model.
- Pre-filter the raw PPG to remove baseline wander and high-frequency electrical noise.
- Estimate Q and R from representative clean and motion conditions.
- Make R adaptive using accelerometer magnitude and quality metrics.
- Compare against a bandpass-only baseline and an adaptive-filter baseline.
- Evaluate not just SNR, but peak timing and morphology retention.
This approach prevents overengineering while still capturing the main benefit of the method.
FAQ
What does a Kalman filter do for PPG signals?
A Kalman filter estimates the hidden clean PPG state from noisy measurements by combining a prediction model with uncertainty-weighted updates. In practice, it can smooth motion-contaminated signals and improve heart-rate or pulse-shape estimation during changing conditions.
Is Kalman filtering better than a bandpass filter for PPG?
Not automatically. A bandpass filter is still useful and often necessary. Kalman filtering becomes valuable when signal reliability changes over time or when motion artifact overlaps the cardiac frequency band, making fixed filtering less effective.
Can a Kalman filter remove motion artifact without an accelerometer?
Yes, to a degree. A Kalman filter can still help by enforcing temporal consistency and down-weighting noisy observations. However, accelerometer-informed models generally perform better in high-motion settings because they provide additional information about artifact likelihood.
Should I use a linear Kalman filter, EKF, or UKF for wearable PPG?
Start with a linear Kalman filter unless you have a clear nonlinear observation model that improves measurable outcomes. EKF and UKF add complexity and tuning burden, so they should be justified by validation data.
Does Kalman filtering preserve PPG morphology?
It can, if tuned properly. Overly aggressive settings can oversmooth the waveform, so morphology-focused applications should validate pulse shape, derivative landmarks, and peak timing, not just heart-rate error.
What is the hardest part of deploying Kalman filtering in PPG?
Tuning the process and measurement covariance matrices. Most implementation failures come from poor assumptions about signal dynamics or measurement reliability rather than from the recursion itself.
References
- Ram MR et al. IEEE Transactions on Biomedical Engineering. https://doi.org/10.1109/TBME.2011.2164297
- Warren KM et al. Sensors. https://doi.org/10.3390/s140202239