<<

ECE1371 Advanced Analog Circuits Course Goals Lecture 1

¥ Deepen understanding of CMOS analog circuit design through a top-down study of a modern INTRODUCTION TO analog system The lectures will focus on Delta-Sigma ADCs, but DELTA-SIGMA ADCS 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 Richard Schreier every competent designer ought to recognize. [email protected]

Trevor Caldwell [email protected] ECE1371 1-2

Logistics Date Lecture Ref Homework 2008-01-07 RS 1 Introduction: MOD1 & MOD2 S&T 2-3, A Matlab MOD2 ¥ Format: 2008-01-14 RS 2 Example Design: Part 1 S&T 9.1, J&M 10 Switch-level sim Meet Mondays 3:00-5:00 PM 2008-01-21 RS 3 Example Design: Part 2 J&M 14 Q-level sim except Feb 4 and Feb 18 2008-01-28 TC 4 Pipeline and SAR ADCs Arch. Comp. 12 2-hr lectures 2008-02-04 ISSCCÐ No Lecture plus proj. presentation 2008-02-11 RS 5 Advanced ∆Σ S&T 4, 6.6, 9.4, B CTMOD2; Proj. 2008-02-18 Reading WeekÐ No Lecture ¥ Grading: 2008-02-25 RS 6 Comparator & Flash ADC J&M 7 40% homework 2008-03-03 TC 7 SC Circuits J&M 10 60% project 2008-03-10 TC 8 Amplifier Design ¥ References: 2008-03-17 TC 9 Amplifier Design Schreier & Temes, “Understanding ∆Σ …” 2008-03-24 TC 10 in SC Circuits S&T C Johns & Martin, “Analog IC Design” 2008-03-31 Project Presentation Razavi, “Design of Analog CMOS ICs” 2008-04-07 TC 11 Matching & MM-Shaping Project Report 2008-04-14 RS 12 Switching Regulator Q-level sim Lecture Plan:

ECE1371 1-3 ECE1371 1-4

NLCOTD: Level Translator What is ∆Σ? VDD1 > VDD2, e.g. ¥ ∆Σ is NOT a fraternity It is more like a way of life… 3-V logic ? 1-V logic ¥ Simplified ∆Σ ADC structure:

¥ VDD1 < VDD2, e.g. Analog Loop Coarse Digital In Filter ADC Out (to digital 1-V logic ? 3-V logic filter) DAC ¥ Constraints: CMOS 1-V and 3-V devices no static current ¥ Key features: coarse quantization, filtering, feedback and oversampling Quantization is often quite coarse: 1 bit! ECE1371 1-5 ECE1371 1-6 What is Oversampling? Oversampling Simplifies AAF Desired Undesired ¥ Oversampling is sampling faster than required OSR ~ 1: Signal Signals by the Nyquist criterion For a lowpass signal containing energy in the (), frequency range0 f B , the minimum sample rate required for perfect reconstruction is f s = 2f B f ≡ ⁄ () f ⁄ 2 ¥ The oversampling ratio is OSR f s 2f B s First alias band is very close OSR = 3: Wide transition band ¥ For a regular ADC, OSR ∼ 23Ð To make the anti-alias filter (AAF) feasible ¥ For a ∆Σ ADC, OSR ∼ 30 To get adequate quantization noise suppression. f All signals abovef are removed digitally. ⁄ B f s 2 Alias far away ECE1371 1-7 ECE1371 1-8

How Does A ∆Σ ADC Work? A ∆Σ DAC System ⇒ 1 ¥ Coarse quantization lots of quantization error. t So how can a ∆Σ ADC achieve 22-bit resolution? Ð1 ∆Σ ¥A ADC spectrally separates the quantization digital uv∆Σ Reconstruction w analog error from the signal through noise-shaping input Modulator Filter output (interpolated) 1 bit @fs 1 analog t signal shaped output t Ð1 noise ∆Σ ⁄ ⁄ analog uvDecimation w digital f B f s 2 f B f s 2 f B f s input ADC Filter output 1 bit @fs n@2fB desired ¥ Mathematically similar to an ADC system signal Nyquist-rate Except that now the modulator is digital and drives a undesired shaped signals noise PCM Data low-resolution DAC, and that the out-of-band noise is ⁄ ⁄ handled by an analog reconstruction filter. f B f s 2 f B f s 2 f B ECE1371 1-9 ECE1371 1-10

