MATLAB Examples

False Alarm Rate For CFAR Detectors

In the Neyman-Pearson framework, the probability of detection is maximized subject to the constraint that the false-alarm probability does not exceed a specified level. The false-alarm probability depends on the noise variance. Therefore, to calculate the false-alarm probability, you must first estimate the noise variance. If the noise variance changes, you must adjust the threshold to maintain a constant false-alarm rate. Constant false-alarm rate detectors implement adaptive procedures that enable you to update the threshold level of your test when the power of the interference changes.

To motivate the need for an adaptive procedure, assume a simple binary hypothesis test where you must decide between the signal-absent and signal-present hypotheses for a single sample. The signal has amplitude 4, and the noise is zero-mean gaussian with unit variance.

First, set the false-alarm rate to 0.001 and determine the threshold.

T = npwgnthresh(1e-3,1,'real'); threshold = sqrt(db2pow(T)) 
threshold = 3.0902 

Check that this threshold yields the desired false-alarm rate probability and then compute the probability of detection.

pfa = 0.5*erfc(threshold/sqrt(2)) pd = 0.5*erfc((threshold-4)/sqrt(2)) 
pfa = 1.0000e-03 pd = 0.8185 

Next, assume that the noise power increases by 6.02 dB, doubling the noise variance. If your detector does not adapt to this increase in variance by determining a new threshold, your false-alarm rate increases significantly.

pfa = 0.5*erfc(threshold/2) 
pfa = 0.0144 

The following figure shows the effect of increasing the noise variance on the false-alarm probability for a fixed threshold.

noisevar = 1:0.1:10; noisepower = 10*log10(noisevar); pfa = 0.5*erfc(threshold./sqrt(2*noisevar)); semilogy(noisepower,pfa./1e-3) grid on title('Increase in P_{FA} due to Noise Variance') ylabel('Increase in P_{FA} (Orders of Magnitude)') xlabel('Noise Power Increase (dB)')