static sdr.EnergyDetector.p_d(snr: ArrayLike, N_nc: ArrayLike, p_fa: ArrayLike, complex: bool = True) NDArray[float64]

Computes the probability of detection Pd.

Parameters:
snr: ArrayLike

The received signal-to-noise ratio σs2/σ2 in dB.

N_nc: ArrayLike

The number of samples Nnc to non-coherently integrate.

p_fa: ArrayLike

The probability of false alarm Pfa.

complex: bool = True

Indicates whether the signal is real or complex.

Returns:

The probability of detection Pd.

Notes

For real signals:

Pd=QχN2(σ2QχN21(Pfa)σs2+σ2)=QχN2(QχN21(Pfa)σs2/σ2+1)

For complex signals:

Pd=Qχ2N2(Qχ2N21(Pfa)σs2/σ2+1)

References

  • Steven Kay, Fundamentals of Statistical Signal Processing: Detection Theory, Equation 5.3.

Examples

In [1]: snr = np.linspace(-20, 10, 101)

In [2]: plt.figure(); \
   ...: sdr.plot.p_d(snr, sdr.EnergyDetector.p_d(snr, 25, 1e-1), label="$P_{fa} = 10^{-1}$"); \
   ...: sdr.plot.p_d(snr, sdr.EnergyDetector.p_d(snr, 25, 1e-2), label="$P_{fa} = 10^{-2}$"); \
   ...: sdr.plot.p_d(snr, sdr.EnergyDetector.p_d(snr, 25, 1e-3), label="$P_{fa} = 10^{-3}$"); \
   ...: sdr.plot.p_d(snr, sdr.EnergyDetector.p_d(snr, 25, 1e-4), label="$P_{fa} = 10^{-4}$"); \
   ...: sdr.plot.p_d(snr, sdr.EnergyDetector.p_d(snr, 25, 1e-5), label="$P_{fa} = 10^{-5}$");
   ...: 
../../_images/sdr_EnergyDetector_p_d_1.png