ANALOG AND DIGITAL SIGNAL PROCESSING ADSP - Chapter 8

Similar documents
The Discrete Fourier Transform

SEISMIC WAVE PROPAGATION. Lecture 2: Fourier Analysis

Experimental Fourier Transforms

Tutorial Sheet #2 discrete vs. continuous functions, periodicity, sampling

Lecture 27 Frequency Response 2

L6: Short-time Fourier analysis and synthesis

EE301 Signals and Systems In-Class Exam Exam 3 Thursday, Apr. 20, Cover Sheet

3.2 Complex Sinusoids and Frequency Response of LTI Systems

Chirp Transform for FFT

Chapter 8 The Discrete Fourier Transform

ANALOG AND DIGITAL SIGNAL PROCESSING CHAPTER 3 : LINEAR SYSTEM RESPONSE (GENERAL CASE)

Chapter 4 Discrete Fourier Transform (DFT) And Signal Spectrum

Discrete Fourier Transform

Vibration Testing. an excitation source a device to measure the response a digital signal processor to analyze the system response

Grades will be determined by the correctness of your answers (explanations are not required).

E : Lecture 1 Introduction

Distortion Analysis T

EA2.3 - Electronics 2 1

Correlation, discrete Fourier transforms and the power spectral density

Lecture 4 - Spectral Estimation

V(t) = Total Power = Calculating the Power Spectral Density (PSD) in IDL. Thomas Ferree, Ph.D. August 23, 1999

FILTERING IN THE FREQUENCY DOMAIN

I. Signals & Sinusoids

EE301 Signals and Systems In-Class Exam Exam 3 Thursday, Apr. 19, Cover Sheet

SNR Calculation and Spectral Estimation [S&T Appendix A]

PS403 - Digital Signal processing

Grades will be determined by the correctness of your answers (explanations are not required).

Representing a Signal

Fig. 1: Fourier series Examples

EE123 Digital Signal Processing

The Fourier transform allows an arbitrary function to be represented in terms of simple sinusoids. The Fourier transform (FT) of a function f(t) is

Vibration Testing. Typically either instrumented hammers or shakers are used.

Signal Processing COS 323

EE 435. Lecture 32. Spectral Performance Windowing

Sound & Vibration Magazine March, Fundamentals of the Discrete Fourier Transform

Image Enhancement in the frequency domain. GZ Chapter 4

IB Paper 6: Signal and Data Analysis

Topic 3: Fourier Series (FS)

Sampling. Alejandro Ribeiro. February 8, 2018

ESS Finite Impulse Response Filters and the Z-transform

E2.5 Signals & Linear Systems. Tutorial Sheet 1 Introduction to Signals & Systems (Lectures 1 & 2)

Frequency-domain representation of discrete-time signals

Summary of lecture 1. E x = E x =T. X T (e i!t ) which motivates us to define the energy spectrum Φ xx (!) = jx (i!)j 2 Z 1 Z =T. 2 d!

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

Fourier Transform in Image Processing. CS/BIOEN 6640 U of Utah Guido Gerig (slides modified from Marcel Prastawa 2012)

PART 1. Review of DSP. f (t)e iωt dt. F(ω) = f (t) = 1 2π. F(ω)e iωt dω. f (t) F (ω) The Fourier Transform. Fourier Transform.

Accurate Fourier Analysis for Circuit Simulators

DESIGN OF CMOS ANALOG INTEGRATED CIRCUITS

06EC44-Signals and System Chapter Fourier Representation for four Signal Classes

EE 435. Lecture 30. Data Converters. Spectral Performance

Evaluating Fourier Transforms with MATLAB

Need for transformation?

Polyphase filter bank quantization error analysis

Centre for Mathematical Sciences HT 2017 Mathematical Statistics

Computational Methods CMSC/AMSC/MAPL 460. Fourier transform

THE FOURIER TRANSFORM (Fourier series for a function whose period is very, very long) Reading: Main 11.3

Key Intuition: invertibility

Time and Spatial Series and Transforms

Cast of Characters. Some Symbols, Functions, and Variables Used in the Book

Introduction to Digital Signal Processing

EEO 401 Digital Signal Processing Prof. Mark Fowler

Sistemas de Aquisição de Dados. Mestrado Integrado em Eng. Física Tecnológica 2016/17 Aula 3, 3rd September

