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.
Glossary
Least Mean Squares (LMS)

What is Least Mean Squares (LMS)?
An introduction to the foundational stochastic gradient descent algorithm for real-time coefficient estimation in adaptive systems.
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.
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.
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.
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.
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.
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.
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.
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.
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.
| Feature | LMS | RLS | NLMS |
|---|---|---|---|
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 |
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.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
The Least Mean Squares algorithm exists within a rich ecosystem of adaptive filtering and estimation techniques. Understanding these related concepts is essential for selecting the right algorithm for a given convergence, complexity, and stability requirement.
Normalized LMS (NLMS)
A direct variant of LMS that normalizes the step size by the power of the input signal vector. Key mechanism: The update term is divided by ||x(n)||² + δ, where δ is a small regularization constant. This prevents gradient noise amplification when input power fluctuates, making convergence more stable for non-stationary signals like speech or modulated waveforms. Trade-off: Slightly higher computational cost per iteration due to the norm calculation, but significantly improved robustness.
Recursive Least Squares (RLS)
An adaptive algorithm that recursively updates the inverse of the input correlation matrix to achieve an order-of-magnitude faster convergence than LMS. Mechanism: Minimizes a weighted least squares cost function using the matrix inversion lemma. Critical parameters: The forgetting factor λ (typically 0.95–0.999) controls the memory of the algorithm. Trade-off: O(N²) computational complexity versus O(N) for LMS, making it unsuitable for long filter lengths in resource-constrained hardware.
Stochastic Gradient Descent (SGD)
The broader optimization framework from which LMS is derived. LMS is essentially SGD applied to the mean squared error cost function using a single-sample instantaneous gradient estimate. Key distinction: General SGD uses mini-batches; LMS uses a batch size of 1. Convergence behavior: The noisy gradient estimate causes LMS to wander around the minimum rather than converging exactly, producing a steady-state misadjustment proportional to the step size μ.
Wiener-Hopf Equation
The theoretical foundation defining the optimal weight vector: w_opt = R⁻¹p, where R is the input autocorrelation matrix and p is the cross-correlation vector between input and desired signal. LMS iteratively approximates this solution without requiring matrix inversion. Significance: The Wiener solution represents the theoretical lower bound on mean squared error. The misadjustment of LMS measures how far the steady-state solution deviates from this optimum.
Convergence Rate vs. Misadjustment
The fundamental trade-off in LMS design governed by the step size μ. Convergence rate: Larger μ produces faster initial convergence, with time constant τ ≈ 1/(2μλ_i) for each mode. Misadjustment: Steady-state excess error is proportional to μ · Tr[R]. Practical implication: A step size that converges in 100 samples may produce 10% misadjustment; reducing μ by a factor of 10 cuts misadjustment to 1% but slows convergence proportionally. This trade-off motivates variable step-size LMS variants.
Indirect Learning Architecture (ILA)
The dominant architecture for applying LMS to digital predistortion. Mechanism: A copy of the predistorter is placed in a postdistorter configuration after the power amplifier. LMS minimizes the error between the postdistorter output and the predistorter input. Key advantage: Avoids the need for a PA inverse model and works with standard LMS updates. Assumption: Relies on the postdistorter-to-predistorter copy being valid, which holds when the PA characteristic is sufficiently smooth and memory effects are captured by the model structure.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us