Lecture 7 - the Discrete Fourier Transform

Total Page:16

File Type:pdf, Size:1020Kb

Lecture 7 - the Discrete Fourier Transform Lecture 7 - The Discrete Fourier Transform 7.1 The DFT The Discrete Fourier Transform (DFT) is the equivalent of the continuous Fourier Transform for signals known only at instants separated by sample times ¡ (i.e. a finite sequence of data). Let ¢¤£¦¥¨§ be the continuous signal which is the source of the data. Let samples be denoted ¢ © ¢¤© ¢¤© ¢¤© ¢ © . The Fourier Transform of the original signal, ¢¤£¦¥¨§ , would be (*) +/102,3 £"!$#%§'& ¢¤£,¥¨§.- ¥ ) + ¢¤©45 We could regard each sample ¢¤© as an impulse having area . Then, since the integrand exists only at the sample points: (98;: +=<>;? +/A02B3 £6!$#%§7& ¢¤£¦¥¨§¨- ¥ @ 8;: +/¨EGF +/10H?IF F +/10J¨?IF +/A0 +=<>;? & ¢¤©C D- ¢¤© D- ¢¤© D- ¢¤£ H§¨- : +=< L +/10J¨? ¢¤© D- ie. £"!$#%§K& JNMOE We could in principle evaluate this for any # , but with only data points to start with, only final outputs will be significant. You may remember that the continuous Fourier transform could be evaluated QP @ over a finite interval (usually the fundamental period ¡ ) rather than from to 82 P F if the waveform was periodic. Similarly, since there are only a finite number § of input data points, the DFT treats the data as if it were periodic (i.e. ¢¤£ to S H§ ¢¤£ R§ ¢¤£ H§ ¢¤£ is the same as to .) Hence the sequence shown below in Fig. 7.1(a) is considered to be one period of the periodic sequence in plot (b). (a) 1 0.8 0.6 0.4 0.2 0 0 1 2 3 4 5 6 7 8 9 10 11 (b) 1 0.8 0.6 0.4 0.2 0 0 5 10 15 20 25 30 Figure 7.1: (a) Sequence of &TU samples. (b) implicit periodicity in DFT. Since the operation treats the data as if it were periodic, we evaluate the < : DFT equation for the fundamental frequency (one cycle per sequence, ? Hz, VXW : ? rad/sec.) and its harmonics (not forgetting the d.c. component (or average) at #Y&Z ). \ \ \ H\ ^ £ U§ i.e. set #Y&Z [ ¡ ¡S] ¡]`_ ¡S] or, in general : +=< L S +/$bdc J egf © & ¢¤© D- £ &Z ih H§ _ _ JaMOE 83 ¢¤© © is the Discrete Fourier Transform of the sequence . _ We may write this equation in matrix form as: m j n k jk n mn mn jk k k n n n k k V : ©C ¢¤©C +=< k n n n k k p p prq Tp k n n n k k V V : © ¢¤© + kl n n n kl k p pts pru Tp n kl : © ¢¤© + & pvq p prw Tp q . u . o . o . o S . V : : : ¢¤© © +=< + + q p p p p V : &Zxy[z{£ !\}| § p &Zp &~ where p and etc. DFT – example Let the continuous signal be @ F F ¢¤£¦¥¨§K& ¤ $U£H\¥ § O\¥ dc 1Hz 2Hz 10 8 6 4 2 0 −2 −4 0 1 2 3 4 5 6 7 8 9 10 Figure 7.2: Example signal for DFT. q ¢ ¥&r ¥& Let us sample ¢¤£¦¥¨§ at 4 times per second (ie. = 4Hz) from to . The values of the discrete samples are given by: s W @ F F J V $5£ § $\{ ¥¤&r¡& ¢¤© &t by putting s 84 ¢¤© & ¢¤© &t ¢¤© &Z £ &ZR§ i.e. ¢ © &t , , , , L L q q +/c J J f f b ¢¤© d- & ¢¤© A£ !§ & Therefore © _ E JNMOE jk mn jk mn jk mn jk mn l l l l k n k n k n k n ©C ¢¤©C $ © ! ! ¢¤© !R & & o o o o © ¢¤© H © ! ! ¢¤© !R The magnitude of the DFT coefficients is shown below in Fig. 7.3. 20 15 10 |F[n]| 5 0 0 1 2 3 f (Hz) Figure 7.3: DFT of four point sequence. Inverse Discrete Fourier Transform The inverse transform of : +=< L J +/bdc egf © & ¢¤© d- _ JaMOE 85 is : +=< L J / bdc ef ¢ ©4 & © D-U _ MOE f < i.e. the inverse matrix is : times the complex conjugate of the original (symmet- ric) matrix. ¢ ©4 Note that the © coefficients are complex. We can assume that the values are real (this is the_ simplest case; there are situations (e.g. radar) in which two o inputs, at each , are treated as a complex pair, since they are the outputs from o and demodulators). © In the process of taking the inverse transform the terms © and (re- : _ _ V member that the spectrum is symmetrical about ) combine to produce fre- quency components, only one of which is considered to be valid (the one at the VXW : V lower of the two frequencies, ? Hz where ; the higher frequency : _*] _ component is at an “aliasing frequency” ( V )). _¡ ¢ © © From the inverse transform formula, the contribution to ¢¤© of and _ is: _ 8;: / / + >"J¥ J¤F bdc bdc f egf e ¢ © & © D- © D- £ f (7.2) _ _ : +=< L S 8: +/bdc + >¦J f e © & ¢¤© D- For all ¢¤© real _ JaMOE VXW 8: +/bdc + >¦J +/ J /$bdc¨§ J /$bdc J e f e egf - & - - &Z- But 1 for all S ª© © £ § i.e. & (i.e. the complex conjugate) _ _ 86 ¢ © Substituting into the Equation for f above gives, VXW © bdc bdc +/ J¤F JH¥ / J / egf egf £ §.- ¢ ©4 & - &T © d- £ f since _ _ ­¦® \ \ ¥ ¥ ¥ ¢ © & © ¨¯6° © £ £«¬£ ie. f _ _ _ _ \ F²$³¨´ ¥ ¢ © & §¨¡ £ © d§ © £ T± ± £ or f _ _ _ ¡ VXW V f © ± ± : : i.e. a sampled sinewave at ? Hz, of magnitude _ &µ For the special case of , © &S¶·¢ ©4 (i.e. sum of all samples) and the < _ E ©C ¢ ©4 ¢ © ¤& © & ¢¤© ¤& contribution of to is : average of d.c. compo- nent. Interpretation of example V < E ©C &r$ ©C & &r 1. implies a d.c. value of : (as expected) s ª© !R¸& © 2. © {& implies a fundamental component of peak amplitude V V ¹ ²³¨´ o ©¦ & ª&r © & ± ± : with phase given by ] s Y \ \ o o ¡ §¤&tK U£ § i.e. ¤ £ (as expected) ¡ S : V £ & 3. © &ºH – no other component here) and this implies a _ component _ V W / J / J bdc e¼» V © D- & ©4H d- & \{ ¢ © & (as expected) since ¨¯D°\{i&t for all 87 6 5 4 3 3/sqrt(2) |F[n]| 2 sqrt(2) 1 0 0 1 2 3 f (Hz) Figure 7.4: DFT of four point signal. Thus, the conventional way of displaying a spectrum is not as shown in Fig. 7.3 but as shown in Fig. 7.4 (obviously, the information content is the same): &½U R In typical applications, is much greater than ; for example, for , © U R ^ ^$ has U components, but are the complex conjugates of , V V <¦À <A<¦À EÀ _   V V V V V ¾¿ ¾¿ à ¾¿ <BE <BE leaving <BE as the d.c. component, to as complete a.c. com- V s s{Á Á sGÁ Á < À <  V V ¾¿ à ponents and <BE as the cosine-only component at the highest distinguishable s : V & § frequency £ . _ À À b f f ¾¿ ¾¿ : Most computer programmes evaluate : (or for the power spectral den- Á Á Á sity) which gives the correct “shape” Á for the spectrum, except for the values at : V &Z and . _ 7.2 Discrete Fourier Transform Errors To what degree does the DFT approximate the Fourier transform of the function underlying the data? Clearly the DFT is only an approximation since it provides only for a finite set of frequencies. But how correct are these discrete values themselves? There are two main types of DFT errors: aliasing and “leakage”: 88 7.2.1 Aliasing This is another manifestation of the phenomenon which we have now encountered several times. If the initial samples are not sufficiently closely spaced to represent high-frequency components present in the underlying function, then the DFT val- ues will be corrupted by aliasing. As before, the solution is either to increase the sampling rate (if possible) or to pre-filter the signal in order to minimise its high- frequency spectral content. 7.2.2 Leakage Recall that the continuous Fourier transform of a periodic waveform requires the P P integration to be performed over the interval - to F or over an integer number of cycles of the waveform. If we attempt to complete the DFT over a non-integer number of cycles of the input signal, then we might expect the transform to be corrupted in some way. This is indeed the case, as will now be shown. Consider the case of an input signal which is a sinusoid with a fractional num- : V & ber of cycles in the data samples. The DFT for this case (for &Ä to ) _ is shown below in 7.5. _ 8 6 4 |F[n]| 2 0 0 2 4 6 8 freq Figure 7.5: Leakage. We might have expected the DFT to give an output at just the quantised frequen- 89 cies either side of the true frequency. This certainly does happen but we also find non-zero outputs at all other frequencies. This smearing effect, which is known as leakage, arises because we are effectively calculating the Fourier series for the waveform in Fig. 7.6, which has major discontinuities, hence other frequency components. 1 0.5 0 −0.5 −1 0 5 10 15 20 25 30 35 40 45 50 Figure 7.6: Leakage. The repeating waveform has discontinuities. Most sequences of real data are much more complicated than the sinusoidal se- quences that we have so far considered and so it will not be possible to avoid in- troducing discontinuities when using a finite number of points from the sequence in order to calculate the DFT. The solution is to use one of the window functions which we encountered in the design of FIR filters (e.g. the Hamming or Hanning windows).
Recommended publications
  • The Fast Fourier Transform
    The Fast Fourier Transform Derek L. Smith SIAM Seminar on Algorithms - Fall 2014 University of California, Santa Barbara October 15, 2014 Table of Contents History of the FFT The Discrete Fourier Transform The Fast Fourier Transform MP3 Compression via the DFT The Fourier Transform in Mathematics Table of Contents History of the FFT The Discrete Fourier Transform The Fast Fourier Transform MP3 Compression via the DFT The Fourier Transform in Mathematics Navigating the Origins of the FFT The Royal Observatory, Greenwich, in London has a stainless steel strip on the ground marking the original location of the prime meridian. There's also a plaque stating that the GPS reference meridian is now 100m to the east. This photo is the culmination of hundreds of years of mathematical tricks which answer the question: How to construct a more accurate clock? Or map? Or star chart? Time, Location and the Stars The answer involves a naturally occurring reference system. Throughout history, humans have measured their location on earth, in order to more accurately describe the position of astronomical bodies, in order to build better time-keeping devices, to more successfully navigate the earth, to more accurately record the stars... and so on... and so on... Time, Location and the Stars Transoceanic exploration previously required a vessel stocked with maps, star charts and a highly accurate clock. Institutions such as the Royal Observatory primarily existed to improve a nations' navigation capabilities. The current state-of-the-art includes atomic clocks, GPS and computerized maps, as well as a whole constellation of government organizations.
    [Show full text]
  • FOURIER TRANSFORM Very Broadly Speaking, the Fourier Transform Is a Systematic Way to Decompose “Generic” Functions Into
    FOURIER TRANSFORM TERENCE TAO Very broadly speaking, the Fourier transform is a systematic way to decompose “generic” functions into a superposition of “symmetric” functions. These symmetric functions are usually quite explicit (such as a trigonometric function sin(nx) or cos(nx)), and are often associated with physical concepts such as frequency or energy. What “symmetric” means here will be left vague, but it will usually be associated with some sort of group G, which is usually (though not always) abelian. Indeed, the Fourier transform is a fundamental tool in the study of groups (and more precisely in the representation theory of groups, which roughly speaking describes how a group can define a notion of symmetry). The Fourier transform is also related to topics in linear algebra, such as the representation of a vector as linear combinations of an orthonormal basis, or as linear combinations of eigenvectors of a matrix (or a linear operator). To give a very simple prototype of the Fourier transform, consider a real-valued function f : R → R. Recall that such a function f(x) is even if f(−x) = f(x) for all x ∈ R, and is odd if f(−x) = −f(x) for all x ∈ R. A typical function f, such as f(x) = x3 + 3x2 + 3x + 1, will be neither even nor odd. However, one can always write f as the superposition f = fe + fo of an even function fe and an odd function fo by the formulae f(x) + f(−x) f(x) − f(−x) f (x) := ; f (x) := . e 2 o 2 3 2 2 3 For instance, if f(x) = x + 3x + 3x + 1, then fe(x) = 3x + 1 and fo(x) = x + 3x.
    [Show full text]
  • An Introduction to Fourier Analysis Fourier Series, Partial Differential Equations and Fourier Transforms
    An Introduction to Fourier Analysis Fourier Series, Partial Differential Equations and Fourier Transforms Notes prepared for MA3139 Arthur L. Schoenstadt Department of Applied Mathematics Naval Postgraduate School Code MA/Zh Monterey, California 93943 August 18, 2005 c 1992 - Professor Arthur L. Schoenstadt 1 Contents 1 Infinite Sequences, Infinite Series and Improper Integrals 1 1.1Introduction.................................... 1 1.2FunctionsandSequences............................. 2 1.3Limits....................................... 5 1.4TheOrderNotation................................ 8 1.5 Infinite Series . ................................ 11 1.6ConvergenceTests................................ 13 1.7ErrorEstimates.................................. 15 1.8SequencesofFunctions.............................. 18 2 Fourier Series 25 2.1Introduction.................................... 25 2.2DerivationoftheFourierSeriesCoefficients.................. 26 2.3OddandEvenFunctions............................. 35 2.4ConvergencePropertiesofFourierSeries.................... 40 2.5InterpretationoftheFourierCoefficients.................... 48 2.6TheComplexFormoftheFourierSeries.................... 53 2.7FourierSeriesandOrdinaryDifferentialEquations............... 56 2.8FourierSeriesandDigitalDataTransmission.................. 60 3 The One-Dimensional Wave Equation 70 3.1Introduction.................................... 70 3.2TheOne-DimensionalWaveEquation...................... 70 3.3 Boundary Conditions ............................... 76 3.4InitialConditions................................
    [Show full text]
  • Lecture 11 : Discrete Cosine Transform Moving Into the Frequency Domain
    Lecture 11 : Discrete Cosine Transform Moving into the Frequency Domain Frequency domains can be obtained through the transformation from one (time or spatial) domain to the other (frequency) via Fourier Transform (FT) (see Lecture 3) — MPEG Audio. Discrete Cosine Transform (DCT) (new ) — Heart of JPEG and MPEG Video, MPEG Audio. Note : We mention some image (and video) examples in this section with DCT (in particular) but also the FT is commonly applied to filter multimedia data. External Link: MIT OCW 8.03 Lecture 11 Fourier Analysis Video Recap: Fourier Transform The tool which converts a spatial (real space) description of audio/image data into one in terms of its frequency components is called the Fourier transform. The new version is usually referred to as the Fourier space description of the data. We then essentially process the data: E.g . for filtering basically this means attenuating or setting certain frequencies to zero We then need to convert data back to real audio/imagery to use in our applications. The corresponding inverse transformation which turns a Fourier space description back into a real space one is called the inverse Fourier transform. What do Frequencies Mean in an Image? Large values at high frequency components mean the data is changing rapidly on a short distance scale. E.g .: a page of small font text, brick wall, vegetation. Large low frequency components then the large scale features of the picture are more important. E.g . a single fairly simple object which occupies most of the image. The Road to Compression How do we achieve compression? Low pass filter — ignore high frequency noise components Only store lower frequency components High pass filter — spot gradual changes If changes are too low/slow — eye does not respond so ignore? Low Pass Image Compression Example MATLAB demo, dctdemo.m, (uses DCT) to Load an image Low pass filter in frequency (DCT) space Tune compression via a single slider value n to select coefficients Inverse DCT, subtract input and filtered image to see compression artefacts.
    [Show full text]
  • Parallel Fast Fourier Transform Transforms
    Parallel Fast Fourier Parallel Fast Fourier Transform Transforms Massimiliano Guarrasi – [email protected] MassimilianoSuper Guarrasi Computing Applications and Innovation Department [email protected] Fourier Transforms ∞ H ()f = h(t)e2πift dt ∫−∞ ∞ h(t) = H ( f )e−2πift df ∫−∞ Frequency Domain Time Domain Real Space Reciprocal Space 2 of 49 Discrete Fourier Transform (DFT) In many application contexts the Fourier transform is approximated with a Discrete Fourier Transform (DFT): N −1 N −1 ∞ π π π H ()f = h(t)e2 if nt dt ≈ h e2 if ntk ∆ = ∆ h e2 if ntk n ∫−∞ ∑ k ∑ k k =0 k=0 f = n / ∆ = ∆ n tk k / N = ∆ fn n / N −1 () = ∆ 2πikn / N H fn ∑ hk e k =0 The last expression is periodic, with period N. It define a ∆∆∆ between 2 sets of numbers , Hn & hk ( H(f n) = Hn ) 3 of 49 Discrete Fourier Transforms (DFT) N −1 N −1 = 2πikn / N = 1 −2πikn / N H n ∑ hk e hk ∑ H ne k =0 N n=0 frequencies from 0 to fc (maximum frequency) are mapped in the values with index from 0 to N/2-1, while negative ones are up to -fc mapped with index values of N / 2 to N Scale like N*N 4 of 49 Fast Fourier Transform (FFT) The DFT can be calculated very efficiently using the algorithm known as the FFT, which uses symmetry properties of the DFT s um. 5 of 49 Fast Fourier Transform (FFT) exp(2 πi/N) DFT of even terms DFT of odd terms 6 of 49 Fast Fourier Transform (FFT) Now Iterate: Fe = F ee + Wk/2 Feo Fo = F oe + Wk/2 Foo You obtain a series for each value of f n oeoeooeo..oe F = f n Scale like N*logN (binary tree) 7 of 49 How to compute a FFT on a distributed memory system 8 of 49 Introduction • On a 1D array: – Algorithm limits: • All the tasks must know the whole initial array • No advantages in using distributed memory systems – Solutions: • Using OpenMP it is possible to increase the performance on shared memory systems • On a Multi-Dimensional array: – It is possible to use distributed memory systems 9 of 49 Multi-dimensional FFT( an example ) 1) For each value of j and k z Apply FFT to h( 1..
    [Show full text]
  • Evaluating Fourier Transforms with MATLAB
    ECE 460 – Introduction to Communication Systems MATLAB Tutorial #2 Evaluating Fourier Transforms with MATLAB In class we study the analytic approach for determining the Fourier transform of a continuous time signal. In this tutorial numerical methods are used for finding the Fourier transform of continuous time signals with MATLAB are presented. Using MATLAB to Plot the Fourier Transform of a Time Function The aperiodic pulse shown below: x(t) 1 t -2 2 has a Fourier transform: X ( jf ) = 4sinc(4π f ) This can be found using the Table of Fourier Transforms. We can use MATLAB to plot this transform. MATLAB has a built-in sinc function. However, the definition of the MATLAB sinc function is slightly different than the one used in class and on the Fourier transform table. In MATLAB: sin(π x) sinc(x) = π x Thus, in MATLAB we write the transform, X, using sinc(4f), since the π factor is built in to the function. The following MATLAB commands will plot this Fourier Transform: >> f=-5:.01:5; >> X=4*sinc(4*f); >> plot(f,X) In this case, the Fourier transform is a purely real function. Thus, we can plot it as shown above. In general, Fourier transforms are complex functions and we need to plot the amplitude and phase spectrum separately. This can be done using the following commands: >> plot(f,abs(X)) >> plot(f,angle(X)) Note that the angle is either zero or π. This reflects the positive and negative values of the transform function. Performing the Fourier Integral Numerically For the pulse presented above, the Fourier transform can be found easily using the table.
    [Show full text]
  • Fourier Transforms & the Convolution Theorem
    Convolution, Correlation, & Fourier Transforms James R. Graham 11/25/2009 Introduction • A large class of signal processing techniques fall under the category of Fourier transform methods – These methods fall into two broad categories • Efficient method for accomplishing common data manipulations • Problems related to the Fourier transform or the power spectrum Time & Frequency Domains • A physical process can be described in two ways – In the time domain, by h as a function of time t, that is h(t), -∞ < t < ∞ – In the frequency domain, by H that gives its amplitude and phase as a function of frequency f, that is H(f), with -∞ < f < ∞ • In general h and H are complex numbers • It is useful to think of h(t) and H(f) as two different representations of the same function – One goes back and forth between these two representations by Fourier transforms Fourier Transforms ∞ H( f )= ∫ h(t)e−2πift dt −∞ ∞ h(t)= ∫ H ( f )e2πift df −∞ • If t is measured in seconds, then f is in cycles per second or Hz • Other units – E.g, if h=h(x) and x is in meters, then H is a function of spatial frequency measured in cycles per meter Fourier Transforms • The Fourier transform is a linear operator – The transform of the sum of two functions is the sum of the transforms h12 = h1 + h2 ∞ H ( f ) h e−2πift dt 12 = ∫ 12 −∞ ∞ ∞ ∞ h h e−2πift dt h e−2πift dt h e−2πift dt = ∫ ( 1 + 2 ) = ∫ 1 + ∫ 2 −∞ −∞ −∞ = H1 + H 2 Fourier Transforms • h(t) may have some special properties – Real, imaginary – Even: h(t) = h(-t) – Odd: h(t) = -h(-t) • In the frequency domain these
    [Show full text]
  • STATISTICAL FOURIER ANALYSIS: CLARIFICATIONS and INTERPRETATIONS by DSG Pollock
    STATISTICAL FOURIER ANALYSIS: CLARIFICATIONS AND INTERPRETATIONS by D.S.G. Pollock (University of Leicester) Email: stephen [email protected] This paper expounds some of the results of Fourier theory that are es- sential to the statistical analysis of time series. It employs the algebra of circulant matrices to expose the structure of the discrete Fourier transform and to elucidate the filtering operations that may be applied to finite data sequences. An ideal filter with a gain of unity throughout the pass band and a gain of zero throughout the stop band is commonly regarded as incapable of being realised in finite samples. It is shown here that, to the contrary, such a filter can be realised both in the time domain and in the frequency domain. The algebra of circulant matrices is also helpful in revealing the nature of statistical processes that are band limited in the frequency domain. In order to apply the conventional techniques of autoregressive moving-average modelling, the data generated by such processes must be subjected to anti- aliasing filtering and sub sampling. These techniques are also described. It is argued that band-limited processes are more prevalent in statis- tical and econometric time series than is commonly recognised. 1 D.S.G. POLLOCK: Statistical Fourier Analysis 1. Introduction Statistical Fourier analysis is an important part of modern time-series analysis, yet it frequently poses an impediment that prevents a full understanding of temporal stochastic processes and of the manipulations to which their data are amenable. This paper provides a survey of the theory that is not overburdened by inessential complications, and it addresses some enduring misapprehensions.
    [Show full text]
  • Fourier Transform, Convolution Theorem, and Linear Dynamical Systems April 28, 2016
    Mathematical Tools for Neuroscience (NEU 314) Princeton University, Spring 2016 Jonathan Pillow Lecture 23: Fourier Transform, Convolution Theorem, and Linear Dynamical Systems April 28, 2016. Discrete Fourier Transform (DFT) We will focus on the discrete Fourier transform, which applies to discretely sampled signals (i.e., vectors). Linear algebra provides a simple way to think about the Fourier transform: it is simply a change of basis, specifically a mapping from the time domain to a representation in terms of a weighted combination of sinusoids of different frequencies. The discrete Fourier transform is therefore equiv- alent to multiplying by an orthogonal (or \unitary", which is the same concept when the entries are complex-valued) matrix1. For a vector of length N, the matrix that performs the DFT (i.e., that maps it to a basis of sinusoids) is an N × N matrix. The k'th row of this matrix is given by exp(−2πikt), for k 2 [0; :::; N − 1] (where we assume indexing starts at 0 instead of 1), and t is a row vector t=0:N-1;. Recall that exp(iθ) = cos(θ) + i sin(θ), so this gives us a compact way to represent the signal with a linear superposition of sines and cosines. The first row of the DFT matrix is all ones (since exp(0) = 1), and so the first element of the DFT corresponds to the sum of the elements of the signal. It is often known as the \DC component". The next row is a complex sinusoid that completes one cycle over the length of the signal, and each subsequent row has a frequency that is an integer multiple of this \fundamental" frequency.
    [Show full text]
  • Chapter B12. Fast Fourier Transform Taking the FFT of Each Row of a Two-Dimensional Matrix: § 1236 Chapter B12
    http://www.nr.com or call 1-800-872-7423 (North America only), or send email to [email protected] (outside North Amer readable files (including this one) to any server computer, is strictly prohibited. To order Numerical Recipes books or CDROMs, v Permission is granted for internet users to make one paper copy their own personal use. Further reproduction, or any copyin Copyright (C) 1986-1996 by Cambridge University Press. Programs Copyright (C) 1986-1996 by Numerical Recipes Software. Sample page from NUMERICAL RECIPES IN FORTRAN 90: THE Art of PARALLEL Scientific Computing (ISBN 0-521-57439-0) Chapter B12. Fast Fourier Transform The algorithms underlying the parallel routines in this chapter are described in §22.4. As described there, the basic building block is a routine for simultaneously taking the FFT of each row of a two-dimensional matrix: SUBROUTINE fourrow_sp(data,isign) USE nrtype; USE nrutil, ONLY : assert,swap IMPLICIT NONE COMPLEX(SPC), DIMENSION(:,:), INTENT(INOUT) :: data INTEGER(I4B), INTENT(IN) :: isign Replaces each row (constant first index) of data(1:M,1:N) by its discrete Fourier trans- form (transform on second index), if isign is input as 1; or replaces each row of data by N times its inverse discrete Fourier transform, if isign is input as −1. N must be an integer power of 2. Parallelism is M-fold on the first index of data. INTEGER(I4B) :: n,i,istep,j,m,mmax,n2 REAL(DP) :: theta COMPLEX(SPC), DIMENSION(size(data,1)) :: temp COMPLEX(DPC) :: w,wp Double precision for the trigonometric recurrences.
    [Show full text]
  • A Hilbert Space Theory of Generalized Graph Signal Processing
    1 A Hilbert Space Theory of Generalized Graph Signal Processing Feng Ji and Wee Peng Tay, Senior Member, IEEE Abstract Graph signal processing (GSP) has become an important tool in many areas such as image pro- cessing, networking learning and analysis of social network data. In this paper, we propose a broader framework that not only encompasses traditional GSP as a special case, but also includes a hybrid framework of graph and classical signal processing over a continuous domain. Our framework relies extensively on concepts and tools from functional analysis to generalize traditional GSP to graph signals in a separable Hilbert space with infinite dimensions. We develop a concept analogous to Fourier transform for generalized GSP and the theory of filtering and sampling such signals. Index Terms Graph signal proceesing, Hilbert space, generalized graph signals, F-transform, filtering, sampling I. INTRODUCTION Since its emergence, the theory and applications of graph signal processing (GSP) have rapidly developed (see for example, [1]–[10]). Traditional GSP theory is essentially based on a change of orthonormal basis in a finite dimensional vector space. Suppose G = (V; E) is a weighted, arXiv:1904.11655v2 [eess.SP] 16 Sep 2019 undirected graph with V the vertex set of size n and E the set of edges. Recall that a graph signal f assigns a complex number to each vertex, and hence f can be regarded as an element of n C , where C is the set of complex numbers. The heart of the theory is a shift operator AG that is usually defined using a property of the graph.
    [Show full text]
  • 20. the Fourier Transform in Optics, II Parseval’S Theorem
    20. The Fourier Transform in optics, II Parseval’s Theorem The Shift theorem Convolutions and the Convolution Theorem Autocorrelations and the Autocorrelation Theorem The Shah Function in optics The Fourier Transform of a train of pulses The spectrum of a light wave The spectrum of a light wave is defined as: 2 SFEt {()} where F{E(t)} denotes E(), the Fourier transform of E(t). The Fourier transform of E(t) contains the same information as the original function E(t). The Fourier transform is just a different way of representing a signal (in the frequency domain rather than in the time domain). But the spectrum contains less information, because we take the magnitude of E(), therefore losing the phase information. Parseval’s Theorem Parseval’s Theorem* says that the 221 energy in a function is the same, whether f ()tdt F ( ) d 2 you integrate over time or frequency: Proof: f ()tdt2 f ()t f *()tdt 11 F( exp(j td ) F *( exp(j td ) dt 22 11 FF() *(') exp([j '])tdtd ' d 22 11 FF( ) * ( ') [2 ')] dd ' 22 112 FF() *() d F () d * also known as 22Rayleigh’s Identity. The Fourier Transform of a sum of two f(t) F() functions t g(t) G() Faft() bgt () aF ft() bFgt () t The FT of a sum is the F() + sum of the FT’s. f(t)+g(t) G() Also, constants factor out. t This property reflects the fact that the Fourier transform is a linear operation. Shift Theorem The Fourier transform of a shifted function, f ():ta Ffta ( ) exp( jaF ) ( ) Proof : This theorem is F ft a ft( a )exp( jtdt ) important in optics, because we often encounter functions Change variables : uta that are shifting (continuously) along fu( )exp( j [ u a ]) du the time axis – they are called waves! exp(ja ) fu ( )exp( judu ) exp(jaF ) ( ) QED An example of the Shift Theorem in optics Suppose that we’re measuring the spectrum of a light wave, E(t), but a small fraction of the irradiance of this light, say , takes a different path that also leads to the spectrometer.
    [Show full text]