Why Do It The ∆Σ Way? Highlights ¥ ADC: Simplified Anti-Alias Filter (i.e. What you will learn today) Since the input is oversampled, only very high 11st- and 2nd-order modulator structures and frequencies alias to the passband. These can often theory of operation be removed with a simple RC section. If a continuous-time loop filter is used, the anti-alias 2 Inherent linearity of binary modulators filter can often be eliminated altogether. 3 Inherent anti-aliasing of continuous-time ¥ DAC: Simplified Reconstruction Filter modulators The nearby images present in Nyquist-rate 4 Spectrum estimation with FFTs reconstruction can be removed digitally. + Inherent Linearity Simple structures can yield very high SNR. + Robust Implementation ∆Σ tolerates sizable component errors. ECE1371 1-11 ECE1371 1-12 Background Poor Man’s ∆Σ DAC (Stuff you already know) Suppose you have low-speed 16-bit data and ¥ The SQNR* of an ideal n-bit ADC with a full-scale a high-speed 8-bit DAC sine-wave input is (6.02n + 1.76) dB ¥ How can you get good analog performance? “6 dB = 1 bit” ¥ The PSD at the output of a linear system is the product of the input’s PSD and the squared magnitude of the system’s frequency response 16-bit data 16 8 Good DAC Quality i.e. XY j 2πf 2 ⋅ @ 50 kHz ? H(z) Syy()f = He()Sxx()f Audio

¥ The power in any frequency band is the integral of the PSD over that band 5 MHz *. Signal-to-Quantization-Noise Ratio ECE1371 1-13 ECE1371 1-14

Simple (-Minded) Solution Spectral Implications ¥ Only connect the MSBs; leave the LSBs hanging

Desired Signal Unwanted Images 16 MSBs 8 DAC sin()x ------DAC frequency response @50 kHz LSBs x 8 5 MHz (or 50 kHz) Frequency 25 kHz DAC Output 16-b Input Data Quantization Noise @ 8-bit level ⇒ SQNR = 50 dB 20 us Time

ECE1371 1-15 ECE1371 1-16

Better Solution Spectral Implications ¥ Exploit oversampling: Clock fast and add dither ¥ Quantization noise is now spread over a broad frequency range 16 8 Oversampling reduces quantization noise density DAC @50 kHz 8 8 @ 5 MHz 2.5 MHz OSR ==------100 → 20 dB dither spanning 25 kHz one 8-bit LSB 5 MHz DAC Output 16-b Input Data Frequency 25 kHz 2.5 MHz In-band quantization noise power = 1% of total quantization noise power Time ⇒ SQNR = 70 dB ECE1371 1-17 ECE1371 1-18 Even More Clever Method Mathematical Model ¥ Add LSBs back into the input data ¥ Assume the DAC is ideal, model truncation as the addition of error: 16 8 E = ÐLSBs DAC @50 kHz @ 5 MHz 8 U V = U + (1ÐzÐ1)E z–1 5 MHz z-1 ÐE DAC Output ¥ Hmm… Oversampling, coarse quantization and 16-b Input Data feedback. Noise-Shaping! ¥ Truncation noise is shaped by a 1ÐzÐ1 transfer function, which provides ~35 dB of attenuation Time in the 0-25 kHz frequency range ECE1371 1-19 ECE1371 1-20