Correlator I. Basics. Chapter Introduction. 8.2 Digitization Sampling. D. Anish Roshi

3. Lecture. Fourier Transformation Sampling

Aspects of Continuous- and Discrete-Time Signals and Systems

Discrete Fourier Transform

Fourier Series and Integrals

/ (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

The Fourier Transform (and more )

EEO 401 Digital Signal Processing Prof. Mark Fowler

ECSE 512 Digital Signal Processing I Fall 2010 FINAL EXAMINATION

New Mexico State University Klipsch School of Electrical Engineering EE312 - Signals and Systems I Fall 2015 Final Exam

GATE EE Topic wise Questions SIGNALS & SYSTEMS

Lab Fourier Analysis Do prelab before lab starts. PHSX 262 Spring 2011 Lecture 5 Page 1. Based with permission on lectures by John Getty

1 Understanding Sampling

Frequency Response and Continuous-time Fourier Series

Elec4621 Advanced Digital Signal Processing Chapter 11: Time-Frequency Analysis

Multirate Digital Signal Processing

Signals and Systems Lecture (S2) Orthogonal Functions and Fourier Series March 17, 2008

Fourier Transform Chapter 10 Sampling and Series

ECG782: Multidimensional Digital Signal Processing

Generation of bandlimited sync transitions for sine waveforms

Lecture 4 Filtering in the Frequency Domain. Lin ZHANG, PhD School of Software Engineering Tongji University Spring 2016

APPENDIX A. The Fourier integral theorem

Introduction to Fourier Analysis Part 2. CS 510 Lecture #7 January 31, 2018

Introduction to Biomedical Engineering

Fundamentals of the DFT (fft) Algorithms

Closed book (equation sheet handed out with this midterm) Calculators OK You must show your work to get full credit

G52IVG, School of Computer Science, University of Nottingham

OSE801 Engineering System Identification. Lecture 09: Computing Impulse and Frequency Response Functions

Review: Continuous Fourier Transform

Complex symmetry Signals and Systems Fall 2015

FOURIER TRANSFORM AND

Discrete Fourier Transform

Digital Speech Processing Lecture 10. Short-Time Fourier Analysis Methods - Filter Bank Design

EE538 Final Exam Fall :20 pm -5:20 pm PHYS 223 Dec. 17, Cover Sheet

1 1.27z z 2. 1 z H 2

New Algorithms for Removal of DC Offset and Subsynchronous. Resonance terms in the Current and Voltage Signals under Fault.

Fourier transform. Alejandro Ribeiro. February 1, 2018

Digital Signal Octave Codes (0A)

Transcription:

ANALOG AND DIGITAL SIGNAL PROCESSING ADSP - Chapter 8 Fm n N fnt ( ) e j2mn N X() X() 2 X() X() 3 W Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2 W W 3 W W x () x () x () 2 x () 3

2 Chapter 8 Discrete Fourier Transform (DFT), FFT Introduction to discrete Fourier transform Time-limited signal made periodic Negative aspect and solution of the periodicity Mathematical approach to the DFT Basic concept DFT application example Fast Fourier transform (FFT) Matrix formulation - Intuitive development Applications Choosing the sampling frequency Windowing - Blind FFT output interpretation Problems Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

INTRODUCTION TO DISCRETE FOURIER TRANSFORM: Basic concept: In previous chapters, we dealt with the Fourier Series and the Fourier Transforms of continuous waveforms. When it comes to computing one of them from a real signal (continuous or discretized), we face a practical problem: 3 In most situations we exactly know our signal within a time-window starting at t and ending at t 2 ; however, we totally ignore what happened before t and what will happen after t 2. SOLUTION: To make PERIODIC the Time limited signal Example : Signal made Time PERIODIC limited signal with period T (T = t 2 t ) t t 2 Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

Example cont 2 25 3 35 4 4 2 4 6 8 Decaying sine-wave approximate frequency: Hz ( samples/cycle) 256 samples for period of the periodic signal T = µs 256 = 25.6ms ( 4Hz) Fourier Series coefficient magnitudes: Fseries n 5 Number of samples g Hz khz 2kHz 3kHz 25 4 = Hz (harmonic 24 or 25 multiplied by fundamental frequency) 2 3 4 5 6 7 8 9 n Harmonic number (ts = µs) Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2 4kHz

Magnitude Spectrum after Sampling 2 3 4 5 6 7 8 9 4 Frequency [Hz] fs/2 Potential problems due to the time-limited signal made periodic: Discontinuities Generate unwanted high frequencies components Example 2: 2 256 256 52 5 Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

Example 3: Pure sine-wave a) Integer number of periods 8 khz sine-wave Acquisition window. 5 4 5 4..5.2 time [s] 6 Sampling frequency: fs =.24 MHz, number of samples: N = 24 Sampled 8kHz sinewave 2 3 4 5 6 7 8 9 samples Sampled 8kHz sinewave 2 3 4 5 6 7 8 9 samples Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

