A Methodology for the Offset-Simulation of Comparators

Embed Size (px)

DESCRIPTION

Comparators Offset Simulation

Citation preview

  • The Designers Guide Community downloaded from www.designers-guide.orgVersion 1, October 1, 2006 A methodology for determining the input referred offset voltage of comparators is pre-sented. This in general is difficult as the output of a comparator is discrete valued. Themethod relies on a Monte-Carlo-Simulation with certain comparator input values andsome postprocessing of the comparator output data. The comparator is always operatedin its intended environment, there is no modification of the comparator itself nor someunusual stimuli required. There is also no known restriction for the type of comparatorsto be analyzed.

    A Methodology for the Offset-Simulation of ComparatorsAchim GraupnerZMD AG, DresdenCopyright 2006, Achim Graupner All Rights Reserved 1 of 7

    Last updated on November 2, 2006. You can find the most recent version at www.designers-guide.org. Contact the author via e-mail at [email protected].

    Permission to make copies, either paper or electronic, of this work for personal or classroomuse is granted without fee provided that the copies are not made or distributed for profit orcommercial advantage and that the copies are complete and unmodified. To distribute other-wise, to publish, to post on servers, or to distribute to lists, requires prior written permission.

  • A Methodology for the Offset-Simulation of Comparators Introduction1 IntroductionComparators are a frequently used building block in analog circuit design. One of itsmost important properties is its input referred offset. For the most simple implementa-tion, an amplifier with a high gain, this is a simple task that can be carried out with thehelp of a feedback network and some Monte-Carlo simulation.

    However, most circuit implementations of comparators are much more complicated.Comparators often employ some hysteresis or some clever clocking scheme to reducepower dissipation or offset. In those cases however the determination of the inputreferred offset is no longer simple at all. In the latter case DC simulations are no longersufficiently as the operation depends on the circuits transient behavior. In the case ofhysteresis a clever DC analysis has to be carried out because the circuit provides multi-ple operating points.

    An method for determining the offset is described in [1]. Its basic idea is to build a first-order sigma-delta-modulator comprising the comparator and an ideal integrator. Whensteady state is reached, i.e. the high and low times of the comparator output are equal,then the mean input value equals the sum of the comparators threshold value plus thecomparators offset. The method is quite simple but to achieve a meaningful accuracy thesimulation time has to be considerably long until sufficient settlement. If the comparatoremploys a hysteresis then this method does not compute the two switching levels andtheir offset but a mean threshold value.

    This short paper presents a very simple methodology to determine the offset of arbitrarycomparators with the help of transient simulations. It requires a very simple testbenchand some simple postprocessing only. In the following the method is introduced andillustrated with the help of an example.

    2 Simulation SetupFor the proposed method a testbench of the comparators with is normal surroundings assupply and clock is used. Additionally a dedicated input has to be provided. The inputvalue of the comparator has to be ladder-shaped, see Figure 1. This signal can be gener-ated with a triangular shaped pulse followed by some ideal sample-an-hold or with adedicated block in an analog hardware description language (AHDL). For each inputvalue the comparator is activated and its output value is stored. For an ideal com-parator for all input values below the threshold value the output value is 0 forall values greater it is 1. This setup is shown in Figure 1. Taking device parameter mis-match into account this behavior might randomly change. This means the comparatoroutput might be 0 even if or may be 1 although .

    The behavior of the comparator eventually depends on the actual device parameters,especially their matching. This effect can be modeled with an error signal with isadded to the comparators input with all device parameters of the comparator at theirnominal value, see Figure 2.

    To evaluate the influence of the random device parameter variation Monte-Carlo-analy-sis is used. The result of each Monte-Carlo-iteration is collected. Now for all Monte-Carlo-samples for each input value the probability

    xi yixi xth yi

    xi xth> xi xth( )=

    niN---- zi= =

    N nixi

    xoffxoff

    xoff

    zi

    vi 1 zi( )=

    x( ) 12----------

    t22

    ------- exp td

    x

    =12--- 1 erf x

    2------- +=3 of 7The Designers Guide Communitywww.designers-guide.org

  • A Methodology for the Offset-Simulation of Comparators ExampleNow a first order polynomial is fitted through the vs. plot. From thepolynomials coefficients the mean value and the standard deviation of the distributioncan be calculated:

    (4)

    This method is illustrated in the following example.

    3 ExampleThe Figure 3 shows the functional principle of a non-clocked comparator incorporatinghysteresis and a output latch.

    The result of a 700-runs Monte-Carlo simulation is shown in Figure 4. At the input aramp with 1mV steps is applied. For each step of the ramp a comparison cycle is carriedout and the comparators result is stored (in our case into a file with means of an AHDL-block). In a subsequent postprocessing for each ramp value the number of comparatoroutput 1 is counted and normalized to the number of runs.

    It can seen both the hysteresis of the comparator as well as its sensitivity to deviceparameter mismatch. For the rising slope and an input voltage of 1.64V in about 60% ofall simulations the comparator output had an output of 1, in the rest it remained 0.

    The simulation data of the rising slope have been plotted in a normal distribution plot,see Figure 5. It is seen that the result is to a good approximation a straight line. Hence,the offset of the comparator is normal distributed and its mean value as well its standarddeviation can be calculated using (4).When normalizing the y-axis to a cumulative normal distribution then the statisticalproperties of the comparators threshold value can be easily read out from the diagram(16%, 50% or 84%-values respectively), see Figure 6. In this case and .

    In order to obtain reliable results the values for the have to be selected carefully. The

    FIGURE 3 Simple comparator with hysteresis and output register.

    z p1x p2+= xi zi

    xoffp2

    p1-------- xth=

    xoff 1p1-----=

    D Qxin,n xin,y

    y

    clk

    xoff xth+( ) 1.64=voff 0.018=xi4 of 7 The Designers Guide Communitywww.designers-guide.org

    difference between two values should be less than the standard deviation of the offset.

  • Example A Methodology for the Offset-Simulation of ComparatorsFIGURE 4 Result of a Monte-Carlo-simulation (cumulative histogram).

    FIGURE 5 Normal probability plot.

    FIGURE 6 Normalized cumulative frequency plot.

    niN----

    xi

    1.5 1.55 1.6 1.65 1.70

    0.10.20.30.40.50.60.70.80.9

    1

    zi

    xi

    1.6 1.61 1.62 1.63 1.64 1.65 1.66 1.67 1.68 1.69-2.5

    -2-1.5

    -1-0.5

    00.5

    11.5

    22.5

    niN----

    xi1.56 1.58 1.6 1.62 1.64 1.66 1.68 1.7 1.72

    125

    1016 20

    304050607080

    84 909598995 of 7The Designers Guide Communitywww.designers-guide.org

  • A Methodology for the Offset-Simulation of Comparators SummaryAlso the minimum and maximum values of should always include the respectivecomparator threshold, so the interval should span several times the standard deviationaround the comparator threshold. Those numbers have to be roughly guessed beforestarting the simulation.

    4 SummaryA very simple methodology to determine the offset of arbitrary comparators with thehelp of transient simulations has been presented. It requires a very simple testbench andsome simple postprocessing only. The comparator can be simulated in its intended oper-ating regime.

    4.1 If You Have QuestionsIf you have questions about what you have just read, feel free to post them on the Forumsection of The Designers Guide Community website. Do so by going to www.designers-guide.org/Forum.

    AppendixThe algorithm has been implemented in the Matlab/Octave code shown in Listing 1.

    LISTING 1 Matlab code that implements the post-analysis portion of the algorithm.% it is assumed that the simulation results are provided % in the matrix "ydata" and the array "xdata"% (1) ni/N, Figure 2y = sum(ydata)/length(ydata);plot(xdata, y)% (2) inverse erf for rising slope only% y(1:21) is this case contains the data% for the rising slopev = sqrt(2)erfinv(y(1:21)21);% select values within 2.5 ... 2.5 sigmai=find(v>2.5 & v

  • References A Methodology for the Offset-Simulation of ComparatorsReferences[1] T.W. Matthews and P.L. Heedley. A simulation method for accurately determining

    DC and dynamic offsets in comparators. 48th Midwest Symposium on Circuits andSystems, pp. 1815-1818, vol. 2, Aug. 2005.7 of 7The Designers Guide Communitywww.designers-guide.org

    1 Introduction2 Simulation Setup3 Example4 Summary4.1 If You Have Questions

    AppendixReferences

    /ColorImageDict > /JPEG2000ColorACSImageDict > /JPEG2000ColorImageDict > /AntiAliasGrayImages false /CropGrayImages true /GrayImageMinResolution 300 /GrayImageMinResolutionPolicy /OK /DownsampleGrayImages true /GrayImageDownsampleType /Bicubic /GrayImageResolution 300 /GrayImageDepth -1 /GrayImageMinDownsampleDepth 2 /GrayImageDownsampleThreshold 1.50000 /EncodeGrayImages true /GrayImageFilter /DCTEncode /AutoFilterGrayImages true /GrayImageAutoFilterStrategy /JPEG /GrayACSImageDict > /GrayImageDict > /JPEG2000GrayACSImageDict > /JPEG2000GrayImageDict > /AntiAliasMonoImages false /CropMonoImages true /MonoImageMinResolution 1200 /MonoImageMinResolutionPolicy /OK /DownsampleMonoImages true /MonoImageDownsampleType /Bicubic /MonoImageResolution 1200 /MonoImageDepth -1 /MonoImageDownsampleThreshold 1.50000 /EncodeMonoImages true /MonoImageFilter /CCITTFaxEncode /MonoImageDict > /AllowPSXObjects false /CheckCompliance [ /None ] /PDFX1aCheck false /PDFX3Check false /PDFXCompliantPDFOnly false /PDFXNoTrimBoxError true /PDFXTrimBoxToMediaBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ] /PDFXSetBleedBoxToMediaBox true /PDFXBleedBoxToTrimBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ] /PDFXOutputIntentProfile () /PDFXOutputConditionIdentifier () /PDFXOutputCondition () /PDFXRegistryName () /PDFXTrapped /False

    /Description > /Namespace [ (Adobe) (Common) (1.0) ] /OtherNamespaces [ > /FormElements false /GenerateStructure false /IncludeBookmarks false /IncludeHyperlinks false /IncludeInteractive false /IncludeLayers false /IncludeProfiles false /MultimediaHandling /UseObjectSettings /Namespace [ (Adobe) (CreativeSuite) (2.0) ] /PDFXOutputIntentProfileSelector /DocumentCMYK /PreserveEditing true /UntaggedCMYKHandling /LeaveUntagged /UntaggedRGBHandling /UseDocumentProfile /UseDocumentBleed false >> ]>> setdistillerparams> setpagedevice