Spectral Implications MOD1: 1st-Order ∆Σ Modulator ¥ Quantization noise is heavily attenuated at low Standard Block Diagram frequencies ∆ Σ Quantizer “ ”“” (1-bit) v Y 1 UVQ y Shaped Ð1 Quantization Noise z-1 Feedback Frequency -1 V’ DAC v’ 25 kHz 2.5 MHz z DAC v In-band quantization noise power is very small, 55 dB below total power Since two points define a line, ⇒ SQNR = 105 dB! a binary DAC is inherently linear. ECE1371 1-21 ECE1371 1-22

MOD1 Analysis The Noise Transfer Function ¥ Exact analysis is intractable for all but the ¥ In general, V(z) = STF(z)¥U(z) + NTF(z)¥E(z) simplest inputs, so treat the quantizer as an ¥ For MOD1, NTF(z) = 1ÐzÐ1 additive noise source: The quantization noise has spectral shape!

Y 4 π UVQ NTF()ej 2 f 2 3 -1 z E 2 ≅ ω2 for ω Ç 1 z-1 1 Y V V(z) = Y(z) + E(z) 0 0 0.1 0.2 0.3 0.4 0.5 Y(z) = ( U(z) Ð z-1V(z) ) / (1Ðz-1) Normalized Frequency (f /fs) ⇒(1Ðz-1) V(z) = U(z) Ð z-1V(z) + (1Ðz-1)E(z) ¥ The total noise power increases, but the noise V(z) = U(z) + (1–z–1)E(z) power at low frequencies is reduced ECE1371 1-23 ECE1371 1-24 In-band Noise Power A Simulation of MOD1 σ2 ¥ Assume that e is white with power e 0 ω σ2 ⁄ π Full-scale test tone i.e. See()= e ¥ The in-band noise power is Ð20 SQNR = 55 dB @ OSR = 128 ω ω B B σ2 Ð40 N 2 = He()jω 2S ()ω dω ≅ ------e ω2dω 0 ∫ ee π ∫ Shaped “Noise” 0 0 Ð60 dBFS/NBW π π2σ2 ≡ 2 e ()Ð3 ¥ SinceOSR ------ω , N 0 = ------OSR Ð80 20 dB/decade B 3 ¥ For MOD1, an octave increase in OSR increases NBW = 5.7x10Ð6 SQNR by 9 dB Ð100 10Ð3 10Ð2 10Ð1 1.5-bit/octave SQNR-OSR trade-off. Normalized Frequency

ECE1371 1-25 ECE1371 1-26

CT Implementation of MOD1 MOD1-CT Waveforms

¥Ri/Rf sets the full-scale; C is arbitrary u = 0 u = 0.06 Also observe that an input at fs is rejected by the 1 1 integrator— inherent anti-aliasing v v Integrator Latched Ð1 Ð1 Comparator C Rf y 0 y 0

Ri 0 5 10 15 20 0 5 10 15 20 u y D Q v Time Time DFF clock CK QB ¥ With u=0, v alternates between +1 and Ð1 ¥ With u>0, y drifts upwards; v contains consecutive +1s to counteract this drift

ECE1371 1-27 ECE1371 1-28

Summary So Far MOD2: 2nd-Order ∆Σ Modulator ¥ ∆Σ works by spectrally separating the ¥ Replace the quantizer in MOD1 with another quantization noise from the signal copy of MOD1: ¥ Noise-shaping is achieved by the use of filtering E1 and feedback E UVQ ¥ A binary DAC is inherently linear, z-1 and thus a binary modulator is too z-1 z-1 Ð1 ¥ MOD1 has NTF(z) = 1Ðz -1 ⇒ Arbitrary accuracy for DC inputs. z 1.5 bit/octave SNR-OSR trade-off. V(z) = U(z) + (1ÐzÐ1)E (z), ¥ MOD1-CT has inherent anti-aliasing 1 Ð1 E1(z) = (1Ðz )E(z) ⇒V(z) = U(z) + (1ÐzÐ1)2E(z)

ECE1371 1-29 ECE1371 1-30 Simplified Block Diagrams NTF Comparison E U z 1 Q V z−1 z−1 0 NTF() z = ()1 Ð z Ð1 2 Ð1 STF() z = z −20

(dB) MOD1

f −40 π

