digital signal processing

34
1 Prof. Nizamettin AYDIN naydin @ yildiz .edu.tr http://www.yildiz.edu.tr/~naydin Digital Signal Processing

Upload: adam-rivera

Post on 03-Jan-2016

91 views

Category:

Documents


4 download

DESCRIPTION

Digital Signal Processing. Prof. Nizamettin AYDIN naydin @ yildiz .edu.tr http:// www . yildiz .edu.tr/~naydin. Digital Signal Processing. Lecture 5 Periodic Signals, Harmonics & Time-Varying Sinusoids. READING ASSIGNMENTS. This Lecture: Chapter 3, Sections 3-2 and 3-3 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Digital  Signal Processing

1

Prof. Nizamettin AYDIN

[email protected]

http://www.yildiz.edu.tr/~naydin

Digital Signal Processing

Page 2: Digital  Signal Processing

2

Lecture 5

Periodic Signals, Harmonics & Periodic Signals, Harmonics & Time-Varying SinusoidsTime-Varying Sinusoids

Digital Signal Processing

Page 3: Digital  Signal Processing

4

READING ASSIGNMENTS

• This Lecture:– Chapter 3, Sections 3-2 and 3-3– Chapter 3, Sections 3-7 and 3-8

• Next Lecture:

– Fourier Series ANALYSISFourier Series ANALYSIS– Sections 3-4, 3-5 and 3-6

Page 4: Digital  Signal Processing

5

Problem Solving Skills

• Math Formula– Sum of Cosines

– Amp, Freq, Phase

• Recorded Signals– Speech

– Music

– No simple formula

• Plot & Sketches– S(t) versus t

– Spectrum

• MATLAB– Numerical

– Computation

– Plotting list of numbers

Page 5: Digital  Signal Processing

6

LECTURE OBJECTIVES

• Signals with HARMONICHARMONIC Frequencies– Add Sinusoids with fk = kf0

FREQUENCY can change vs. TIMEChirps:

Introduce Spectrogram Visualization (specgram.m) (plotspec.m)

x(t) cos(t2 )

N

kkk tkfAAtx

100 )2cos()(

Page 6: Digital  Signal Processing

7

SPECTRUM DIAGRAM

• Recall Complex Amplitude vs. Freq

kk aX 21

0 100 250–100–250f (in Hz)

3/7 je 3/7 je2/4 je 2/4 je

10

)2/)250(2cos(8)3/)100(2cos(1410)(

tttx

kjkk eAX

kX2

1

Page 7: Digital  Signal Processing

8

SPECTRUM for PERIODIC ?

• Nearly Periodic in the Vowel Region– Period is (Approximately) T = 0.0065 sec

Page 8: Digital  Signal Processing

9

PERIODIC SIGNALS

• Repeat every T secs– Definition

– Example:

– Speech can be “quasi-periodic”

)()( Ttxtx

)3(cos)( 2 ttx ?T

3T

32T

Page 9: Digital  Signal Processing

10

Period of Complex Exponential

Definition: Period is T

k = integer

tjTtj ee )(

?)()()(

txTtxetx tj

12 kje

kTe Tj 21

kkTT

k0

22

Page 10: Digital  Signal Processing

11

N

k

tkfjk

tkfjk

jkk

N

kkk

eXeXXtx

eAX

tkfAAtx

k

1

2212

21

0

100

00)(

)2cos()(

Harmonic Signal Spectrum

0:haveonly can signal Periodic fkfk

Tf

10

Page 11: Digital  Signal Processing

12

Define FUNDAMENTAL FREQ

00

1

Tf

(shortest) Periodlfundamenta

(largest) Frequencylfundamenta

)2(

)2cos()(

0

0

000

100

T

f

ffkf

tkfAAtx

k

N

kkk

Page 12: Digital  Signal Processing

13

What is the fundamental frequency?

Harmonic Signal (3 Freqs)

3rd5th

10 Hz

Page 13: Digital  Signal Processing

14

POP QUIZ: FUNDAMENTAL

• Here’s another spectrum:

What is the fundamental frequency?

100 Hz ? 50 Hz ?

0 100 250–100–250f (in Hz)

3/7 je 3/7 je2/4 je 2/4 je

10

Page 14: Digital  Signal Processing

15

SPECIAL RELATIONSHIPto get a PERIODIC SIGNAL

IRRATIONAL SPECTRUM

Page 15: Digital  Signal Processing

16

Harmonic Signal (3 Freqs)

T=0.1

Page 16: Digital  Signal Processing

17

NON-Harmonic Signal

NOTPERIODIC

Page 17: Digital  Signal Processing

18

FREQUENCY ANALYSIS

• Now, a much HARDER problemNow, a much HARDER problem• Given a recording of a song, have the

computer write the music

• Can a machine extract frequencies?– Yes, if we COMPUTE the spectrum for x(t)

• During short intervals

Page 18: Digital  Signal Processing

19

Time-Varying FREQUENCIES DiagramF

req

uen

cy i

s th

e ve

rtic

al a

xis

Time is the horizontal axis

A-440

26Ekim2k11

Page 19: Digital  Signal Processing

20

SIMPLE TEST SIGNAL

• C-major SCALE: stepped frequencies– Frequency is constant for each note

IDEAL

Page 20: Digital  Signal Processing

21

SPECTROGRAM

• SPECTROGRAM Tool– MATLAB function is specgram.m– SP-First has plotspec.m & spectgr.m

• ANALYSIS program– Takes x(t) as input &

– Produces spectrum values Xk

– Breaks x(t) into SHORT TIME SEGMENTS • Then uses the FFT (Fast Fourier Transform)

Page 21: Digital  Signal Processing

22

SPECTROGRAM EXAMPLE

• Two Constant Frequencies: Beats

))12(2sin())660(2cos( tt

Page 22: Digital  Signal Processing

23

tjtjj

tjtj eeee )12(2)12(221)660(2)660(2

21

AM Radio Signal

• Same as BEAT Notes

))12(2sin())660(2cos( tt

))648(2cos())672(2cos( 221

221 tt

tjtjtjtjj eeee )648(2)648(2)672(2)672(2

41

Page 23: Digital  Signal Processing

24

SPECTRUM of AM (Beat)

• 4 complex exponentials in AM:

What is the fundamental frequency?

648 Hz ? 24 Hz ?

0 648 672f (in Hz)

–672 –648

2/41 je

2/41 je2/

41 je2/

41 je

Page 24: Digital  Signal Processing

25

STEPPED FREQUENCIES

• C-major SCALE: successive sinusoids– Frequency is constant for each note

IDEAL

Page 25: Digital  Signal Processing

26

SPECTROGRAM of C-Scale

ARTIFACTS at Transitions

Sinusoids ONLY

From SPECGRAMANALYSIS PROGRAM

Page 26: Digital  Signal Processing

27

Spectrogram of LAB SONG

ARTIFACTS at Transitions

Sinusoids ONLY

Analysis Frame = 40ms

Page 27: Digital  Signal Processing

28

Time-Varying Frequency

• Frequency can change vs. time– Continuously, not stepped

• FREQUENCY MODULATION (FM)FREQUENCY MODULATION (FM)

• CHIRP SIGNALS– Linear Frequency Modulation (LFM)

))(2cos()( tvtftx c VOICE

Page 28: Digital  Signal Processing

29

)2cos()( 02 tftAtx

New Signal: Linear FM

• Called Chirp Signals (LFM)

– Quadratic phase

• Freq will change LINEARLY vs. time– Example of Frequency Modulation (FM)– Define “instantaneous frequency”

QUADRATIC

Page 29: Digital  Signal Processing

30

INSTANTANEOUS FREQ

• Definition

• For Sinusoid:

Derivativeof the “Angle”)()(

))(cos()(

tt

tAtx

dtd

i

Makes sense

0

0

0

2)()(

2)()2cos()(

ftt

tfttfAtx

dtd

i

Page 30: Digital  Signal Processing

31

INSTANTANEOUS FREQof the Chirp

• Chirp Signals have Quadratic phase

• Freq will change LINEARLY vs. time

ttt

ttAtx2

2

)(

)cos()(

tttdtd

i 2)()(

Page 31: Digital  Signal Processing

32

CHIRP SPECTROGRAM

Page 32: Digital  Signal Processing

33

CHIRP WAVEFORM

Page 33: Digital  Signal Processing

34

OTHER CHIRPS

(t) can be anything:

(t) could be speech or music:– FM radio broadcast

))cos(cos()( tAtx

)sin()()( ttt dtd

i

Page 34: Digital  Signal Processing

35

SINE-WAVE FREQUENCY MODULATION (FM)