HO10_315aSP09_SC_part2

HO10_315aSP09_SC_part2 - Switched Capacitor Filters Part II...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Switched Capacitor Filters Part II Boris Murmann Stanford University murmann@stanford.edu Corrections: Slide 6, 7: Vo(n-3/2) (instead of (n-1) Slide 8, 9: deleted extra j in denominator Slide 28: MHz kHz Copyright © 2009 by Boris Murmann B. Murmann EE315A ― HO #10 1 Anatomy of an SC Filter • All signals in this processing chain are continuous in time (as all physical signals) h i l i l ) • However, the core of the filter ( “sampled data filter” block) can typically be modeled as a “discrete time” system z-transform – The core takes voltage samples at the input and produces samples at the output – The internal transients that generate these samples are irrelevant, as long as they have settled at the time the sample is taken g y p B. Murmann EE315A ― HO #10 2 Signal Nomenclature time Continuous Time Signal T/H Signal ("Sampled Data Signal") Clock Discrete Time Signal Abstraction EE315A ― HO #10 B. Murmann 3 z-Domain Representation of Simple SC Filter Vin 1 VC1 2 Vout C1 H( s ) = C2 T −s s e 2 Vout ( s ) = Viin ( s ) 1 + C2 1 − e −sTs C1 ( − B. Murmann EE315A ― HO #10 esTs 1 V (z) z 2 H( z ) = out = Vin ( z ) 1 + C2 1 − z −1 C1 ( ) z ) 4 Noninverting Integrator Analysis (1) n-1/2 n+1/2 n+3/2 φ2 φ1 t/Ts • • n-1 n Sample Vi Output can be sampled during either φ1 or φ2 n+1 Output held at end value from previous half cycle Charge redistribution (output ready at end of this phase) Sampling at φ1 means that there will be an additional ½ clock cycle delay (z-1/2) EE 315 Lecture 16 B. Murmann 5 Noninverting Integrator Analysis (2) n-1/2 n+1/2 n+3/2 2 1 t/Ts n-1 n n+1 t/Ts Qs QI n-1 Cs·Vi(n-1) CI·Vo(n-1)=CI·Vo(n-3/2) n-1/2 0 CI·Vo(n-1/2) = CI·Vo(n-3/2) + Cs·Vi(n-1) V V V Vo2 n Cs·Vi(n) CI·Vo(n) = CI·Vo(n-1) + Cs·Vi(n-1) Vo1 n+1/2 … … B. Murmann EE 315 Lecture 16 6 Noninverting Integrator Analysis (3) 1⎞ 3⎞ ⎛ ⎛ CIVo 2 ⎜ n − ⎟ = CIVo 2 ⎜ n − ⎟ + CsVi ( n − 1) 2⎠ 2⎠ ⎝ ⎝ CIVo 2 ( z )z − 1 2 =z − 3 2C V ( z ) + z −1C V ( z ) I o2 s i − 1 V ( z ) Cs z 2 H2 ( z ) = o 2 = Vi ( z ) CI 1 − z −1 H1( z ) = • “LDI Integrator” (Lossless Digital Integrator) Vo1( z ) Cs z −1 = Vi ( z ) CI 1 − z −1 “DDI Integrator” (Direct Digital Integrator) What is the frequency response of this integrator? – First look at H2(z) ( ) EE 315 Lecture 16 B. Murmann 7 Frequency Response (H2) −1 H2 ( ω ) = H2 ( z ) z = e j ωTs C z 2 = s CI 1 − z −1 = z = e j ωTs Cs CI 1 1 2 z −z − 1 2 z = e j ωTs = cos ( ωTs ) + j sin ( ωTs ) 1 = Cs CI = Cs 1 CI j ωTs ⎛ ωT cos ⎜ s ⎝ 2 Ideal ⎞ ⎛ ωTs ⎟ + j sin ⎜ 2 ⎠ ⎝ ⎞ ⎛ ωTs ⎟ − cos ⎜ 2 ⎠ ⎝ ωTs C 1 ≅ s ⎛ ωT ⎞ CI j ωTs 2 sin ⎜ s ⎟ ⎝ 2 ⎠ ⎞ ⎛ ωTs ⎞ ⎟ + j sin ⎜ 2 ⎟ ⎠ ⎝ ⎠ for f ωTs f = π << 1 2 fs Magnitude error • Behaves like an RC integrator for low frequencies (f << fs) – R replaced by 1/(fsCs), as before B. Murmann EE315A ― HO #10 8 Frequency Response (H1) H1( ω ) = H1( z ) z = e j ωTs = C = s CI z 1 2 z − Cs z −1 CI 1 − z −1 z = e j ωTs 1 2 −z − 1 2 = z = e j ωTs Cs 1 CI j ωTs Ideal ωTs ⎛ ωT ⎞ 2 sin ⎜ s ⎟ ⎝ 2 ⎠ e −j ωTs 2 Phase error Magnitude error • Magnitude error as before, but now there’s also a phase error – Bad news if we are looking to build a high Q filter • Numerical example for f=fs/32 – Magnitude error = 0.16% may not be a problem – Phase error = -5 6 degrees 5.6 big problem! EE315A ― HO #10 B. Murmann 9 Inverting Integrator n-1/2 n+1/2 n+3/2 φ2 φ1 t/Ts H1( z ) = − H2 ( z ) = − B. Murmann Input induces charge change (output ready at the end of this phase) Cs 1 CI 1 − z −1 − n n+1 Next cycle Reset Cs (output held at previous value) 1 2 Cs z CI 1 − z −1 n-1 “LDI” EE 315 Lecture 16 10 General Building Block phi1 Ci phi1 phi2 C1 Vo1 phi1c Vi1 phi2 phi2c phi1 Vo2 phi2 phi1 phi1 C2 Vi2 phi2 phi2 C3 Vi3 Vo1 ( z ) = C C1 z −1 C 1 V z − 2 V z − 3V z −1 i 1 ( ) C −1 i 2 ( ) C i 3 ( ) Ci 1 − z i 1− z i −1 −1 C C z 2 C z 2 Vo 2 ( z ) = 1 Vi 1 ( z ) − 2 V ( z ) − 3 Vi 3 ( z ) −1 −1 i 2 Ci 1 − z Ci 1 − z Ci EE315A ― HO #10 B. Murmann 11 Let’s Build a Biquad -Rx2/R -Vin -1/Rx RLC Prototype IL 2 Rx sL 1/Rx 1 sC − Vout 1 2 1 z → s 1 − z −1 -1/Rx 1/R • Key objective y j – Avoid integrator phase errors • Conceptually two possible solutions – T to use only LDI i t Try t l integrators t – Combine delaying (DDI) and non-delaying integrator to achieve LDI behavior B. Murmann EE315A ― HO #10 12 Realization p2! p2! Cr1 clock_gen p2! p1! Cf p1! p1! p2! p1! Iclk p1! A1 p1! p1! A2 p2! vo1 p2! Cs2 Cs1 gain_ideal G: 1e+06 G:-1e+06 p2! vx1 gain_ideal G: 1e+06 G:-1e+06 Is1 1 Pin vo_samp Pout ideal sampler Nin p1! p1! p2! I31 vo2 Ci2 vx2 Ci1 p2! Nout z-1 Is2 vi Pin vi_samp Pout ideal sampler Nin Nout V0 EE315A ― HO #10 B. Murmann 13 Component Values Target: ω Pick: C := 10pF P := 2 ⋅π ⋅10kHz LC component values: QP := 5 Rx := 1MΩ R := fs := 1MHz 1 ω P ⋅ QP ⋅ C = 318.31 ⋅kΩ 1 L := ω = 25.33 H 2 P ⋅C SC component values: Ci2 := C = 10 ⋅ pF Cs1 := L Cr1 := Ci1 := Cf := B. Murmann 2 = 25.33 ⋅pF Rx 1 = 1 ⋅ pF fs ⋅ R x EE315A ― HO #10 Cs2 := 1 = 1 ⋅pF fs ⋅ Rx R 2 = 0.318 ⋅pF fs ⋅ R x 1 = 1 ⋅pF fs ⋅ Rx 14 PAC Output B. Murmann EE315A ― HO #10 15 Linear Frequency Axis B. Murmann EE315A ― HO #10 16 High Frequency Behavior • Our RLC prototype filter has two zeros at infinity p yp y – Where did these go in the SC realization? • It would be great to have some zeros at high frequencies – E.g. fs/2 would be a great place! – This can help improve the stopband attenuation, especially when we’re trying to minimize fs • Need to think about how exactly frequencies are mapped from the continuous time prototype to the switched capacitor realization EE315A ― HO #10 B. Murmann 17 CT – SC Integrator Comparison • RC and SC (DLI) integrator transfer functions −1 1 1 HRC ( s ) = = sRC 2πjfRC RC • C z 2 C 1 HSC ( z ) = s = s −1 Ci 1 − z Ci 2 j sin ( πfSCTs ) In our LDI-based design, we set the RC time constant equal to the approximate SC time constant, i.e. RC = • Ci fsCs Setting HRC(fRC) = HSC(fSC) therefore gives fRC = B. Murmann ⎛ f ⎞ fs sin ⎜ π SC ⎟ π ⎝ fs ⎠ EE315A ― HO #10 18 Frequency Warping (LDI) fRC = 1 0.9 ⎛ f ⎞ fs sin ⎜ π SC ⎟ π ⎝ fs ⎠ 0.8 • Frequency mapping is q y pp g accurate only for fRC<< fs • RC frequencies up to fs/π map to “physical SC” physical SC frequencies • 0.7 07 Mapping is symmetric about fs/2 ( li i ) b t (aliasing) f SC/f s 0.6 0.5 0.4 04 0.3 0.2 0.1 01 0 0 0.1 B. Murmann 0.2 f RC/f s 0.3 0.4 EE315A ― HO #10 19 A Closer Look at Integration Methods LDI integrators apply a “midpoint integration • Sig gnal Amplitude • A much more accurate way to integrate is using a trapezoidal g g p (“bilinear”) integration rule S Signal Amplitud de v o ( nTs ) = v o ( nTs − Ts ) + • B. Murmann Ts ⎡v i ( nTs ) + v i ( nTs − Ts ) ⎤ ⎦ 2 ⎣ Many others exist, e.g. E l M th i t Euler, Runge Kutta, Gear, … EE315A ― HO #10 20 Bilinear Integrator v o ( nTs ) = v o ( nTs − Ts ) + Ts ⎡v i ( nTs ) + v i ( nTs − Ts ) ⎤ ⎦ 2 ⎣ ⎡1 − z −1 ⎤ Vo ( z ) = Ts ⎡1 + z −1 ⎤ Vi ( z ) ⎣ ⎦ ⎦ 2 ⎣ HBL ( z ) = • Vo ( z ) Ts 1 + z −1 = 2 1 − z −1 Vi ( z ) Bilinear transform s→ 2 1 − z −1 Ts 1 + z −1 EE315A ― HO #10 B. Murmann 21 Frequency Warping (Bilinear) 1 = HBL ( z ) z = e2 πjfBLTs s s = 2πjfRC 0.5 0.4 ⇒ fRC = ⎛ f ⎞ fs tan ⎜ π BL ⎟ π ⎝ fs ⎠ 0.3 No frequencies are lost – E g zeros at infinity E.g. will be mapped to fs/2 • f BL/f s • Can show that bilinear transform maps jω axis in s plane onto unit circle in z-plane 0.2 0.1 0 0 1 2 3 4 5 f RC/f s B. Murmann EE315A ― HO #10 22 Possible Design Procedure • Pre-warp “important” frequencies, e.g. passband edge and/or stopband edge using fRC = ⎛ f ⎞ fs tan ⎜ π BL ⎟ π ⎝ fs ⎠ • Note that pre warping is important mostly for filters that try to pre-warping aggressively push toward minimum fs • Determine continuous time prototype filter function H(s) using pre-warped pre warped frequency specifications • Substitute • Implement z- transfer function using a known (and wellunderstood) Biquad realization, ladder, etc. s→ 2 1 − z −1 Ts 1 + z −1 EE315A ― HO #10 B. Murmann 23 Alternative • Let Matlab do all of this… • Design filter in z-domain, e.g. g , g [B,A] = BUTTER(N, fc_fs) • Matlab will then automatically • Pre-warp the frequency specifications • Carry out a bilinear transform (using function (“bilinear”) • Give you the z-transfer function of the filter B. Murmann EE315A ― HO #10 24 Martin-Sedra Biquad K. Martin and A. S. Sedra, “Strays-insensitive switched-capacitor filters based on the bilinear z transform ” Electron Lett., vol. 19, pp. 365-6, June 1979 transform, Electron. Lett vol 19 pp 365 6 1979. B. Murmann EE315A ― HO #10 25 “Low-Q” Biquad R. Gregorian, K.W. Martin, and G.C. Temes, “Switched-Capacitor Circuit Design,” Proceedings of the IEEE, vol. 71, no. 8, pp. 941966, Aug. 1983. 966 Aug 1983 B. Murmann EE315A ― HO #10 26 “Hi-Q” Biquad R. Gregorian, K.W. Martin, and G.C. Temes, “Switched-Capacitor Circuit Design,” Proceedings of the IEEE, vol. 71, no. 8, pp. 941966, Aug. 1983. EE315A ― HO #10 B. Murmann 27 Lowpass Example Using Bilinear Transform • Specs: fPBL=10kHz, QP=5, fs=1MHz • Pre-warping ( p g (not all that significant in this example…) g p ) fPRLC = ⎛ f ⎞ 1MHz fs ⎛ 10kHz ⎞ tan ⎜ π P ⎟ = tan ⎜ π ⎟ = 10.002MHz π π ⎝ 1MHz ⎠ ⎝ fs ⎠ 1 H( s ) = 1+ s ωPRLCQP + s2 s→ 2 1 − z −1 Ts 1 + z −1 2 ωPRLC • Compute H(z) • Implement using Biquad • Simulate, plot frequency response… B. Murmann EE315A ― HO #10 28 Frequency Response 0 Mag gnitude [dB] -20 -40 -60 Notch at fs/2 -80 80 -100 2 10 10 3 4 10 f [Hz] 10 5 10 6 EE315A ― HO #10 B. Murmann 29 Linear Frequency Axis 0 Magnitude [dB] -20 -40 -60 -80 80 -100 B. Murmann 0.2 0.4 0.6 0.8 1 f [Hz] EE315A ― HO #10 1.2 1.4 1.6 1.8 2 x 10 6 30 LDI versus Bilinear Transform • LDI transform – Realized by “standard” SC integrators – High frequency zeros are lost – Simple filter synthesis • Replace RC integrators with SC integrators, ensuring p p delays p g g , g proper y around integrator loops (z-1/2 per integrator) • Bilinear transform – Does not lose high frequency zeros – Biquad-based synthesis • Direct coefficient comparison with known realizations – Ladders • See e.g. R.B. Datar and A.S. Sedra, “Exact design of straysinsensitive switched capacitor high-pass ladder filters,” Electronics Letters, vol 19 no 29 pp. 1010-1012, Nov. 1983. Letters vol. 19, no. 29, pp 1010 1012 Nov 1983 B. Murmann EE315A ― HO #10 31 ...
View Full Document

This note was uploaded on 08/13/2009 for the course EE 315 taught by Professor Borismurmann during the Spring '09 term at Stanford.

Ask a homework question - tutors are online