The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 6:43am
Pages: 1
Send Topic Print
THD and DFT Spectre analysys setup (Read 9620 times)
matteo.tonelli
New Member
*
Offline



Posts: 7

THD and DFT Spectre analysys setup
Jul 14th, 2008, 8:02am
 
Hi,

I want to perform the THD and the DFT analysis of a Source Follower with Spectre simulator, but I don't understand the correct setup of the transient analysys for good accuracy (i.e. reltol, abstol, max timestep, simulation time, etc.). Is the strobing technique necessary to gain in terms of accuracy. The follower has to be used as input buffer in a ADC.

Thanks, Matteo
Back to top
 
 
View Profile matteotoons   IP Logged
vivkr
Community Fellow
*****
Offline



Posts: 780

Re: THD and DFT Spectre analysys setup
Reply #1 - Jul 14th, 2008, 11:37pm
 
Hi,

Strobing is necessary, otherwise you will see plenty of artifacts due to the simulator. If you are using strobing, then usually it is enough to set the accuracy preset to conservative and not have to worry about the reltol, abstol etc.

In addition, the standard practices for DFT analysis apply. Place your signal precisely in one bin to avoid the need for a window (coherent sampling), and make sure that you take 2^n sample points since the DFT function in the Waveform Calculator is actually just an FFT algorithm and will work well only with such a choice of points.

For more details, look into the book "The Designer's Guide to SPICE and Spectre" by Ken Kundert if you have it handy.

If you don't like the Waveform Calculator for whatever reason, you can always write out the strobed data to a file and use your favorite processing tool for DFT calculations. This is handy sometimes if you don't always want to use 2^n points.

Regards
Vivek
Back to top
 
 
View Profile   IP Logged
matteo.tonelli
New Member
*
Offline



Posts: 7

Re: THD and DFT Spectre analysys setup
Reply #2 - Jul 15th, 2008, 1:42am
 
Thanks a lot for all the clarifications.

Assuming the setup described above; the THD value and DFT show a significant variation with respect the simulation time. How can I choose the end time of the transient analysis? The transient analysis has to be stopped according to the number of samples and the strobing period (slightly beyond the last sample)?


Back to top
 
 
View Profile matteotoons   IP Logged
vivkr
Community Fellow
*****
Offline



Posts: 780

Re: THD and DFT Spectre analysys setup
Reply #3 - Jul 16th, 2008, 11:42pm
 
Hi Matteo,

Do you mean to say that your results are very different depending on the simulation interval?
Then you probably are seeing some initial transients. I would run the simulation first without strobing
and just look at the time-domain behavior to make sure that everything has settled to its staeady state value.

You should only consider data beyond this point, let's call it T_steady_state, and then choose T_final for your simulation, depending on how many points you want in your DFT calculation. When using coherent sampling (input perfectly in 1 bin of the DFT), you need fewer points. Usually, 512 points are enough for most cases. Some people tell me that they can manage with as few as 64. But try it out. As a reality check, I always run the DFT function on the input signal also. Since the input is guaranteed pure, if you see problems there, you know that you have chosen some option wrongly in the DFT fucntion.

You mentioned driving an ADC. Probably you have modelled the loading of the source follower with the ADC input stage. Hopefully, your strobing frequency is the same as the ADC sample rate and you are sampling towards the end of the sampling phase when the source follower output has settled in each sampling phase.

Hope that helps.

Regards
Vivek
Back to top
 
 
View Profile   IP Logged
sheldon
Community Fellow
*****
Offline



Posts: 751

Re: THD and DFT Spectre analysys setup
Reply #4 - Jul 19th, 2008, 1:30am
 
Matteo,

  A source follower, even one driving an ADC is a linear circuit
[just like an op-amp]. There is no need to worrying about sampling
effects, aliasing, etc. Chose the input frequency based on the ADC
requirements, for example, the Nyquist Frequency for a 20MHz ADC
is 10MHz. So use a 10MHz sine wave to test the follower.

The transient stop time for a 10 MHz input frequency is 1/10MHz or
100ns.  

You should use the Spectre error presets to control the simulation,
in general, setting reltol, etc. is an inefficient way to improve
accuracy.

Strobing eliminates the interpolation when the output data points
are selected for the dft. You also can use the Spectre Fourier
analysis. The Fourier integral uses the points that the simulator
selects, see Ken's book for a more detailed discussion).

For a source follower, windowing should not be required because
source follower is not a sampled circuit.

One other thing you might want to try is to perform the DFT across
several cycles. For example, if the transient stop time is 400ns for
the DFT, then there will be three noise bins between each harmonic
bin. This will give you insight into the noise floor of the DFT. This
allows allows you to run transient noise analysis and see the effect
of noise on the buffer.

In the attached plot, I simulated a source follower and plotted the
DFT for simulation setups:
1) 10MHz input, 64 point DFT, tstop=100ns
2) 10MHz input, 64 point DFT, tstop=100ns
   The results are equivalent to the results with strobing, in
   this case I just made maxstep small because the simulation
   is fast, maxstep=100ps (~1/2 * ( 100ns/64))
   This works okay for linear circuits, but makes the simulation
    time for sampled circuits very long, so use strobing for the S/H
3) #1 with the tstop=400ns and 256 point DFT
   This inserts three noise bins between each harmonic
4) #2 with the tstop=400ns and 256 point DFT

                                                         Best Regards,

                                                            Sheldon
Back to top
 

dg_source_follower.png
View Profile   IP Logged
vivkr
Community Fellow
*****
Offline



Posts: 780

Re: THD and DFT Spectre analysys setup
Reply #5 - Jul 20th, 2008, 11:55pm
 
sheldon wrote on Jul 19th, 2008, 1:30am:
Matteo,

  A source follower, even one driving an ADC is a linear circuit
[just like an op-amp]. There is no need to worrying about sampling
effects, aliasing, etc.

                                                           

Hi Sheldon,

A point very well made, but I am assuming that Matteo might be simulating the signal sampled across the sampling cap connected as a load to the source follower, i.e. the real output of the whole thing.

Matteo: Are you only looking at the source follower output? In that case, I eat my words, and Sheldon is spot on.

Regards
Vivek
Back to top
 
 
View Profile   IP Logged
matteo.tonelli
New Member
*
Offline



Posts: 7

Re: THD and DFT Spectre analysys setup
Reply #6 - Jul 22nd, 2008, 12:52am
 
Hi,

At the moment the follower drives  a capacitor that will be the SH holding capacitor. The next step on my analysis will be the simulation of the whole front-end (follower+switch+holding capacitor).

Thanks to all, Matteo
Back to top
 
 
View Profile matteotoons   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.