-
sdr.non_coherent_gain(n_nc: ArrayLike, snr: ArrayLike, p_fa: ArrayLike =
1e-06
, detector: 'linear' | 'square-law' ='square-law'
, complex: bool =True
, snr_ref: 'input' | 'output' ='input'
, extrapolate: bool =True
) NDArray[float64] Computes the SNR improvement by non-coherently integrating
samples.- Parameters:¶
- n_nc: ArrayLike¶
The number of samples
to non-coherently integrate.- snr: ArrayLike¶
The reference SNR in dB.
- p_fa: ArrayLike =
1e-06
¶ The desired probability of false alarm
. This is used to compute the necessary thresholds before and after integration. The non-coherent gain is slightly affected by the .- detector: 'linear' | 'square-law' =
'square-law'
¶ The detector type.
"coherent"
: A coherent detector,"linear"
: A linear detector,"square-law"
: A square-law detector,
- complex: bool =
True
¶ Indicates whether the input signal is real or complex. This affects how the SNR is converted to noise variance.
- snr_ref: 'input' | 'output' =
'input'
¶ The SNR reference.
"input"
: The SNR is referenced at the input of the non-coherent integrator ."output"
: The SNR is referenced at the output of the non-coherent integrator .
- extrapolate: bool =
True
¶ Indicates whether to extrapolate
using smaller values of . This is only done when the non-coherent gain cannot be explicitly solved for due to lack of floating-point precision. IfFalse
, the function will returnnp.nan
for any that cannot be solved for.
- Returns:¶
The non-coherent gain
in dB.
See also
Notes¶
Let the input SNR required to achieve the specified detection performance with no non-coherent integration be
. Let the input SNR required to achieve the same detection performance with non-coherent integrations be . The non-coherent gain is defined as their difference. It is the SNR reduction provided by the use of non-coherent integration.Examples¶
See the Non-coherent integration example.
Compute the non-coherent gain for various integration lengths at 10-dB SNR.
In [1]: sdr.non_coherent_gain(1, 10) Out[1]: 0.0 In [2]: sdr.non_coherent_gain(2, 10) Out[2]: 2.499445060713011 In [3]: sdr.non_coherent_gain(10, 10) Out[3]: 8.666092814306324 In [4]: sdr.non_coherent_gain(20, 10) Out[4]: 11.410342926869486
Plot the non-coherent gain parameterized by input SNR.
In [5]: plt.figure(); \ ...: n = np.logspace(0, 3, 51).astype(int); \ ...: plt.semilogx(n, sdr.coherent_gain(n), color="k"); ...: In [6]: for snr in np.arange(-30, 40, 10): ...: plt.semilogx(n, sdr.non_coherent_gain(n, snr, snr_ref="input"), label=f"{snr} dB") ...: In [7]: plt.legend(title="Input SNR", loc="upper left"); \ ...: plt.xlabel("Number of samples, $N_{nc}$"); \ ...: plt.ylabel("Non-coherent gain, $G_{nc}$"); \ ...: plt.title("Non-coherent gain for various input SNRs"); ...:
Compare the non-coherent gain for linear and square-law detectors for various input SNRs. Notice that the square-law detector performs better at low SNRs and the linear detector performs better at high SNRs.
In [8]: plt.figure(); \ ...: snr = np.linspace(-20, 10, 21); \ ...: plt.plot(snr, sdr.non_coherent_gain(10, snr, p_fa=1e-6, detector="linear"), label="Linear"); \ ...: plt.plot(snr, sdr.non_coherent_gain(10, snr, p_fa=1e-6, detector="square-law"), label="Square-law"); \ ...: plt.legend(title="Detector", loc="upper left"); \ ...: plt.xlabel("Input signal-to-noise ratio (dB)"); \ ...: plt.ylabel("Non-coherent gain, $G_{nc}$"); \ ...: plt.title("Non-coherent gain for $N_{nc} = 10$"); ...:
Examine the non-coherent gain across input SNR and false alarm rate for non-coherently integrating 10 samples. Notice that the non-coherent gain is affected by both. The coherent integration gain, however, is a constant 10 dB across both.
In [9]: plt.figure(); \ ...: snr = np.linspace(-40, 12, 101); \ ...: n_nc = 10; ...: In [10]: for p_fa in [1e-14, 1e-12, 1e-10, 1e-8, 1e-6, 1e-4, 1e-2]: ....: g_nc = sdr.non_coherent_gain(n_nc, snr, p_fa) ....: plt.plot(snr, g_nc, label=f"{p_fa:1.0e}") ....: In [11]: plt.legend(title="$P_{fa}$"); \ ....: plt.ylim(0, 10); \ ....: plt.xlabel("Input signal-to-noise ratio (dB)"); \ ....: plt.ylabel("Non-coherent gain (dB)"); \ ....: plt.title("Non-coherent gain for $N_{nc} = 10$"); ....: