Tools¶
- radarsimpy.tools.roc_pd(pfa, snr, N=1, stype='Coherent')¶
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 coherentReal
: Non-fluctuating real signalSwerling 0
: Non-coherent Swerling 0, Non-fluctuating non-coherentSwerling 1
: Non-coherent Swerling 1Swerling 2
: Non-coherent Swerling 2Swerling 3
: Non-coherent Swerling 3Swerling 4
: Non-coherent Swerling 4Swerling 5
: Non-coherent Swerling 5, Non-fluctuating non-coherent
- Returns:
probability of detection (Pd). if both
pfa
andsnr
are floats,pd
is a float ifpfa
orsnr
is a 1-D array,pd
is a 1-D array if bothpfa
andsnr
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.
- radarsimpy.tools.roc_snr(pfa, pd, N=1, stype='Coherent')¶
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 coherentReal
: Non-fluctuating real signalSwerling 0
: Non-fluctuating non-coherentSwerling 1
: Non-coherent Swerling 1Swerling 2
: Non-coherent Swerling 2Swerling 3
: Non-coherent Swerling 3Swerling 4
: Non-coherent Swerling 4Swerling 5
: Same asSwerling 0
- Returns:
Minimal signal to noise ratio in decibel (dB) if both
pfa
andpd
are floats,SNR
is a float ifpfa
orpd
is a 1-D array,SNR
is a 1-D array if bothpfa
andpd
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.