Inferensys

Glossary

Recursive Least Squares (RLS)

An adaptive algorithm that recursively updates the inverse of the input correlation matrix to achieve faster convergence than gradient-based methods at the cost of higher computational complexity.
Knowledge engineer constructing knowledge base on laptop, document hierarchy visible, casual office setup.
ADAPTIVE FILTERING ALGORITHM

What is Recursive Least Squares (RLS)?

An adaptive algorithm that recursively updates the inverse of the input correlation matrix to achieve faster convergence than gradient-based methods at the cost of higher computational complexity.

Recursive Least Squares (RLS) is an adaptive filtering algorithm that recursively finds the coefficient vector minimizing a weighted linear least squares cost function. Unlike gradient-descent methods such as Least Mean Squares (LMS), RLS achieves an order-of-magnitude faster convergence rate by explicitly computing and updating the inverse of the deterministic autocorrelation matrix of the input signal at each iteration.

The core mechanism relies on the matrix inversion lemma (Woodbury identity) to update the inverse correlation matrix P(n) recursively, avoiding costly full matrix inversions. A forgetting factor λ exponentially weights past data, enabling tracking of time-varying systems. This O(N²) computational complexity per iteration makes RLS ideal for applications like digital predistortion coefficient estimation where rapid adaptation to power amplifier nonlinearity changes is critical.

ADAPTIVE ALGORITHM COMPARISON

RLS vs. LMS: Key Differences

A technical comparison of Recursive Least Squares (RLS) and Least Mean Squares (LMS) for adaptive coefficient estimation in digital predistortion systems.

FeatureRecursive Least Squares (RLS)Least Mean Squares (LMS)Normalized LMS (NLMS)

Convergence Rate

Fast (typically < 10x input dimension)

Slow (signal-dependent)

Moderate (improved over LMS)

Computational Complexity per Iteration

O(N²) to O(N³)

O(N)

O(N)

Memory Requirement

O(N²) for correlation matrix

O(N) for weight vector

O(N) for weight vector

Sensitivity to Eigenvalue Spread

Insensitive (whitens input)

Highly sensitive

Reduced sensitivity

Steady-State Misadjustment

Lower

Higher

Moderate

Tracking of Time-Varying Systems

Excellent with forgetting factor

Limited by fixed step size

Improved with adaptive step size

Numerical Stability

Can be poor (fixed-point)

Excellent

Excellent

Typical Use Case

Fast-changing PA characteristics, wideband signals

Resource-constrained embedded systems

Systems with fluctuating input power

ALGORITHM PROPERTIES

Key Characteristics of RLS

Recursive Least Squares (RLS) is defined by its unique approach to adaptive filtering, trading computational complexity for superior convergence speed. The following cards break down its core operational characteristics.

01

Exponential Forgetting Mechanism

RLS employs a forgetting factor (λ, typically 0.95 < λ < 1) that applies exponential weighting to historical data. This mechanism ensures the algorithm can track time-varying systems by progressively discarding stale observations.

  • Recent samples dominate the cost function
  • Older data decays geometrically in influence
  • Enables tracking of thermal memory effects in power amplifiers
  • A λ of 1.0 disables forgetting for stationary systems
02

Correlation Matrix Inversion

The core computational engine of RLS is the recursive update of the inverse autocorrelation matrix (P). Using the matrix inversion lemma (Woodbury identity), RLS avoids explicit matrix inversion at each step.

  • Updates P(n) from P(n-1) in O(N²) operations
  • Maintains full statistical information of the input signal
  • Directly computes the Kalman gain vector
  • Susceptible to numerical instability without proper regularization
03

Kalman Gain Vector

The Kalman gain vector (k) determines how prediction errors are distributed across filter coefficients. It represents the optimal weighting of new information based on the current uncertainty in the parameter estimates.

  • Computed as k(n) = P(n-1)u(n) / (λ + uᵀ(n)P(n-1)u(n))
  • Large gain → high uncertainty → aggressive updates
  • Small gain → high confidence → conservative updates
  • Directly analogous to the Kalman filter gain
04

Convergence Rate Superiority

RLS converges in approximately 2N iterations where N is the filter order, compared to 10N–20N iterations for LMS-based algorithms. This quadratic convergence property makes RLS ideal for applications requiring rapid adaptation.

  • Independent of input signal eigenvalue spread
  • No step-size tuning required
  • Achieves the theoretical Wiener solution asymptotically
  • Particularly effective for highly correlated input signals
05

Computational Complexity Trade-off

Standard RLS requires O(N²) operations per iteration due to the matrix update, compared to O(N) for LMS. This quadratic complexity limits its use in resource-constrained embedded systems.

  • Standard RLS: ~4N² + 4N multiplications per sample
  • Fast RLS variants reduce to O(N) using lattice structures
  • QR-RLS offers numerical stability at similar complexity
  • FPGA implementations often use systolic array architectures
06

Numerical Stability Considerations

The recursive update of the inverse correlation matrix can suffer from loss of symmetry and loss of positive definiteness due to finite-precision arithmetic. This can cause catastrophic divergence in fixed-point implementations.

  • Regularization parameter (δ) stabilizes initial conditions
  • QR-RLS uses Givens rotations for guaranteed stability
  • Square-root RLS propagates matrix square-roots
  • Double-precision floating-point recommended for standard RLS
RLS INSIGHTS

Frequently Asked Questions

Concise answers to common technical questions about the Recursive Least Squares algorithm, its implementation, and its role in adaptive digital predistortion systems.

The Recursive Least Squares (RLS) algorithm is an adaptive filter that recursively finds the coefficients minimizing a weighted linear least squares cost function relating to the input signals. Unlike gradient-descent methods like Least Mean Squares (LMS), RLS achieves extremely fast convergence by explicitly computing and updating the inverse of the input signal's autocorrelation matrix. At each time step n, the algorithm computes the Kalman gain vector, updates the coefficient vector based on the a priori estimation error, and recursively updates the inverse correlation matrix using the matrix inversion lemma (Woodbury matrix identity). This deterministic, data-domain approach makes RLS insensitive to the eigenvalue spread of the input signal, ensuring uniform convergence rates regardless of signal conditioning.

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.