Skip to main content
1-Visitor
Feb 20, 2018 11:34 PM UTC
Question

How to take FFT of I and Q Data

Hello,

I have captured I-phase and Q-phase (quadrature) data of a radio signal with QPSK modulation.  The two data are in two separate text files with an array of data in a list.

How do I do FFT using Mathcad please?

Thank you

56 replies

Werner_E
25-Diamond I
Feb 20, 2018 11:40 PM UTC

Use the cfft or the CFFT (note the capitals) command (depends on your needs and your data)

Guess that no more could be said without more information from your side.

Translate
Maxplus121-VisitorAuthor
1-Visitor
Feb 20, 2018 11:59 PM UTC
Hi
Thank you.

I have seen that post and used a waveform (I believe it was a cosine) ad an example.

But I have I an Q data in text files containing 2000 data pair values to represent the complex signal. So effectively I and Q are complex.
How do I do FFT?
Translate
terryhendicott
21-Topaz II
Feb 21, 2018 2:27 AM UTC

Hi,

 

further information makes this simple.  

https://dsp.stackexchange.com/questions/19615/converting-raw-i-q-to-db

Converting raw I/Q to dB

The amplitude of an IQ signal is just the vector magnitude, sqrt(I^2+Q^2)

Then do the fft on this amplitude. The complex numbers will turn to real in the squaring of the values.

 

Cheers

 

Translate
terryhendicott
21-Topaz II
Feb 21, 2018 1:27 AM UTC

Hi,

 

http://iitg.vlab.co.in/?sub=59&brch=163&sim=1065&cnt=1

You must demodulate the I and Q data back to the original signal data before frequency examination.

 

Cheers

Translate
21-Topaz II
Feb 22, 2018 9:29 AM UTC

Hi!

Am I allowed a digression on the subject? Do you like this video?

Translate
23-Emerald I
Feb 22, 2018 1:51 PM UTC

See if this example can help

Translate
21-Topaz II
Feb 22, 2018 3:33 PM UTC

Hi,

Regardless of the signal, in general to calculate its spectrum you should follow the procedure of the example here below, do you agree?

IQ.jpgIQ1.jpgIQ2.jpgIQ3.jpg

Greetings

FM

Translate
23-Emerald I
Feb 22, 2018 4:37 PM UTC

This is a very challenging analysis to follow.  I think it's good!  But I don't have either the time or inclination to verify it completely. 

 

This looks like a set of "tools"  that has been developed, used, and trusted for a considerable time.

Translate
21-Topaz II
Feb 22, 2018 5:17 PM UTC

Yes, of course, it is one of my work done some years ago, the set up required a lot of time. For the case in particular, the time was irrelevant, I just had to put together the various topics.

Translate
21-Topaz II
Feb 23, 2018 5:42 PM UTC

IQ8.jpgIQ9.jpgIQ10.jpgIQ11.jpg

Translate
Maxplus121-VisitorAuthor
1-Visitor
Feb 24, 2018 10:29 PM UTC

Hello,

I have downloaded the IQ spectra.zip file.

I am struggling with copying the 45001 data points into Mathcad.  I am using copy and paste command and Mathcad crashes.

Initially, I stated IQ:= and then try to insert a table (Insert>Data Control>Table).  But the table option was greyed out

How did you imported the data into Mathcad please?  

Translate
Maxplus121-VisitorAuthor
1-Visitor
Feb 25, 2018 12:33 AM UTC
It's work in win 7 pc 32bitsbut not in win 10 64 bits.
Anyway back to the IQ. I got my sampling time wrong - it should be 2.222E-08.

The IQ.data was captured for 1ms with 45001 points. Therefore sampling freq is 45MHz.
Signal frequency - it's IQ data measured from the analyser in 25MHz BW.

1. I am unsure what FFT bin frequency have been used in your file.

2. Here is the plot using Matlab based upon the IQ data used for mathcad and sample time as before. The plot doesn't resemble the mathcad results. What's going on?

3. What.command was used for FFT shift?
Translate
21-Topaz II
Feb 27, 2018 9:38 AM UTC

IQ16.jpgIQ17.jpg

Translate
Maxplus121-VisitorAuthor
1-Visitor
Feb 27, 2018 10:27 PM UTC

Hi MF,

Thank you for the revised version.

I seem to be struggling with the cursors.  They are not active for some reason even by sliding the rule.

The Cu parameter is undefined. 

 

Also, the import Excel is not working anymore by following your guide lines. The data doesn't get imported at all. I did the following: 1) create table, 2) Right click in table, import Data wizard and selected the file.  It says the file could not be imported for reading. 

The way to overcome is copy and paste from my old Mathcad file.

Translate
21-Topaz II
Feb 28, 2018 9:51 AM UTC

IQ18.jpgSpectrum Analyzer.jpg

Translate