<<

ECE1371 Advanced Analog Circuits

INTRODUCTION TO DELTA-SIGMA ADCS

Richard Schreier [email protected]

NLCOTD: Level Translator VDD1 > VDD2, e.g.

3-V logic ? 1-V logic

• VDD1 < VDD2, e.g.

1-V logic ? 3-V logic

• Constraints: CMOS 1-V and 3-V devices no static current

ECE1371 2 Highlights (i.e. What you will learn today) 11st-order modulator (MOD1) Structure and theory of operation 2 Inherent linearity of binary modulators 3 Inherent anti-aliasing of continuous-time modulators 42nd-order modulator (MOD2) 5 Good FFT practice

ECE1371 3

0. Background (Stuff you already know) • The SQNR* of an ideal n-bit ADC with a full-scale sine-wave input is (6.02n + 1.76) dB “6 dB = 1 bit.” • The PSD at the output of a linear system is the product of the input’s PSD and the squared magnitude of the system’s frequency response

i.e. XY j 2πf 2 ⋅ H(z) Syy()f = He()Sxx()f

• The power in any frequency band is the integral of the PSD over that band *. SQNR = Signal-to-Quantization- Ratio ECE1371 4 1. What is ∆Σ? • ∆Σ is NOT a fraternity • Simplified ∆Σ ADC structure:

Analog LoopLoop CoarseCoarse Digital In FilterFilter ADCADC Out (to digital filter) DACDAC

• Key features: coarse quantization, filtering, feedback and oversampling Quantization is often quite coarse (1 bit!), but the effective resolution can still be as high as 22 bits.

ECE1371 5

What is Oversampling? • Oversampling is sampling faster than required by the Nyquist criterion For a lowpass signal containing energy in the (), frequency range0 f B , the minimum sample rate required for perfect reconstruction isf s = 2f B .

≡ ⁄ () • The oversampling ratio is OSR f s 2f B

• For a regular ADC, OSR ∼ 23– To make the anti-alias filter (AAF) feasible • For a ∆Σ ADC, OSR ∼ 30 To get adequate quantization noise suppression. Signals betweenf B and ~f s are removed digitally. ECE1371 6 Oversampling Simplifies AAF Desired Undesired OSR ~ 1: Signal Signals

f ⁄ f s 2 First alias band is very close OSR = 3: Wide transition band

f ⁄ f s 2 Alias far away ECE1371 7

How Does A ∆Σ ADC Work? • Coarse quantization ⇒ lots of quantization error. So how can a ∆Σ ADC achieve 22-bit resolution? •A∆Σ ADC spectrally separates the quantization error from the signal through noise-shaping

1 t t –1 analog uv∆Σ Decimation w digital input ADC Filter output 1 bit @fs n@2fB desired signal Nyquist-rate undesired shaped signals noise PCM Data ⁄ ⁄ f B f s 2 f B f s 2 f B ECE1371 8 A ∆Σ DAC System 1 t –1 digital uv∆Σ Reconstruction w analog input Modulator Filter output (interpolated) 1 bit @fs analog signal shaped output noise ⁄ ⁄ f B f s 2 f B f s 2 f B f s • Mathematically similar to an ADC system Except that now the modulator is digital and drives a low-resolution DAC, and that the out-of-band noise is handled by an analog reconstruction filter.

ECE1371 9

Why Do It The ∆Σ Way? • ADC: Simplified Anti-Alias Filter Since the input is oversampled, only very high frequencies alias to the passband. A simple RC section often suffices. If a continuous-time loop filter is used, the anti-alias filter can often be eliminated altogether. • DAC: Simplified Reconstruction Filter The nearby images present in Nyquist-rate reconstruction can be removed digitally. + Inherent Linearity Simple structures can yield very high SNR. + Robust Implementation ∆Σ tolerates sizable component errors. ECE1371 10 2. MOD1: 1st-Order ∆Σ Modulator [Ch. 2 of Schreier & Temes] Quantizer “∆”“Σ” (1-bit) v 1 Y y UVQ –1 z-1 Feedback V’ DAC z-1 DAC v’ v

Since two points define a line, a binary DAC is inherently linear. ECE1371 11

MOD1 Analysis • Exact analysis is intractable for all but the simplest inputs, so treat the quantizer as an additive noise source: Y UVQ -1 z E z-1 Y V V(z) = Y(z) + E(z) Y(z) = ( U(z) – z-1V(z) ) / (1–z-1) ⇒(1–z-1) V(z) = U(z) – z-1V(z) + (1–z-1)E(z) V(z) = U(z) + (1–z–1)E(z)

