Inferensys

Glossary

Cost Function

A mathematical function that quantifies the aggregate error between the desired linear output and the actual power amplifier output, which the adaptation algorithm seeks to minimize by adjusting the predistorter coefficients.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
OPTIMIZATION METRIC

What is Cost Function?

A cost function is the mathematical objective that quantifies the error between a system's desired output and its actual output, guiding the adaptation algorithm toward an optimal solution.

A cost function is a scalar metric that aggregates the instantaneous error signal—the difference between the desired linear output and the observed power amplifier output—into a single value representing the system's total performance penalty. In digital predistortion, this function typically computes the mean squared error (MSE) or least squares criterion across a block of samples, providing a convex optimization surface that the coefficient estimation algorithm navigates to find the predistorter parameters that minimize distortion.

The choice of cost function directly shapes the convergence rate and steady-state Error Vector Magnitude (EVM) of the linearization loop. While MSE is standard for its mathematical tractability in stochastic gradient descent and recursive least squares solvers, alternative formulations incorporating weighted error norms or regularization parameters can penalize coefficient magnitudes to improve numerical stability and prevent ill-conditioning of the correlation matrix during real-time adaptation.

OPTIMIZATION FUNDAMENTALS

Key Characteristics of DPD Cost Functions

The cost function is the mathematical compass that guides the adaptation algorithm toward the optimal predistorter coefficients. Its formulation directly determines convergence behavior, steady-state accuracy, and computational complexity.

01

Mean Squared Error (MSE) Foundation

The most prevalent cost function in DPD is the Mean Squared Error, defined as the expected value of the squared magnitude of the error signal—the difference between the desired linear output and the observed PA output.

  • Formulation: J(w) = E[|y_desired(n) - y_observed(n)|²]
  • Quadratic Nature: Creates a convex optimization surface with a single global minimum, guaranteeing convergence for gradient-based methods
  • Gaussian Optimality: Statistically optimal when the distortion noise is additive white Gaussian
  • Practical Implementation: Instantaneous squared error replaces the expectation for online Stochastic Gradient Descent

The quadratic penalty heavily weights large errors, aggressively suppressing spectral regrowth peaks that violate ACLR masks.

Quadratic
Error Penalty Shape
02

Regularization for Numerical Stability

Pure MSE minimization often fails in practice due to ill-conditioning of the correlation matrix, especially with highly correlated basis functions or insufficient signal excitation.

  • Tikhonov Regularization: Adds a penalty term λ||w||² to the cost function, where λ is the regularization parameter
  • Effect on Solution: Biases coefficient estimates toward zero, trading a small increase in bias for a large reduction in variance
  • Hardware Necessity: Essential for fixed-point FPGA implementations where matrix inversion is sensitive to finite-precision effects
  • Levenberg-Marquardt: Extends regularization by adaptively adjusting λ based on the reduction in cost at each iteration

Without regularization, coefficient estimates can oscillate wildly or diverge entirely during background calibration.

λ > 0
Regularization Condition
03

Weighted Error Emphasis

Uniform weighting of all frequency components is often suboptimal. Frequency-weighted cost functions apply spectral shaping to prioritize linearization in critical bands.

  • Spectral Mask Weighting: Assigns higher cost to errors in adjacent channels where ACLR regulatory limits are most stringent
  • In-Band vs. Out-of-Band: Balances the trade-off between EVM (in-band signal quality) and spectral regrowth suppression
  • Implementation: Achieved by filtering the error signal through a weighting filter before squaring, or by formulating the cost in the frequency domain
  • Iterative Reweighting: Dynamically adjusts weights based on current distortion profile to focus adaptation where nonlinearity is most severe

This approach is critical for wideband signal linearization where PA memory effects vary across frequency.

04

Instantaneous vs. Accumulated Cost

The choice between sample-by-sample and block-based cost evaluation defines the adaptation architecture.

  • Instantaneous Cost (LMS Family): J(w) = |e(n)|², updated every sample. Enables true closed-loop DPD with minimal latency but suffers from gradient noise
  • Accumulated Cost (Block LS/RLS): J(w) = Σ|e(n)|² over a block of N samples. Provides more accurate gradient estimates at the cost of increased memory and processing delay
  • Mini-Batch Compromise: Accumulates cost over small batches (e.g., 100-1000 samples) for Stochastic Gradient Descent, balancing gradient accuracy with update rate
  • Forgetting Factor Integration: RLS uses λ (0.98-0.999) to exponentially weight recent errors, enabling tracking of thermal memory effects

