Sei sulla pagina 1di 48

Math Review with Matlab:

Fourier
Analysis
Fourier Series

S. Awad, Ph.D.
M. Corless, M.S.E.E.
D. Cinpinski
E.C.E. Department
University of Michigan-Dearborn
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Fourier Series
Periodic Signal Definition
Fourier Series Representation of Periodic Signals
Fourier Series Coefficients
Orthogonal Signals
Example: Orthogonal Signals
Example: Full Wave Rectifier
Complex Exponential Representation
Example: Finding Complex Coefficients
Magnitude and Phase Spectra of Fourier Series
Parsevals Theorem
2
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

What is a Periodic Signal ?


A Periodic Signal is a signal that repeats itself every period

The Period of a signal is the amount of time it takes for a


given signal to complete one cycle.

For example, the normal U.S. AC from wall outlet has a


sine wave with a peak voltage of 170 V (110 Vrms)

3
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

General Sinusoid
A general cosine wave, v(t), has the form:

v(t ) M cos(t )
M = Magnitude, amplitude, maximum value
= Angular Frequency in radians/sec (=2pF)
F = Frequency in Hz
T = Period in seconds (T=1/F)
t = Time in seconds
= Phase Shift, angular offset in radians
4
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

General Sinusoid
Amplitude = 5
Plot in Blue:

5 sin( 2p (60)t )
p/2 Phase Shift

Plot in Red: 1 Period = 1/60 sec.

p = 16.67 ms.
5 sin( 2p (60)t )
2

5
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

AC Wall Voltage Sine Wave


1 Period

1 Period

6
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Represent Periodic Signals


For a general periodic signal x(t)
shown to the right: x(t)
x(t+nT) = x(t) for all ... ...
-T/2 T/2 T t

where n is any integer, i.e. n = 0, 1, 2,

7
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Frequency of Periodic Signals


The frequency of a signal is defined as the 1
inverse of the period and has the unit fo
number of cycles/sec. T

T is the period and fo is the fundamental frequency.

The frequency of a US standard outlet is 1/T = 60 Hz

8
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

What is Fourier Series ?


Fourier Series is a technique developed by J. Fourier.

This technique (studied by Fourier) allows us to represent


periodic signals as a summation of sine functions of
different frequency, amplitude, and phase shift.

9
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Represent a Square Wave


Represent the
Square Wave at
the right using
Fourier Series

Notice that as
more and more
terms are summed,
the approximation
becomes better

10
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Fourier Series Representation


of Periodic Signals
Any periodic function can be represented in terms of sine
and cosine functions:

x(t ) a0 a1 cos ot a2 cos 2 ot ...


b1 sin ot b2 sin 2 ot ...
This can also be written as:

x(t ) a0 (an cos n ot bn sin n ot )
n 1
11
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Fourier Series Coefficients



x(t ) a0 (an cos n ot bn sin n ot )
n 1

The above
a0,an, and bn are known as the Fourier Series
Coefficients.
These coefficients are calculated as follows.

12
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Calculating the a0 Coefficient


ao, the coefficient outside the summation, is known
as the average value or the dc component
ao is calculated as follows:

T 2
1
ao
T x(t )dt
T 2

13
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Calculating the an and bn


Coefficients
The an and bn coefficients are calculated as follows:

T 2
2
an x(t ) cos( n ot )dt , n = 1, 2,
T T 2
T 2
2
bn x(t ) sin( n ot )dt , n = 1, 2,
T T 2
14
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Orthogonal Signals
Two periodic signals g1(t) and g2(t) are said to be
Orthogonal if the the integral of their product over one
period is equal to zero.

T /2

g1(t ) g 2(t )dt 0


T / 2

15
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Example: Orthogonal Signals


Show that the T /2
following signals are
orthogonal:
g (t ) g (t )dt
T / 2
1 2

T /2
g1(t) sin(t)
g2(t) cos(t)
sin( t ) cos(t )dt
T / 2
T /2
1
2 sin( t ) cos(t ) dt
2 T / 2
16
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Orthogonal Signals
T /2
1
2 sin( t ) cos(t )dt
2 T / 2
1
T /2 T /2
1
sin( 2t )dt
2 T / 2 4
cos( 2t )
T / 2

1
cos(T ) cos(T )
4
0
17
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Example: Full Wave Rectifier


