我有以下 SNR 信号:
import numpy as np
import matplotlib.pyplot as plt
SNR_signal = np.array([0.10134662, 0.00941053, 0.15660532, 0.30411626, 0.59214933,
0.90592892, 1.21066261, 1.68196251, 1.9605259 , 2.34029174,
2.65199842, 3.01118228, 3.16316174, 3.28022538, 3.34901719,
3.21725934, 3.3490386 , 3.20125906, 2.92811981, 2.89281209,
2.46155156, 2.13995433, 1.90885968])
SNR_signal_noisy = np.array([-0.40453594, 0.23530384, -0.2138662 , 0.78094685,
2.21687829, 1.59897599, 1.97371773, 2.30516968, 1.23779907, 1.64628358,
4.99010801, 2.72729907, 3.45409474, 3.0851324 , 1.89160872,
3.84695234, 1.74147151, 3.20327341, 4.00223569, 1.87373223,
2.65093098, 1.55633982, 2.05920386])
plt.plot(SNR_signal)
plt.show()
plt.plot(SNR_signal_noisy)
plt.show()
他们的情节:
我想估计这些信号之间的噪声水平。我尝试了psd方法,但效果不佳。
估计这些信号中的噪声水平的最佳方法是什么?
您没有说明为什么不能使用功率谱密度方法,但它在这里似乎非常有效。假设主频率分量是第一个非零频率分量:
f1 = np.fft.rfft( SNR_signal )
f2 = np.fft.rfft( SNR_signal_noisy )
psd1 = np.abs( f1[1:] ) ** 2
psd2 = np.abs( f2[1:] ) ** 2
print( "Noise over signal (first data) = ", np.sum( psd1[1:] ) / psd1[0] )
print( "Noise over signal (second data) = ", np.sum( psd2[1:] ) / psd2[0] )
输出:
Noise over signal (first data) = 0.0961956265790858
Noise over signal (second data) = 1.1029829268452012