2-D CFAR Detector
Block CFAR receiver detection algorithm for two-dimensional signals.
Description
The 2-D CFAR Detector unit implements a detector with a constant false alarm probability value for two-dimensional signals. Detection occurs when the signal cell value exceeds a threshold value. To maintain a constant false alarm probability, the threshold is set to a multiple of the image noise power. The detector estimates the noise power from neighbouring cells surrounding the cell under test (CUT) using one of three cell averaging methods or the order statistics (OS) method.
The cell averaging methods are:
-
Cell Averaging (CA).
-
Greatest Cell Averaging (GOCA).
-
Smallest cell averaging (SOCA).
Detector for each test cell:
-
Estimates noise statistics from the cell values in the training band surrounding the cell under test.
-
Calculates the threshold by multiplying the noise estimate by the threshold factor.
-
Compares the value of the cell under test to the threshold value to determine whether or not a target is present. If the value is greater than the threshold, the target is present.
Ports
Input
X - input signal
real matrix M on N
| real array M on N on P
The input signal is given as a real matrix of size M by N or a real array of size M by N by P. M and N represent the rows and columns of the matrix.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
idx - vector of indices of cells to be checked
matrix of positive integers 2 on L
An arrangement of test cells specified as a matrix of positive integers of size 2 by L, where L is the number of test cells. Each column idx specifies the row and column index of a test cell. The location of test cells is restricted so that their training areas lie completely within the input signal.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
K - threshold detection coefficient
positive scalar
The threshold coefficient used to calculate the detection threshold is specified as a positive scalar value.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
Output
Y - detector output
logical matrix (by default)
| real matrix
The data format of the detector output depends on the Output Format property:
-
If the Output Format parameters are set to
Cut result
, then Y is a matrix D on P containing the logical detection results of the cells under test. D is the length ofcutidx
and P is the value of the third dimension of X. The rows Y correspond to the rows ofcutidx
. For each row, Y contains a logical1
in the column if there is a detection in the corresponding X cell. Otherwise, Y contains a logical0
. -
If the Output Format parameters are set to
Detection index
, then Y is a K by L matrix containing the detection indices. K is the number of dimensions of X. L is the number of detections found in the input data. If X is a matrix, then Y contains the row and column indices of each detection in X in the form[detrow;detcol]
. If X is an array, then Y contains the row, column, and page indices of each detection in X in the form[detrow;detcol;detpage]
. If the Source of the number of detections parameter is set toProperty
, then L is equal to the value of the Maximum number of detections parameter. If the number of actual detections is less than this value, the columns without detections are set toNaN
.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
Th - calculated detection threshold
real matrix
The calculated detection threshold for each detected cell, returned as a real matrix. The data on the Th port has the same dimensionality as Y.
-
If the Output format parameters are set to
Detection index
, Th returns the detection threshold. -
If the Output format parameters are set to
CUT result
, then Th returns the detection threshold for each corresponding detection in Y. If the Source of the number of detections parameter is set toProperty
, then L is equal to the value of the Maximum number of detections parameter. If the number of actual detections is less than this value, the columns without detections are set toNaN
.
Dependencies
To use this port, select the Output Detection Threshold checkbox.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
N - estimated noise power
real matrix
Estimated noise power for each detected cell, returned as a real matrix.
-
If the Output format parameters are set to
Detection index
, then N returns the noise power if the Y element is1
andNaN
if the Y element is0
. If the Source of the number of detections parameter is set toProperty
, then L is equal to the value of the Maximum number of detections parameter. If the number of actual detections is less than this value, the columns without detections are set toNaN
. -
If the Output format parameters are set to
CUT result
, then N returns the noise power for each corresponding detection in Y.
Dependencies
To use this port, select the Output estimated noise power checkbox.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
Parameters
CFAR algorithm - noise power estimation algorithm
CA (by default)
| GOCA
| SOCA
| OS
An algorithm for estimating noise power, given as CA
, GOCA
, SOCA
or OS
. For CA
, GOCA
, SOCA
, the noise power is the mean of the cells in the training sample.
For OS
, the noise power is the kth cell value resulting from the numerical ordering of all training cell values. Set k with the Rank of order statistic parameters.
-
CA
- cell averaging algorithm. Calculates the sample average of all training cells surrounding the CUT cell. -
GOCA
- cell averaging algorithm. Divides the two-dimensional training window surrounding the CUT cell into left and right halves. The algorithm then calculates the sample mean for each half and selects the largest mean. -
`SOCA' is the smallest cell averaging algorithm. Divides the two-dimensional training window surrounding the CUT cell into left and right halves. The algorithm then calculates the sample mean for each half and selects the smallest mean.
-
OS
- Order Statistics Algorithm. It sorts the training cells in ascending order of numerical values. The algorithm then selects the kth value from the list. k is the rank given by the Rank of order statistic parameters.
Rank of order statistic is the rank of order statistic
1 (by default)
| ` a positive integer'.
Set the rank of order statistic used in the two-dimensional CFAR algorithm as a positive integer. The value of this parameters should range from 1
to , where is the number of training cells. At the value of 1
the smallest value in the training area is selected.
Dependencies
To use this parameter, set the CFAR Algorithm parameter to OS
.
Size in cells of the guard region band - width of the guard region band
[1,1] (by default)
| non-negative integer scalar
| 2-element vector of positive integers
.
The number of guard cells in the row and column on each side of the cell under test as non-negative integers. The first element specifies the size of the guard area by row size. The second element specifies the size of the guard area by row size. Specifying Size in cells of the guard region band as a scalar is equivalent to specifying a vector with the same value for both dimensions. For example, a value of [1 1]
indicates that there is a one guard cell wide region around each CUT cell.
Size in cells of the training region band - width of the training region band
[1,1] (by default)
| non-negative integer scalar
| 2-element vector of positive integers
.
The size in cells of the training region bandwidth, given as a non-negative integer or a 1 by 2 matrix of non-negative integers. The first element specifies the size of the training bandwidth by row, the second element by column. Specifying Size in cells of the training region band as a scalar is equivalent to specifying a vector with the same value for both dimensions. For example, the value [1 1]
means that for each cell under test there is a region one training cell wide surrounding the guard region.
Threshold factor method - the method for determining the threshold factor
Auto (by default)
| Input port
| Custom
.
Threshold factor method, set as Auto
, Input port
or Custom
.
-
Auto
- the threshold factor is determined based on the estimated noise statistics and false alarm probability. -
Input port
- the threshold factor is set using the input port K. -
Custom
- the threshold factor is set using the Custom threshold factor parameters.
Custom threshold factor - customised threshold factor
1 (By default)
| `positive scalar'.
Custom detection threshold factor set as a positive scalar.
Dependencies
To use this parameter, set the Threshold factor method parameter to Custom
.
Probability of false alarm - probability of false alarms
0.1 (by default)
| ` real scalar in the range 0 to 1`
Probability of false alarm, specified as a real scalar between 0
and 1
. The threshold factor can be calculated from the required false alarm probability.
Dependencies
To use this parameter, set the Threshold factor method parameter to Auto
.
Output format - detection result format
CUT result (by default)
| Detection index
.
Detection result format, set as CUT result
or Detection index
.
-
CUT result
- detection results are logical detection values (1
or0
) for each cell under test. -
Detection index
- the results are a vector or matrix containing the indices of the cells under test that exceed the detection threshold.
*Output threshold detection
- enable threshold detection output
off (by default)
| `on
Select this checkbox to enable detection threshold output via the Th output port.
Output estimated noise power - Enable detection threshold output
Off (By default)
| On
Select this checkbox to enable output estimated noise power through the N output port.
Source of the number of detections - the source of the number of detections for the report
Auto (By default)
| Property
.
Source of the number of detections, set as Auto
or Property
.
-
Auto
- the number of detection indexes reported is equal to the total number of test cells in which indexes are detected. -
Property
- the number of reported detections is determined by the value of the Maximum number of detections parameters.
Dependencies
To use this parameter, set the Output format parameter to Detection index
.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
Maximum number of detections - maximum number of detection indices on the output
1 (by default)
| positive integer
The maximum number of detection indices to be output is specified as a positive integer.
Dependencies
To use this parameter, set the Output format parameter to Detection index
and the Source of the number of detections parameter to Property
.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
Algorithms
The 2-D CFAR algorithm requires an estimate of the noise power. The noise power is computed over cells that are assumed not to contain the target signal. These cells are the training cells. The training cells form a band around the cell under test (CUT), but can be separated from the CUT by a guard band. The detection threshold is calculated by multiplying the noise power by the threshold factor.
For GOCA and SOCA averaging, the noise power is defined as the average of one of the left or right halves of the training cell area.
Since the number of columns in the training area is odd, the cells in the middle column belong equally to either the left or right half.
When using the ordinal statistical method, the rank cannot be greater than the number of cells in the training cell region . You can calculate .
-
- the number of columns of the training band.
-
- the number of rows of the training strip.
-
- number of columns of the protective strip.
-
- number of rows of the protective strip.
The total number of cells in the combined teaching area, protective area and CUT cell is:
.
The total number of cells in the combined protective area and CUT cell is as follows
.
The number of teaching cells is .
By design, the number of training cells is always even. Therefore, the rank of or can be chosen to implement the median filter.