15
1 Periodic driving forces Principle of Superposition Particular solution for a sum of cosine waves Fourier Series Periodic functions The fundamental frequency Orthogonal functions Obtaining Fourier coefficients Analogy with vector components Fourier Series examples The square wave The saw tooth wave

1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

Embed Size (px)

Citation preview

Page 1: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

1

Periodic driving forces• Principle of Superposition

– Particular solution for a sum of cosine waves

• Fourier Series– Periodic functions

• The fundamental frequency

– Orthogonal functions

– Obtaining Fourier coefficients

• Analogy with vector components

• Fourier Series examples– The square wave

– The saw tooth wave

Page 2: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

2

What will we do in this chapter?We will consider the problem of driving a damped harmonic oscillator with a periodic but non-sinusoidal driving force. A periodic driving force has the property that f(t +) = f(t) where is the period. This is an interesting problem , but more importantly, it provides a great excuse for discussing the Fourier series.

We begin by discussion the principle of superposition which is true for linear systems which obey linear differential equations. This allows us to obtain particular integrals for sums of sinusoidal driving forces.

We next develop the technique of Fourier Series where we can write any periodic function of as a sum of sine and cosine functions with frequencies which are integral multiples of the fundamental frequency of =. Our demonstration exploits the fact that sine and cosine function are orthogonal functions which means that integral over the trig functions over a complete period vanishes unless they have have are the same multiple. There is analogy between finding Fourier components and vector components. We conclude by finding Fourier series for square and saw tooth waves.

Page 3: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

3

Superposition20

20 1 1 2 2

In the previous chapter we worked out

solutions to 2 cos

What if we had two driving frequencies?

2 cos cos

Because the differential equ

linear in x and it

ations are

s

x x x f t

x x x f t f t

2

21 1 0 1 1 1

22 2 0 2 2 2

1 2

(no x terms, for example) we have the

which

allows us to simply add solutions. If

2 cos and

2 cos then

2

Principle of Superpositi

time derivat ves

on

i

x x x f t

x x x f t

x x

21 2 0 1 2

1 1 2 2cos cos

x x x x

f t f t

2 22 20

12 00

We could easily generalize our

"particular" solutions from last time. If

we can write the force as ( ) cos

then by the Superposition Princ

cos

2

e

t

l

2an

ip

n n np

nn

nn

n

n nn

n

a t

f a t

x

t

Although this allows us to generalize the result quite a bit, it seems just like a curiosity, it can’t really be true that that many periodic forces can be written as a sum of sinusoidal terms? But interestingly enough it is due to the Fourier Theorem

Page 4: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

4

Fourier Series

0

0

0

Let 2 /

( ) cos sin2

2( ) cos

2( ) sin

o

o

n nn

t

n t

t

n t

af t a n t b n t

a dt f t n t

b dt f t n t

2

2

( )f t

t

( )f t

t

Let us consider making an expansion of the periodic driving force depicted below. The pattern repeats every seconds.

The Fourier Theorem says that we can write a “reasonable” periodic function as sum of sine and cosine terms with frequencies which are integer multiples of the fundamental frequency of = These functions have the same periodicity as the driving force.

( ) ( )

cos ( ) cos

sin ( ) sin

f t f t

t t

t t

Because the force is periodic, the coefficients can be determined from one representative part. For convenience we use this piece.

We will show that the force can be represented by this series.

Page 5: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

5

Orthogonal functionsWe will show how to get the coefficients an and bn which we will call the Fourier coefficients. The trick is to exploit an orthogonality property of the sin and cosine functions.

0

0

0

0

Lets prove one of these results

cos cos

1

41

4

1cos cos

2

o

o

o

o

t

t

t in t in t im t im t

t

t i n m t i n m t

t

i n m t i n m t

t

t

dt n t m t

dt e e e e

dt e e

e e

dt n m t n m t

-1.5

-1

-0.5

0

0.5

1

1.5

-10 -5 0 5 10

0

0

0

For =2 / and n,m integers

cos cos 0 if n m

and if n=m=0

sin sin 0 if n m

sin cos 0 always

o

o

o

t

t

t

t

t

t

dt n t m t

dt n t m t

dt n t m t

If we integrate over one complete or multiple complete periods of the cosine curve we will get zero. This will happen for both terms as long as n and m are not equal or both equal to zero.

Page 6: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

6

Orthogonal functions continued

0

0

0

0

Lets prove another result

cos sin

1

41

