# Tools¶

Calculate probability of detection (Pd) in receiver operating characteristic (ROC)

Parameters:
• pfa (float or numpy.1darray) – Probability of false alarm (Pfa)

• snr (float or numpy.1darray) – Signal to noise ratio in decibel (dB)

• N (int) – Number of pulses for integration (default is 1)

• stype (str) –

Signal type (default is Coherent)

• Coherent: Non-fluctuating coherent

• Real: Non-fluctuating real signal

• Swerling 0: Non-coherent Swerling 0, Non-fluctuating non-coherent

• Swerling 1: Non-coherent Swerling 1

• Swerling 2: Non-coherent Swerling 2

• Swerling 3: Non-coherent Swerling 3

• Swerling 4: Non-coherent Swerling 4

• Swerling 5: Non-coherent Swerling 5, Non-fluctuating non-coherent

Returns:

probability of detection (Pd). if both pfa and snr are floats, pd is a float if pfa or snr is a 1-D array, pd is a 1-D array if both pfa and snr are 1-D arrays, pd is a 2-D array

Return type:

float or 1-D array or 2-D array

Reference

Mahafza, Bassem R. Radar systems analysis and design using MATLAB. Chapman and Hall/CRC, 2005.

Calculate the minimal SNR for certain probability of detection (Pd) and probability of false alarm (Pfa) in receiver operating characteristic (ROC) with Secant method

Parameters:
• pfa (float or numpy.1darray) – Probability of false alarm (Pfa)

• pd (float or numpy.1darray) – Probability of detection (Pd)

• N (int) – Number of pulses for integration (default is 1)

• stype (str) –

Signal type (default is Coherent)

• Coherent : Non-fluctuating coherent

• Real : Non-fluctuating real signal

• Swerling 0 : Non-fluctuating non-coherent

• Swerling 1 : Non-coherent Swerling 1

• Swerling 2 : Non-coherent Swerling 2

• Swerling 3 : Non-coherent Swerling 3

• Swerling 4 : Non-coherent Swerling 4

• Swerling 5 : Same as Swerling 0

Returns:

Minimal signal to noise ratio in decibel (dB) if both pfa and pd are floats, SNR is a float if pfa or pd is a 1-D array, SNR is a 1-D array if both pfa and pd are 1-D arrays, SNR is a 2-D array

Return type:

float or 1-D array or 2-D array

Reference

Secant method:

The x intercept of the secant line on the the Nth interval

$m_n = a_n - f(a_n)*(b_n - a_n)/(f(b_n) - f(a_n))$

The initial interval [a_0,b_0] is given by [a,b]. If f(m_n) == 0 for some intercept m_n then the function returns this solution. If all signs of values f(a_n), f(b_n) and f(m_n) are the same at any iterations, the secant method fails and return None.