SNR comparison real/complex signal
9 views (last 30 days)
Show older comments
Hello,
I have a problem which should be simple but I can't figure out the best solution.
I have a real signal, cos of frequency f + noise of N points :
signal = sqrt(2 * Ps) * cos(2 * pi * f *t);
noise = sqrt(Pn) * randn(1, N);
total = signal + noise;
I consider the SNR on the whole signal Ps/Pn that I also check using
(mean(abs(signal.^2)) - mean(abs(noise.^2))) / mean(abs(noise.^2))
I filter this signal using a simple FFT of nFFT points and consider an extraction in the signal canal. For instance, with f / fs = 1/4, I consider the nFFT / 4 + 1 canal. Plotting the signal spectrum, I ensure the signal is centered in the FFT canal. Then I compute :
The power in the canal : PsCanal = mean(abs(samplesCanalWithSignal.^2)).
The noise level in a random other canal : PnCanal = mean(abs(samplesCanalWithoutSignal.^2))
And compute SNR in the canal : SNRCanal = (PsCanal - PnCanal) / PnCanal.
Now I consider a complex signal. Same time, fe, etc... I only change signal and noise definition in order to have same global powers :
signal = sqrt(Ps) * exp(2i * pi * f *t)
noise = sqrt(Pn / 2) *(randn(1, N) + 1i * randn(1, N))
total = signal + noise
When I compute the global RSB, I have the exact same RSB than with real signal.
Then I compute the FFT (same nFFT points) and compute SNRCanal = (PsCanal - PnCanal) / PnCanal
Result is the following (compared to real signal test) :
- Same PnCanal
- PsCanal multiplied by 2
- RSBCanal multiplied by 2
Where am I wrong ? I would like to be able to estimate the correct SNR in the FFT canal for real signals... I understand the PSD of the cos is half the one of exp due to positive and negative frequencies, but don't understand why it is not the case for the noise PSD. Do I have to transform something ?
Thank you
0 Comments
Answers (1)
vidyesh
on 14 Sep 2024
Hi Florian,
Here is my understanding of the issue:
The SNR is the ratio of signal power to noise power. When converting from a real to a complex signal, you've scaled the signal by a factor of √2, which keeps the effective powers the same, leaving the SNR unchanged.
To achieve the desired result, consider using the same noise signal for both real and complex cases. This ensures consistency in the noise power across both scenarios.
Can you expand on what you mean by "canal" or what the expected ouput is for more clarity.
0 Comments
See Also
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!