Second and Higher-Order Delta-Sigma Modulators MEAD March 2008 Richard Schreier Richard.Schreier@analog.com ANALOG DEVICES R. SCHREIER ANALOG DEVICES, INC. Overview 1 MOD2: The 2nd-Order Modulator • • • • • • 2 MOD2 from MOD1 NTF (predicted & actual) SQNR performance Stability Deadbands, Distortion & Tones (audio demo) Topological Variants Higher-Order Modulators • • • • • MODN from MOD1 NTF Zero Optimization Stability SQNR limits for binary and multi-bit modulators Topology Overview 2 R. SCHREIER ANALOG DEVICES, INC. 1. MOD2 from MOD1 • Replace the quantizer in MOD1 with another copy of MOD1 in a recursive fashion: Replace Q with MOD1 E E1 Q X1 U V z-1 z-1 z-1 z-1 V = V = ⇒E ⇒V U + ( 1 – z –1 )E X 1 + E = X 1 + ( 1 – z –1 )E 1 = ( 1 – z –1 )E 1 = U + ( 1 – z –1 ) 2 E 1 3 R. SCHREIER ANALOG DEVICES, INC. Simplified Diagram • Combine feedback paths, absorb feedback delay into second integrator… E U z z−1 1 z−1 Q V V ( z) = z – 1 U ( z) + ( 1 – z – 1 ) 2 E ( z) • NTF( z) = ( 1 – z –1 ) 2 and the STF is STF( z) = z –1 • MOD2’s NTF is the square of MOD1’s NTF 4 R. SCHREIER ANALOG DEVICES, INC. NTF(e j2πf) (dB) NTF Comparison 0 −20 MOD1 −40 −60 MOD2 Twice as much attenuation at all frequencies −80 −100 10–3 10–2 10–1 Normalized Frequency 5 R. SCHREIER ANALOG DEVICES, INC. Predicted Performance • In-band quantization noise power 1 ⁄ ( 2 ⋅ OSR ) ∫ IQNP = NTF(e j2πf ) 2 ⋅ S ee( f ) d f 0 1 ⁄ ( 2 ⋅ OSR ) ≈ ∫ ( 2πf ) 4 ⋅ 2σ e2 d f 0 π 4 σ e2 = --------------------5 ( OSR ) 5 • Quantization noise drops as the 5th power of OSR! SQNR increases at 15 dB per octave increase in OSR. 6 R. SCHREIER ANALOG DEVICES, INC. Predicted SQNR vs. OSR 140 120 SQNR (dB) 100 MOD2 80 MOD1 60 40 20 0 3 2 24 25 26 27 28 29 210 OSR • For OSR = 128 and binary quantization, the predicted SQNR of MOD2 is 94.2 dB 7 R. SCHREIER ANALOG DEVICES, INC. MOD2 Simulated PSD Half-scale sine-wave input with f ≈ f s ⁄ 500 0 dBFS/NBW –20 SQNR = 85 dB @ OSR = 128 –40 –60 Simulated spectrum (smoothed) Theoretical PSD k=1 –80 –100 40 dB/decade –120 –140 –3 10 NBW = 5.7×10−6 10–1 10–2 Normalized Frequency • Observed PSD similar to theory (40 dB/decade slope) But 3rd harmonic is visible and in-band PSD is slightly higher. 8 R. SCHREIER ANALOG DEVICES, INC. Gain of the Quantizer in MOD2 • The effective quantizer gain can be computed from the simulation data using 〈 v, y〉 E[ y ] k = --------------- = -------------[S&T Eq. 2.5] 〈 y, y〉 E[ y2 ] • For the preceding simulation, k = 0.63 . • k ≠ 1 alters the NTF: 1 NTF 1( z) NTF k( z) = ----------------------------------------------k + ( 1 – k )NTF 1( z) 0 -1 -1 0 1 9 R. SCHREIER ANALOG DEVICES, INC. Revised PSD Prediction 0 Theoretical PSD k = 0.63 –20 dBFS/NBW –40 –60 Simulated Spectrum (smoothed) –80 –100 –120 NBW = 5.7×10−6 –140 10–3 10–2 10–1 Normalized Frequency • Agreement is now excellent 10 R. SCHREIER ANALOG DEVICES, INC. Variable Quantizer Gain • When the input is small (below -12 dBFS), the effective gain of the quantizer is k = 0.75 • The “small-signal NTF” is thus ( z – 1 )2 NTF( z) = ------------------------------------z 2 – 0.5 z + 0.25 • This NTF has 2.5 dB les quantization noise suppression than the ( 1 – z –1 ) 2 NTF derived from the assumption that k = 1 Thus the SQNR should be about 2.5 dB lower than . • As the input signal increases, k decreases and the suppression of quantization noise degrades SQNR increases less quickly than the signal power, and eventually the SQNR saturates and then decreases as the signal power is increased. 11 R. SCHREIER ANALOG DEVICES, INC. Simulated SQNR of MOD2 100 15 A 2 ( OSR ) 5 -------------------------------2π 4 SQNR (dB) 80 High-frequency input Low-frequency input 60 40 SP = A 2 ⁄ 2 20 0 −100 −80 −60 −40 −20 Input Amplitude (dBFS) 0 π4( 1 ⁄ 3 ) IQNP = ---------------------5 ( OSR ) 5 SP SQNR = --------------IQNP • Well-modeled by ideal formula; less erratic than MOD1 Saturation at high signal levels due to decreased quantizer gain and altered NTF. (Worse with low-frequency inputs.) 12 R. SCHREIER ANALOG DEVICES, INC. Stability of MOD2 • Known to be stable with DC inputs up to full-scale, but the state bounds blow up as u → 1 Hein [ISCAS 1991]: u ≤ 1 ⇒ x 1 ≤ u + 2 (output of 1st integrator) ( 5 – u )2 x 2 ≤ ----------------------- (output of 2nd integrator) 8(1 – u ) • However, with a hostile input (whose magnitude is less than 30% of full-scale) MOD2 can be driven unstable! 0.5 u u 0 -0.5 ∞ = 0.3 0 100 200 • As a result of this input-dependent stability, it is wise to keep the input below 70-90% of full-scale 13 R. SCHREIER ANALOG DEVICES, INC. Deadbands, Distortion & Tones Audio Comparison of MOD1 and MOD2 1 1 1 -1 -1 -1 0 0 0 -20 -20 -20 -40 -40 -40 -60 -60 -60 -80 -80 -80 NBW = 3.0 Hz -100 10 100 1kHz -100 2 10 NBW = 0.8 Hz -100 10 14 4 10 100 1kHz R. SCHREIER ANALOG DEVICES, INC. Observations Tones • Quantization noise of MOD1 is distinctly non-white Audible tones when input is near zero, or near other simple rational fractions of full-scale. • MOD2 is better than MOD1 in terms of its tendency toward tonal behavior Dead-bands • MOD1 has dead-bands whose widths are proportional to 1/A, where A is the gain of the internal op-amp • MOD2 has dead-bands whose widths are proportional to 1/A2 • Dead-band behavior is less problematic in MOD2 15 R. SCHREIER ANALOG DEVICES, INC. Topological Variant– Delaying Integrators E 1 z−1 U -1 1 z−1 Q V -2 NTF( z) = ( 1 – z –1 ) 2 STF( z) = z –2 + Delaying integrators reduce the settling requirements Can decouple the integration phase from the driving phase 16 R. SCHREIER ANALOG DEVICES, INC. Topological Variant– Feed-Forward E U 1 z−1 z z−1 NTF( z) = ( 1 – z –1 ) 2 Q V STF( z) = 2 z –1 – z –2 + Output of first integrator has no DC component Dynamic range requirements of this integrator are relaxed. – Although STF ≈ 1 near ω = 0 , STF = 3 for ω = π Instability is more likely. 17 R. SCHREIER ANALOG DEVICES, INC. Topological Variant– Feed-Forward with Extra Input Feed-In E U 1 z−1 z z−1 NTF( z) = ( 1 – z –1 ) 2 Q STF( z) = 1 + No DC component in either integrator’s output Reduced dynamic range requirements in both integrators. + Perfectly flat STF No increased risk of instability. 18 V R. SCHREIER ANALOG DEVICES, INC. Topological Variant– Error Feedback E Q U V 2 z-1 z-1 –E NTF( z) = ( 1 – z –1 ) 2 STF( z) = 1 + Simple – Very sensitive to gain errors Only suitable for digital implementations. 19 R. SCHREIER ANALOG DEVICES, INC. 2. MODN from MOD2 U z z−1 z z−1 1 z−1 Q V 1 z z V = E + ----------- – V + ----------- – V + … ----------- ( – V + U ) z–1 z – 1 z – 1 ( 1 – z –1 ) N V = ( 1 – z –1 ) N E – ( ( 1 – z –1 ) N – 1 + ( 1 – z –1 ) N – 2 + … + 1 )z –1 V + z –1 U ( 1 – z ) – 1 –1 - z V + z –1 U ( 1 – z –1 ) N V = ( 1 – z –1 ) N E – -------------------------------- 1 – z –1 – 1 ( 1 – z –1 ) N – 1 –1 - z V + z –1 U ( 1 – z –1 ) N V = ( 1 – z –1 ) N E – -------------------------------- – z –1 –1 N ∴V ( z) = z –1 U( z) + ( 1 – z –1 ) N E( z) • NTF of MODN is the Nth power of MOD1’s NTF 20 R. SCHREIER ANALOG DEVICES, INC. NTF Comparison 20 -0 -20 -40 MOD1 -60 -80 D2 MO 3 D O M -100 -3 10 M O D M 4 OD 5 NTF(e j2πf) (dB) 40 -2 10 -1 10 Normalized Frequency 21 R. SCHREIER ANALOG DEVICES, INC. Predicted Performance • In-band quantization noise power 1 ⁄ ( 2 ⋅ OSR ) ∫ IQNP = NTF(e j2πf ) 2 ⋅ S ee( f ) d f 0 1 ⁄ ( 2 ⋅ OSR ) ≈ ∫ ( 2πf ) 2N ⋅ 2σ e2 d f 0 π 2N -σ2 = ------------------------------------------------( 2N + 1 ) ( OSR ) 2N + 1 e • Quantization noise drops as the (2N+1)th power of OSR! SQNR increases at (6N+3) dB per octave increase in OSR. 22 R. SCHREIER ANALOG DEVICES, INC. Improving NTF Performance– Zero Optimization • Minimize the rms in-band value of H by finding the ai which minimize the integral of H 2 over the passband. Normalize passband edge to 1 for ease of calculation. H( f ) i.e. Find the ai which minimize the integral 2 ∫ 1 ( x 2 – a 12 ) 2 d x , n = 2 x 2 ( x 2 – a 12 ) 2 d x , n = 3 ( x 2 – a 12 ) 2 ( x 2 – a 22 ) 2 d x , n = 4 –1 ∫ 1 a 1 f ⁄ fB –1 ∫ 1 –1 … -1 -a 23 R. SCHREIER ANALOG DEVICES, INC. Solutions Up to Order = 8 Order Optimal Zero Placement Relative to fB SQNR Improvement 1 0 0 dB 2 1 ± ------3 3.5 dB 3 3 0, ± --5 8 dB 4 3 2 3 3 ± --- ± --- – ----- 7 7 35 13 dB 5 5 2 5 5 0, ± --- ± --- – ------ [Y. Yang] 9 9 21 18 dB 6 ±0.23862, ±0.66121, ±0.93247 23 dB 7 0, ±0.40585, ±0.74153, ±0.94911 28 dB 8 ±0.18343, ±0.52553, ±0.79667, ±0.96029 34 dB 24 R. SCHREIER ANALOG DEVICES, INC. Topological Implication • Apply feedback around pairs integrators: Non-delaying + Delaying Integrators (LDI Loop) 2 Delaying Integrators -g 1 z−1 -g 1 z−1 z z−1 Poles are the roots of 1 1 + g ----------- z – 1 i.e. 1 z−1 Poles are the roots of gz 1 + ------------------ = 0 ( z – 1 )2 2 = 0 i.e. z = e ± jθ, cos θ = 1 – g ⁄ 2 z = 1± j g Not quite on the unit circle, but fairly close if g<<1. Precisely on the unit circle, regardless of the value of g. 25 R. SCHREIER ANALOG DEVICES, INC. Problem: High-Order Modulators Want Multi-bit Quantizers e.g. a 3rd-Order Modulator with an Infinite Quantizer and Zero Input 7 Quantizer input gets large, even if the input is small. 5 3 6 quantizer levels are used by a small input. v1 -1 -3 -5 -70 10 20 30 Sample Number 26 40 R. SCHREIER ANALOG DEVICES, INC. The 3rd-Order Modulator is Unstable with a Binary Quantizer Long strings of +1/-1 1 v 0 -1 0 10 20 30 40 200 HUGE! 100 y 0 -100 -200 0 10 20 Sample Number 30 40 • The quantizer input grows without bound The modulator is unstable, even with an arbitrarily small input. 27 R. SCHREIER ANALOG DEVICES, INC. Solutions to the Stability Problem Historical Order 1 Use multi-bit quantization Originally considered undesirable because the inherent linearity of a 1-bit DAC is lost when a multi-bit quantizer is used. Less of an issue now that mismatch-shaping is available. 2 Use a more general NTF (not pure differentiation) Lower the NTF gain so that quantization error is amplified less. A common rule of thumb is to limit the maximum NTF gain to ~1.5. Unfortunately, limiting the NTF gain reduces the amount by which quantization noise is attenuated. 3 Use a multi-stage (MASH) architecture More on this later in the course. • Combinations of the above are possible 28 R. SCHREIER ANALOG DEVICES, INC. Multi-bit Quantization • Can show that a modulator with NTF H and unity STF is guaranteed to be stable if u < u max at all times, ∞ h(i) where u max = nlev + 1 – h 1 and h 1 = ∑ i=0 • In MODN, H( z) = ( 1 – z –1 ) N , so h(n) = { 1, – a 1, a 2, – a 3, … ( – 1 ) N a N, 0… } , where a i > 0 and thus h 1 = H(– 1) = 2 N . • Thus nlev = 2 N implies u max = nlev + 1 – h 1 = 1. MODN is guaranteed to be stable with an n-bit quantizer if the input magnitude is less than ∆/2. This result is extremely conservative. • Similarly, nlev = 2 N + 1 guarantees the modulator is stable for inputs up to 50% of full-scale. 29 R. SCHREIER ANALOG DEVICES, INC. Proof of h 1 Criterion By Induction • Assume STF = 1 and ( ∀n ) ( u(n) ≤ u max ) . • Assume e(i) ≤ 1 for i < n . [Induction Hypothesis] Then y ( n) = u( n) + ∑ ≤ u max + ∑ ≤ u max + ∑ ∞ ∞ i=1 i=1 ∞ i=1 h(i)e(n – i) h(i) e(n – i) h(i) = u max + h 1 – 1 • Thus ( u max ≤ nlev + 1 – h 1 ) ⇒ ( y(n) ≤ nlev ) ⇒ ( e(n) ≤ 1 ) • And by induction e(i) ≤ 1 for all i > 0. 30 QED R. SCHREIER ANALOG DEVICES, INC. The Lee Criterion for Stability in a 1-bit Modulator: H ∞ ≤ 2 [Wai Lee, 1987] • The measure of the “gain” of H is the maximum magnitude of H (over frequency), otherwise known as the infinity-norm of H: H ∞ ≡ max( H(e jω) ) ω ∈ [ 0, 2π ] Q: Is the Lee criterion necessary for stability? For MOD2, H( z) = ( 1 – z –1 ) 2 and so H ∞ = H ( – 1 ) = 4 . Since MOD2 is known to be stable, the Lee criterion is not necessary. Q: Is the Lee criterion sufficient to ensure stability? No. There are lots of counter-examples, but H ∞ ≤ 1.5 often works. • Let’s look at some examples 31 R. SCHREIER ANALOG DEVICES, INC. The NTF Family Used by the ∆Σ Toolbox • Poles chosen such that 1 ⁄ den(H( z)) is a maximally flat transfer function. Pole Locus for 5th-order NTFs 1 For lowpass modulators, the pole placement is similar to a Butterworth transfer function. Yields a flat STF for both lowpass and bandpass modulators employing the CRFB topology with one feed-in. 0 -1 -1 0 1 32 R. SCHREIER ANALOG DEVICES, INC. σe vs. H ∞ Binary modulators of order N = 3, 4, 5 with a small input σe 1 1 ------3 0.5 N=5 1 N=3 Value of H ∞ resulting in instability depends on modulator order, N. Toolbox default is H ∞ = 1.5 0 N=4 1.5 2 H 2.5 ∞ 33 R. SCHREIER ANALOG DEVICES, INC. Two 5th-Order Binary Modulators NTF Magnitude 0 H ∞ = 1.5 H ∞ = 1.75 -20 -40 dB -60 -80 -100 -120 0 Higher H ∞ has more “aggressive” noise shaping 0.25 Normalized Frequency 34 0.5 R. SCHREIER ANALOG DEVICES, INC. σe vs. uDC For the two 5th-order modulators σe 2 1 NTF with higher H ∞ has a lower stable input limit. 0 0 0.25 0.5 DC Input 0.75 1 35 R. SCHREIER ANALOG DEVICES, INC. SQNR vs. H ∞ SQNR (dB) 5th-Order NTFs, Binary Quantization, OSR = 32 SQNR has a broad maximum 90 70 50 1 1.25 1.5 1.75 2 1.75 2 umax (dBFS) 0 -10 -20 Stable input limit drops as H ∞ increases. 1 1.25 1.5 H 36 ∞ R. SCHREIER ANALOG DEVICES, INC. N=8 N=7 N=6 N=5 SQNR Limits for Binary Modulators 140 N=4 N=3 N=2 Peak SQNR (dB) 120 100 N=1 80 60 40 20 0 4 8 16 32 64 128 256 512 1024 OSR 37 R. SCHREIER ANALOG DEVICES, INC. N=8 N=7 N=6 N=5 SQNR Limits for 2-bit Modulators 140 N=4 N=3 N=2 Peak SQNR (dB) 120 100 N=1 80 60 40 20 0 4 8 16 32 64 OSR 38 128 256 512 1024 R. SCHREIER ANALOG DEVICES, INC. N=8 N=7 N=6 N=5 SQNR Limits for 3-bit Modulators 140 N=4 N=3 N=2 Peak SQNR (dB) 120 N=1 100 80 60 40 20 0 4 8 16 32 64 128 256 512 1024 OSR 39 R. SCHREIER ANALOG DEVICES, INC. SQNR (dB) @ OSR = 8 with 1 LSB (peak) input Theoretical SQNR Limits for Multi-Bit Modulators H 120 H H 100 ∞ ∞ ∞ N=8 = 32 N=7 = 16 N=6 = 8 N=5 H 80 ∞ = 4 N=4 60 40 20 H ∞ = 2 N=3 N=2 100 101 Total RMS Noise Power (LSBs) 40 R. SCHREIER ANALOG DEVICES, INC. Example Waveforms 7th-order 17-level modulator, H ∞ = 2 16 SQNR = 55 dB @ OSR = 8 0 -16 0 50 100 Time Step 41 R. SCHREIER ANALOG DEVICES, INC. Example Waveforms 7th-order 17-level modulator, H ∞ = 8 16 SQNR = 105 dB @ OSR = 8 0 -16 0 50 Time Step 42 100 R. SCHREIER ANALOG DEVICES, INC. Spectra 0 SNR = 105dB @ OSR=8 SNR = 55dB @ OSR=8 –20 dBFS/NBW –40 –60 –80 –100 –120 –140 NBW=1.8x10–4 –160 0 0.1 0.2 0.3 0.4 Normalized Frequency 0.5 43 R. SCHREIER ANALOG DEVICES, INC. SNR Curves 120 peak SNR = 105dB @ OSR = 8 SNR (dB) 100 stable input limit = 0dBFS 80 peak SNR = 61dB @ OSR = 8 60 40 stable input limit = –6dBFS 20 0 –120 –100 –80 –60 –40 Input Level (dBFS) 44 –20 0 R. SCHREIER ANALOG DEVICES, INC. Example Topology– Feedback -g U I -a1 I I -a2 Q V Adjust ai to get the desired NTF -a3 • N integrators precede the quantizer • Feedback from the quantizer to the input of each integrator (via a DAC) • Local feedback around pairs of integrators is possible • Multiple input feed-in branches are also possible 45 R. SCHREIER ANALOG DEVICES, INC. Example Topology– Feedforward a1 a2 U I I I -g a3 Q V • N integrators in a row • Each integrator output is fed forward to the quantizer • Local feedback around pairs of integrators is possible • Multiple input feed-in branches are also possible 46 R. SCHREIER ANALOG DEVICES, INC. General Single-Quantizer ∆Σ Modulator • The input to the quantizer is some linear combination of the input to the modulator and the fed-back output E U L0 Y V L1 Y = L0 U + L1 V V = GU + HE , where 1 H = -------------- & G = L 0 H 1 – L1 V = Y+E Inverse Relations: L1 = 1 – 1/H, L0 = G/H 47 R. SCHREIER ANALOG DEVICES, INC. Summary • MOD2 is better than MOD1 Higher SQNR Whiter quantization noise Smaller deadbands • MODN is better than MOD2 Even higher SQNR Tonal behavior unlikely Deadbands virtually eliminated • BUT high-order modulators must deal with instability Modify the NTF, reduce the input range, and/or use multi-bit quantization 48