Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

XCFNN

Download as pdf or txt
Download as pdf or txt
You are on page 1of 105

Periodic Functions and

Fourier Series
The Fourier Series

Joseph Fourier
1768 to 1830

Fourier studied the mathematical theory of heat


conduction. He established the partial differential
equation governing heat diffusion and solved it by
using infinite series of trigonometric functions.
The Fourier Series
Fourier proposed in 1807
A periodic waveform f(t) could be broken down into an
infinite series of simple sinusoids which, when added
together, would construct the exact form of the original
waveform.

Consider the periodic function

f (t )  f (t  nT ) ; n  1, 2,  3,


T = Period, the smallest value of T that satisfies the above
Equation.
Periodic Functions
A function f   is periodic
if it is defined for all real 
and if there is some positive number,

T such that f   T   f   .
Example:

t t
f (t )  cos  cos Find its period.
3 4
t t 1 1
f (t )  f (t  T ) cos  cos  cos (t  T )  cos (t  T )
3 4 3 4

Fact: cos   cos(  2m)


T
 2m T  6 m
3 T  24 smallest T
T
 2 n T  8 n
4
Example:

f (t )  cos 1t  cos 2t Find its period.

f (t )  f (t  T ) cos 1t  cos 2t  cos 1 (t  T )  cos 2 (t  T )

1T  2m 1 m 1 must be a



2 n 2 rational
2T  2n number
Example:

f (t )  cos 10t  cos(10  )t


Is this function a periodic
one?
1 10 not a rational

2 10   number
The Fourier Series
Definition
N 
A Fourier Series is an accurate representation of a
periodic signal and consists of the sum of sinusoids at
the fundamental and harmonic frequencies.

The waveform f(t) depends on the amplitude and phase


of every harmonic components, and we can generate any
non-sinusoidal waveform by an appropriate combination
of sinusoidal functions.
The Fourier Series
To be described by the Fourier Series the waveform f(t)
must satisfy the following mathematical properties:

1. f(t) is a single-value function except at possibly a


finite number of points.
t0 T
2. The integral t0
f (t ) dt   for any t0.

3. f(t) has a finite number of discontinuities within


the period T.
4. f(t) has a finite number of maxima and minima
within the period T.
In practice, f(t) = v(t) or i(t) so the above 4 conditions are
always satisfied.
The Fourier Series
Recall from calculus that sinusoids whose frequencies are
integer multiples of some fundamental frequency f0 = 1/T
form an orthogonal set of functions.

2 T 2 nt 2 mt
T 
0
sin
T
cos
T
dt  0 ;  n, m
and

2 T 2 nt 2 mt 2 T 2 nt 2 mt
T 0
sin
T
sin
T
dt   cos
T 0 T
cos
T
dt

0 ;n m

1 ; n  m  0
Fourier Series
f   be a periodic function with period 2
The function can be represented by
a trigonometric series as:
 
f    a0   an cos n   bn sin n
n 1 n 1
 
f    a0   an cos n   bn sin n
n 1 n 1

What kind of trigonometric (series) functions


are we talking about?

cos  , cos 2 , cos 3  and


sin , sin 2 , sin 3 
We want to determine the coefficients,

an and bn .

Let us first remember some useful


integrations.
Orthogonal Functions

• Call a set of functions {k} orthogonal


on an interval a < t < b if it satisfies

b 0 mn
a  m (t )  n (t )dt  
rn mn
Orthogonal set of Sinusoidal
Functions

Define 0=2/T.
T /2 T /2

T / 2
cos(m0t )dt  0, m0 T / 2
sin( m0t )dt  0, m0

T /2  0 mn
T / 2 cos(m0t ) cos(n0t )dt  T / 2 m  n We now prove this one

T /2  0 mn
T / 2 sin(m0t ) sin(n0t )dt  T / 2 m  n
T /2

T / 2
sin( m0t ) cos( n0t )dt  0, for all m and n
Proof
1
cos  cos   [cos(  )  cos(  )]
2


T /2

T / 2
cos( m0t ) cos( n0t )dt mn
1 T /2 1 T /2
  cos[(m  n)0t ]dt   cos[(m  n)0t ]dt
2 T / 2 2 T / 2
1 1 T /2 1 1 T /2
 sin[( m  n)0t ] T / 2  sin[( m  n)0t ] T / 2
