Introduction to Digital Logic

Download Report

Transcript Introduction to Digital Logic

Advanced Digital Signal Processing
Prof. Nizamettin AYDIN
[email protected]
http://www.yildiz.edu.tr/~naydin
1
Fourier Series Coefficients
2
• Work with the Fourier Series Integral
ak 
1
T0

T0
x (t )e
 j ( 2 k / T0 ) t
dt
0
• ANALYSIS via Fourier Series
– For PERIODIC signals: x(t+T0) = x(t)
– Spectrum from the Fourier Series
3
HISTORY
• Jean Baptiste Joseph Fourier
– 1807 thesis (memoir)
• On the Propagation of Heat in Solid Bodies
– Heat !
– Napoleonic era
•
http://www-groups.dcs.st-and.ac.uk/~history/Mathematicians/Fourier.html
4
5
SPECTRUM DIAGRAM
• Recall Complex Amplitude vs. Freq
1
2
X
4e
*
k
 j / 2
–250
7e
j / 3
10
7e
Xk  Ake
–100
N

x(t )  Xa0   { aXkk e
k 1
4e
j k
0
1
2
 j / 3
100
j 2 f k t
1
2

1
2
X k  ak
j / 2
250
*  j 2 f k t
aXkk e
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
Fourier Series Synthesis
x (t ) 

 ak e
j 2 k f 0 t
k 
ak  X k  Ak e
1
2
1
2
j k
N
x(t )  A0   Ak cos(2 kf0t   k )
k 1
X k  Ak e
j k
COMPLEX
AMPLITUDE
8
Harmonic Signal (3 Freqs)
a1
a3
a5
T = 0.1
9
SYNTHESIS vs. ANALYSIS
• SYNTHESIS
– Easy
– Given (k,Ak,fk) create
x(t)
• Synthesis can be HARD
– Synthesize Speech so that it
sounds good
• ANALYSIS
– Hard
– Given x(t), extract
(k,Ak,fk)
– How many?
– Need algorithm for
computer
10
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
11
INTEGRAL Property of exp(j)
• INTEGRATE over ONE PERIOD
T0
e
 j ( 2 / T0 ) mt
0
T0
e
0
 j ( 2 / T0 ) mt
T0
T0
 j ( 2 / T0 ) mt
dt 
e
 j 2 m
0
T0

(e  j 2 m  1)
 j 2 m
dt  0
m0
2
0 
T0
12
ORTHOGONALITY of exp(j)
• PRODUCT of exp(+j ) and exp(-j )
0
k



1

j ( 2 / T0 ) t  j ( 2 / T0 ) kt
e
e
dt



T0 0

1 k  
T0
T0
1
j ( 2 / T0 )(   k ) t
e
dt

T0 0
13
Isolate One FS Coefficient
x (t ) 

 ak e
j ( 2 / T0 ) k t
k  
T0
1
T0
 x (t )e
 j ( 2 / T0 )  t
0
1
T0
T0


 j ( 2 / T0 )  t
j
(
2

/
T
)
k
t

j
(
2

/
T
)

t
1 e
0
0

  a
x
(
t
)
e
dt

a
e
dt

k
T0 



k


0
 0
Integralis zero 

T0
1
T0
dt 
 
j ( 2 / T0 ) k t   j ( 2 / T0 )  t
e
ak e
dt
  k
 

0
T0
 ak 
T0
1
T0
 j ( 2 / T0 ) k t
x
(
t
)
e
dt

exceptfor k  
0
14
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
15
FS for a SQUARE WAVE {ak}
1
ak 
T0
T0
 x (t )e
 j ( 2 / T0 ) kt
dt
(k  0)
0
.02
.02
1
 j ( 2 / .04) kt

j
(
2

/
.
04
)
kt
1
ak 
1
e
dt

e
.04(  j 2 k / .04)

0
.04 0
1
1  ( 1)
 j ( ) k

(e
 1) 
(  j 2 k )
j 2 k
k
16
DC Coefficient: a0
1
ak 
T0
1
a0 
T0
T0
 x (t )e
 j ( 2 / T0 ) kt
(k  0)
dt
0
T0
1
x
(
t
)
dt

(
Area
)

T
0
0
.02
1
1
a0 
1
dt

(.
02

0
)

.04 0
.04
1
2
17
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
18
Spectrum from Fourier Series
0  2 /(0.04)  2 (25)
 j
 k

ak   0

 12

k  1,3,
k  2,4,
k 0
19
Fourier Series Integral
• HOW do you determine ak from x(t) ?
ak 
T0
1
T0
 x (t )e
0
a0  T1
0
T0
 j ( 2 / T0 ) k t
dt
Fundamental Frequency f0  1 / T0
x
(
t
)
dt

*
ak  ak
when x(t ) is real
(DC component)
0
20
Fourier Series & Spectrum
21
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 
22
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
23
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
24
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
25
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
26
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
27
Fourier Series Synthesis
• 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
28
Fourier Series Synthesis
29
Synthesis: 1st & 3rd Harmonics
1 2
2

y (t )   cos( 2 ( 25)t  2 ) 
cos( 2 (75)t  2 )
2 
3
30
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
31
Fourier Synthesis
1 2
2
x N (t )   sin(0t ) 
sin( 30t )  
2 
3
32
Gibbs’ Phenomenon
• Convergence at DISCONTINUITY of x(t)
– There is always an overshoot
– 9% for the Square Wave case
33
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
34