问题
I have captured both a transmitted signal and when there is no transmission (i.e. noise only). I would like to calculate the SNR of the signal. I would like to make sure the following GNURadio flowgraph is not wrong:
In summary, after the PSD of each is calculated, the "Integrate with Decimate over 2048" block sums up the power over the 2048 FFT bins. Then, the noise FFT sum is subtracted from the signal FFT sum. This is divided by the noise FFT sum and converted to dB.
This is the output of my flowgraph:
As calculated by my flowgraph, the power values are:
signal only, raw power: ~0.329
noise only, raw power: 0.000007
SNR in dB: ~46.6dB
I'm using a LoRa node to transmit the signal of interest; the modulation details are here: https://www.thethingsnetwork.org/docs/lorawan/#modulation-and-data-rate
The signal occupies the captured bandwidth (125k) and is sampled at 1 million samples per second.
回答1:
Your flowgraph should give you the correct SNR value under the following conditions:
- the signal and noise sources are uncorrelated
- the "noise only" captured by the lower branch has the same characteristics (especially the same average power) as the noise included in the "signal + noise" captured by the upper branch
As an aside, unless you are also using intermediate signals for other purposes, there are a few simplifications that can be made to your flowgraph:
- The multiplications up the upper and lower branches by the same constant factor will eventually cancel out in the divide block. You could save yourself the trouble of the scaling altogether.
- From Parseval's theorem, the summation of the squared magnitudes in the frequency-domain is proportional to the summation of the squared samples in the time-domain. The FFT blocks would thus not be necessary.
That said, in your flowgraph you are using some intermediate signals for GUI output purposes. In this case, you could simply put the required constant scaling just before the Number Sink.
来源:https://stackoverflow.com/questions/51784385/calculating-snr-using-psd-of-captured-signal-and-noise