# Constant false alarm rate
**Constant false alarm rate** (CFAR) detection is an adaptive form of [[Signal_processing|radar signal processing]] used throughout [[Radar|radar]] systems that sets its decision threshold from the interference actually surrounding a cell under test, rather than from one fixed level, so that a receiver reports false alarms at roughly the same rate whether it is looking at open sky, rain, sea state or the wing of a clutter edge. A microsim companion in three.js renders the idea directly: a sliding threshold riding over a simulated range profile that carries both real targets and a clutter edge, rising where the background is loud and settling where it is quiet. CFAR was developed for exactly this problem in radar, and the same adaptive-threshold idea is used wherever a receiver must decide, cell by cell, whether a return is present against a background whose strength is not known in advance, including passive sonar aboard a [[Submarine|submarine]].
Detection theory supplies the ideal answer when the interference's statistics are known exactly: a fixed threshold, chosen once, gives the best possible probability of detection for a chosen probability of false alarm. Radar interference rarely cooperates. [[Clutter_(radar)|Clutter]] from terrain, sea or weather can be many times stronger than the receiver's own thermal noise in one range cell and absent a few cells later, and a threshold set for the quiet cells swamps a detector with false reports the moment it crosses into the loud ones, while a threshold set for the loud cells misses real targets everywhere else. CFAR estimates the local background from the data itself and adapts the threshold to it, cell by cell, as the antenna scans.
## Principle
A CFAR detector never compares the cell under test against a number decided in advance. Instead it draws an estimate of the surrounding noise, clutter and interference from a window of neighbouring range cells, called reference cells, that are assumed to share the cell under test's background but are assumed not to contain a target of their own. A small guard band of cells immediately next to the cell under test is usually excluded from that window, since a real target's return spreads slightly into its neighbours and would otherwise bias the very estimate the detector is testing against. The interference in that window may arrive through the [[Antenna_(radio)|antenna]] as clutter or arise inside the receiver as thermal noise; cell-averaging CFAR does not need to tell the two apart, since it only ever measures their combined strength. The cell under test is then declared a detection only if its own return exceeds the local estimate scaled by a multiplier chosen so that, averaged over the whole scene, the false-alarm probability comes out at the designer's chosen value.
This is the same trade-off that governs any decision made against random noise: raising the multiplier lowers the false-alarm probability but also lowers the probability of detecting a real target, following the same tail probability of a Gaussian that sets a bit-error rate in a noisy digital link.[^ellQdet] Held to a fixed false-alarm probability, the design question becomes which rule gets the best detection probability for that budget, the classical Neyman–Pearson criterion; a fixed threshold answers it exactly when the interference's statistics are known in advance, and CFAR answers the harder, more realistic version of the same question, in which those statistics must be estimated from the scene as the antenna scans rather than assumed beforehand. What makes CFAR distinct from a plain fixed-threshold detector is that the multiplier is applied to an estimate rather than to a known constant, so the detector adapts as the background drifts across the scene instead of being tuned once for conditions that no longer hold a few range cells later. The [[Probability_density_function|probability density function]] assumed for the reference cells decides exactly how that multiplier is calculated, and the received power of noise-like interference from a receiver with no target present is conventionally modelled as exponentially distributed, the same statistics that describe the intensity of any circularly symmetric complex Gaussian noise voltage after it has passed through a [[Signal-to-noise_ratio|square-law]] detector.
## Cell-averaging CFAR
The simplest and most widely taught form is cell-averaging CFAR, which estimates the local background as the average, or equivalently the sum, of a fixed number of reference cells split on either side of the cell under test, and compares the cell under test against that sum scaled by a constant. Because that scaling constant and the number of reference cells fully determine the false-alarm probability under the exponential-noise assumption, the two can be worked out in closed form before a single pulse is ever received: for a sum of `N` independent, identically distributed exponential reference cells and a threshold `T = alpha * sum`, the false-alarm probability comes out to `Pfa = (1 + alpha)^(-N)`, a direct consequence of the reference sum following a Gamma distribution with `N` degrees of freedom.
Working the relation the other way shows what a designer actually buys with more reference cells. Demanding a false-alarm probability of one in a million with `N = 16` reference cells requires `alpha` of about 1.37, so the cell under test must exceed the summed reference cells by that factor, which is the same as requiring it to exceed the plain average of those sixteen cells by a factor of roughly 22, or about 13 dB. Doubling the number of reference cells to 32 for the same false-alarm probability lowers the required margin over the average, because a larger sample estimates the true background level more precisely and needs less of a safety margin built in against the estimate itself being unlucky; this is also exactly why cell-averaging CFAR loses some sensitivity, called CFAR loss, relative to a detector that is told the true background level rather than having to estimate it from a finite window.
## Sophisticated CFAR approaches
Cell-averaging CFAR assumes the whole reference window sits in one uniform background, an assumption that fails in two common situations: a clutter edge, where part of the window lies in strong clutter and part in clear background, and a crowded scene, where one or more of the reference cells themselves contain an interfering target rather than pure background. Both break the plain average in opposite directions. At a clutter edge, averaging the quiet half together with the loud half understates the true local level on the loud side, which raises the false-alarm rate exactly where the clutter is strongest; among interfering targets, one unusually strong reference cell inflates the average and can mask a genuine, weaker target sitting in the cell under test.
Several variants trade one failure mode against the other. Greatest-of CFAR splits the window into a leading half and a trailing half and takes whichever half's average is larger as the background estimate, which raises the threshold appropriately on the clutter side of an edge and holds the false-alarm rate down at the cost of a small loss in sensitivity elsewhere.[^gocfar] Smallest-of CFAR instead takes the lesser of the two half-window averages, which protects a target from being masked by an interferer sitting in the other half of the window but raises the false-alarm rate at a clutter edge, the opposite trade. Ordered-statistic CFAR takes neither a full average nor a half-window average but sorts every reference cell by strength and uses one particular rank, rather than the mean, as the background estimate, a choice that Hendrik Rohling showed gives far better robustness than cell averaging when several interfering targets fall inside the reference window at once.[^rohling83] Choosing a low rank behaves like smallest-of CFAR and resists masking by interferers; choosing a rank close to the top of the window behaves more like greatest-of CFAR and resists a false alarm at a clutter edge, so the single rank parameter lets a designer slide between the two failure modes rather than having to commit to one fixed scheme in advance. A related family of clutter-map techniques replaces the instantaneous spatial average with a running estimate built up over many scans of the same [[Clutter_(radar)|clutter]] cell, trading responsiveness to a suddenly appearing target for a steadier estimate of a background that itself changes slowly from scan to scan.[^clutmap]
## Microsims
The three.js companion built for this article renders cell-averaging CFAR as a sliding threshold drawn over a simulated range profile that carries a handful of point targets and a clutter edge partway along its length; the threshold line rises where the local reference window sits in the clutter and settles back down once the window has cleared it, while a target near the edge is shown competing against whichever estimate the sliding window currently produces. Its controls and specific readouts are left to the companion itself and are not repeated here.
*Try:* in the [[Sonar]] sketch, drag the ping length and watch the signal-excess readout cross zero as an echo clears or fails to clear the receiver's threshold; a CFAR detector runs exactly that crossing test independently on every range cell, using a threshold it has just recalculated from its neighbours.
*Try:* in the [[Radar]] sketch's A-scope, note how a distant echo's voltage shrinks against the noise floor as range grows; a fixed threshold set for a nearby target would miss that same echo entirely, which is the failure a CFAR detector's adaptive threshold is built to avoid.
<!-- RADARSIM:BEGIN g36 — Radar portal microsim (framework build, specs/sims/Constant_false_alarm_rate.json); do not hand-edit inside -->
**Microsim — three.js (Wikitube framework), pending deploy:** *Constant false alarm rate: an adaptive threshold* will play here once `https://wikitube-3d-microsims.netlify.app/radar/Constant_false_alarm_rate.html` is live.
<!-- pending: <div class="wt-sim" data-src="https://wikitube-3d-microsims.netlify.app/radar/Constant_false_alarm_rate.html" data-title="Constant false alarm rate"></div> -->
*Built from `MICROSIM_GUIDE/specs/sims/Constant_false_alarm_rate.json`; part of the [[PORTAL_Radar|Radar]] set.*
<!-- RADARSIM:END -->
## Wikipedia : Wikitube
**Strict pair:** [Wikipedia](https://en.wikipedia.org/wiki/Constant_false_alarm_rate) : [Wikitube](https://en.wikitube.io/wiki/Constant_false_alarm_rate)
Skeleton mirrored at revision 1255990989. Prose, emphasis and the microsims are Wikitube's own.
## See also
- [[Clutter_(radar)]]
- [[Radar_tracker]]
- [[Detection_theory]]
- [[Probability_density_function]]
- [[Signal-to-noise_ratio]]
- [[Radar]]
- [[Moving_target_indication]]
## References
[^ellQdet]: Ellingson, S. *Radio Systems Engineering, Revised First Edition*. 2023, pp. 145-148 (PDF pages). Open Textbook Library: https://open.umn.edu/opentextbooks/textbooks/radio-systems-engineering . CC BY-NC.
[^rohling83]: Rohling, H. "Radar CFAR Thresholding in Clutter and Multiple Target Situations." *IEEE Transactions on Aerospace and Electronic Systems*, vol. AES-19, no. 4, 1983, pp. 608-621.
[^gocfar]: Citation needed: the original Hansen and Sawyers papers on greatest-of and smallest-of cell-averaging CFAR (early 1970s to 1980, IEEE Transactions on Aerospace and Electronic Systems) would fix the exact dates, authorship and page ranges for this pair of variants.
[^clutmap]: Citation needed: a primary engineering source (radar programme documentation or an early clutter-map CFAR paper, with date) would fix when scan-to-scan clutter-map estimation was first fielded in place of a purely spatial reference window.
<!-- Hubs: Signal_processing. Portals: PORTAL_Radar. Radar portal wave 1 · 2026-09-17 · drafted. -->