Example 3: Pure sine-wave b) Non-integer number of periods 7.5 khz sine-wave Tw. 5 4 5 4..5.2 7 Tw: acquisition time window, ts: sampling interval Tw = Fundamental frequency: f = 5 5 5 5 2 25 3 35 4 Magnitude of Fourier Coefficients 8 khz Hn Harmonic number / Tw = fs / N = khz 5 5 N ts = N / fs 7.5 khz 5 5 2 25 3 35 4 Hn Harmonic number Discontinuities in the time-domain many spectral components Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

SOLUTION: WINDOWING Sampled 7.5kHz sinewave xw n A sin 2 28 n 75.5 cos 2 n 8 24 2 3 4 5 6 7 8 9 samples 2 2 3 4 5 6 7 8 9 8 2 2 3 4 5 6 7 8 9 samples Cosine type window Windowed sampled 7.5kHz sinewave 2 3 4 5 6 7 8 9 samples windowed sampled 7.5 khz sine + period. 2 3 4 Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2 8 6 4 2 Magnitude of Fourier Coefficients g Hn Harmonic number

5 8 g 5 7.5 khz without windowing 6 4 2 7.5 khz with windowing 5 5 2 25 3 35 4 Hn Harmonic number 2 3 4 Hn Harmonic number 9 w(t) window x(t) X x(t) w(t) = xw(t) X(jω) * WINDOWING DOWNSIDE: xw(t) W(jω) = XW(jω) Frequency domain convolution of the window spectrum with the signal spectrum! Broadening of the signal spectrum Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

MATHEMATICAL APPROACH OF THE DFT Basic concept: If f(t) is our continuous waveform, fd(t) is its discretized version: f(t) fd() t n f( n ts) ( t n ts) Where ts is the time between consecutive samples. By definition, the Fourier Transform of fd(t) is: Ffdt ( ()) Fd( ) n fn ( ts) ( n n ts) e j t dt Fd( ) Previously, we introduced a time-limitation. The simplest way to do this is to set the lower bound of the summation at and the upper bound at N-, thus limiting the total number of samples considered to N. Rewriting Fd() gives: Fdw( ) N n Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2 n fn ( ts) e j nts fn ( ts) e j nts WDFT

The letter W used to characterize this new definition refers to window since our discretized waveform f(n ts) is effectively windowed, that is, multiplied by a time-window function. In order to illustrate the implication of the WDFT, consider a pulse represented by 8 equally spaced samples (N=8): Fdw ( ) 7 n fnts ( ) e j n ts e j ts e j ts e j 2 ts e j 3 ts From this set of samples, we get the following spectrum (with ts = ) : Fdw 2 3 4 5 6 7 n ( ) 4 2 8 6 4 2 2 4 6 8 The periodicity in comes from the sampling theorem (period: 2/ts = s ). Since the theoretical Power Spectrum (from its Fouriertransform)ofapulseexpendfrom- to +, that produces a noticeable aliasing (blue)! Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

If the initial waveform is artificially made periodic with a period of 8ts, then we can compute the Fourier coefficients by using the definition of the Fourier series. The next figures compare the spectrum obtained by the two approaches: Fourier Series Coefficients and Discrete Fourier Transform. m 2 4 2 Fourier Series 2 3 4 5 6 7 8 It can be easily shown that the Fourier Series Coefficients can be obtained by simply sampling the Discrete Fourier Transform. What is commonly referred to as the Discrete Fourier Transform (DFT) is, in reality, a Discrete- Time Fourier Series (DTFS) derived after transforming a limited number of samples (8 in our example) into a discrete periodic waveform. The fundamental frequency of this new signal is /(N ts). Thus, the spectral lines will appear at m/(n ts) Hz where m is an integer. 4 2 Discrete Fourier Transform Fdw ( ) 2 3 4 5 6 Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

