0
$\begingroup$

I have a set of IQ data. From those data I'm trying to get the amplitudes and the frequencies of my signal as I then want to plot them vs. time.

I am able to obtain the amplitudes by squaring both my I and Q values, summing them up and taking the square root of the sum; however, I am struggling to obtain the frequency.

I understand that I need to take a FFT to get from the time domain to the frequency domain but I'm not sure on what values I should apply the FFT. Should I do it individually on Is and j*Qs and then sum them up. Should I do it on the sum Is + j*Qs (which just gave me a new array of complex numbers of the form x + j*y). What role my center frequency / sampling frequency are going to play into that?

For context: I'm doing this using Python. (And I'm obviously pretty new to all of this.)

$\endgroup$
0
$\begingroup$

You should take the FFT on Is+j*Qs. If you have say 1000 IQ samples, you can form 1000 I+jQ complex values and take 1000 point FFT to get another set of 1000 complex numbers. If you plot magnitude of these output values, it will show you the frequency content of those 1000 IQ samples.

Since you took 1000 point FFT, each of those complex output values correspond to frequencies at multiples of $\frac{F_s}{1000}\text{Hz}$ where $F_s$ is the Sampling Frequency. For example, the first value will be corresponding to frequency at $0\text{Hz}$, next value is the frequency content at $\frac{F_s}{1000}\text{Hz}$, 3rd value corresponds to frequency $\frac{2F_s}{1000}\text{Hz}$ and so on..

If you are using numpy fft, the documentation should be a good enough guide to you.

$\endgroup$
0
$\begingroup$

Let us assume that you have a list of sampled I/Q data streams. The answer to your question may be two-fold. Firstly, are you trying to obtain the instantaneous or frequency of your carrier? Let us assume that you are trying to obtain inst. frequency. Then, first

  1. calculate the phase of your samples by simply performing $\phi(k) =\tan^{-1}(s_I(k)/s_Q(k))$.
  2. Do not forget to unwrap $\phi(k)$ since it is limited in $[-\pi/2,\pi/2)$ interval. (Both Python and MATLAB have unwrap function.)
  3. Take the derivative of $\phi(k)$ and divide to $2\pi$. You can use forward difference technique for this $\frac{1}{2\pi}\frac{d\phi(k)}{dk} \approx \frac{ \phi(k+1)-\phi(k)}{2\pi}$. The result will be your inst. frequency for your I/Q data.
  4. If you are trying to obtain the carrier frequency, you can take the average of the instantaneous frequency.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.