E j2 MOD2 () −60 U 1 1 − − Q V MOD2 has twice as much z 1 z 1 NTF e −80 attenuation at all frequencies Ð1 2 -1 -2 NTF() z = ()1 Ð z STF() z = z Ð2 −100 10Ð3 10Ð2 10Ð1 Normalized Frequency

ECE1371 1-31 ECE1371 1-32

In-band Noise Power Simulation Example ¥ For MOD2, He()jω 2 ≈ ω4 Input at 75% of FullScale Time Domain ω 1 2 B jω 2 ω ω ¥ As before,N 0 = He()See()d and ∫0 ω σ2 ⁄ π See()= e 0

π4σ2 e Ð1 ¥ So now N 2 = ------()OSR Ð5 0 50 100 150 200 0 5 Frequency Domain ± Ð0 With binary quantization to 1, Simulated Noise Density ∆ σ2 ∆2 ⁄ ⁄ Ð20 = 2 and thuse ==12 13 . Ð40 Ð60 Predicted Noise Density ¥ “An octave increase in OSR increases MOD2’s Ð80 Agreement is fair SNR by 15 dB (2.5 bits)” Ð100 1024-point FFT 0 0.25 0.5 ECE1371 1-33 ECE1371 1-34

Simulated MOD2 PSD SQNR vs. Input Amplitude Input at 50% of FullScale MOD1 & MOD2 @ OSR = 256 0 120 SQNR = 86 dB Ð20 @ OSR = 128 100 Ð40 80 MOD2 Ð60 Simulated spectrum (smoothed) 60 Predicted SNR Ð80 Theoretical PSD (k = 1) Simulated SNR SQNR (dB)

Ð100dBFS/NBW 40 40 dB/decade MOD1 Ð120 20 − NBW = 5.7×10 7 Ð140 10Ð3 10Ð2 10Ð1 0 Ð100 Ð80 Ð60 Ð40 Ð20 0 Normalized Frequency Input Amplitude (dBFS) ECE1371 1-35 ECE1371 1-36 SQNR vs. OSR Audio Demo: MOD1 vs. MOD2 120

100 Sine MOD2 Wave (Theoretical curve assumes -3 dBFS input) MOD1 80 Slow Ramp 60 MOD2 MOD1

SQNR (dB) (Theoretical curve assumes 0 dBFS input) Speech 40

20 Predictions for MOD2 are optimistic. Behavior of MOD1 is erratic. 0 4 8 16 32 64 128 256 512 1024 ECE1371 1-37 ECE1371 1-38

MOD1 + MOD2 Summary NLCOTD ∆Σ ¥ ADCs rely on filtering and feedback to 1V achieve high SNR despite coarse quantization → 1V They also rely on digital signal processing. 3V 1V: 3V ∆Σ ADCs need to be followed by a digital decimation 3V filter and ∆Σ DACs need to be preceded by a digital 3V interpolation filter. ¥ Oversampling eases analog filtering requirements Anti-alias filter in and ADC; image filter in a DAC 1V → 3V: 3V ¥ Binary quantization yields inherent linearity 3V 3V ¥ CT loop filter provides inherent anti-aliasing ¥ MOD2 is better than MOD1 3V 3V 15 dB/octave vs. 9 dB/octave SNR-OSR trade-off. Quantization noise more white. Higher-order modulators are even better. ECE1371 1-39 ECE1371 1-40

