The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design >> Analog Design >> Taking FFT of a designed ADC
https://designers-guide.org/forum/YaBB.pl?num=1452097808

Message started by self designer on Jan 6th, 2016, 8:30am

Title: Taking FFT of a designed ADC
Post by self designer on Jan 6th, 2016, 8:30am

This image shows the analog output associated of 12-bit output code of a designed pipeline ADC, I've tried to take a FFT in Matlab but the result was wrong.
Any suggestions?


Title: Re:  Taking FFT of a designed ADC
Post by Ken Kundert on Jan 6th, 2016, 9:00am

I don't know what a FIT is, but I suspect you want to apply strobing before you generate the output that you send to Matlab.

-Ken

Title: Re:  Taking FFT of a designed ADC
Post by self designer on Jan 6th, 2016, 9:26am

Sorry, it is "FFT" actually.. It was a wrong auto correction keyboard issue.

Title: Re:  Taking FFT of a designed ADC
Post by DanielLam on Jan 7th, 2016, 11:32am

Hi, I don't see the image. Could you attach it? Or is there something wrong on my end...

Title: Re:  Taking FFT of a designed ADC
Post by self designer on Jan 7th, 2016, 2:10pm

Sure, it's attached now.

Title: Re:  Taking FFT of a designed ADC
Post by ULPAnalog on Jan 7th, 2016, 3:53pm

Hello

What is the input tone frequency and the sampling frequency? As Ken mentioned strobing is required to avoid interpolation errors. Also it is not clear if windowing is being used while FFT is computed. You might want to have a look at this link

http://www.designers-guide.org/Forum/YaBB.pl?num=1118555245

Thanks and regards

Title: Re:  Taking FFT of a designed ADC
Post by Ken Kundert on Jan 7th, 2016, 9:24pm

In this case the signal being analyzed is periodic and the the period is known, so windowing would not be used.

-Ken

Title: Re:  Taking FFT of a designed ADC
Post by ULPAnalog on Jan 7th, 2016, 9:39pm

Thank you for the clarification Ken. I just wanted to make sure that the record length encompassed an integer number of input cycles while FFT was taken.

Title: Re:  Taking FFT of a designed ADC
Post by DanielLam on Jan 8th, 2016, 8:43am

Can you attach a picture of the sampled wave form (not the full transient waveform you attached earlier), and also the FFT of it?

Are you coherently sampling? What is your Fin, Fs, number of points sampled, prime number?

Thanks,
Daniel Lam

Title: Re:  Taking FFT of a designed ADC
Post by self designer on Jan 9th, 2016, 1:56am


Ken Kundert wrote on Jan 6th, 2016, 9:00am:
I suspect you want to apply strobing  before you generate the output that you send to Matlab.

-Ken


How to apply strobing?

Title: Re:  Taking FFT of a designed ADC
Post by self designer on Jan 9th, 2016, 2:03am


DanielLam wrote on Jan 8th, 2016, 8:43am:
Are you coherently sampling? What is your Fin, Fs, number of points sampled, prime number?

Thanks,
Daniel Lam


Actually it's not a coherently sampling, Fs=40MHz, Fin=1MHz, 4096 Points.
So, I'll try coherent sampling in forward.

Thanks.

Title: Re:  Taking FFT of a designed ADC
Post by ULPAnalog on Jan 9th, 2016, 11:08am

Hello

I would choose the input tone frequency in such a way that the ratio of it with sampling frequency is a prime number. The reason for the same are discussed in the link posted in one of my earlier replies.

Since you have not mentioned the simulator you are using, I presume that it is Spectre, in which case strobing is done by adding strobeperiod to transient analysis. If you are using ADE-L for simulations, you can find the option under transient analysis -> Options -> Output.

Thanks and regards

Title: Re:  Taking FFT of a designed ADC
Post by self designer on Jan 9th, 2016, 11:13am

Hello,
Thank You,
I've used HSPICE, then imported simulation results to Matlab to do FFT.

Title: Re:  Taking FFT of a designed ADC
Post by self designer on Jan 9th, 2016, 11:29am

It seems I haven't done good calculations for coherently sampling,
For Fs=40MHz for 12-bit ADC I've considered 8192 records and I assumed that 1 Mhz was my favorite, consequently, Nw=2048 then I choosed 2047 as a prime number finally input frequency that I reached was 9990239Hz. Also I made a new variable to skip ADC deadly at the beginning, to have periodic signal.
If I'm wrong, please let me know. Also please let me see what exactly code I should use.

Thanks everybody.

Title: Re:  Taking FFT of a designed ADC
Post by DanielLam on Jan 10th, 2016, 12:33am

For FFT to work well with a rectangular window (sometimes misinterpreted as no windowing), you need to coherent sample.

2047 is not a prime number.

Here is the formula, you should set your input frequency as
Fin = (Prime # * Fs) / Number of samples taken

In your case, you can try Fin = (5 * 40 MHz) / 8192
Here I chose the prime number 5, you should pick numbers ABOVE 3.

Also, if your circuit has transient effects, I would run the simulation a little longer and take the later 8192 pts. For example, run for 8500 pts, and take the last 8192.

Btw, you should be fine with perhaps a 256 or 512 pt FFT just to check functionality. So you can save simulation time.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.