So finally, we can write the DTFS or DFT in the most common form as: F 2 m N ts Fm ( ) n N fn ( ts) e j2 m n N DFT 3 The inverse DFT is: f( n ts) N m N Fm ( ) e j2 m n InvDFT As already mentioned in the beginning of this chapter, due to the limited number of samples used in the computation of the WDFT, numerous problems can appear that one has to be aware of. N Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

SIMPLE DFT APPLICATIONS # (integer number of cycle) f(t) = cos(2t) ; a cosine function with a period of s, sampled every ts second, Tw = ts (N-) N = 6, ts = /6 T = s 4 cos 2 t.2.4.6.8 N F m n t j2mn cos2nts N e Tw t n ts F m cos 2nts 5 5 5 5 5 Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2 m n

SIMPLE DFT APPLICATIONS #2 (non-integer number of cycle) f(t) = cos(2t) ; N = 6, ts = /2 Tw =.25s cos 2 t cos 2 nts 5 N F m n.5 j2mn N cos2ntse t Tw F m 5 5 5 5 5 Since the number of periods used to compute the WDFT is not an integer number, a discontinuity in the time domain is created, thus generating artifacts (unwanted high frequencies spectral components) in the power spectrum. In order to solve this problem, various window types have been proposed, each one of them with particular benefits and draw-backs!! The optimum choice will depend upon the features one wishes to emphasize. Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2 n

FAST FOURIER TRANSFORM (FFT) 6 The FFT is simply an algorithm that can compute the discrete Fourier transform much more rapidly than other available algorithms. In the case of the DFT, the approximate number of multiplication grows with the square of N. If Ncanbewrittenas2 K (where K is an integer), a substantial saving can be achieved on the number of multiplication which becomes in the order of : 2Nlog 2 N. Many algorithms have been designed and the interested reader is encouraged to refer to one of the classical text books covering this topic. A simple matrix factoring example is used to intuitively justify the FFT algorithm. Matrix formulation Consider the discrete Fourier transform: 8- Fm ( ) N n j2m n N f ()e n (8-) describes the computation of N equations. Let N = 4 and 8-2 W e 8-3 F ( ) f ( ) W f ( ) W f ( 2) W f ( 3) W F ( ) f ( ) W f ( ) W f ( 2) f ( 3) W 3 F2 ( ) f ( ) W f ( ) f ( 2) W 4 f ( 3) W 6 F3 ( ) f ( ) W f ( ) W 3 f ( 2) W 6 f ( 3) W 9 8-4 j2 mn m N (8-4) reveals that since W and f o (n) are complex matrices, thus N 2 complex multiplication and N (N-) complex additions are necessary to perform the required matrix computation. Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2 F ( ) F ( ) F2 ( ) F3 ( ) W W W W W W W 3 W W 4 W 6 N W W 3 W 6 W 9 f ( ) f ( ) f ( 2) f ( 3)

INTUITIVE DEVELOPMENT To illustrate the FFT algorithm, it is convenient to choose the number of sample points of f o (n) accordingtotherelation N=2,where is an integer. The first step in developing the FFT algorithm for this example is to rewrite (8-4) as: 7 8-5 F ( ) F ( ) F2 ( ) F3 ( ) W W 3 The next step is to factor the square matrix in (8-5) as follows: W W 3 W f ( ) f ( ) f ( 2) f ( 3) 8-7 Matrix Eq. (8-5) was derived from (8-4) by using the relationship W m n = W m n mod(n). Than: 8-6 W 6 = The method of factorization is based on the theory of the FFT algorithm. It is easily shown that multiplication of the two matrices of (8-7) yields the square matrix of (8-5) with the exception that rows and 2 have been interchanged (the rows are numbered,, 2 and 3). F ( ) F2 ( ) F ( ) F3 ( ) Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2 W W W 3 W W f ( ) f ( ) f ( 2) f ( 3)

