step
System object: phased.CFARDetector
Package: phased
Perform CFAR detection
Syntax
Y = step(H,X,cutidx)
[Y,th] = step(___)
[Y,noise] = step(___)
Y = step(H,X,cutidx,thfac)
[Y,TH,N]
= step(H,X,cutidx,thfac)
Description
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.
Y = step(H,X,cutidx)
performs CFAR detection on specified elements of the
input data, X
. X
can either be a real-valued
M-by-1 column vector or a real-valued
M-by-N matrix. cutidx
is a
length-D vector of indices specifying the input elements or cells under test
(CUT) on which to perform detection processing. When X
is a vector,
cutidx
specifies the element. When X
is a matrix,
cutidx
specifies the row of the element. The same index applies to all
columns of the matrix. Detection is performed independently along each column of
X
for the indices specified in cutidx
. You can
specify the input arguments as single or double precision.
The output argument Y
contains detection results. The format of
Y
depends on the OutputFormat
property.
When
OutputFormat
is'Cut result'
,Y
is a D-by-1 vector or a D-by-N matrix containing logical detection results. D is the length ofcutidx
and N is the number of columns ofX
. The rows ofY
correspond to the rows incutidx
. For each row,Y
contains1
in a column if there is a detection in the corresponding column ofX
. Otherwise,Y
contains a0
.When
OutputFormat
is'Detection index'
,Y
is a 1-by-L vector or a 2-by-L matrix containing detections indices. L is the number of detections found in the input data. WhenX
is a column vector,Y
contains the index for each detection inX
. WhenX
is a matrix,Y
contains the row and column indices of each detection inX
. Each column ofY
has the form[detrow;detcol]
. When theNumDetectionsSource
property is set to'Property'
, L equals the value of theNumDetections
property. If the number of actual detections is less than this value, columns without detections are set toNaN
.
The size of the first dimension of the input matrix can vary to simulate a changing signal length. A size change can occur, for example, in the case of a pulse waveform with variable pulse repetition frequency.
[Y,th] = step(___)
also returns
the detection threshold, th
, applied to detected
cells under test.
When
OutputFormat
is'CUT result'
,th
also returns the detection thresholdth
.When
OutputFormat
is'Detection index'
,th
returns a detection threshold for each corresponding detection inY
. When theNumDetectionsSource
property is set to'Property'
, L equals the value of theNumDetections
property. If the number of actual detections is less than this value, columns without detections are set toNaN
.
To enable this syntax, set the ThresholdOutputPort
property
to true
.
[Y,noise] = step(___)
also
returns the estimated noise power, noise
, for
each detected cell under test in X
.
When
OutputFormat
is'CUT result'
,noise
returns a noise power estimate.When
OutputFormat
is'Detection index'
,noise
returns a noise power estimate for each corresponding detection inY
. When theNumDetectionsSource
property is set to'Property'
, L equals the value of theNumDetections
property. If the number of actual detections is less than this value, columns without detections are set toNaN
.
To enable this syntax, set the NoisePowerOutputPort
property
to true
.
Y = step(H,X,cutidx,thfac)
, in addition,
specifies thfac
as the threshold factor used
to calculate the detection threshold. thfac
must
be a positive scalar. To enable this syntax, set the ThresholdFactor
property
to 'Input port'
.
You can combine optional input and output arguments when their
enabling properties are set. Optional inputs and outputs must be listed
in the same order as the order of the enabling properties. For example, [Y,TH,N]
= step(H,X,cutidx,thfac)
.
Note
The object performs an initialization the first time the object is executed. This
initialization locks nontunable properties
and input specifications, such as dimensions, complexity, and data type of the input data.
If you change a nontunable property or an input specification, the System object issues an error. To change nontunable properties or inputs, you must first
call the release
method to unlock the object.
Examples
Algorithms
phased.CFARDetector
uses cell averaging in
three steps:
Identify the training cells from the input, and form the noise estimate. The next table indicates how the detector forms the noise estimate, depending on the
Method
property value.Method Noise Estimate 'CA'
Use the average of the values in all the training cells. 'GOCA'
Select the greater of the averages in the front training cells and rear training cells. 'OS'
Sort the values in the training cells in ascending order. Select the Nth item, where N is the value of the Rank
property.'SOCA'
Select the smaller of the averages in the front training cells and rear training cells. Multiply the noise estimate by the threshold factor to form the threshold.
Compare the value in the test cell against the threshold to determine whether the target is present or absent. If the value is greater than the threshold, the target is present.
For details, see [1].
References
[1] Richards, M. A. Fundamentals of Radar Signal Processing. New York: McGraw-Hill, 2005.