-
sdr.non_coherent_gain(n_nc: ArrayLike, snr: ArrayLike, p_fa: ArrayLike =
1e-06
, snr_ref: 'input' | 'output' ='input'
, extrapolate: bool =True
) NDArray[float64] Computes the SNR improvement by non-coherently integrating \(N_{NC}\) samples.
- Parameters:¶
- n_nc: ArrayLike¶
The number of samples \(N_{NC}\) to non-coherently integrate.
- snr: ArrayLike¶
The reference SNR in dB.
- p_fa: ArrayLike =
1e-06
¶ The desired probability of false alarm \(P_{FA}\). This is used to compute the necessary thresholds before and after integration. The non-coherent gain is slightly affected by the \(P_{FA}\).
- 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 \(G_{NC}\) using smaller values of \(N_{NC}\). This is only done when the non-coherent gain cannot be explicitly solved for due to lack of floating-point precision. If
False
, the function will returnnp.nan
for any \(N_{NC}\) that cannot be solved for.
- Returns:¶
The non-coherent gain \(G_{NC}\) in dB.
Notes¶
\[y[m] = \sum_{n=0}^{N_{NC}-1} \left| x[m-n] \right|^2\]\[\text{SNR}_{y,\text{dB}} = \text{SNR}_{x,\text{dB}} + G_{NC}\]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.457842213037324
Plot the non-coherent gain parameterized by input SNR.
In [5]: plt.figure(); \ ...: n = np.logspace(0, 3, 51); \ ...: 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"); ...:
Plot the non-coherent gain parameterized by output SNR.
In [8]: plt.figure(); \ ...: n = np.logspace(0, 3, 51); \ ...: plt.semilogx(n, sdr.coherent_gain(n), color="k"); ...: In [9]: for snr in np.arange(-30, 40, 10): ...: plt.semilogx(n, sdr.non_coherent_gain(n, snr, snr_ref="output"), label=f"{snr} dB") ...: In [10]: plt.legend(title="Output 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 output SNRs"); ....:
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 [11]: plt.figure(); \ ....: snr = np.linspace(-40, 12, 101); \ ....: n_nc = 10; ....: In [12]: 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 [13]: 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$"); ....: