Beruflich Dokumente
Kultur Dokumente
POWER QUALITY
ADEL ELGAMMAL
ASSOCIATE PROFESSOR
ADEL ELGAMMAL
THE UNIVERSITY OF TRINIDAD AND TOBAGO UTT
CHAPTER 6
FOURIER ANALYSIS
ADEL ELGAMMAL
THE UNIVERSITY OF TRINIDAD AND TOBAGO UTT
1
Joseph Fourier
Fourier was
obsessed with the
physics of heat and
developed the
Fourier series and
transform to model
heat-flow problems.
What do we hope to achieve with the Fourier
Transform?
We desire a measure of the frequencies present in a wave. This will
lead to a definition of the term, the spectrum.
Light electric field
Time
It will be nice if our measure also tells us when each frequency occurs.
2
Anharmonic waves are sums of sinusoids.
Consider the sum of two sine waves (i.e., harmonic
waves) of different frequencies:
Fourier
decomposing
functions sin(t)
sin(3t)
Here, we write a
square wave as
a sum of sine
waves.
sin(5t)
3
Fourier Series
Fourier Series
Periodic Functions
Periodic functions
• A periodic function has a basic shape
which is repeated over and over again.
• The fundamental range is the time (or
sometimes distance) over which the basic
shape is defined.
• The length of the fundamental range is
called the period.
4
Example – Periodic functions
1 1 x 0
f ( x)
2 0 x 1
f ( x 2) f ( x )
fundamental range
period = 2
Periodic functions
• We can express a general periodic function as:
T T
f ( x) x
2 2
f ( x T ) f ( x)
where T is the period.
5
The Mathematic Formulation
• Any function that satisfies
f (t ) f (t T )
where T is a constant and is called the period of the
function.
Example:
t t
(t ) cos cos
f (t Find its period
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
6
Example:
f (t ) cos 1t cos 2t Find its period.
Examples:
p q p / q =
1 1 1/1 1
1 2 1/2 0.5
55 100 55/100 0.55
7
Here are some more examples:
Example:
1 10 not a rational
2 10 number
8
Fourier Series
Fourier Series
Introduction
• Decompose a periodic input signal into
primitive periodic components.
primitive periodic components.
A periodic sequence
f(t)
t
T 2T 3T
9
Synthesis
a0 2nt 2nt
f (t ) an cos bn sin
2 n 1 T n 1 T
DC Part Even Part Odd Part
Let 0=2/T.
2/T.
a0
f (t ) an cos(n0t ) bn sin( n0t )
2 n 1 n 1
Harmonics
2
D fi
Define 0 2f 0 , called
ll d the
th fundamental
f d t l angular
l frequency.
f
T
Define n n0 , called the n-th harmonic of the periodic function.
a0
f (t ) an cos n0t bn sin n0t
2 n 1 n 1
a0
f (t ) an cos n t bn sin n t
2 n 1 n 1
10
Fourier coefficients
• One of the most important things about the
F i
Fourier series
i i that
is th t even though
th h we are
representing f (x) with an infinite series, with an
infinite number of coefficients, we can calculate
the coefficients an, bn one by one.
Orthogonal Functions
b 0 mn
a m (t )n (t )dt rn mn
11
Orthogonal set of Sinusoidal Functions
Define 0=2/T.
T /2 T /2
T / 2
cos( m0t )dt 0, m0
T / 2
sin( m0t )dt 0, m0
T /2 0 mn
T / 2 cos( m 0 t ) cos( n 0 t )dt
T / 2 m n
We now prove this one
T /2 0 mn
T / 2
sin( m0t ) sin( n0t )dt
T / 2 m n
T /2
T / 2
sin( m0t ) cos( n0t )dt 0, for all m and n
Proof
1
cos cos [cos( ) cos( )]
2
T /2
T / 2
cos( m0t ) cos(n0t )dt mn
1 T /2 1 T /2
2 T / 2 2 T / 2
cos[( m n ) 0 t ]dt cos[( m n)0t ]dt
1 1 1 1
[( m n)0t ] T / 2 [( m n)0t ] T / 2
T /2 T /2
sin[( sin[(
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
12
Proof
1 1
cos cos [cos( ) cos( )] cos 2 [1 cos 2]
2 2
T /2
T / 2
cos( m0t ) cos( n0t )dt m=n
1 T /2
2 T / 2
T /2
cos 2 (m0t )dt [1 cos 2m0t ]dt
T / 2
T /2 T /2
1 1
t sin 2m0t ]
2 T / 2 4m0 T / 2
0
T
T /2 0 mn
2 T / 2
cos( m0t ) cos( n0t )dt
T / 2 m n
Orthogonal set of Sinusoidal Functions
Define 0=2/T.
T /2 T /2
T / 2
cos( m0t )dt 0, m0
T / 2
sin( m0t )dt 0, m0
T /2 0 mn
T / 2 cos( m 0 t ) cos( n 0 t )dt
T / 2 m n
T /2 0 mn
T / 2
sin( m0t ) sin( n0t )dt
T / 2 m n
T /2
T / 2
sin( m0t ) cos( n0t )dt 0, for all m and n
13
1,
cos 0t , cos 20t , cos 30t ,
sin t , sin 2 t , sin 3 t ,
0 0 0
an orthogonal
g set.
Decomposition
a0
f (t ) an cos(n0t ) bn sin( n0t )
2 n 1 n 1
2 t 0 T
T t0
a0 f (t )dt
2 t0 T
T t0
an f (t ) cos n0tdt n 1,2,
2 t 0 T
T t0
bn f (t ) sin n0tdt n 1,2,
14
Example (Square Wave)
f(t)
1
2
Define 0=2/T =1
2 0
a0 1dt 1
2 T = 2
2
2 1
an
2 0
cos ntdt
n
sin nt 0 0 n 1,2,
2 1 1 2 / n n 1,3,5,
bn
2 0
sin ntdt
n
cos nt 0
n
(cos n 1)
0 n 2,4,6,
1 2 1 1
f (t ) sin t sin 3t sin 5t
2 3 5
f(t)
1
1.5
0.5
-0.5
15
Fourier Coefficients of
S
Symmetrical Waveforms
t i lW f
Easy ways of finding
F i
Fourier coefficients
ffi i
Easy ways of finding Fourier
coefficients
• There are some easy shortcuts for finding the Fourier
coefficients.
coefficients
• We can see that:
T
2
2
a0
T f ( x)dx
T
2
16
Easy ways of finding Fourier
coefficients
• Example ‐ Using the formula:
1 1 x 0
f ( x)
2 0 x 1
f ( x 2) f ( x ) T 2
T
2 1
2 2
2 1
a0 f ( x)dx a0 f ( x)dx
T T
2
0 1
2 2
a0 1dx 2dx a0 1 2 3
2
2 1 20 2
Easy ways of finding Fourier
coefficients
• Example – Using the area under the
fundamental range:
fundamental range:
So if the periodic function
has a simple shape we can
Period = 2
use geometry to find a0
Fundamental
range
a0 area a 1 2 a0 3
0
2 period 2 2 2 2
17
Fourier Coefficients of
Symmetrical Waveforms
• The use of symmetry properties simplifies the
calculation of Fourier coefficients.
l l ti fF i ffi i t
– Even Functions
– Odd Functions
– Half‐Wave
– Even Quarter
Even Quarter‐Wave
Wave
– Odd Quarter‐Wave
– Hidden
Waveform Symmetry
• Even Functions are defined by the property:
f (t ) f (t )
f (t ) f (t )
18
Decomposition
• Any function f(t) can be expressed as the sum of
an even function fe(t) and an odd function f
an even function f and an odd function fo(t).
(t)
f (t ) f e (t ) f o (t )
f e (t ) 12 [ f (t ) f (t )] Even Part
Example
e t t 0
f (t )
0 t0
12 e t Even Part
t 0
f e (t ) 1 t
2e t0
12 e t Odd Part
t 0
f o (t ) 1 t
2 e t0
19
Odd and Even Functions
Even Function : f - t f t
Odd Function : f - t f t
Even Odd
Odd and even functions ‐ revision
• If f (x) is even:
a a
f ( x)dx
a
2 f ( x)dx
0
a a
f ( x)dx f ( x)dx
0
a
-a a
20
Odd and even functions ‐ revision
• If f (x) is odd:
a
f ( x)dx 0
a
f ( x)dx
a
-a a
Odd and even functions ‐ revision
• If f (x) is even and g(x) is odd then:
– h(x) = f (x) x f (x) is even (even x even =
even)
– h(x) = g(x) x g(x) is even (odd x odd = even)
– h(x) = f (x) x g(x) is odd (even x odd =
odd)
21
Easy ways of finding Fourier
coefficients
We can also use the properties of even and odd functions to
make
k finding
fi di the
h Fourier
F i coefficients
ffi i easier.
i
• Consider the formula for Fourier series:
a0 n 2nx 2nx
f ( x) an cos bn sin
2 n 1 T T
Since all the sines are odd functions and all the cosines are even
functions, we can break the function and the Fourier series into two
parts:
f ( x) f odd ( x) f even ( x)
Easy ways of finding Fourier
coefficients
• We can compare with the Fourier series to get:
n
2nx
f odd ( x) bn sin
n 1 T
a0 n 2nx
f even ( x) an cos
2 n 1 T
Thus if f (x) is odd:
Thus,
f even ( x) 0 a0 0 a n
And, if f (x) is even:
f odd ( x) 0 bn 0
22
Easy ways of finding Fourier
coefficients
• We can also see these results from our formulae for the
coefficients:
T
2nx
2
2
an
T T
f ( x ) cos
T
dx
2
Easy ways of finding Fourier
coefficients
• Similarly, for:
T
2nx
2
2
bn
T f ( x) sin
T T
dx
2
23
Fourier Coefficients of Even Functions
f (t ) f (t )
a0
f (t ) an cos n0t
2 n 1
4 T /2
an
T 0
f (t ) cos( n0t )dt
Fourier Coefficients of Odd Functions
f (t ) f (t )
f (t ) bn sin
i n 0 t
n 1
4 T /2
bn f (t ) sin( n0t )dt
T 0
24
Odd and Even Functions
Even Function : f - t f t
Odd Function : f - t f t
Even Odd
2T
a n f t cosnt dt for n 0,1, 2, 3, ....
T0
If f t is even then
bn 0
a 0
If f x is odd then n T
b b 2 f t sinnt dt for n 1, 2, 3, ....
n n
T0
Summary of finding coefficients
function function function
even odd neither
T T
2 2
2 2
a0 f ( x)dx a0 f ( x)dx
a0 T
T T
2nx 2nx
2 2
2 2
an an
T f ( x) cos
T
2
T
dx
0 an
T f ( x) cos
T
2
T
dx
T T
2nx 2nx
2 2
bn 0 bn
2
T f ( x) sin T
dx bn
2
T f ( x) sin
T T
dx
T
2 2
25
Example – Fourier series
• Example – Find the coefficients for the Fourier
series of:
i f
x x 0
f ( x)
x 0 x
f ( x 2 ) f ( x)
f ( x)
Fundamental
range
Period = 2π
x
0 2 4
Example – Fourier series
• Find a0
T
2
2 2
a0
T T
f ( x)dx a0
2
f ( x)dx
2
2 2
a0
2
f ( x)dx a0
f ( x)dx
0
2 2 x2
a0 xdx a0 a0
0 2 0
26
Example – Fourier series
• Find an Define 0=2/T =1
T = 2
T
2nx 2nx
2
2 1
an
T f ( x) cos
T T
dx an
f ( x) cos
2
dx
2
Example – Fourier series
• Now we will have to use integration by parts.
b b
dx uv a v dx
dv du
u
b
a
dx a
dx
du
u x 1
dx
sin nx
cosnx v
dv
dx n
Substituting:
2 x sin nx sin nx
x cosnx dx
2
an an dx
0 n 0 0 n
cosnx 2 cosn 1
2
an 0 an
n 0
2
n2
an 2 1 1
2
n
n
27
Example – Fourier series
• Find bn
T
2nx 2nx
2
2 1
bn
T f ( x) sin
T T
dx bn
f ( x) sin
2
dx
2
Example – Fourier series
• So we can put the coefficients back
into the Fourier series formula:
into the Fourier series formula:
a0 n 2nx 2nx
f ( x) an cos bn sin
2 n 1 T T
n
2
f ( x) 2 1 1 cosnx
n
2 n 1 n
cos x 0 cos3x
4 4
f ( x)
2 9
28
Half‐Wave Symmetry
f (t ) f (t T ) and f (t ) f t T / 2
T/2 T/2 T
Fourier Coefficients for Half‐Wave Symmetry
f (t ) f (t T ) and f (t ) f t T / 2
T/2 T/2 T
29
Fourier Coefficients for Half‐Wave Symmetry
f (t ) f (t T ) and f (t ) f t T / 2
f (t ) (an cos n0t bn sin n0t )
n 1
Quarter‐Wave Symmetry
If a signal has the following properties, it is said to
quarter‐wave symmetric:
• It is half‐wave
half wave symmetric.
symmetric
• It has symmetry (odd or even) about the quarter‐period
point (i.e. at a distance of L/2 from an end or the
centre).
30
Quarter‐Wave Symmetry
Even Quarter-Wave Symmetry
T/2 T/2 T
T/2 T/2
T
Fourier Coefficients for
Even Quarter‐Wave Symmetry
T/2 T/2 T
f (t ) a2 n 1 cos[(
[( 2n 1)0t ]
n 1
8 T /4
a2 n 1
T 0
f (t ) cos[(2n 1)0t ]dt
31
Fourier Coefficients for
Odd Quarter‐Wave Symmetry
T/2 T/2
T
f (t ) b2 n 1 sin[(
i [( 2n 1)0t ]
n 1
8 T /4
b2 n 1
T 0
f (t ) sin[( 2n 1)0t ]dt
Hidden Symmetry
• An asymmetry periodic function:
A
T T
T T
A/2
32
Example
Even Quarter-Wave Symmetry
1
T/2 T/2
T T/4 T/4 T
1
8 T /4 8 T /4
a2 n 1
T
0
f (t ) cos[(2n 1)0t ]dt
T
0
cos[(2n 1)0t ]dt
T /4
8 4
sin[( 2n 1)0t ] (1) n 1
(2n 1)0T 0
(2n 1)
4 1 1
f (t ) cos 0t cos 30t cos 50t
Example
3 5
8 T /4 8 T /4
a2 n 1
T
0
f (t ) cos[(2n 1)0t ]dt
T
0
cos[(2n 1)0t ]dt
T /4
8 4
sin[( 2n 1)0t ] (1) n 1
(2n 1)0T 0
(2n 1)
33
Example
Odd Quarter-Wave Symmetry
1
T/2 T/2
T T/4 T/4 T
1
8 T /4 8 T /4
b2 n 1
T
0
f (t ) sin[( 2n 1)0t ]dt
T
0
sin[( 2n 1)0t ]dt
T /4
8 4
cos[(2n 1)0t ]
(2n 1)0T 0
(2n 1)
4 1 1
f (t ) sin 0t sin 30t sin 50t
Example
3 5
8 T /4 8 T /4
b2 n 1
T
0
f (t ) sin[( 2n 1)0t ]dt
T
0
sin[( 2n 1)0t ]dt
T /4
8 4
cos[(2n 1)0t ]
(2n 1)0T 0
(2n 1)
34
Fourier Series of Square Wave
T 4
f t sin k t dt ,
8
bk 0 for k odd
T 0
t
f t
4 1
k sin 2k T
n 1
Triangle Wave
4 cos x cos 3x cos 5 x
2
2 1 3 2
5 2
yes no
Even symmetry
Odd symmetry
Half-wave symmetry
Quarter-wave symmetry
35
Right Triangular Wave
sin x sin 2 x sin 3 x
2
1 2 3
yes no
Even symmetry
Odd symmetry
Half-wave symmetry
Quarter-wave symmetry
Saw Tooth Wave
sin x sin 2 x sin 3 x
2
1 2 3
yes no
Even symmetry
Odd symmetry
Half-wave symmetry
Quarter-wave symmetry
36
Example 1 – Fourier series
• Find the Fourier series for:
1 2 x 1
f ( x) 1 1 x 1
1 1 x 2
f ( x 4) f ( x )
Fundamental
range
Period = 4
Example 1 – Fourier series
• We can use the area under the
curve to find
t fi d a0
area -1 2 -1
a0 0
period 4
The function is even so:
bn 0
37
Example 1 – Fourier series
• All we have to find is:
T
2nx nx
2 2
2 1
an
T f ( x) cos
T T
dx an
2 2
f ( x) cos
2
dx
2
nx
2
an f ( x) cos dx
0 2
nx nx
1 2
an 1cos dx 1cos dx
0 2 1 2
Example 1 – Fourier series
• Evaluate the integrals:
nx nx
1 2
an 1 cos dx 1 cos dx
0 2 1 2
1 2
2 nx 2 nx
an sin sin
n 2 0 n 2 1
n 2 n
sin 0 sin n
2 2 2
an sin sin
n 2 n n n 2
0 n even
4 n a 4 1 ,1, 5, 9
an sin
n n
n
2
1 , 3, 7,11
38
Example 1 – Fourier series
• So the Fourier coefficients for:
1 2 x 1
f ( x) 1 1 x 1 Fundamental
1 1 x 2 range
f ( x 4) f ( x )
Period = 4
are:
0 n even
4
bn a0 0, an 1 ,1, 5, 9 Answer!
n
1 , 3, 7,11
Example 2 – Fourier series
• Find the Fourier series for:
x x 2
f ( x) x x
2 2
x
x
2
f ( x 2 ) f ( x)
Period = 2π
Fundamental
range
39
Example 2 – Fourier series
• The function is odd so:
a0 0
an 0
T
2nx
2
2
bn
T T f ( x ) sin
T
dx
2
Example 2 – Fourier series
• Both f (x) and sine are odd, so their
product is even:
d ti
T T
2nx 2nx
2
2 42
bn
T T f ( x) sin T dx bn T 0 f ( x) sin T dx
2
x x
2
22
f ( x) x x bn x sin nx dx x sin nx dx
2 2 0
x
x 2
2
40
Example 2 – Fourier series
• Now we will have to use integration by parts on
both integrals:
both integrals:
2
x sin nx dx x sin nx dx
2
bn
b b 0
a a
2
x cosnx 2 cosnx
2 2
x sin nx dx n dx
0 n 0 0
n 0 cos0 sin nx 2
cos
2 n 0
2
2n n
Example 2 – Fourier series
• Now we will have to use integration by parts on
both integrals:
both integrals:
2
x sin nx dx x sin nx dx
2
bn
b b 0
n sin nx 2
cos
2 n 0
2
2n
n 1 n 1
cos 2 sin 2 sin 0
2n 2 n 2 n
2
n 1 n
x sin nx dx cos 2 sin
0
2n 2 n 2
41
Example 2 – Fourier series
• Now we find the second integral:
22
x cosnx cosnx
x sin nx dx 1 dx
n
n
2
2 2
Example 2 – Fourier series
• Now we find the second integral:
22
n 1 n
cos 2 sin n sin
2n 2 n 2
n 1 n
x sin nx dx 2n cos
sin
2 n2 2
2
42
Example 2 – Fourier series
• So our two integrals are:
2
n 1 n
x sin nx dx 2n cos
0
2
2 sin
n 2
n 1 n
x sin nx dx 2n cos 2 n 2 sin 2
2
Substituting:
22
bn x sin nx dx x sin nx dx
0
2
2 n 1 n n 1 n
bn cos sin cos 2 sin
2n 2 n 2 2 2n 2 n 2
Example 2 – Fourier series
• This gives us our final coefficient:
2 1 n 1 n
bn 2 sin 2 sin
n 2 n 2
4 n
bn sin
n 2 2
0 n even
4
bn 2 1 ,1, 5, 9
n
1 , 3, 7,11
43
Partial Sums
• The Fourier series gives the exact value of the function.
• In practice we cannot add up an infinite number of
terms.
• Instead we =can evaluate the partial sums of a Fourier
series by only evaluating a set number of the terms.
N
2nx 2nx
f ( x) S N a0 an cos bn sin
i
n 1 T T
Example 1 – Partial Sums
• Looking at the square wave
example from above:
l f b
1 2 x 1
f ( x) 1 1 x 1
1 1 x 2
f ( x 4) f ( x )
Fundamental
range f (x) : even
a0 0
bn 0
Period = 4
0 n even
4
an 1 ,1, 5, 9
n
1 , 3, 7,11
44
Example 1 – Partial Sums
• This gives the formula for the
partial sums:
ti l
n N
2nx 2nx
S N x a0 an cos bn sin
n 1 T T
n N
2nx 2nx
S N x 0 an cos 0 sin
n 1 4 4
n N
nx
S N x an cos
n 1 2
Example 1 – Partial Sums
• Calculating some of the partial sums:
0 n even
n N
nx 4
S N x an cos an 1 ,1, 5, 9
n 1 2 n
1 , 3, 7,11
1 x 4 x
S1 x
4
1 cos cos
2 2
x 4 2x 4 3x
S3 x
4
cos 0 cos 1 cos
2 2 2 3 2
x 4 3x
S3 x
4
cos cos
2 3 2
45
Example 1 – Partial Sums
• Calculating some of the partial sums:
0 n even
n N
nx 4
S N x an cos an 1 ,1, 5, 9
n 1 2 n
1 , 3, 7,11
x 4 2x 4 3x
S5 x
4
cos 0 cos 1 cos
2 2 2 3 2
4 4x 4 5x
0 cos 1 cos
4 2 5 2
x 4 3x 4 5x
S5 x
4
cos cos cos
2 3 2 5 2
Example 1 – Partial Sums
• Compare the plots of the partial
sums with the original function:
N 1 N 3
N 5 N 11
46
Example 1 – Partial Sums
• Compare the plots of the partial
sums with the original function:
ith th i i l f ti
N 100 N 1000
Example 2 – Partial Sums
• Calculate the partial sums for a
“
“sawtooth” function:
t th” f ti
x x
2
f ( x) x x
2 2
x
Period = 2π x
2
Fundamental f ( x 2 ) f ( x)
range
g
f (x) : odd
a0 0
an 0
0 n even
4
bn 1 ,1, 5, 9
n 2
1 , 3, 7,11
47
Example 2 – Partial Sums
• This gives the formula for the
partial sums:
ti l
n N
2nx 2nx
S N x a0 an cos bn sin
n 1 T T
n N
2nx 2nx
S N x 0 0 cos bn sin
n 1 2 2
n N
S N x bn sin nx
n 1
Example 2 – Partial Sums
• Calculating some of the partial
sums:
0 n even
n N 4
S N x bn sin nx bn 1 ,1, 5, 9
n 2
1 , 3, 7,11
n 1
S1 x sin x
4
48
Example 1 – Partial Sums
• Compare the plots of the partial
sums with the original function:
N 1 N 3
N 9 N 25
F i S i
Fourier Series
Complex Form of
the Fourier Series
the Fourier Series
49
Harmonics
a0
f (t ) an cos n t bn sin nt
2 n 1 n 1
a
0 (an cos nt bn sin nt )
2 n 1
0 an2 bn2 sin nt
a an bn
cos nt
2
an bn an2 bn2
2 n 1 2
a0
an2 bn2 cos n cos nt sin n sin nt
2 n 1
C0 Cn cos(nt n )
n 1
Amplitudes and Phase Angles
f (t ) C0 Cn cos(nt n )
n 1
a0
C0
2 b
n tan 1 n
Cn an2 bn2 an
50
Complex Exponentials
e jn0t cos n0t j sin n0t
cos n0t
2
1 jn0t
e e jn0t
sin n0t
2j
e
1 jn0t j
e jn0t e jn0t e jn0t
2
Complex Form of the Fourier Series
a0
f (t ) an cos n0t bn sin n0t
2 n 1 n 1
a0 1
j
an e jn0t e jn0t bn e jn0t e jn0t
2 2 n 1 2 n 1
a0 1 1
(an jbn )e jn0t ( an jbn )e jn0t
2 n 1 2 2 a0
c0
2
c0 cn e jn0t c n e jn0t
1
n 1 cn (an jbn )
2
1
c n (an jbn )
2
51
Complex Form of the Fourier Series
f (t ) c0 cn e jn0t c n e jn0t
n 1
1
c0 cn e jn0t
cn e jn0t
n 1 n
a0
c0
c e n
jn0t 2
1
n cn (an jbn )
2
1
c n (an jbn )
2
Complex Form of the Fourier Series
a0 1 T /2
c0
2 T T / 2
f (t )dt
1
cn (an jbn )
2
f (t ) sin n0tdt
1 T /2 T /2
f (t ) cos n0tdt j
T T / 2 T /2
1 T /2 a0
f (t )(cos n0t j sin n0t )dt c0
T T / 2 2
1 T /2 1
f (t )e jn0t dt cn (an jbn )
T T / 2 2
1
1 1 T /2
c n (an jbn )
c n
2
(an jbn )
T T / 2
f (t )e jn0t dt
2
52
Complex Form of the Fourier Series
a0
c0
f (t ) c e
n
n
jn0t
2
1
cn (an jbn )
1 T /2 2
cn
T T / 2
f (t )e jn0t dt 1
c n (an jbn )
2
cn | cn | e jn , c n cn* | cn | e jn
If f(t) is real,
1 2
| cn || c n | an bn2
c n c *
n
2 n 1,2,3,
b
n tan 1 n c0
1
a0
an 2
Complex Frequency Spectra
phase
n spectrum
53
Example
f(t)
A
t
T T d d T
T
2 2 2 2
A 1
A d / 2 jn0t (2 j sin n0 d / 2)
T d / 2
cn e dt
T jjn0
d /2 A 1
A 1 1 sin n0 d / 2
e jn0t T 2 n0
T jn0 d / 2
nd
sin
A 1 1
Ad T
e jn0 d / 2 e jn0 d / 2 T nd
T jn0 jn0
T
Example
A/5
nd 1 1 d 1
sin d , T ,
cn
Ad T 20 4 T 5
T nd 2
0 8
T T
54
Example
A/10
nd 1 1 d 1
sin d , T ,
cn
Ad T 20 2 T 5
T nd 2
0 4
T T
Example
f(t)
A
t
T
0 d T
A 1
A d jn0t (1 e jn0 d )
T 0
cn e dt
T jjn0
d A 1 jn0 d / 2 jn0 d / 2 jn0 d / 2
A 1 e (e e )
e jn0t T jn0
T jn0 0
nd
sin
A 1 1
Ad T e jn0 d / 2
e jn0 d T nd
T jn0 jn0
T
55
Fourier Series Simulation
Using MATLAB
an f (t ) cosnt dt
2 T
T 0
bn f (t ) sinnt dt
2 T
T 0
56
• clear
• for i=1:1:360
• if(i
if(i<=180) )
• ft(i)=1;
• else
• ft(i)=‐1;
• end
• end
• clear
• for i=1:1:360
• if(i<=180)
• ft(i)=1;
• else
• ft(i)=‐1;
• end
• xaxis(i)=i;
i (i) i
• End
• plot(xaxis,ft)
57
• x=2*pi/360; nharm=21;
• for nh=1:1:nharm
• y=nh*x; an=0; bn=0;
• for kh=1:1:360
• an=an+2/360*ft(kh)*cos(kh*y);
• bn=bn+2/360*ft(kh)*sin(kh*y);
• end
• cn(nh)=sqrt(an*an+bn*bn);
• thetan(nh)=atan(an/bn)*180/pi;
• end
• % 2/T * f(t)[height] * cos(n w t) * 1[width]
• %
% n w t = kh
t kh y = kh
kh nhh x = kh
kh nh
h 2 pi /360
2 i /360
• % n (w t) = nh (kh 2 pi /360)
• cnprint=cn,
• thetanprint=thetan,
• plot(xaxis,ft),pause
• clear
• for i=1:1:360
• if(i<=180)
• ft(i)=1;
• else
• ft(i)=‐1;
• end
• xaxis(i) i;
xaxis(i)=i;
• end
• x=2*pi/360; nharm=21;
• for nh=1:1:nharm
• y=nh*x; an=0; bn=0;
• for kh=1:1:360
• an=an+2/360*ft(kh)*cos(kh*y);
• bn=bn+2/360*ft(kh)*sin(kh*y);
• end
• c ( ) sq t(a a b b );
cn(nh)=sqrt(an*an+bn*bn);
• thetan(nh)=atan(an/bn)*180/pi;
• xhar(nh)=nh;
• end
• cnprint=cn,
• thetanprint=thetan,
• plot(xaxis,ft),pause
• plot(xhar,cn)
58
Inverse Fourier Transform
• for i=1:1:360
• fti(i)=0;
• for nh=1:1:nharm
• fti(i)=fti(i)+an(nh)*cos(nh*i*pi/180)+
b ( h)* i ( h*i* i/180)
bn(nh)*sin(nh*i*pi/180);
• end
• end
Total Harmonic Distortion (THD)
• The most commonly used power quality measure
• It is defined as the ratio of the root‐mean square
of the harmonic content to the root‐mean square
value of the fundamental quantity. Frequently the
THD is expressed in percent
(for voltage)
(for current)
V 2 V 3 V 4 V 5 ...
2 2 2 2
THD
V1
I I I ...
2 2 2 2
I
2 3 4 5
I1
59