[PDF] Mathematics of the Discrete Fourier Transform (DFT)





Previous PDF Next PDF



Synchronized Swept-Sine: Theory Application

https://hal.archives-ouvertes.fr/hal-02504321/document



DIGITAL SIGNAL PROCESSING LAB Cycle I 1. Generation of

Generation of Sinusoidal waveform / signal based on recursive difference Objective: To wite the MATlab code to find the DFT / IDFT of given signal.



Fast Fourier Transform and MATLAB Implementation

Fourier Transform(DFT) for finite length signal. • DFT can convert time-domain discrete signal into frequency- domain discrete spectrum.



Understanding FFTs and Windowing.pdf

Understanding the Time Domain Frequency Domain



Simulation of a Radio Communication Channel

MatLab program and script files always have help fft. [a help message on the fft function follows]. ... BASIC PLOTTING IN MATLAB. Example 1: Sine Wave.



Course III – Filtering in Fourier domain and image segmentation

A sine wave (or sinusoidal) f(t) = a cos(2?ut + ?) is periodical Recenter / Shift: Practical considerations in Matlab: • Without shift:.



Novel Simple Approach to Digital Signal Processing of Sinusoids

Abstract—This paper examined a novel approach to the DSP of sinusoids with MATLAB using the Discrete Fourier. Transform. A sinusoid is a mathematical curve 



Codage sous Matlab

