Inferensys

Glossary

QR-RLS

A numerically robust implementation of the Recursive Least Squares algorithm that uses Givens rotations to directly update the square-root of the inverse correlation matrix.
Project manager reviewing AI implementation timeline on laptop, Gantt chart visible, casual office planning session.
NUMERICALLY ROBUST ADAPTIVE FILTERING

What is QR-RLS?

QR-RLS is a numerically robust implementation of the Recursive Least Squares algorithm that uses Givens rotations to directly update the square-root of the inverse correlation matrix, avoiding explicit matrix inversion.

QR-RLS (QR-Decomposition Recursive Least Squares) is an adaptive filtering algorithm that solves the RLS problem by maintaining and updating the Cholesky factor (square-root) of the inverse input correlation matrix rather than the full matrix itself. This square-root formulation, propagated via orthogonal Givens rotations, guarantees the mathematical property of positive-definiteness and effectively doubles the numerical precision of the computation, making it immune to the instability caused by finite-precision arithmetic in standard RLS.

The algorithm operates by appending new input data to the existing triangular square-root matrix and applying a sequence of Givens rotations to zero out the appended row, producing an updated upper-triangular factor. This rotation-based update avoids the explicit computation of the inverse correlation matrix, which is the primary source of numerical instability in conventional RLS. The result is an algorithm with O(N²) complexity that converges as rapidly as standard RLS but remains stable indefinitely, making it the preferred choice for safety-critical embedded applications like digital predistortion where coefficient divergence cannot be tolerated.

NUMERICALLY ROBUST ADAPTIVE FILTERING

Key Features of QR-RLS

QR decomposition Recursive Least Squares (QR-RLS) is a numerically robust implementation of the RLS algorithm that avoids explicit computation of the inverse correlation matrix. By operating directly on the square-root of the inverse correlation matrix using Givens rotations, QR-RLS achieves superior numerical stability in finite-precision arithmetic, making it ideal for real-time embedded digital predistortion systems.

01

Square-Root Domain Operation

QR-RLS operates on the Cholesky factor (square-root) of the inverse correlation matrix rather than the full matrix itself. This fundamental design choice doubles the effective numerical precision and guarantees that the correlation matrix remains positive-definite throughout adaptation.

  • Propagates the square-root factor S(n) where P(n) = S(n)S^H(n)
  • Eliminates matrix inversion operations that amplify round-off errors
  • Maintains stability even with ill-conditioned input signals common in wideband predistortion
  • Condition number of S(n) is the square root of P(n), reducing sensitivity to perturbations
02

Givens Rotation Update Mechanism

The core computational kernel of QR-RLS uses Givens rotations to annihilate individual elements of the augmented data matrix. Each rotation is an orthogonal transformation that selectively zeros out one element while preserving the norm of the affected rows.

  • A Givens rotation matrix G(i,j,θ) applies a plane rotation between rows i and j
  • Parameters c = cos(θ) and s = sin(θ) are computed to zero a specific element
  • Orthogonality ensures G^T G = I, preserving the least-squares solution exactly
  • Enables systolic array implementations where processing elements operate in parallel
03

Systolic Array Hardware Mapping

QR-RLS maps naturally onto systolic array architectures, where a grid of processing elements performs Givens rotations in a pipelined, rhythmic fashion. Each cell communicates only with its immediate neighbors, eliminating global routing bottlenecks.

  • Boundary cells compute rotation parameters (c, s) from diagonal elements
  • Internal cells apply rotations to off-diagonal elements using received parameters
  • Achieves O(n²) throughput with O(n) processing elements for n coefficients
  • Ideal for FPGA and ASIC implementation in real-time DPD systems operating at hundreds of MHz
04

Back-Substitution for Coefficient Extraction

After the QR decomposition updates the upper triangular matrix R(n), the optimal coefficient vector is extracted through back-substitution rather than matrix inversion. This exploits the triangular structure for efficient computation.

  • Solves R(n)w(n) = p(n) where R is upper triangular
  • Starts from the last coefficient and works backward: w_k = (p_k - Σ R_{k,j}w_j) / R_{k,k}
  • Requires only O(n²/2) operations versus O(n³) for full matrix inversion
  • Numerically stable because division is by diagonal elements of well-conditioned R
05

Exponential Forgetting with Square-Root Propagation

QR-RLS incorporates an exponential forgetting factor λ (typically 0.95–0.999) to track time-varying power amplifier characteristics. The forgetting factor is applied directly in the square-root domain by scaling the existing triangular factor before incorporating new data.

  • Applies √λ scaling to the existing R matrix before each update
  • Smaller λ provides faster tracking of thermal memory effects and bias point drift
  • Larger λ improves steady-state accuracy for static or slowly varying channels
  • Enables tracking of Doherty amplifier load modulation during envelope variation
06

Comparison with Conventional RLS

QR-RLS provides mathematically identical results to conventional RLS in infinite precision, but dramatically outperforms it in fixed-point embedded implementations where word lengths are limited to 16–32 bits.

  • Conventional RLS: O(n²) complexity but prone to covariance matrix blow-up
  • QR-RLS: O(n²) complexity with 2× effective precision due to square-root domain
  • Conventional RLS may diverge after 10³–10⁴ iterations in 16-bit arithmetic
  • QR-RLS maintains convergence indefinitely, critical for continuous online training in deployed DPD systems
QR-RLS IMPLEMENTATION

Frequently Asked Questions

Addressing the most common engineering questions regarding the numerical stability, computational complexity, and practical deployment of the QR decomposition-based Recursive Least Squares algorithm for digital predistortion coefficient estimation.

QR-RLS (QR Decomposition-based Recursive Least Squares) is a numerically robust implementation of the RLS algorithm that recursively updates the Cholesky factor (square-root) of the inverse correlation matrix rather than the inverse correlation matrix itself. Unlike standard RLS, which explicitly propagates the inverse correlation matrix P(n) and is susceptible to loss of symmetry and positive-definiteness due to finite-precision arithmetic, QR-RLS operates directly on the square-root matrix P^(1/2)(n) using Givens rotations. This square-root formulation guarantees that the underlying correlation matrix remains mathematically positive-definite, effectively squaring the dynamic range of the algorithm and making it the preferred choice for fixed-point DSP and FPGA implementations where numerical stability is paramount.

ALGORITHM COMPARISON

QR-RLS vs. Conventional RLS vs. LMS

Comparative analysis of adaptive coefficient estimation algorithms for digital predistortion applications, highlighting numerical stability, convergence speed, and computational complexity trade-offs.

FeatureQR-RLSConventional RLSLMS

Algorithm Family

Recursive Least Squares (Square-Root)

Recursive Least Squares

Stochastic Gradient Descent

Core Update Mechanism

Givens rotations on square-root of inverse correlation matrix

Matrix inversion lemma (Woodbury identity) on full correlation matrix

Instantaneous gradient estimate of mean squared error

Numerical Stability

Excellent (condition number of square-root matrix is halved)

Poor to moderate (susceptible to covariance matrix blow-up)

Good (no matrix operations required)

Convergence Rate (Correlated Inputs)

Fast (10-50 samples)

Fast (10-50 samples)

Slow (100-1000+ samples)

Computational Complexity per Iteration

O(N²) with higher constant factor due to rotation operations

O(N²)

O(N)

Fixed-Point Implementation Suitability

Sensitivity to Forgetting Factor Selection

Low (inherent numerical robustness mitigates instability)

High (improper λ can cause divergence or covariance blow-up)

Not applicable (uses step size μ instead)

Typical Misadjustment at Steady-State

0.1-0.5%

0.1-0.5%

1-5%

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.