Fast Fourier Transform Discrete-time windowing Discrete Fourier Transform Relationship to DTFT Relationship to DTFS Zero padding

Similar documents
Fast Fourier Transform Discrete-time windowing Discrete Fourier Transform Relationship to DTFT Relationship to DTFS Zero padding

Overview of Discrete-Time Fourier Transform Topics Handy Equations Handy Limits Orthogonality Defined orthogonal

J. McNames Portland State University ECE 223 DT Fourier Series Ver

Core Concepts Review. Orthogonality of Complex Sinusoids Consider two (possibly non-harmonic) complex sinusoids

Overview of Sampling Topics

Windowing Overview Relevance Main lobe/side lobe tradeoff Popular windows Examples

J. McNames Portland State University ECE 223 Sampling Ver

Spectrograms Overview Introduction and motivation Windowed estimates as filter banks Uncertainty principle Examples Other estimates

Assignment 4 Solutions Continuous-Time Fourier Transform

6.003: Signal Processing

LAB 2: DTFT, DFT, and DFT Spectral Analysis Summer 2011

Definition of Discrete-Time Fourier Transform (DTFT)

Introduction. Spectral Estimation Overview Periodogram Bias, variance, and distribution Blackman-Tukey Method Welch-Bartlett Method Others

Assignment 2 Solutions Fourier Series

CHAPTER 7. The Discrete Fourier Transform 436

Lecture 19: Discrete Fourier Series

Chapter 6: Applications of Fourier Representation Houshou Chen

DSP Laboratory (EELE 4110) Lab#5 DTFS & DTFT

Lecture 10. Digital Signal Processing. Chapter 7. Discrete Fourier transform DFT. Mikael Swartling Nedelko Grbic Bengt Mandersson. rev.

Digital Signal Processing: Signal Transforms

Discrete Fourier transform (DFT)

Chapter 5. Fourier Analysis for Discrete-Time Signals and Systems Chapter

HW13 Solutions. Pr (a) The DTFT of c[n] is. C(e jω ) = 0.5 m e jωm e jω + 1

Discrete Fourier Transform

Discrete Fourier Transform

Change in Notation. e (i) (n) Note that this is inconsistent with the notation used earlier, c k+1x(n k) e (i) (n) x(n i) ˆx(n i) M

Digital Signal Processing Lecture 10 - Discrete Fourier Transform

Discrete-time Fourier transform (DTFT) representation of DT aperiodic signals Section The (DT) Fourier transform (or spectrum) of x[n] is

Fourier series for continuous and discrete time signals

Complex symmetry Signals and Systems Fall 2015

Signals and Systems Spring 2004 Lecture #9

Lecture 13: Discrete Time Fourier Transform (DTFT)

ECE-700 Review. Phil Schniter. January 5, x c (t)e jωt dt, x[n]z n, Denoting a transform pair by x[n] X(z), some useful properties are

Digital Signal Processing Chapter 10. Fourier Analysis of Discrete- Time Signals and Systems CHI. CES Engineering. Prof. Yasser Mostafa Kadah

EEO 401 Digital Signal Processing Prof. Mark Fowler

Overview of Bode Plots Transfer function review Piece-wise linear approximations First-order terms Second-order terms (complex poles & zeros)

6.003 Signal Processing

Signals & Systems. Lecture 5 Continuous-Time Fourier Transform. Alp Ertürk

6.003 Signal Processing

Digital Signal Processing Lab 3: Discrete Fourier Transform

8 The Discrete Fourier Transform (DFT)

Introduction to DFT. Deployment of Telecommunication Infrastructures. Azadeh Faridi DTIC UPF, Spring 2009

Solutions - Homework # 3

LAB 6: FIR Filter Design Summer 2011

X. Chen More on Sampling

! Circular Convolution. " Linear convolution with circular convolution. ! Discrete Fourier Transform. " Linear convolution through circular

Digital Signal Processing. Midterm 2 Solutions

Review: Continuous Fourier Transform

Final Exam of ECE301, Prof. Wang s section 1 3pm Tuesday, December 11, 2012, Lily 1105.

Chap 2. Discrete-Time Signals and Systems

Problem Set 9 Solutions

Aspects of Continuous- and Discrete-Time Signals and Systems

VII. Discrete Fourier Transform (DFT) Chapter-8. A. Modulo Arithmetic. (n) N is n modulo N, n is an integer variable.

Final Exam of ECE301, Prof. Wang s section 8 10am Tuesday, May 6, 2014, EE 129.

