- sdr.composite_snr(snr1: ArrayLike, snr2: ArrayLike) NDArray[float64]
Calculates the signal-to-noise ratio (SNR) of the product of two signals.
- Parameters:¶
- Returns:¶
The signal-to-noise ratio (SNR) of the product of the two signals \(\gamma\) in dB.
Notes
The effective or composite SNR \(\gamma\) of the product of two signals with SNRs \(\gamma_1\) and \(\gamma_2\) is given by
\[\frac{1}{\gamma} = \frac{1}{\gamma_1} + \frac{1}{\gamma_2} + \frac{1}{\gamma_1 \gamma_2} .\]When both \(\gamma_1\) and \(\gamma_2\) are greater than 0 dB, and if \(\gamma_1 = \gamma_2\), then \(\gamma = \gamma_1 / 2 = \gamma_2 / 2\). If one is much less than the other, then \(\gamma\) is approximately equal to the smaller one. When both are less than 0 dB, the composite SNR is approximately \(\gamma = \gamma_1 \gamma_2\).
Note
The constant terms from Stein’s original equations were rearranged. The factor of 2 was removed and incorporated into the CRLB equations. This was done so that when \(\gamma_2 = \infty\) then \(\gamma = \gamma_1\).
References
Examples
Calculate the composite SNR of two signals with equal SNRs. Notice for positive input SNR, the composite SNR is linear with slope 1 and intercept -3 dB. For negative input SNR, the composite SNR is linear with slope 2 and intercept 0 dB.
In [1]: snr1 = np.linspace(-60, 60, 101) In [2]: plt.figure(); \ ...: plt.plot(snr1, sdr.composite_snr(snr1, snr1)); \ ...: plt.xlim(-60, 60); \ ...: plt.ylim(-60, 60); \ ...: plt.xlabel("Input SNRs (dB), $\gamma_1$ and $\gamma_2$"); \ ...: plt.ylabel(r"Composite SNR (dB), $\gamma$"); \ ...: plt.title("Composite SNR of two signals with equal SNRs"); ...:
Calculate the composite SNR of two signals with different SNRs. Notice the knee of the curve is located at
max(0, snr2)
. Left of the knee, the composite SNR is linear with slope 1 and interceptsnr2
. Right of the knee, the composite SNR is linear with slope 0 and interceptsnr2
.In [3]: snr1 = np.linspace(-60, 60, 101) In [4]: plt.figure(); In [5]: for snr2 in np.arange(-40, 40 + 10, 10): ...: plt.plot(snr1, sdr.composite_snr(snr1, snr2), label=snr2) ...: In [6]: plt.legend(title="SNR of signal 2 (dB), $\gamma_2$"); \ ...: plt.xlim(-60, 60); \ ...: plt.ylim(-60, 60); \ ...: plt.xlabel("SNR of signal 1 (dB), $\gamma_1$"); \ ...: plt.ylabel(r"Composite SNR (dB), $\gamma$"); \ ...: plt.title("Composite SNR of two signals with different SNRs"); ...: