The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 18th, 2024, 6:04pm
Pages: 1
Send Topic Print
Simulating high-resolution sample-and-hold (Read 1849 times)
vivkr
Community Fellow
*****
Offline



Posts: 780

Simulating high-resolution sample-and-hold
Dec 13th, 2005, 11:31pm
 
Hi,

I would like to know the best way to simulate a sample-and-hold so that the real performance can be measured. At the moment, I just run a transient analysis and strobe the outputs, but this kind of a simulation takes forever with transistor-level schematics.

Is there a good analysis to measure the linearity performance of a sample-and-hold under large-signal excitations?

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



Posts: 751

Re: Simulating high-resolution sample-and-hold
Reply #1 - Dec 24th, 2005, 6:13am
 
Vivkr,

  Fair question, but tough question. A question for
you, how are controlling simulation accuracy? If
you are just tightening reltol to get the accuracy
you need then there is probably a lot that can
be done to optimize run time.

1) Optimize the testbench to eliminate interpolation
   error, in Spectre there is an option called
   strobeperiod that can be used to force time steps
   for the FFT. You also might want to try using an
   ideal sample and hold, zvcvs.

2) Set the simulator controls appropriately for
   application.

3) Use multi-threading/table modeling to boost
   performance.

4) Try UltraSim, it is fast and correlates well with
    Spectre.

 In case you have access to SpectreRF, there was a
new option added to PSS/PAC in IC5141 USR3,
MMSIM60 USR2. The PAC equivalent of PNOISE
time domain analysis are now available.

  Time domain noise analysis allows you to measure
the noise at a point during the periodic response.
So if you chose a time point at the end of the
hold period, time domain noise analysis reports
the noise that is added to sample signal, see
the SpectreRF theory manual for more details.

 So the short answer is that PAC/PXF analysis has
been enhanced to provided funtionality equivalent to
time domain noise analysis to speed up this type
of analysis.  

                                                     Best Regards,

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



Posts: 780

Re: Simulating high-resolution sample-and-hold
Reply #2 - Dec 24th, 2005, 7:11am
 
Hi Sheldon,

Thanks for the response. I was looking more at linearity analysis of a sample-and-hold.

The noise analysis is not much of an issue as I use PSS/Pnoise, and this is quite fast and accurate. It is the dynamic linearity that is more painful to test.

I already use strobing to get meaningful waveforms, and tight reltol settings, coherent sampling etc.

However, I still have to run a long transient analysis which in my case takes a few days to finish. Then, I do the FFT to identify spurs etc.

I was just wondering if there is a good way to measure dynamic linearity with a shorter simulation (not based on FFT). Perhaps someone can suggest an alternative. I know that RF designers make use of various utilities for measuring the linearity of their blocks. Is any of these useful for S&H blocks?

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



Posts: 751

Re: Simulating high-resolution sample-and-hold
Reply #3 - Dec 24th, 2005, 5:26pm
 
Vivkr,

  Sorry I was not clearer, the new capability for PSS/PAC
should give you the same capability for sampled distortion
analysis that PSS/PNOISE gives you for sampled noise
analysis, that is, the ability to analyze the signal and
distortion at time point during the sample/hold cycle.
So to get the complete solution, you will need run two
analysis, PSS/PNOISE for SNR and PSS/PAC for THD.
These results will provde you the SINAD. The cavaet
here is what to do about the PSS/PAC input signal. My
thinking is that I would sample a input ramp at the
maximum slew rate at the "zero-crossing" since this is
the worst case input condition for the sampling circuit.

 One other question, could you provide more information
about your simulation setup? For example,  how many
time points are in your sample and hold simulation and
what type of simulation platform you are using. The
simulation times you are quoting are times are unusually
long.  Also what machine are you using? Actually, I have
run transient Monte Carlo analysis runs on S/H circuits
and those simulations took less than a day[20 iterations].

                                                 Best Regards,

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



Posts: 780

Re: Simulating high-resolution sample-and-hold
Reply #4 - Dec 24th, 2005, 11:50pm
 
Hi Sheldon,

This is my setup:

Solaris 9, Sunblade 1000.

Flipover S&H with gain-boosted opamp, boostrapped switches.
reltol=1e-6,vabstol=1e-7,iabstol=1e-14. Held output strobed at the end
of hold period for a total of 2^14 points.

I did use PSS/PAC but I thought it was a small-signal analysis. I used it to estimate the roll-off of the S&H SFDR in subsampling operation (including sidebands). I also measured the track-mode linearity by just keeping the sampling switches always ON and a short simulation is usually enough for this.

However, I am not sure if tracking nonlinearity, charge-injection etc. are considered if I do a PSS/PAC combination. I was not aware that PAC could support 2 large signals (needed for THD simulation). I think I will read up the SpectreRF analyses doc.

If you have some more suggestions, I would greatly appreciate these.

Regards
Vivek
Back to top
 
 
View Profile   IP Logged
huber
Community Member
***
Offline

GO BEARS!

Posts: 45
Los Angeles
Re: Simulating high-resolution sample-and-hold
Reply #5 - Jan 10th, 2006, 9:23pm
 
Hi Vivkr,

When you say your simulation has "a total of 2^14 points", do you mean you are simulating 2^14 clock cycles and taking a 2^14 point DFT?  If so, why?  I am designing a T/H that sounds very similar to yours (flipover, gain-boosted opamp, bootstrapped switches, etc) and I am able to simulate the distortion performance using only a 16 point DFT.  I don't see why you would need so many points.  I am also using much looser tolerances, but that really depends on what SFDR you want to measure (I'm designing for 80dB).

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



Posts: 780

Re: Simulating high-resolution sample-and-hold
Reply #6 - Jan 11th, 2006, 5:31am
 
Hi Dan,

You are right about my setup. Perhaps, I was wrong in taking so many points. Having never simulated
a high-performance S&H, I overestimated the number of points required. I think I could do with
256 points.

However, I was not aware that one could get good results even with a 16-point DFT. How do you get
enough frequency resolution to see the harmonics of your signal with just 16 points?

I am simulating for an SFDR ~ 100 dB.

Thanks
Vivek
Back to top
 
 
View Profile   IP Logged
huber
Community Member
***
Offline

GO BEARS!

Posts: 45
Los Angeles
Re: Simulating high-resolution sample-and-hold
Reply #7 - Jan 12th, 2006, 11:58am
 
Hi vivkr,

If you set up the simulation properly then frequency resolution is unimportant.  Let T be the clock period.  I simulate for 16*T using an input frequency of 7/(16*T), so in the DFT plot the signal is in the 7th bin and the 3rd harmonic is in the 5th bin.  If you are worried about the 3rd harmonic being too high in frequency and getting attenuated in the tracking network (not an issue for me; my tracking bandwidth is very high) then you would want to do a two-tone test.  In that case you would probablly want to use at least 32 points with inputs at 15/(32*T) and 14/(32*T) to keep the signals and intermods clustered together.

100 dB SFDR is very difficult to simulate.  I have no personal experience with this, but another student here has been working on this for a while.  One problem he ran into was using vpulse sources for clocks.  The discontinuous derivative of a vpulse source causes spectre to revert from 2nd order integration methods (trap or gear2) to first order (backward Euler, I think) near the disconinuity, which hurts accuracy.  This is a very small error that I don't notice at 80 dB SFDR, but at 100 dB SFDR it might be a problem.  You can get around this by deriving your clocks from a vsin source.  I have a VerilogA module that does this and still allows you to set the rise/fall times; let me know if you want it.  Of course you can always just sharpen-up a sinwave with inverters.  Again, this is a very small error so don't worry about it unless you've already tried everything else.

BTW, for 80 dB SFDR I am using reltol=1e-4, vabstol=1e-5, and iabstol=1e-11.  I'm not sure what you would need for 100 dB.

One more thing: any parts of your T/H that settle slowly over many clock cyles (some switched-capacitor CMFB circuits do this) will kill your SFDR if they are not completely settled.  A pss analysis will avoid this problem by guaranteeing that the solution is periodic, but it takes longer to simulate and won't work with VerilogA modules that have hidden state.  The alternative is to just let the tran simulation run long enough to settle before you measure the SFDR; for me this takes ~32 clock cycles because of my peculiar opamp topology, so I have to simulate for 48 cycles total.

Good luck!
-Dan
Back to top
 
 
View Profile   IP Logged
huber
Community Member
***
Offline

GO BEARS!

Posts: 45
Los Angeles
Re: Simulating high-resolution sample-and-hold
Reply #8 - Jan 12th, 2006, 1:10pm
 
Just to clarify, by "set up the simulation properly" I mean that the circuit stimulus must have a whole number of cycles in the DFT window.  So if you take an N-point DFT you can only use frequencies of M/(N*T), where M is an integer between 1 and N.  If this is the case, then there is no windowing error and all energy falls exactly into the DFT bins.
-Dan
Back to top
 
 
View Profile   IP Logged
vivkr
Community Fellow
*****
Offline



Posts: 780

Re: Simulating high-resolution sample-and-hold
Reply #9 - Jan 14th, 2006, 12:56am
 
Hi Dan,

Thanks very much for all the inputs. I think I can save considerable time now. Also,
I think the new Cadence versions allow the user the option of choosing sinusoidal-like
transition phase for vpulse. Perhaps, this will solve the problem caused by the reversion
to backward Euler. However, I think it has not affected the accuracy of my simulations
in the past. Perhaps, it was because of the overtight tolerances in my setup.

Thanks and Best Regards
Vivek

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.