Digital Signal Processing. Midterm 1 Solution

Discrete-time Signals and Systems in

Multimedia Signals and Systems - Audio and Video. Signal, Image, Video Processing Review-Introduction, MP3 and MPEG2

Discrete Time Signals and Systems Time-frequency Analysis. Gloria Menegaz

Discrete Time Fourier Transform (DTFT) Digital Signal Processing, 2011 Robi Polikar, Rowan University

Responses of Digital Filters Chapter Intended Learning Outcomes:

The Z-Transform. For a phasor: X(k) = e jωk. We have previously derived: Y = H(z)X

Fourier Analysis of Signals Using the DFT

Discrete Time Fourier Transform

! Review: Discrete Fourier Transform (DFT) ! DFT Properties. " Duality. " Circular Shift. ! Circular Convolution. ! Fast Convolution Methods

Discrete-Time Fourier Transform

x n C l 1 u n C m 1 y n C p 1 v n C p 1

Table 1: Properties of the Continuous-Time Fourier Series. Property Periodic Signal Fourier Series Coefficients

DISCRETE FOURIER TRANSFORM

/ (2π) X(e jω ) dω. 4. An 8 point sequence is given by x(n) = {2,2,2,2,1,1,1,1}. Compute 8 point DFT of x(n) by

LABORATORY 1 DISCRETE-TIME SIGNALS

Signals and Systems Profs. Byron Yu and Pulkit Grover Fall Midterm 2 Solutions

Fall 2011, EE123 Digital Signal Processing

Fourier Analysis and Spectral Representation of Signals

INTRODUCTION TO THE DFS AND THE DFT

Nonparametric and Parametric Defined This text distinguishes between systems and the sequences (processes) that result when a WN input is applied

Final Exam of ECE301, Section 3 (CRN ) 8 10am, Wednesday, December 13, 2017, Hiler Thtr.

4.1 Introduction. 2πδ ω (4.2) Applications of Fourier Representations to Mixed Signal Classes = (4.1)

OLA and FBS Duality Review

Discrete Time Fourier Transform (DTFT)

Fourier Analysis Overview (0B)

x[n] = x a (nt ) x a (t)e jωt dt while the discrete time signal x[n] has the discrete-time Fourier transform x[n]e jωn

EE123 Digital Signal Processing. M. Lustig, EECS UC Berkeley

OLA and FBS Duality Review

Chapter 8 The Discrete Fourier Transform

BEE604 Digital Signal Processing

EE 224 Signals and Systems I Review 1/10

Review of Discrete-Time System

TTT4120 Digital Signal Processing Suggested Solutions for Problem Set 2

Fourier Analysis and Spectral Representation of Signals

MAHALAKSHMI ENGINEERING COLLEGE-TRICHY

(i) Understanding the characteristics and properties of DTFT

Discrete Time Systems

Chapter 7: The z-transform

Voiced Speech. Unvoiced Speech

UNIVERSITY OF OSLO. Please make sure that your copy of the problem set is complete before you attempt to answer anything.

x(n) = a k x(n k)+w(n) k=1

Fourier analysis of discrete-time signals. (Lathi Chapt. 10 and these slides)

Continuous Fourier transform of a Gaussian Function

ECSE 512 Digital Signal Processing I Fall 2010 FINAL EXAMINATION

Department of Electrical and Computer Engineering Digital Speech Processing Homework No. 6 Solutions

Transcription:

Fast Fourier Transform Discrete-time windowing Discrete Fourier Transform Relationship to DTFT Relationship to DTFS Zero padding J. McNames Portland State University ECE 223 FFT Ver. 1.03 1

Fourier Series & Transform Summary x[n] = X[k] = 1 N k=<n> x[n] = 1 2π X(e jω )= n=<n> 2π n= X[k]e jkω on x[n]e jkω on X(e jω )e jωn dω x[n]e jωn What are the similarities and differences between the DTFS & DTFT? J. McNames Portland State University ECE 223 FFT Ver. 1.03 2

Periodic Signals x[n] = k=<n> X[k]e jkω on FT 2π k= X[k] δ(ω kω o ) Recall that DT periodic signals can be represented by the DTFT Requires the use of impulses (why?) This makes the DTFT more general than the DTFS J. McNames Portland State University ECE 223 FFT Ver. 1.03 3

