Inferensys

Glossary

Least Mean Squares (LMS)

A foundational stochastic gradient descent algorithm that updates filter coefficients iteratively based on the instantaneous estimate of the mean squared error gradient, widely used in adaptive filtering and digital predistortion.
Knowledge engineer constructing knowledge base on laptop, document hierarchy visible, casual office setup.
ADAPTIVE FILTERING ALGORITHM

What is Least Mean Squares (LMS)?

An introduction to the foundational stochastic gradient descent algorithm for real-time coefficient estimation in adaptive systems.

The Least Mean Squares (LMS) algorithm is a stochastic gradient descent method that iteratively updates filter coefficients by minimizing the instantaneous estimate of the mean squared error (MSE) between a desired signal and the actual filter output. It belongs to the family of online training algorithms, processing data sample-by-sample to continuously adapt to changing system dynamics without requiring a priori statistical knowledge of the input signal.

In digital predistortion (DPD) systems, LMS serves as a computationally lightweight engine for real-time coefficient estimation, often within an Indirect Learning Architecture (ILA). Its convergence behavior is governed by a step-size parameter μ that trades off convergence rate against steady-state misadjustment. While simpler than Recursive Least Squares (RLS), LMS remains widely deployed in FPGA-based linearization due to its low gate count and inherent numerical stability.

ALGORITHM FUNDAMENTALS

Key Characteristics of LMS

The Least Mean Squares (LMS) algorithm is a foundational stochastic gradient descent method for adaptive filtering. Its simplicity and robustness make it the default choice for real-time coefficient estimation in digital predistortion systems.

01

Stochastic Gradient Descent Core

LMS operates as an instantaneous approximation of the steepest descent method. Rather than computing the true gradient of the mean squared error (MSE) cost surface—which requires ensemble averaging—LMS uses the squared instantaneous error as a noisy but unbiased estimate.

  • Gradient Estimate: ∇J(n) ≈ -2e(n)x(n), where e(n) is the error signal and x(n) is the input vector
  • Weight Update Rule: w(n+1) = w(n) + μe(n)x(n)
  • Computational Cost: O(N) multiplications per iteration, where N is filter length
  • No Matrix Inversion: Unlike RLS, LMS avoids O(N²) or O(N³) operations entirely

The algorithm converges in the mean toward the Wiener-Hopf solution, with the stochastic gradient noise causing a random walk around the optimal weight vector.

O(N)
Complexity per Iteration
02

Step Size and Convergence Behavior

The step size parameter μ governs the tradeoff between convergence speed and steady-state accuracy. This single scalar controls the entire adaptation dynamics of the algorithm.

  • Stability Bound: 0 < μ < 2/λ_max, where λ_max is the largest eigenvalue of the input autocorrelation matrix
  • Practical Bound: 0 < μ < 2/tr(R), where tr(R) is the trace of the correlation matrix, approximated by N times the input power
  • Large μ: Fast initial convergence but large misadjustment—the excess MSE above the Wiener minimum
  • Small μ: Slow convergence but fine-grained steady-state performance with minimal coefficient jitter
  • Eigenvalue Spread Sensitivity: Convergence slows when the input signal has high spectral dynamic range, as the algorithm must accommodate the slowest mode

The misadjustment M is approximately M ≈ μ·tr(R)/2, linearly proportional to step size and input power.

μ·tr(R)/2
Misadjustment Approximation
03

Normalized LMS (NLMS) Variant

The Normalized LMS algorithm addresses LMS's sensitivity to input signal power fluctuations by normalizing the step size with the instantaneous input vector energy.

  • Update Rule: w(n+1) = w(n) + [μ̃ / (||x(n)||² + δ)] e(n)x(n)
  • Normalized Step Size μ̃: Dimensionless parameter typically in range 0 < μ̃ < 2
  • Regularization δ: Small positive constant preventing division by zero during silent intervals
  • Convergence Invariance: NLMS converges at a rate independent of input signal scaling, solving a normalized optimization problem at each iteration
  • Stability Guarantee: Converges in the mean-square sense for 0 < μ̃ < 2 regardless of input statistics

NLMS is the de facto standard in digital predistortion applications where signal envelope power varies dramatically with modulation and traffic load.

0 < μ̃ < 2
Stable Normalized Step Range
04

Tracking Non-Stationary Systems

LMS inherently tracks slowly time-varying systems without explicit forgetting mechanisms. The stochastic gradient noise that causes misadjustment in stationary environments becomes a beneficial dithering signal that enables parameter tracking.

  • Tracking Lag: A systematic delay between estimated and true coefficients proportional to μ⁻¹ and the rate of system change
  • Optimal Step Size Tradeoff: Faster tracking (larger μ) increases misadjustment; slower tracking (smaller μ) increases lag error
  • Thermal Memory Effects: LMS naturally adapts to power amplifier thermal drift occurring over millisecond-to-second timescales
  • Doherty Load Modulation: Tracks impedance variations in Doherty PAs as auxiliary amplifier bias conditions shift
  • No Matrix Reset Required: Unlike RLS, LMS never suffers from covariance matrix windup or requires periodic reinitialization

