Math 344 May 24, 2012 Complex Fourier Series Part I: Introduction The Fourier series representation for a function f of period P , ∞ f (t) = a0 X + ak cos(kωt) + bk sin(kωt) , ω = 2π/P , 2 (1) k=1 can be expressed more simply using complex exponentials. Moreover, because of the unique properties of the exponential function, Fourier series are often easier to manipulate in complex form. We will see one interesting example in Part II of this handout. More will be discussed in Week 10. The transition from the real form to the complex form of a Fourier series is made using the following identities, called Euler Identities, ei θ = cos(θ) + i sin(θ) and e−i θ = cos(θ) − i sin(θ) . Adding these identities, and then dividing by 2, or subtracting them, and then dividing by 2i, will show that cos(θ) = eiθ + e−iθ 2 and sin(θ) = eiθ − e−iθ . 2i (2) These formulas for the sine and cosine should be compared to the definitions of the hyperbolic cosine and sine, cosh and sinh: eθ + e−θ eθ − e−θ cosh(θ) = and sinh(θ) = . 2 2 The complex Fourier series is obtained from (1) by writing cos(kωt) and sin(kωt) in their complex exponential form and rearranging as follows: ∞ f (t) = = a0 X eikωt + e−ikωt eikωt − e−ikωt ak + + bk 2 2 2i a0 + 2 = c0 + k=1 ∞ X 1 2 (ak − ibk )eikωt + 21 (ak + ibk )e−ikωt k=1 ∞ X ck eikωt + c−k e−ikωt . k=1 The last line is obtained by making the definitions c0 = 12 a0 , ck = 12 (ak − ibk ) , c−k = 21 (ak + ibk ) . (3) Observe that c−k is the complex conjugate of ck : c−k = ck . The complex sum that was just obtained can also be written in one of the following three equivalent forms. Alternate Forms for a Complex Fourier Series f (t) = c0 + f (t) = c0 + ∞ X 2 <(ck eikωt ) k=1 ∞ X ck eikωt (4a) (4b) k=−∞ k6=0 f (t) = ∞ X ck eikωt (4c) k=−∞ The first form, (4a), is a consequence of the fact that c−k e−ikωt is the complex conjugate of ck eikωt . This implies that ck eikωt + c−k e−ikωt = 2 <(ck eikωt ) 1 where <(ck eikωt ) denotes the real part of the expression ck eikωt . Some comments: 1. Formula (4a) makes the transition from the complex series to its real form. Its use is recommended when ploting partial sum approximations in complex form using a computer algebra system like Maple. 2. An explicit complex Fourier series is usually written using formula (4b). This is because the constant term, c0 , is almost never equal the formula obtained by substituting k = 0 into the formula for ck . On the other hand, it is always the case that c−k can be obtained from the formula for ck by replacing k with −k. 3. Comment 2 does not preclude the possibility of writing the complex series in the form given in (4c) and adding separate formulas for c0 and ck . This is worth emphasizing because (4c) is clearly the nicest of these three alternatives. What makes it even nicer is the fact that there is just one integral formula for the computation of all of the complex coefficients, ck . This will be shown below. 4. A word of caution: If partial sums for (4b) or (4c) are used to approximate the function f , then the sum must n X be in the symmetric form Sn (x, t) = ck eikωt because this will yield the nth Fourier approximation. k=−n An integral formula for ck The k th complex coefficient ck can always be obtained from the real coefficients using the formula ck = 12 (ak − ibk ) . This would require two integrations. However, ck can also be obtained directly from the function f with just one integration. This is because Z 1 P ck = f (t)e−ikωt dt . (5) P 0 To see why, observe that 1 1 ck = (ak − ibk ) = 2 2 2 P Z 0 P 2 f (t) cos(kωt) dt − i · P Z ! P f (t) sin(kωt) dt 0 Z 1 2 P · f (t)(cos(kωt) − i sin(kωt)) dt 2 P 0 Z 1 P = f (t)e−ikωt dt . P 0 = When the calculation of ck is made using (5), the integral can be evaluated over any periodic interval. Moreover, once ck has been found, both real Fourier series coefficients can then be obtained by solving the defining equation ck = 12 (ak − ibk ) for ak and bk as follows. ak = 2 <(ck ) and bk = −2 =(ck ) . (6) Here, <(ck ) and =(ck ) denote the real part and the imaginary part of ck . The following example illustrates these observations. Example 1. Obtain the complex Fourier series representation for the function f of period P = 2 defined as follows for 0 < t < 2. t , 0<t<1 f (t) = 0 , 1<t<2 Sketch the approximation S3 (t) and analyze the error. Use the complex coefficient formula to obtain the real Fourier series coefficients for f . Solution. Let’s begin with a picture of the waveform. 2 1.0 0.5 K 3 K K 2 0 1 1 2 3 4 t The function f has period 2. P∞ Since P = 2, the fundamental frequency is ω = 2π/P = π, therefore f (t) = k=−∞ ck eikπt . By inspection of the graph, c0 = (0 + 1/2)/2 = 1/4 and using integration-by-parts with u = t and dv = e−ikπt dt, 1 2 ck = 2 Z f (t)e−ikπt dt = 0 1 2 1 Z te−ikπt dt 0 te−ikπt 1 + −ikπ ikπ 1 = 2 1 = 2 e−ikπ e−ikπ − 1 + −ikπ −i2 k 2 π 2 1 2 (−1)k (−1)k − 1 i+ kπ k2 π2 = Z e −ikπt t=1 dt t=0 The transition to the final formula was aided by the fact that e±ikπ = (−1)k when k is an integer. The following plot shows the function and its third Fourier approximation, S3 (t). 1.0 0.5 K 3 K K 2 1 0 1 2 3 4 t The function f and S3 (t). Error Analysis ∞ The family of complex exponential functions eikωt k=−∞ is orthogonal on [0, P ] with respect to the complex inner RP product hf, gi = 0 f (t)g(t) dt. Moreover, keikωt k2 = P .1 Because of this, the complex form of the nth mean square error has the following simple form. Compare formula (7) below to the MSE formula for a real Fourier series in the Classical Fourier Series handout. Z n X 1 P MSE = |ck |2 . (7) f (t)2 dt − P 0 k=−n The calculation of MSE for the nth approximation for this example proceeds as follows.2 1 2 Z 1 = 2 Z MSE = 2 f (t)2 dt − 0 n X |ck |2 k=−n 1 t2 dt − c20 + 2 0 n X ! |ck |2 k=1 n X 1 1 1 1 ((−1)k − 1)2 = − +2 + 6 16 4 k2 π2 k4 π4 k=1 n ((−1)k − 1)2 5 1X 1 = − + 48 2 k2 π2 k4 π4 k=1 1 This 2 n X is an integral calculation. n X |ck |2 = c20 + 2 |ck |2 because c0 is real and |ck | = |c−k |. k=−n k=1 3 ! √ When n = 3, MSE = 0.0144 yielding a relative RSE error of 2 · MSE/kf k = 0.294, or about 30%. This is rather large, reflecting the error at the jump discontinuity. However, in terms of the average power in one cycle, the relative MSE error associated with S3 (t) is less than 9%: . Z MSE 12 2 f (t)2 dt = 0.0866 = 8.66% . 0 The large difference in the two relative errors is also clearly evident from the amplitude and power spectra of f . The Amplitude and Power Spectra for the Complex Series When the complex Fourier series is used to represent a periodic function, then the amplitude spectrum, sketched below, is two-sided. It consists of the points (kω, |ck |) for k = 0, ±1, ±2, ±3, . . . . 0.2 0.1 Kp 8 Kp Kp 6 4 Kp 0 2 2 p 4 p 6 p 8 p The two-sided amplitude spectrum of the function f in Example 1. The power spectrum for f is also two-sided, consisting of the points (kω, |ck |2 ) for k = 0, ±1, ±2, ±3, . . . . 0.06 0.04 0.02 Kp 8 Kp Kp 6 4 Kp 2 0 2 p 4 p 6 p 8 p The two-sided power spectrum of the function f in Example 1. Calculation of the real coefficients. Repeating the formula for ck , but in standard form for a complex number, ck = 1 (−1)k − 1 1 (−1)k · + · i, 2 k2 π2 2 kπ shows that ak = 2 <(ck ) = (−1)k − 1 k2 π2 and bk = −2 =(ck ) = − (−1)k . kπ The following example is related to Example 5 in the Classical Fourier Seried handout. Example 2. Obtain the complex Fourier series representation for the function of period P = 2π defined as f (t) = sin(t) for 0 < t < π and 0 for π < t < 2π. See its graph below. Plot f and S3 (t), make an error analysis, including the amplitude and power spectra, and obtain the real Fourier series coefficients. 1.0 0.5 Kp 0 p 2 p t The function f is neither even nor odd. 4 3 p Solution. Since P = 2π, the fundamental frequency is ω = 2π/P = 1. Therefore, ∞ X f (t) = ck eikt . k=−∞ The k th coefficient, ck , will be calculated using the complex formula for sin(t). This simplifies the integration considerably. ck = 1 2π Z 2π Z π 1 1 it f (t)e−ikt dt = (e − e−it )e−ikt dt 2π 0 2i Z π 1 eit(1−k) − e−it(1+k) dt = 4πi 0 it(1−k) t=π 1 e e−it(1+k) = + 4πi (1 − k)i (1 + k)i t=0 iπ(1−k) −iπ(1+k) e −1 e 1 −1 = + 4πi2 1−k 1+k k 1 + (−1) 1 1 = + 4π 1−k 1+k 0 = (line 2) (line 4) (line 5) 1 + (−1)k 2π(1 − k 2 ) Some comments on this calculation: 1. The transition from line 4 to line 5 used the fact that, because k is an integer, eiπ(1−k) = e−iπ(1+k) = −(−1)k . 2. The final formula for ck shows that c0 = 1/π. 3. The value of c1 must be obtained using a separate calculation. Working from line 2, substitute k = 1 to obtain c1 = 1 4πi Z 0 π 1 − e−2it dt = 1 4πi t+ e−2it 2i π = π = −i . 4πi 4 0 Putting this all together, we get the following complex Fourier series representation. Note that c−1 = c1 = i/4. ∞ 1 i i 1 X 1 + (−1)k ikt − eit + e−it + e . π 4 4 2π 1 − k2 f (t) = k=−∞ k6=0,±1 The plot of f along with S1 , S2 , and S3 is displayed below. S3 is the same as S2 , and is hardly visible. 1.0 0.5 Kp 0 p 2 p t The function f and its approximations S1 (dotted), S2 (dashed), and S3 (same as S2 ). Error Analysis 5 3 p The calculation of MSE for the nth approximation proceeds as follows. Z 2π n X 1 f (t)2 dt − MSE = |ck |2 2π 0 k=−n ! Z π n X 1 2 2 2 sin (t) dt − c0 + 2 |ck | = 2π 0 1 = − 4 1 1 1 +2· +2· 2 π2 16 4π k=1 n X k=2 (1 + (−1)k )2 (1 − k 2 )2 ! n 1 1 X (1 + (−1)k )2 1 = − 2+ 2 8 π 2π (1 − k 2 )2 k=2 √ When n = 3, MSE = 0.00116 yielding a relative RSE error of 2π · MSE/kf k = 0.0682, or about 7%. This is small, reflecting the excellent quality of the approximation. See the amplitude spectrum for f , sketched below. 0.3 0.2 0.1 K K K K K K K K K K 10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10 The two-sided amplitude spectrum of the function f . In terms of the average power in one cycle, the relative MSE error associated with S3 (t) is less than 0.5%: . Z 2π 1 MSE 2π f (t)2 dt = 0.00465 = 0.465% . 0 The power spectrum for f , sketched below, shows that S2 (t) carries essentially all of the power in this waveform. 0.08 0.04 K K K K K K K K K K 10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10 The two-sided power spectrum of the function f . Calculation of the real coefficients. Since c1 = −i/4, it has no real part. Therefore, a1 = 0 and b1 = −2 =(c1 ) = 1/2. On the other hand, when k ≥ 2, ck is real so bk = 0, and ak = 2ck = (1 + (−1)k )/π(1 − k 2 ). Using this information, the real Fourier series for f is f (t) = ∞ 1 1 1 X 1 + (−1)k cos(kt) + sin(t) + π 2 π 1 − k2 k=2 ∞ 1 1 2 X cos(2kt) = + sin(t) + . π 2 π 1 − 4k 2 k=1 If this looks familiar, it should. In Example 5 of the Classical Fourier Series handout we derived the Fourier series for the similar waveform sketched below. 1.0 0.5 Kp 0 p 2 p t The function g(t) = sin(t), 0 < x < π, period P = π. 6 3 p There it was shown that g has the following Fourier series representation. g(t) = ∞ 2 4 X cos(2kt) + π π 1 − 4k 2 k=1 These two waveforms are particularly useful in engineering applications. 7
© Copyright 2026 Paperzz