Example 1: Relationship to Fourier Series Suppose that we have a periodic signal x p [n] with fundamental period N. Define the truncated signal x[n] as follows. { x p [n] n 0 +1 n n 0 + N x[n] = 0 otherwise Determine how the Fourier transform of x[n] is related to the discrete-time Fourier series coefficients of x p [n]. Recall that X p [k] = 1 N n=<n> x p[ n]e jk(2π/n)n J. McNames Portland State University ECE 223 FFT Ver. 1.03 4

Example 1: Workspace J. McNames Portland State University ECE 223 FFT Ver. 1.03 5

DFT Estimate of DTFT { w[n]x[n] 0 n N 1 x w [n] =x[n] w[n] = 0 Otherwise X w (e jω )= 1 2π X(ejω ) W (e jω ) Recall that windowing in the time domain is equivalent to filtering (convolution) in the frequency domain We found earlier that a windowed signal x w [n] =x[n] w[n] could be thought of as one period of a periodic signal x p [n] This enables us to calculate the DTFT at discrete-frequencies using the discrete-time Fourier series analysis equation! Advantages DTFS consists of a finite sum - we can calculate it DTFS can be calculated very efficiently using the Fast Fourier Transform (FFT) J. McNames Portland State University ECE 223 FFT Ver. 1.03 6

FFT Estimate of DTFT Derived X w (e jω ) = X w (e jω ) Ω=k 2π N = = + n= N 1 n=0 N 1 n=0 x w [n]e jωn x w [n]e jωn x w [n]e jk 2π N n = DFT {x w [n]} Calculation of the DTFT of a finite-duration signal at discrete frequencies is called the Discrete Fourier Transform (DFT) The FFT is just a fast algorithm for calculating the DFT J. McNames Portland State University ECE 223 FFT Ver. 1.03 7

DTFS DFT, FFT, and DTFS X[k] = 1 N DFT/FFT X w [k] = Note abuse of notation, X[k] The DFT is a transform N 1 n=0 n=<n> x[n]e jkω on x w [n]e jk 2π N n The FFT is a fast algorithm to calculate the DFT If x[n] is a periodic signal with fundamental period N, then the DFT is the same as the scaled DTFS The DFT can be applied to non-periodic signals For non-periodic signals this is modelled with windowing The DTFS cannot J. McNames Portland State University ECE 223 FFT Ver. 1.03 8

Example 2: FFT Estimate of DTFT Solve for the Fourier transform of 1 1 n 4 x[n] = +1 13 n 16 0 Otherwise J. McNames Portland State University ECE 223 FFT Ver. 1.03 9

Example 2: Workspace J. McNames Portland State University ECE 223 FFT Ver. 1.03 10

Example 2: Workspace J. McNames Portland State University ECE 223 FFT Ver. 1.03 11

Example 2: Signal 1 0.8 0.6 0.4 0.2 x[n] 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 12 14 16 Time J. McNames Portland State University ECE 223 FFT Ver. 1.03 12

Example 2: DTFT Estimate 5 Real X(e jω ) 0 5 True DTFT DFT Estimate 10 0 0.5 1 1.5 2 2.5 3 10 Imag X(e jω ) 5 0 5 0 0.5 1 1.5 2 2.5 3 Frequency (rads per sample) J. McNames Portland State University ECE 223 FFT Ver. 1.03 13

Zero Padding X w (e jω ) Ω=k 2π N = DFT {x w [n]} The FFT has two apparent disadvantages It requires that N be an integer power of 2: N =2 l It only generates estimates at N frequencies equally spaced between 0 and 2π rad/sample Both of these problems can be circumvented by zero-padding Recall that x w [n] =x[n] w[n] We can choose N to be larger than the length of our window w[n] J. McNames Portland State University ECE 223 FFT Ver. 1.03 14

Zero Padding Derived Suppose we add M N zeros to the finite-length signal x[n] such that M is an integer power of 2 and M N. Then the zero-padded signal, x z [n], has a length M. The frequency resolution then improves to 2π M rad/sample, rather than 2π N rad/sample. DFT {x w [n]} = DFT {x z [n]} = X w (e jω ) Ω=k 2π M = N 1 n=0 M 1 n=0 N 1 n=0 x w [n]e j (k 2π N )n x z [n]e j (k 2π M )n x w [n]e j (k 2π M )n = DFT {x z [n]} J. McNames Portland State University ECE 223 FFT Ver. 1.03 15

Example 3: FFT Estimate of DTFT Repeat the previous example but use zero-padding so that the estimate is evaluated at no less than 1000 frequencies between 0 and π. J. McNames Portland State University ECE 223 FFT Ver. 1.03 16

Example 3: DTFT Estimate with Padding 5 Real X(e jω ) 0 5 True DTFT DFT Estimate 10 0 0.5 1 1.5 2 2.5 3 10 Imag X(e jω ) 5 0 5 0 0.5 1 1.5 2 2.5 3 Frequency (rads per sample) J. McNames Portland State University ECE 223 FFT Ver. 1.03 17

Example 3: MATLAB Code %function [] = FFTEstimate(); close all; n = 0:17; x = -1*(n>=1 & n<=4) + 1*(n>=13 & n<=16); %============================================================================== % Plot the signal %============================================================================== figure FigureSet(1,4.5,2.8); plot([min(n) max(n)],[0 0], k: ); hold on; h = stem(n,x, b ); set(h(1), MarkerFaceColor, b ); set(h(1), MarkerSize,4); hold off; ylabel( x[n] ); xlabel( Time ); xlim([min(n) max(n)]); ylim([-1.05 1.05]); box off; AxisSet(8); print -depsc FFTESignal; %============================================================================== % Plot the True Transform \& Estimate %============================================================================== n = 1:16; x = -1*(n>=1 & n<=4) + 1*(n>=13 & n<=16); N = length(x); k = 0:N-1; we = (0:N-1)*(2*pi/N); % Frequency of estimates Xe = exp(-j*k*(2*pi/n)*1).*fft(x); J. McNames Portland State University ECE 223 FFT Ver. 1.03 18

w X = 0.0001:(2*pi)/1000:2*pi; = (-exp(-j*w*1) + exp(-j*w*5) + exp(-j*w*13) - exp(-j*w*17))./(1-exp(-j*w)); % True spectrum figure FigureSet(1, LTX ); subplot(2,1,1); h = plot(w,real(x), r,we,real(xe), k ); set(h(2), Marker, o ); set(h(2), MarkerFaceColor, k ); set(h(2), MarkerSize,3); ylabel( Real X(e^{j\omega}) ); xlim([0 pi]); box off; AxisLines; legend(h(1:2), True DTFT, DFT Estimate,4); subplot(2,1,2); h = plot(w,imag(x), r,we,imag(xe), k ); set(h(2), Marker, o ); set(h(2), MarkerFaceColor, k ); set(h(2), MarkerSize,3); ylabel( Imag X(e^{j\omega}) ); xlim([0 pi]); box off; AxisLines; xlabel( Frequency (rads per sample) ); AxisSet(8); print -depsc FFTEstimate; %============================================================================== % Plot the True Transform \& Estimate %============================================================================== n = 1:16; x = -1*(n>=1 & n<=4) + 1*(n>=13 & n<=16); N = 2^(ceil(log2(2000))); k = 0:N-1; we = (0:N-1)*(2*pi/N); % Frequency of estimates Xe = exp(-j*k*(2*pi/n)*1).*fft(x,n); J. McNames Portland State University ECE 223 FFT Ver. 1.03 19

figure FigureSet(1, LTX ); subplot(2,1,1); h = plot(w,real(x), r,we,real(xe), k ); set(h(1), LineWidth,2.0); set(h(2), LineWidth,1.0); ylabel( Real X(e^{j\omega}) ); xlim([0 pi]); box off; AxisLines; legend(h(1:2), True DTFT, DFT Estimate,4); subplot(2,1,2); h = plot(w,imag(x), r,we,imag(xe), k ); set(h(1), LineWidth,2.0); set(h(2), LineWidth,1.0); ylabel( Imag X(e^{j\omega}) ); xlim([0 pi]); box off; AxisLines; xlabel( Frequency (rads per sample) ); AxisSet(8); print -depsc FFTEstimatePadded; J. McNames Portland State University ECE 223 FFT Ver. 1.03 20

Some Key Points on Windowing & the FFT In practice, most DT signals are truncated to a finite duration prior to processing Mathematically, this is equivalent to multiplying an signal with infinite duration by another signal with finite duration: x[n] w[n] This process is called windowing Windowing in time is equivalent to convolution in frequency: x[n] w[n] FT [ 1 2π X(e jω ) W (e jω ) ] This causes a blurring of the estimated DTFT The FFT is a very efficient means of calculating the DTFT of a finite duration DT signal at discrete frequencies Zero padding can be used to obtain arbitrary resolution The FFT can also be used to efficiently perform convolution in time (details were not discussed in class) J. McNames Portland State University ECE 223 FFT Ver. 1.03 21