ECE37 Adanced Analog Circuits Lecture 5 ADANCED Σ Richard Schreier richard.schreier@analog.com Treor Caldwell treor.caldwell@utoronto.ca Course Goals Deepen understanding of CMOS analog circuit design through a top-down study of a modern analog system The lectures will focus on Delta-Sigma ADCs, but you may do your project on another analog system. Deelop circuit insight through brief peeks at some nifty little circuits The circuit world is filled with many little gems that eery competent designer ought to know. ECE37 5-2 Date Lecture Ref Homework 28--7 RS Introduction: MOD & MOD2 S&T 2-3, A Matlab MOD2 28--4 RS 2 Example Design: Part S&T 9., J&M Switch-leel sim 28--2 RS 3 Example Design: Part 2 J&M 4 -leel sim 28--28 TC 4 Pipeline and SAR ADCs Arch. Comp. 28-2-4 ISSCC No Lecture 28-2- RS 5 Adanced Σ S&T 4, 6.6, 9.4, B Σ Toolbox; Proj. 28-2-8 Reading Week No Lecture 28-2-25 RS 6 Comparator & Flash ADC J&M 7 28-3-3 TC 7 SC Circuits J&M 28-3- TC 8 Amplifier Design 28-3-7 TC 9 Amplifier Design 28-3-24 TC Noise in SC Circuits S&T C 28-3-3 Project Presentation 28-4-7 TC Matching & MM-Shaping Project Report 28-4-4 RS 2 Switching Regulator -leel sim ECE37 5-3 Highlights (i.e. What you will learn today) High-Order Σ Modulation NTF, SNR, instability, H, h 2 Feedback, Feedforward and Generic Σ Topologies NTF selection 3 Σ Toolbox Demos: NTF synthesis and simulation Examples: Lowpass and Bandpass, MASH ABCD: State-space representation 4 Continuous-Time Σ Inherent anti-aliasing ECE37 5-4 MOD: MOD2: Reiew: MOD & MOD2 z ECE37 5-5 STF( z) z NTF( z) z z z z STF( z) z NTF( z) ( z ) 2 Reiew: SNR s. OSR The in-band quantization noise power is: INP ω B H( e jω ) 2 S ee ( ω)dω π 2 σ2 ------------ e ( OSR) 3 3 for MOD π 4 σ2 ------------ e ( OSR) 5 5 for MOD2 9 db/octae SNR-OSR trade-off for MOD; 5 db/octae for MOD2 ECE37 5-6
. MODN NTF Comparison z z N integrators N non-delaying, delaying z z STF( z) z NTF( z) ( z ) N z MODN s NTF is the N th power of MOD s NTF NTF ( e j2πf ) (db) 4 2 2 4 6 8 MOD MOD2 MOD3 MOD4 MOD5-3 -2 - Normalized Frequency (f ) ECE37 5-7 ECE37 5-8 Predicted Performance In-band quantization noise power INP.5 OSR.5 OSR NTF( e j 2πf ) 2 S ee () f df ( 2πf ) 2N 2σ2 e df π 2N ------------------------------------------------------- σ2 ( 2N + ) ( OSR) 2N + e uantization noise drops as the (2N+) th power of OSR (6N+3) db/octae SNR-OSR trade-off ECE37 5-9 Improing NTF Performance NTF Zero Optimization Minimize the integral of NTF 2 oer the passband Normalize passband edge to for ease of calculation: Hf () 2 the integral Need to find the a i which minimize ( x 2 a 2 ) 2 dx, n 2 a a f s /f B x 2 x 2 a 2 ( ) 2 dx, n 3 ( x 2 a 2 ) 2 x 2 a 2 ( 2 ) 2 dx, n 4 ECE37 5- Order Solutions p to Order 8 Optimal Zero Placement Relatie to f B SNR Improement db 2 ± 3 3.5 db 3, ± 3 5 8 db 4 ± 3 7± ( 3 7) 3 35 3 db 5, ± 5 9± ( 5 9) 5 2 [Y. Yang] 8 db 6 ±.23862, ±.662, ±.93247 23 db 7, ±.4585, ±.7453, ±.949 28 db 8 ±.8343, ±.52553, ±.79667, ±.9629 34 db ECE37 5- Topological Implication Feedback around pairs integrators: 2 Delaying Integrators z -g z Poles are the roots of + g ------------ 2 z i.e. z ± j g Not quite on the unit circle, but fairly close if g<<. Non-delaying + Delaying Integrators (LDI Loop) z z z ECE37 5-2 -g Poles are the roots of gz + ------------------- ( z ) 2 i.e. z e ± jθ, cosθ g 2 Precisely on the unit circle, regardless of the alue of g.
Problem: A High-Order Modulator Wants a Multi-bit uantizer E.g. MOD3 with an Infinite uantizer and Zero Input 7 5 3 - -3-5 -7 2 3 4 Sample Number uantizer input gets large, een if the input is small. 6 quantizer leels are used by a small input. ECE37 5-3 y Simulation of MOD3-b (MOD3 with a Binary uantizer) 2 3 4 2 2 2 3 4 Sample Number MOD3-b is unstable, een with zero input Long strings of +/ HGE! ECE37 5-4 Solutions to the Stability Problem Historical Order Multi-bit quantization Initially considered undesirable because we lose the inherent linearity of a -bit DAC. 2 More general NTF (not pure differentiation) Lower the NTF gain so that quantization error is amplified less. nfortunately, reducing the NTF gain reduces the amount by which quantization noise is attenuated. 3 Multi-stage (MASH) architecture Combinations of the aboe are possible ECE37 5-5 Multi-bit uantization A modulator with NTF H and STF is guaranteed to be stable if u < u max at all times, where u max nle + h and h hi () i In MODN Hz ( ) ( z ) N, so hn ( ) {, a, a 2, a 3, ( ) N a N, }, a i > and thus h H( ) 2 N nle 2 N implies u max nle + h MODN is guaranteed to be stable with an N-bit quantizer if the input magnitude is less than /2. This result is quite conseratie. Similarly, nle 2 N + guarantees that MODN is stable for inputs up to 5% of full-scale ECE37 5-6 M-Step Symmetric uantizer M odd: mid-rise M e y 2, (nle M + ) M een: mid-tread e y y y M M + M M + M : odd integers from M to +M No-oerload range: y nle e 2 ECE37 5-7 M 2 M : een integers from M to +M Inductie Proof of Criterion h Assume STF and ( n) ( un ( ) u max ) Assume ei () for i < n.[induction Hypothesis] yn ( ) un ( ) + hi ()en ( i) u max u max i i i + hi () en ( i) + hi () u max + h Then u max nle + h yn ( ) nle en ( ) So by induction ei () for all i > ECE37 5-8
More General NTF Instead of NTF( z) Az ( ) Bz ( ) with Bz ( ) z n, use a more general Bz ( ) Roots of B are the poles of the NTF and must be inside the unit circle. Moing the poles away from z toward z makes the gain of the NTF approach unity. The Lee Criterion for Stability in a -bit Modulator: H 2 [Wai Lee, 987] The measure of the gain of H is the maximum magnitude of H oer frequency, aka the infinitynorm of H: H max ( He ( jω )) ω [, 2π] : Is the Lee criterion necessary for stability? No. MOD2 is stable (for DC inputs less than FS) but for MOD2 H 4. : Is the Lee criterion sufficient to ensure stability? No. There are lots of counter-examples, but H.5 often works. ECE37 5-9 ECE37 5-2 SNR (db) umax (dbfs) Simulated SNR s. H 5 th -Order NTFs, -b uant., OSR 32 9 7 5.25.5.75 2 SNR has a broad maximum Stable input limit drops as increases. H cliff! 2.25.5.75 2 H H ECE37 5-2 Peak SNR (db) SNR Limits -bit Modulation 4 2 8 6 4 2 N 8 7 N 6 N 5 OSR N 4 N 3 4 8 6 32 64 28 256 52 24 N 2 N ECE37 5-22 SNR Limits for 2-bit Modulators SNR Limits for 3-bit Modulators 4 N 8 N 7 N 6 N 5 N 4 N 3 N 2 4 N 8 N 7 N 6 N 5 N 4 N 3 N 2 Peak SNR (db) 2 8 6 4 N Peak SNR (db) 2 8 6 4 N 2 2 4 8 6 32 64 28 256 52 24 OSR ECE37 5-23 4 8 6 32 64 28 256 52 24 OSR ECE37 5-24
Example Waeforms 7 th -order 7-leel modulator, H 2 6 SNR 55 db @ OSR 8 Example Waeforms 7 th -order 7-leel modulator, H 8 6 SNR 5 db @ OSR 8-6 5 Time Step ECE37 5-25 -6 5 Time Step ECE37 5-26 dbfs/nbw 2 4 6 8 Simulated Spectra SNR 5 db @ OSR 8 SNR 55 db @ OSR 8 SNR (db) 2 8 6 4 SNR Cures peak SNR 5dB @ OSR 8 peak SNR 6dB @ OSR 8 Stable input limit ~ dbfs 2 4 NBW.8x 4 6..2.3.4.5 Normalized Frequency ECE37 5-27 2 2 8 6 4 2 Input Leel (dbfs) Stable input limit 6 dbfs ECE37 5-28 2. Feedback Topology -g Feedforward Topology a a I a 2 I a 3 I I I -g I a 2 a 3 N integrators precede the quantizer Feedback from the quantizer to the input of each integrator (ia a DAC) Local feedback around pairs of integrators to control NTF zeros Multiple input feed-in branches are possible ECE37 5-29 N integrators in a row Each integrator output is fed forward to the quantizer Local feedback around pairs of integrators to control NTF zeros Multiple input feed-in branches also possible ECE37 5-3
Generic Single-Loop Σ ADC Linear Loop Filter + Nonlinear uantizer: Y L + L Y + E L ECE37 5-3 E L Y STF + NTF E, where NTF -------------- & STF L L NTF Inerse Relations: L /NTF, L STF / NTF Feedback s. Feedforward STF L ( z) N -------------- ( z) Dz ( ) L ( z ) N -------------- ( z) Dz ( ) NTF( z) ---------------------- L ( z) Dz ( ) -------------------------------- N ( z) Dz ( ) STF( z) L ( z) ---------------------- L ( z) N ( z) -------------------------------- N ( z) Dz ( ) poles of LF are zeros of NTF same poles as NTF zeros zeros of L STF often has no zeros, only poles. ECE37 5-32 L ( z) L ( z) Lz ( ) NTF( z) ---------------------- -------------------- L ( z) + Lz ( ) STF( z) Lz ( ) -------------------- + Lz ( ) Hz ( ) NTF( e jω ) NTF STF NTF + With extra feed-in to, G(z ). db 2 3 STF Comparison Feedforward Feedback 4.25.5 Normalized Frequency (f /f s ) ECE37 5-33 Feedforward s. Feedback FF has relaxed dynamic range requirements All stages except the last hae attenuated signal components. FB has better STF and, in CT modulators, a better AAF In a discrete-time modulator, the STF of FF can be made unity by adding a signal feedforward term to the input of the quantizer. FB needs many DACs; FF needs a summation block Can do partial summation before the last integrator. FF timing can be tricky Need to quantize u and feed it back in zero time. ECE37 5-34 3. Σ Toolbox http://www.mathworks.com/matlabcentral/fileexchange Search for delsig or Delta Sigma Toolbox Specify OSR, lowpass/bandpass, no. of. leels. NTF (and STF) aailable. Time-domain simulation and SNR measurements. synthesizentf realize- NTF predictsnr, simulatedsm, simulatesnr calculatetf Parameters for a specific topology. Also mapctod simulateesl designhbf Manual is delsig.pdf scaleabcd stuffabcd ABCD: statespace description mapabcd of the modulator. ECE37 5-35 Σ Toolbox Modulator Model Modulator: [-M, +M ] uantizer: L Y L [-M, +M ] 2 Loop filter can be specified by NTF or by ABCD, a state-space representation M M 2 M 3 3 2 y y y 2 2 3 3 4 4 - e 2 e e -3 Mid-tread quantizer; : een integers [ M,+M ] NTF -------------- L STF L -------------- L Mid-rise quantizer; : odd integers [ M,+M ] ECE37 5-36
NTF Synthesis synthesizentf Not all NTFs are realizable Causality requires h( ), or, in the frequency domain, H( ). Recall Hz ( ) h( )z + h( )z + Not all NTFs yield stable modulators Rule of thumb for single-bit modulators: H <.5 [Lee]. Can optimize NTF zeros to minimize the meansquare alue of H in the passband The NTF and STF share poles, and in some modulator topologies the STF zeros are not arbitrary Restrict the NTF such that an all-pole STF is maximally flat. (Almost the same as Butterworth poles.) ECE37 5-37 Lowpass Example [dsdemo] 5 th -order NTF, all zeros at DC Pole/Zero diagram: OSR 32; H synthesizentf(5); plotpz(h); f linspace(,.5); z exp(2i*pi*f); H_z ealtf(h,z); plot(f,db(h_z)); g rmsgain(h,,.5/osr) ECE37 5-38 Lowpass NTF Out-of-band gain.5 Improed 5 th -Order Lowpass NTF Zeros optimized for OSR32 db 2 4 6 4 5 rms in-band gain 47 db 6 /64 optimization flag OSR 32; H synthesizentf(5,osr,);... Zeros spread across the band-of-interest to minimize the rms alue of the NTF. 8.5 Normalized Frequency (f /f s ) ECE37 5-39 ECE37 5-4 Improed NTF Bandpass Example db 2 6 rms gain 66 db OSR 64; f /6; HsynthesizeNTF(6,OSR,,[],f);... center frequency [] or NaN means use default alue, i.e. Hinf.5 4 7 6 8 /64 8.5 Normalized Frequency (f /f s ) ECE37 5-4 ECE37 5-42
db 2 4 Bandpass NTF and STF NTF all-pole STF with Butterworth poles all-pole STF with same poles as Σ toolbox NTF 6.5 Normalized Frequency (f /f s ) ECE37 5-43 Summary: NTF Selection If OSR is high, consider using a single-bit modulator To improe SNR, Optimize zeros, Increase H, or Increase order. If SNR is insufficient, must use a multi-bit design Can turn all the aboe knobs to enhance performance. Feedback DAC assumed to be ideal ECE37 5-44 NTF-Based Simulation [dsdemo2] dbfs/nbw order5; OSR32; ntf synthesizentf(order,osr,); N2^7; fbin959; A.5; % 28K points input A*sin(2*pi*fbin/N*[:N-]); output simulatedsm(input,ntf); spec fft(output.*ds_hann(n)/(n/4)); plot(db(spec(:n/(2*osr)))); In mex form; 28K points in <. sec 5 5 NBW.5 bins 2 24 248 FFT Bin Number (28K-point FFT) ECE37 5-45 dbfs/nbw u 2 4 6 Simulation Example Cont d 5 Time (sample number) 8 NBW.8x 4 f s (8k-point FFT) 2.5 Normalized Frequency (f /f s ) ECE37 5-46 SNR s. Amplitude: simulatesnr SNR (db) [snr amp] simulatesnr(ntf,osr); plot(amp,snr,'b-^'); 8 6 4 OSR32 Peak SNR is 85 db. Max. input is 3 dbfs. u Bandpass Simulation Example 8 th -order, f f s /8 2 8 6 4 2 Input Amplitude (dbfs) ECE37 5-47 5 Time (sample number) ECE37 5-48
dbfs/nbw Example Bandpass Spectrum -2-4 -6-8 - SNR db @ OSR 64-2 NBW.8x 4 f s -4..2.3.4.5 Normalized Frequency ( f s ) ECE37 5-49 ABCD: A State-Space Representation of the Loop Filter 2 inputs uk ( ) k ( ) n linear combinations of n + 2 inputs n states z z z x ( k) x 2 ( k) x 3 ( k) xk ( ) n n n 2 xk ( + ) Ax( k) + B uk ( ) k ( ) xk ( ) uk ( ) k ( ) linear combination output yk ( ) Cx( k) + D uk ( ) k ( ) n 2 ABCD n 2 AB CD ECE37 5-5 n Ex.: Cascade of Integrators Feedback (CIFB) Topology x ( k + ) x 2 ( k + ) x 3 ( k + ) yk ( ) x x 2 x ------------ ------------ ------------ 3 z z z g z Recall: NTF zeros Loop Filter s poles. Loop Filter poles determined by A matrix. - - g - - - - - - x ( k) x 2 ( k) x 3 ( k) uk ( ) k ( ) ECE37 5-5 CIFB cont d: a i Control NTF & STF Poles a a 2 a 3 x ( k + ) x 2 ( k + ) x 3 ( k + ) yk ( ) x x 2 x ------------ ------------ ------------ 3 z z z - a - a 2 - a 3 - x ( k) x 2 ( k) x 3 ( k) uk ( ) k ( ) ECE37 5-52 u b i Control STF Zeros b b 2 b 3 b 4 x x 2 x ------------ ------------ ------------ 3 z z z a a 2 a 3 x ( k + ) x 2 ( k + ) x 3 ( k + ) yk ( ) b a b 2 a 2 b 3 a 3 b 4 x ( k) x 2 ( k) x 3 ( k) uk ( ) k ( ) ECE37 5-53 ABCD and the Toolbox simulatedsm simulates a modulator gien an ABCD description of its loop filter realizentf gies (unscaled) coefficients for any of the supported topologies stuffabcd produces an ABCD matrix gien the coefficients for one of the supported topologies mapabcd performs the inerse operation. scaleabcd does dynamic range scaling on any ABCD matrix calculatetf calculates the NTF and STF from ABCD seful for checking implementation of new topologies. ECE37 5-54
Cascade (MASH) Modulators Put two (or more) modulators in series E Loop Filter + H E Loop Filter Digital Cancellation 2 H E + H 2 E 2 H 2 H H 2 E 2 The resulting NTF is the product of the indiidual NTFs Example: 2-2 Cascade se Two MOD2b: Hz ( ) ----- z 3.25 z -.5 z ----------------- 2 z.5 z - 3-input, 2-output linear system.25 z - z - 2 + ------------------------------------------------- 8( z ) 2 ( z.5) 2 z 3 ( z.75) 8( z ) Hz ( ) 4 2 ------------------------- ( z.75) ECE37 5-55 ECE37 5-56 PSD (dbfs/nbw) 5 Example MASH Spectra SNR 8 db @ OSR 32 SNR 53 db @ OSR 32 Improed noise-shaping 4dB/decade 4. A Continuous-Time Σ ADC Continuous- Time Analog Input Sampler Loop Filter CK DAC Coarse ADC Only ADC and DAC are clocked Digital Out 8dB/decade 5 NBW 4.5 5 3 2 Normalized Frequency (f /f s ) ECE37 5-57 Loop filter implemented with continuous-time circuitry Sampling occurs after the loop filter ECE37 5-58 u c Example: MOD-CT Block Diagram CK DAC Schematic C u c R IDAC CK Inherent Anti-Aliasing Σ ADC with CT Loop Filter u c L c ( s) L c ( s) DAC Equialent system with DT feedback path Note: Input is a simple resistor, not a switched capacitor CT ADCs are easier to drie than DT ADCs u c L c ( s) L ( z) NTF( z) STF L c ( s)ntf( z) ECE37 5-59 ECE37 5-6
Example: MOD-CT Recall z STF e s ω s-plane Zeros @ s 2kπi z ---------------- s MOD-CT Frequency Responses db 2 NTF z STF z s Pole-zero cancellation @ s ECE37 5-6 σ 3 4 uant. Noise Notch Inherent Anti-Aliasing 5 2 3 Frequency (Hz) ECE37 5-62 Inherent AAF Summary STF L c ( s)ntf( z) STF contains the zeros of the NTF Any frequency which aliases to the passband is attenuated by at least as much as the quantization noise Anti-alias performance tracks modulator order. Also true for MASH systems. The effectie anti-alias filter is AAF() f STF ( f ) ----------------------------- STF( f alias ) L c () f -------------------------- L c ( f alias ) ECE37 5-63 What You Learned Today And what the homework should solidify High-Order Σ Modulation NTF, SNR, instability, H, h 2 Feedback, Feedforward and Generic Σ Topologies NTF selection 3 Σ Toolbox Demos: NTF synthesis and simulation Examples: Lowpass and Bandpass, MASH ABCD: State-space representation 4 Continuous-Time Σ Inherent anti-aliasing ECE37 5-64 Homework #5 erify that with ABCD set to ABCD 2 simulatedsm is the same as your simulatemod2 from Homework #. One simulation is sufficient, just be sure to compare the internal states as well as the bit-stream output. 2 Obtain an NTF for MOD2b using synthesizentf with H 2.5, OSR 28 and opt. Plot the NTF s poles and zeros as well as its frequency response. Include those of MOD2. Compare MOD2b s SNR-s.-input-amplitude cure with MOD2 s using simulatesnr. ECE37 5-65 3 Construct the block diagram of a 4 th -order single-loop 9-leel Σ ADC employing the CRFB topology that achiees SNR > db at OSR 32 and erify it. Choose H such that the stable input range is maximized. Plot the SNR-ersus-amplitude cure and note the alue of u max. Compare with the h criterion. Realize your NTF with a CRFB-style modulator haing a single input feed-in. Ensure STF(dc). Do dynamic range scaling for u max dbfs and state maxima less than unity. You may use the Σ toolbox function scaleabcd. Plot the state maxima as functions of the input amplitude. Implement your block diagram with C/Matlab code and erify that your coded modulator behaes the same as your MATLAB modulator. ECE37 5-66
4 erify that the following is a continuous-time implementation of MOD2 u c x c.5 (clocked) It is sufficient to erify that the sampled pulse response of the loop filter is the same as MOD2 s. z Show that the STF is ----------------- 2 s If this modulator is used at an oersampling ratio of 64, what is its minimum alias attenuation? c x 2c delay-free DAC ECE37 5-67