Code – Signal Sinusoïdal. • fe=1000;. • te=1/fe;. •. % Définition du Signal cosinus. • subplot(21



Mathematics of the Discrete Fourier Transform (DFT)

11 août 2002 7.4.3 DFT Matrix in Matlab . . . . . . . . . . . . . . . . . . . 144. 8 Fourier Theorems for the DFT. 147. 8.1 The DFT and its Inverse .



Lecture 5 - DFT & Windowing

Extracting a portion of signal from an everlasting sinusoidal signal is the When you use the Matlab function fft(sig) to compute the spectral component.



[PDF] Fast Fourier Transform and MATLAB Implementation

The DFT is widely used in the fields of spectral analysis acoustics medical imaging and telecommunications acoustics medical imaging and telecommunications



Plot discrete fourier transform of a sine wave - MATLAB Answers

Hi I want to plot the sampled signal in frequency domain which means I need to use the discrete fourier transform right? But when I run the code below I 



Discrete Fourier Transform - MATLAB & Simulink - MathWorks

The discrete Fourier transform or DFT is the primary tool of digital signal processing The foundation of the product is the fast Fourier transform (FFT) 



sine wave plot - MATLAB Answers - MathWorks

a = sin(2*pi*60*t) the code returns something bad What am i doing wrong? How can i generate a sin wave with different frequencies?



DFT of sine wave - MATLAB Answers - MathWorks

It looks like 'df' in the above code can be set to 'pi/8' to represent time shift in original signal Other than that everything looks fine 



MATLAB fft - Fast Fourier transform - MathWorks

This MATLAB function computes the discrete Fourier transform (DFT) of X Define the frequency domain f and plot the single-sided amplitude spectrum P1



[PDF] Fourier Analysis - MathWorks

In Matlab the expression fft(x) computes the finite Fourier transform of portion of the signal obtained by averaging the sine waves with those 



Plot FFT using Matlab - FFT of sine wave & cosine wave

16 juil 2014 · Learn how to plot FFT of sine wave and cosine wave using Matlab Understand FFTshift Plot one-sided double-sided and normalized spectrum



[PDF] Seminar 6 – DFT and Matlab code - the University of Warwick

The DFT is extremely important in the area of frequency (spectrum) analysis because it takes a discrete signal in the time domain and transforms that signal 

  • How do you find the DFT of a sine wave in MATLAB?

    f = -fs/2:fs/(N-1):fs/2; z = fftshift(fft(x));
  • What is the code for MATLAB for sine wave?

    The below code is developed to generate sin wave having values for amplitude as '1' and liner frequency as '10'. f = 10; t = 0:0.1:10000; st = sin(2*3.141516*f*t);
  • How to use MATLAB for DFT?

    To plot the magnitude and phase in degrees, type the following commands: f = (0:length(y)-1)*100/length(y); % Frequency vector subplot(2,1,1) plot(f,m) title('Magnitude') ax = gca; ax. XTick = [15 40 60 85]; subplot(2,1,2) plot(f,p*180/pi) title('Phase') ax = gca; ax. XTick = [15 40 60 85];
  • The FFT

    1create_figure('sin wave', 1, 2);2plot(t, y)3xlabel('Time (sec)')4subplot(1, 2, 2)5yf = fft(y); % Fourier transform.6yf = abs(yf/L); % When X is complex, ABS(X) is the complex modulus (magnitude) of the elements of X.7f = Fs*(0:(L-1))/L; % define frequencies for each element of yf.8plot(f, yf)
Mathematics of the Discrete Fourier Transform (DFT)

Julius O. Smith III (jos@ccrma.stanford.edu)

Center for Computer Research in Music and Acoustics (CCRMA)

Department of Music, Stanford University

Stanford, California 94305

August 11, 2002

Page ii

DRAFTof "Mathematics of the Discrete Fourier Transform (DFT)," by J.O. Smith, CCRMA, Stanford, July 2002. The latest draft is available on-line at

Contents

1 Introduction to the DFT 1

1.1 DFTDefinition............................ 1

1.2 MathematicsoftheDFT ...................... 2

1.3 DFTMathOutline.......................... 5

2 Complex Numbers 7

2.1 FactoringaPolynomial........................ 7

2.2 TheQuadraticFormula ....................... 8

2.3 ComplexRoots............................ 10

2.4 FundamentalTheoremofAlgebra.................. 11

2.5 ComplexBasics............................ 12

2.5.1 TheComplexPlane ..................... 13

2.5.2 MoreNotationandTerminology .............. 15

2.5.3 ElementaryRelationships .................. 15

2.5.4 Euler"s Formula ........................ 16

2.5.5 De Moivre"s Theorem .................... 17

2.6 Numerical Tools in Matlab . .................... 17

2.7 Numerical Tools in Mathematica . . ................ 24

3 Proof of Euler"s Identity 27

3.1 Euler"s Theorem........................... 27

3.1.1 PositiveIntegerExponents ................. 27

3.1.2 PropertiesofExponents................... 28

3.1.3 The Exponent Zero . . .................... 28

3.1.4 NegativeExponents ..................... 28

3.1.5 RationalExponents ..................... 29

3.1.6 RealExponents........................ 30

iii

Page iv CONTENTS

3.1.7 A First Look at Taylor Series . . .............. 31

3.1.8 Imaginary Exponents . . .................. 32

3.1.9 Derivatives off(x)=a

x ................... 32

3.1.10 Back toe........................... 33

3.1.11SidebaronMathematica................... 34

3.1.12 Back toe

jθ .......................... 34

3.2 Informal Derivation of Taylor Series . . .............. 36

3.3 Taylor Series with Remainder . . .................. 38

3.4 FormalStatementofTaylor"sTheorem............... 39

3.5 Weierstrass Approximation Theorem . . .............. 40

3.6 Differentiability of Audio Signals .................. 40

4 Logarithms, Decibels, and Number Systems 43

4.1 Logarithms .............................. 43

4.1.1 ChangingtheBase...................... 45

4.1.2 Logarithms of Negative and Imaginary Numbers..... 45

4.2 Decibels . . .............................. 46

4.2.1 PropertiesofDBScales ................... 47

4.2.2 Specific DB Scales ...................... 48

4.2.3 DynamicRange........................ 54

4.3 LinearNumberSystemsforDigitalAudio............. 55

4.3.1 PulseCodeModulation(PCM)............... 55

4.3.2 Binary Integer Fixed-Point Numbers . . .......... 55

4.3.3 Fractional Binary Fixed-Point Numbers .......... 60

4.3.4 HowManyBitsareEnoughforDigitalAudio? ...... 60

4.3.5 WhenDoWeHavetoSwapBytes?............. 62

4.4 LogarithmicNumberSystemsforAudio.............. 63

4.4.1 Floating-PointNumbers................... 63

4.4.2 Logarithmic Fixed-Point Numbers............. 65

4.4.3 Mu-LawCompanding .................... 66

4.5 Appendix A: Round-Off Error Variance .............. 67

4.6 Appendix B: Electrical Engineering 101 .............. 68

5 Sinusoids and Exponentials 71

5.1 Sinusoids ............................... 71

5.1.1 ExampleSinusoids...................... 72

5.1.2 WhySinusoidsareImportant................ 73

DRAFTof "Mathematics of the Discrete Fourier Transform (DFT)," by J.O. Smith, CCRMA, Stanford, July 2002. The latest draft is available on-line at

CONTENTS Page v

5.1.3 In-Phase and Quadrature Sinusoidal Components . . . . . 74

5.1.4 Sinusoids at the Same Frequency . . ............ 75

5.1.5 Constructive and Destructive Interference . ........ 76

5.2 Exponentials ............................. 79

5.2.1 WhyExponentialsareImportant.............. 79

5.2.2 AudioDecayTime(T60) .................. 80

5.3 ComplexSinusoids.......................... 81

5.3.1 Circular Motion....................... 81

5.3.2 Projection of Circular Motion ................ 82

5.3.3 Positive and Negative Frequencies . ............ 83

5.3.4 The Analytic Signal and Hilbert Transform Filters . . . . 83

5.3.5 Generalized Complex Sinusoids............... 87

5.3.6 SampledSinusoids ...................... 88

5.3.7 Powers ofz.......................... 89

5.3.8 Phasor & Carrier Components of Complex Sinusoids . . . 89

5.3.9 Why Generalized Complex Sinusoids are Important . . . 91

5.3.10 Comparing Analog and Digital Complex Planes . . . . . . 93

5.4 Mathematica for Selected Plots................... 96

5.5 Acknowledgement........................... 97

6 Geometric Signal Theory 99

6.1 TheDFT ............................... 99

6.2 SignalsasVectors........................... 100

6.3 VectorAddition............................ 101

6.4 Vector Subtraction . . ........................ 102

6.5 Signal Metrics . ............................ 102

6.6 TheInnerProduct.......................... 107

6.6.1 LinearityoftheInnerProduct ............... 108

6.6.2 NormInducedbytheInnerProduct............ 109

6.6.3 Cauchy-SchwarzInequality ................. 110

6.6.4 TriangleInequality...................... 111

6.6.5 Triangle Difference Inequality ................ 111

6.6.6 VectorCosine......................... 111

6.6.7 Orthogonality . ........................ 112

6.6.8 ThePythagoreanTheoreminN-Space........... 112

6.6.9 Projection........................... 113

6.7 SignalReconstructionfromProjections .............. 114

DRAFTof "Mathematics of the Discrete Fourier Transform (DFT)," by J.O. Smith, CCRMA, Stanford, July 2002. The latest draft is available on-line at

Page vi CONTENTS

6.7.1 AnExampleofChangingCoordinatesin2D ....... 115

6.7.2 GeneralConditions...................... 118

6.7.3 Gram-Schmidt Orthogonalization .............. 122

6.8 Appendix:MatlabExamples .................... 123

7 Derivation of the Discrete Fourier Transform (DFT) 129

7.1 The DFT Derived .......................... 129

7.1.1 Geometric Series . ...................... 129

7.1.2 Orthogonality of Sinusoids .................. 130

7.1.3 Orthogonality of the DFT Sinusoids . . .......... 133

7.1.4 NormoftheDFTSinusoids................. 133

7.1.5 AnOrthonormalSinusoidalSet............... 133

7.1.6 The Discrete Fourier Transform (DFT) .......... 134

7.1.7 Frequencies in the "Cracks"................. 135

7.1.8 Normalized DFT . ...................... 138

7.2 TheLength2DFT.......................... 139

7.3 MatrixFormulationoftheDFT................... 140

7.4 MatlabExamples........................... 142

7.4.1 Figure7.2........................... 142

7.4.2 Figure7.3........................... 143

7.4.3 DFTMatrixinMatlab ................... 144

8 Fourier Theorems for the DFT 147

8.1 TheDFTanditsInverse....................... 147

8.1.1 NotationandTerminology.................. 148

8.1.2 Modulo Indexing, Periodic Extension . . .......... 148

8.2 SignalOperators ........................... 150

8.2.1 FlipOperator......................... 150

8.2.2 ShiftOperator ........................ 150

8.2.3 Convolution.......................... 153

8.2.4 Correlation .......................... 156

8.2.5 StretchOperator....................... 157

8.2.6 Zero Padding......................... 157

8.2.7 RepeatOperator....................... 158

8.2.8 Downsampling Operator . .................. 160

8.2.9 AliasOperator ........................ 162

8.3 EvenandOddFunctions....................... 165

DRAFTof "Mathematics of the Discrete Fourier Transform (DFT)," by J.O. Smith, CCRMA, Stanford, July 2002. The latest draft is available on-line at

CONTENTS Page vii

8.4 The Fourier Theorems ........................ 167

8.4.1 Linearity ........................... 167

8.4.2 ConjugationandReversal.................. 167

8.4.3 Symmetry........................... 169

8.4.4 ShiftTheorem ........................ 171

8.4.5 ConvolutionTheorem .................... 173

8.4.6 DualoftheConvolutionTheorem ............. 175

8.4.7 Correlation Theorem . .................... 175

8.4.8 PowerTheorem........................ 176

8.4.9 Rayleigh Energy Theorem (Parseval"s Theorem) . . . . . 176

8.4.10StretchTheorem(RepeatTheorem) ............ 177

8.4.11 Downsampling Theorem (Aliasing Theorem)....... 177

8.4.12 Zero Padding Theorem .................... 179

8.4.13BandlimitedInterpolationinTime............. 180

8.5 Conclusions.............................. 182

8.6 Acknowledgement........................... 182

8.7 Appendix A: Linear Time-Invariant Filters and Convolution . . . 182

8.7.1 LTIFiltersandtheConvolutionTheorem......... 183

8.8 AppendixB:StatisticalSignalProcessing ............. 184

8.8.1 Cross-Correlation....................... 185

8.8.2 Applications of Cross-Correlation . . ............ 186

8.8.3 Autocorrelation ........................ 187

8.8.4 Coherence........................... 190

8.9 AppendixC:TheSimilarityTheorem ............... 191

9 Example Applications of the DFT 193

9.1 Spectrum Analysis of a Sinusoid: Windowing, Zero-Padding, and

theFFT................................ 193

9.1.1 Example1:FFTofaSimpleSinusoid ........... 193

9.1.2 Example2:FFTofaNot-So-SimpleSinusoid....... 196

9.1.3 Example 3: FFT of a Zero-Padded Sinusoid ........ 200

9.1.4 Example4:BlackmanWindow............... 202

9.1.5 Example5:UseoftheBlackmanWindow......... 204

9.1.6 Example 6: Hanning-Windowed Complex Sinusoid . . . . 206

DRAFTof "Mathematics of the Discrete Fourier Transform (DFT)," by J.O. Smith, CCRMA, Stanford, July 2002. The latest draft is available on-line at

Page viii CONTENTS

A Matrices 213

A.0.1 Matrix Multiplication . . .................. 214 A.0.2 Solving Linear Equations Using Matrices......... 217

B Sampling Theory 219

B.1 Introduction.............................. 219 B.1.1 ReconstructionfromSamples-PictorialVersion ..... 220 B.1.2 ReconstructionfromSamples-TheMath......... 221 B.2 AliasingofSampledSignals..................... 222 B.3 Shannon"sSamplingTheorem.................... 225 B.4 AnotherPathtoSamplingTheory ................. 228 B.4.1 What frequencies are representable by a geometric sequence?228 B.4.2 Recovering a Continuous Signal from its Samples..... 230 DRAFTof "Mathematics of the Discrete Fourier Transform (DFT)," by J.O. Smith, CCRMA, Stanford, July 2002. The latest draft is available on-line at

List of Figures

2.1 An example parabola defined byp(x)=x

2 +4........... 10

2.2 Plotting a complex number as a point in the complex plane. . . . 14

4.1 Windowed sinusoid (top) and its FFT magnitude (bottom). . . . 52

5.1 Anexamplesinusoid.......................... 73

5.2 In-phaseandquadraturesinusoidalcomponents. ......... 75

5.3 A comb filter with a sinusoidal input................ 78

5.4 Comb filter amplitude response when delayτ=1sec. ...... 78

5.5 The decaying exponentialAe

-t/τ ................... 79

5.6 Growinganddecayingexponentials. ................ 80

5.7 Acomplexsinusoidanditsprojections. .............. 82

5.8 Creation of the analytic signalz(t)=e

jω 0 t from the real sinusoid x(t) = cos(ω 0 t) and the derived phase-quadrature sinusoidy(t)= sin(ω 0 t), viewed in the frequency domain. a) Spectrum ofx.b) Spectrum ofy. c) Spectrum ofjy. d) Spectrum ofz=x+jy.. 86

