# Efficient way to get power levels from an SDR (RTL-SDR specifically)

At the moment I can step through the frequency band of interest and take samples to estimate relative power at various frequencies. But this is slow. Is it effective to center myself in the band of interest, make sure my sample rate is high, and do an FFT instead? I'm just wanting to efficiently get relative power levels for frequencies throughout a band.

• An FFT will get you the power across the entire band that you sampled (see Parseval's theorem); but I don't see how that saves you anything versus calculating the mean square in the time domain (unless you take advantage of knowing your signal is only in a smaller range of bins, then that could be a very good approach). If you happen to be dealing with "pure" tones there is an easier method to get the power of individual frequencies based on estimating magnitude. – Dan Boschen Jul 9 '16 at 17:45
• @DanBoschen - What I'm hoping is that the FFT method will be simple - sample and calculate the fft, with the output array being relative strengths for each bin. As opposed to moving to a new frequency, sampling and calculating power, and repeating for each freq I want to monitor. Is that the case? – HH- Apologize to Carole Baskin Jul 9 '16 at 18:03
• It depends how your waveform of interest is distributed across bins. The total power of the signal that is sampled as derived from your FFT will be the sum of the squares of the magnitude of each bin. (With perhaps a proportional scaling.) If your signal is only significant across a few bins then this would be simple- but you would need to know which bins. – Dan Boschen Jul 9 '16 at 18:06

The DFT->square method is one classical spectrum estimator. So, yes, instead of tuning $N$ times to receive an $N$th of the overall bandwidth $B$ by sampling at a rate of $\frac BN$, you could just as well sample with a rate of $B$, and calculate $N$-point DFTs in the same time. Since sampling the same time at rate $B$ gives you $N$ times the samples of sampling at $\frac BN$, the information would be the same (Nyquist/Shannon).