ECE1371 12 The Noise Transfer Function (NTF) • In general, V(z) = STF(z)•U(z) + NTF(z)•E(z) • For MOD1, NTF(z) = 1–z–1 The quantization noise has spectral shape!

Poles & zeros: 4 π NTF()ej 2 f 2 3

2 ≅ ω2 for ω « 1 1

0 0 0.1 0.2 0.3 0.4 0.5 Normalized Frequency (f /fs) • The total noise power increases, but the noise power at low frequencies is reduced

ECE1371 13

In-band Quant. Noise Power σ2 • Assume that e is white with power e ω σ2 ⁄ π i.e. See()= e • The in-band quantization noise power is ω ω B B σ2 jω 2 ω ω ≅ e ω2 ω IQNP= ∫ H() e See()d ------π ∫ d 0 0 π π2σ2 ≡ e ()–3 • SinceOSR ------ω , IQNP = ------OSR B 3 • For MOD1, an octave increase in OSR increases SQNR by 9 dB “1.5-bit/octave SQNR-OSR trade-off.”

ECE1371 14 A Simulation of MOD1

0 Full-scale test tone

–20 SQNR = 55 dB @ OSR = 128

–40 Shaped “Noise” –60 dBFS/NBW

–80 20 dB/decade

NBW = 5.7x10–6 –100 10–3 10–2 10–1 Normalized Frequency

ECE1371 15

CT Implementation of MOD1

•Ri/Rf sets the full-scale; C is arbitrary Also observe that an input at fs is rejected by the integrator— inherent anti-aliasing Integrator Latched Comparator C Rf

Ri u y D Q v DFF clock CK QB

ECE1371 16 MOD1-CT Waveforms u = 0 u = 0.06

1 1 v v –1 –1

y 0 y 0

0 5 10 15 20 0 5 10 15 20 Time Time

• With u=0, v alternates between +1 and –1 • With u>0, y drifts upwards; v contains consecutive +1s to counteract this drift

ECE1371 17

1 – z –1 MOD1-CT STF = ------s Recall ze= s

ω s-plane

Zeros @ s = 2kπi

σ Pole-zero cancellation @ s = 0

ECE1371 18 MOD1-CT Frequency Responses 10 NTF = 1–z–1

0

–10 1–z–1 STF = s –20 dB

–30 Quant. Noise Inherent Notch Anti-Aliasing –40

–50 0123 Frequency (Hz)

ECE1371 19

Summary • ∆Σ works by spectrally separating the quantization noise from the signal ≡ ⁄ () Requires oversampling.OSR f s 2f B . • Noise-shaping is achieved by the use of filtering and feedback • A binary DAC is inherently linear, and thus a binary ∆Σ modulator is too • MOD1 has NTF (z) = 1 – z–1 ⇒ Arbitrary accuracy for DC inputs. 1.5 bit/octave SQNR-OSR trade-off. • MOD1-CT has inherent anti-aliasing

ECE1371 20 NLCOTD

1V 1V 3V → 1V: 3V 3V 3V

1V → 3V: 3V

3V 3V

3V

ECE1371 21

3. MOD2: 2nd-Order ∆Σ Modulator [Ch. 3 of Schreier & Temes] • Replace the quantizer in MOD1 with another copy of MOD1 in a recursive fashion: E1 E UVQ

z-1 z-1 z-1

z-1

–1 –1 V(z) = U(z) + (1–z )E1(z), E1(z) = (1–z )E(z) ⇒V(z) = U(z) + (1–z–1)2E(z)

ECE1371 22 Simplified Block Diagrams E U z 1 Q z−1 z−1 V NTF() z = ()1 – z –1 2 STF() z = z –1

E 1 1 U Q z−1 z−1 V

–1 2 -1 -2 NTF() z = ()1 – z STF() z = z –2

ECE1371 23

NTF Comparison

0

−20

(dB) MOD1

f −40 π

j2 MOD2 () −60 MOD2 has twice as much

NTF e attenuation as MOD1 −80 at all frequencies

−100 10–3 10–2 10–1 Normalized Frequency

ECE1371 24 In-band Quant. Noise Power • For MOD2, He()jω 2 ≈ ω4

ω B jω 2 ω ω • As before,IQNP= H() e See()d and ∫0 ω σ2 ⁄ π See()= e

π4σ2 • So now IQNP = ------e-()OSR –5 5 With binary quantization to ±1, ∆ σ2 ∆2 ⁄ ⁄ = 2 and thuse ==12 13 .

• “An octave increase in OSR increases MOD2’s SQNR by 15 dB (2.5 bits)”

ECE1371 25

Simulation Example Input at 75% of FullScale

1

0

–1 0 50 100 150 200 Sample number

