rocsnr
Receiver operating characteristic curves by SNR
Description
[
returns the single-pulse detection probabilities, Pd
,Pfa
]
= rocsnr(SNRdB
)Pd
, and
false-alarm probabilities, Pfa
, for the SNRs in the vector
SNRdB
. By default, for each SNR, the detection
probabilities are computed for 101 false-alarm probabilities between
1e–10
and 1
. The false-alarm probabilities
are logarithmically equally spaced. The ROC curve is constructed assuming a coherent
receiver with a nonfluctuating target.
[
returns detection probabilities and false-alarm probabilities with additional
options specified by one or more name-value arguments.Pd
,Pfa
]
= rocsnr(SNRdB
,Name=Value
)
rocsnr(___)
plots the ROC curves.
Examples
ROC Curves for Different SNRs
Plot ROC curves for different SNRs for a single pulse.
SNRdB = [3 6 9 12]; [Pd,Pfa] = rocsnr(SNRdB,SignalType="NonfluctuatingCoherent"); semilogx(Pfa,Pd) grid on xlabel("P_{fa}") ylabel("P_d") legend("SNR "+SNRdB+" dB",Location="northwest") title("Receiver Operating Characteristic (ROC) Curves")
ROC Curve for Fixed SNR
To achieve a probability of false alarm of 1e-6, the SNR threshold for Neyman-Pearson detection of a single pulse in real-valued Gaussian noise is approximately 13.5 dB. Plot an ROC curve at that SNR.
snrthreshold = npwgnthresh(1e-6,1,'real'); rocsnr(snrthreshold,'SignalType','real')
ROC Curves for Different Received Signal Types
Examine detector performance for different received signal types at a fixed SNR.
SNR = 13.54; [Pd_real,Pfa_real] = rocsnr(SNR,'SignalType','real',... 'MinPfa',1e-8); [Pd_coh,Pfa_coh] = rocsnr(SNR,... 'SignalType','NonfluctuatingCoherent',... 'MinPfa',1e-8); [Pd_noncoh,Pfa_noncoh] = rocsnr(SNR,'SignalType',... 'NonfluctuatingNoncoherent','MinPfa',1e-8); semilogx(Pfa_real,Pd_real) hold on grid on semilogx(Pfa_coh,Pd_coh,'r') semilogx(Pfa_noncoh,Pd_noncoh,'k') xlabel('False-Alarm Probability') ylabel('Probability of Detection') legend('Real','Coherent','Noncoherent','location','southeast') title('ROC Curve Comparison for Nonfluctuating RCS Target') hold off
The ROC curves clearly demonstrate the superior probability of detection performance for coherent and noncoherent detectors over the real-valued case.
Input Arguments
SNRdB
— Signal-to-noise ratios
vector
Signal-to-noise ratios in decibels, specified as a row or column vector.
Example: [3 6 9 12]
Data Types: double
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: MinPfa=1e-8,NumPoints=64,NumPulses=10
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'MinPfa',1e-8,'NumPoints',64,'NumPulses',10
MaxPfa
— Maximum false-alarm probability to include in the ROC calculation
1
(default) | positive scalar
Maximum false-alarm probability to include in the ROC calculation, specified as a positive scalar.
Data Types: double
MinPfa
— Minimum false-alarm probability to include in the ROC calculation
1e-10
(default) | positive scalar
Minimum false-alarm probability to include in the ROC calculation, specified as a positive scalar.
Data Types: double
NumPulses
— Number of pulses to integrate
1
(default) | positive integer
Number of pulses to integrate when calculating the ROC curves,
specified as a positive integer. A value of 1
indicates no pulse integration.
Data Types: double
NumPoints
— Number of SNR values to use when calculating the ROC curves
101
(default) | positive integer
Number of SNR values to use when calculating the ROC curves, specified
as a positive integer. The actual values are equally spaced between
MinSNR
and MaxSNR
.
Data Types: double
SignalType
— Type of received signal
"NonfluctuatingCoherent"
(default) | "NonfluctuatingNoncoherent"
| "Real"
| "Swerling1"
| "Swerling2"
| "Swerling3"
| "Swerling4"
This property specifies the type of received signal or, equivalently,
the probability density functions (PDF) used to compute the ROC. Valid
values are: "Real"
,
"NonfluctuatingCoherent"
,
"NonfluctuatingNoncoherent"
,
"Swerling1"
, "Swerling2"
,
"Swerling3"
, and "Swerling4"
.
Values are not case sensitive.
The "NonfluctuatingCoherent"
signal type assumes
that the noise in the received signal is a complex-valued, Gaussian
random variable. This variable has independent zero-mean real and
imaginary parts each with variance
σ2/2 under the null
hypothesis. In the case of a single pulse in a coherent receiver with
complex white Gaussian noise, the probability of detection,
PD, for a given
false-alarm probability, PFA is:
where erfc
and
erfc-1
are the
complementary error function and that function’s inverse, and
χ is the SNR not expressed in decibels.
For details about the other supported signal types, see [1].
Data Types: char
| string
Output Arguments
Pd
— Detection probabilities
vector
Detection probabilities corresponding to the false-alarm probabilities,
returned as a vector. For each SNR in SNRdB
,
Pd
contains one column of detection probabilities.
Pfa
— False-alarm probabilities
column vector
False-alarm probabilities, returned as a column vector. By default, the
false-alarm probabilities are 101 logarithmically equally spaced values
between 1e–10
and 1
. To change the
range of probabilities, use the optional MinPfa
or
MaxPfa
input argument. To change the number of
probabilities, use the optional NumPoints
input
argument.
References
[1] Richards, M. A. Fundamentals of Radar Signal Processing. New York: McGraw-Hill, 2005, pp 298–336.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
Does not support variable-size inputs.
Supported only when output arguments are specified.
Version History
Introduced in R2011a
See Also
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)