HO9_315aSP09_SC_part1

HO9_315aSP09_SC_part1 - Switched Capacitor Filters Part I...

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 I Boris Murmann Stanford University [email protected] Modifications: Slide 6: deleted –R expression Slide 7: new t1 on RHS at bottom Slide 14 (15): t2 Slide 31 (32): added a comment Copyright © 2009 by Boris Murmann B. Murmann EE315A ― HO #9 1 The First SC Circuit • Described in – James Clerk Maxwell, A treatise on electricity and magnetism. Oxford: Clarendon Press, 1873, pp. 420-425. • Stanford Engineering Library: QC518.M46 V.1 • Maxwell describes how to measure a resistor value by periodically reversing the polarity of a capacitor connected in parallel – He even thought about nonidealities such as charge injection… B. Murmann EE315A ― HO #9 2 Emulating a Resistor Ts=1/fs V1 V1 R C 2 2 V2 1 V2 1 1 2 time V −V i= 1 2 R Δq = C (V1 − V2 ) iavg = g Ravg = B. Murmann Δq Δq = = fs ⋅ C (V1 − V2 ) Δt Ts 1 fs ⋅ C (Note: current flows in “bursts”) EE315A ― HO #9 3 Switched Capacitor Circuits SC low-pass filter (passive) low pass SC integrator SC gain stage ( (Actual implementations are differential) p ) B. Murmann EE315A ― HO #9 4 Discussion • One of the most significant inventions in the history of ICs • pp precision signal p g processing in CMOS g Predominant approach for p – CMOS technology provides good switches & capacitors • SC circuits have many advantages over RC implementations – Transfer function set by ratio of capacitors • RC product suffers from large process variations – Corner frequencies (of filters) can be adjusted by changing clock frequency – Can make large time constants without using large resistors • RC lowpass, 100Hz: R=16MΩ, C=100pF • SC lowpass, 100Hz: f=10kHz, C1=6.25pF, C2=100pF p , , p , p • Reference – R. Gregorian et al., "Switched-Capacitor Circuit Design," Proceedings of the IEEE Vol 71 No 8 August 1983 IEEE, Vol. 71, No. 8, 1983. B. Murmann EE315A ― HO #9 5 “Parasitic Sensitive” Configurations Ravg = Ravg = g • 1 fs ⋅ C 1 fs ⋅ C Ravg is affected by parasitic capacitances (e.g. wire capacitance, junction capacitance, etc.) B. Murmann EE315A ― HO #9 6 Inverting Configuration V1 During φ1: φ1 C + - φ2 q1 = CV1 φ2 V2 V1 1 + 2 - V2 During φ2: φ1 2 Δq = −CV2 − CV1 = C ( −V1 − V2 ) • Q C 1 q2 = −CV2 iavg = fsC ( −V1 − V2 ) Compared to the circuit on slide 3, the effect of V1 is “inverted” because C is flipped upside down during φ2 (+ terminal at GND) – Provides signal inversion EE315A ― HO #9 B. Murmann 7 R0 0 3.1 1831M RC and SC Filter Transient Analysis (1) vrc C0 1p clock_gen s1 Iclk p1! p1! s4 ideal p2! V0 vo:0 va:1 freq:3K p2! vsc ideal C1 314.16f C2 1p fs = 1MHz, fc = 50kHz, fin=3kHz B. Murmann EE315A ― HO #9 8 RC and SC Filter Transient Analysis (2) • RC SC output is a “staircase approximation” of the RC pp filtered signal – Slightly delayed SC EE315A ― HO #9 B. Murmann 9 Waveform Details p2 p1 p2 p1 New output value p2 Output held Vin VC1 tracks input B. Murmann VC1 held EE315A ― HO #9 10 Waveforms with Larger Ron (1Ω p1 B. Murmann p2 p1 p2 100kΩ) p1 EE315A ― HO #9 11 Frequency Response ? • Looking at the transient waveforms is fun, but what can we say about the frequency response of the SC circuit? • Looks like a tough question since the output signal looks “complicated” – Not just a sine wave with shifted p j phase and altered magnitude, as in the RC case – Instead we have a staircase waveform with “rounded” edges (due to finite switch resistance) • Part of the problem is that SC circuits are time variant – The configuration is periodically switched between two states Time variant circuits, in principle, introduce new frequencies – Think about spectral components caused by the voltage “steps” at the output • B. Murmann EE315A ― HO #9 12 First Pass Analysis t1 • t2 Let’s try to find the relationship between Vin(t1) and Vout(t2) – Thi means we are looking at the relationship between This l ki t th l ti hi b t “discrete time samples” of the voltages and ignore the fact that the output is really a continuous time signal EE315A ― HO #9 B. Murmann 13 Circuit Analysis (1) • During φ1, VC1 tracks Vin Vin 1 VC1 2 C1 • Vout C2 If we assume that the tracking is reasonably fast, such that there g y , is only a negligible difference between the input and VC1, we can write VC1(t1 ) = Vin (t1 ) QC1(t1 ) = C1 in (t1 ) V B. Murmann EE315A ― HO #9 14 Circuit Analysis (2) • During φ2, the output voltage and VC1 are equalized t1 Vin 1 VC1 2 Vout 1 C1 C2 2 t0 • Again, assuming that the circuit settles precisely, we can write VC1(t 2 ) = Vout (t 2 ) • t2 QC1(t2 ) + QC 2 (t2 ) = (C1 + C2 )Vout (t 2 ) The sum of the charges must be equal to the charges that were previously on C1 and C2, before the φ2 switch turned on, i.e. QC1( t2 ) + QC 2 ( t2 ) = QC1( t1 ) + QC 2 ( t0 ) EE315A ― HO #9 B. Murmann 15 Circuit Analysis (3) QC1(t2 ) + QC 2 (t2 ) = QC1(t1 ) + QC 2 (t0 ) (C1 + C2 )Vout (t2 ) = C1Vin (t1 ) + C2Vout (t0 ) Vout (t2 ) = Vout (t2 ) = • C1 C2 Vin (t1 ) + Vout (t0 ) C1 + C2 C1 + C2 T ⎞ C1 C2 ⎛ Vin ⎜ t2 − s ⎟ + Vout (t2 − Ts ) C1 + C2 2 ⎠ C1 + C2 ⎝ Laplace Transform V(t ) → V( s ) V(t − Δt ) → V( s )e − sΔt B. Murmann EE315A ― HO #9 16 Circuit Analysis (4) −s C1 Vout ( s ) = Vin ( s ) e C1 + C2 Ts 2 + C2 Vout ( s ) e −sTs C1 + C2 −s ⎛ ⎞ C2 C1 Vout ( s ) ⎜ 1 − e − sTs ⎟ = Vin ( s ) e ⎝ C1 + C2 ⎠ C1 + C2 H( s ) = • T −s s e 2 Vout ( s ) = Vin ( s ) 1 + C2 1 − e − sTs C1 ( Ts 2 ) Let’s plot this frequency response and compare to the simple RC filter EE315A ― HO #9 B. Murmann 17 Ph hase [deg] Magnitude [d dB] Frequency Response 0 -10 -20 -30 3 10 SC RC 10 4 5 10 f [Hz] 10 6 10 7 Close only for f << fs 200 0 -200 3 10 B. Murmann 10 4 5 10 f [Hz] 10 6 EE315A ― HO #9 10 7 18 First Order Approximation H( s ) = T −s s e 2 Vout ( s ) = Vin ( s ) 1 + C2 1 − e − sTs T C1 ( H( j ω) = ) T − jω s 2 e Vout ( j ω) = Vin ( j ω) 1 + C2 1 − e − j ωTs C1 ( ωTs = 2π ) f fs e jx = cos( x ) + j sin( x ) ≅ 1 + jx (for small x) f Vout ( j ω) fs ≅ = 1 Vin ( j ω) 1 + C2 j ωT 1+ jω C s fs ⋅ C1 2 C1 1− jω Ts 2 1− j π " Ravg " EE315A ― HO #9 B. Murmann 19 P Phase [deg] Magnitude [d dB] fs = 5MHz (Previously 1MHz) 0 -20 -40 3 10 SC RC 10 4 5 10 f [Hz] 10 6 10 7 Better! 200 0 -200 3 10 B. Murmann 10 4 5 10 f [Hz] 10 6 EE315A ― HO #9 10 7 20 M Magnitude [d dB] Linear Frequency Axis 0 -20 SC RC -40 40 2 4 6 8 10 P Phase [deg] f [Hz] x 10 6 200 The transfer function is periodic with period fs Why? 0 -200 0 2 4 6 8 10 f [Hz] x 10 6 EE315A ― HO #9 B. Murmann 21 Aliasing (1) Am mplitude fs = 1 = 1000kHz Ts fin = 101kHz Time ⎛ ⎞ f v in ( n ) = cos ⎜ 2π ⋅ in ⋅ n ⎟ fs ⎝ ⎠ v in ( t ) = cos ( 2π ⋅ fin ⋅ t ) t → n ⋅ Ts = B. Murmann n fs EE315A ― HO #9 101 ⎛ ⎞ = cos ⎜ 2π ⋅ ⋅n⎟ 1000 ⎠ ⎝ 22 Aliasing (2) Am mplitude fs = 1 = 1000kHz Ts fin = 899kHz Time ⎛ 899 101 ⎛ ⎞ ⎡ 899 ⎤ ⎞ ⎛ ⎞ v in ( n ) = cos ⎜ 2π ⋅ ⋅ n ⎟ = cos ⎜ 2π ⋅ ⎢ − 1⎥ ⋅ n ⎟ = cos ⎜ 2π ⋅ ⋅n⎟ 1000 ⎠ 1000 ⎠ ⎝ ⎣ 1000 ⎦ ⎠ ⎝ ⎝ EE315A ― HO #9 B. Murmann 23 Aliasing (3) Amplitude fs = 1 = 1000kHz Ts fin = 1101kHz Time ⎛ 1101 ⎞ 101 ⎛ ⎡ 1101 ⎤ ⎞ ⎛ ⎞ ⋅ n ⎟ = cos ⎜ 2π ⋅ ⎢ − 1⎥ ⋅ n ⎟ = cos ⎜ 2π ⋅ ⋅n⎟ v in ( n ) = cos ⎜ 2π ⋅ 1000 ⎠ 1000 ⎠ ⎝ ⎣ 1000 ⎦ ⎠ ⎝ ⎝ • Bottom line – The frequencies fin and N·fs ± fin (N integer), are indistinguishable when the signal is represented using discrete times samples at a rate of fs B. Murmann EE315A ― HO #9 24 Spectrum of Continuous Time Output • The previous analysis allows us to reason about the output values at discrete time instances (falling edge of φ2) • What can we say about the spectrum of the continuous time waveform? • Let s Let’s first simplify this question by assuming a very “sharp” sharp staircase waveform, i.e. assume Ron 0 B. Murmann EE315A ― HO #9 25 Zero-Order Hold Signal Ampl litude • A basic way to think about this is to assume that the discrete time values are held for one cycle to generate a continuous time staircase – For simplicity, we ll ignore details relating we’ll to the “phase” position of the hold pulse relative to the discrete time sample and focus on the magnitude response • • B. Murmann What will the spectrum of the continuous time signal look like? We'll analyze this in two steps y p – First look at infinitely narrow pulses in continuous time EE315A ― HO #9 26 Dirac Pulses Ampl litude • Vdirac(t) is zero between pulses – Note that the discrete time sequence is undefined at these times Vdirac ( t ) = Vin ( t ) ⋅ • ∑ n =−∞ δ( t − nTs ) Multiplication in time means convolution in frequency – Resulting spectrum Vdirac ( f ) = B. Murmann ∞ 1 Ts ∞ ⎛ n =−∞ ⎝ n ⎞ ⎟ s ⎠ ∑ Vin ⎜ f − T EE315A ― HO #9 27 Spectrum • Spectrum of Dirac Signal contains replicas of Vin(f) at integer multiples of the sampling frequency p p g q y B. Murmann EE315A ― HO #9 28 Effect of Finite Hold Pulse Consider the general case with a rectangular pulse 0 < Tp ≤ Ts • The time domain signal follows from convolving the Dirac sequence with a rectangular unit pulse • Ampl litude • The spectrum follows from multiplication with the Fourier transform of the pulse H p ( f ) = Tp VZOH ( f ) = sin( πfTp ) πfTp − j πfTp πfTp ⋅e ∞ ⎛ n =−∞ Tp sin( πfTp ) Ts ⋅e ⎝ − j πfTp Amplitude Envelope EE315A ― HO #9 B. Murmann 29 “Sinc” Envelope with Tp=Ts 1 0.9 09 0.8 Ts πfTp Ma agnitude [dB B] 0.7 Tp sin( πfTp ) 0.6 0.5 0.4 0.3 0.2 0.1 0 B. Murmann 1 2 3 4 EE315A ― HO #9 5 f [Hz] 6 7 8 n ⎞ ⎟ s ⎠ ∑ Viin ⎜ f − T 9 10 x 10 6 30 Overall Filter Magnitude Response Discrete Time Output ZOH Output (Continuous Time) 0 0 -5 Magnitude [dB] Ma agnitude [dB] -10 -10 -20 -30 -40 -15 -50 -20 20 2 4 6 8 f [Hz] -60 60 10 x 10 6 2 4 6 EE315A ― HO #9 B. Murmann 8 10 f [Hz] x 10 6 31 Logarithmic Frequency Axis Note: These magnitude plots must be looked at with a “grain of salt” (since the system we’re looking at is not LTI). They are not really “transfer functions” in the traditional sense. ZOH Output ( p (Continuous Time) ) Example 1: When you apply an input tone at 2kHz, you get the same frequency at the output (scaled by the shown magnitude), PLUS other tones around multiples of fs (due to the ZOH operation). Th ti ) These additional t dditi l tones will have ill h amplitudes scaled by the sinc envelope (as shown in the plot to the left). 0 Mag gnitude [dB] -10 -20 -30 -40 -50 -60 3 10 B. Murmann 10 4 5 10 f [Hz] 10 6 10 7 Example 2: When you apply an input tone at 1010kHz, 1010kHz the signal aliases down to 10kHz upon sampling. The “main” tone at the output is therefore at 10kHz, scaled by the magnitude at that frequency. Of course, you will also get the additional tones around multiples of fs (as per the previous examples. Note that one of these additional tones will be at 1010kHz; i.e. the frequency you actually applied at the input. We will usually not apply signals at high frequencies. In fact, we will try to remove such frequencies prior to sampling using an anti alias anti-alias filter (see handout 10). EE315A ― HO #9 32 Periodic AC Analysis • Can we simulate this frequency response using a circuit simulator? • Spice – .op (operating point) .ac (ac analysis) – Works only for time invariant circuits • SpectreRF – PSS (periodic operating point) PAC (periodic ac analysis) – Works for periodically varying circuits • Reference – http://www.designers-guide.org/Analysis/sc-filters.pdf EE315A ― HO #9 B. Murmann 33 R0 3.1831M Setup for PAC Analysis (1) vrc s1 p1! R3 1 clock_gen Iclk p1! R2 1 C0 1p ideal p2! s4 p2! ideal C2 314.16f vi C1 1p Is1 Pin Pout vsc_samp ideal sampler Nin Nout Is2 Pin Pout vi_samp ideal sampler Nin Nout V0 B. Murmann vsc EE315A ― HO #9 34 Setup for PAC Analysis (2) B. Murmann EE315A ― HO #9 35 PAC Magnitude Response vrc vsc B. Murmann EE315A ― HO #9 36 R3 Changed to 300kΩ (from 1Ω) vrc Droop vsc EE315A ― HO #9 B. Murmann 37 Transient Waveforms vsc vsc_samp B. Murmann EE315A ― HO #9 38 Response After Output Sampler vsc_samp vsc samp B. Murmann EE315A ― HO #9 39 Sampled Input (“Dummy” Sinc) vi_samp p B. Murmann EE315A ― HO #9 40 Sinc Corrected Response vsc_samp/vi_samp • Matches Matlab result exactly – But, of course, in SpectreRF we can now study nonidealities at the p y circuit level… B. Murmann EE315A ― HO #9 41 ...
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