SNR comparison real/complex signal
조회 수: 9 (최근 30일)
이전 댓글 표시
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
답변 (1개)
vidyesh
2024년 9월 14일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Spectral Measurements에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!