# Variance calculation from PSD

I have a receiver which is left to open for sensing. I'm using the periodogram method for estimating the PSD. I need to calculate the SNR of the incoming for which I need to calculate the variance. Can anyone suggest me ways to calculate the variance from the PSD?

-
So your main goal is to calculate the SNR of the received signal? –  Deve Feb 14 '13 at 10:39
Yes, calculating SNR is my interest, but variance is the heart of my problem. So in any case I need the variance to be calculated @ Deve. –  North Feb 14 '13 at 10:52

For a wide-sense-stationary random process, all the random variables comprising the process have the same mean $\mu$ and variance $\sigma^2$, and the variance is the integral of the power spectral density $S(f)$ less the square of the mean:

$$\sigma^2 = \int_{-\infty}^{\infty} S(f)\,\,\mathrm df - \mu^2.$$

Generally, the mean is $0$ and $\sigma^2$ is just the integral of $S(f)$, but when $\mu \neq 0$, then $S(f)$ includes an impulse of $\mu^2\delta(f)$ at $f=0$ which contributes $\mu^2$ to the integral, and this gets subtracted off by the $-\mu^2$ term in the above formula. For discrete-time signals, the integrals should be replaced by the appropriate sums. But when there is a (deterministic) signal component and a (random, zero-mean) noise component, calculation of the signal-to-noise ratio SNR (which has many definitions including one which says it is the ratio of the signal energy to the noise variance times the signal duration), requires separating out the two numbers needed from knowledge of their sum (which is what the periodogram will give you). This is a lot trickier and the answer will typically depends on details of the signal that you have not shared with us.

-
My signal is not a deterministic signal(I'm just letting out the receiver open to catch the signal) and I'm not interested in demodulating the incoming signal. Also, I'm assuming the noise to be AWGN. So, to calculate the SNR I need to find the variance of signal and noise by which I can compute SNR as : 'SNR = Variance of signal divided by variance of noise'. Ofcourse I need variance calculations in other measurements also for my receiver to work as intended. –  North Feb 15 '13 at 6:44
@Northstar I don't understand what you are trying to say. If the receiver is "open" and there is no "incoming" signal present when you make the periodogram measurements, then what you are measuring is the PSD of the thermal noise in the receiver plus any stray noises that the antenna may pick up, e.g. background noise at 3 degrees K temperature from the Big Bang, and all of that is noise. If there is a signal of interest to you (regardless of whether you wish to demodulate it or not) that is present when you make the periodogram measurements, then the last two sentences of my answer apply. –  Dilip Sarwate Feb 15 '13 at 13:22
to be precise, I am working on spectrum sensing for Cognitive Radio, for which I'm using the Energy Detector method of sensing the spectrum. So, problem is I do not know the characteristics of the incoming signal(which makes it non-deterministic) before hand and I'm interested in computing the SNR, for which I need variance. –  North Feb 16 '13 at 6:03