81
Periodic Functions and Fourier Series

07_Periodic Functions and Fourier Series

Embed Size (px)

Citation preview

Page 1: 07_Periodic Functions and Fourier Series

Periodic Functions and Fourier Series

Page 2: 07_Periodic Functions and Fourier Series

Periodic Functions

A function f is periodic

if it is defined for all real and if there is some positive number,

T such that fTf .

Page 3: 07_Periodic Functions and Fourier Series

0

T

f

Page 4: 07_Periodic Functions and Fourier Series

0

T

f

Page 5: 07_Periodic Functions and Fourier Series

0

T

f

Page 6: 07_Periodic Functions and Fourier Series

Fourier Series

f be a periodic function with period 2

The function can be represented by a trigonometric series as:

11

0 sincosn

nn

n nbnaaf

Page 7: 07_Periodic Functions and Fourier Series

11

0 sincosn

nn

n nbnaaf

What kind of trigonometric (series) functions are we talking about?

32

and32

sin,sin,sin

cos,cos,cos

Page 8: 07_Periodic Functions and Fourier Series

0

0

2

cos cos 2 cos 3

Page 9: 07_Periodic Functions and Fourier Series

0

0 2

sin sin 2 sin 3

Page 10: 07_Periodic Functions and Fourier Series

We want to determine the coefficients,

na and nb .

Let us first remember some useful integrations.

Page 11: 07_Periodic Functions and Fourier Series

dmndmn

dmn

cos2

1cos

2

1

coscos

0

dmn coscos mn

dmn coscos mn

Page 12: 07_Periodic Functions and Fourier Series

dmndmn

dmn

sin2

1sin

2

1

cossin

0

dmn cossin

for all values of m.

Page 13: 07_Periodic Functions and Fourier Series

dmndmn

dmn

cos2

1cos

2

1

sinsin

0

dmn sinsin mn

dmn sinsin mn

Page 14: 07_Periodic Functions and Fourier Series

Determine 0aIntegrate both sides of (1) from

to

dnbnaa

df

nn

nn

110 sincos

Page 15: 07_Periodic Functions and Fourier Series

dnb

dnada

df

nn

nn

1

10

sin

cos

000

dadf

Page 16: 07_Periodic Functions and Fourier Series

002 0

adf

dfa

2

10

0a is the average (dc) value of the

function, f .

Page 17: 07_Periodic Functions and Fourier Series

dnbnaa

df

nn

nn

2

011

0

2

0

sincos

It is alright as long as the integration is performed over one period.

You may integrate both sides of (1) from

0 to 2 instead.

Page 18: 07_Periodic Functions and Fourier Series

dnb

dnada

df

nn

nn

2

01

2

01

2

0 0

2

0

sin

cos

002

0 0

2

0

dadf

Page 19: 07_Periodic Functions and Fourier Series

002 0

2

0 adf

dfa

2

00 2

1

Page 20: 07_Periodic Functions and Fourier Series

Determine naMultiply (1) by mcosand then Integrate both sides from

to

dmnbnaa

dmf

nn

nn

cossincos

cos

110

Page 21: 07_Periodic Functions and Fourier Series

Let us do the integration on the right-hand-side one term at a time.

First term,

00 dma cos

Second term,

dmnan

n coscos1

Page 22: 07_Periodic Functions and Fourier Series

m

nn admna

coscos1

Second term,

Third term,

01

dmcosnsinb

nn

Page 23: 07_Periodic Functions and Fourier Series

Therefore,

madmf cos

,2,1cos1

mdmfam

Page 24: 07_Periodic Functions and Fourier Series

Determine nbMultiply (1) by msinand then Integrate both sides from

to

dmsinnsinbncosaa

dmsinf

nn

nn

110

Page 25: 07_Periodic Functions and Fourier Series

Let us do the integration on the right-hand-side one term at a time.

First term,

00 dmsina

Second term,

dmsinncosa

nn

1

Page 26: 07_Periodic Functions and Fourier Series

01

dmsinncosa

nn

Second term,

Third term,

m

nn bdmnb

sinsin1

Page 27: 07_Periodic Functions and Fourier Series

Therefore,

mbdmsinf

,,mdmsinfbm 211

Page 28: 07_Periodic Functions and Fourier Series

dfa

2

10

The coefficients are:

,2,1cos1

mdmfam

,2,1sin1

mdmfbm

Page 29: 07_Periodic Functions and Fourier Series

dfa

2

10

We can write n in place of m:

,,ndncosfan 211

,,ndnsinfbn 211

Page 30: 07_Periodic Functions and Fourier Series

The integrations can be performed from

0 to 2 instead.

dfa

2

00 2

1

,,ndncosfan 211 2

0

,,ndnsinfbn 211 2

0

Page 31: 07_Periodic Functions and Fourier Series

Example 1. Find the Fourier series of the following periodic function.

0

f

2 3 4 5

A

-A

2

0

whenA

whenAf