ECE1371 26 Simulated MOD2 PSD Input at 50% of FullScale 0 SQNR = 86 dB –20 @ OSR = 128 –40

–60 Simulated spectrum (smoothed) –80 Theoretical PSD (k = 1)

–100dBFS/NBW 40 dB/decade –120 − NBW = 5.7×10 6 –140 10–3 10–2 10–1 Normalized Frequency

ECE1371 27

SQNR vs. Input Amplitude MOD1 & MOD2 @ OSR = 256 120

100

80 MOD2

60 Predicted SQNR Simulated SQNR

SQNR (dB) 40 MOD1

20

0 –100 –80 –60 –40 –20 0 Input Amplitude (dBFS) ECE1371 28 SQNR vs. OSR 120

100 MOD2 (Theoretical curve assumes -3 dBFS input) 80

60 MOD1

SQNR (dB) (Theoretical curve assumes 0 dBFS input) 40

20 Predictions for MOD2 are optimistic. Behavior of MOD1 is erratic. 0 4 8 16 32 64 128 256 512 1024 ECE1371 29

Audio Demo: MOD1 vs. MOD2 [dsdemo4]

Sine Wave MOD1 Slow Ramp MOD2 Speech

ECE1371 30 MOD1 + MOD2 Summary • ∆Σ ADCs rely on filtering and feedback to achieve high SNR despite coarse quantization They also rely on digital signal processing. ∆Σ ADCs need to be followed by a digital decimation filter and ∆Σ DACs need to be preceded by a digital interpolation filter. • Oversampling eases analog filtering requirements Anti-alias filter in an ADC; image filter in a DAC. • Binary quantization yields inherent linearity • MOD2 is better than MOD1 15 dB/octave vs. 9 dB/octave SQNR-OSR trade-off. Quantization noise more white. Higher-order modulators are even better.

ECE1371 31

4. Good FFT Practice [Appendix A of Schreier & Temes] • Use coherent sampling I.e. have an integer number of cycles in the record. • Use windowing A Hann window wn()= ()12– cos()πnN⁄ ⁄ 2 works well. 1 • Use enough points ⋅ 0 RecommendN = 64 OSR . 0 N • Scale (and smooth) the spectrum A full-scale sine wave should yield a 0-dBFS peak. • State the noise bandwidth For a Hann window,NBW = 1.5 ⁄ N .

ECE1371 32 Coherent vs. Incoherent Sampling 100

dB Incoherent 0 Coherent –100

–200

–300 0 0.1 0.2 0.3 0.4 0.5 Normalized Frequency

• Coherent sampling: only one non-zero FFT bin • Incoherent sampling: “spectral leakage”

ECE1371 33

Windowing • ∆Σ data is usually not periodic Just because the input repeats does not mean that the output does too! • A finite-length data record = an infinite record multiplied by a rectangular window: wn()= 1, 0 ≤ n < N Windowing is unavoidable. • “Multiplication in time is convolution in frequency” Frequency response of a 32-point rectangular window: 0 –10 –20 –30 –40 –50 dB –60 Slow roll-off ⇒ out-of-band Q. noise may appear in-band –70 –80 –90 –100 0 0.125 0.25 0.375 0.5 ECE1371 34 Example Spectral Disaster Rectangular window, N = 256 40 Out-of-band quantization noise 20 obscures the notch!

0 dB –20

Actual ∆Σ spectrum –40 ()⁄ Wf w 2 Windowed spectrum –60 0 0.25 0.5 Normalized Frequency, f ECE1371 35

Window Comparison (N = 16)

0 –10 –20 Rectangular –30

(dB) –40 - 0 () () –50

Wf W ------–60 Hann –70 –80 Hann2 –90 –100 0 0.125 0.25 0.375 0.5 Normalized Frequency, f ECE1371 36 Window Properties Window Rectangular Hann† Hann2 2πn 2 wn(), 2πn 1 – cos------1 – cos------N n = 01,,… ,N – 1 1 N ------2 (wn()= 0 otherwise) 2  Number of non-zero 13 5 FFT bins 2 2 w 2 = ∑wn() N 3N/8 35N/128 W ()0 = ∑wn() NN/2 3N/8 w 2 NBW = ------2 1/N 1.5/N 35/18N W ()0 2 †. MATLAB’s “hann” function causes spectral leakage of tones located in FFT bins unless you add the optional argument “periodic.”

ECE1371 37

Window Length, N • Need to have enough in-band noise bins to 1 Make the number of signal bins a small fraction of the total number of in-band bins <20% signal bins ⇒ >15 in-band bins ⇒ N > 30 ⋅ OSR 2 Make the SNR repeatable N = 30 ⋅ OSR yields std. dev. ~1.4 dB. N = 64 ⋅ OSR yields std. dev. ~1.0 dB. N = 256 ⋅ OSR yields std. dev. ~0.5 dB.

