Mathcad - Fourye2web.mst.edu/~sparlin/phys107/lecture/Fourye2.pdf · coefficients of the Fourier...

2
Fx () c 0 φ x () 0 c n φ x () n = Fx () c 0 φ 0 c 1 φ 1 c 1 - φ 1 - ....... = The result of the Fourier Series analysis is a series representation of the function, F(x): c 0 2a b a = c 0 b - b x 1 2a Fx () d = For n equal to zero. c n b a 2a sin n π b a n π b a = For n not equal to zero c n 1 j - a 2 1 n π e jn π b a - e jn π b a - = c n b - b x e jn π a x - d = c n a - a x e jn π a x - Fx () d = But since, F(x) = 1 for -b<x<b, and zero otherwise. c n a - a x φ x ()Fx () d = It is allowed to integrate from 0 to λ, or from - λ/2 to λ/2, or -a to +a. λ 2a = The function is periodic with repetition distance 2a. φ x () n 1 2a e jn 2 π 2a x = Plane waves are selected as the basis set. Consider a train of pulses of period 2a, width 2b, and amplitude A = 1. Find the coefficients of the Fourier series and show that such a series represents the function. EXAMPLE: PERIODIC PULSES Fourier Series fourye2.mcd

Transcript of Mathcad - Fourye2web.mst.edu/~sparlin/phys107/lecture/Fourye2.pdf · coefficients of the Fourier...

Page 1: Mathcad - Fourye2web.mst.edu/~sparlin/phys107/lecture/Fourye2.pdf · coefficients of the Fourier series and show that such a series represents the function. EXAMPLE: PERIODIC PULSES

F x( ) c0 φ x( )0⋅

cn φ x( )n⋅∑+=

F x( ) c0 φ0⋅ c1 φ1⋅+ c 1− φ 1−⋅+ .......+=The result of the Fourier Series analysis is a series representation of the function, F(x):

c0 2 a⋅b

a⋅=

c0

b−

b

x1

2 a⋅F x( )⋅

⌠⌡

d=For n equal to zero.

cnb

a2 a⋅⋅

sin n π⋅b

a⋅

n π⋅b

a⋅

⋅=For n not equal to zero

cn1

j−

a

2⋅

1

n π⋅⋅ e

j n⋅ π⋅ba

−e

j n⋅ π⋅ba

⋅−

⋅=

cnb−

b

xej n⋅

πa

⋅ x⋅

−⌠⌡

d=

cna−

a

xej n⋅

πa

⋅ x⋅

−F x( )⋅

⌠⌡

d=But since, F(x) = 1 for -b<x<b, and zero otherwise.

cna−

a

xφ x( )

F x( )⋅⌠⌡

d=It is allowed to integrate from 0 to λ, or from -λ/2 to λ/2, or -a to +a.

λ 2 a⋅=The function is periodic with repetition distance 2a.

φ x( )n1

2 a⋅e

j n⋅2 π⋅2 a⋅

⋅ x⋅⋅=

Plane waves are selected as the basis set.

Consider a train of pulses of period 2a, width 2b, and amplitude A = 1. Find the coefficients of the Fourier series and show that such a series represents the function.

EXAMPLE: PERIODIC PULSESFourier Seriesfourye2.mcd

Page 2: Mathcad - Fourye2web.mst.edu/~sparlin/phys107/lecture/Fourye2.pdf · coefficients of the Fourier series and show that such a series represents the function. EXAMPLE: PERIODIC PULSES

Try different duty cycles, f, from .1 to .9. Also explore the quality of the representation when N is raised from 5 to 10.

This method of computation is relatively slow, as you may discover. You might want to explore the fftfilt.mcd document to see the power of the fast fourier transform.

cn

0

0

n

0

1

F x( )

x

Number of termsN 10≡f 0.5≡Duty cycle

You may change these values to explore this problem Try 1,2,3,5,15, 55, 100,200. Try f = 0.2 with N = 35

Plot F(x)

F x( ) c0 φ x 0,( )⋅

n

cn φ x n,( )

φ x n,( )+( )⋅∑+:=

Define the function, F(x)

cn

0

0

n

The coefficients, c[n, are plotted. Notice that they have both plus and minus values, and are sometimes zero for certain b/a ratios

c0b

a2 a⋅⋅:=cn

b

a2 a⋅⋅

sin n π⋅b

a⋅

n π⋅b

a⋅

⋅:=Define the coeffient c(n)

φ x n,( )1

2 a⋅e

j n⋅2 π⋅2 a⋅

⋅ x⋅⋅:=Define the functions φ(x,n)

n 1 N..:=Define the range of n (Number of terms in series)

b f a⋅:=Define the pulse width

x 0 .02, 4..:=a 1:=Define the range of x

The convergence of the Fourier Series representation of F(x) is explored.