4

1sin sin

2

o

o

o

o

t

t

t in t in t im t im t

t

t i n m t i n m t

t

i n m t i n m t

t

t

dt n t m t

dt e e e ei

dt e ei

e e

dt n m t n m t

This vanishes for any integral trig argument since one always integrates over a full multiple of a sine oscillation.

What happens when the trig integrals do not vanish?

0

0

0

0

cos cos

1cos cos

2If any of the arguments of the cosine function

1vanish we will get / 2

2This happens "twice" when n=m=0 and once

when just n=m

cos

o

o

o

o

t

t

t

t

t

t

t

t

dt n t m t

dt n m t n m t

dt

dt n t

0 if n m

cos /2 if n=m 0

if n=m=0

m t

Page 7: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

7

Obtaining Fourier coefficients

0

0

0

0 if n m

cos cos /2 if n=m 0

if n=m=0

0 if n msin sin

/2 if n=m 0

cos sin 0

o

o

o

t

t

t

t

t

t

dt n t m t

dt n t m t

dt n t m t

0

0

0

0 0

0 0

In more compact form:

2cos sin 0

2cos cos

2sin sin

o

o

o

t

t

t

nm n mt

t

nm n mt

dt n t m t

dt n t m t

dt n t m t

0

0

0

0

0

0

0

0

0

0

0

0

( ) cos sin2

2( ) sin

2sin

22

sin cos

2sin sin

2( ) sin

n nn

t

t

t

t

t

nn t

t

nn t

t

n mn mnt

af t a n t b n t

dt f t m t

adt m t

a dt m t n t

b dt m t n t

dt f t m t b b

We thus can get the Fourier sine coefficients by integrating over one period with the sine of the given frequency.

Page 8: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

8

Completing the coefficients

0

0

0

0

0

00

Similarly we have:

For m 0

2( ) cos

2For m=0 ( ) cos(0)

2( )

t

n mn mnt

t

t

t

t

dt f t m t a a

dt f t t

dt f t a

0

0

0( ) cos sin2

2( ) cos

2(

If ( ) ( ) and

We have thus demonstrated that:

) i

/

s

2

n

o

o

n nn

t

n t

t

n t

af t a n t b n t

a dt f t n t

b dt f t n t

f t f t

0

n m

The way we find the Fourier components is

analogous to the way we find vector

components. Consider the analogy

2ˆ ˆe e sin sin

The dot product is analogous to the integral.

Here

o

t

nm nmtdt n t m t

mm

is the way we find vector components

ˆ ˆ ˆ ˆ;

ˆn'th component is obtained using :

Consider an odd function: ( ) sin

To get the n'th component we "dot"

ˆ V

m m n m n m m

n n

nm nm m m

n

V V e e V V e e V V

e

f t b

V

t

e

m

0

f(t) with

the sin "unit vector"

2( ) sin

o

t

n t

n t

b dt f t n t

This is a very deep analogy in linear algebra called Hilbert Space

Page 9: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

9

Evaluate the square wave Fourier coefficients

/ 2

/ 2

/ 20

0

/ 2

0 0

0

0

0

0

2( ) sin

4sin

4 4cos1 cos

2

Substitute in = 2 /

41 cos when n is even

2cos 1 and when n is odd cos 1

44

1 cos2

n

n

n

n

b dt f t n t

fb dt n t

f fn t n

n n

fb n

nn n

ff

b nn

if n is odd

0 if n is even

n

/ 2

/ 2

/ 2

/ 2

2( ) cos

2( ) sin

n

n

a dt f t n t

b dt f t n t

Here is a sketch of the function which is an odd function. We use - < t <

The integrals over cos vanish by symmetry. Thus an=0. This leaves the sin integrals and bn terms. We exploit symmetry and double the sine integral from 0 to /2

2

2

( )f tcos t

sin tt

0f

0f

Page 10: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

10

Square wave series

-1.5

-1

-0.5

0

0.5

1

1.5

0 10 20 30 40 50

15

3

t

terms

erms

0

0

odd n

0

odd n

0 0

0

( ) cos sin2

4( ) sin where or

4( ) sin where = 2 /

4 4( ) sin sin 3

34

sin 5 ...5

n nn

n n

af t a n t b n t

ff t b n t b

n

ff t n t

n

f ff t t t

ft

( )f t

t

0f

0f