•N = 64 ⋅ OSR is recommended

ECE1371 38 FFT Scaling • The FFT implemented in MATLAB is 2πkn N – 1 –j ------N X M()k + 1 = ∑ x M()n + 1 e n = 0 •Ifxn()= Asin()2πfn⁄ N †, then  AN  ------, k = f or Nf– Xk()=  2   0 , otherwise

⇒ Need to divide FFT by()N ⁄ 2 to get A.

(), ⁄ ≡ †. f is an integer in0 N 2 . I’ve definedXk() X M()k + 1 , ≡ xn() x M()n + 1 since Matlab indexes from 1 rather than 0. ECE1371 39

The Need For Smoothing • The FFT can be interpreted as taking 1 sample from the outputs of N complex FIR filters: x () h0()n y 0()N = X 0 h ()n y ()N = X()1  1 1 2πk  j ------n h ()n =  e N ,0≤ nN< k   0 , otherwise () hk()n y k()N = Xk

() hN – 1()n y N – 1()N = XN– 1

⇒ an FFT yields a high-variance spectral estimate

ECE1371 40 How To Do Smoothing 1 Average multiple FFTs Implemented by MATLAB’s psd() function 2 Take one big FFT and “filter” the spectrum Implemented by the ∆Σ Toolbox’s logsmooth() function logsmooth() averages an exponentially-increasing number of bins in order to reduce the density of points in the high-frequency regime and make a nice log-frequency plot

ECE1371 41

Raw and Smoothed Spectra

0

–20

–40

–60 dBFS

–80 Raw FFT –100 logsmooth

–120 –2 –1 10 10 Normalized Frequency ECE1371 42 Simulation vs. Theory (MOD2) 20 Simulated Spectrum 0 NTF = Theoretical Q. Noise? –20

–40

–60

dBFS –80

–100 “Slight” –120 Discrepancy

–140 (~40 dB)

–160 –4 –3 –2 –1 10 10 10 10 Normalized Frequency ECE1371 43

What Went Wrong? 1 We normalized the spectrum so that a full-scale sine wave (which has a power of 0.5) comes out at 0 dB (whence the “dBFS” units) ⇒ We need to do the same for the error signal. ⁄ i.e. useSee()f = 43 . But this makes the discrepancy 3 dB worse. 2 We tried to plot a power together with something that we want to interpret as a power spectrum • Sine-wave components are located in individual FFT bins, but broadband signals like noise have their power spread over all FFT bins! The “noise floor” depends on the length of the FFT.

ECE1371 44 Spectrum of a Sine Wave + Noise

0 dBFS 0 0 dBFS Sine Wave Noise ⇒ SNR = 0 dB –10

N = 26 (“dBFS”) –20 N = 28 f () ′ –3 dB/ x 10

ˆ N = 2 S octave –30 N = 212

–40 0 0.25 0.5 Normalized Frequency, f

ECE1371 45

Observations • The power of the sine wave is given by the height of its spectral peak • The power of the noise is spread over all bins The greater the number of bins, the less power there is in any one bin. • Doubling N reduces the power per bin by a factor of 2 (i.e. 3 dB) But the total integrated noise power does not change.

ECE1371 46 So How Do We Handle Noise? • Recall that an FFT is like a filter bank • The longer the FFT, the narrower the bandwidth of each filter and thus the lower the power at each output • We need to know the noise bandwidth (NBW) of the filters in order to convert the power in each bin (filter output) to a power density • For a filter with frequency responseHf() ,

Hf()2df NBW ∫ Hf NBW = ------() 2 f Hf()0 f0

ECE1371 47

FFT Noise Bandwidth Rectangular Window π N – 1 2 k ∑ ()π hk()n = expj ------n , H k()f = hk()n exp –j 2 fn N n = 0 k N – 1 f 0 = ---- , H k()f 0 ==∑ 1 N N n = 0 2 ∑ 2 ∫ H k()f ==hk()n N [Parseval]

H ()f 2df ∫ k N 1 ∴NBW ===------2 2 H k()f 0 N N

ECE1371 48 Better Spectral Plot 20 Simulated Spectrum 0 Theoretical Q. Noise –20

–40

–60

–80

dBFS/NBW 4 –100 --- NTF() f 2 ⋅ NBW passband for 3 –120 OSR = 128 NBW = 1.5 / N = 2×10–5 –140 N = 216 –160 10–4 10–3 10–2 10–1 Normalized Frequency ECE1371 49