Inferensys

Glossary

Cost Function

The mathematical objective function minimized during digital predistortion training, quantifying the error between the desired linear signal and the actual power amplifier output to guide coefficient optimization.
Developer reviewing LLM cost optimization spreadsheet on laptop, calculator and coffee on desk, casual finance-technical moment.
OPTIMIZATION OBJECTIVE

What is Cost Function?

The cost function is the mathematical objective minimized during digital predistortion training, quantifying the error between the desired linear output and the actual power amplifier output.

A cost function is a scalar-valued mathematical expression that quantifies the discrepancy between the ideal linear signal and the actual nonlinear power amplifier output during DPD training. It maps the error vector—the difference between the desired predistorter input and the observed PA output—to a single real number that the coefficient estimation algorithm seeks to minimize.

Common formulations include the mean squared error (MSE) between the reference and linearized signals, often expressed as Normalized Mean Squared Error (NMSE). The choice of cost function directly impacts convergence rate and steady-state misadjustment, with alternatives like weighted least squares or regularized objectives incorporating Tikhonov regularization to stabilize ill-conditioned inverse problems.

Optimization Criteria

Key Properties of DPD Cost Functions

The mathematical objective functions minimized during digital predistortion training, defining how the error between the desired linear output and actual PA output is quantified and penalized.

01

Mean Squared Error (MSE)

The fundamental cost function in DPD training that computes the average squared difference between the desired input signal and the actual PA output.

Key characteristics:

  • Penalizes large errors quadratically, making it sensitive to outliers and peak distortion
  • Provides a convex optimization surface for linear-in-parameters models like memory polynomials
  • Directly relates to Normalized MSE (NMSE) , the standard DPD performance metric

Example: For a 100 MHz 5G NR signal, minimizing MSE typically achieves NMSE values below -40 dB after convergence.

< -40 dB
Typical NMSE Target
03

Weighted Error Criteria

Cost functions that apply frequency-dependent weighting to prioritize linearization accuracy in specific spectral regions.

Common weighting strategies:

  • In-band emphasis: Higher weights on in-band frequencies to minimize EVM degradation
  • Out-of-band emphasis: Higher weights on adjacent channels to meet stringent ACPR specifications
  • Frequency-domain weighting: Apply FFT to error signal and weight bins according to spectral mask requirements

Application: Critical for 5G NR systems where 3GPP specifies different ACLR limits for adjacent and alternate channels, requiring targeted optimization.

04

Regularized Cost Functions

Augmented objective functions that add penalty terms to prevent overfitting and improve numerical stability during coefficient estimation.

Regularization types:

  • L2 (Ridge): Adds λ||w||² to penalize large coefficient magnitudes, preventing coefficient drift
  • L1 (Lasso): Adds λ||w||₁ to promote sparsity, useful for reducing LUT entries
  • Elastic Net: Combines L1 and L2 penalties for both sparsity and stability

Practical impact: Without regularization, DPD coefficients can drift by 3-5 dB in NMSE performance over temperature cycles of -40°C to +85°C.

05

Stochastic Gradient Descent (SGD) Loss

An iterative optimization approach that updates DPD coefficients using instantaneous gradient estimates rather than batch processing.

Algorithm characteristics:

  • Update rule: w(n+1) = w(n) - μ∇J(w(n)) where μ is the learning rate
  • Converges to Wiener solution for MSE cost functions when μ is properly chosen
  • Trade-off between convergence rate (larger μ) and misadjustment (steady-state error)

Implementation: LMS algorithm is the most common SGD variant in DPD, requiring only O(N) operations per sample versus O(N³) for LS solutions.

O(N)
Per-Sample Complexity
06

Peak-Aware Loss Functions

Cost functions designed to specifically penalize distortion at high signal amplitudes where PA compression is most severe.

Advanced formulations:

  • Huber loss: Quadratic for small errors, linear for large errors—robust to outliers
  • Log-cosh loss: Smooth approximation of absolute error, less sensitive to measurement noise
  • Custom weighting: Apply amplitude-dependent weights emphasizing the PAPR region (top 1% of samples)

Benefit: Reduces peak EVM by 2-3 dB compared to uniform MSE minimization, critical for high-order QAM constellations (256-QAM, 1024-QAM).

OBJECTIVE FUNCTION COMPARISON

Common Cost Functions in DPD

Comparison of mathematical objective functions minimized during digital predistorter coefficient estimation, including their formulations, convergence properties, and typical applications.

Cost FunctionFormulationConvergence SpeedRobustness to NoiseTypical Application

Mean Squared Error (MSE)

J = E[|y(n) - ŷ(n)|²]

Moderate

High

General DPD training with Gaussian noise assumptions

Normalized Mean Squared Error (NMSE)

J = E[|y(n) - ŷ(n)|²] / E[|y(n)|²]

Moderate

High

Performance evaluation and model validation

Least Squares (LS)

J = ||y - Xw||²

Fast (batch)

Moderate

Offline coefficient extraction in ILA architectures

Weighted Least Squares (WLS)

J = (y - Xw)ᵀW(y - Xw)

Fast (batch)

High

Emphasizing high-power regions for ACLR reduction

Regularized Least Squares (Ridge)

J = ||y - Xw||² + λ||w||²

Fast (batch)

Very High

Ill-conditioned problems with high condition number matrices

Instantaneous Squared Error

J = |e(n)|² = |y(n) - ŷ(n)|²

Slow

Low

Sample-by-sample LMS adaptive updates

Exponentially Weighted RLS

J = Σ λⁿ⁻ᵏ|e(k)|²

Very Fast

High

Tracking time-varying PA characteristics in closed-loop DPD

Log-Cosh Loss

J = Σ log(cosh(y(n) - ŷ(n)))

Moderate

Very High

Robust DPD training with impulsive noise or outliers

COST FUNCTION CLARIFICATIONS

Frequently Asked Questions

Clear answers to common questions about the mathematical objective functions that drive digital predistortion training and coefficient optimization.

A cost function in digital predistortion is a mathematical objective function that quantifies the error between the desired linear output and the actual power amplifier output, which the DPD training algorithm minimizes to find optimal predistorter coefficients. The most common form is the mean squared error (MSE) between the ideal input signal and the observed PA output, often expressed as J(w) = E[|y_desired(n) - y_actual(n)|²] where w represents the predistorter coefficients. This scalar value provides a single metric that the optimization algorithm—whether Least Mean Squares (LMS), Recursive Least Squares (RLS), or stochastic gradient descent—uses to iteratively adjust parameters. The choice of cost function directly impacts convergence behavior, steady-state error, and the predistorter's ability to suppress spectral regrowth while maintaining in-band signal quality.

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.