DISCRETE FOURIER TRANSFORM AND FILTER...
Transcript of DISCRETE FOURIER TRANSFORM AND FILTER...
![Page 1: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/1.jpg)
DISCRETE FOURIER TRANSFORM AND FILTER DESIGN
N. C. State University
CSC557 ♦ Multimedia Computing and Networking
Fall 2001
Lecture # 03
![Page 2: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/2.jpg)
2Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Spectrum of a Square Wave
![Page 3: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/3.jpg)
3Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)Results of Some Filters
![Page 4: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/4.jpg)
4Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Notation
• x[n] and y[n] are discretely sampled signals
• z[n] = x[n] + y[n] = addition of two signals to produce a third signal
• A "system" modifies one signal to produce another
![Page 5: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/5.jpg)
5Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Fundamental Concept of DSP
If
x[n] can be decomposed into a set of additive components
and a system acting on x[n] produces an output y[n]
and the system is applied to each of the additive components individually to produce a set of outputs
Then
adding the outputs together will produce y[n]
![Page 6: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/6.jpg)
6Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 7: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/7.jpg)
7Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Convolution
• Let a system acting on x[n] be represented as h[n]
• Convolution is defined as— y[i] = sum from j=0 to M of (x[i-j] • h[j])
• Notation for convolution: y[n] = x[n] * h[n]
![Page 8: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/8.jpg)
8Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
ConvolutionExample
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 9: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/9.jpg)
9Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
Cont’d
![Page 10: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/10.jpg)
10Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Cont’d
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 11: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/11.jpg)
11Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)Some Examples of Convolution
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 12: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/12.jpg)
12Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu) Examples (cont’d)
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 13: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/13.jpg)
13Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Convolution: Boundary Values
• What values do you use for x[i] when i<0 or i>n?
• One solution: "pad with zeros”
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 14: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/14.jpg)
14Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Another View
• Convolution = "sum of weighted components"
• Weighting coefficients or factors = values of the samples of h[n]
![Page 15: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/15.jpg)
15Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
"Calculus-Like" Convolution Operations
• "First difference" — each sample of the output = difference between adjacent samples
in the input
• "Running sum" — each sample in output = sum of all the input samples up to that
sample
• First difference and running sum are inverses
![Page 16: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/16.jpg)
16Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
"Calculus-Like" Convolution Operations
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 17: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/17.jpg)
17Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
(cont’d)
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 18: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/18.jpg)
18Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Associativity of Convolution
• The order of two or more systems performed in series is irrelevant
• Two or more systems performed in series can be replaced by the convolution of the two systems
![Page 19: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/19.jpg)
19Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Correlation
• Purpose: find the "degree of match" between two signals— optimal technique for detecting a reference signal or pattern in
random noise
• Definition: — y[i] = sum from j=0 to M of (x[i+j] • h[j])
![Page 20: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/20.jpg)
20Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
Correlation Application
![Page 21: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/21.jpg)
21Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Illustration of Correlation Computation
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 22: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/22.jpg)
22Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Discrete Fourier Transform (DFT)
• Decompose an N-point signal into (N/2+1) sine waves and (N/2+1) cosine waves— to be determined: amplitude of each sine and cosine wave
• The sine and cosine waves form an orthoganal basis function
![Page 23: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/23.jpg)
23Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Illustration of Fourier Transform
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 24: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/24.jpg)
24Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Illustration (cont’d)
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 25: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/25.jpg)
25Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Terminology of DFT
• ReX[N] = real part of the frequency domain representation
• ImX[N] = imaginary part of the frequency domain representation— note: ImX[0] = ImX[N/2] = 0, always
• No complex arithmetic in this course!
• Independent variable = i/N = fraction of the sampling frequency
![Page 26: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/26.jpg)
26Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Scaling ReX and ImX
• Scaling needed to get amplitudes of basis functions
— (see p. 156 of Smith for explanation of why scaling is needed)
• ReX = amplitude of cosine waves
• ImX = amplitudes of sine waves
=
=
=
=
-
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 27: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/27.jpg)
27Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Synthesis (Inverse DFT)
+= π=
π=
Σ Σ
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 28: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/28.jpg)
28Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Analysis (DFT)
• Correlate x[n] with each of the basis functions— reminder: find the "degree of match" between x[n] and each of the
basis functions
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
=
=
=
=
-
-
-
Σ
Σ π
π
basis function
basis function
![Page 29: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/29.jpg)
29Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Example: First Part of Correlation
![Page 30: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/30.jpg)
30Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Polar Notation
• (skip)
![Page 31: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/31.jpg)
31Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Linearity of DFT
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 32: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/32.jpg)
32Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Linearity (cont’d)
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 33: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/33.jpg)
33Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)Compression and Expansion of Time-Varying Signals
• Equivalent to resampling at a higher or lower rate
• Interpolation = adding samples
• Decimation = removing samples
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 34: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/34.jpg)
34Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Expansion (cont’d)
• Resampling from the actual (analog) signal -- no problem!
• Resampling from a discrete (digital) signal -- problems!— How do you interpolate between samples -- linear? curve fit?
— Better idea: convert to frequency domain, pad with zeros, synthesize back to time domain at new rate
![Page 35: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/35.jpg)
35Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
Expansion (cont’d)
![Page 36: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/36.jpg)
36Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Digital Filters
• "Thousands of times better performance than analog filters"
• Implementing a filter = convoluting a signal with the filter kernel
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 37: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/37.jpg)
37Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Filter Characteristics
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 38: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/38.jpg)
38Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Filter Design
• High pass, band pass, and band reject can be derived from low pass filters
• An exercise for the reader: how can you construct band pass and band reject filters from this?
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
x(n)
h(n) -low-pass filter
yl(n) yh(n)Low frequencies of x(n) only
Input signal
high frequencies of x(n) only
![Page 39: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/39.jpg)
39Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Moving Average Filter Design
• M = order of the filter— Higher M = better filter quality, lower M = less computation
== -
-Σ
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 40: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/40.jpg)
40Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 41: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/41.jpg)
41Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Ideal Filter Design
• Start with frequency transform of the desired response
1. Do IDFT to time domain
2. Terminate the infinite series at M+1 points
3. Shift to range 0 to M
4. Multiply by Blackman window to compensate for finite effects
![Page 42: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/42.jpg)
42Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Ideal Filter Design IllustrationFigure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 43: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/43.jpg)
43Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Illustration (cont’d)
Figure taken from Smith, The Scientist and Engineer’s Guide to Digital Signal Processing
![Page 44: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/44.jpg)
44Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Filter Design (Bottom Line)
• fc is fraction of sampling rate— E.g., if sampling rate is 8000 samples/sec, and you want a cutoff
frequency of 2000 cycles/sec, then fc = 2000/8000 = .25
=-
--π π π
+
--
![Page 45: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/45.jpg)
45Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Sources of Information
• Smith, The Scientist and Engineer’s Guide to Digital Signal Processing— Chapter 6
• Delta function and impulse response – skim only• Convolution – read• Input side algorithm – not needed• Output side algorithm – read• Sum of weighted inputs – read
— Chapter 7• Delta function – not needed• Calculus-like operations – read• Low-pass and high-pass filters – read• Causal and non-causal signals – not needed• Zero phase etc. – not needed• Mathematical properties – read• Correlation – read• Speed – not needed
![Page 46: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/46.jpg)
46Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Sources of Information
• Smith, The Scientist and Engineer’s Guide to Digital Signal Processing— Chapter 8
• Family of Fourier Transforms – read• Notation and format of the Real DFT – read• Frequency domain independent variable – read• DFT basis functions – read• Synthesis, calculating the inverse DFT – read• Analysis, calculating the DFT – read• Duality – not needed• Polar notation – skim
— Chapter 9• Spectral analysis of signals – read only the starting part• Frequency response of systems – not needed• Convolution via the frequency domain – useful, not needed
![Page 47: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/47.jpg)
47Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Sources of Information
• Smith, The Scientist and Engineer’s Guide to Digital Signal Processing— Chapter 10
• Linearity of fourier transform – read• Characteristics of phase – not needed• Periodic nature of DFT – skim• Compression and expansion, multirate – read• Multiplying signals (modulation) – skip
— Chapter 11—13 – not needed
— Chapter 14• Filter basics – read• How information is represented – skip• Time domain parameters – skim only• Frequency domain parameters – read• High-pass, band-pass, and band-reject filters – skim only• Filter classification – skim only
![Page 48: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/48.jpg)
48Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
Sources of Information
• Smith, The Scientist and Engineer’s Guide to Digital Signal Processing— Chapter 15
• Implementation by convolution - read• Noise reduction vs. step response – skim only• Frequency response – skim only• Rest of chapter… - skip
— Chapter 16• Strategy for the windowed sinc filter – skim only• Designing the filter – read• Rest of chapter… - skip
![Page 49: DISCRETE FOURIER TRANSFORM AND FILTER DESIGNreeves.csc.ncsu.edu/Classes/csc557/2001-fall/lectures/dft-filtering.pdf · Discrete Fourier Transform (DFT) • Decompose an N-point signal](https://reader031.fdocuments.net/reader031/viewer/2022012007/610eead13ed5806b0a16453f/html5/thumbnails/49.jpg)
49Copyright 2001 Douglas S. Reeves (http://reeves.csc.ncsu.edu)
And More Sources of Information
• [Pierce81] Signals: The Telephone and Beyond
• [McClellen98] DSP First: A Multimedia Approach