5.9 Exponentially decaying complex sinusoid and its projections. . . 89

5.10 Generalized complex sinusoids represented by points in thesplane. 94

ix

Page x LIST OF FIGURES

5.11 Generalized complex sinusoids represented by points in thezplane. 95

6.1 A length 2 signalx=(2,3) plotted as a vector in 2D space. . . . 101

6.2 Geometricinterpretationofalength2vectorsum. ........ 101

6.3 Vector sum with translation of one vector to the tip of the other. 102

6.4 Geometric interpretation a difference vector. . . .......... 102

6.5 Geometricinterpretationofasignalnormin2D. ......... 105

6.6 Lengthofvectorsinsum. ...................... 105

6.7 Length of a difference vector. . . .................. 105

6.8 Example of two orthogonal vectors forN=2............ 112

6.9 Projection ofy

ontoxin2Dspace.................. 114

7.1 TheNroots of unity forN=8. .................. 131

7.2 Complex sinusoids used by the DFT forN=8........... 132

7.3 Frequency response magnitude of a single DFT output sample. . 137

7.4 Graphicalinterpretationofthelength2DFT............ 139

8.1 Illustration ofxandFlip(x)forN= 5 and two different domain

interpretations: a)n?[0,N-1]. b)n?[-(N-1)/2,(N-1)/2]. ................. 151

