1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I Calculating power spectral density from FFT

  1. Dec 9, 2016 #1
    EDIT: Sorry. It's FFT - Fast Fourier Transform, not FTT.
    I am interested in doing some amateur radio astronomy. Mainly at 1420MHz, hydrogen line. I have a RTL SDR stick. For those who don't know what that is, it's USB DVB-T receiver that can receive anything between 24 – 1766 MHz.

    Now, there is a finished program for what I am asking, but I don't like using something that I don't know how it works. This is the source for finished program https://github.com/mariocannistra/radio-astronomy-fftw

    SDR stick outputs I/Q data. I/Q data is just amplitude data but the amplitude is sampled at the same time 90 degrees away from the other sample. Amplitude of the signal is sqrt(I^2+Q^2). (I don't know how to insert equation, sorry). No problem so far.

    I can record a sample of the signal and there is a library for Raspberry PI for doing Fast Fourier Transform on that sample. This is where I got stuck. How to find power spectral density from the Fast Fourier Transform?

    I got the impression that it's just amplitude squared - I^2+Q^2? Can it be that simple?

    I apologize for any nonsense that I may have said here. And of course I wrote FTT instead of FFT in the thread title. If I wrote everything correctly that would be weird. Moderators, please correct that.
  2. jcsd
  3. Dec 9, 2016 #2


    User Avatar
    Science Advisor

    The FFT gives a complex output which is basically Z = I + Qi. So to generate the power spectrum you take Z * conj(Z) = abs(Z).^2 = I^2 + Q^2.
    If you're taking the FFT of a real input signal, then the positive and negative frequency parts have equal power, so you can just plot the positive frequency power spectrum and multiply by 2.
  4. Dec 10, 2016 #3
    I assume that in Z=I + Qi, I and Q are not the same variables as I, Q in raw data received from SDR? In this case Z= I + Qi, I and Q are just real and imaginary components of FFT output?
  5. Dec 10, 2016 #4


    User Avatar
    Science Advisor

    Sorry for the bad notation. Yes, I and Q are real and imaginary components of the FFT output, but they are basically just the coefficients (not the full oscillating signals as in the raw I/Q data outputs).
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted