Periodic Functions and Fourier Series
Dec 03, 2014
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 .
0
T
f
0
T
f
0
T
f
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
11
0 sincosn
nn
n nbnaaf
What kind of trigonometric (series) functions are we talking about?
32
and32
sin,sin,sin
cos,cos,cos
0
0
2
cos cos 2 cos 3
0
0 2
sin sin 2 sin 3
We want to determine the coefficients,
na and nb .
Let us first remember some useful integrations.
dmndmn
dmn
cos2
1cos
2
1
coscos
0
dmn coscos mn
dmn coscos mn
dmndmn
dmn
sin2
1sin
2
1
cossin
0
dmn cossin
for all values of m.
dmndmn
dmn
cos2
1cos
2
1
sinsin
0
dmn sinsin mn
dmn sinsin mn
Determine 0aIntegrate both sides of (1) from
to
dnbnaa
df
nn
nn
110 sincos
dnb
dnada
df
nn
nn
1
10
sin
cos
000
dadf
002 0
adf
dfa
2
10
0a is the average (dc) value of the
function, f .
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.
dnb
dnada
df
nn
nn
2
01
2
01
2
0 0
2
0
sin
cos
002
0 0
2
0
dadf
002 0
2
0 adf
dfa
2
00 2
1
Determine naMultiply (1) by mcosand then Integrate both sides from
to
dmnbnaa
dmf
nn
nn
cossincos
cos
110
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
m
nn admna
coscos1
Second term,
Third term,
01
dmcosnsinb
nn
Therefore,
madmf cos
,2,1cos1
mdmfam
Determine nbMultiply (1) by msinand then Integrate both sides from
to
dmsinnsinbncosaa
dmsinf
nn
nn
110
Let us do the integration on the right-hand-side one term at a time.
First term,
00 dmsina
Second term,
dmsinncosa
nn
1
01
dmsinncosa
nn
Second term,
Third term,
m
nn bdmnb
sinsin1
Therefore,
mbdmsinf
,,mdmsinfbm 211
dfa
2
10
The coefficients are:
,2,1cos1
mdmfam
,2,1sin1
mdmfbm
dfa
2
10
We can write n in place of m:
,,ndncosfan 211
,,ndnsinfbn 211
The integrations can be performed from
0 to 2 instead.
dfa
2
00 2
1
,,ndncosfan 211 2
0
,,ndnsinfbn 211 2
0
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
02
12
12
1
2
0
2
0
2
00
dAdA
dfdf
dfa
011
1
1
2
0
2
0
2
0
n
nsinA
n
nsinA
dncosAdncosA
dncosfan
ncosncoscosncosn
A
n
ncosA
n
ncosA
dnsinAdnsinA
dnsinfbn
20
11
1
1
2
0
2
0
2
0
oddisnwhen4
1111
20
n
An
A
ncosncoscosncosn
Abn
evenisnwhen0
1111
20
n
A
ncosncoscosncosn
Abn
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?
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 ( )
When we consider 6 terms, the function looks like the following.
1.5
1
0.5
0
0.5
1
1.5
f ( )
When we consider 8 terms, the function looks like the following.
1.5
1
0.5
0
0.5
1
1.5
f ( )
When we consider 12 terms, the function looks like the following.
1.5
1
0.5
0
0.5
1
1.5
f ( )
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
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
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
Even and Odd Functions
(We are not talking about even or odd numbers.)
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 -
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(
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
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
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
Example 2. Find the Fourier series of the following periodic function.
ff 2
x
f(x)
3 5 7 90
xwhenxxf 2
332
1
2
1
2
1
23
20
x
x
x
dxxdxxfa
nxdxx
dxnxxfan
cos1
cos1
2
Use integration by parts.
nn
an cos4
2
odd is n when4
2nan
even is n when4
2nan
This is an even function.
Therefore, 0nbThe corresponding Fourier series is
222
2
4
4cos
3
3cos
2
2coscos4
3
xxxx
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 frequency in radians per second.
f 2f is the frequency of the periodic function,
tf
tf 2 Tf
1where
tT
2Therefore,
tT
2 dt
Td
2
Now change the limits of integration.
2
Tt t
T
2
2
Tt t
T
2
dfa
2
10
dttfT
a
T
T
2
2
0
1
,,ndncosfan 211
,2,12
cos2 2
2
ndttT
ntf
Ta
T
Tn
,,ndnsinfbn 211
,2,12
sin2 2
2
ndttT
ntf
Tb
T
Tn
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
tfTtf
This is an odd (periodic) function. Therefore,
0na
dttT
ntf
T
dttT
ntf
Tb
T
T
n
2sin
4
2sin
2
2
0
0
dttT
nTt
T
dttT
nt
Tb
T
T
T
n
2sin
2
4
2sin
4
2
4
4
0
Use integration by parts.
2sin
2
2sin
2.2
4
22
2
n
n
T
n
n
T
Tbn
0nb when n is even.
Therefore, the Fourier series is
t
Tt
Tt
T
T 10
5
16
3
122222sinsinsin
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
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
jnnnjnnn
nn
ejba
ejba
nbna
22
sincos
Denoting
2nn
n
jbac
2
nnn
jbac,
and 00 ac
jn
njn
n
nn
ecec
nsinbncosa
The Fourier series for f can be expressed as:
n
jnn
n
jnn
jnn
ec
ececcf
1
0
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
dnf
jdnf
jbac nnn
sin2
cos2
1
2
dnjnf sincos
2
1
def jn
2
1
.
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
The complex form of the Fourier series of
f 2 with period is:
n
jnnecf
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
A 5
f x( ) A 0 x if
A x 2 if
0 otherwise
A01
2 0
2
xf x( )
d
A0 0
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
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
Complex Form
n
jnnecf
defc jnn 2
1
,,, 210 n
C n( )1
2 0
2
xf x( ) e1i n x
d
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