8.2 Successive one-sample shifts of a sampled periodic sawtooth wave-

form having first period [0,1,2,3,4]. ................ 152

8.3 Illustration of convolution ofy=[1,1,1,1,0,0,0,0] and its "matched

filter" h=[1,0,0,0,0,1,1,1] (N=8)................... 154 DRAFTof "Mathematics of the Discrete Fourier Transform (DFT)," by J.O. Smith, CCRMA, Stanford, July 2002. The latest draft is available on-line at

LIST OF FIGURES Page xi

8.4 Illustration ofStretch

3 (x). .................... 157

8.5 Illustration of frequency-domain zero padding:

a) Original spectrumX=[3,2,1,1,2] plotted over the domain k?[0,N-1] whereN= 5 (i.e., as the spectral array would normally exist in a computer array). b)ZeroPad 11 (X). c) The same signalXplotted over the domaink?[-(N-

1)/2,(N-1)/2] which is more natural for interpreting negative

frequencies. d)ZeroPad 11 (X).......................... 159

8.6 Illustration ofRepeat

2 (x). ..................... 160

8.7 Illustration ofRepeat

3 (X). a) Conventional plot ofX. b) Plot ofXover the unit circle in thezplane. c)Repeat 3 (X). .......................... 161

8.8 Illustration ofSelect

