Adcs Fast Fourier Transforms and Windowing Presentation Quiz

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Fast Fourier Transforms (FFTs)

and Windowing
TIPL 4302
TI Precision Labs – ADCs

Created by Luis Chioye, Art Kay


Presented by Peggy Liska

1
Definition for time to frequency transformations
+∞ Fourier Transform (continuous time)
1
F(ω) = 𝑓[𝑡] ∙ 𝑒 −𝑖𝜔𝑡 𝑑𝑡 Where
2𝜋 F[ω] = frequency domain continuous function
−∞
f[t] = time domain continuous function
t = time
ω = angular freqeuncy

Fast Fourier Transform (FFT)


Used for digitized waveforms
Where
𝑁−1
F[k] = sample in freqeuncy
𝑛 f[n] = sample in time
−𝑖2𝜋𝑘
Fk = 𝑓[𝑛] ∙ 𝑒 𝑁
n = time index
𝑛=0
k = frequency index
N = number of samples
N must be a power of 2 (e.g. 256, 512, 1024…)

2
FFT Basics: Alias and Frequency Resolution
Alias region is normally hidden

Sampled Alias
Signal fs – fin = 875kHz
125kHz 1000kHz-125kHz
Frequency
Domain
(FFT) 1. FFT assumes time domain continues
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Freq. Bin
0.0 125 250 375 500 625 750 875
Freq. (kHz)
forever
62.5 187.5 312.5 437.5 562.5 687.5 812.5 937.5
2. Number of points in time domain equals
number of points in FFT
Time
Domain 3. The alias region is normally hidden.
Sampled
Signal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Time Index Mirror image about fs / 2 “aliasing”
2 full cycles 4. Frequency Resolution = Δf = fs / N
Of input samples
16 samples total Δf = fs / N = 1MHz / 16 = 62kHz
τ = 8µs, f = 1/(8µs) = 125kHz

3
Alias is a Mirror Image of Sampled Signal
Alias is a mirror image of sampled signal

Square wave has


Frequency odd harmonics
Domain
(FFT)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Freq. Bin
0.0 125 250 375 500 625 750 875
Freq. (kHz) • Example of a “square wave”
62.5 187.5 312.5 437.5 562.5 687.5 812.5 937.5
• Square wave contains odd harmonics

Time e.g. 3, 5, 7 …
Domain • Notice the symmetry around 500kHz
Sampled
Signal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Time Index

4
FFT Example Calculation
Alias region is normally hidden

Sampled
Signal
Alias
fs – fin = 875kHz
Example FFT
125kHz 1000kHz-125kHz fs = 1MHz Sampling Rate
Frequency
N𝑠𝑎𝑚𝑝 = 16 Number of Samples
Domain
(FFT) fs 1MHz
∆f = = = 62.5𝑘𝐻𝑧 Frequency Resolution
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Freq. Bin N𝑠𝑎𝑚𝑝 16
0.0 125 250 375 500 625 750 875 1 1
Freq. (kHz) ∆t = = = 1𝜇𝑠 Sampling time
62.5 187.5 312.5 437.5 562.5 687.5 812.5 937.5 fs 1MHz
f𝑖𝑛 = 125𝑘𝐻𝑧 Input signal
Frequency Bin
Time f𝑖𝑛 125𝑘𝐻𝑧
k𝑓 = = = 2.0 Note: fin is an exact
Domain ∆f 62.5𝑘𝐻𝑧 integer multiple of Δf
Sampled
Signal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Time Index

2 full cycles
Of input samples
16 samples total
τ = 8µs, f = 1/(8µs) = 125kHz

5
FFT – Different Input Frequency
Alias region is normally hidden