Homework #1 MOD2 Expanded Create a Matlab function that computes MOD2’s output E sequence given a vector of input samples and exercise your function in the following ways. U z 1 V − − Q 1 Verify that the average of the output equals the input for z 1 z 1 DC inputs in [Ð1,1]. 2 Produce a spectral plot like that on Slide 35. 3 a) Construct a SQNR vs. input amplitude curve for un() x 1()n + 1 x 2()n + 1 -1 x 2()n vn() OSR = 128 for amplitudes from Ð100 to 0 dBFS. z Q b) Determine approximately how much the interstage x 1()n gain and feedback coefficients need to shift in order z-1 to have a significant (~3-dB) impact. 4 Compare the in-band quantization noise of your system with a half-scale sine-wave input against the relation Difference Equations: given on Slide 33 for OSR in [23,210]. () vn = Qx()2()n () x 1 n + 1 = x 1()n Ð vn()+ un() () x 2 n + 1 = x 2()n Ð vn()+ x 1()n + 1 ECE1371 1-41 ECE1371 1-42 Example Matlab Code ~100 104-Point Simulations function [v,x] = simulateMOD2(u) 1 x1 = 0; x2 = 0; for i = 1:length(u) v(i) = quantize( x2 ); 0.5 v x1 = x1 + u(i) - v(i); x2 = x2 + x1 - v(i); end (vÐu) x 1000 return 0 function v = quantize( y ) if y>=0 Ð0.5 v = 1; else v = -1; end Ð1 return Ð1 Ð0.5 0 0.5 1 u ECE1371 1-43 ECE1371 1-44

Example Spectrum FFT Considerations (Partial) Nfft = 2^10; ¥ The FFT implemented in MATLAB is ftest = 2; 2πkn t = 0:Nfft-1; N Ð 1 Ðj ------u = 0.5*sin(2*pi*ftest/Nfft*t); % Has ftest cycles in Nfft points X ()k + 1 = ∑ x ()n + 1 e N v = simulateMOD2(u); M M U = fft(u); n = 0 V = fft(v); † f = linspace(0,1,Nfft+1); f=f(1:Nfft); ¥Ifxn()= Asin()2πfn⁄ N , then semilogx(f,dbv(U),'m', f,dbv(V),'b'); figureMagic([1e-4 0.5],[],[],[-80 80],10,2);   AN 80 ------, k = f or NfÐ Xk()=  2 60 Peak at +50dB?  40  0 , otherwise 20 dB (?) 0 ⇒ ()⁄ Ð20 Need to divide FFT byN 2 to get A. Ð40 Ð60 †. f is an integer in()0, N ⁄ 2 . I’ve definedXk()≡ X ()k + 1 , Ð80 M Ð4 Ð3 Ð2 Ð1 Normalized ≡ 10 10 10 10 Frequency xn() x M()n + 1 since Matlab indexes from 1 rather than 0 ECE1371 1-45 ECE1371 1-46

The Need For Smoothing How To Do Smoothing ¥ The FFT can be interpreted as taking 1 sample 1 Average multiple FFTs from the outputs of N complex FIR filters: Implemented by MATLAB’s psd() function x () h0()n y 0()N = X 0 2 Take one big FFT and “filter” the spectrum h ()n y ()N = X()1  Implemented by the ∆Σ Toolbox’s logsmooth() 1 1 2πk  j ------n function h ()n =  e N ,0≤ nN< k  ¥ logsmooth() averages an exponentially-  0 , otherwise h ()n y ()N = Xk() increasing number of bins in order to reduce the k k density of points in the high-frequency regime and make a nice log-frequency plot () hN Ð 1()n y N Ð 1()N = XNÐ 1

⇒ an FFT yields a high-variance spectral estimate

ECE1371 1-47 ECE1371 1-48 Smoothed Spectrum Quantization Noise Spectrum? 0 ¥ Assume that the quantization error e is uniformly distributed in [Ð1,+1] Ð20 ρ σ2 ρ 2 eQy= ()Ð y e e = ∫ e()e e de Ð40 0.5 1 1 e3 1 y = 0.5 ⋅ ------= --- Ð60 e 3 3 Ð1 Ð1 1 Ð1 Ð80 ¥ Assume e is white dBFS

Ð100 1-sided PSD: S ()f 0.5 ee σ2 = ∫ S ()f df e 0 ee Ð120 40 dB / decade ⇒ σ2 f See()f = 2 e Ð140 0 0.5 j 2πf 2 Ð160 ¥ MultiplySee()f byNTF() e to get the PSD of Ð4 Ð3 Ð2 Ð1 10 10 10 10 the shaped error Normalized Frequency ECE1371 1-49 ECE1371 1-50