2 (x). The white-filled circles indicate the retained samples while the black-filled circles indicate the dis- carded samples. ............................ 162

8.9 Example of aliasing due to undersampling in time. ........ 163

8.10 Illustration of aliasing in the frequency domain.

a)Repeat 3 (X) from Fig. 8.7c. b) First half of the original unit circle (0 toπ) wrapped around the new, smaller unit circle (which is magnified to the original size). c) Second half (πto 2π), also wrapped around the new unit circle. d) Overlay of components to be summed. e) Sum of components (the aliased spectrum). f) Both sum and overlay. . .................... 164

8.11Thefilterinterpretationofconvolution. .............. 182

8.12FIRsystemidentificationexampleinMatlab............ 188

DRAFTof "Mathematics of the Discrete Fourier Transform (DFT)," by J.O. Smith, CCRMA, Stanford, July 2002. The latest draft is available on-line at

Page xii LIST OF FIGURES

9.1 Sampled sinusoid atf=f

s /4. a) Time waveform. b) Magnitude spectrum. c) DB magnitude spectrum. . .............. 195

9.2 Sinusoid at Frequencyf=0.25 + 0.5/N. a) Time waveform. b)

Magnitude spectrum. c) DB magnitude spectrum. . . ...... 198

9.3 Time waveform repeated to show discontinuity introduced by pe-

