Processing gain is the improvement in signal-to-noise ratio (SNR) achieved by specific signal processing operations -- most commonly filtering, coherent averaging, or spread-spectrum despreading -- expressed in decibels. It quantifies how much a system recovers a weak signal from noise by exploiting redundancy or bandwidth expansion. Not every signal processing operation yields a meaningful processing gain; the term applies specifically to operations that differentially improve SNR by accumulating coherent signal energy while averaging down noise.
In practice
In digital filters and averaging operations, processing gain arises because noise power averages down while coherent signal energy accumulates. For a simple N-point running average (boxcar filter), assuming white, uncorrelated noise and a coherent signal, the noise power is reduced by a factor of N, yielding a processing gain of 10*log10(N) dB. Colored noise, correlated samples, or a signal that is not coherent across the window will reduce or alter this gain. Averaging 16 samples, for example, gives roughly 12 dB of SNR improvement under ideal conditions. This is directly relevant to the "Running Average" blog post, which demonstrates the SNR benefit of accumulating samples in hardware.
In spread-spectrum systems such as direct-sequence spread spectrum (DSSS), processing gain equals 10*log10(chip rate / data rate), where the linear ratio (chips per bit) is the spreading factor and the dB equivalent is the processing gain. A signal spread over 1023 chips per bit achieves a nominal processing gain of about 30 dB upon despreading; actual gain in a real system will be lower due to implementation losses, synchronization imperfections, coding overhead, and filtering.
In FPGA-based DSP, processing gain directly influences fixed-point word-length decisions. As you accumulate N samples in an accumulator, the output requires approximately log2(N) additional bits to avoid overflow -- this is a rule of thumb that holds for full-scale coherent accumulation of same-sign values; actual required growth depends on input range, signal statistics, and architecture. The SNR improves correspondingly. Designers must balance register growth against the actual gain needed, particularly in cascaded filter stages where bit widths can grow quickly.
A common pitfall is confusing processing gain with filter insertion gain or digital scaling. Processing gain is an SNR improvement, not a signal amplitude boost. Normalizing the output of an averager or matched filter back to the input amplitude scale removes the amplitude gain but preserves the SNR improvement, which is the quantity that matters for detection performance.
Discussed on FPGARelated
Frequently asked
How is processing gain calculated for a simple averager?
For an N-point averager, noise power at the output is 1/N of the input noise power (assuming white, uncorrelated noise), so the processing gain is 10*log10(N) dB. Doubling the number of averages adds about 3 dB. This assumes the signal is coherent across all N samples; if the signal itself varies within the averaging window, the effective gain is lower.
Does processing gain come for free, or is there a cost?
It is not free. Averaging over N samples introduces a latency of N sample periods and reduces the bandwidth of detectable signal variations by roughly the same factor. In spread-spectrum, achieving processing gain requires transmitting at a chip rate much higher than the data rate, consuming proportionally more bandwidth. The SNR improvement trades against time resolution, bandwidth, or both.
How does processing gain affect fixed-point bit widths in an FPGA accumulator?
Each time you double the number of accumulated samples, you need one additional bit in the accumulator to prevent overflow. Accumulating 1024 samples requires 10 extra bits beyond the input word width. If you then right-shift (divide) to normalize, those bits can be reclaimed, but you must keep them during accumulation. Planning word growth early avoids silent saturation or wrap-around errors that would destroy the SNR benefit.
Is processing gain the same as the spreading gain in DSSS receivers?
In DSSS, the spreading gain and the processing gain are numerically equal -- both are 10*log10(chips per bit) -- but they describe different mechanisms. Spreading gain refers to the bandwidth expansion at the transmitter; processing gain describes the SNR recovery at the receiver during despreading (correlation). The two are paired and equal in a matched system, but the term 'processing gain' applies to the receiver operation specifically.
Can processing gain be applied to phase-locked loops or oscillator tracking?
A digital
PLL with a narrow loop bandwidth effectively averages phase error over many cycles, rejecting high-frequency noise. This behavior is loosely analogous to processing gain, but PLL noise rejection is more precisely characterized in terms of loop bandwidth and tracking performance rather than processing gain as such. The 'Use DPLL to Lock Digital
Oscillator to 1PPS Signal' post illustrates this noise rejection principle: a very slow loop filter tracking a 1 PPS reference achieves high noise rejection by integrating phase error across many oscillator cycles.
Differentiators vs similar concepts
Processing gain is often confused with simple amplitude gain or filter passband gain. Amplitude gain (scaling) changes signal and noise power equally, leaving SNR unchanged. Processing gain specifically refers to a differential improvement in SNR. It is also distinct from dynamic range: dynamic range describes the ratio of the largest to smallest signal a system can represent, while processing gain describes how much the SNR improves through a specific processing step. In spread-spectrum literature, 'spreading gain' and 'processing gain' are sometimes used interchangeably, but strictly speaking spreading gain is a transmitter property and processing gain is the receiver-side SNR recovery.