Some Considerations for Spectral Analysis of Delta-Sigma Data Converters

Embed Size (px)

Citation preview

  • 8/10/2019 Some Considerations for Spectral Analysis of Delta-Sigma Data Converters

    1/6

    AbstractSpectral analysis with sinusoid input is a common

    way to evaluate data converters, and is often used to specify the

    signal-to-noise ratio, the harmonic distortion, and the effective

    number of bits. If the input is arbitrarily sampled, the measured

    output must be windowed to reduce DFT leakage effects that

    obscure the spectrum. Alternatively, often preferably, coherent

    sampling can be used to eliminate these leakage effects, hence

    obliterating the need for windowing. In converters based on

    delta-sigma modulation however, the noise shaping loop may

    cause leakage effects to impair the measurement, even if input

    leakage is eliminated. This paper demonstrates and explains this

    effect, showing why coherent sampling does not guarantee useful

    results when analyzing delta-sigma converters.

    Index TermsData Conversion, Analog-to-Digital, Digital-to

    Analog, Delta-Sigma, Sigma-Delta, Spectral Analysis, DFT

    I. INTRODUCTION

    IGH resolution data converters are increasingly being

    based on delta-sigma modulation (DSM). Historicallymostly used for audio; DSM conversion has lately gained

    foothold in higher bandwidth applications due to the increased

    speed of modern integrated circuit (IC) processes. This paper

    does not give a comprehensive review of the DSM and

    assumes some beforehand knowledge. If confused the reader is

    recommended to look in e.g. Schreiers textbook [1].

    DSM conversion trades speed for resolution by combining

    oversampling and loop filtering around the quantizer, pushing

    the quantization noise out of the signal band. As such very

    coarse quantization can be used while maintaining high

    effective resolution. The input-output relation is given by:

    Manuscript received July 29, 2008. This work was supported in part by the

    Norwegian Research Council under Grant 162101 SPECK.

    Ivar Lkken and Anders Vinje are with the Norwegian University of

    Science and Technology, Department of Electronics and

    Telecommunications, Trondheim, NO-7491, Norway (e-mail:

    [email protected], [email protected]).

    ( ) ( )

    ( ) ( )

    ( ) ( )

    ( ) ( ) ( ) ( )

    0

    1 1

    1

    1 1

    q

    q

    L zQ z X z E z

    L z L z

    STF z X z NTF z E z

    = +

    = +

    (1)

    STF and NTF are abbreviations for Signal Transfer

    Function and Noise Transfer Function respectively, Eq is the

    quantization error. Since having no delay-free loops is a

    condition for realizability, it is given that l1[n]|n=0=0 or

    ntf[n]|n=0=1. Thus the quantization error cannot be reduced in

    total power, but given an appropriate loop filter it can be

    shaped so that very little of it falls in-band.L0is chosen so that

    the in-band STF approximates or equals unity.

    II. THE DFT,LEAKAGE AND WINDOWING

    The spectrum of a discrete-time sequence is defined through

    a special case of the z-transform, the Discrete Time Fourier

    Transform (DTFT):

    { } [ ]( )def

    n

    n

    DT FT x X x n e

    =

    = !i (2)

    To be computable the DTFT has to be of finite length so the

    spectrum must be sampled onto a discrete frequency variable

    and out of a finite length sequence. If being of length Nwith

    equidistant sampling we get (3) which is the definition of the

    N-point finite DTFT or Discrete Fourier Transform:

    { } [ ]21

    0

    ( ) , 0,1, , 1knNdef

    NN

    n

    DFT x X k x n e k N

    =

    = = !i

    ! (3)

    In cases where the available signal sequence is shorter than

    N it can be zero-padded to obtain an N-point DFT [2]. When

    implemented for simulation, measurement, or other purposes,

    the DFT is in most cases computed using a Fast Fourier

    Transform (FFT) algorithm [3]. FFT algorithms often require

    Nto be a power of two which if necessary can be ensured with

    zero-padding. Note that zero-padding does not provide any

    additional information about the spectrum.

    The DFT will have incongruities compared to the DTFT of

    a general function. If the input signal xin[n] is a function

    defined in n"-!,!#, picking a limited sample set of length Nto obtain (3) equals the multiplication of this function with a

    rectangular window w[n] of lengthN.

    Some Considerations for Spectral Analysis of

    Delta-Sigma Data Converters

    Ivar Lkken, Anders Vinje

    H

    Fig.1. Delta-Sigma Modulator

    ISAST Transactions on Electronics and Signal Processing, No. 2, Vol. 3, 2008

    Ivar Lkken and Anders Vinje: Some Considerations for Spectral Analysis of Delta-Sigma Data Converters19

  • 8/10/2019 Some Considerations for Spectral Analysis of Delta-Sigma Data Converters

    2/6

    Shown in fig.2, this can generally be written as:

    [ ] [ ] [ ] [ ]1 , 0 1

    ,0 , otherwise

    def

    in

    n Nx n x n w n w n

    $= = %

    & (4)

    Since time-domain multiplication as known is the dual of

    spectral convolution, the equivalent DTFT becomes:

    ( ) ( ) ( ) ( )( 1)

    2

    sin2

    ,

    sin2

    N

    in

    N

    X X W W e

    ' () *+ ,

    = =' () *+ ,

    i (5)

    If the input is a sinusoid xin[n]=sin(!xn), the spectrum

    should be zero everywhere except !=!x. But because a finite

    length sample set of this function is spectrally convolved with

    a window, the resulting spectrum is nonzero also elsewhere.

    This is known as spectral leakage. The spectral leakage is

    sampled in the DFT causing leakage effects that obscure the

    simulated spectrum. Figure 3 illustrates leakage effects for a

    DFT whereN=64. This DFT is not very usable.This situation can be improved by multiplying the signal

    with a dedicated window function that is not rectangular,

    known as windowing. The leakage effect can be understood as

    an edge effect in that it is the sharp edges that cause the lobes

    in the spectrum of the rectangular window, and hence it is the

    sampled endpoint discontinuities of the convolution product

    (see fig.2) that give rise to leakage effects. A tapered window

    has smaller spectral side lobes and a broader main lobe. It

    apodizes the signal by reducing the sharp edge discontinuities,

    and thus makes the leakage more narrowband. Windowing is

    conceptually illustrated in fig.4.

    Figure 5 shows the spectrum of a sinewave convolved with a

    hann window [4], perhaps the most popular window function.It is seen how side lobe leakage is suppressed at the cost of a

    wider main lobe. The main lobe width limits the frequency

    resolution of the DFT since it obscures a given frequency

    range, whereas the side lobe height limits the dynamic range

    since side lobes obscure spectral information below a given

    amplitude. Many different window functions with different

    properties exist [5], and in general the choice of window will

    be a trade off between frequency resolution and dynamic

    range. A longer window obviously improves this tradeoff, but

    what window is best depends on the application of the DFT.

    Fig.4. Acquisition of limited length sequence with windowingFig.2. Acquisition of limited length sequence

    Fig.5. Sinewave convolved with hann windowFig.3. Spectral leakage in the sampled DFT

    ISAST Transactions on Electronics and Signal Processing, No. 2, Vol. 3, 2008

    Ivar Lkken and Anders Vinje: Some Considerations for Spectral Analysis of Delta-Sigma Data Converters20

  • 8/10/2019 Some Considerations for Spectral Analysis of Delta-Sigma Data Converters

    3/6

    III. COHERENT SAMPLING AND ELIMINATION OF DFT

    LEAKAGE EFFECTS

    Even though proper windowing can improve the usefulness

    of the DFT a lot, the resolution of the sampled spectrum is still

    limited. For good performance estimation of high accuracy

    circuits, like hi-res data converters, the DFT has to be long

    also when windowing. Fortunately leakage effects in the DFT

    of a sinusoid can be eliminated with coherent sampling[6].

    Coherent sampling ensures that the sinewave has an integer

    number of periods within the acquisition. A sequence of length

    N contains exactly K periods of a sinusoid function

    xin[n]=sin(!xn) if its angular frequency is:

    2x

    K

    N

    = (6)

    Setting Kan integer of choice, (6) can be solved for !x. The

    physical frequencyfxfor a given sampling frequencyfscan be

    found from the angular frequency definition, !=2"f/fs.

    x s

    Kf f

    N= (7)

    When periodic in N/K the waveform is also periodic in N,

    meaning that the edges of the rectangular window do not cause

    endpoint discontinuities, as illustrated in fig.6. This in turn

    means there is no side lobe energy in the correspondingly

    sampled spectrum, which can be shown by correlating the

    sinewave with the basis functions of the DFT (3). For DFT

    sample k=Kthe correlation between the basis function and thesignal is exactly one and otherwise it is zero.

    As an example: Assume an ADC designer wants to simulate

    the performance for 1MHz input and 100MHz sampling rate,

    using a DFT of lengthN=214

    . The closest integer is K=164 and

    the closest rational frequencies for coherent sampling are then

    fx=1.000.072Hz and fs=99.690.104Hz. An illustration with a

    much shorter DFT ofN=64 to make its samples clearly visible

    is shown in fig.7. One can see how leakage is not sampled in

    the DFT and leakage effects are hence eliminated.

    To maximize the probability of detecting local integral non-

    linearities (INL) in the converter and see them as distortion, it

    has been recommended to useprime sampling [7]. This simply

    means coherent sampling where Kis a prime number. Then amaximum number of converter codes are used by the sequence

    since its periodicity is irreducible.

    IV. COHERENT SAMPLING AND DELTA SIGMA MODULATORS

    Having explained coherent sampling as an alternative to

    windowing we will proceed to investigate the special case of

    delta-sigma modulators. Unfortunately a sinewave analysis of

    a DSM converter can be impaired by leakage effects even if

    coherent sampling is used for the input signal. Spectral

    leakage from the modulators powerful out-of-band noise may

    cause leakage effects in the DFT, which could lead a data

    converter designer relying on coherent sampling to think there

    are errors in the circuit or simulation setup. Additionally a very

    small change of input amplitude or frequency can make these

    artifacts vanish and they may appear in a seemingly randomway. This could cause confusion if the circuit designer is not

    aware of the issues to be presented. To the authors knowledge

    these considerations of DFT analysis and coherent sampling

    specifically with regards to DSM converters, have not been

    seen in any previous literature.

    If we consider again the DSM of fig.1; its output signal Q,

    which is what we want to analyze, consists of two components

    as seen in (1). One is the signal component Xweighted by the

    STF, the other is the quantization error Eq weighted by the

    NTF, or in other words the shaped quantization noise.

    Fig.7 Elimination of leakage effects in DFT with coherent sampling

    Fig.6. Acquisition with coherent sampling Fig.8. Output amplitude spectrum of DSM designed for 16 times OSR.

    ISAST Transactions on Electronics and Signal Processing, No. 2, Vol. 3, 2008

    Ivar Lkken and Anders Vinje: Some Considerations for Spectral Analysis of Delta-Sigma Data Converters21

  • 8/10/2019 Some Considerations for Spectral Analysis of Delta-Sigma Data Converters

    4/6

    For convenience the STF is assumed to be unity in the signal

    band. Even though the quantization error is a deterministic

    function of the quantizer input, it is normal to approximate it

    as an independent white noise source [8] to enable relativelystraightforward loop filter design. The amplitude response of

    the DTFT will look something like fig.8, showing the output of

    a DSM designed for 16 times oversampling (OSR). It has a

    third order loop filter and a four bit quantizer.

    It is desirable to analyze the performance, in particular the

    signal-to-noise ratio (SNR) and distortion in the baseband. In

    the baseband the shaped quantization noise is very small and

    the DFT will need high dynamic range since the DSM has high

    dynamic range. In addition the baseband is only a small part of

    the Nyquist range meaning the frequency resolution also needs

    to be high. To just capture the output and do a DFT is

    pointless; fig.9 shows the simulated spectrum withN=214

    . It is

    completely corrupted by signal leakage, for decent resolution a

    rectangular window would have to be enormously long. With

    hann windowing the situation is a lot better, but from fig.10 it

    is still seen that leakage to some extent obscures baseband

    information. For this combination of N, OSR and SNR the

    DFT is probably useful for error analysis, but in e.g. an audio

    ADC the resolution will be much higher and with higher OSR

    fewer DFT samples will be inside the baseband. For low-level

    simulations, in particular transistor level, N=214

    is also high

    and simulation time may mandate a shorter DFT.

    Considerations for DFT analysis of ADCs using short

    windows has been explored in previous publications [9]-[10].

    For simulations on a regular Nyquist ADC, these window

    issues need not be a concern since one can use coherent

    sampling and eliminate leakage effects, allowing for shorter

    simulations and higher resolution. However in a DSM theremight be problems even if doing so. Figure 11 shows a

    simulation for the same conditions as fig.10, but with the input

    frequency moved to the nearest coherent sampling value. As

    seen signal leakage is gone, but the simulation is still corrupted

    by another leakage effect causing a white in-band error.

    To explain this we first revisit the edge effect: In a Nyquist

    converter the quantizer floors or rounds the input signal,

    meaning that if an input sinewave is periodic in N, the

    quantizedoutput is also periodic inN. Coherent sampling thus

    works fine. In a delta-sigma modulator on the other hand, the

    quantization error varies quickly and seemingly randomly

    around the signal. The error is of course not really random

    since the quantizer is a deterministic nonlinear function, and it

    often has signal correlation artifacts such as limit cycles and

    idle tones [11]. But since nonlinear feedback loops are

    extremely difficult or impossible to predict analytically the

    random quantizer model is used for most practical purposes.

    Attributing it to the random quantizer assumption or not, the

    acquisition of a limited length sample set from a DSM may

    have an edge error even if the input is coherently sampled.

    Figure 12 shows such an occurrence: The input is periodic in

    N=100 but due to an additional quantization error the DSM

    output is not. Observe that q[0]=0 whereas q[N]=-1, meaning

    that the output is clearly not periodic inN.

    Fig.12. Endpoint error at DSM output

    Fig.11. Simulated DFT of DSM output, coherent sampling,N=214Fig.9. Simulated DFT of DSM output, no windowing,N=214

    Fig.10. Simulated DFT of DSM output, hann windowing,N=214

    ISAST Transactions on Electronics and Signal Processing, No. 2, Vol. 3, 2008

    Ivar Lkken and Anders Vinje: Some Considerations for Spectral Analysis of Delta-Sigma Data Converters22

  • 8/10/2019 Some Considerations for Spectral Analysis of Delta-Sigma Data Converters

    5/6

    That q[N] is nonzero even thoughx[N] is zero is as noted not

    a result of random quantization but of the DSM having

    memory. If unity STF, the inversez-transform of (1) yields:

    [ ] [ ] [ ] [ ]0

    q

    k

    q n x n ntf k e n k

    =

    = + ! (8)

    This means that q[N] with coherent sampling (x[N]=0 and

    eq[N]=0) will be:

    [ ] [ ] [ ]1

    q

    k

    q N ntf k e N k

    =

    = ! (9)

    The DSM may have many samples memory meaning more of

    the shaping response is lost in the acquisition than just the

    zeroing of q[N]. This can be revealed by zero-padding the

    input (x[n]|n#N=0 and eq[n]|n#N=0) and observe the outputovershoot as in fig.13. It is seen that the output takes a while to

    settle; meaning quite a lot of the NTF response is cut off by

    rectangular windowing. Denoting it the window error ew:

    [ ] [ ] [ ]1

    w q

    k n

    e n ntf k e N n k

    = +

    = + ! (10)

    Extending N to 214

    again, fig.14 shows the same DFT as

    fig.11 together with the spectrum of the window error, or

    overshoot beyondNfound by zero-padding the input.

    It is seen that the window error or loss of filter response

    samples, indeed isthe leakage effect impairing the DFT.

    Since the quantization error sequence superimposed on the

    input is random and generally cant be derived analytically,

    the overshoot cannot be known a priori. Assuming the

    quantization error eqin (10) is random can enable a prediction:

    1 2 3

    2 3

    3

    [1] [0]

    0 [2] [1]

    0 0 [3] [2]

    q q q w

    q q w

    q w

    e e e ntf e

    e e ntf e

    e ntf e

    - . - . - ./ 0 / 0 / 0/ 0 / 0 / 0 =/ 0 / 0 / 0/ 0 / 0 / 01 2 1 2 1 2

    !

    !

    !

    " " " # " "

    (11)

    Where eqis a random variable with eq=0 and $eq2=1/12 [8].

    Note that this is just a crude estimate. Simulations reveal that

    the error will change if the input is changed, for instance some

    input signals will result in the modulator not giving overshoot

    at all in which case the DFT spectrum turns out correct. A

    slight change of the input amplitude may cause the DSM to

    take a completely different trajectory in its loop state space

    (see e.g. [1], [11] or [12] for details), and since it is not

    possible to know what error will occur it is thus recommended

    as a safeguard to use both coherent sampling and windowing

    when doing spectral analysis of a DSM converter.

    The filter overshoot dies away quite rapidly, meaning that

    the whole window error is near the end values of a periodic

    extension of the DFT (although not merely an instantaneous

    discontinuity as for a non-coherently sampled sinewave). In

    other words the noise leakage is very effectively suppressed by

    windowing. Figure 15 shows the spectral amplitude response

    of the exact same output sequence as fig.11, but now

    multiplied with a hann-window before doing the DFT. Then

    the noise leakage is suppressed by the apodization that the

    tapered window performs on the sequence, to the point of

    being invisible since it is far below the in-band quantization

    noise. The spectrum then as expected looks correct.

    V. CONCLUSION

    In spectral analysis of data converters, leakage effects in the

    DFT may obscure the spectrum and mask the errors it is

    desired for the simulation or measurement to reveal. This must

    Fig.15. Simulated DFT of the same output sequence as fig.11, but now

    hann-windowed

    Fig.14. DSM output and filter overshoot spectra

    Fig.13. Output overshoot caused by DSM memory

    ISAST Transactions on Electronics and Signal Processing, No. 2, Vol. 3, 2008

    Ivar Lkken and Anders Vinje: Some Considerations for Spectral Analysis of Delta-Sigma Data Converters23

  • 8/10/2019 Some Considerations for Spectral Analysis of Delta-Sigma Data Converters

    6/6

    be alleviated with windowing or coherent sampling. Since a

    windowed DFT in high resolution applications still has to be

    long to give reliable results, coherent sampling has become the

    preferred method in ADC design. This is especially the case

    for low-level analog or mixed-mode circuit simulations wherethe sequence length must be very limited to prevent excessive

    simulation time.

    In delta-sigma based data converters, which are becoming

    increasingly popular for a variety of applications, a DFT may

    exhibit leakage effects that compromise the simulation results

    even if coherent sampling is used. The shaped DSM

    quantization noise has low baseband power but high total

    power, and abruptly cutting off the loop output before its

    response has died away may cause a leakage of shaped noise

    into the baseband that obscures the actual performance.

    As a safeguard it is therefore strongly recommended to use

    both coherent sampling to prevent signal leakage, and

    windowing to prevent quantization noise leakage, when doing

    DFT-analysis of delta-sigma data converters.

    REFERENCES

    [1] R. Schreier, Understanding Delta-Sigma Data Converters, Wiley &

    Sons, IEEE Press, ISBN 0-471-46585-2, 2005.

    [2] A. V. Oppenheim, R. W. Schafer, Discrete-Time Signal Processing,

    Second Edition, Prentice Hall Inc., ISBN 0-13-754920-2.

    [3] P. Duhamel, M. Vetterli, Fast Fourier Transforms: A Tutorial Review

    and State of the Art, J. Signal Processing, vol.19, no.4, pp.259-299,

    Apr. 1990.

    [4] R. B. Blackman and J. W. Tukey: "Particular Pairs of Windows." In The

    Measurement of Power Spectra, From the Point of View of

    Communications Engineering.New York: Dover, 1959.

    [5] F. J. Harris, On the use of Windows for Harmonic Analysis with the

    Discrete Fourier Transform, Proc. of the IEEE, vol.66, no.1, pp. 51-83,Jan. 1978.

    [6]

    Maxim Application Note APP1040, Coherent Sampling vs. Window

    Sampling, http://pdfserv.maxim-ic.com/en/an/AN1040.pdf, Mar. 2002.

    [7]

    J. Blair, Histogram Measurement of ADC Nonlinearities Using Sine

    Waves, IEEE Trans. Instrumentation and Measurement, vol.43,

    pp.373-383, June 1994.

    [8] R. M. Gray, Quantization Noise Spectra,IEEE Trans. Inform. Theory,

    vol.36, Nov. 1990.

    [9] O. M. Solomon, The use of DFT windows in signal-to-noise ratio and

    harmonic distortion computations, IEEE Trans. Instrum. Meas.,

    vol.43, pp. 194-199, April1994.

    [10] P. Carbone, E. Nunzi and D. Petri, Windows for ADC dynamic testing

    via frequency-domain analysis,IEEE Trans. Instrum. Meas., vol.50,

    pp. 1571-1575, December 2001.

    [11] J.Reiss, Understanding Sigma-Delta Modulation: The Solved and

    Unsolved Issues,J. Audio Eng. Soc., vol.56, no.1/2, pp.49-64, January

    2008[12] H.Wang, A Study of Sigma Delta Modulations as Dynamical

    Systems, PhD Thesis, Colombia University, New York, AAT 9333879,

    1993

    Ivar Lkkenwas born in Lillehammer, Norway, in 1979. He received a B.Sc.

    degree in electrical engineering from Sr- Trndelag University College,

    Trondheim, Norway, in 2002 and an M.Sc degree in electrical engineering

    from the Norwegian University of Science and Technology, Trondheim, in

    2004. He is presently with the Circuit and Systems Group at the Norwegian

    University of Science and Technology, working toward a Ph.D. degree on

    high-resolution audio digital-to-analog converters. His research interests

    include audio data converters and audio signal processing.

    Anders Vinje was born in Trondheim, Norway, in 1979. He received an

    M.Sc. degree in electrical engineering from the Norwegian University of

    Science and Technology, Trondheim, Norway, in 2004. He is presently with

    the Circuit and Systems Group at the Norwegian University of Science and

    Technology, working toward a Ph.D. degree on high-speed, high-resolution

    analog-to-digital converters. His main research interests include analog-to-digital converters and related signal processing.

    ISAST Transactions on Electronics and Signal Processing, No. 2, Vol. 3, 2008

    Ivar Lkken and Anders Vinje: Some Considerations for Spectral Analysis of Delta-Sigma Data Converters24