Introduction to Digital Logic

Download Report

Transcript Introduction to Digital Logic

Digital Signal Processing
Prof. Nizamettin AYDIN
[email protected]
http://www.yildiz.edu.tr/~naydin
1
Digital Signal Processing
Lecture 7
Fourier Series & Spectrum
2
READING ASSIGNMENTS
• This Lecture:
– Fourier Series in Ch 3, Sects 3-4, 3-5 & 3-6
• Replaces pp. 62-66 in Ch 3 in DSP First
• Notation: ak for Fourier Series
• Other Reading:
– Next Lecture: Sampling
4
LECTURE OBJECTIVES
• ANALYSIS via Fourier Series
– For PERIODIC signals: x(t+T0) = x(t)
ak 
1
T0

T0
x (t )e
 j ( 2 k / T0 ) t
dt
0
• SPECTRUM from Fourier Series
– ak is Complex Amplitude for k-th Harmonic
5
SPECTRUM DIAGRAM
• Recall Complex Amplitude vs. Freq

ak
4e
 j / 2
–250
7e
j / 3
10
7e
 j / 3
4e
a0
–100
N
0

x(t )  a0   ak e
k 1
ak  Ak e
1
2
100
j 2 f k t
j / 2
250
  j 2 f k t
 ak e
j k
f (in Hz)

6
Harmonic Signal
x (t ) 

 ak e
j 2 k f 0 t
k 
PERIOD/FREQUENCY of COMPLEX EXPONENTIAL:
2
2  f 0   0 
T0
1
or T0 
f0
7
Example
x(t )  sin (3 t )
3
 j  j 9 t   3 j  j 3 t  3 j   j 3 t   j   j 9 t
x ( t )   e

  e

e
e
8
 8 
 8
 8 
8
Example
x(t )  sin (3 t )
3
 j  j 9 t   3 j  j 3 t  3 j   j 3 t   j   j 9 t
x ( t )   e

  e

e
e
8
 8 
 8
 8 
In this case, analysis
just requires picking
off the coefficients.
k  3
ak
k  1
k 1
k 3
9
STRATEGY: x(t)  ak
• ANALYSIS
– Get representation from the signal
– Works for PERIODIC Signals
• Fourier Series
– Answer is: an INTEGRAL over one period
ak 
1
T0

T0
x (t )e
 j 0k t
dt
0
10
FS: Rectified Sine Wave {ak}
T0
1
ak 
T0
ak 
 j ( 2 / T0 ) kt
x
(
t
)
e
dt

( k  1)
0
Half-Wave Rectified Sine
T0 / 2
 j ( 2 / T0 ) kt
2
sin(
t
)
e
dt
 T
1
T0
0
0

T0 / 2

1
T0
0

e j ( 2 / T0 ) t  e  j ( 2 / T0 ) t  j ( 2 / T0 ) kt
e
dt
2j
T0 / 2
1
j 2T0

e  j ( 2 / T0 )( k 1) t dt 
T0 / 2
1
j 2T0
0

e
 j ( 2 / T0 )( k 1) t

e  j ( 2 / T0 )( k 1) t dt
0
T0 / 2

j 2T0 (  j ( 2 / T0 )( k 1))
0
e
 j ( 2 / T0 )( k 1) t
T0 / 2
j 2T0 (  j ( 2 / T0 )( k 1))
0
11
FS: Rectified Sine Wave {ak}
ak 
e

j 2T0 (  j ( 2 / T0 )( k 1))

1
4 ( k 1)

1
4 ( k 1)

T0 / 2
 j ( 2 / T0 )( k 1) t

e
e
k 1 ( k 1)
4 ( k 2 1)
0
 j ( 2 / T0 )( k 1)T0 / 2
 j ( k 1)

1 
e
j 2T0 (  j ( 2 / T0 )( k 1))



0

 1  4 (1k 1) e  j ( 2 / T0 )( k 1)T0 / 2  1
1
4 ( k 1)
e
 j ( k 1)
 0
 1
k
 (1)  1   ?j 4
 1
  ( k 2 1)

T0 / 2
 j ( 2 / T0 )( k 1) t

1
k odd
k  1
k even
12
SQUARE WAVE EXAMPLE
1T
1
0

t


2 0

x (t )  
1T t T
0

0
 2 0
for T0  0.04 sec.
x(t)
1
–.02
0
.01
.02
0.04
t
13
Fourier Coefficients ak
• ak is a function of k
– Complex Amplitude for k-th Harmonic
– This one doesn’t depend on the period, T0
 1

j k
k
1  ( 1)

ak 
 0
j 2 k

1
 2

k  1,3,
k  2,4,
k 0
16
Spectrum from Fourier Series
0  2 /(0.04)  2 (25)
 j
 k

ak   0

 12

k  1,3,
k  2,4,
k 0
17
Fourier Series Synthesis
16Kasim2k11
• HOW do you APPROXIMATE x(t) ?
ak 
T0
1
T0
 x (t )e
 j ( 2 / T0 ) k t
dt
0
• Use FINITE number of coefficients
x (t ) 
N
 ak e
j 2 k f 0 t
ak  ak*
when x(t ) is real
k  N
18
Fourier Series Synthesis
19
Synthesis: 1st & 3rd Harmonics
1 2
2

y (t )   cos( 2 ( 25)t  2 ) 
cos( 2 (75)t  2 )
2 
3
20
Synthesis: up to 7th Harmonic
1 2
2
2
2

y (t )   cos( 50 t  2 ) 
sin(150 t ) 
sin( 250 t ) 
sin( 350 t )
2 
3
5
7
21
Fourier Synthesis
1 2
2
x N (t )   sin(0t ) 
sin( 30t )  
2 
3
22
Gibbs’ Phenomenon
• Convergence at DISCONTINUITY of x(t)
– There is always an overshoot
– 9% for the Square Wave case
23
Fourier Series Demos
• Fourier Series Java Applet
– Greg Slabaugh
• Interactive
– http://users.ece.gatech.edu/mcclella/2025/Fsdemo_Slabaugh/fourier.html
• MATLAB GUI: fseriesdemo
– http://users.ece.gatech.edu/mcclella/matlabGUIs/index.html
24
fseriesdemo GUI
25