EE37 Advanced Analog ircuits Lecture EXAMPLE DESIGN PART Richard Schreier richard.schreier@analog.com Trevor aldwell trevor.caldwell@utoronto.ca ourse Goals Deepen understanding of MOS analog circuit design through a top-down study of a modern analog system The lectures will focus on Delta-Sigma ADs, but you may do your project on another analog system. Develop circuit insight through brief peeks at some nifty little circuits The circuit world is filled with many little gems that every competent designer ought to recognize. EE37 -
Date Lecture Ref Homework 008-0-07 RS Introduction: MOD & MOD S&T -3, A Matlab MOD 008-0-4 RS Example Design: Part S&T 9., J&M 0 Switch-level sim 008-0- RS 3 Example Design: Part J&M 4 Q-level sim 008-0-8 T 4 Pipeline and SAR ADs Arch. omp. 008-0-04 ISS No Lecture 008-0- RS 5 Advanced Σ S&T 4, 6.6, 9.4, B TMOD; Proj. 008-0-8 Reading Week No Lecture 008-0-5 RS 6 omparator & Flash AD J&M 7 008-03-03 T 7 S ircuits J&M 0 008-03-0 T 8 Amplifier Design 008-03-7 T 9 Amplifier Design 008-03-4 T 0 Noise in S ircuits S&T 008-03-3 Project Presentation 008-04-07 T Matching & MM-Shaping Project Report 008-04-4 RS Switching Regulator Q-level sim EE37-3 NLOTD: Kelvin onnection You want to make this: Your Block External Resistor But you get this: wiring resistance R p L p bondwire inductance R V + pad pin How to measure V accurately (for accurate feedback) when R p + ωl p is a significant fraction of R? EE37-4
Highlights (i.e. What you will learn today) MOD implementation Switched-capacitor integrator S summer & DA too 3 Dynamic-range scaling 4 kt/ noise 5 Some MOD nonlinear theory 6 Verification strategy EE37-5 desired signal f B shaped noise f B Review: A Σ AD System Nyquist-rate PM Data f B f s f s U Σ Modulator V Digital Decimator W U Loop Filter DA V(z )= STF(z )U(z )+ NTF(z )E(z ) STF(z ): signal transfer function NTF(z ): noise transfer function E(z ): quantization error EE37-6 Y E V
U z Review: MOD Q E Vz ( ) = NTF( z)ez ( ) + STF( z)uz ( ) NTF( z) = ( z ) STF( z) = z NTF ( e j πf ) 4 3 ω for ω «0 0 0. 0. 0.3 0.4 0.5 Normalized Frequency (f /f s ) Doubling OSR improves SQNR by 9 db Peak SQNR dbp( 9 OSR 3 ( π )); dbp( x) 0log 0 ( x) EE37-7 U z z Review: MOD z Q E V NTF( z) = ( z ) STF( z) = z NTF ( e j πf ) 6 8 4 ω 4 for ω «0 0 0. 0. 0.3 0.4 0.5 Normalized Frequency (f /f s ) Doubling OSR improves SQNR by 5 db Peak SQNR dbp( ( 5 OSR 5 ) ( 4π 4 )) EE37-8
dbfs/nbw 0 40 60 80 00 0 Review: Simulated MOD PSD Input at 50% of FullScale 0 SQNR = 86 db @ OSR = 8 Simulated spectrum (smoothed) 40 db/decade Theoretical PSD (k = ) NBW = 5.7 0 7 40 0 3 0 0 Normalized Frequency (f /f s ) EE37-9 Review: Advantages of Σ AD: Simplified Anti-Alias Filter Since the input is oversampled, only very high frequencies alias to the passband. These can often be removed with a simple R section. If a continuous-time loop filter is used, the anti-alias filter can often be eliminated altogether. DA: 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. EE37-0
Let s Try Making One! lock at f s = MHz. Assume BW = khz. OSR = f s ( BW ) = 500 9 MOD: SQNR 9 db/octave 9 octaves = 8 db MOD: SQNR 5 db/octave 9 octaves =35 db Actually more like 0 db. SQNR of MOD is not bad, but SQNR of MOD is awesome! In addition to MOD s SQNR advantage, MOD is usually preferred over MOD because MOD s quantization noise is more well-behaved. EE37 - U What Do We Need? z z z Q E V Summation blocks Delaying and non-delaying discrete-time integrators 3 Quantizer (-bit) 4 Feedback DAs (-bit) 5 Decimation filter (not shown) Digital and therefore easy EE37 -
Switched-apacitor Integrator Single-ended circuit: φ Vin φ φ φ φ Vout z Timing: Vin φ φ φ v in ( n) v in ( n + ) φ Vout v out ( n) v out n + Time ( ) EE37-3 φ: q ( n) = V out ( n) q ( n) = V in ( n) Vin Vout φ: q n + q 0 ( ) = q ( n) + q ( n) Vin Vout EE37-4
q ( n + ) = q ( n) + q ( n) zq ( z) = Q ( z) + Q ( z) Q ( z) Q ( z) -------------- z This circuit integrates charge Since Q = V in and Q = V out V out ( z) ------------------- = ----------------- V in ( z) z Note that the voltage gain is controlled by a ratio of capacitors With careful layout, 0.% accuracy is possible. = EE37-5 V V Summation + Integration φ φ φ φ φ φ V out ( z) = φ Vout ------V ( z) + ------V ( z) --------------------------------------------------- ( z ) z Adding an extra input branch accomplishes addition, with weighting EE37-6
b DA + Summation + Integration V +Vref Vref φ φ φ v φ v φ φ φ φ Vout z DA v EE37-7 Differential Integrator φ φ φ Vin φ φ Vout Allows V in,m (= V out,m of previous stage) to be arbitrary φ φ φ EE37-8 M of amplifier inputs Amplifier drives only capacitors, so a high output impedance is OK
Non-Delaying Integrator Single-ended circuit: Swap Phases φ φ φ Vin φ φ Vout Timing: φ φ φ φ Vin v in ( n) v in ( n + ) Vout v out ( n) v out n + ( ) Integration occurs during φ EE37-9 φ: q = 0 q ( n) = V out ( n) Vin Vout φ: q ( n + ) = q ( n) q ( n + ) Vin q ( n + ) = V in ( n + ) Vout EE37-0
q ( n + ) = q ( n) q ( n + ) zq ( z) = Q ( z) zq ( z) Q ( z) -------------- Q ( z) = z ------------ z V out ( z) ------------------- V in ( z) ------ z ------------ z Delaying (and inverting) integrator = EE37 - Half-Delay Integrator Single-ended circuit: Vin φ φ φ φ φ Sample output on φ Vout Timing: Vin φ φ φ v in ( n) v in ( n + ) φ Vout v out ( n) v out n + Time ( ) EE37 -
Half-Delay Integrator Output is sampled on a different phase than the input z Some use the notation Hz ( ) = ------------ / to denote the shift in sampling time z I consider this an abuse of notation. An alternative method is to declare that the border between time n and n+ occurs at the end of a specific phase, say φ A circuit which samples on φ and updates on φ is non-delaying, i.e. Hz ( ) = z ( z ), whereas a circuit which samples on φ and updates on φ is delaying, i.e. Hz ( ) = ( z ). EE37-3 Timing in a Σ AD The safest way to deal with timing is to construct a timing diagram and verify that the circuit implements the desired difference equations E.g. MOD: un ( ) x ( n + ) x ( n + ) x ( n) z - z - x ( n) vn ( ) Q Difference Equations: v( n) = Qx ( ( n) ) x ( n + ) = x ( n) vn ( ) + un ( ) x ( n + ) = x ( n) vn ( ) + x ( n + ) (0) () () EE37-4
Switched-apacitor Realization x x Reference feedback shares input/interstage capacitor v Timing x (n) x (n+) x (n) x (n+) 0 v(n) Timing looks OK! EE37-5 Signal Swing So far, we have not paid any attention to how much swing the op amps can support, or to the magnitudes of u, V ref, x and x For simplicity, assume: the full-scale range of u is ± V, the op-amp swing is also ± V and V ref =V We still need to know the ranges of x and x in order to accomplish dynamic-range scaling EE37-6
Dynamic-Range Scaling In a linear system with known state bounds, the states can be scaled to occupy any desired range e.g. one state of original system: α β α z x β state scaled by /k: α k kβ α k z x k k β EE37-7 State Swings in MOD U Linear Theory z z X X z Q E V V = z U + ( z ) E z X = ------------ ( U V) = U ( z z )E X = V E = z U + ( z + z )E If u is constant and e is white with power σ e = 3, then x = u, σ x = σ = 3, e x = u and σ x = 5σ = 5 3 e EE37-8
0.8 0.6 0.4 0. ρ x Simulated Histograms mean = 0.0 sigma = 0.67 u = 0. 0.4 0.3 0. 0. ρ x mean = 0.4 sigma =.4 0.8 0 4 3 0 3 4 u = 0.7 0.4 0 5 4 3 0 3 4 5 0.6 0.4 ρ x mean = 0.70 sigma = 0.6 0.3 0. ρ x mean =.5 sigma =.8 0. 0. 0 4 3 0 3 4 0 5 4 3 0 3 4 5 EE37-9 Observations The match between simulations and our linear theory is fair for x, but poor for x x s mean and standard deviation match theory, although x s distribution does not have the triangular form that would result if e were white and uniformly-distributed in [,]. x s mean is 50-00% high, its standard deviation is ~5% low, and the distribution is weird. Our linear theory is not adequate for determining signal swings in MOD No real surprise. Linear theory does not handle overload, i.e. where x, x when u >. Is there a better theory? EE37-30
x 4 3 0 - MOD s Dynamics Second-order DT system with a step nonlinearity parabolic trajectory D For a constant input, ( x ( n), x ( n) ) follow parabolic trajectories in state-space, except when crossing the step (i.e. when x changes sign). B One clock tick u = π x 4 3 0 - D B + B - A -3 - - 0 - D + A -3 - - 0 x x If the image is inside the original, we have a positively-invariant set EE37-3 MOD D-Input State Bounds By computing the state-space trajectories with u as a parameter, Hein & Zakhor [ISAS 99] determined invariant sets analytically and thereby arrived at the following bounds for u : x u + x ( 5 u ) 8 ----------------------- ( u ) Note that the bound on as u x In order to use this formula for dynamic-range scaling, we need to restrict the u to a fraction of fullscale. EE37-3
0 omparison with Simulation 8 x x 6 4 analytic bounds x simulation 0 0 0. 0.4 0.6 0.8 EE37-33 u State Bounds for MOD Nonlinear Theory So we do have some better theory, but it Appears to be conservative Especially for u close to FS. Predicts that x can be arbitrarily large Simulations indicate that x does get big as u, but not quite as big as the theory predicts. 3 Assumes the input is constant Attempts to generalize the method for arbitrary inputs could only prove stability for u < 0.. Inputs with u = 0.3 have been constructed which drive MOD unstable! EE37-34
Example Hostile Input u = 0.3 0.3 u 0 0.3 0 00 00 Input signal chosen to cause the comparator in MOD to make bad decisions Requires knowledge of MOD s internal state. Inputs like this are unlikely to occur in practice EE37-35 Scaled MOD Take x = 3 and x = 9 The first integrator should not saturate. The second integrator will not saturate for dc inputs up to 3 dbfs and possibly as high as dbfs. Our scaled version of MOD is then U z X X /3 /3 z z 9 Q V /3 /9 Omit since sgn(ky ) = sgn(y ) EE37-36
First Integrator (INT) Shared Input/Reference aps +Vref Vref v v 3 V u V x U / 3 / 3 V z z v v +Vref Vref 3 M of V ref = M of V u How do we determine? EE37-37 kt/ Noise R v n Fact: Regardless of the value of R, the meansquare value of the voltage on is v n kt ------- where k =.38 0 3 J/K is Boltzmann s constant and T is the temperature in Kelvin The ms noise charge is q n = v n = kt. = EE37-38
Derivation of kt/ Noise Equipartition of Energy physical principle: In a system at thermal equilibrium, the average energy associated with any degree of freedom is kt. This applies to the kinetic energy of atoms (along each axis of motion), vibrational energy in molecules and to the potential energy in electrical components. Fact: The energy stored in a capacitor is --V So, according to equipartition, --V, or = --kt V kt = ------- EE37-39 Implications for an S Integrator Each charge/discharge operation has a random component The amplifier plays a role during phase, but we ll assume that the noise in both phases is just kt/. We ll revisit this assumption in Lecture 0. For a given cap, these random components are essentially uncorrelated, so the noise is white q q t = q +q q q = q = kt q t = q + q = kt EE37-40
Integrator Implications (cont d) This noise charge is equivalent to a noise voltage with ms value v n = kt added to the input of the integrator: v n z z This noise power is spread uniformly over all frequencies from 0 to f s The power in the band [ 0, f B ] is v n OSR EE37-4 Differential Noise v n v n = v n + v n v n v n = v v n + n Twice as many switched caps twice as much noise power The input-referred noise power in our differential integrator is v n = 4kT EE37-4
INT Absolute apacitor Sizes For SNR = 00 db @ 3-dBFS input The signal power is v ( V) s = -- ---------------- = 0.5 V 3 dbfs Therefore we want = 0.5 0 0 V Since = v n OSR v n, in-band If we want 0 db more SNR, we need 0x caps EE37-43 A ------ v n, in-band 4kT = ----------- =.33 pf v n Second Integrator (INT) Separate Input and Feedback aps 3 9 X / 3 z z v V x V ref v v v 3 V x EE37-44 9 M of V x M of V ref M of op amp input / 9 V
INT Absolute apacitor Sizes In-band noise of second integrator is greatly attenuated π = ------------- OSR INT gain @ pb edge: A ω B 3 = --------- = apacitor sizes not dictated by thermal noise harge injection errors and desired ratio accuracy set absolute size A reasonable size for a small cap is currently ~0 ff. ω B OSR ------------- 3π INT noise attenuation: > OSR A 0 6 EE37-45 Behavioral Schematic EE37-46
Verification Open-loop verification Loop filter omparator Since MOD is a -bit system, all that can go wrong is the polarity and the timing. Usually the timing is checked by (), so this verification step is not needed. losed-loop verification 3 Swing of internal states 4 Spectrum: SQNR, STF gain 5 Sensitivity, start-up, overload recovery, EE37-47 Loop-Filter heck Theory Open the feedback loop, set u = 0 and drive an impulse through the feedback path U =0 z z X X z Q X ------------ z z = + z ------------ Y yn ( ) = { 00,,, } x ( n) = {, 3, 4, } If x is as predicted then the loop filter is correct At least for the feedback signal, which implies that the NTF will be as designed. EE37-48 V
Loop Filter heck Practice * l(r) l(p) l(p) l(v) 0 X x_matlab -00 xe-3-00 -300-400 0 X x_matlab -.5 - -.5 0.5.5.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 0 0.5 time, xe-6 Seconds *. In theory there is no difference between theory and practice. But in practice there is. EE37-49 Hey! You heated! An impulse is {,0,0, }, but a binary DA can only output ±, i.e. it cannot produce a 0 Q: So how can we determine the impulse response of the loop filter through simulation? A: Do two simulations: one with v = {,,, } and one with v = {+,,, }. Then take the difference. According to superposition, the result is the response to v = {,0,0, }, so divide by. To keep the integrator states from growing too quickly, you could also use v = {,,+,, } and then v = {+,,+,, }. EE37-50
v(xp,xn).5 0 -.5 Simulated State Swings 3-dBFS ~300-Hz sine wave Swing < V p,diff - v(xp,xn).5 Swing < V p,diff 0 -.5-0 4 6 8 0 4 6 8 0 4 6 8 30 3 34 time (ms) EE37-5 0 db(spec) db(sqq) Unclear Spectrum -0-40 -60-80 -00-0 -40-60 0 00 00 300 400 500 freq, xe3 Hertz EE37-5
0 0 40 Professional Spectrum SQNR = 05 db @ OSR = 500 dbfs/nbw 60 80 00 Smoothed Spectrum 08-dBc 3 rd harmonic Theoretical PSD (k = ) 0 40 00 k 0k 00k Frequency (Hz) NBW=46Hz SQNR dominated by 09-dBFS 3 rd harmonic EE37-53 Implementation Summary hoose a viable S topology and manually verify timing Do dynamic-range scaling You now have a set of capacitor ratios. Verify operation: loop filter, timing, swing, spectrum. 3 Determine absolute capacitor sizes Verify noise. 4 Determine op-amp specs and construct a transistor-level schematic Verify everything. 5 Layout, fab, debug, document, get customers, sell by the millions, go public, EE37-54
NLOTD: Kelvin onnection How to measure V accurately when R p + ωl p is a significant fraction of R? R p L p R V + Use dedicated wires for sensing Also called a 4-wire, Force/Sense or urrent/ Potential connection. ommon in power supplies. EE37-55 Differential vs. Single-Ended Differential is more complicated and has more caps and more noise single-ended is better? ±V / ±V ± V SNR / ( V ) V = -------------------------------- = ----------- SNR 4kT ( ) 4kT V = ------------------- = kt V ----------- 4kT Same capacitor area same SNR Differential is generally preferred due to rejection of even-order distortion and common-mode noise/ interference. EE37-56
Double-Sampled Input V u Doubles the effective input signal Allows to be 4 the size for the same SNR Doubles the sampling rate of the signal, thereby easing AAF further EE37-57 Shared vs. Separate Input aps Separate caps More noise: V input: = kt v n V V input: v n V gain / V gain: = kt v n referred to V : v n V Total noise referred to V : ( kt )( + ) But using separate caps allows input M to be different from reference M, and so is often preferred in a general-purpose AD EE37-58
Signal-Dependent Ref. Loading Another practical concern is the current draw from the reference V ref αsinωt V ref,actual V in V in AD Output -------------------------------------------- ---------- ( + εsinωt ) V ref ( εsinωt ) V ref If the reference current is signal-related, harmonic distortion can result EE37-59 Shared aps and Ref. Loading +Vref Vref v v +V ref q V u V u v v +Vref Vref q = ( V ref V u ), v = + ( V ref + V u ), v = EE37-60
Thus I = --- V T ( ref v Vu ) If u = Asinω u t, thenv = u + error also contains a component at ω u and thus I contains a component at ω = ω u. Since AD Output V in ( + εsinωt ), the signaldependent reference current in our circuit can produce 3 rd -harmonic distortion Also, the load presented to the driving circuit is dependent on v and this noisy load can cause trouble. With separate caps, the reference current is signal-independent Yet another reason for using separate caps. EE37-6 Unipolar Reference V ref v v + v q = v V ref DA v (n ) v (n +) Be careful of the timing of v relative to the integration phase! EE37-6
V u v V ref Single-Ended Input Shared aps v Full-scale range of V u is [0,V ref ]. v V ref v v (n ) v (n +) EE37-63 Homework # onstruct a differential switched-capacitor implementation of MOD using ideal elements and verify it. Your circuit should accept a single-ended input and use a unipolar -V reference. Scale the circuit such that [0,] V is the half-scale input range ([,3] V would be the full-scale input range) and such that the op amp swing is 0.5 V p,diff at 6 dbfs. hoose capacitor values such that the SNR with a 6 dbfs input should be ~90 db when OSR = 56. EE37-64
What You Learned Today And what the homework should solidify MOD implementation Switched-capacitor integrator S summer & DA too 3 Dynamic-range scaling 4 kt/ noise 5 Some MOD nonlinear theory 6 Verification strategy EE37-65