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

Computes the probability of detection \(P_d\).

Parameters:
snr: ArrayLike

The received signal-to-noise ratio \(\sigma_s^2 / \sigma^2\) in dB.

N_nc: ArrayLike

The number of samples \(N_{nc}\) to non-coherently integrate.

p_fa: ArrayLike

The probability of false alarm \(P_{fa}\).

complex: bool = True

Indicates whether the signal is real or complex.

Returns:

The probability of detection \(P_d\).

Notes

For real signals:

\[\begin{split} P_d &= Q_{\chi_N^2}\left( \frac{\sigma^2 Q_{\chi_N^2}^{-1}(P_{fa})}{\sigma_s^2 + \sigma^2} \right) \\ &= Q_{\chi_N^2}\left( \frac{Q_{\chi_N^2}^{-1}(P_{fa})}{\sigma_s^2 /\sigma^2 + 1} \right) \end{split}\]

For complex signals:

\[P_d = Q_{\chi_{2N}^2}\left( \frac{Q_{\chi_{2N}^2}^{-1}(P_{fa})}{\sigma_s^2 /\sigma^2 + 1} \right)\]

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