Simulation vs. Theory What Went Wrong? 20 Simulated Spectrum 1 We normalized the spectrum so that a full-scale 0 Theoretical Q. Noise? sine wave (which has a power of 0.5) comes out Ð20 at 0 dB (whence the “dBFS” units) ⇒ We need to do the same for the error signal. Ð40 ⁄ i.e. useSee()f = 43 . Ð60 But this makes the discrepancy 3 dB worse. dBFS Ð80 2 We tried to plot a power Ð100 together with something that we want to “Slight” interpret as a power spectrum Ð120 Discrepancy

Ð140 (~40 dB) ¥ Sine-wave components are located in individual FFT bins, but broadband signals like noise have Ð160 Ð4 Ð3 Ð2 Ð1 10 10 10 10 their power spread over all FFT bins! Normalized Frequency The “noise floor” depends on the length of the FFT. ECE1371 1-51 ECE1371 1-52

Spectrum of a Sine Wave + Noise Observations

0 dBFS ¥ The power of the sine wave is given by the 0 0 dBFS Sine Wave height of its spectral peak Noise ⇒ SNR = 0 dB ¥ The power of the noise is spread over all bins Ð10 The greater the number of bins, the less power there N = 26 is in any one bin. (“dBFS”) Ð20 ¥ Doubling N reduces the power per bin by a factor N = 28

f of 2 (i.e. 3 dB) () ′ Ð3 dB/ x 10 But the total integrated noise power does not

ˆ N = 2 S octave Ð30 change. N = 212

Ð40 0 0.25 0.5 Normalized Frequency, f

ECE1371 1-53 ECE1371 1-54 So How Do We Handle Noise? FFT Noise Bandwidth 2πk ¥ Recall that an FFT is like a filter bank hn()= exp j ------n N ¥ The longer the FFT, the narrower the bandwidth of each filter and thus the lower the power at N Ð 1 Hf()= ∑ hn()exp()Ðj 2πfn each output n = 0 ¥ We need to know the noise bandwidth (NBW) of k N Ð 1 f = ---- , Hf()==∑ 1 N the filters in order to convert the power in each 0 N 0 bin (filter output) to a power density n = 0 ¥ For a filter with frequency responseHf() , ∫ Hf()2 ==∑ hn()2 N [Parseval]

NBW Hf()2df Hf()2df ∫ Hf() ∫ N 1 NBW = ------∴NBW ===------Hf()2 f 2 2 0 f0 Hf()0 N N

ECE1371 1-55 ECE1371 1-56

Better Spectral Plot SQNR Calculation 20 Simulated Spectrum ¥ S = power in the signal bin 0 Theoretical Q. Noise ¥ QN = sum of the powers in the non-signal in- Ð20 band noise bins Ð40 ⇒ Using MATLAB to perform these calculations for Ð60 the preceding simulation yields SQNR = 84.2 dB at OSR = 128 Ð80

dBFS/NBW 4 Ð100 --- NTF() f 2 ⋅ NBW passband for 3 ¥ Can also eyeball SQNR from the plot: Ð120 OSR = 128 S = Ð6 dB Ð5 ‡ Ð140 NBW = 1 / N = 1.5×10 QN = Ð113 + dbp (BW/NBW) = Ð89 dB N = 216 ⇒ SQNR = Ð83 dB Ð160 10Ð4 10Ð3 10Ð2 10Ð1 Normalized Frequency ‡. dbp(x ) = 10log10(x ). ECE1371 1-57 ECE1371 1-58

SQNR vs. Amplitude Tolerable Coefficient Errors? 100 15A2()OSR 5 z 1 ------π4 z Ð 1 z Ð 1 80 2 un() c1 vn() z-1 Q 60 z-1

40 a1 a2