2 ( m  n ) 0 2 ( m  n ) 0
1 1 1 1
 2 sin[( m  n)]  2 sin[( m  n) ]
2 ( m  n ) 0 2 ( m  n ) 0
0

0
0
Proof
1 1
cos  cos   [cos(  )  cos(  )] cos   [1  cos 2]
2
2 2
m=n
T /2

T / 2
cos( m0t ) cos( n0t )dt
T /2 1 T /2
  cos ( m0t )dt   [1  cos 2m0t ]dt
2
T / 2 2 T / 2
T /2 T /2
1 1
 t  sin 2m0t ]
2 T / 2 4 m  0 T / 2

0
T
 T /2  0 mn
2
T / 2 cos(m0t ) cos(n0t )dt  T / 2 m  n
Orthogonal set of Sinusoidal
Functions

Define 0=2/T.
T /2 T /2

T / 2
cos(m0t )dt  0, m0 T / 2
sin( m0t )dt  0, m0

T /2  0 mn
T / 2 cos(m0t ) cos(n0t )dt  T / 2 m  n
T /2  0 mn
T / 2 sin(m0t ) sin(n0t )dt  T / 2 m  n
T /2

T / 2
sin( m0t ) cos( n0t )dt  0, for all m and n
Orthogonal set of Sinusoidal
Functions