ff 2

Page 32: 07_Periodic Functions and Fourier Series

02

12

12

1

2

0

2

0

2

00

dAdA

dfdf

dfa

Page 33: 07_Periodic Functions and Fourier Series

011

1

1

2

0

2

0

2

0

n

nsinA

n

nsinA

dncosAdncosA

dncosfan

Page 34: 07_Periodic Functions and Fourier Series

ncosncoscosncosn

A

n

ncosA

n

ncosA

dnsinAdnsinA

dnsinfbn

20

11

1

1

2

0

2

0

2

0

Page 35: 07_Periodic Functions and Fourier Series

oddisnwhen4

1111

20

n

An

A

ncosncoscosncosn

Abn

Page 36: 07_Periodic Functions and Fourier Series

evenisnwhen0

1111

20

n

A

ncosncoscosncosn

Abn

Page 37: 07_Periodic Functions and Fourier Series

Therefore, the corresponding Fourier series is

7sin

7

15sin

5

13sin

3

1sin

4A

In writing the Fourier series we may not be able to consider infinite number of terms for practical reasons. The question therefore, is – how many terms to consider?

Page 38: 07_Periodic Functions and Fourier Series

When we consider 4 terms as shown in the previous slide, the function looks like the following.

1.5

1

0.5

0

0.5

1

1.5

f ( )

Page 39: 07_Periodic Functions and Fourier Series

When we consider 6 terms, the function looks like the following.

1.5

1

0.5

0

0.5

1

1.5

f ( )

Page 40: 07_Periodic Functions and Fourier Series

When we consider 8 terms, the function looks like the following.

1.5

1

0.5

0

0.5

1

1.5

f ( )

Page 41: 07_Periodic Functions and Fourier Series

When we consider 12 terms, the function looks like the following.

1.5

1

0.5

0

0.5

1

1.5

f ( )

Page 42: 07_Periodic Functions and Fourier Series

The red curve was drawn with 12 terms and the blue curve was drawn with 4 terms.

1.5

1

0.5

0

0.5

1

1.5

Page 43: 07_Periodic Functions and Fourier Series

The red curve was drawn with 12 terms and the blue curve was drawn with 4 terms.

0 2 4 6 8 101.5

1

0.5

0

0.5

1

1.5

Page 44: 07_Periodic Functions and Fourier Series

The red curve was drawn with 20 terms and the blue curve was drawn with 4 terms.

0 2 4 6 8 101.5

1

0.5

0

0.5

1

1.5

Page 45: 07_Periodic Functions and Fourier Series

Even and Odd Functions

(We are not talking about even or odd numbers.)

Page 46: 07_Periodic Functions and Fourier Series

Even Functions