riodicextension(seemidpoint).................... 199

9.4 Zero-Padded Sinusoid at Frequencyf=0.25 + 0.5/N.a)Time

waveform. b) Magnitude spectrum. c) DB magnitude spectrum. 201

9.5 The Blackman Window. a) The window itself in the time do-

main. b) DB Magnitude spectrum of the Blackman window. c) Blackman-window DB magnitude spectrum plotted over frequen- cies [-0.5,0.5). ............................ 203

9.6 Effect of the Blackman window on the sinusoidal data segment. . 205

9.7 A length 31 Hanning Window ("Raised Cosine") and the win-

dowed sinusoid created using it. Zero-padding is also shown. The sampled sinusoid is plotted with '*" using no connecting lines. You must now imagine the continuous sinusoid threading through the asterisks. . .............................. 207

9.8 Spectral Magnitude, linear scale. .................. 209

9.9 Spectral Magnitude, dB scale. . . .................. 210

9.10Spectralphase............................. 212

B.1 How sinc functions sum up to create a continuous waveform from discrete-time samples. . . ...................... 220 B.2 The sinc function. .......................... 221 DRAFTof "Mathematics of the Discrete Fourier Transform (DFT)," by J.O. Smith, CCRMA, Stanford, July 2002. The latest draft is available on-line at

Preface

This book is an outgrowth of my course entitled "Introduction to Digital Audio Signal Processing and the Discrete Fourier Transform (DFT) 1 which I have given at the Center for Computer Research in Music and Acoustics (CCRMA) everyquotesdbs_dbs12.pdfusesText_18
[PDF] matlab code for rsa algorithm pdf

[PDF] matlab colors

[PDF] matlab contour plot xyz data

[PDF] matlab coursera assignment solutions

[PDF] matlab coursera course

[PDF] matlab coursera machine learning

[PDF] matlab coursera solutions

[PDF] matlab examples

[PDF] matlab function example code

[PDF] matlab function example simulink

[PDF] matlab function format

[PDF] matlab function in script

[PDF] matlab functions pdf

[PDF] matlab graphics

[PDF] matlab high quality figures