Having accepted the fact that (8-7) is correct, although the result is scrambled, one should then examine the number of multiplication required to compute the equation. First let: 8-8 f ( ) f ( ) f ( 2) f ( 3) W W f ( ) f ( ) f ( 2) f ( 3) Element f () is computed by one complex multiplication and one complex addition. 8-9 f ( ) f ( ) W f ( 2) 8 Element f () is also determined by one complex multiplication and one complex addition. Only one complex addition is required to compute f (2). This from the fact that W = - ; hence: where the complex multiplication W f (2) has already been computed in the determination of f (). By the same reasoning, f (3) is computed by only one complex addition and no multiplications. The intermediate vector f (n) is then determined by four complex additions and two complex multiplications. Let us continue by completing the computation of (8-7): 8- F ( ) F2 ( ) F ( ) F3 ( ) f 2 ( ) f 2 ( ) f 2 ( 2) f 2 ( 3) 8- W f ( 2) f ( ) f ( 2) f ( ) W f ( 2) W W 3 f ( ) f ( ) f ( 2) f ( 3) Term f 2 () is computed by one complex multiplication and addition! 8-2 f 2 ( ) f ( ) W f ( ) Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

Element f 2 () is computed by one addition because W =-. By similar reasoning, f 2 (2) is determined by one complex multiplication and addition, and f 2 (3) by only one addition. Thus: - Computation of F(m) by means of Eq. (8-7) requires a total of: - Computation of F(m) by (8-4) requires: four complex multiplication and eight complex additions sixteen complex multiplication and twelve complex additions 9 However, the matrix factoring procedure does introduce one discrepancy. That is: 8-3 Fscrab( m) F ( ) F2 ( ) F ( ) F3 ( ) instead of Fm ( ) This rearrangement is inherent in the matrix factoring process and is a minor problem because it is straightforward to generalize a technique for unscrambling Fscrab(m) and obtain F(m). F ( ) F ( ) F2 ( ) F3 ( ) Thus, if N can be written as 2 K (where K is an integer), a substantial saving can be achieved on the number of multiplication which becomes in the order of : 2Nlog 2 N. Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

APPLICATIONS # CHOOSING THE SAMPLING FREQUENCY 3dB 2 fs = 5 khz 2 Hz - Hz-2 3dB 2 - -2 2kHz fs = 7.6 khz 2kHz Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

APPLICATIONS fs = 5 khz, 248 samples (). khz, 5V (sinus) (3) Hz, V (square-wave) #2 WINDOWING No-window after windowing (Hanning) 2 Hz Power Spectrum 4dB 2-2 -4 4kHz Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

APPLICATIONS #3 ACQUISITION WINDOW (Tw) LENGTH fs = 5 khz, X samples (). khz, 5V (sinus) (3) Hz, V (square-wave) 892 samples 22 248 samples 32768 samples Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

APPLICATIONS #4 FFT FFT 2 Power Spectrum 3 Hz square-wave, Vpp - sampling frequency : 5 khz 44 e-3 FFT -27dB 2Log FFT 23.9 e-3 FFT 2 7dBm Power Spectrum Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

APPLICATIONS Consider the following Power Spectrum (red and green): #5 BLIND FFT INTERPRETATION 3Hz 2.5kHz.5kHz What signals produced these spectrums? Chirp (5 Hz 2 khz) + Band-passed filtered (5Hz 2 khz) Gaussian noise 4ms Band-passed filtered (5Hz 2 khz) Gaussian noise 4ms 24 Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

PROBLEMS Problem 8. In p.8-4, prove that F = 8 Problem 8.2 With f(nt) = (t 5T) and N = 6, determine F m for m < 8 25 Problem 8.3 With N = 8, compute the module, the real and imaginary part of F(m) for m < 4 f() = f(2) = f(4) = f(6) = and f() = f(3) = f(5) = f(7) = - Problem 8.4 (SystemView) The input signal x(t) of an acquisition system has the following form : x(t) = A sin( t) + B Sqw(t), Sqw(t) : symmetrical square-wave of ms period The sampling rate (fs) can be chosen between 5 khz and khz and f is smaller then khz. Draw several possible FFT plots (magnitude) you may obtain when varying the following parameters: fs, N, with and without windowing, f, A/B Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2

PROBLEMS Problem 8.5 (SystemView) The input signal x(t) of an acquisition system has the following form : x(t) = A sin( t) + B sin( t) + C sin( 2 t) + D sin( 3 t) with f = khz, f = f + f, f 2 = f + f, f 3 = f 2 + f, f = 5 Hz A, B C and D can take the following values: + or (constant over the sampling window) Assume that fs = /T = 2 khz, how do you choose N? Problem 8.6 Problem 8.7 26 Chap. 8 Discrete Fourier Transform (DFT), FFT Prof. J.-P. Sandoz, 2-2