Recursive Least Squares (RLS) is an adaptive filtering algorithm that recursively updates coefficient estimates to minimize a weighted linear least squares cost function. Unlike gradient-based methods, RLS computes the exact solution to the least-squares problem at each iteration by recursively updating the inverse of the input signal's correlation matrix, resulting in an order-of-magnitude faster convergence rate than the Least Mean Squares (LMS) algorithm.
Glossary
Recursive Least Squares (RLS)

What is Recursive Least Squares (RLS)?
An adaptive algorithm that recursively finds the coefficients minimizing a weighted linear least squares cost function, offering faster convergence than LMS at the cost of higher computational complexity.
The algorithm's rapid convergence is achieved through a forgetting factor (λ), which exponentially discounts older data to track non-stationary systems like a power amplifier's changing thermal characteristics. This computational advantage comes at the cost of O(N²) complexity per iteration due to the required matrix inversion, making RLS significantly more demanding on FPGA resources than simpler stochastic gradient methods, though numerically stable implementations using QR decomposition mitigate ill-conditioning in fixed-point hardware.
Key Features of RLS
Recursive Least Squares (RLS) is defined by a set of distinct mathematical properties that differentiate it from simpler gradient-based algorithms like LMS. These features dictate its suitability for high-performance Digital Pre-Distortion (DPD) applications where rapid tracking of power amplifier nonlinearities is critical.
Exponential Forgetting Factor
The forgetting factor (λ, typically 0.95 < λ < 0.999) is a weighting parameter that exponentially discounts the influence of older data on the current coefficient estimate. This mechanism is essential for tracking non-stationary environments, such as a power amplifier whose characteristics drift due to thermal memory effects or changing signal statistics.
- A smaller λ provides faster tracking but increases steady-state misadjustment.
- A λ closer to 1 yields better steady-state performance but slower adaptation to change.
- The effective memory of the algorithm is approximately 1/(1-λ) samples.
Direct Matrix Inversion Avoidance
RLS recursively updates the inverse of the correlation matrix using the Matrix Inversion Lemma (Woodbury matrix identity), avoiding the O(N³) computational cost of direct inversion at each iteration. This recursive formulation reduces the per-iteration complexity to O(N²), where N is the number of basis function coefficients.
- The gain vector is computed by applying the existing inverse matrix to the new data vector.
- This enables real-time coefficient updates in closed-loop DPD systems without block-based processing delays.
Optimal Convergence Rate
Unlike LMS, whose convergence is governed by the eigenvalue spread of the input correlation matrix, RLS converges at a rate independent of the input signal's statistical conditioning. This is because RLS effectively whitens the input data by inverting the correlation matrix.
- RLS typically converges in approximately 2N iterations, where N is the filter order.
- This is orders of magnitude faster than LMS for signals with high eigenvalue disparity.
- Critical for DPD applications where the predistorter must lock rapidly after a change in carrier frequency or average power.
Regularization for Numerical Stability
A regularization parameter (δ) is added to the diagonal of the initial correlation matrix estimate to prevent ill-conditioning during the early stages of adaptation or during periods of low input excitation. This is mathematically equivalent to initializing the inverse correlation matrix as P(0) = δ⁻¹I.
- Prevents large coefficient transients at startup.
- Mitigates the effects of finite-precision arithmetic in fixed-point FPGA implementations.
- A typical value for δ is a small positive constant relative to the signal power.
Weighted Least Squares Cost Function
RLS minimizes a weighted sum of squared errors over all past observations, rather than the instantaneous squared error used by LMS. The cost function is: J(n) = Σᵢ₌₁ⁿ λⁿ⁻ⁱ |e(i)|² where e(i) is the error signal at time i. This deterministic, batch-like objective gives RLS its superior steady-state performance and immunity to gradient noise.
- Produces the exact least-squares solution for stationary signals when λ=1.
- The recursive formulation computes this sum without storing the entire history.
Computational Complexity Trade-off
The primary drawback of RLS is its O(N²) computational complexity per iteration, compared to O(N) for LMS. For a DPD system with hundreds of basis function coefficients, this can strain real-time processing budgets.
- Fast RLS variants (e.g., lattice-based, QR-decomposition RLS) reduce complexity to O(N) while preserving convergence properties.
- QR-RLS is particularly valued in DPD for its superior numerical stability in fixed-point hardware.
- The choice between RLS and LMS variants is a direct trade-off between convergence speed and implementation cost.
RLS vs. LMS: A Technical Comparison
A detailed comparison of Recursive Least Squares (RLS) and Least Mean Squares (LMS) for online coefficient estimation in digital predistortion systems.
| Feature | Recursive Least Squares (RLS) | Least Mean Squares (LMS) | Normalized LMS (NLMS) |
|---|---|---|---|
Optimization Criterion | Weighted least squares (minimizes sum of squared errors over all time) | Stochastic gradient descent (minimizes instantaneous squared error) | Stochastic gradient descent with input-normalized step size |
Convergence Rate | Fast (typically < 50 iterations) | Slow (100-1000+ iterations) | Moderate (50-200 iterations) |
Computational Complexity per Iteration | O(N²) where N is number of coefficients | O(N) | O(N) |
Memory Requirement | High (stores N×N correlation matrix) | Low (stores coefficient vector only) | Low (stores coefficient vector plus input power estimate) |
Steady-State Misadjustment | Low (asymptotically zero for stationary signals) | Non-zero (proportional to step size) | Non-zero (proportional to normalized step size) |
Tracking of Non-Stationary Systems | Excellent with tuned forgetting factor | Good with fixed step size | Good with adaptive step size |
Numerical Stability on Fixed-Point Hardware | |||
Sensitivity to Ill-Conditioned Inputs | High (requires regularization parameter) | Low (inherently robust) | Low (normalization mitigates eigenvalue spread) |
Frequently Asked Questions
Explore the mechanics, trade-offs, and implementation details of the Recursive Least Squares algorithm for adaptive digital predistortion.
The Recursive Least Squares (RLS) algorithm is an adaptive filter that recursively finds the coefficients minimizing a weighted linear least squares cost function. Unlike gradient-descent methods like LMS, RLS computes the exact solution to the least-squares problem at each iteration by recursively updating the inverse of the input signal's correlation matrix. It works by maintaining an estimate of the inverse correlation matrix, P(n), and a weight vector, w(n). At each time step n, it computes a gain vector k(n) = P(n-1)u(n) / (λ + u^H(n)P(n-1)u(n)), where u(n) is the input regressor vector and λ is the forgetting factor. The weights are then updated using the a priori estimation error: w(n) = w(n-1) + k(n)ξ*(n). Finally, the inverse correlation matrix is updated: P(n) = λ⁻¹[P(n-1) - k(n)u^H(n)P(n-1)]. This exact minimization provides an order-of-magnitude faster convergence rate than LMS, making it ideal for tracking rapid changes in power amplifier nonlinearity.
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
Understanding RLS requires context within the broader landscape of adaptive algorithms and the DPD implementation challenges they address.
Least Mean Squares (LMS)
A stochastic gradient descent algorithm that updates coefficients using only the instantaneous squared error. Unlike RLS, LMS does not require matrix inversion, making it computationally trivial.
- Complexity: O(N) per iteration vs. O(N²) for RLS
- Convergence: Slow, highly dependent on eigenvalue spread of input
- Use Case: Preferred when compute resources are severely constrained and slow adaptation is acceptable
Forgetting Factor (λ)
A critical RLS hyperparameter that exponentially weights past data, enabling the algorithm to track time-varying systems like thermally drifting power amplifiers.
- Range: Typically 0.95 < λ < 1.0
- Memory: Effective window length ≈ 1/(1-λ) samples
- Trade-off: Lower λ gives faster tracking but higher steady-state misadjustment
QR Decomposition RLS
A numerically robust implementation of RLS that operates directly on the square-root of the inverse correlation matrix using Givens rotations or Householder reflections.
- Stability: Superior to standard RLS in finite-precision arithmetic
- Hardware: Well-suited for systolic array FPGA implementations
- Benefit: Avoids explicit matrix inversion, preventing ill-conditioning failures
Correlation Matrix Ill-Conditioning
A numerical pathology where the input autocorrelation matrix becomes nearly singular, causing RLS coefficient estimates to diverge catastrophically.
- Cause: Highly correlated basis functions or insufficient signal excitation
- Mitigation: Adding a regularization parameter δ to the diagonal
- Detection: Monitor the condition number of the inverse correlation matrix
Convergence Rate Comparison
RLS converges in approximately 2N iterations where N is the number of coefficients, independent of input signal statistics. LMS convergence depends on eigenvalue spread.
- RLS: ~2N samples to reach steady-state
- LMS: Can require 10x–100x more iterations for correlated inputs
- Implication: RLS is essential for wideband DPD where rapid adaptation to changing PA characteristics is required
Computational Complexity Trade-off
Standard RLS requires O(N²) operations per iteration due to matrix updates, compared to O(N) for LMS. Fast RLS variants reduce this to O(N) using shift-invariance properties.
- Standard RLS: Matrix inversion lemma, O(N²)
- Fast RLS: Exploits Toeplitz structure, O(N)
- QR-RLS: Givens rotations, O(N²) but numerically stable

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