The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 22nd, 2024, 7:35pm
Pages: 1
Send Topic Print
Taking FFT of a designed ADC (Read 8333 times)
self designer
New Member
*
Offline



Posts: 7

Taking FFT of a designed ADC
Jan 06th, 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?

Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re:  Taking FFT of a designed ADC
Reply #1 - 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
Back to top
 
 
View Profile WWW   IP Logged
self designer
New Member
*
Offline



Posts: 7

Re:  Taking FFT of a designed ADC
Reply #2 - Jan 6th, 2016, 9:26am
 
Sorry, it is "FFT" actually.. It was a wrong auto correction keyboard issue.
Back to top
 
 
View Profile   IP Logged
DanielLam
Community Member
***
Offline



Posts: 76

Re:  Taking FFT of a designed ADC
Reply #3 - Jan 7th, 2016, 11:32am
 
Hi, I don't see the image. Could you attach it? Or is there something wrong on my end...
Back to top
 
 
View Profile   IP Logged
self designer
New Member
*
Offline



Posts: 7

Re:  Taking FFT of a designed ADC
Reply #4 - Jan 7th, 2016, 2:10pm
 
Sure, it's attached now.
Back to top
 

ouit.jpg
View Profile   IP Logged
ULPAnalog
Community Member
***
Offline



Posts: 97

Re:  Taking FFT of a designed ADC
Reply #5 - 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
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re:  Taking FFT of a designed ADC
Reply #6 - 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
Back to top
 
 
View Profile WWW   IP Logged
ULPAnalog
Community Member
***
Offline



Posts: 97

Re:  Taking FFT of a designed ADC
Reply #7 - 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.
Back to top
 
 
View Profile   IP Logged
DanielLam
Community Member
***
Offline



Posts: 76

Re:  Taking FFT of a designed ADC
Reply #8 - 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
Back to top
 
 
View Profile   IP Logged
self designer
New Member
*
Offline



Posts: 7

Re:  Taking FFT of a designed ADC
Reply #9 - 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?
Back to top
 
 
View Profile   IP Logged
self designer
New Member
*
Offline



Posts: 7

Re:  Taking FFT of a designed ADC
Reply #10 - 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.
Back to top
 
 
View Profile   IP Logged
ULPAnalog
Community Member
***
Offline



Posts: 97

Re:  Taking FFT of a designed ADC
Reply #11 - 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
Back to top
 
 
View Profile   IP Logged
self designer
New Member
*
Offline



Posts: 7

Re:  Taking FFT of a designed ADC
Reply #12 - Jan 9th, 2016, 11:13am
 
Hello,
Thank You,
I've used HSPICE, then imported simulation results to Matlab to do FFT.
Back to top
 
 
View Profile   IP Logged
self designer
New Member
*
Offline



Posts: 7

Re:  Taking FFT of a designed ADC
Reply #13 - 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.
Back to top
 
 
View Profile   IP Logged
DanielLam
Community Member
***
Offline



Posts: 76

Re:  Taking FFT of a designed ADC
Reply #14 - 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.
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.