Chapter 11.02 Continuous Fourier Seriesmathforcollege.com/nm/mws/gen/11fft/mws_gen_fft_spe...11.02.1...

10
11.02.1 Chapter 11.02 Continuous Fourier Series For a function with period T , a continuous Fourier series can be expressed as [1-5] = + + = 1 0 0 0 ) sin( ) cos( ) ( k k k t kw b t kw a a t f (1) The unknown Fourier coefficients , 0 a k a and k b can be computed as dt t f T a T = 0 0 ) ( 1 (2) Thus, 0 a can be interpreted as the “average” function value between the period interval ] , 0 [ T . = T k dt t kw t f T a 0 0 ) cos( ) ( 2 (3) k a (hence k a is an “even” function) = T k dt t kw t f T b 0 0 ) sin( ) ( 2 (4) k b (hence k b is an “odd” function) Derivation of formulas for , 0 a k a and k b Integrating both sides of Equation 1 with respect to time, one gets = = + + = T T T k T k k k dt t kw b dt t kw a dt a dt t f 0 0 0 1 0 1 0 0 0 ) sin( ) cos( ) ( (5) The second and third terms on the right hand side of the above equations are both zeros, due to the result stated in Equation (1) of Chapter 11.01. Thus, [ ] = T T t a dt t f 0 0 0 ) ( (6) T a 0 = Hence, dt t f T a T = 0 0 ) ( 1 (7)

Transcript of Chapter 11.02 Continuous Fourier Seriesmathforcollege.com/nm/mws/gen/11fft/mws_gen_fft_spe...11.02.1...

Page 1: Chapter 11.02 Continuous Fourier Seriesmathforcollege.com/nm/mws/gen/11fft/mws_gen_fft_spe...11.02.1 Chapter 11.02 Continuous Fourier Series For a function with period T, a continuous

11.02.1

Chapter 11.02 Continuous Fourier Series For a function with period T , a continuous Fourier series can be expressed as [1-5]

∑∞

=

++=1

000 )sin()cos()(k

kk tkwbtkwaatf (1)

The unknown Fourier coefficients ,0a ka and kb can be computed as

dttfT

aT

=

00 )(1 (2)

Thus, 0a can be interpreted as the “average” function value between the period interval ],0[ T .

=

T

k dttkwtfT

a0

0 )cos()(2 (3)

ka−≡ (hence ka is an “even” function)

=

T

k dttkwtfT

b0

0 )sin()(2 (4)

kb−−≡ (hence kb is an “odd” function) Derivation of formulas for ,0a ka and kb

Integrating both sides of Equation 1 with respect to time, one gets

∫ ∫ ∫∑ ∫∑∞

=

=

++=T T T

k

T

kkk dttkwbdttkwadtadttf

0 0 0 1 0 1000 )sin()cos()( (5)

The second and third terms on the right hand side of the above equations are both zeros, due to the result stated in Equation (1) of Chapter 11.01. Thus,

[ ]∫ =T

Ttadttf0

00)( (6)

Ta0= Hence,

dttfT

aT

=

00 )(1 (7)

Page 2: Chapter 11.02 Continuous Fourier Seriesmathforcollege.com/nm/mws/gen/11fft/mws_gen_fft_spe...11.02.1 Chapter 11.02 Continuous Fourier Series For a function with period T, a continuous

11.02.2 Chapter 11.02 Now, if both sides of Equation (1) are multiplied by )sin( 0tmw and then integrated with respect to time, one obtains

∫∑

∫ ∫ ∫∑∞

=

=

+

+=×

T

kk

T T T

kk

dttmwtkwb

dttmwtkwadttmwadttmwtf

0 100

0 0 0 100000

)sin()sin(

)sin()cos()sin()sin()( (8)

Due to Equations (1) and (3) of Chapter 11.01, the first and second terms on the right hand side (RHS) of Equation (8) are zero. Due to Equation (4) of Chapter 11.01, the third RHS term of Equation (8) is also zero, with the exception when mk = , which will become (by referring to Equation (2) of Chapter 11.01)

∫ ∫++=T T

k dttkwbdttkwtf0 0

02

0 )(sin00)sin()( (9)

2Tbk ×=

Thus,

=

T

k dttkwtfT

b0

0 )sin()(2

Similar derivation can be used to obtain ka , as shown in Equation (3)

A FORTRAN Program for finding Fourier Coefficients 0a , ka , and kb

Based upon the derived formulas for 0a , ka and kb (shown in Equations 2-4), a FORTRAN/MATLAB computer program has been developed. (The program is available at http://numericalmethods.eng.usf.edu/simulations/mtl/11fft/f_coeff_final.m) Example 1

Using the continuous Fourier series to approximate the following periodic function ( π2=T seconds) shown in Figure 1.

Page 3: Chapter 11.02 Continuous Fourier Seriesmathforcollege.com/nm/mws/gen/11fft/mws_gen_fft_spe...11.02.1 Chapter 11.02 Continuous Fourier Series For a function with period T, a continuous

Continuous Fourier Series 11.02.3

Figure 1 A Periodic Function (Between 0 and π2 ).

<≤≤<

=πππ

π2for

0for)(

ttt

tf

Specifically, find the Fourier coefficients 810 ,....,, aaa and 81,...,bb . Solution

The unknown Fourier coefficients kaa ,0 and kb can be computed based on Equations (2–4); as following:

=

π2

00 )(1 dttf

Ta

( )

+×= ∫∫π

π

π

ππ

2

00 2

1 dttdta

35619.20 =a

∫=

=

π2

00 )cos()(2 T

k dttkwtfT

a

×××+

×××

= ∫ ∫

π π

π

ππππ 0

2 2cos2cos22 dtt

Tkdtt

Tktak

( ) ( )

= ∫ ∫

π π

π

ππ 0

2

coscos1 dtktdtkttak

The “integration by part” formula can be utilized to compute the first integral on the right-hand-side of the above equation. For ,8,....,2,1=k the Fourier coefficients ka can be computed as

1162966366257003.01 −=a 010787210703528576.5 6

2 ≈×−= −a 32103180707410015.03 −=a

Page 4: Chapter 11.02 Continuous Fourier Seriesmathforcollege.com/nm/mws/gen/11fft/mws_gen_fft_spe...11.02.1 Chapter 11.02 Continuous Fourier Series For a function with period T, a continuous

11.02.4 Chapter 11.02

010696660703200925.5 64 ≈×−= −a

893325220254702255.05 −=a 010026040702653333.5 6

6 ≈×−= −a 8189771020012997664.07 −=a

010046950701886126.5 68 ≈×−= −a

Similarly,

=

π2

00 )sin()(2 dttkwtf

Tbk

( ) ( )

= ∫ ∫

π π

π

ππ 0

2

sinsin1 dtktdtkttbk

For ,8,....,2,1=k the Fourier coefficients kb can be computed as 9582079999986528.01 −=b 2852694999993232.02 −=b 5091943333314439.03 −=b 23845472499980412.04 −=b 48723641999971379.05 −=b 7595531666635603.06 −=b 46254621428532466.07 −=b 10192511249957798.08 −=b

Any periodic function ),(tf such as the one shown in Figure 1 can be represented by the Fourier series as

( ){ }∑∞

=

++=1

000 )sin(cos)(k

kk tkwbtkwaatf

where ,0a ka and kb have already been computed (for ,8,....,2,1=k ); and fw π20 =

Tπ2

=

ππ

22

=

1= Thus, for ,1=k one obtains

)sin()cos()( 1101 tbtaatf ++≈ For ,21→=k one obtains

)2sin()2cos()sin()cos()( 221102 tbtatbtaatf ++++≈ For ,41→=k one obtains

)3sin()3cos()2sin()2cos()sin()cos()( 33221104 tbtatbtatbtaatf ++++++≈ )4sin()4cos( 44 tbta ++

Page 5: Chapter 11.02 Continuous Fourier Seriesmathforcollege.com/nm/mws/gen/11fft/mws_gen_fft_spe...11.02.1 Chapter 11.02 Continuous Fourier Series For a function with period T, a continuous

Continuous Fourier Series 11.02.5

Plots for )(),( 21 tftf and )(4 tf are shown in Figure 2.

Figure 2 Fourier Approximated Functions (for Example 1).

It can be observed from Figure 2 that as more terms are included in the Fourier series, the approximated Fourier functions are more closely resemble the original periodic function as shown in Figure 1. Example 2

The periodic triangular wave function )(tf is defined as

<<−

<<−

−<<−

=

πππ

ππ

πππ

t

tt

t

tf

2for

2

22for

2for

2

)(

Find the Fourier coefficients 810 ,...,, aaa and 81,...,bb and approximate the periodic triangular wave function by the Fourier series.

Page 6: Chapter 11.02 Continuous Fourier Seriesmathforcollege.com/nm/mws/gen/11fft/mws_gen_fft_spe...11.02.1 Chapter 11.02 Continuous Fourier Series For a function with period T, a continuous

11.02.6 Chapter 11.02

Figure 3 Periodic triangular wave function for Example 2.

Solution

The unknown Fourier Coefficients 0a , ka and kb can be computed based on Equations (2-4) as follows

∫−

=

π

π

dttfT

a )(10

( ) ( )

−+−+

−×= ∫∫∫

π

π

π

π

π

π

πππ

2

2

2

2

0 2221 dtdttdta

78539753.00 −=a

∫−

=

π

π

dttkwtfT

ak )cos()(20

where

Tw π2

0 =

ππ

22

=

1= Hence,

∫−

=

π

π

dtkttfT

ak )cos()(2

Page 7: Chapter 11.02 Continuous Fourier Seriesmathforcollege.com/nm/mws/gen/11fft/mws_gen_fft_spe...11.02.1 Chapter 11.02 Continuous Fourier Series For a function with period T, a continuous

Continuous Fourier Series 11.02.7

or

( )

−+−+

= ∫∫∫

π

π

π

π

π

π

πππ

2

2

2

2

)cos(2

)cos()cos(22

2 dtktdtkttdtktak

Similarly,

∫∫−−

=

=

π

π

π

π

dtkttfT

dttkwtfT

bk )sin()(2)sin()(20

or,

( )

−+−+

= ∫∫∫

π

π

π

π

π

π

πππ

2

2

2

2

)sin(2

)sin()sin(22

2 dtktdtkttdtktbk

The “integration by part” formula can be utilized to compute the second integral on the right-hand-side of the above equations for ka and kb . For ,8,...2,1=k the Fourier coefficients ka and kb can be computed and summarized as following in Table 1

Table 1 Fourier coefficients ka and kb for various k values. k ka kb 1 0.999997 -0.63661936 2 0.00 -0.49999932 3 -0.3333355 0.07073466 4 0.00 0.2499980 5 0.1999968 -0.02546389 6 0.00 -0.16666356 7 -0.14285873 0.0126991327 8 0.00 0.12499578

The periodic function (shown in Example 1) can be approximated by Fourier series as

{ }∑∞

=

++=1

0 )sin()cos()(k

kk ktbktaatf

Thus, for 1=k , one obtains: )sin()cos()( 1101 tbtaatf ++=

For ,21→=k one obtains: )2sin()2cos()sin()cos()( 221102 tbtatbtaatf ++++=

Similarly, for ,41→=k one has: )3sin()3cos()2sin()2cos()sin()cos()( 33221104 tbtatbtatbtaatf ++++++=

)4sin()4cos( 44 tbta ++ Plots for functions )(and)(),( 421 tftftf are shown in Figure 4.

Page 8: Chapter 11.02 Continuous Fourier Seriesmathforcollege.com/nm/mws/gen/11fft/mws_gen_fft_spe...11.02.1 Chapter 11.02 Continuous Fourier Series For a function with period T, a continuous

11.02.8 Chapter 11.02

Figure 4 Fourier approximated functions for Example 2.

It can be observed from Figure 4 that as more terms are included in the Fourier series, the approximated Fourier functions closely resemble the original periodic function. Complex Form of the Fourier Series

Using Euler’s identity, ),sin()cos( xixeix += and ),sin()cos( xixe ix −=− the sine and cosine can be expressed in the exponential form as

,""2

)(sin functionoddieex

ixix

=−

=−

since )(sin)(sin xx −−= (10)

,""2

)(cos functioneveneexixix

=+

=−

since )(cos)(cos xx −= (11)

Thus, the Fourier series (expressed in Equation 1) can be converted into the following form

−+

++=

−∞

=

∑ ieebeeaatf

tikwtikw

kk

tikwtikw

k 22)(

0000

10 (12)

or

−+

++= −

=∑ i

ii

bae

ii

iba

eatf kktikw

k

kktikw *22

*22

)( 00

10

or, since ,12 −=i one obtains

+

+

+= −∞

=∑ 22

)( 00

10

kktikw

k

kktikw ibae

ibaeatf (13)

Define the following constants

00~ aC ≡ (14)

Page 9: Chapter 11.02 Continuous Fourier Seriesmathforcollege.com/nm/mws/gen/11fft/mws_gen_fft_spe...11.02.1 Chapter 11.02 Continuous Fourier Series For a function with period T, a continuous

Continuous Fourier Series 11.02.9

2

~kk

kiba

C−

≡ (15)

Hence:

2~ kk

kibaC −−

−≡ (16)

Using the even and odd properties shown in Equations (3) and (4) respectively, Equation (16) becomes

2~ kk

kiba

C+

≡− (17)

Substituting Equations (14), (15), (17) into Equation (13), one gets

∑∑∞

=

−−

=

++=11

000

~~~)(k

tikwk

k

tikwk eCeCCtf

∑∑−∞

−=

=

+=10

00~~

k

tikwk

k

tikwk eCeC

∑∑−

−∞=

=

+=1

0

00~~

k

tikwk

k

tikwk eCeC

∑∞

−∞=

=k

tikwk eC 0

~ (18)

The coefficient kC~ can be computed, by substituting Equations (3) and (4) into Equation (15) to obtain

= ∫∫

TT

k dttkwtfidttkwtfT

C0

00

0 )sin()()cos()(221~ (19)

[ ]

−×

= ∫

T

dttkwitkwtfT 0

00 )sin()cos()(1

Substituting Equations (10, 11) into the above equation, one gets

−×−

= ∫

−−T tikwtikwtikwtikw

k dtieeieetf

TC

0 22)(1~ 0000

×

= ∫ −

Ttikw dtetf

T 0

0)(1 (20)

Thus, Equations (18) and (20) are the equivalent complex version of Equations (1)-(4). References [1] E.Oran Brigham, The Fast Fourier Transform, Prentice-Hall, Inc. (1974). [2] S.C. Chapra, and R.P. Canale, Numerical Methods for Engineers, 4th Edition, Mc-Graw Hill (2002). [3] W.H . Press, B.P. Flannery, S.A. Tenkolsky, and W.T. Vetterling, Numerical Recipies, Cambridge University Press (1989), Chapter 12.

Page 10: Chapter 11.02 Continuous Fourier Seriesmathforcollege.com/nm/mws/gen/11fft/mws_gen_fft_spe...11.02.1 Chapter 11.02 Continuous Fourier Series For a function with period T, a continuous

11.02.10 Chapter 11.02 [4] M.T. Heath, Scientific Computing, Mc-Graw Hill (1997). [5] H. Joseph Weaver, Applications of Discrete and Continuous Fourier Analysis, John Wiley & Sons, Inc. (1983).

FAST FOURIER TRANSFORM Topic Continuous Fourier Series Summary Textbook notes on continuous Fourier series Major General Engineering Authors Duc Nguyen Date July 25, 2010 Web Site http://numericalmethods.eng.usf.edu