cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

How to take FFT of I and Q Data

Maxplus12
7-Bedrock

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 56
Fred_Kohlhepp
23-Emerald I
(To:-MFra-)

I would be very interested in your previously unknown data.

 

I would also like to see a demodulated version that shows the time history phase shifted data from I and Q as my simple sample showed.

Capture.PNG

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

-MFra-
21-Topaz II
(To:Maxplus12)

Hi!

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

See if this example can help

-MFra-
21-Topaz II
(To:Maxplus12)

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

Fred_Kohlhepp
23-Emerald I
(To:-MFra-)

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.

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.

-MFra-
21-Topaz II
(To:Maxplus12)

IQ8.jpgIQ9.jpgIQ10.jpgIQ11.jpg

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?  

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?

The y plot in the attached image is 20log(FFT magnitude).
-MFra-
21-Topaz II
(To:Maxplus12)

procedure.jpgIQ12.jpgIQ13.jpg

-MFra-
21-Topaz II
(To:-MFra-)

IQ14.jpg

Hello MF,

Thank you for all the help and for taking your time.

 

I see you have done two analysis for IQ, please correct me if I am wrong: FFT and discrete FFT.

However, the results in terms of shape and bandwidth are different between the two analysis.

 

The DFT replica is somewhat resembles the shape of the Matlab and measured results but BW is not correct.  It should be 20MHz. 

Capture.JPG

The FFT result is also not showing the correct BW.  I used your IQ spectra file and entered sampling time as 2.222E-08 i.e. Sampling frequency is about 45MHz. That gave me a BW of 10MHz instead of the expected 20MHz. I made an attempt to use the log for y-axis, but I had no success.  Please see plot below.

Mathcad.JPG

For the FFT plot shown above, I left the signal frequency as it was in your file i.e. 1/T2sp. But my understanding is that 1/T2sp should yield the sampling frequency and not signal frequency.  Do you think that is contributing the error in the FFT plot?

 

NB: I measured the LTE 20MHz wide signal in the signal analyser (in IQ domain).  The IF BW was set to 25MHz to capture the complete signal.  

-MFra-
21-Topaz II
(To:Maxplus12)

Hi,

IQ15.jpg

Hello,

Thank you for the help, mf.

I tried to recreate the waveform based upon the information that you supplied to me earlier today.

But Mathcad is complaining of some undefined variables e.g. fcv, Xre, mgv etc.

Maybe I used too many italics.

I have e-mailed the Mathcad file.

 

File attached.

 

-MFra-
21-Topaz II
(To:Maxplus12)

Hi,

File attached.

I hope everything goes well finally!

Greetings

FM

-MFra-
21-Topaz II
(To:Maxplus12)

IQ16.jpgIQ17.jpg

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.

-MFra-
21-Topaz II
(To:Maxplus12)

IQ18.jpgSpectrum Analyzer.jpg

Thank you. I shall look into this tonight .

Do the cursors work on Mathcad v14?

In the version thst you sent two days ago, I noticed you included the inverse to replicate IQ. I compared the replicated data with the imported data for the first few points. They don't seem to agree.

Also what is the difference between the two plots regarding Fek.
-MFra-
21-Topaz II
(To:Maxplus12)

IQ19.jpg

Hello,

Thank you.  I got the markers operation working after activation.  I am still struggling of importing Excel data into the table.  I resolve this issue by copying and pasting from the previous file.

Regarding my last question, here is my explanation.

IQ Data

Capture1.JPG

In the last part, inverse FFT is used to recover the original signal. The net results are shown below.  As you can see there are several observations:

  1. What is f2k and FEk?
  2. The results do not correspond to the original IQ after applying inverse FFT.  Am I Missing a point?
  3. I see that re-center command is used to Shift zero-frequency component to center of spectrum. How does the command know to which samples to re-centre?

    1. What is mg10, mg11, mg12 etc?
    2. What is auto-correlation graph showing us? What can we get out of it for analysis point of view?
    3. Having captured the I/Q data, is there any way to plot on constellation. The reason being is for calculating the EVM from reference I/Q.
    4. Is there a way to calculate EVM from a given capture I/Q data? The issue I can see is preamble synchronisation between the signal generator and the analyser in terms of where does the constellation starts to determine EVM?
    Capture2.JPG
-MFra-
21-Topaz II
(To:Maxplus12)

Hi,

The last part is only indicative of what else can be done, since I used cfft, to reconstruct the signal I have to use icfft and not ICFFT. Unfortunately in the reconstruction of the signal with "makeri" the phases are altered, so you get a different signal from the original as you can see in the relative mathcad help. mg10, mg11, mg12, are the Fourier transforms of the autocorrelation functions of the signal I, of the signal Q and of the complex signal IQ, considered as random processes. Furthermore, to represent the IQ signal on the constellation, you first need to quantize each sample, read with a click, and convert from analog to digital ( four bits for example). Then you have to represent it on the corresponding constellation and so on.

IQ20.jpgIQ21.jpg

Do you have an example to plot IQ on constellation please?

Is it possible to calculate EVM from captured IQ data?

-MFra-
21-Topaz II
(To:Maxplus12)

We have no more time to satisfy your umpteenth question ....

Announcements

Top Tags