LMS and NLMS Adaptive Filters for PPG Noise Removal
How LMS and NLMS adaptive filters remove motion artifacts from PPG using an accelerometer reference: the math, step-size tuning, and when to use RLS.
- PPG & Signal Processing

Short answer: LMS and NLMS both remove motion artifact from PPG by adapting a filter to an accelerometer reference signal, the adaptive noise cancellation setup Poh et al. (2010) built into a wearable sensor. LMS uses a fixed step size that has to be small enough for the most vigorous motion, so it is slow to adapt at rest. NLMS divides each update by the reference signal's power, so its effective step size adjusts as motion changes, which makes it the usual starting point for accelerometer-referenced PPG denoising.
Adaptive filtering is the workhorse of real-time PPG signal denoising, and the Least Mean Squares (LMS) family remains the most deployed algorithm class in commercial wearable devices. Despite being introduced by Widrow and Hoff in 1960, LMS and its normalized variant NLMS continue to dominate embedded PPG processing because they offer the rare combination of theoretical simplicity, computational efficiency, and robust performance when a motion reference signal is available.
This article provides a rigorous treatment of LMS and NLMS adaptive filtering as applied to photoplethysmographic signals. We cover the mathematical foundations, convergence properties, practical tuning guidelines, and benchmark results from the research literature. For a broader overview of all motion artifact removal techniques, see our PPG motion artifact removal guide. For foundational PPG concepts, start with our introduction to PPG technology.
The Adaptive Noise Cancellation Framework
The standard adaptive noise cancellation (ANC) framework for PPG assumes the observed signal is a sum of the desired clean cardiac signal and additive motion noise :
A reference signal , typically from a co-located 3-axis accelerometer, is available. This reference is correlated with the noise but uncorrelated with the cardiac signal . The adaptive filter produces an estimate of the noise by filtering the reference through an FIR filter with adjustable weights:
The error signal serves as the filter output and, under ideal conditions, converges to an estimate of the clean cardiac signal . The filter weights are updated at each time step to minimize a cost function based on the error.
Poh et al. (2010, doi:10.1109/TITB.2010.2042607) built this into a wearable earlobe PPG sensor with an embedded accelerometer as the motion reference for adaptive noise cancellation, and the architecture has since become the standard pipeline architecture for accelerometer-referenced PPG denoising. The critical assumption is that the accelerometer signal is linearly related to the motion artifact in the PPG. When this assumption is violated, for example during sensor-tissue coupling changes that create nonlinear optical path distortions, adaptive filter performance degrades.
LMS Algorithm: Theory and PPG Application
Mathematical Formulation
The LMS algorithm minimizes the mean squared error using a stochastic gradient descent approach. Rather than computing the true gradient (which requires the autocorrelation matrix of the input), LMS approximates it using the instantaneous gradient:
where is the step size (learning rate), is the instantaneous error, and is the reference input vector of length (the filter order).
The computational cost per sample is exactly multiply-accumulate operations: for computing the filter output and for the weight update. On a typical ARM Cortex-M4 running at 64 MHz, an LMS filter at 100 Hz sample rate consumes less than 0.1% of available processing cycles.
Convergence Conditions
For LMS to converge in the mean, the step size must satisfy:
where is the power of the reference input signal. This bound is signal-dependent, which creates a fundamental problem for PPG: during vigorous exercise, accelerometer signal power increases by 20-40 dB relative to rest, potentially violating a step size chosen for resting conditions.
Convergence speed is governed by the eigenvalue spread of the input autocorrelation matrix . The time constant for the slowest mode is approximately:
where is the smallest eigenvalue. For accelerometer signals during complex multi-axis motion, eigenvalue spreads of 10-100 are common, meaning the slowest mode converges 10-100x slower than the fastest. This eigenvalue spread problem is the primary motivation for NLMS.
PPG-Specific LMS Results
Ram et al. (2012) proposed an adaptive step-size LMS (AS-LMS) filter for PPG motion artifact reduction, adjusting the step size during adaptation rather than fixing it (doi:10.1109/TIM.2011.2175832).
Chan and Zhang (2002, doi:10.1109/ICSENS.2002.1037314) likewise proposed a variable step-size LMS filter to reduce motion artifact in PPG recordings. Because a fixed step size can fail to converge when accelerometer power swings widely during intense exercise, power-normalized adaptation (NLMS) or a variable step size is generally preferred.
NLMS Algorithm: The Practical Standard
Mathematical Formulation
The Normalized LMS algorithm modifies the weight update to normalize by the instantaneous input power:
where is the normalized step size ( for convergence), is a small regularization constant to prevent division by zero (typically to ), and is the squared Euclidean norm of the input vector.
The normalization ensures that the effective step size adapts automatically to the input signal power. When motion is vigorous and accelerometer power is high, the effective step size decreases, preventing instability. When motion is gentle, the effective step size increases, maintaining adequate convergence speed.
Why NLMS Outperforms LMS for PPG
The advantages of NLMS over LMS for PPG denoising are both theoretical and practical:
Automatic power adaptation. During a typical wearable use case, a user transitions from sitting (low accelerometer power) to walking (moderate) to running (high). LMS requires a step size small enough for the highest-power condition, which makes it sluggish at rest. NLMS adapts automatically, providing near-optimal convergence at every activity level.
Reduced sensitivity to filter order. In LMS, the convergence bound depends on both and . Increasing the filter order to capture longer impulse responses tightens the convergence bound and requires reducing . In NLMS, the normalization by (which grows with ) automatically compensates, making NLMS less sensitive to filter order selection.
Robustness to non-stationary signals. PPG motion artifacts are inherently non-stationary. NLMS's instantaneous power normalization provides a first-order adaptation to statistical changes, whereas LMS assumes fixed statistics over its convergence time window.
Benchmark Results
NLMS results cannot be summarized with universal error numbers: they depend on the sensor, motion reference, activity protocol, windowing, and downstream heart-rate estimator. Report performance from a named dataset and complete pipeline rather than presenting parameter-specific figures without a traceable experiment.
Zhang et al. (2015) did not evaluate NLMS as part of TROIKA. TROIKA combined signal decomposition, sparse spectral reconstruction, and spectral peak tracking, and reported 2.34 BPM average absolute error across recordings from 12 subjects during treadmill exercise up to 15 km/h. That result supports the complete TROIKA heart-rate pipeline, not NLMS alone.
Multi-Axis Reference Signal Handling
A 3-axis accelerometer provides three reference channels: , , and . There are two primary strategies for incorporating multi-axis references into the ANC framework.
Concatenated Single-Filter Approach
The simplest approach concatenates all three axes into a single extended reference vector:
This produces a filter of order , with computational cost of per sample for LMS/NLMS. The filter can model cross-axis coupling effects, where motion in one axis creates artifacts correlated with accelerometer data from another axis.
Parallel Multi-Filter Approach
An alternative uses three separate adaptive filters, one per axis, and sums their outputs:
Each filter operates on a single axis with order , giving the same total parameter count () and computational cost. However, this approach constrains the solution to additive combinations and cannot model cross-axis interactions.
Because the concatenated approach can model cross-axis interactions at no additional computational cost, it is recommended for most PPG applications.
Practical Implementation Guidelines
Step-Size Selection
For NLMS, begin with and adjust based on the tradeoff between convergence speed and steady-state misadjustment. Higher values (0.7-0.9) improve tracking of rapidly changing motion but increase noise in the output. Lower values (0.1-0.3) produce cleaner outputs during steady-state motion but lag during transitions.
A practical approach is to use a variable normalized step size that increases during detected transitions and decreases during steady motion. The transition can be detected by monitoring the short-term energy change in the accelerometer signal. See our PPG signal processing algorithms page for implementation details.
Filter Order Selection
Filter order determines the length of the impulse response the filter can model, which relates to the complexity of the motion-to-artifact transfer function. General guidelines:
Scroll horizontally if needed
| Sample Rate | Recommended N | Impulse Response Duration |
|---|---|---|
| 25 Hz | 10-20 | 400-800 ms |
| 50 Hz | 16-32 | 320-640 ms |
| 100 Hz | 32-64 | 320-640 ms |
| 256 Hz | 64-128 | 250-500 ms |
The impulse response duration should be sufficient to capture the mechanical delay between accelerometer motion and optical path distortion, which is typically 50-300 ms depending on sensor mounting and tissue coupling.
Pre-Processing Pipeline
Raw PPG and accelerometer signals require pre-processing before adaptive filtering:
- DC removal. Subtract a moving average (window 1-2 seconds) from both PPG and accelerometer signals to remove baseline wander and gravitational offset.
- Bandpass filtering. Apply a 4th-order Butterworth bandpass filter (0.4-5 Hz) to the PPG signal to isolate the cardiac band. Apply a matching bandpass to the accelerometer to maintain temporal alignment.
- Normalization. Scale both signals to unit variance over a sliding window (5-10 seconds) to improve adaptive filter convergence.
- Decimation. If the native sample rate exceeds 100 Hz, consider decimating to 50-100 Hz to reduce computational cost without sacrificing cardiac frequency resolution.
Post-Processing
The adaptive filter output is the estimated clean cardiac signal, but it may still contain residual noise. Common post-processing steps include:
- Spectral peak tracking. Apply an FFT or autocorrelation to the filtered signal in sliding windows (6-10 seconds with 1-2 second overlap) and track the dominant spectral peak as the heart rate estimate.
- Harmonic validation. Verify that the detected peak has harmonics at 2x and 3x the fundamental frequency, which distinguishes true cardiac peaks from residual motion artifacts.
- Physiological bounding. Reject heart rate estimates outside 30-220 BPM and apply maximum rate-of-change constraints (e.g., no more than 10 BPM change per second) to prevent spurious jumps.
Limitations and When to Use Other Methods
LMS and NLMS adaptive filters have well-understood limitations that determine when alternative methods should be considered:
Nonlinear artifacts. When the motion-to-artifact relationship is nonlinear (e.g., during sensor liftoff or tissue compression), linear adaptive filters cannot fully cancel the artifact. Nonlinear extensions such as Volterra filters or kernel adaptive filters address this but at substantially higher computational cost. For further reading on nonlinear approaches, see our algorithms overview.
No reference signal available. Without an accelerometer or other motion reference, LMS/NLMS cannot function. Reference-free methods including empirical mode decomposition, independent component analysis, and wavelet denoising should be used instead.
Spectral overlap. When the motion artifact fundamental frequency coincides exactly with the heart rate, even a perfect adaptive filter with perfect reference cannot separate them, because the cardiac component in the error signal is zero at that frequency. Spectral tracking methods that exploit harmonic structure provide an alternative in this scenario.
Rapidly time-varying channels. While NLMS handles moderate non-stationarity well, extremely rapid changes (e.g., impact events, sudden sensor displacement) can exceed the tracking bandwidth. The RLS algorithm converges faster and handles such transitions more effectively, at the cost of computation per sample.
Comparison with RLS and Advanced Methods
To contextualize LMS/NLMS performance, consider the following comparative results from the literature:
Scroll horizontally if needed
| Method | MAE (BPM) | Computation | Converge Time | Best Use Case |
|---|---|---|---|---|
| LMS | 5-8 | Slow | Static or slow-changing motion | |
| NLMS | 2-5 | Moderate | General wearable use | |
| RLS | 1-4 | Fast | Activity transitions | |
| NLMS + spectral tracking | 1-3 | Moderate | High-accuracy HR estimation |
These figures aggregate results across multiple studies with different datasets, so direct comparison requires caution. However, the general ranking is consistent: RLS outperforms NLMS, which outperforms LMS, at increasing computational cost.
For many embedded wearable applications, NLMS with spectral post-processing represents the optimal tradeoff. The algorithm is simple to implement, requires minimal memory (N+1 weight coefficients plus input buffer), runs in real-time on microcontrollers as modest as ARM Cortex-M0+, and achieves clinically acceptable accuracy for heart rate monitoring during moderate activity.
Conclusion
LMS and NLMS adaptive filters remain foundational tools for PPG motion artifact removal. NLMS, with its automatic power normalization, is the recommended starting point for any accelerometer-referenced PPG denoising pipeline. The algorithm's simplicity, low computational footprint, and well-understood convergence properties make it particularly suited to embedded wearable devices where power consumption and processing resources are constrained.
For applications requiring higher accuracy during activity transitions or complex motion patterns, NLMS can be extended with variable step-size strategies or upgraded to RLS filtering. For the highest accuracy in challenging conditions, multi-stage pipelines combining adaptive filtering with spectral tracking or deep learning post-processing represent the current state of the art. Explore our complete algorithms reference for implementation guidance across all PPG signal processing methods.
References
- Ram MR, Madhav KV, Krishna EH, Komalla NR, Reddy KA. A Novel Approach for Motion Artifact Reduction in PPG Signals Based on AS-LMS Adaptive Filter. IEEE Transactions on Instrumentation and Measurement. 2012;61(5):1445-1457. doi:10.1109/TIM.2011.2175832
- Zhang Z, Pi Z, Liu B. TROIKA: A General Framework for Heart Rate Monitoring Using Wrist-Type Photoplethysmographic Signals During Intensive Physical Exercise. IEEE Transactions on Biomedical Engineering. 2015;62(2):522-531. https://doi.org/10.1109/TBME.2014.2359372 (Included as a contrasting non-NLMS pipeline.)
Related articles
PPG Motion Artifact Removal: Algorithms, Methods & Implementation Guide
A comprehensive technical guide to PPG motion artifact removal covering adaptive filtering (LMS, RLS, NLMS), ICA, EMD, wavelet decomposition, SVD, and deep learning methods. Includes algorithm comparison, pipeline design, benchmark datasets, and real-time implementation considerations.
Reinforcement Learning for Adaptive PPG Monitoring: Dynamic Sampling and Alerting
Reinforcement learning trains PPG monitoring agents to dynamically adjust sampling rates, alert thresholds, and feature extraction strategies based on...
Types of Noise in PPG Signals: Classification, Sources & Mitigation Strategies
**Every PPG signal is a composite of the desired cardiac pulsatile component and multiple noise sources whose combined power typically exceeds the sig...
PPG Baseline Wander Removal: Drift Correction Techniques for Clean Signals
**Baseline wander is the most pervasive low-frequency artifact in photoplethysmography, and removing it without distorting the cardiac waveform is a p...
PPG Analog Front End Design: How Hardware Choices Set the Noise Floor
PPG analog front end design determines whether tiny pulsatile signals survive LED shot noise, ambient light, TIA noise, and ADC limits in wearable devices.