17
Fourier Series Or How I Spent My Summer Vacation (the 2 weeks after the AP Exam) Kevin Bartkovich Phillips Exeter Academy 1

Fourier Series Or How I Spent My Summer Vacation (the 2 weeks after the AP Exam) Kevin Bartkovich Phillips Exeter Academy 1

Embed Size (px)

Citation preview

1

Fourier SeriesOr

How I Spent My Summer Vacation(the 2 weeks after the AP Exam)

Kevin BartkovichPhillips Exeter Academy

2

Background

• Taylor Series– Polynomials– Derivatives – Equality of derivatives at a point

• Fourier Series– Sines and cosines– Integrals– Equality of integrals over an interval of one period

3

Definition

or

4

How to determine coefficients

Assume we are approximating a function f that is periodic with period for .

We equate integrals over the period rather than derivatives at a point:

2 ],[ x

5

We can immediately solve for the constant term since all the sine and cosine terms integrate to 0, which yields

so that

6

Strategy for other terms

Multiply by cosx and integrate:

Which yields

7

Why cos(mx)cos(nx) vanishes

cos(mx + nx) = cos(mx)cos(nx) – sin(mx)sin(nx)cos(mx – nx) = cos(mx)cos(nx) + sin(mx)sin(nx)cos(mx + nx) + cos(mx – nx) = 2 cos(mx)cos(nx)

0))sin((1

))sin((1

2

1

))cos()(cos(2

1)cos()cos(

xnmnm

xnmnm

dxnxmxnxmxdxnxmx

8

Likewise, we can multiply by sinx and integrate to find that

We can create similar integrals for all of the terms by multiplying by cos(kx) or sin(kx), in which all the terms integrate to 0 – except for cos2(kx) or sin2(kx) – which integrate to π.

9

General Form for Coefficients

10

Example: Square WaveModel a periodic square wave with amplitude 1

over the interval –π ≤ x ≤ π:

This is an odd function, so its integral is 0; thus a0 = 0.

Multiplying by coskx will also yield an odd function, so ak = 0 for all k.

-7 -5 -3 -1 1 3 5 7

-1

-0.5

0

0.5

1f(x)

11

On the other hand, multiplying by sinkx yields an even function that has an integral of 0 if k is even and 4/k if k is odd.

Thus:bk =

The Fourier Series is:

Fourier series examples.xlsx

k4

)5sin(

5

1)3sin(

3

1)sin(

4)( xxxxF

12

Example: Sawtooth Wave

Suppose we create a Fourier Series of alternating sine curves:

Fourier series examples.xlsx

4

)4sin(

3

)3sin(

2

)2sin()sin(

2)(

xxxxxF

13

Frequency Domain

We can combine akcos(kx) + bksin(kx) into a

single sinusoid, which can be written as

Akcos(kx - φ),

which has amplitude

and phase shift

.

14

How to Find the kth Harmonic

.tan ratiosBy

. and

)sin(cos so

)sin( and )cos(

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

22

222222

k

k

kkk

kkkk

kkkk

kkk

a

b

baA

AAba

AbAa

kxAkxAkxA

15

Example: Noise Filter

A Fourier Series allows us to transform a waveform from the time domain (amplitude vs. time) to the frequency domain (amplitude of the kth harmonic vs. k).

Example: Filter out random errors in a signal composed of a sum of various sinusoids.Fourier series error filter.xlsx

17

Thank You!

http://faculty.kfupm.edu.sa/ES/akwahab/Frequency_Domain.htm