Engee documentation
Notebook

Analysis of detection efficiency using detection characteristics (Part 1)

The example demonstrates how the effectiveness of coherent and incoherent systems can be assessed using receiver detection curve graphs (ROC curves). The example assumes that the detector operates under conditions of additive complex white Gaussian noise.

ROC curves are often used to evaluate the effectiveness of a radar or sonar detector. ROC curves are graphs of the probability of detection (Pd) versus the probability of false alarm (Pfa) at a given signal-to-noise ratio (SNR).

Functions used

In [ ]:
Pkg.add(["Statistics"])
In [ ]:
using SpecialFunctions,Statistics

Introduction

Pd is the probability that 1 is true if event 1 occurred. Pfa is the probability that 1 is true if event 0 occurred. In applications such as sonar and radar, event 1 means that a target is present, and event 0 means that there is no target.

Single pulse detection

Given the SNR value, you can calculate the Pd and Pfa values that a linear or quadratic detector can achieve with a single pulse. Set the Pd value, assuming that the SNR is 8 dB, and the requirements dictate a Pfa value of no more than 1%. You can use the rocsnr function to calculate the Pd and Pfa values, and then determine which Pd value corresponds to Pfa = 0.01. Note that by default, the rocsnr function assumes coherent detection.

In [ ]:
Pd,Pfa = rocsnr(8,"Pd&Pfa")

# нахождения номера элемента для Pfa=0.01
idx = findfirst(round.(Pfa;sigdigits=16).==0.01) 
print("idx = $(idx)")
idx = 81

Using the number defined above, you can find the Pd value corresponding to Pfa = 0.01.

In [ ]:
Pd[idx]
print("Pd[idx] = $(round(Pd[idx];sigdigits=5))")
Pd[idx] = 0.8899

One of the features of the rocsnr function is that you can set a vector of SNR values, and the function will calculate a ROC curve for each of these SNR values. Instead of calculating the Pd and Pfa values separately for a given SNR, you can view the results as a graph of ROC curves. The rosnr function plots ROC curves by default if no output arguments are specified. Calling the rosnr function with an input vector of four SNR values and no output arguments results in a graph of ROC curves.

In [ ]:
SNRvals = [2 4 8 9.4]
rocsnr(SNRvals)
Out[0]:

On the graph, use the cursor to select the curve SNR = 8 dB at the point where Pd = 0.9. You can see that the Pfa is equal to the specified value and is approximately 0.01.

Multiple pulse detection

One of the ways to improve the detector's performance is to average over several pulses. This is especially useful in cases where the signal of interest is known and occurs in additive complex white noise. Although this method is applicable to both linear and quadratic detectors, the result for quadratic detectors can be shifted by about 0.2 dB. Analyze the performance by assuming an SNR of 8 dB and averaging over two pulses.

In [ ]:
rocsnr(8;NumPulses=2)
Out[0]:

The graph shows that averaging over two pulses led to an increased probability of detection at a given false alarm level. With an SNR of 8 dB and averaging over two pulses, you can limit the probability of a false alarm to no more than 0.0001 and get a detection probability of 0.9. Recall that for one pulse, the probability of a false alarm had to be 1% in order to achieve the same detection probability.

Incoherent detection

At the moment, the example considers a known signal in complex white Gaussian noise. The rocsnr function assumes a coherent detector by default. To analyze the detector operation for the case when the signal is known except for the phase, you can specify an incoherent detector. Using the same SNR values as before, analyze the operation of the incoherent detector.

In [ ]:
rocsnr(SNRvals,SignalType="NonfluctuatingNoncoherent")
Out[0]:

Focus on the ROC curve corresponding to an SNR of 8 dB. After examining the graph using the data cursor, you will see that in order to achieve a detection probability of 0.9, it is necessary to allow the probability of a false positive to 0.05. Without using phase information, you will need a higher SNR to achieve the same Pd at a given Pfa. For incoherent linear detectors, use the Albersham equation to determine which SNR value will provide the desired Pd and Pfa.

In [ ]:
SNR_valdB = albersheim(0.9,.01) # Pd=0.9 and Pfa=0.01
print("SNR_valdB = $(round(SNR_valdB;sigdigits=5)) дБ")
SNR_valdB = 9.5027 дБ

By plotting the ROC curve for the SNR value approximated by the Albersham equation, it can be seen that the detector will reach Pd = 0.9 and Pfa = 0.01.Please note that the Alberheim technique is applicable only to incoherent detectors.

In [ ]:
rocsnr(SNR_valdB,SignalType="NonfluctuatingNoncoherent")
Out[0]:

Detecting fluctuating targets

In all the above arguments, it is assumed that the goal does not fluctuate, that is, the statistical characteristics of the goal do not change over time.However, in real-world scenarios, targets can accelerate and slow down, as well as tilt and tilt. These factors cause the radar cross-section (RCS) of the target to change over time. A set of statistical models called Drilling models is often used to describe a random change in the RCS of a target.

There are four drilling models, namely Drilling 1 - 4. A non-fluctuating target is often referred to as Drilling 0 or Drilling 5. Each Drilling model describes how the RCS of the target changes over time, and the probability distribution of this change.

Since the RCS of the target varies, the ROC curves for fluctuating targets do not match the curves for non-fluctuating ones. In addition, since Drilling targets add a random phase to the received signal, it is more difficult to use a coherent detector for Drilling purposes. Therefore, incoherent detection methods are often used for Drilling purposes.

Now compare the ROC curves for the non-oscillating target and the Swerling 1 target. In particular, you want to find out what the SNR requirements are for both situations if you want to achieve the same Pd and Pfa. For such a comparison, it is often convenient to plot the ROC curve as a function of Pd versus SNR with varying Pfa. We can use the rocpfa function to plot the ROC curve in this form.

Assume that the detection is incoherent, with 10 integrated pulses, and the desired Pfa value is no more than 1e-8. First, plot the ROC curve for a non-oscillating target.

In [ ]:
rocpfa(1e-8,NumPulses=10,SignalType="NonfluctuatingNoncoherent")
Out[0]:

Then, for comparison, plot the ROC curve for the Swerling 1 target.

In [ ]:
rocpfa(1e-8,NumPulses=10,SignalType="Swerling1")
Out[0]:

It can be seen from the figures that for a Pd of 0.9, an SNR of about 6 dB is required if the target does not fluctuate. However, if the target is the Swerling case 1 model, the required SNR increases to more than 14 dB, which is a difference of 8 dB. This will greatly affect the design of the system.

As with non-fluctuating targets, approximation equations exist to determine the required SNR without having to plot all the curves. The equation used for fluctuating purposes is the Shniedman equation. For the scenario used to construct ROC curves, the SNR requirements can be derived using the shnidman function.

In [ ]:
snr_sw1_db = shnidman(0.9,1e-8,10,1)  # Pd=0.9, Pfa=1e-8, 10 pulses
print("snr_sw1_db = $(round(snr_sw1_db;sigdigits=5)) дБ")
snr_sw1_db = 14.713 дБ

The calculated SNR value corresponds to the value obtained from the curve.

Conclusion

ROC curves are useful for analyzing detector efficiency for both coherent and incoherent systems. In this example, the rocsnr function was used to analyze the effectiveness of a linear detector at various SNR values. The improved detector performance achieved by averaging multiple samples was also considered. Finally, the example shows how the rocsnr and rocpfa functions can be used to analyze detector operation when using an incoherent detector for non-oscillating and fluctuating purposes.