This plot shows how well this series matches our square wave using 3 terms: f(t) = b1sin t + b3sin 3t + b5sin5t and 15 terms. Clearly we get more fidelity with 15 terms but there are still some vicious overshoots. This is often called the Gibbs phenomenon.

Page 11: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

11

Our particular “square” solution

2 22 2odd 0

12

0

odd n

00

0

4( ) sin

4 sin

2

2tan

n np

nn n

nn

n

ff t n t

n

f

n

tx

( )f t

t

0f

0f

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1 3 5 7 9

11

13

15

17

19

21

23

25

27

29

nnA

We can depict the series by the Fourier “spectrum”. I would call this the amplitude spectrum. Only odd

frequencies are excited. When function has sharp edges -- as in the square wave-- high frequencies are required or the resultant distribution will be rounded.

Page 12: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

12

How to find a Fourier Series(1) Is the function f(t) periodic? If so find the smallest such that ( ) ( ).

We will expand in multiples of n where n=0,1,2,3... and =2 /

(2) Find a suitable interval of width t

f t f t

o represent the function.

If possible use an from

even functi

odd functi (- ) -

on: If possible use an from

(3) Evaluate th

- / 2

e Fourier c

(- ) (

oef

on: / 2

- / 2 / 2

(

)

) t

f

f t

t f t

f

t

t

0

0

0 0

0

0

1

ficients over the interval from

2 If the function has a non-zero integral : a ( )

If the function has even co

The series will be

m

( ) cos sin2 n n

t

t

n

af t a n t b n

t t t

dt f t

t

0

0

0

0

n

n

2ponents :a ( ) cos (where n 1)

2 If the function has odd components :b ( ) sin (where n 1)

t

t

t

t

dt f t n t

dt f t n t

Page 13: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

13

Saw tooth wave example

2

( )f t

0

2

( ) / 2 0<t<f t t

This function is neither even or odd about t=0 so we will have both sin and cosine terms. We begin by evaluating the an cosine terms. This time we integrate from 0 torather than to as we did last time.

2

2

cos / sin cos /

sin / cos sin /

dx x ax x a ax ax a

dx x ax x a ax ax a

0 0

2 20

2 2

2 2/ 2 cos cos

2 cossin

2 cos 1sin

Since 2 , sin 0, cos 1 n

0

a d

n

n

n

a dt t n t dt t n t

t n tn t

n n

na n

n n

n n

a

We actually get no cosine terms even though the saw tooth has mixed symmetry. This is actually because all cosine functions are even about /2 and the saw tooth is odd about this point, but you can always work it out the hard way as we did. On to the sine coefficients..

Page 14: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

14

The Saw Tooth continued...

n

2

0

2 20

2 2

Lets calculate the b coefficients using

sin / cos sin /

2/ 2 sin

2 sincos

2 sincos

Since 2 , sin 0, cos 1 and

2 and

n

n

dx x ax x a ax ax a

b dt t n t

t n tn t

n n

nn

n n

n n

bn n

n

0

1

recall a 0

( ) cos sin2

sin( )

n nn

n

af t a n t b n t

n tf t

n

Again we get a fairly good representation with 15 terms although

the Gibbs overshoot is quite apparent.

( )f t

2

-4

-3

-2

-1

0

1

2

3

4

0 2 4 6 8 10

15

3

t

terms

erms

1

2

2

Page 15: 1 Periodic driving forces Principle of Superposition –Particular solution for a sum of cosine waves Fourier Series –Periodic functions The fundamental

15

A shifted saw tooth

/ 2

( )f t t

/ 2

( )f t

2

2

/ 2

0

/ 2/

0

2

2

20

The shifted form of triangle wave is an oddfunction and hence can only have sin n t.

4Thus ( ) sin s

sin / cos sin /

in

4 cos 2 sin

n nn

n

dx x ax

f t b n t b dt t n t

t n t n tb

n n

x a ax ax a

2

1 1

4 cos / 2 2 sin / 2

2

cos 22 1 1n n

n

n n

n n

nb

n n n

-4

-3

-2

-1

0

1

2

3

4

0 2 4 6 8 10

15

3

t

terms

erms

1

2

1

1

sinThus ( ) ( 1 )

sin 2 sin 3( ) sin ...

2 3

n

n

n tf t

nt t

f t t

1

1

1 1

1

1

sinReconcile this with ( )

sin ( / 2)( )

2

sin sin1

sin( ) 1

n

n

n

n n

n

n

n tf t

nn t

f t f tn

n t n n t

n nn t

f tn