The total error decomposes into estimation noise + tracking lag, with the optimal μ balancing these competing error sources.

ms-to-s
Trackable Drift Timescale
05

Sign Variants for Hardware Efficiency

Sign-based LMS variants drastically reduce hardware multiplier requirements by quantizing either the error signal, the input signal, or both to their sign bits.

  • Sign-Error LMS: w(n+1) = w(n) + μ·sgn[e(n)]·x(n) — replaces error multiplication with a sign flip
  • Sign-Data LMS: w(n+1) = w(n) + μ·e(n)·sgn[x(n)] — replaces input multiplication with sign selection
  • Sign-Sign LMS: w(n+1) = w(n) + μ·sgn[e(n)]·sgn[x(n)] — reduces update to simple addition/subtraction, eliminating all multipliers
  • Convergence Penalty: Sign-Sign LMS converges roughly 10-20× slower than standard LMS for equivalent steady-state error
  • FPGA/ASIC Advantage: Eliminates DSP slices entirely, enabling ultra-compact implementations on resource-constrained fabrics

These variants are critical for massive MIMO DPD where hundreds of predistorter chains must operate in parallel within strict power budgets.

0 multipliers
Sign-Sign LMS Hardware
06

Leaky LMS for Ill-Conditioned Inputs

Leaky LMS introduces a coefficient decay term that prevents weight vector drift in poorly conditioned or low-persistence-of-excitation scenarios common in narrowband and multi-carrier DPD.

  • Update Rule: w(n+1) = (1 - μα)w(n) + μe(n)x(n), where α is the leak factor
  • Bounded Weights: Prevents unbounded growth when input correlation matrix is singular or nearly singular
  • DC Offset Rejection: Naturally suppresses accumulation of DC bias in coefficient registers from finite-precision arithmetic
  • Spectral Null Handling: Maintains stability when input signal has zero energy in certain frequency bands—a common occurrence in multi-carrier LTE/NR signals with unused resource blocks
  • Bias Introduction: The leakage term introduces a small bias toward zero, trading unbiased estimation for numerical robustness

Leaky LMS is essential for fixed-point FPGA implementations where finite wordlength effects can otherwise cause coefficient overflow.

μα
Leakage Rate Parameter
ADAPTIVE FILTER ALGORITHM SELECTION

LMS vs. RLS vs. NLMS: Algorithm Comparison

A comparative analysis of the three core adaptive algorithms used for coefficient estimation in digital predistortion systems, highlighting trade-offs in computational complexity, convergence speed, and steady-state error.

FeatureLMSRLSNLMS

Algorithm Family

Stochastic Gradient Descent

Recursive Least Squares

Normalized Stochastic Gradient

Update Equation Complexity

O(N) per iteration

O(N²) per iteration

O(N) per iteration

Convergence Rate

Slow, sensitive to eigenvalue spread

Fast, insensitive to eigenvalue spread

Moderate, improved over LMS

Steady-State Misadjustment

Higher

Lower

Higher than RLS, lower than LMS

Numerical Stability

High

Moderate (requires regularization)

High

Sensitivity to Input Scaling

Forgetting Factor Required

Typical DPD Application

Initial coarse tuning, low-resource hardware

Rapid acquisition, high-performance systems

Tracking in fluctuating signal conditions

LMS ALGORITHM DEEP DIVE

Frequently Asked Questions

Clear, technical answers to the most common questions about the Least Mean Squares algorithm, its variants, and its role in adaptive filtering and digital predistortion.

The Least Mean Squares (LMS) algorithm is a stochastic gradient descent method that iteratively updates filter coefficients to minimize the instantaneous squared error between a desired signal and the filter output. It operates by computing the gradient of the squared error with respect to the weight vector at each time step and taking a small step in the opposite direction. The core update equation is w(n+1) = w(n) + μ * e(n) * x(n), where w(n) is the weight vector, μ is the step size, e(n) is the error signal, and x(n) is the input vector. Unlike the Least Squares (LS) batch method, LMS does not require matrix inversion or knowledge of the full signal statistics—it uses the instantaneous gradient as a noisy but unbiased estimate of the true gradient. This makes it computationally simple, requiring only O(N) operations per iteration for a filter of length N, and well-suited for real-time online training in non-stationary environments such as Digital Pre-Distortion (DPD) systems where power amplifier characteristics drift with temperature and aging.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.