The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 18th, 2024, 3:48am
Pages: 1
Send Topic Print
FFT with spectre (Read 12323 times)
medya
Junior Member
**
Offline



Posts: 14

FFT with spectre
May 07th, 2012, 6:14am
 
Hi everyone,I test the fft for very simple circuit(sin wave with a res)and set the frequency of input signal to 100M*(17/1024) and  the strobeperode to 10n , run the simulation for 10240n. (17 periode of input, the total step is 1024).then set the dft in calculator from 0 to 10240n and the N=1024 and  hmming window but the result is wondered me Shocked the noise floor large than -100db,what is the problem??? Huh (Plz see the attached pic).I use fin/M=fs/N (cherent sampling)to calculate the steps and input freq.(N=1024,M=17,fs=100M so fin=1.66015M)
Back to top
 

pic.png
View Profile   IP Logged
sheldon
Community Fellow
*****
Offline



Posts: 751

Re: FFT with spectre
Reply #1 - May 7th, 2012, 6:09pm
 
Medya,

  It looks like you are looking at the window function. You can test this
by changing the window function and look at how the plot changes,
for example, try using the cosine2 and cosine4 functions. BTW, in order
to avoid rounding error and spectral leakage you should expand fin
fully, fin=1660156.25.

                                                                     Best Regards,

                                                                          Sheldon
Back to top
 
 
View Profile   IP Logged
RFICDUDE
Community Fellow
*****
Offline



Posts: 323

Re: FFT with spectre
Reply #2 - May 8th, 2012, 3:52am
 
Part of the problem might be that you are starting the DFT from time = 0. There may be some slight numeric noise on the first couple of time points that causes some low frequency noise. This should not be the case if you are starting with a source = 0 at time=0, but check anyway. Set the stop time to obtain extra cycles of the signal of interest and start the DFT after the extra cycles. If this improves the DFT results then add more extra cycles until you achieve the desired noise floor (simulator noise will set a lower limit).

If settling at the beginning of the simulation is not the problem then perhaps the issue is the simulator settings.
The tolerances and integration method can also impact the DFT spectrum.

You can try a few of these suggestions (one at a time)
1. Set the transient integration method to "traponly"
2. Tighten reltol to (at least) .0001
3. Set errpreset to conservative
Back to top
 
 
View Profile   IP Logged
medya
Junior Member
**
Offline



Posts: 14

Re: FFT with spectre
Reply #3 - May 8th, 2012, 4:19am
 
Thanks from all,
I invite you to see this link
http://www.cadence.com/community/forums/T/22430.aspx
what is your opinion?  
Back to top
 
 
View Profile   IP Logged
RFICDUDE
Community Fellow
*****
Offline



Posts: 323

Re: FFT with spectre
Reply #4 - May 8th, 2012, 5:56am
 
I had no clue that you had switched circuits on the same schematic.

I agree with Andrew that you need to allow time for switched circuit to reach steady state (settle) before taking the DFT.

I would also make sure you are using method=traponly option for transient. I have seen odd numerical noise floors when looking at the DFT of switched circuits using the gear method or some hybrid method between the two.
Back to top
 
 
View Profile   IP Logged
sheldon
Community Fellow
*****
Offline



Posts: 751

Re: FFT with spectre
Reply #5 - May 10th, 2012, 6:23am
 
Medya,

 Attached are my results for the same conditions.
   
   fft_w_pulse is the fft for 17MHz 1024 fft with a dummy 100V,
   (997/1024)*1GHz pulse source in the testbench as an
   interference source

  The testbench is tb_pulse

These results show that the sine wave is clean and any numerical
noise from other parts of the circuit has little effect on the sine
wave, ~ -300dBc

There may be some other issue with your testbench.

                                                                     Best Regards,

                                                                        Sheldon
Back to top
 

fft_w_pulse.png
View Profile   IP Logged
sheldon
Community Fellow
*****
Offline



Posts: 751

Re: FFT with spectre
Reply #6 - May 10th, 2012, 6:24am
 
testbench
Back to top
 

tb_pulse.png
View Profile   IP Logged
medya
Junior Member
**
Offline



Posts: 14

Re: FFT with spectre
Reply #7 - May 10th, 2012, 10:33am
 
Thanks alot from all.but dear sheldon can you attach the csv file of your transient analysis for sin vave because i dubt that the accuracy of the prodused voltage value is important for example in my csv file i see that the the numbers accuracy is about 0.0001 that result in <14bit resulotion.and what is the value of accuracy parameters in your simulation.(like retol ...).
other q:is the way that increase the accuracy of calculated valu ( for example in matlab we can addjust it by format command.)
thanks
Medya
Back to top
 
 
View Profile   IP Logged
sheldon
Community Fellow
*****
Offline



Posts: 751

Re: FFT with spectre
Reply #8 - May 10th, 2012, 6:12pm
 
Medya,

  How many digits did use when you created the *.csv file?
The default value is probably not enough for this case and
you should increase the accuracy of the outputs, Options -->
Significant Digits --> set to a high number. BTW, the default
is 4 digits and that is not enough in this case.

                                                      Best Regards,

                                                         Sheldon
Back to top
 
 
View Profile   IP Logged
medya
Junior Member
**
Offline



Posts: 14

Re: FFT with spectre
Reply #9 - May 11th, 2012, 1:04am
 
Hi sheldon,I set the extracted data accuracy from table format,but my problem with dft of caculator is remain,is the option that must be set to achieve good accuracy. (i set the simulation >>option>>annoatate>>digit from 5--->10 but result dont change Huh)
Back to top
 
 
View Profile   IP Logged
YuanQian
New Member
*
Offline



Posts: 1

Re: FFT with spectre
Reply #10 - May 11th, 2012, 3:38pm
 
You should use the rectangular window for the pure periodic signal for DFT or FFT.  Any other type of windows will distort the spectrum of the pure periodic signal.  They are used for non-periodic signals.
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.