The selection directly impacts convergence rate and the ability to track time-varying PA nonlinearity.

λ = 0.98–0.999
Typical Forgetting Factor
05

Constrained Optimization Formulations

Unconstrained minimization may produce coefficients that violate hardware limitations. Constrained cost functions incorporate physical bounds directly into the optimization.

  • Peak Power Constraint: Limits predistorter gain expansion to prevent driving the PA into deeper saturation or exceeding DAC full-scale
  • Coefficient Magnitude Bounds: Restricts |w_k| ≤ w_max to prevent overflow in fixed-point FPGA-based DPD implementation
  • Smoothness Regularization: Penalizes large differences between adjacent Look-Up Table entries to ensure monotonic predistorter response
  • Lagrangian Methods: Incorporate constraints via Lagrange multipliers, solved using QR decomposition for numerical stability

Constrained formulations are essential when transitioning from floating-point simulation to resource-constrained hardware deployment.

06

Multi-Objective Cost Functions

Modern DPD systems often optimize multiple competing objectives simultaneously, requiring Pareto-optimal trade-off formulations.

  • EVM + ACLR Joint Optimization: J(w) = α·EVM(w) + (1-α)·ACLR(w), where α balances in-band fidelity against out-of-band compliance
  • Efficiency-Aware Cost: Incorporates PA drain efficiency into the cost, seeking coefficients that linearize while minimizing DC power consumption—critical for envelope tracking integration
  • PAPR Penalty: Adds cost for signal peak regrowth caused by aggressive predistortion, protecting the PA from overdrive
  • Multi-Band Cross-Terms: For multi-band DPD architectures, includes terms penalizing intermodulation products falling into other active bands

These formulations require careful weighting to avoid oscillating between objectives during online training algorithms.

ERROR METRIC COMPARISON

Common Cost Functions in DPD Systems

Comparison of cost functions used to quantify predistortion error and drive coefficient adaptation in closed-loop digital predistortion systems.

Cost FunctionFormula BasisSensitivity to OutliersGradient ComplexityTypical Application

Mean Squared Error (MSE)

Average of squared error magnitude

High

Linear gradient

General-purpose DPD adaptation

Normalized Mean Squared Error (NMSE)

MSE normalized by reference signal power

High

Linear gradient

Model extraction and validation

Least Squares (LS)

Sum of squared residuals over block

High

Requires matrix inversion

Block-based coefficient estimation

Weighted Least Squares (WLS)

LS with frequency-dependent weighting

Configurable via weights

Weighted matrix inversion

Spectral regrowth emphasis

Instantaneous Squared Error

Squared error at current sample

High

Simple scalar gradient

LMS and SGD online adaptation

Mean Absolute Error (MAE)

Average of absolute error magnitude

Low

Subgradient, non-smooth

Robust adaptation with impulsive noise

Huber Loss

Quadratic for small errors, linear for large

Moderate

Piecewise gradient

Balanced robustness and convergence

Log-Cosh Loss

Logarithm of hyperbolic cosine of error

Low

Smooth, bounded gradient

Numerically stable robust DPD

COST FUNCTION FUNDAMENTALS

Frequently Asked Questions

Clear, technically precise answers to the most common questions about the mathematical functions that drive adaptive digital predistortion optimization.

A cost function in digital predistortion (DPD) is a mathematical function that quantifies the aggregate error between the desired linear output and the actual power amplifier (PA) output, which the adaptation algorithm seeks to minimize by adjusting the predistorter coefficients. It maps the difference between the ideal transmitted signal and the distorted, amplified signal to a single scalar value representing the system's performance. The most common formulation is the Mean Squared Error (MSE), defined as J(w) = E[|y_desired(n) - y_observed(n)|²], where w represents the predistorter coefficients. This function serves as the objective landscape that gradient-based algorithms like Least Mean Squares (LMS) or Recursive Least Squares (RLS) descend to find the optimal linearization parameters. The choice of cost function directly determines which distortion components are penalized, influencing the trade-off between in-band Error Vector Magnitude (EVM) improvement and out-of-band Adjacent Channel Leakage Ratio (ACLR) reduction.

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.