Clear Filters
Clear Filters

SNR calculation with power spectrum data sheet

2 views (last 30 days)
영훈
영훈 on 18 Aug 2022
Answered: Aditya on 14 Sep 2023
When I calculate SNR using "r = snr(sxx,f,rbw,'power')" with power spectrum data sheet (sxx), how does MATLAB find the fundamental signal power and how much fundamental bins are used?

Answers (1)

Aditya
Aditya on 14 Sep 2023
Hey,
I understand that you want to know how MATLAB finds the fundamental signal power and how many fundamental bins are used for it.
When using the `snr` function in MATLAB to calculate SNR from a power spectrum, the function does not explicitly identify the fundamental signal power or determine the number of fundamental bins used. The `snr` function calculates SNR based on the input power spectrum data and the specified resolution bandwidth.
Here's how the `snr` function works:
1. Input power spectrum data (`sxx`): The `sxx` variable should contain the power spectrum data, which represents the distribution of power across different frequencies. It can be a vector or a matrix, depending on the dimensionality of the power spectrum data.
2. Frequency vector (`f`): The `f` variable should contain the corresponding frequency values for the power spectrum data. It should have the same size as the power spectrum data.
3. Resolution bandwidth (`rbw`): The `rbw` variable represents the resolution bandwidth, which is the frequency width of each bin in the power spectrum. It determines the frequency resolution of the power spectrum data.
The `snr` function calculates SNR by summing the power values within the specified frequency range and dividing it by the average power in the remaining frequency range (noise power). The frequency range is determined by the resolution bandwidth and the number of bins in the power spectrum data.
The function does not explicitly identify the fundamental signal power or determine the number of fundamental bins used. It calculates SNR based on the entire power spectrum data within the specified frequency range and resolution bandwidth.
If you need to analyse specific frequency components or identify the fundamental signal power, you can extract the relevant frequency range from the power spectrum data and calculate the SNR using only those specific bins or frequency components.
Please note that the specific details of your power spectrum data and the desired analysis may require additional considerations or custom calculations beyond the `snr` function provided by MATLAB.
You may refer to the following documentation link for more information:
Thanks,
Best Regards
Aditya Kaloji

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!