SQNR (dB) 20 ¥ a1 & a2 are the feedback coefficients; nominally 1 Simulation 0 Theory ¥ c1 is the interstage coefficient; nominally 1 ¥ You should find that the SQNR stays high even if Ð20 Ð100 Ð80 Ð60 Ð40 Ð20 0 these coefficients individually vary over a 2:1 Signal Amplitude (dBFS) range ECE1371 1-59 ECE1371 1-60 SQNR vs. OSR for MOD2 Windowing Half-Scale Input (A = 0.5) ¥ ∆Σ data is usually not periodic Just because the input repeats does not mean that 140 15A2()OSR 5 the output does too! ------2π4 ¥ A finite-length data record = an infinite record 120 multiplied by a rectangular window: wn()= 1, 0 ≤ n < N 100 Windowing is unavoidable. ¥ “Multiplication in time is convolution in 80 frequency” Frequency response of a 32-point rectangular window: SQNR (dB) 60 0 Ð10 Theory Ð20 40 Ð30 Ð40 Simulation Ð50 dB Ð60 Slow roll-off ⇒ out-of-band Q. noise may appear in-band 20 Ð70 3 4 5 6 7 8 9 10 Ð80 2 2 2 2 2 2 2 2 Ð90 Ð100 OSR 0 0.125 0.25 0.375 0.5 ECE1371 1-61 ECE1371 1-62

Example Spectral Disaster Window Comparison (N = 16) Rectangular window, N = 256 0 40 Ð10 Out-of-band quantization noise Ð20 Rectangular 20 obscures the notch! Ð30

(dB) Ð40 0 - 0 () () Ð50 dB Wf W ------Ð60 Ð20 Hann Ð70 Actual ∆Σ spectrum Ð80 Ð40 Hann2 ()⁄ Wf w 2 Ð90 Windowed spectrum Ð100 Ð60 0 0.125 0.25 0.375 0.5 0 0.25 0.5 Normalized Frequency, f Normalized Frequency, f ECE1371 1-63 ECE1371 1-64

Window Properties Window Length, N † 2 Window Rectangular Hann Hann ¥ Need to have enough in-band noise bins to π 2 wn(), 2πn 2 n 1 Ð cos------1 Ð cos------1 Make the number of signal bins a small fraction ,,… , 1 N N n = 01 N Ð 1 ------------of the total number of in-band bins 2 2 (wn()= 0 otherwise)  <20% signal bins ⇒ >15 in-band bins ⇒ > 30 ⋅ OS Number of non-zero 13 5 2 Make the SNR repeatable FFT bins N = 30 ⋅ OSR yields std. dev. ~1.4 dB. 2 ∑ 2 w 2 = wn() N 3N/8 35N/128 N = 64 ⋅ OSR yields std. dev. ~1.0 dB. W ()0 = ∑wn() NN/2 3N/8 N = 256 ⋅ OSR yields std. dev. ~0.5 dB. w 2 NBW = ------2 1/N 1.5/N 35/18N W ()0 2 ¥N = 64 ⋅ OSR is recommended †. MATLAB’s “hann” function causes spectral leakage of tones located in FFT bins unless you add the optional argument “periodic.”

ECE1371 1-65 ECE1371 1-66 Good FFT Practice What You Learned Today [Appendix A of Schreier & Temes] And what the homework should solidify ¥ Use coherent sampling 1 MOD1 and MOD2 structure and linear theory Need an integer number of cycles in the record. SQNR-OSR trade-offs: ¥ Use windowing 9 dB/octave for MOD1 A Hann window works well. 15 dB/octave for MOD2 ¥ Use enough points 2 Inherent linearity of binary modulators N = 64 ⋅ OSR 3 Inherent anti-aliasing of continuous-time ¥ Scale the spectrum modulators A full-scale sine wave should yield a 0-dBFS peak. 4 Proper use of FFTs for spectral analysis ¥ State the noise bandwidth For a Hann window,NBW = 1.5 ⁄ N . 5 (Hwk) MOD1 and MOD2 are tolerant of large coefficient errors ¥ Smooth the spectrum if you want a pretty plot

ECE1371 1-67 ECE1371 1-68