Answers:
SNR的通用定义是有用信号的功率除以噪声功率。假设您已将有用信号和噪声信号作为阵列获取,则可以像这样在噪声降低之前在Matlab中计算SNR:
snr_before = mean( signal .^ 2 ) / mean( noise .^ 2 );
snr_before_db = 10 * log10( snr_before ) % in dB
降噪后,可以将剩余噪声计算为所需信号与实际信号之差。SNR的计算非常简单:
residual_noise = signal - noise_reduced_signal;
snr_after = mean( signal .^ 2 ) / mean( residual_noise .^ 2 );
snr_after_db = 10 * log10( snr_after )
在输入端:
SNR = DB2-DB1
在输出端: