You are on page 1of 6

19

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 Converters

Some Considerations for Spectral Analysis of


Delta-Sigma Data Converters
Ivar Lkken, Anders Vinje

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). Historically
mostly 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:

Fig.1. Delta-Sigma Modulator

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:
ivar.loekken@iet.ntnu.no, anders.vinje@iet.ntnu.no).

Q (z) =

L0 ( z )
1
X (z)+
Eq ( z )
1 L1 ( z )
1 L1 ( z )

(1)

= STF ( z ) X ( z ) + NTF ( z ) E q ( z )

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. L0 is 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

DTFT { x} X ( ) =

x [n ] e

i n

(2)

n =

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 N with
equidistant sampling we get (3) which is the definition of the
N-point finite DTFT or Discrete Fourier Transform:
def

DFTN { x} X ( k ) =

N 1

x [n ] e

2 kn
N

, k = 0,1, K , N 1 (3)

n=0

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
N to 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 N
to obtain (3) equals the multiplication of this function with a
rectangular window w[n] of length N.

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 Converters

20

Fig.4. Acquisition of limited length sequence with windowing

Fig.2. Acquisition of limited length sequence

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


def
1 , 0 n N 1
x [ n ] = xin [ n ] w [ n ] , w [ n ] =
0 , otherwise

(4)

Since time-domain multiplication as known is the dual of


spectral convolution, the equivalent DTFT becomes:

X ( ) = X in ( ) W ( )

N
sin
( N 1)

2 e i 2 (5)
, W ( ) =

sin
2

Fig.3. Spectral leakage in the sampled DFT

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 where N=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.5. Sinewave convolved with hann window

21

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 Converters

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:

x =

2 K
N

(6)

Setting K an integer of choice, (6) can be solved for x. The


physical frequency fx for a given sampling frequency fs can be
found from the angular frequency definition, =2f/fs.
K
fx =
fs
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=K the correlation between the basis function and the
signal 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 length N=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 of N=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 nonlinearities (INL) in the converter and see them as distortion, it
has been recommended to use prime sampling [7]. This simply
means coherent sampling where K is a prime number. Then a
maximum number of converter codes are used by the sequence
since its periodicity is irreducible.

Fig.6. Acquisition with coherent sampling

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

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 random
way. 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 X weighted by the
STF, the other is the quantization error Eq weighted by the
NTF, or in other words the shaped quantization noise.

Fig.8. Output amplitude spectrum of DSM designed for 16 times OSR.

22

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 Converters

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

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

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 relatively
straightforward 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 with N=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 there
might 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
quantized output is also periodic in N. 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 in N.

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

Fig.12. Endpoint error at DSM output

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 Converters

23

Fig.13. Output overshoot caused by DSM memory

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


a result of random quantization but of the DSM having
memory. If unity STF, the inverse z-transform of (1) yields:

q [ n ] = x [ n ] + ntf [ k ] eq [ n k ]

(8)

k =0

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


eq[N]=0) will be:
q [N ] =

ntf [ k ] e [ N k ]
q

(9)

k =1

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]|nN=0 and eq[n]|nN=0) and observe the output
overshoot 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:
ew [ n ] =

ntf [ k ] eq [ N + n k ]

(10)

k = n +1

Extending N to 214 again, fig.14 shows the same DFT as


fig.11 together with the spectrum of the window error, or
overshoot beyond N found by zero-padding the input.

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

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


samples, indeed is the 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 eq in (10) is random can enable a prediction:
eq 1
0

eq 2

eq 3

eq 2
0
M

eq 3
eq 3
M

K ntf [1] ew [0]


K ntf [2] ew [1]

=
K ntf [3] ew [2]

O M M

(11)

Where eq is 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

Fig.14. DSM output and filter overshoot spectra

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

24

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 Converters

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 where
the 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, April 1994.
[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 Lkken was 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-todigital converters and related signal processing.

You might also like