Discrete Fourier Transform The DFT of a block of N time samples {a n } = {a,a,a 2,,a N- } is a set of N frequency bins {A m } = {A,A,A 2,,A N- } where: N- mn A m = S a n W N n= W N e j2p/n m =,,2,,N- EECS 247 Lecture 3: Spectral Testing 22 B. Boser Inverse DFT The inverse DFT flips a set of frequency bins {A m } = {A,A,A 2,,A N- } back to the corresponding time domain samples {a n } = {a,a,a 2,,a N- }: a n = N W N e j2p/n N- - mn S A m W N m= n=,,2,,n- EECS 247 Lecture 3: Spectral Testing 22 B. Boser 2
DFT Properties DFT of N samples spaced T=/f s seconds: N bins Bin m represents frequencies at m * f s /N [Hz] DFT resolution: Proportional to /(NT) in [Hz/bin] NT is total time spent gathering samples EECS 247 Lecture 3: Spectral Testing 22 B. Boser 3 DFT Properties A N-m = A m * Given that A N-m and A m are complex conjugates, A N-m = A m For real time sequences, frequency domain magnitudes mirror around f S /2 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 4
Energy Theorem Relates energy in the time domain to energy in the frequency domain: N- S a n 2 N- = S A m 2 N n= m= EECS 247 Lecture 3: Spectral Testing 22 B. Boser 5 Energy Theorem N- S a n 2 N- = S A m 2 N n= m= N N- S a n 2 N- = S A m 2 N n= 2 m= a rms = N N- S A m 2 m= EECS 247 Lecture 3: Spectral Testing 22 B. Boser 6
Energy Theorem A dc sequence a n =a dc has only one nonzero term in its DFT: A = Na dc A sinewave at the center frequency of bin m has 2 nonzero terms, A m and A N-m, and their magnitudes are the same: a rms = 2 N A m A m = Na rms 2 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 7 The Energy Theorem White noise with rms value a rms distributes its energy evenly into all frequency bins If the magnitude in each bin is A, a rms = N NA2 = A N A = a rms N EECS 247 Lecture 3: Spectral Testing 22 B. Boser 8
DFT Magnitude Plots Because A m magnitudes are symmetric around f S /2, it is redundant to plot A m s for m>n/2 Usually magnitudes are plotted on a log scale normalized so that a full scale sinewave of rms value a FS yields a peak bin of dbfs: A m (dbfs) = 2 log A m a FS N/2 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 9 Normalized DFT fs = e6; fx = 5e3; afs = ; N = ; % time vector t = linspace(, (N-)/fs, N); % signal y = afs * cos(2*pi*fx*t); % spectrum s = 2 * log(abs(fft(y)/n/afs*2)); % drop redundant half s = s(:n/2); % frequency vector (normalized to fs) f = (:length(s)-) / N; Amplitude Magnitude [ dbfs ].5 -.5 -.2.4.6.8 Time x -4-5 - -5-2 -25-3 -35..2.3.4.5 Frequency [ f / s f ] EECS 247 Lecture 3: Spectral Testing 22 B. Boser
Another Example Signal Amplitude.5 -.5-2 3 4 5 Time x -5 - -2-3 -4-5..2.3.4.5 This does not look like the spectrum of a sinusoid EECS 247 Lecture 3: Spectral Testing 22 B. Boser DFT Periodicity The DFT implicitly assumes that time sample blocks repeat every N samples With a non-integral number of periods periods within our observation window, the input yields a huge amplitude/phase discontinuity at the block boundary This energy spreads into all frequency bins as spectral leakage Spectral leakage can be eliminated by either An integral number of sinusoids in each block Windowing Signal Amplitude Signal Amplitude.5 -.5 -.2.4.6.8.2.4 Time x -4.5 -.5 -.2.4.6.8.2.4 Time x -4 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 2
Spectra Signal Amplitude.5 -.5 Signal Amplitude.5 -.5 -.2.4.6.8.2.4 Time x -4 -.2.4.6.8.2.4 Time x -4 - - -2-3 -2-3 -4-5 -4..2.3.4.5-6..2.3.4.5 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 3 Integral Number of Periods fs = e6; 5 % number of full cycles in test cycles = 67; % power of 2 speeeds up analysis % but make N/cycles non-integer! N = 2^; % signal frequency fx = fs*cycles/n Amplitude [ db ] -5 - -5-2 -25-3 -35..2.3.4.5 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 4
Integral Number of Periods Fundamental falls into a single DFT bin Noise (here numerical quantization) occupies all other bins Integral number of periods constrains signal frequency f x Alternative: windowing Amplitude [ db ] 5-5 - -5-2 -25-3 -35..2.3.4.5 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 5 Windowing Spectral leakage can also be virtually eliminated by windowing time samples prior to the DFT Windows taper smoothly down to zero at the beginning and the end of the observation window Time samples are multiplied by window coefficients on a sample-by-sample basis Windowing sinewaves places the window spectrum at the sinewave frequency Convolution in frequency EECS 247 Lecture 3: Spectral Testing 22 B. Boser 6
Nuttall Window Time samples are multiplied by window coefficients on a sample-by-sample basis 2.8.6.4.2 Multiplication in the time domain corresponds to convolution in the.8.6.4.2 frequency domain 2 3 4 5 6 7 8 9 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 7 DFT of Nuttall Window Only first 2 bins shown -2-4 Response essentially zero for bins > 5 Normalized Aplitude -6-8 - -2 2 4 6 8 2 4 6 8 2 DFT Bin EECS 247 Lecture 3: Spectral Testing 22 B. Boser 8
Windowed Data The plot on the right shows the signal before and after windowing Windowing removes the discontinuity at block boundaries Signal Amplitude Windowed Signal Amplitude.5 -.5 -.2.4.6.8 Time x -3 2 - -2.2.4.6.8 Time x -3 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 9 DFT of Windowed Signal Spectra of signal before and after windowing Window gives ~ db attenuation of sidelobes (use longer window for higher attenuation) Signal energy smeared over several (approximately ) bins Spectrum not Windowed [ dbfs ] Windowed Spectrum [ dbfs ] - -2-3 -4-5 -6-7..2.3.4.5-2 -4-6 -8 - -2-4..2.3.4.5 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 2
Integral Cycles versus Windowing Integral number of cycles Signal energy falls into single DFT bin Requires careful choice of f x Ideal for simulations, usually impractical for measurements Windowing No restrictions on f x and no need to lock it to f s ideal for measurements Signal energy (and harmonics) distributed over several DFT bins Requires more datapoints for set accuracy EECS 247 Lecture 3: Spectral Testing 22 B. Boser 2 Spectral ADC Testing ADC with B bits ± full scale input B = ; delta = 2/(2^B-); th = -+delta/2:delta:-delta/2; x = sin( ); y = adc(x, th) * delta - ; EECS 247 Lecture 3: Spectral Testing 22 B. Boser 22
ADC Output Spectrum N = 6384 A =.dbfs Signal amplitude: Bin: N * fx/fs + (Matlab arrays start at ) A = dbfs SNR? -2-4 -6-8 - -2.5..5.2.25.3.35.4.45 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 23 ADC Output Spectrum Noise bins: all except signal bin bx = N*fx/fs + ; As = 2*log(s(bx)) sn(bx) = ; An = *log(sum(sn.^2)) SNR = As - An -2-4 -6 N = 6384 A =.dbfs SNR = 62.dB -8 SNR = 62dB ( bits) - -2.5..5.2.25.3.35.4.45 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 24
Spectral Components Signal S DC Distortion D Noise N N = 6384-2 SNR = 6.9dB SDR = 57.7dB SNDR = 53.5dB SFDR = 57.8dB A = -.dbfs Signal-to-noise ratio SNR = S / N Signal-to-distortion ratio SDR = S / D Signal-to-noise+distortion ratio SNDR = S / (N+D) Spurious-free dynamic range SFDR -4-6 -8 - -2 DC = -4.dBFS H 3 = -78.9dBFS H = -76.dBFS.5..5.2.25.3.35.4.45 H 2 = -57.8dBFS EECS 247 Lecture 3: Spectral Testing 22 B. Boser 25 Distortion Components N = 6384 SNR = 6.9dB SDR = 57.7dB SNDR = 53.5dB SFDR = 57.8dB At multiples of f x Aliasing: -2 A = -.dbfs f = f x =.8 f s f = 2 f =.36 f s f 2 = 3 f =.54 f s.46 f s f 3 = 4 f =.72 f s.28 f s f 4 = 5 f =.9 f s. f s f 5 = 6 f =.8 f s.8 f s -4 DC = -4.dBFS -6-8 - H 3 = -78.9dBFS H 2 = -57.8dBFS H = -76.dBFS -2.5..5.2.25.3.35.4.45 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 26
Spectrum versus INL, DNL N = 372 SNR = 6.9dB SDR = 57.7dB SNDR = 53.5dB SFDR = 57.8dB 2 DNL and INL of Bit converter (from converter decision thresholds) -2 A = -.dbfs DNL [in LSB].5.5 avg=.53, std.dev=.48, range=.9-4 -6-8 - DC = -4.dBFS H 2 = -57.8dBFS H = -76.dBFS H 3 = -78.5dBFS -2.5..5.2.25.3.35.4.45 Frequency [ f / s f ] INL [in LSB] -.5-3 2.5 2.5.5 -.5 - Good DNL and poor INL 2 3 4 5 6 7 8 9 suggests distortion bin problem avg=.2, std.dev=.75, range=2. 2 3 4 5 6 7 8 9 bin EECS 247 Lecture 3: Spectral Testing 22 B. Boser 27 Noise At right is the spectrum of a -Bit converter SNDR = 47dB something s amiss Distortion? SDR = 59.9dB no Must be a noise problem, but is it thermal or quantization noise? N = 496 SNR = 49.3dB SDR = 59.9dB SNDR = 47.dB SFDR = 6.9dB -2-4 -6-8 - -2-4..2.3.4.5 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 28
At right is the spectrum of a same -Bit converter for f x = f s / 6 Noise N = 496 SNR = 65.dB SDR = 48.4dB SNDR = 47.2dB SFDR = 49.5dB -2 Since f x divides f s, the quantization noise is periodic! It falls into the same bins the harmonics would normally occupy Hence SNR thermal noise SDR quantization noise (apparently the culprit) -4-6 -8 - -2-4..2.3.4.5 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 29 Noise Same converter again (f x = f s / 6) The quantization noise problem has been fixed: SDR = 62dB for bits Congratulations! But apparently the fix causes a thermal noise problem: SNR = 45.5dB Another revision (our competitors like this ) N = 496 SNR = 45.5dB SDR = 62.6dB SNDR = 44.3dB SFDR = 65.9dB -2-4 -6-8 - -2..2.3.4.5 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 3
One more time (f x = f s / 6) Noise N = 496 SNR = 56.dB SDR = 73.9dB SNDR = 55.dB SFDR = 77.5dB The quantization noise is not a major error: SDR = 74dB SNR = 56.dB This corresponds to - Gaussian noise with variance /2 at the -2 converter input a reasonable design choice -4..2.3.4.5-2 -4-6 -8 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 3 Noise The DNL and INL confirm the good result But the INL shows some bowing let s see if our test masked a distortion problem DNL [in LSB] INL [in LSB] 2.5.5 -.5-2.5.5 -.5 - DNL and INL of Bit converter (from converter decision thresholds) -.2 / +.2 LSB, avg=.3, std.dev=.83, range=.48 2 3 4 5 6 7 8 9 bin -.3 / +.2 LSB, avg=-.39, std.dev=.7, range=.47 2 3 4 5 6 7 8 9 bin EECS 247 Lecture 3: Spectral Testing 22 B. Boser 32
Noise For that we revert to simulating with f s /f x noninteger N = 496-2 -4 SNR = 55.9dB SDR = 76.4dB SNDR = 55.dB SFDR = 77.3dB A 3 rd harmonic is barely visible -6-8 - How can we lift it out of the noise? -2-4..2.3.4.5 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 33 Noise Increasing N, the number of samples (and hence the measurement or simulation time) distributes the noise over more bins More bins less noise power per bin (total noise stays same) SFDR = 78dB for Bit is acceptable in many applications (e.g. digital imaging) N = 65536 SNR = 55.9dB SDR = 77.9dB SNDR = 55.2dB SFDR = 78.5dB -5 - -5..2.3.4.5 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 34
Effective Number of Bits Is a -Bit converter with 55dB SNDR really a -Bit converter? Effective Number of Bits.76dB ENOB = SNDR 6.2dB 55.76 = = 8.8Bits 6.2 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 35 ADC Applications EECS 247 Lecture 3: Spectral Testing 22 B. Boser 36
Example: AD9235 2Bit / 65MS/s EECS 247 Lecture 3: Spectral Testing 22 B. Boser 37 AD9235 Spectra SINAD = SNDR EECS 247 Lecture 3: Spectral Testing 22 B. Boser 38
AD9235 SNR / SFDR EECS 247 Lecture 3: Spectral Testing 22 B. Boser 39 AD9235 DNL / INL EECS 247 Lecture 3: Spectral Testing 22 B. Boser 4
AD9235 Block Diagram EECS 247 Lecture 3: Spectral Testing 22 B. Boser 4 AD7677 6Bit / MS/s EECS 247 Lecture 3: Spectral Testing 22 B. Boser 42
AD7677 Spectrum SINAD = SNDR EECS 247 Lecture 3: Spectral Testing 22 B. Boser 43 AD7677 DNL / INL EECS 247 Lecture 3: Spectral Testing 22 B. Boser 44
AD7677 DC Input EECS 247 Lecture 3: Spectral Testing 22 B. Boser 45 ADS254 24Bits / 2kS/s EECS 247 Lecture 3: Spectral Testing 22 B. Boser 46
Recent Nyquist ADC Performance: ISSCC Nyquist ADCs Year paper # lead author power(mw) res SNDR(db) Fs sig BW FOM 22.2 Scholtens 34 6 32dB 6 66 77 2 8. Choi 545 6 33dB 3 65 54 2 8.2 Geelen 3 6 36dB 9 45 93 2 26.2 Sushihara 4 6 32dB 8 2 2 2 26. Nagaraj 87 6 35.2dB 7 25 76 999 8.5 Tamba 4 6 35dB 5 25 35 999 8.6 Yoon 33 6 33dB 5 75 22 8.2 Lin.48 6 33dB 22 23 22.3 Sushihara 5 7 36.7dB 45 225 38 22. Poulton 46 8 38.5dB 4 2 37 2 2.5 Ming 25 8 46dB 8 2 6 22.4 Jamal 234 57dB 2 6 82 2 8.3 Park 8 57dB 5 97 999 8.3 Hoogzaad 65 57dB 4 2 228 22.5 Miyazaki 6 54dB 3 5 47 999 8.2 vanderploeg 95 58dB 25 5 2 999 8.4 Brandt 75 6dB 2 33 22.6 Kuttner 2 55dB 2 468 2 2.3 Singer 5 2 7dB 65 32 22 2 8.4 vanderploeg 295 2 54 25 2 2.4 Pan 85 2 64dB 5 25 47 22 8.4 Kulhalli 3 2 68dB 2 837 999 8. Erdogan 6 2 7dB.25.5 22 8.5 Waltari 75 3 5 25 2 2.2 Choe 8 3 66dB 4 2 5 2 2. Moreland 25 4 75dB 25 2 2 8.5 Kelly 34 4 73dB 75 37.5 493 2 8.6 Yu 86 4 4 2 2.7 Chen 72 4 74dB 2 7 Figure of Merit: ENOB BW FOM = P All Bandwidths are in MHz, all FOM are ^9 EECS 247 Lecture 3: Spectral Testing 22 B. Boser 47 -Bit ADC Power EECS 247 Lecture 3: Spectral Testing 22 B. Boser 48
2-Bit ADC Power EECS 247 Lecture 3: Spectral Testing 22 B. Boser 49