Sampled
Signal
Alias
fs – fin = 812.5kHz
Example FFT
187.5kHz 1000kHz-187.5kHz fs = 1Msps Sampling Rate
Frequency
Domain N𝑠𝑎𝑚𝑝 = 16 Number of Samples
(FFT) fs 1Msps
∆f = = = 62.5𝑘𝑠𝑝𝑠 Frequency Resolution
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Freq. Bin N𝑠𝑎𝑚𝑝 16
0.0 125 250 375 500 625 750 875
Freq. (kHz)
1 1
62.5 187.5 312.5 437.5 562.5 687.5 812.5
∆t = = = 1𝜇𝑠 Sampling time
937.5 fs 1Msps
f𝑖𝑛 = 187.5𝑘𝐻𝑧 Input signal
f𝑖𝑛 187.5𝑘𝐻𝑧 Frequency Bin
Time
k𝑓 = = = 3.0 Note: fin is an exact
Domain ∆f 62.5𝑘𝑠𝑝𝑠
Sampled
integer multiple of Δf
Signal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Time Index

3 full cycles
Of input samples
16 samples total
τ = 5.333µs, f = 1/(5.333µs) = 187.5kHz

6
FFT – Spectral Leakage
Alias region is normally hidden

Sampled
Signal
Alias
fs – fin = 812.5kHz
Example FFT
180kHz 1000kHz-187.5kHz fs = 1Msps Sampling Rate
Frequency
N𝑠𝑎𝑚𝑝 = 16 Number of Samples
Domain
(FFT) fs 1Msps
∆f = = = 62.5𝑘𝑠𝑝𝑠 Frequency Resolution
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Freq. Bin N𝑠𝑎𝑚𝑝 16
0.0 125 250 375 500 625 750 875
Freq. (kHz)
1 1
∆t = = = 1𝜇𝑠 Sampling time
62.5 187.5 312.5 437.5 562.5 687.5 812.5 937.5 fs 1Msps
f𝑖𝑛 = 180𝑘𝐻𝑧 Input signal
Frequency Bin
Time f𝑖𝑛 180𝑘𝐻𝑧
k𝑓 = = = 2.88 Note: fin is NOT an exact
Domain ∆f 62.5𝑘𝑠𝑝𝑠
Sampled integer multiple of Δf
Signal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Time Index

2.88 cycles
Of input samples
16 samples total
τ = 5.555µs, f = 1/(5.555µs) = 180kHz

7
Window: Eliminates discontinuity in sampled waves
Not an integer Not an integer
number of cycles number of cycles

More spectral
leakage

0 255

Window eliminates
the discontinuity at
end of record Less spectral
leakage

0 255

8
Comparing Frequency Response of Different Windows
Frequency Response of popular window functions

No window

• Ideally we would like a very narrow


Hamming main lobe and very deep attenuation
in side lobes.
Hann
• For ADC characterization 7 term
Four-term Blackman
Harris Blackman Harris is most often used.

Side Lobes
Main Lobe
Seven-term Blackman
Harris

0 2 4 6 8 10 12 14 16 18
FFT frequency Bin

9
Different Windows for Different Applications
Signal Content Window
ADC characterization Blackman Harris
Sine wave or combination of waves Hann
Sine Wave (amplitude accuracy is important) Flat Top
Narrowband random signal (vibration data) Hann
Broadband random (white noise) Uniform
Closely spaced sine waves Uniform, Hamming
Excitation signals (hammer blow) Force
Response signals Exponential
Unknown content Hann
Two tones with frequencies close but amplitudes very different Kaiser-Bessel
Two tones with frequencies close and almost equal amplitudes Uniform
Accuracy single tone amplitude measurements Flat Top

10
Window Processing Errors

Parameters used to characterize frequency response of windowing functions


Highest side Worst-case 6-dB Half main
Processing Scalloping
Window lobe level processing bandwidth lobe width
loss (dB) loss (dB)
(dB) loss (dB) (bins) (bins)
No window -13 0.00 3.92 3.92 1.21 1
Hann -32 1.76 1.33 3.09 2.00 2
Hamming -43 1.34 1.76 3.10 1.82 2
Four-term
Blackmon -92 3.00 0.83 3.83 2.72 4
Harris
Seven-term
Blackmon -163 4.20 0.46 4.66 3.52 7
Harris

11
Thanks for your time!
Please try the quiz.