Consider the output of a full-wave rectifier:
x(t) y(t)=|sin(ot)|
y=|x|
y
t x t
T T/2

one period

one period

Note that the rectified wave has a period equal to


one-half of the source wave period. 18
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Function Characteristics
The period of y(t) = T/2 and the fundamental
frequency of y(t) is 2o (rad/sec).

Now bn=0 since y(t) is an even function.

Thus,

y (t ) a0 an cos( 2n ot )
n 1

19
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Finding ao
T 2
1
ao
T
T 2
y (t ) dt

T 2
1
ao
T 2 sin(
0
o t ) dt

T /2
2
ao
T sin(
0
o t ) dt
20
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Finding ao
2
ao cos( ot ) 0
T /2
* Use o = 2pi/T
T o
2 oT
ao cos( ) cos( * 0)
T o
o
2
2p
( )T
2 T
ao cos( ) 1
2p 2
T( )
T 21
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Finding ao
1
ao cos(p ) 1
p
1
ao 1 1
p
2
ao
p
22
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Finding an, n = 1, 2, .
T 2
2
T T 2
an y (t ) cos( n o t ) dt ,

T 4
2
T 2 T 4
an sin( o t ) cos( 2 n o t ) dt

T 4
4
(2) sin( o t ) cos( 2n ot )dt
T 0
23
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Solution for an, n = 1, 2, .


T 4
8 1
an sin (2n 1) ot sin (2n 1) ot dt
T 0 2
4 cos(2n 1) ot T 4 cos(2n 1) ot T 4
a n
T (2n 1) o 0 (2n 1) o 0

4 1 1

T (2n 1) o (2n 1) o
4 1 1

2p (2n 1) (2n 1) 24
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Solution for an, n = 1, 2, .


So: 2 2 4
a n 2

p 4n 1 p 4n 1
2

Thus:

4 1
y (n) cos2 ot cos4 ot cos6 ot ...
2 1 1
p p 3 15 35

Note: We can only obtain an output signal with a


nonzero average value by using a nonlinear system
with our zero average value input signal 25
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Eulers Identity
j
Me M cos( ) jM sin( )
We could also say:
j
e cos( ) j sin( )
and ...
j ( )
e cos( ) j sin( )
j
e cos( ) j sin( )
26
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Representing Sin and Cos


with Complex Exponentials
j j
e cos( ) j sin( ) e cos( ) j sin( )
Add the equations: Subtract the
equations:
j j
j
e e j
2 cos( ) e e 2 j sin( )
j j
e e j j
e e
cos( ) sin( )
2 2j
27
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Complex Exponential
Representation
The Sine and Cosine functions can be written
in terms of complex exponentials.

cos n ot e
2

1 jn ot jn ot
e
sin n ot
j2

1 jnot jnot
e e
28
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Complex Exponential Fourier Series


From previous slides

x(t ) a0 (an cos n ot bn sin n ot )
n 1

sin n ot
j2
1

e jnot e jnot
2

cos n ot e jn ot e jn ot
1

Using the Complex Exponential representation of Sine and
Cosine, the Fourier series can be written as:

1 jnot jnot 1 jnot jnot




x(t ) a0 an e e bn e e
n 1 2 2 j
29
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Fourier Series with


Complex Exponentials
1 jnot jnot 1 jnot jnot


x(t ) a0 an e e bn e e
n 1 2 2 j
Noting that 1/j = -j, we can write:



1 jn ot j jn ot jn o t
x(t ) a0 an e e jn o t
bn e e
n 1 2 2

1 jn o t
x(t ) a0 an jbn e an jbn e
jn o t 1

n 1 2 2
30
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Fourier Series with


Complex Exponentials
Make the following substitutions:
1 1
c0 a0 , cn (an jbn ), c n (an jbn )
2 2

1 jn o t
x(t ) a0 an jbn e an jbn e
jn o t 1

n 1 2 2



x(t ) c0 cn e jn ot c n e jn ot
n 1

x(t ) c0 cn e jn o t
cn e jn o t
x(t ) n
c e jn o t

n
n 1 n 1 31
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Fourier Series with


Complex Exponentials
The Complex Fourier series can be written as:
T 2
1
x(t ) c e
n
n
jn o t
cn x
T T 2
(t ) e jn 0t
dt