f(

The value of the function would be the same when we walk equal distances along the X-axis in opposite directions.

ff Mathematically speaking -

Page 47: 07_Periodic Functions and Fourier Series

Odd Functions The value of the function would change its sign but with the same magnitude when we walk equal distances along the X-axis in opposite directions.

ff Mathematically speaking -

f(

Page 48: 07_Periodic Functions and Fourier Series

Even functions can solely be represented by cosine waves because, cosine waves are even functions. A sum of even functions is another even function.

10 0 10

5

0

5

Page 49: 07_Periodic Functions and Fourier Series

Odd functions can solely be represented by sine waves because, sine waves are odd functions. A sum of odd functions is another odd function.

10 0 10

5

0

5

Page 50: 07_Periodic Functions and Fourier Series

The Fourier series of an even function fis expressed in terms of a cosine series.

1

0 cosn

n naaf

The Fourier series of an odd function fis expressed in terms of a sine series.

1

sinn

n nbf

Page 51: 07_Periodic Functions and Fourier Series

Example 2. Find the Fourier series of the following periodic function.

ff 2

x

f(x)

3 5 7 90

xwhenxxf 2

Page 52: 07_Periodic Functions and Fourier Series

332

1

2

1

2

1

23

20

x

x

x

dxxdxxfa

Page 53: 07_Periodic Functions and Fourier Series

nxdxx

dxnxxfan

cos1

cos1

2

Use integration by parts. Details are shown in your class note.

Page 54: 07_Periodic Functions and Fourier Series

nn

an cos4

2

odd is n when4

2nan

even is n when4

2nan

Page 55: 07_Periodic Functions and Fourier Series

This is an even function.

Therefore, 0nbThe corresponding Fourier series is

222

2

4

4cos

3

3cos

2

2coscos4

3

xxxx

Page 56: 07_Periodic Functions and Fourier Series

Functions Having Arbitrary Period

Assume that a function tf has period, T . We can relate angle ( ) with time ( t ) in the following manner.

t

is the angular velocity in radians per second.

Page 57: 07_Periodic Functions and Fourier Series

f 2f is the frequency of the periodic function,

tf

tf 2 Tf

1where

tT

2Therefore,

Page 58: 07_Periodic Functions and Fourier Series

tT

2 dt

Td

2

Now change the limits of integration.

2

Tt t

T

2

2

Tt t

T

2

Page 59: 07_Periodic Functions and Fourier Series

dfa

2

10

dttfT

a

T

T

2

2

0

1

Page 60: 07_Periodic Functions and Fourier Series

,,ndncosfan 211

,2,12

cos2 2

2

ndttT

ntf

Ta

T

Tn

Page 61: 07_Periodic Functions and Fourier Series

,,ndnsinfbn 211

,2,12

sin2 2

2

ndttT

ntf

Tb

T

Tn

Page 62: 07_Periodic Functions and Fourier Series

Example 4. Find the Fourier series of the following periodic function.

0 t

T/2

f(t)

T/4

3T/4

T-T/2 2T

4

3

42

44T

tT

whenT

t

Tt

Twhenttf

Page 63: 07_Periodic Functions and Fourier Series

tfTtf

This is an odd function. Therefore, 0na

dttT

ntf

T

dttT

ntf

Tb

T

T

n

2sin

4

2sin

2

2

0

0

Page 64: 07_Periodic Functions and Fourier Series

dttT

nTt

T

dttT

nt

Tb

T

T

T

n

2sin

2

4

2sin

4

2

4

4

0

Use integration by parts.

Page 65: 07_Periodic Functions and Fourier Series

2sin

2

2sin

2.2

4

22

2

n

n

T

n

n

T

Tbn

0nb when n is even.

Page 66: 07_Periodic Functions and Fourier Series

Therefore, the Fourier series is

t

Tt

Tt

T

T 10

5

16

3

122222sinsinsin

Page 67: 07_Periodic Functions and Fourier Series

The Complex Form of Fourier Series

11

0 sincosn

nn

n nbnaaf

Let us utilize the Euler formulae.

2

jj ee

cos

i

eesin

jj

2

Page 68: 07_Periodic Functions and Fourier Series

The nth harmonic component of (1) can beexpressed as:

i

eeb

eea

nbnajnjn

n

jnjn

n

nn

22

sincos

22

jnjn

n

jnjn

n

eeib

eea

Page 69: 07_Periodic Functions and Fourier Series

jnnnjnnn

nn

ejba

ejba

nbna

22

sincos

Denoting

2nn

n

jbac

2

nnn

jbac,

and 00 ac

Page 70: 07_Periodic Functions and Fourier Series

jn

njn

n

nn

ecec

nsinbncosa

Page 71: 07_Periodic Functions and Fourier Series

The Fourier series for f can be expressed as:

n

jnn

n

jnn

jnn

ec

ececcf

1

0

Page 72: 07_Periodic Functions and Fourier Series

The coefficients can be evaluated in the following manner.

dnf

jdnf

jbac nnn

sin2

cos2

1

2

dnjnf sincos

2

1

def jn

2

1

Page 73: 07_Periodic Functions and Fourier Series

dnf

jdnf

jbac nnn

sin2

cos2

1

2

dnjnf sincos

2

1

def jn

2

1

Page 74: 07_Periodic Functions and Fourier Series

.

2

nnn

jbac

2nn

n

jbac

nc nc

Note that is the complex conjugate of

. Hence we may write that

defc jnn 2

1

,,,n 210

Page 75: 07_Periodic Functions and Fourier Series

The complex form of the Fourier series of

f 2 with period is:

n

jnnecf

Page 76: 07_Periodic Functions and Fourier Series

Example 1. Find the Fourier series of the following periodic function.

0

f

2 3 4 5

A

-A

2

0

whenA

whenAf

ff 2

Page 77: 07_Periodic Functions and Fourier Series

A 5

f x( ) A 0 x if

A x 2 if

0 otherwise

A01

2 0

2

xf x( )

d

A0 0

Page 78: 07_Periodic Functions and Fourier Series

n 1 8

An1

0

2

xf x( ) cos n x( )

d

A1 0 A2 0 A3 0 A4 0

A5 0 A6 0 A7 0 A8 0

Page 79: 07_Periodic Functions and Fourier Series

Bn1

0

2

xf x( ) sin n x( )

d

B1 6.366 B2 0 B3 2.122 B4 0

B5 1.273 B6 0 B7 0.909 B8 0

Page 80: 07_Periodic Functions and Fourier Series

Complex Form

n

jnnecf

defc jnn 2

1

,,, 210 n

C n( )1

2 0

2

xf x( ) e1i n x

d

Page 81: 07_Periodic Functions and Fourier Series

C 0( ) 0 C 1( ) 3.183i C 2( ) 0 C 3( ) 1.061i

C 4( ) 0 C 5( ) 0.637i C 6( ) 0 C 7( ) 0.455i

C 1( ) 3.183i C 2( ) 0 C 3( ) 1.061i

C 4( ) 0 C 5( ) 0.637i C 6( ) 0 C 7( ) 0.455i

C n( )1

2 0

2

xf x( ) e1i n x

d