12
© Copyright 2017 Texas Instruments Incorporated. All rights reserved.
This material is provided strictly “as-is,” for informational purposes only, and without any warranty.
Use of this material is subject to TI’s , viewable at TI.com
Quiz: Fast Fourier Transforms (FFTs)
and Windowing
TIPL 4302
TI Precision Labs – ADCs

Created by Art Kay

1
Quiz: Fast Fourier Transforms (FFTs) and Windowing
1. A time domain signal has 1024 points in it. How many points will be in the FFT?
a) 1024.
b) 2048.
c) This depends on the type of FFT used.

2. The sampling rate of a particular converter is 1Msps. The FFT will contain data that extents to
what frequency.
a) 1MHz. However, the data from 500kHz to 1MHz is redundant and is normally ignored.
b) 2MHz. However, the data from 1MHz to 2MHz is an alias.
c) This depends on the number of points of the FFT.

2
Quiz: Fast Fourier Transforms (FFTs) and Windowing
3. What is the purpose of the windowing function?
a) The window function minimizes spectral leakage.
b) The window function eliminates the discontinuity between records by shaping the time domain
signal.
c) The window function acts as a band stop filter to eliminate harmonic distortion.
d) The window function is used to convert time domain signals to frequency domain signals.
e) Both a and b are correct
f) Both c and d are correct

4. What type of window is commonly used for ADC characterization?


a) Hamming.
b) Hann.
c) The 4 term Blackman Harris.
d) The 7 term Blackman Harris.

3
Quiz: Fast Fourier Transforms (FFTs) and Windowing
5. Convert the time domain signal below to its frequency domain equivalent.
a) What is the frequency resolution?
b) What bins does the frequency domain signal fall in?
c) Does this FFT have spectral leakage?
d) Draw the FFT.
Digitized Signal vs. Time
1.5 fs = 1Msps
1
fin = 40kHz
Nsamp = 128128
0.5

record 1
Volts

0
record 2
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400 420
record 3
-0.5

-1

-1.5
Samples (Sampling rate = 1Msps)

4
Solutions

5
Quiz: Fast Fourier Transforms (FFTs) and Windowing
1. A time domain signal has 1024 points in it. How many points will be in the FFT?
a) 1024.
b) 2048.
c) This depends on the type of FFT used.

2. The sampling rate of a particular converter is 1Msps. The FFT will contain data that extents to
what frequency.
a) 1MHz. However, the data from 500kHz to 1MHz is redundant and is normally ignored.
b) 2MHz. However, the data from 1MHz to 2MHz is an alias.
c) This depends on the number of points of the FFT.

6
Quiz: Fast Fourier Transforms (FFTs) and Windowing
3. What is the purpose of the windowing function?
a) The window function minimizes spectral leakage.
b) The window function eliminates the discontinuity between records by shaping the time domain
signal.
c) The window function acts as a band stop filter to eliminate harmonic distortion.
d) The window function is used to convert time domain signals to frequency domain signals.
e) Both a and b are correct
f) Both c and d are correct

4. What type of window is commonly used for ADC characterization?


a) Hamming.
b) Hann.
c) The 4 term Blackman Harris.
d) The 7 term Blackman Harris.

7
Quiz: Fast Fourier Transforms (FFTs) and Windowing
5. Convert the time domain signal below to its frequency domain equivalent.
a) What is the frequency resolution? Δf = fs/Nsamp = 1MHz/128 = 7.8125kHz
b) What bins does the frequency domain signal fall in? kf = fin/ Δf = 40kHz/7.8125kHz = 5.12
c) Does this FFT have spectral leakage? Yes. You can clearly see the discontinuity at the end of each
record.
d) Draw the FFT. Alias
fs – fin = 1MHz – 40kHz
= 960kHz

Alias region is normally hidden


Sampled Signal
40kHz

Nyquist
Spectral Spectral
Frequency Leakage Leakage
frequency
Domain
(FFT)
61 62 63 64 119 120 121 122 123 124 125 126 127
0 1 2 3 4 5 6 7 8 9 10 Freq. Bin

7.8125kHz 39.0625kHz 492.1875kHz 960.9375kHz

You might also like