where:
Complex cn
*Complex conjugate
Note: if x(t) is real, c-n = cn*
32
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Line Spectra
Line Spectra refers the plotting of discrete coefficients
corresponding to their frequencies
For a periodic signal x(t), cn, n = 0, 1, 2, are
uniquely determined from x(t).
The set cn uniquely determines x(t)
Because cn appears only at discrete frequencies,
n(o, n = 0, 1, 2, the set cn is called the discrete
frequency spectrum or line spectrum of x(t).

33
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Line Spectra
The Cn coefficients are in general complex.

The standard practice is to make 2 2D plots.


Plot 1: Magnitude of Coefficient vs. frequency
Plot 2: Phase of Coefficient vs. frequency

34
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Magnitude of Cn
Recall that the magnitude for a complex number a+jb is
calculated as follows:

a jb a b 2 2

35
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Phase of Cn
Recall that the phase for a complex number a+jb depends
on the quadrant that the angle lies in.

Angle(a+jb) =
Quadrant 1: Quadrant 2:
b
1 b p Tan
1
Tan
a a
Quadrant 3: Quadrant 4:
b b
p Tan 1
Tan
1

a a 36
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Amplitude Spectrum of Cn
Note: If x(t) is real then |Cn| is
of even symmetry. cn cn

cn

2 o o o 2 o (rad sec)

37
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Phase Spectrum of Cn
Note: If x(t) is real then the

Phase of Cn is odd
cn cn

cn

2 o o o 2 o (rad sec)

38
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Example: Finding Complex


Coefficients
x(t)

-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 t


Consider the periodic signal x(t) with period T = 2 sec.
Thus:

2p rad 2p rad rad


o p
T sec 2 sec sec
39
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Finding Co(avg)
The area under x(t) from -1 to -.5 and from .5 to 1 is zero.
0 0

1
1
1 0.5 0.5 1

Co ( avg ) x(t )dt x(t )dt x(t )dt x(t )dt
2 1 2 1 0.5 0.5
0.5
dt t 0.5 (0.5) 0.5
1 1 0.5 1
0.5
2 0.5 2 2

Co(avg) = 0.5
40
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Calculating Cn
p
T /2
1
x(t )e
jn o t
Cn dt sin n
T T / 2
Cn 2
,n0
1
1
np
x(t )e jn ot dt
2 1
0.5 0.5 0.5
1 1 1
e jn o t
dt e jn o t
dt e jn ot dt
2 0.5 2 0.5 2 0.5
0.5
1
0 e jn ot dt 0
2 0.5
n n
1 j 20 j 0
e e 2
j 2 0 n 41
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Factor Evaluation
Now it can be shown that:
sin(np/2) = 0 for n = 2, 4, Cn = 0
sin(2p/2) = sin(p) = 0

sin(-4p/2) = sin(-2p) = 0

etc .

It can be also be shown that:


sin(np/2) = -1 for n = 3, 7, 11,
sin(np/2) = 1 for n = 1, 5, 9,
sin(3p/2) = -1

sin(-7p/2) = 1

etc .

42
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Factor Evaluation
Recall: p
sin n Co(avg) = 0.5
Cn 2
,n0
np
Cn 0, n 2,4, etc...
signum(n)
Cn , n 1,5,9,...
n
signum( n)
Cn , n 3,7,11,...
n
43
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Summary of Results
Note: Cn=p if Cn is negative
Therefore:

1
| n | p , n odd p , n 3, 7, 11 ...
and C
Cn .5 n0 n
0 , n even & n 0 0
, otherwise

44
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Plot the Magnitude Response

45
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Plot the Phase Response

46
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

What is Parsevals Theorem ?


Parsevals Theorem states that the average power of a
periodic signal x(t) is equal to the sum of the squared
amplitudes of all the harmonic components of the signal
x(t).

This theorem is excellent for determining the power


contribution of each harmonic in terms of its coefficients

47
Fourier Analysis: Fourier Series
Math Review with Matlab U of M-Dearborn ECE Department

Parsevals Theorem
Average power of x(t) is calculated from the time
or frequency domain by:
Time Domain:
T 2
1 1
x(t ) dt ao (an bn )
2 2 2 2
Pavg
T T 2 2 n 1
Frequency Domain:

Pavg c c 2 cn
2 2 2
n o
n n 1
48

Potrebbero piacerti anche