Mathematical Background of the Noise Power Measurement with snr Function
16 次查看(过去 30 天)
显示 更早的评论
Hi,
I am using MATLAB's snr (signal-to-noise ratio) function in my project to measure the noise power of a sensor signal. I give the one-sided PSD of the signal to the snr function and use the second output of it, which is the noise power.
The only explanation of the noise power output is this: "Total noise power of the nonharmonic components of the input signal, returned as a real-valued scalar."
I need to give the mathematical explanation of this calculation in the paper and I want to calculate the noise power without using snr (if possible) because I am asked to do this.
I tried to use a highpass filter to remove non-noise parts of the signal and then compute the RMS of the signal to match with the snr output. There is a big similarity between RMS and SNR outputs but they are not matching completely.
Thank you for your help.
0 个评论
采纳的回答
Meet
2023-4-5
The documentation page of the snr function provides the following mathematical background of the algorithm used in function:
"When given time-domain input, snr performs a periodogram using a Kaiser window with large sidelobe attenuation. To find the fundamental frequency, the algorithm searches the periodogram for the largest nonzero spectral component. It then computes the central moment of all adjacent bins that decrease monotonically away from the maximum. To be detectable, the fundamental should be at least in the second frequency bin. Higher harmonics are at integer multiples of the fundamental frequency. If a harmonic lies within the monotonically decreasing region in the neighborhood of another, its power is considered to belong to the larger harmonic. This larger harmonic may or may not be the fundamental.
The function estimates a noise level using the median power in the regions containing only noise. The DC component is excluded from the calculation. The noise at each point is the estimated level or the ordinate of the point, whichever is smaller. The noise is then subtracted from the values of the signal and the harmonics.
snr fails if the fundamental is not the highest spectral component in the signal."
You can find this information in the "More About" section of Signal-to-noise ratio - MATLAB snr (mathworks.com).
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!