# FFT magnitude of ADC samples, converting back to $\textrm{dBm}$

I am generating a sinusoid from a signal generator set at a specific $\textrm{dBm}$ and inputting this into an ADC as a real input (not IQ). I take a 256 point FFT on the resulting samples (raw signed ADC decimal numbers, not voltages). I plot the FFT magnitudes and see that I have a single spike (well 2 spikes because of redundant/symmetry) that has a certain unsigned-decimal magnitude. The FFT results are basically the same as performing fft() in MATLAB.

I'd like to be able to take this one single data point (FFT magnitude at peak bin) and produce an estimate of the original $\textrm{dBm}$. I cannot just take the IFFT to reproduce a time domain sequence.

This is my attempted method, but the results are coming back too high:

ADC reference voltage = +/- 1.25V
ADC number of Bits = 12

Normalize FFT Magnitude : mag_n = mag/256
Apply ADC scaling: volts = mag_n * (2.5/2047)
Power at Termination Load: power = (volts^2)/50
Convert to $\textrm{dBm}$ : dBm = 10*log10(1000 * power )

I would assume that if I got the math right, my results would come back too low since some of the spectrum energy and smeared into the side lobes and not accounted for with my single data point. Any hints?

• first of all, to decide whether the side lobes are affecting your measurement just slightly change the frequency of the sine wave to see its effect on the output of the measurement. If the resut improves or detoriates then it could be what you have guessed. On the other hand, instead of theoretically computing the scaling factor, why don't you simply determine it based on the measurement of the known signal? – Fat32 Oct 5 '16 at 23:16
• Doing it empirically isn't a bad work around, but I'd still like to know the correct formula that gives a reasonable estimate of dBm. – user2913869 Oct 6 '16 at 13:27
• you just have to calibrate your measurement setup. Then you can also find a formula that produces the same scaling. – Fat32 Oct 6 '16 at 14:31
• So are you saying that being able to do it mathematically is not feasible? – user2913869 Oct 6 '16 at 14:49
• depends on your engineering purpose – Fat32 Oct 6 '16 at 14:51