Lecture Notes for Fourier Transform and its Applications

the fractional fourier transform and its application in quantum mechanics and the fourier transforms and its applications lecture notes pdf free download
HelenBoyle Profile Pic
Published Date:14-07-2017
Your Website URL(Optional)
Lecture Notes for EE 261 The Fourier Transform and its Applications Prof. Brad Osgood Electrical Engineering Department Stanford UniversityChapter 1 Fourier Series 1.1 Introduction and Choices to Make Methods based on the Fourier transform are used in virtually all areas of engineering and science and by virtually all engineers and scientists. For starters: • Circuit designers • Spectroscopists • Crystallographers • Anyone working in signal processing and communications • Anyone working in imaging I’m expecting that many fields and many interests will be represented in the class, and this brings up an important issue for all of us to be aware of. With the diversity of interests and backgrounds present not all examples and applications will be familiar and of relevance to all people. We’ll all have to cut each other some slack,and it’s a chance for all of us to branch out. Along the same lines, it’s alsoimportant for you to realize that this is one course on the Fourier transform among many possible courses. The richness of the subject, both mathematically and in the range of applications, means that we’ll be making choices almost constantly. Books on the subject do not look alike, nor do they look like these notes — even the notation used for basic objects and operations can vary from book to book. I’ll try to point out when a certain choice takes us along a certain path, and I’ll try to say something of what the alternate paths may be. 1 Theveryfirstchoiceiswhere tostart,andmychoiceisabrieftreatmentofFourierseries. Fourieranalysis wasoriginallyconcerned withrepresenting and analyzingperiodic phenomena, viaFourierseries,and later with extending those insights to nonperiodic phenomena, via the Fourier transform. In fact, one way of getting from Fourier series to the Fourier transform is to consider nonperiodic phenomena (and thus just about any general function) as a limiting case of periodic phenomena as the period tends to infinity. A discrete set of frequencies in the periodic case becomes a continuum of frequencies in the nonperiodic case, the spectrum is born, and with it comes the most important principle of the subject: Every signal has a spectrum and is determined by its spectrum. You can analyze the signal either in the time (or spatial) domain or in the frequency domain. 1 Bracewell, for example, starts right off with the Fourier transform and picks up a little on Fourier series later.2 Chapter 1 Fourier Series I think this qualifies as a Major Secret of the Universe. All of this was thoroughly grounded in physical applications. Most often the phenomena to be studied weremodeledby thefundamentaldifferentialequationsofphysics(heatequation,waveequation,Laplace’s equation), and the solutions were usually constrained by boundary conditions. At first the idea was to use Fourier series to find explicit solutions. This work raised hard and far reaching questions that led in different directions. It was gradually realized thatsettingupFourierseries(insinesandcosines)couldberecastinthemoregeneralframeworkoforthog- onality, linear operators, and eigenfunctions. That led to the general idea of working with eigenfunction expansions ofsolutionsofdifferentialequations,aubiquitousline ofattackin manyareasand applications. In the modern formulation of partial differential equations, the Fourier transform has become the basis for defining the objects of study, while still remaining a tool for solving specific equations. Much of this development depends on the remarkable relation between Fourier transforms and convolution, something which was also seen earlier in the Fourier series days. In an effort to apply the methods with increasing generality,mathematicianswere pushed (by engineers and physicists)to reconsider how general the notion of “function” can be, and what kinds of functions can be — and should be — admitted into the operating theater of calculus. Differentiationand integrationwere both generalized in the service of Fourier analysis. Other directions combine tools from Fourier analysis with symmetries of the objects being analyzed. This might make you think of crystals and crystallography, and you’d be right, while mathematicians think of number theory and Fourier analysison groups. Finally,I have to mention that in the purely mathematical realm the question of convergence of Fourier series, believe it or not, led G. Cantor near the turn of the 20thcentury toinvestigateand inventthetheoryofinfinitesets,andtodistinguishdifferentsizesofinfinite sets, all of which led to Cantor going insane. 1.2 Periodic Phenomena To begin the course with Fourier series is to begin with periodic functions, those functions which exhibit a regularly repeating pattern. It shouldn’t be necessary to try to sell periodicity as an important physical (andmathematical)phenomenon—you’veseenexamplesandapplicationsofperiodicbehaviorinprobably (almost)everyclassyou’vetaken. I wouldonlyremind youthatperiodicityoftenshowsup intwovarieties, sometimes related, sometimes not. Generally speaking we think about periodic phenomena according to whether they are periodic in time or periodic in space. 1.2.1 Time and space In the case oftime the phenomenon comes toyou. Forexample, you standat afixed point inthe ocean (or on an electrical circuit) and the waves (or the electrical current) wash over you with a regular, recurring pattern of crests and troughs. The height of the wave is a periodic function of time. Sound is another example: “sound” reaches yourear as a longitudinalpressure wave,a periodic compression and rarefaction oftheair. Inthe caseofspace, youcometothephenomenon. Youtakeapictureand youobserverepeating patterns. Temporal and spatial periodicity come together most naturally in wave motion. Take the case of one spatial dimension, and consider a single sinusoidal wave traveling along a string (for example). For such a wave the periodicity in time is measured by the frequency ν, with dimension 1/sec and units Hz (Hertz = cycles per second), and the periodicity in space is measured by the wavelength λ, with dimension length and units whatever is convenient for the particular setting. If we fix a point in space and let the time vary (take a video of the wave motion at that point) then successive crests of the wave come past that1.2 Periodic Phenomena 3 point ν times per second, and so do successive troughs. If we fix the time and examine how the wave is spread out in space (take a snapshot instead of a video) we see that the distance between successive crests is a constant λ, as is the distance between successive troughs. The frequency and wavelength are related through the equation v =λν, where v is the speed of propagation — this is nothing but the wave version of speed = distance/time. Thus the higher the frequency the shorter the wavelength, and the lower the frequency the longer the wavelength. If the speed is fixed, like the speed of electromagnetic waves in a vacuum, then the frequency determines the wavelengthand vice versa; ifyou can measure one youcan find the other. For sound we identify the physical property of frequency with the perceptual property of pitch, for light frequency is perceived as color. Simple sinusoids are the building blocks of the most complicated wave forms — that’s what Fourier analysis is about. 1.2.2 More on spatial periodicity Another way spatialperiodicity occurs is when there is a repeating pattern or some kind of symmetry in a spatialregionandphysicallyobservablequantitiesassociatedwiththatregionhavearepeatingpatternthat reflects this. For example, a crystal has a regular, repeating pattern of atomsin space; the arrangement of atomsiscalleda lattice. The electron densitydistributionisthen aperiodic function ofthe spatialvariable 3 (inR )thatdescribes thecrystal. Imentionthisexamplebecause, incontrasttotheusualone-dimensional examples you might think of, here the function, in this case the electron density distribution, has three independent periods corresponding to the three directions that describe the crystal lattice. Here’s another example — this time in two dimensions — that is very much a natural subject for Fourier analysis. Consider these stripes of dark and light: No doubt there’s some kind of spatiallyperiodic behavior going on in the respective images. Furthermore, even without stating a precise definition, it’s reasonable to say that one of the patterns is “lowfrequency” and that the others are “high frequency”, meaning roughly that there are fewer stripes per unit length in the one than in the others. In two dimensions there’s an extra subtlety that we see in these pictures: “spatial frequency”, however we ultimately define it, must be a vector quantity, not a number. We have to say that the stripes occur with a certain spacing in a certain direction. Such periodic stripes are the building blocks of general two-dimensional images. When there’s no color, an image is a two-dimensionalarray of varying shades of gray, and this can be realized as a synthesis — a4 Chapter 1 Fourier Series Fourier synthesis — of just such alternating stripes. There are interesting perceptual questions in constructing images this way, and color is more complicated still. Here’s a picture I got from Foundations of Vision by Brian Wandell, who is in the Psychology Department here at Stanford. The shades of blue and yellow are the same in the two pictures —the only a change is in the frequency. The closer spacing “mixes” the blue and yellow to give a greenish cast. Here’s a question that I know has been investigated but I don’t know the answer. Show someone blue and yellow stripes of a low frequency and increase the frequency till they just start to see green. You get a number for that. Next, start with blue and yellow stripes at a high frequency so a person sees a lot of green and then lower the frequency till they see only blue and yellow. You get a number for that. Are the two numbers the same? Does the orientation of the stripes make a difference? 1.3 Periodicity: Definitions, Examples, and Things to Come To be certain we all know what we’re talking about, a function f(t)is periodic of period T if there is a numberT 0 such that f(t+T)=f(t) for allt. If there is such a T then the smallest one for which the equation holds is called the fundamental 2 period of the function f. Every integer multiple of the fundamental period is also a period: 3 f(t+nT)=f(t),n=0,±1,±2,... I’m calling the variable t here because I have to call it something, but the definition is general and is not meant to imply periodic functions of time. 2 Sometimes when people say simply “period” they mean the smallest or fundamental period. (I usually do, for example.) Sometimes they don’t. Ask them what they mean. 3 It’s clear from the geometric picture of a repeating graph that this is true. To show it algebraically, if n ≥ 1 then we see inductively that f(t+nT)= f(t+(n−1)T +T)=f(t+(n−1)T)=f(t). Then to see algebraically why negative multiples of T are also periods we have, for n≥ 1, f(t−nT)=f(t−nT +nT)=f(t).1.3 Periodicity: Definitions, Examples, and Things to Come 5 The graph of f over any interval of length T is one cycle. Geometrically, the periodicity condition means that the shape of one cycle (any cycle) determines the graph everywhere; the shape is repeated over and over. A homework problem asks you to turn this idea into a formula. This is all old news to everyone, but, by way of example, there are a few more points I’d like to make. Consider the function 1 f(t)= cos2πt+ cos4πt, 2 whose graph is shown below. 1.5 1 0.5 0 −0.5 −1 0 0.5 1 1.5 2 2.5 3 3.5 4 t Theindividualtermsareperiodicwithperiods1and1/2respectively,butthesumisperiodicwithperiod1: 1 f(t+1)= cos2π(t+1)+ cos4π(t+1) 2 1 1 = cos(2πt+2π)+ cos(4πt+4π)= cos2πt+ cos4πt =f(t). 2 2 There is no smaller value of T for which f(t+T)=f(t). The overall pattern repeats every 1 second, but if this function represented some kind of wave would you say it had frequency 1 Hz? Somehow I don’t think so. It has one period but you’d probably say that it has, or contains, two frequencies, one cosine of frequency 1 Hz and one of frequency 2 Hz. The subject of adding up periodic functions is worth a general question: • Is the sum of two periodic functions periodic? I guess the answer is no if you’re a mathematician, yes if you’re an engineer, i.e., no if you believe in irrationalnumbersandleaveitatthat,andyesifyoucomputethingsandhenceworkwithapproximations. √ √ For example, cost and cos( 2t) are each periodic, with periods 2π and 2π/ 2 respectively, but the sum √ cost+cos( 2t) is not periodic. √ Here are plots off (t)=cost+cos1.4t and off (t)=cost+cos( 2t). 1 2 f(t)6 Chapter 1 Fourier Series 2 1 0 −1 −2 −30 −20 −10 0 10 20 30 2 1 0 −1 −2 −30 −20 −10 0 10 20 30 t (I’m aware of the irony in making a big show of computer plots depending on an irrational number when the computer has to takea rationalapproximationto draw the picture.) How artificialan example is this? Not artificial at all. We’ll see why, below. 1.3.1 The view from above After years (centuries) of work, there are, in the end, relatively few mathematical ideas that underlie the study of periodic phenomena. There are many details and subtle points, certainly, but these are of less concern to us than keeping a focus on the bigger picture and using that as a guide in applications. We’ll need the following. 1. The functions that model the simplest periodic behavior, i.e., sines and cosines. In practice, both in calculations and theory, we’ll use the complex exponential instead of the sine and cosine separately. 2. The “geometry” of square integrable functions on a finite interval, i.e., functions for which Z b 2 f(t) dt∞. a 3. Eigenfunctions of linear operators (especially differential operators). The first point has been familiar to you since you were a kid. We’ll give a few more examples of sines and cosines in action. The second point, at least as I’ve stated it, may not be so familiar — “geometry” of a space of functions? — but here’s what it means in practice: • Least squares approximation • Orthogonality of the complex exponentials (and of the trig functions) f (t) f (t) 2 11.3 Periodicity: Definitions, Examples, and Things to Come 7 I say “geometry” because what we’ll do and what we’ll say is analogous to Euclidean geometry as it is expressed (especially for computational purposes) via vectors and dot products. Analogous, not identical. Therearedifferencesbetweenaspaceoffunctionsandaspaceof(geometric)vectors,butit’salmostmorea 2 3 difference ofdegree than a difference of kind, and your intuitionfor vectors inR orR can takeyou quite far. Also, the idea of least squares approximation is closely related to the orthogonality of the complex exponentials. 4 We’llsayless about the thirdpoint, though itwillfigure inour discussion oflinear systems. Furthermore, it’sthe second and third points that are still in force when one wants to workwith expansions in functions other than sine and cosine. 1.3.2 The building blocks: a few more examples The classic example of temporal periodicity is the harmonic oscillator, whether it’s a mass on a spring (no friction) or current in an LC circuit (no resistance). The harmonic oscillator is treated in exhaustive detail in just about every physics class. This is so because it is the only problem that can be treated in exhaustive detail. The state of the system is described by a single sinusoid, say of the form Asin(2πνt+φ). The parameters in this expression are the amplitude A, the frequency ν and the phase φ. The period of this function is 1/ν, since   1 1 Asin(2πν t+ +φ)=Asin(2πνt+2πν +φ)=Asin(2πνt+2π+φ)=Asin(2πνt+φ). ν ν The classic example of spatial periodicity, the example that started the whole subject, is the distribution of heat in a circular ring. A ring is heated up, somehow, and the heat then distributes itself, somehow, through the material. In the long run we expect all points on the ring to be of the same temperature, but they won’t be in the short run. At each fixed time, how does the temperature vary around the ring? In this problem the periodicity comes from the coordinate description of the ring. Think of the ring as a circle. Then a point on the ring is determined by an angle θ and quantities which depend on position are functions of θ. Since θ and θ+2π are the same point on the circle, any continuous function describing a physical quantity on the circle, e.g., temperature, is a periodic function of θ with period 2π. The distribution of temperature is not given by a simple sinusoid. It was Fourier’s hot idea to consider a sum of sinusoids as a model for the temperature distribution: N X A sin(nθ+φ ). n n n=1 The dependence on time is in the coefficients A . We’ll study this problem more completely later, but n there are a few points to mention now. Regardless of the physical context, the individual terms in a trigonometric sum such as the one above are called harmonics, terminology that comes from the mathematical representation of musical pitch — more 4 It is the role of complex exponentials as eigenfunctions that explains why you would expect to take only integer multiples of the fundamental period in forming sums of periodic functions.8 Chapter 1 Fourier Series on this in a moment. The terms contribute to the sum in varying amplitudes and phases, and these can have any values. The frequencies of the terms, on the other hand, are integermultiples of the fundamental frequency 1/2π. Because the frequencies are integer multiples of the fundamental frequency, the sum is also periodic, and the period is 2π. The term A sin(nθ+φ ) has period 2π/n, but the whole sum can’t n n have a shorter cycle than the longest cycle that occurs, and that’s 2π. We talked about just this point 5 when we first discussed periodicity. 1.3.3 Musical pitch and tuning Musical pitch and the production of musical notes is a periodic phenomenon of the same general type as we’ve been considering. Notes can be produced by vibrating strings or other objects that can vibrate regularly (like lips, reeds, or the bars of a xylophone). The engineering problem is how to tune musical instruments. The subject of tuning has a fascinating history, from the “natural tuning” of the Greeks, based on ratiosof integers, tothe theory of the “equaltempered scale”,which is the system of tuning used 1/12 today. That system is based on 2 . There are 12 notes in the equal tempered scale, going from any given note to the same note an octave 1/12 up, and two adjacent notes have frequencies with ratio 2 . If an A of frequency 440 Hz (concert A) is described by A = cos(2π·440t), then 6 notes up from A in a well tempered scale is a D given by √ D= cos(2π·440 2t). n/12 (The notes in the scale are cos(2π·440·2 t) fromn=0ton = 12.) Playing the A and the D together 1/2 gives essentiallythe signal we had earlier, cost+cos2 t. I’ll withhold judgment whether or not it sounds any good. Of course, when you tune a piano you don’t tighten the strings irrationally. The art is to make the right approximations. To read more about this, see, for example http://www.precisionstrobe.com/ To read more about tuning in general try http://www.wikipedia.org/wiki/Musical tuning Here’s a quote from the first reference describing the need for well-tempered tuning: Two developments occurred in music technology which necessitated changes from the just toned temperament. With the development of the fretted instruments, a problem occurs when setting the frets for just tuning, that octaves played across two strings around the neck would produce impure octaves. Likewise, an organ set to a just tuning scale would reveal chords with unpleasant properties. A compromise to this situation was the development of the mean toned scale. In this system several of the intervals were adjusted to increase the number of usable keys. With the evolution of composition technique in the 18th century increasing the use ofharmonic modulationachange wasadvocated tothe equal tempered scale. Amongthese 5 There is another reason that only integer multiples of the fundamental frequency come in. It has to do with the harmonics being eigenfunctions of a differential operator, and the boundary conditions that go with the problem.1.4 It All Adds Up 9 advocates was J. S. Bach who published two entire works entitled The Well-tempered Clavier. Each of these works contain 24 fugues written in each of twelve major and twelve minor keys and demonstrated that using an equal tempered scale, music could be written in, and shifted to any key. 1.4 It All Adds Up From simple, single sinusoids we can build up much more complicated periodic functions by taking sums. To highlightthe essential ideas it’s convenient to standardize a little and consider functions with period 1. This simplifies some of the writing and it will be easy to modify the formulas if the period is not 1. The basic function of period 1 is sin2πt, and so the Fourier-type sum we considered briefly in the previous lecture looks like N X A sin(2πnt+φ ). n n n=1 This form of a general trigonometric sum has the advantage of displaying explicitly the amplitude and phase of each harmonic, but it turns out to be somewhat awkward to calculate with. It’s more common to write a general trigonometric sum as N X (a cos(2πnt)+b sin(2πnt)), n n n=1 and, if we include a constant term (n = 0), as N X a 0 + (a cos(2πnt)+b sin(2πnt)). n n 2 n=1 Thereasonforwritingtheconstanttermwiththefraction1/2isbecause,asyouwillcheckinthehomework, it simplifies still another expression for such a sum. In electricalengineering the constant term is often referred toas the DC component as in “direct current”. The other terms, being periodic, “alternate”, as in AC. Aside from the DC component, the harmonics have periods 1,1/2,1/3,...,1/N, respectively, or frequencies 1,2,3,...,N. Because the frequencies of the individual harmonics are integer multiples of the lowest frequency, the period of the sum is 1. Algebraic work on such trigonometricsums is made incomparably easier if we use complex exponentials to 6 represent the sine and cosine. I remind you that it −it it −it e +e e −e cost = , sint = . 2 2i Hence 2πint −2πint 2πint −2πint e +e e −e cos(2πnt)= , sin(2πnt)= . 2 2i Using this, the sum N X a 0 + (a cos(2πnt)+b sin(2πnt)) n n 2 n=1 6 See the appendix on complex numbers where there is a discussion of complex exponentials, how they can be used without fear to represent real signals, and an answer to the question of what is meant by a “negative frequency”.10 Chapter 1 Fourier Series can be written as N X 2πint c e . n n=−N Sortingouthowthea’s,b’s,andc’sare relatedwillbe leftasaproblem. In particular,you’llgetc =a /2, 0 0 7 which is the reason we wrote the constant term as a /2 in the earlier expression. 0 In this final form of the sum, the coefficients c are complex numbers, and they satisfy n c =c . −n n Notice that when n = 0 we have c =c , 0 0 which implies thatc is a real number; this jibes withc =a /2. For any value ofn the magnitudes of c 0 0 0 n and c are equal: −n c =c . n −n The (conjugate)symmetry property,c =c , of the coefficients is important. To be explicit: if the signal −n n is real then the coefficients have to satisfy it, since f(t)=f(t) translates to N N N N X X X X 2πint −2πint 2πint 2πint c e = c e = c e = c e , n n n n n=−N n=−N n=−N n=−N and if we equate like terms we get c = c . Conversely, suppose the relation is satisfied. For each n we −n n 2πint −2πint can groupc e withc e , and then n −n  2πint −2πint 2πint 2πint 2πint c e +c e =c e +¯ c e =2Re c e . n −n n n n Therefore the sum is real: ( ) N N N X X X  2πint 2πint 2πint c e = 2Re c e =2Re c e . n n n n=−N n=0 n=0 1.5 Lost at c Suppose we have a complicated looking periodic signal; you can think of one varying in time but, again and always, the reasoning to follow applies to any sort of one-dimensional periodic phenomenon. We can scale time to assume that the pattern repeats every 1 second. Call the signalf(t). Can we expressf(t)as a sum? N X 2πint f(t)= c e n n=−N In other words, the unknowns in this expression are the coefficients c , and the question is can we solve n for these coefficients? 7 When I said that part of your general math know-how should include whipping around sums, this expression in terms of complex exponentials was one of the examples I was thinking of.1.5 Lost at c 11 Here’s a direct approach. Let’s take the coefficient c for some fixed k. We can isolate it by multiplying k −2πikt both sides by e : N X −2πikt −2πikt 2πint e f(t)=e c e n n=−N −2πikt 2πikt =···+e c e +···=···+c +··· k k Thus N N X X −2πikt −2πikt 2πint −2πikt 2πi(n−k)t c =e f(t)− c e e =e f(t)− c e . k n n n=−N,n=6 k n=−N,n6=k We’ve pulled out the coefficient c , but the expression on the right involves all the other unknown coeffi- k cients. Another idea is needed, and that idea is integrating both sides from 0 to 1. (We take the interval from 0 to 1 as “base” period for the function. Any interval of length 1 would work — that’s periodicity.) Just as in calculus, we can evaluate the integral of a complex exponential by Z 1 i t=1 1 2πi(n−k)t 2πi(n−k)t e dt = e 2πi(n−k) t=0 0 1 1 2πi(n−k) 0 = (e −e )= (1−1)= 0. 2πi(n−k) 2πi(n−k) Note thatn6=k is needed here. Since the integral of the sum is the sum of the integrals, and the coefficients c come out of each integral, n all of the terms in the sum integrate to zero and we have a formula for the k-th coefficient: Z 1 −2πikt c = e f(t)dt. k 0 Let’s summarize and be careful to note what we’ve done here, and what we haven’t done. We’ve shown that if we can write a periodic function f(t) of period 1 as a sum N X 2πint f(t)= c e , n n=−N then the coefficients c must be given by n Z 1 −2πint c = e f(t)dt. n 0 We have not shown that every periodic function can be expressed this way. By the way, in none of the preceding calculations did we have to assume that f(t) is a real signal. If, however, we do assume that f(t) is real, then let’s see how the formula for the coefficients jibes with c =c . We have n −n   Z Z 1 1 −2πint −2πint c = e f(t)dt = e f(t)dt n 0 0 Z 1 2πint = e f(t)dt (because f(t) is real, as are t and dt) 0 =c (by definition of c ) −n n12 Chapter 1 Fourier Series The c are called the Fourier coefficients of f(t), because it was Fourier who introduced these ideas into n mathematics and science (but working with the sine and cosine form of the expression). The sum N X 2πint c e n n=−N is called a (finite) Fourier series. If you want to be mathematically hip and impress your friends at cocktail parties, use the notation Z 1 −2πint ˆ f(n)= e f(t)dt 0 for the Fourier coefficients. Always conscious of social status, I will use this notation. Note in particular that the 0-th Fourier coefficient is the average value of the function: Z 1 ˆ f(0)= f(t)dt. 0 ˆ Also note that because of periodicity off(t), any interval of length 1 willdo to calculatef(n). Let’s check this. To integrate over an interval of length 1 is to integrate froma toa+1, where a is any number. Let’s compute how this integral varies as a function of a. Z   a+1 d −2πint −2πin(a+1) −2πina e f(t)dt =e f(a+1)−e f(a) da a −2πina −2πin −2πina =e e f(a+1)−e f(a) −2πina −2πina −2πin =e f(a)−e f(a) (usinge = 1 andf(a+1)=f(a)) =0. In other words, the integral Z a+1 −2πint e f(t)dt a is independent of a. So in particular, Z Z a+1 1 −2πint −2πint ˆ e f(t)dt= e f(t)dt=f(n). a 0 A common instance of this is Z 1/2 −2πint ˆ f(n)= e f(t)dt. −1/2 There are times when such a change is useful. Finally note that for a given function some coefficients may well be zero. More completely: There may be only a finite number of nonzero coefficients; or maybe all but a finite number of coefficients are nonzero; or maybe none of the coefficients are zero; or there may be an infinite number of nonzero coefficients but also an infinite number of coefficients that are zero — I think that’s everything. What’s interesting, and importantfor some applications,is that under some general assumptionsone can say something about the size of the coefficients. We’ll come back to this.1.6 Period, Frequencies, and Spectrum 13 1.6 Period, Frequencies, and Spectrum We’ll look at some examples and applications in a moment. First I want to make a few more general observations. In the preceding discussion I have more often used the more geometric term period instead ofthemorephysicaltermfrequency. It’snaturaltotalkabout theperiodforaFourierseriesrepresentation of f(t), ∞ X 2πint ˆ f(t)= f(n)e . n=−∞ The period is 1. The function repeats according to f(t+1)= f(t) and so do all the individual terms, 8 though the terms for n 6= 1 have the strictly shorter period 1/n. As mentioned earlier, it doesn’t seem natural to talk about “the frequency” (should it be 1 Hz?). That misses the point. Rather, being able to writef(t) asa Fourierseriesmeans that itissynthesized frommany harmonics,manyfrequencies, positive and negative, perhaps an infinite number. The set of frequencies present in a given periodic signal is the spectrum of the signal. Note that it’s the frequencies, like±2,±7,±325, that make up the spectrum, not ˆ ˆ ˆ the values of the coefficients f(±2),f(±7),f(±325). ˆ ˆ ˆ ˆ Because of the symmetry relationf(−n)=f(n), the coefficients f(n) and f(−n)= 0 are either both zero ˆ or both nonzero. Are numbers n where f(n)= 0 considered to be part of the spectrum? I’d say yes, with ˆ the following gloss: if the coefficients are all zero from some point on, say f(n)=0for nN, then it’s common to say that the signal has no spectrum from that point, or that the spectrum of the signal is limited to the points between −N and N. One also says in this case that the bandwidth isN (or maybe 2N depending to whom you’re speaking) and that the signal is bandlimited. Let me alsopoint out a mistakethatpeople sometimesmake when thinkingtoo casuallyabout the Fourier coefficients. To represent the spectrum graphically people sometimes draw a bar graph where the heights of the bars are the coefficients. Something like: −4 −3 −2 −1 0 1 2 34 ˆ ˆ ˆ Why is this a mistake? Because, remember, the coefficients f(0),f(±1),f(±2),... are complex numbers ˆ — you can’t draw them as a height in a bar graph. (Except for f(0) which is real because it’s the average value of f(t).) What you’re supposed to draw to get a picture like the one above is a bar graph of 2 2 2 ˆ ˆ ˆ f(0) ,f(±1) ,f(±2) ,...,i.e.,thesquaresofthemagnitudesofthecoefficients. Thesquaremagnitudes 2 ±2πint ˆ of the coefficient f(n) can be identified as the energy of the (positive and negative) harmonics e . (More on this later.) These sortsof plotsare what you see produced by a “spectrum analyzer”. One could 8 By convention, here wesort of ignore the constant term c when talking about periods or frequencies. It’sobviously periodic 0 of period 1, or any other period for that matter.14 Chapter 1 Fourier Series ˆ ˆ ˆ also draw just the magnitudes f(0),f(±1),f(±2),..., but it’s probably more customary to consider the squares of the magnitudes. 2 ˆ The sequence of squared magnitudesf(n) is called the power spectrum or the energy spectrum (different names in different fields). A plot of the power spectrum gives you a sense of how the coefficients stack up, die off, whatever, and it’sa way of comparingtwosignals. It doesn’t give you any idea of the phases of the coefficients. I point all this out only because forgetting what quantities are complex and plotting a graph anyway is an easy mistake to make (I’ve seen it, and not only in student work but in an advanced text on quantum mechanics). The case when all the coefficients are real is when the signal is real and even. For then Z Z 1 1 −2πi(−n)t 2πint ˆ ˆ f(n)=f(−n)= e f(t)dt= e f(t)dt 0 0 Z −1 −2πins =− e f(−s)ds (substitutingt =−s and changing limits accordingly) 0 Z 0 −2πins = e f(s)ds (flipping the limits and using that f(t) is even) −1 ˆ =f(n) (because you can integrate over any period, in this case from−1 to 0) Uniting the two ends of the calculation we get ˆ ˆ f(n)=f(n), ˆ ˆ hence f(n) is real. Hidden in the middle of this calculation is the interesting fact that if f is even so isf, i.e., ˆ ˆ f(−t)=f(t) ⇒ f(−n)=f(n). It’sgoodtobeattunedtothesesortsofsymmetryresults;we’llseetheirlikeagainfortheFouriertransform. What happens iff(t) is odd, for example? 1.6.1 What if the period isn’t 1? Changing to a base period other than 1 does not present too stiff a challenge, and it brings up a very important phenomenon. If we’re working with functions f(t) with period T, then g(t)=f(Tt) has period 1. Suppose we have N X 2πint g(t)= c e , n n=−N or even, without yet addressing issues of convergence, an infinite series ∞ X 2πint g(t)= c e . n n=−∞ Writes =Tt, so that g(t)=f(s). Then ∞ ∞ X X 2πint 2πins/T f(s)=g(t)= c e = c e n n n=−∞ n=−∞1.6 Period, Frequencies, and Spectrum 15 2πins/T The harmonics are now e . What about the coefficients? If Z 1 −2πint gˆ(n)= e g(t)dt 0 then, making the same change of variables =Tt, the integral becomes Z T 1 −2πins/T e f(s)ds. T 0 To wrap up, calling the variable t again, the Fourier series for a function f(t) of period T is ∞ X 2πint/T c e n n=−∞ where the coefficients are given by Z T 1 −2πint/T c = e f(t)dt. n T 0 As in the case of period 1, we can integrate over any interval of length T to find c . For example, n Z T/2 1 −2πint/T c = e f(t)dt. n T −T/2 ˆ (I didn’t use the notation f(n) here because I’m reserving that for the case T = 1 to avoid any extra confusion — I’ll allow that this might be too fussy.) Remark As we’ll see later, there are reasons to consider the harmonics to be 1 2πint/T √ e T and the Fourier coefficients for nonzero n then to be Z T 1 −2πint/T √ c = e f(t)dt. n T 0 √ This makes no difference in the final formula for the series because we have two factors of 1/ T coming in, one from the differentlynormalized Fourier coefficient and one from the differentlynormalized complex exponential. Time domain/frequency domain reciprocity Here’s the phenomenon that this calculation illus- trates. As we’ve just seen, iff(t) has period T and has a Fourier series expansion then ∞ X 2πint/T f(t)= c e . n n=−∞ We observe from this an important reciprocal relationship between properties of the signal in the time domain (if we think of the variablet as representing time) and properties of the signal as displayed in the frequency domain, i.e., properties of the spectrum. In the time domain the signal repeats afterT seconds, while the points in the spectrum are 0, ±1/T, ±2/T, ..., which are spaced 1/T apart. (Of course for period T = 1 the spacing in the spectrum is also 1.) Want an aphorism for this?16 Chapter 1 Fourier Series The larger the period in time the smaller the spacing of the spectrum. The smaller the period in time, the larger the spacing of the spectrum. Thinking,loosely,oflongperiodsasslowoscillationsandshortperiodsasfastoscillations,convinceyourself that the aphorism makes intuitive sense. If you allow yourself to imagine letting T→∞ you can allow yourself to imagine the discrete set of frequencies becoming a continuum of frequencies. We’ll see many instances of this aphorism. We’ll also have other such aphorisms — they’re meant to help you organize your understanding and intuition for the subject and for the applications. 1.7 Two Examples and a Warning All this is fine, but does it really work? That is, given a periodic function can we expect to write it as a sum of exponentials in the way we have described? Let’s look at an example. Consider a square wave of period 1, such as illustrated below. f(t) 1 ··· ··· −2 −1 12 t 0 −1 Let’s calculate the Fourier coefficients. The function is ( 1 +1 0≤t 2 f(t)= 1 −1 ≤t 1 2 and then extended to be periodic of period 1. The zeroth coefficient is the average value of the function on 0≤t≤1. Obviously this is zero. For the other coefficients we have Z 1 −2πint ˆ f(n)= e f(t)dt 0 Z Z 1/2 1 −2πint −2πint = e dt− e dt 0 1/2 h i h i 1/2 1  1 1 1 −2πint −2πint −πin = − e − − e = 1−e 2πin 2πin πin 0 1/2 We should thus consider the infinite Fourier series X  1 −πin 2πint 1−e e πin n6=01.7 Two Examples and a Warning 17 We can write this in a simpler form by first noting that ( 0 n even −πin 1−e = 2 n odd so the series becomes X 2 2πint e . πin n odd Now combine the positive and negative terms and use 2πint −2πint e −e =2isin2πnt. Substituting this into the series and writingn=2k+1, our final answer is ∞ X 4 1 sin2π(2k+1)t. π 2k+1 k=0 (Note that the function f(t)is odd and this jibes with the Fourier series having only sine terms.) What kind of series is this? In what sense does it converge, if at all, and to what does it converge, i.e, can we represent f(t) as a Fourier series through ∞ X 4 1 f(t)= sin2π(2k+1)t? π 2k+1 k=0 The graphs below are sums of terms up to frequencies 9 and 39, respectively. 1.5 1 0.5 0 −0.5 −1 −1.5 0 0.5 1 1.5 218 Chapter 1 Fourier Series 1.5 1 0.5 0 −0.5 −1 −1.5 0 0.5 1 1.5 2 We see a strange phenomenon. We certainly see the general shape of the square wave, but there is trouble at the corners. Clearly, in retrospect, we shouldn’t expect to represent a function like the square wave by a finite sum of complex exponentials. Why? Because a finite sum of continuous functions is continuous and the square wave has jump discontinuities. Thus, for maybe the first time in your life, one of those theorems from calculus that seemed so pointless at the time makes an appearance: The sum of two (or a finite number) of continuous functions is continuous. Whatever else we may be able to conclude about a Fourier series representation for a square wave, it must contain arbitrarily high frequencies. We’ll say what else needs to be said next time. I picked the example of a square wave because it’s easy to carry out the integrations needed to find the Fourier coefficients. However, it’s not only a discontinuity that forces high frequencies. Take a triangle wave, say defined by ( 1 1 +t − ≤t≤ 0 2 2 f(t)= 1 1 −t 0≤t≤ + 2 2 and then extended to be periodic of period 1. This is continuous. There are no jumps, though there are corners. (Draw your own graph) A little more work than for the square wave shows that we want the infinite Fourier series ∞ X 2 1 + cos(2π(2k+1)t) 4 2 2 π (2k+1) k=0 I won’t reproduce the calculations in public; the calculation of the coefficients needs integration by parts. Here, too, there are only odd harmonics and there are infinitely many. This time the series involves only cosines, a reflection of the fact that the triangle wave is an even function. Note also that the triangle 2 wave the coefficients decrease like 1/n while for a square wave they decrease like 1/n. I alluded to this sort of thing, above (the size of the coefficients); it has exactly to do with the fact that the square wave is discontinuous while the triangle wave is continuous but its derivative is discontinuous. So here is yet another occurrence of one of those calculus theorems: The sines and cosines are differentiabletoall orders, so any finite sum of them is also differentiable. We therefore should not expect a finite Fourier series to represent the triangle wave, which has corners.1.7 Two Examples and a Warning 19 How good a job do the finite sums do in approximating the triangle wave? I’ll let you use your favorite software to plot some approximations. You will observe something different from what happened with the square wave. We’ll come back to this, too. 0.5 0.4 0.3 0.2 0.1 0 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 0.5 0.4 0.3 0.2 0.1 0 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 One thing common to these two examples might be stated as another aphorism: It takes high frequencies to make sharp corners. This particularaphorism is important,forexample, in questions of filtering,a topic we’llconsider in detail later: • Filtering means cutting off.

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.