Main Content

phased.CFARDetector

Constant false alarm rate (CFAR) detector

Description

The CFARDetector object implements a one-dimensional constant false-alarm rate (CFAR) detector. Detection processing is performed on selected elements (called cells) of the input data. A detection is declared when a cell value in the input data exceeds a threshold. To maintain a constant false alarm-rate, the threshold is set to a multiple of the local noise power of the input data. The detector estimates local noise power for a cell-under-test (CUT) from surrounding cells using one of three cell averaging methods, or an order statistics method. The cell-averaging methods are cell averaging (CA), greatest-of cell averaging (GOCA), or smallest-of cell averaging (SOCA).

For more information about CFAR detectors, see [1].

For each test cell, the detector:

  1. estimates the noise statistic from the cell values in the training band surrounding the CUT cell.

  2. computes the threshold by multiplying the noise estimate by the threshold factor.

  3. compares the CUT cell value to the threshold to determine whether a target is present or absent. If the value is greater than the threshold, a target is present.

To run the detector

  1. Define and set up your CFAR detector. See Construction.

  2. Call step to perform CFAR detection according to the properties of phased.CFARDetector. The behavior of step is specific to each object in the toolbox.

Note

Starting in R2016b, instead of using the step method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

Construction

H = phased.CFARDetector creates a CFAR detector System object, H. The object performs CFAR detection on input data.

H = phased.CFARDetector(Name,Value) creates the object, H, with each specified property Name set to the specified Value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).

Properties

Method

CFAR algorithm

Specify the CFAR detector algorithm as one of

'CA'Cell-averaging CFAR
'GOCA'Greatest-of cell-averaging CFAR
'OS'Order statistic CFAR
'SOCA'Smallest-of cell-averaging CFAR

Default: 'CA'

Rank

Rank of order statistic

Specify the rank of the order statistic as a positive integer scalar. The value must be less than or equal to the value of the NumTrainingCells property. This property applies only when you set the Method property to 'OS'. This property supports single and double precision,

Default: 1

NumGuardCells

Number of guard cells

Specify the number of guard cells used in training as an even integer. This property specifies the total number of cells on both sides of the cell under test. This property supports single and double precision,

Default: 2, indicating that there is one guard cell at both the front and back of the cell under test

NumTrainingCells

Number of training cells

Specify the number of training cells used in training as an even integer. Whenever possible, the training cells are equally divided before and after the cell under test. This property supports single and double precision.

Default: 2, indicating that there is one training cell at both the front and back of the cell under test

ThresholdFactor

Methods of obtaining threshold factor

Specify whether the threshold factor comes from an automatic calculation, the CustomThresholdFactor property of this object, or an input argument in step. Values of this property are:

'Auto'The application calculates the threshold factor automatically based on the desired probability of false alarm specified in the ProbabilityFalseAlarm property. The calculation assumes each independent signal in the input is a single pulse coming out of a square law detector with no pulse integration. The calculation also assumes the noise is white Gaussian.
'Custom'The CustomThresholdFactor property of this object specifies the threshold factor.
'Input port'An input argument in each invocation of step specifies the threshold factor.

Default: 'Auto'

ProbabilityFalseAlarm

Desired probability of false alarm

Specify the desired probability of false alarm as a scalar between 0 and 1 (not inclusive). This property applies only when you set the ThresholdFactor property to 'Auto'.

Default: 0.1

CustomThresholdFactor

Custom threshold factor

Specify the custom threshold factor as a positive scalar. This property applies only when you set the ThresholdFactor property to 'Custom'. This property is tunable. This property supports single and double precision,

Default: 1

OutputFormat

Format of detection results

Format of detection results returned by the step method, specified as 'CUT result' or 'Detection index'.

  • When set to 'CUT result', the results are logical detection values (1 or 0) for each tested cell. 1 indicates that the value of the tested cell exceeds a detection threshold.

  • When set to 'Detection index', the results form a vector or matrix containing the indices of tested cells which exceed a detection threshold. You can use this format as input to the phased.RangeEstimator and phased.DopplerEstimator System objects.

Default: 'CUT result'

ThresholdOutputPort

Output detection threshold

To obtain the detection threshold, set this property to true and use the corresponding output argument when invoking step. If you do not want to obtain the detection threshold, set this property to false.

Default: false

NoisePowerOutputPort

Output estimated noise

To obtain the estimated noise, set this property to true and use the corresponding output argument when invoking step. If you do not want to obtain the estimated noise, set this property to false.

Default: false

NumDetectionsSource

Source of the number of detections

Source of the number of detections, specified as 'Auto' or 'Property'. When you set this property to 'Auto', the number of detection indices reported is the total number of cells under test that have detections. If you set this property to 'Property', the number of reported detections is determined by the value of the NumDetections property.

Dependencies

To enable this property, set the OutputFormat property to 'Detection index'.

Default: 'Auto'

NumDetections

Maximum number of detections to report

Maximum number of detection indices to report, specified as a positive integer.

Dependencies

To enable this property, set the OutputFormat property to 'Detection index' and the NumDetectionsSource property to 'Property'.

Default: 1

Methods

stepPerform CFAR detection
Common to All System Objects
release

Allow System object property value changes

Examples

collapse all

Perform cell-averaging CFAR detection on a given Gaussian noise vector with a desired probability of false alarm (pfa) of 0.1. Assume that the data comes from a square law detector and no pulse integration is performed. Use 50 cells to estimate the noise level and 1 cell to separate the test cell and training cells. Perform the detection on all cells of the input.

detector = phased.CFARDetector('NumTrainingCells',50,...
    'NumGuardCells',2,'ProbabilityFalseAlarm',0.1);
N = 1000;
x = 1/sqrt(2)*(randn(N,1) + 1i*randn(N,1));
dets = detector(abs(x).^2,1:N);
pfa = sum(dets)/N
pfa = 0.1140

Perform cell-averaging CFAR detection on a given Gaussian noise vector with a desired probability of false alarm (pfa) of 0.005. Assume that the data comes from a square law detector and no pulse integration is performed. Perform the detection on all cells of the input. Use 50 cells to estimate the noise level and 1 cell to separate the test cell and training cells. Display the detection indices.

rng default;
detector = phased.CFARDetector('NumTrainingCells',50,'NumGuardCells',2, ...
    'ProbabilityFalseAlarm',0.005,'OutputFormat','Detection index');
N = 1000;
x1 = 1/sqrt(2)*(randn(N,1) + 1i*randn(N,1));
x2 = 1/sqrt(2)*(randn(N,1) + 1i*randn(N,1));
x = [x1,x2];
cutidx = 1:N;
dets = detector(abs(x).^2,cutidx)
dets = 2×11

   339   537   538   734   786   827   979   136   418   539   874
     1     1     1     1     1     1     1     2     2     2     2

Algorithms

expand all

References

[1] Richards, M. A. Fundamentals of Radar Signal Processing. New York: McGraw-Hill, 2005.

Extended Capabilities

Version History

Introduced in R2011a