Define 0=2/T.
1m, 0t )dt  0,  sin(m t )dt 0,
T /2 T /2
 cos( m0 0 m0
 
T / 2 T / 2


T /2cos  t , cos 2  m 3n t , 
 t0, cos
 cos(m t ) cos(n t )dt  T / 2 m  n 0
0 0
sin  t , sin 2 t , sin 3 t ,  
0 0
T / 2

T /2
0 0
 0 mn
0 
 sin(m t ) sin(n t )dt  T / 2 m  n
T / 2
0 0

T /2
an orthogonal set.

T / 2
sin( m0t ) cos( n0t )dt  0, for all m and n
Determine a0
Integrate both sides of (1) from
 to 

  f  d

  

   a0   an cos n   bn sin n  d

 n 1 n 1 

  f   d

   

  a0d     an cos n  d
 
 n 1 
  

    bn sin n  d

 n 1 
 
  f  d    a d  0  0
 
0



f d  2a0  0  0


1
a0 
2 
f d

a0 is the average (dc) value of the


function, f   .
You may integrate both sides of (1) from

0 to 2 instead.
2
 f   d
0

2   

 a0   an cos n   bn sin n  d
0
 n 1 n 1 

It is alright as long as the integration is


performed over one period.
2
 f   d
0

2 2  

  a0d     an cos n  d
0 0
 n 1 
2  

   bn sin n  d
0
 n 1 
2 2
 f   d   a0d  0  0
0 0
2
 f   d  2a0  0  0
0

1 2
a0   f   d
2 0
Determine an
Multiply (1) by cos m
and then Integrate both sides from
 to 

  f   cos m d

  

  a0   an cos n   bn sin n  cos m d

 n 1 n 1 
Let us do the integration on the right-hand-side
one term at a time.

First term,


a0 cos m d  0
Second term,
 


  n 1
an cos n cos m  d
Second term,
 

  a

n 1
n cos n cos m d  am

Third term,

 



 b
n 1
n sin n cos m  d  0
Therefore,

 f   cos m d  am

1 
am   f   cos m d m  1, 2, 
  
Determine bn
Multiply (1) by sin m
and then Integrate both sides from
 to 

  f   sin m d

  

  a0   a n cos n   bn sin n  sin m  d

 n 1 n 1 
Let us do the integration on the right-hand-side
one term at a time.

First term,



a0 sin m  d  0
Second term,

 

  a

n 1
n cos n sin m  d
Second term,

 

  a

n 1
n cos n sin m  d  0

Third term,

 



 b
n 1
n sin n sin m d  bm
Therefore,

 f   sin m d  bm

1 
bm   f   sin md m  1, 2 ,
  
The coefficients are:

1
a0 
2  f d


1 
am   f   cos m d m  1, 2, 
  

1 
bm   f   sin m d m  1, 2, 
  
We can write n in place of m:

1
a0 
2 

f d

1 
an   f   cos n d n  1, 2 ,
  

1 
bn   f   sin n d n  1, 2 ,
  
The integrations can be performed from

0 to 2 instead.

1 2
a0   f   d
2 0

1 2
f   cos n d

an  n  1, 2 ,
0

1 2
bn   f   sin n d n  1, 2 ,
 0
Example 1. Find the Fourier series of
the following periodic function.

f   A when 0    
  A when     2
f   2   f  
1 2
a0   f   d 
2 0
1   2


  f   d   f   d 
2  0 

1   2


2 
  0
A d   
 A d  
0
1 2
an   f   cos n d
 0

1  2


  A cos n  d     A  cos n  d  
  0 
 2
1  sin n  1 sin n 
 A    A  0
 n 0   n 
1 2
f   sin n d

bn 
0

1  2

 
  0 
 A sin n  d   A sin n  d 
 2
1 cos n  1  cos n 
  A  A
 n  0   n  


A
 cos n  cos 0  cos 2n  cos n 
n
bn 
A
 cos n  cos 0  cos 2n  cos n 
n

A
1  1  1  1
n
4A
 when n is odd
n
bn 
A
 cos n  cos 0  cos 2n  cos n 
n

A
 1  1  1  1
n
 0 when n is even
Therefore, the corresponding Fourier series is

4A  1 1 1 
 sin  sin 3  sin 5  sin 7  
  3 5 7 

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

0.5

f() 0

0.5

1.5


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

0.5

f() 0

0.5

1.5


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

0.5

f ( ) 0

0.5

1.5


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

0.5

f() 0

0.5

1.5


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

1.5

0.5

0.5

1.5


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

0.5

0.5

1.5
0 2 4 6 8 10

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

0.5

0.5

1.5
0 2 4 6 8 10

Even and Odd Functions
(We are not talking about even or
odd numbers.)
Even Functions The value of the
function would
be the same
when we walk
equal distances
along the X-axis
in opposite
directions.

Mathematically speaking -
f     f  
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.
Mathematically speaking -
f      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.
5

5
10 0 10


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

10 0 10


The Fourier series of an even function f  
is expressed in terms of a cosine series.

f    a0   an cos n
n 1

The Fourier series of an odd function f  


is expressed in terms of a sine series.

f     bn sin n
n 1
Example 2. Find the Fourier series of
the following periodic function.

f x   x 2
when    x  
f   2   f  
1  1 
a0   f  x  dx  
2
x dx
2  2 
x 
1 x  3
 2
 3 
2   x   3
1 
an   f  x  cos nx dx
  

1  2 

 
  
x cos nxdx

Use integration by parts. Details are shown
in your class note.
4
an  2 cos n
n
4
an   2 when n is odd
n

4
an  2 when n is even
n
This is an even function.
Therefore, bn  0
The corresponding Fourier series is

 2
 cos 2 x cos 3 x cos 4 x 
 4 cos x  2
 2
 2
 
3  2 3 4 
Functions Having Arbitrary Period

Assume that a function f t  has


period, T . We can relate angle
(  ) with time ( t ) in the following
manner.
  t
 is the angular velocity in radians per
second.
  2 f
f is the frequency of the periodic function,

f t 
1
  2 f t where f 
T
2
Therefore,  t
T
2 2
 t d  dt
T T
Now change the limits of integration.

2 T
     t t
T 2
2 T
   t t
T 2

1
a0 
2  
f d

T
2
1
a0   f t dt
T T

2
1 
an   f   cos n d n  1, 2 ,
  

 2 n 
2
2
an 
T  Tf t  cos T t dt n  1, 2, 

2
1 
bn   f   sin n d n  1, 2 ,
  

 2 n 
2
2
bn 
T  Tf t  sin T t dt n  1, 2, 

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

f t   t when   t 
T T
4 4
T T 3T
 t  when t
2 4 4
f t  T   f t 
This is an odd function. Therefore, an  0
 2n 
T
2
bn   f t  sin t dt
T 0  T 
T

 2n 
2
4
  f t  sin t dt
T 0  T 
T

 2n 
4
4
bn 
T  T 
t sin t  dt
0
T
2
4  T   2n 

T T 
  t   sin
2  T 
t  dt
4

Use integration by parts.


  T 
4
2
 n 
bn   2.  sin 
  2n 
T  2 
2T  n 
 2 2 sin 
n  2 

bn  0 when n is even.
Symmetry of the Function
Four types
1. Even-function symmetry
2. Odd-function symmetry
3. Half-wave symmetry
4. Quarter-wave symmetry
Even function
f (t )  f ( t ) All bn = 0

4 T /2
an   f (t ) cos n 0t dt
T 0
Symmetry of the Function

Odd function
f (t )   f ( t ) All an = 0
4 T /2
bn   f (t )sin n 0t dt
T 0

Half-wave symmetry
T
f (t )   f (t  )
2
an and bn = 0 for even values of n and a0 = 0
Symmetry of the Function
Quarter-wave symmetry

Odd & Quarter-wave

All an = 0 and bn = 0 for even values of n and a0 = 0

8 T /4
bn 
T 0
f (t )sin n 0t dt ; for odd n
Symmetry of the Function
For Even & Quarter-wave

All bn = 0 and an = 0 for even values of n and a0 = 0

8 T /4
an 
T 0
f (t ) cos n 0t dt ; for odd n
Example 5 Determine Fourier Series and N = ?

f m  4 and T  s
2

 2
T  0   4 rad/s
2 T
To obtain the most advantages form of symmetry,
we choose t1 = 0 s  Odd & Quarter-wave
All an = 0 and bn = 0 for even values of n and a0 = 0
8 T /4
bn 
T 
0
f (t )sin n 0t dt ; for odd n
Example
4
fm 4 fm
f (t )  t t ; 0  t  T /4
T /4 T

32 2
 f (t )  t ; 0  t  T /4

8  32  T / 4
bn     t sin n 0t dt
T  0
T /4
512  sin n0t t cos n0t 
 2  2 2  
  n 0 n0  0
32 n
 2 2 sin ; for odd n
 n 2
Example
The Fourier Series is
N
1 n
f (t )  3.24 2 sin sin n0t ; for odd n
n 1 n 2
32
 2

The first 4 terms (upto and including N = 7)


1 1 1
f (t )  3.24(sin 4t  sin12t  sin 20t  sin 28t )
9 25 49
Next harmonic is for N = 9 which has magnitude
3.24/81 = 0.04 < 2 % of b1 ( = 3.24)
Therefore the first 4 terms (including N = 7) is enough for
the desired approximation
Exponential Form of the Fourier Series
N
f (t )  C0   Cn cos( n 0t  n )
n 1
C0 is the average (or DC) value of f(t) and
( an  jbn )
Cn   Cn  n
2
where a b 2 2
Cn  C n  n n

2
 1  bn 
 tan   ; if an  0
  an 
and n  
180  tan 1   bn  ; if a  0
   n
  an 
Exponential Form of the Fourier Series
or
an  2Cn cos n and bn  2Cn sin  n
Writing cos( n 0t   n ) in exponential form using
Euler’s identity with N  
 
f (t )  C0  Ce
n 
n
jn0t
 Ce
n 
n
jn0t

n 0

where the complex coefficients are defined as


1 t0 T
Cn 
T  t0
f (t )e  jn0t dt  Cn e jn
And Cn  C* n ; the coefficients for negative n are the
complex conjugates of the coefficients for positive n
Example 6 Determine complex Fourier Series

Even function

The average value of f(t) is zero  C0  0


1 t0 T

 jn0t
Cn  f (t )e dt
T t0
T
We select t0   and define jn 0  m
2
Example (cont.)
1 T /2
Cn   f (t )e  jn0t dt
T T / 2
1 T / 4 1 T /4 1 T /2
   Ae dt  
 mt  mt
Ae dt    Ae  mt
dt
T  T / 2 T  T / 4 T T /4


mT

A  mt  T / 4  mt T / 4
e | T / 2 e | T / 4  e |T / 4 
 mt T / 2


A
jn 0T

2e jn / 2  2e  jn / 2  e  jn  e jn 
0 ; for even n
A  n  
  4sin  2sin( n )    2 A 
2 n  2   sin n ; for odd n
 n 2
sin x n
A where x 
x 2
Example
Since f(t) is even function, all Cn are real and = 0 for n even

For n = 1
A sin  / 2 2 A
C1    C 1
 /2 
For n = 2
sin 
C2  A  0  C 2

For n = 3

A sin(3 / 2) 2 A
C3    C 3
3 / 2 3
Example
The complex Fourier Series is
2 A  j 30t 2 A  j0t 2 A j0t 2 A j 30t
f (t )    e  e  e  e 
3   3
2 A j0t 2 A j 30t


 e  e  j0t
 
3
 e  e  j 30t
 
 jx
4A 4A e jx
 e  2 cos x
 cos 0t  cos 30t    jx
 3 e jx
 e  2 j sin x
4 A  ( 1) q n 1
 
 n 1 n
cos n0t where q 
2
n odd

For real f(t)  Cn  C  n


Example 7 Determine complex Fourier Series

Even function

Use jn 0  m
1 T /4

 mt
Cn  1e dt
T T / 4

1  mt T / 4
 e |T / 4
mT
1

mT
 e  mT / 4
e  mT / 4

Example

1
Cn 
 jn 2
 e  jn / 2
e  jn / 2

0 ; n even, n  0
 ( n 1) / 2
 ( 1) ; n odd

To find C0
1 T
C0   f (t ) dt
T 0
1 T /4 1
  1 dt 
T T / 4 2
The Fourier Spectrum
The complex Fourier coefficients
Cn  Cn  n
Cn n



Amplitude spectrum Phase spectrum
The Fourier Spectrum
The Fourier Spectrum is a graphical display of the
amplitude and phase of the complex Fourier coeff.
at the fundamental and harmonic frequencies.
Example

A periodic sequence of pulses each of width 


The Fourier Spectrum
The Fourier coefficients are
1 T /2
Cn   Ae  jn0t
dt
T T / 2
For n  0
A  / 2  jn0t
Cn   e dt
T  / 2
A

jn0T
 e  jn0 / 2
 e jn0 / 2

2A  n 0 
 sin  
n 0T  2 
The Fourier Spectrum
A sin( n 0 / 2)
Cn 
T ( n 0 / 2)
A sin x

T x
where x  n 0 / 2
1  /2 A
For n  0 C0 
T  / 2 Adt  T
The Fourier Spectrum
ˆ
L'Hopital's rule
sin x
 1 for x  0
x
  50
sin( n )
0 ; n  1, 2, 3,   100
n

 0
The Truncated Fourier Series
A practical calculation of the Fourier series requires that
we truncate the series to a finite number of terms.
N
f (t )  
n  N
Cn e jn0t  S N (t )

The error for N terms is


 (t )  f (t )  S N (t )
We use the mean-square error (MSE) defined as
1 T
MSE 
T  0
 2 (t )dt

MSE is minimum when Cn = Fourier series’ coefficients


The Truncated Fourier Series

overshoot  10%
Circuits and Fourier Series
It is often desired to determine the response of a circuit
excited by a periodic signal vS(t).
Example 8 An RC Circuit vO(t) = ?
R  1 , C  2 F, T   sec

An RC circuit excited by a periodic voltage vS(t).


Circuits and Fourier Series
Each voltage source
is a term of the
Fourier series of vs(f).

An equivalent circuit.
Example (cont.)

Each
input
is a
Sinusoid.

Using
phasors
to find
steady-state
responses
to the
sinusoids.
Example (cont.)

1 N
2( 1) q
vs (t )    cos n 0t
2 n 1,odd  n
( n  1)
where q 
2
The first 4 terms of vS(t) is 0  2 rad/s
1 2 2 2
vs ( t )   cos 2t  cos 6t  cos10t
2
 
   3  5
v (t ) v (t ) v ( t ) v ( t )
s0 s1 s3 s5
The steady state response vO(t) can then be found using
superposition. vo (t )  vo 0 (t )  vo1 (t )  vo 3 (t )  vo 5 (t )
Example (cont.)
The impedance of the capacitor is
1
ZC  ; for n  0,1, 3, 5,
jn0C
We can find
1
jn 0C
Von  Vsn ; for n  0,1, 3, 5,
1
R
jn0C
Vsn

1  jn 
 0CR
4
Example (cont.)
The steady-state response can be written as
von (t )  Von cos( n 0t  Von
Vsn
 cos( n 0t  Vsn  tan 1 4n )
1  16n 2

In this example we have


1
Vs 0 
2
2
Vsn  for n  1, 3, 5
n
Vsn  0 for n  0,1, 3, 5
Example (cont.)
1
vo 0 (t ) 
2
2
von (t )  cos( n 2t  tan 1 4n ) ; for n  1,3,5
n 
 1  16 n 2

vo1 (t )  0.154 cos(2t  76)


vo 3 (t )  0.018cos(6t  85)
vo 5 (t )  0.006cos(10t  87)

1
 vo (t )   0.154 cos(2t  76)  0.018cos(6t  85)
2
 0.006cos(10t  87)

You might also like