0% found this document useful (0 votes)
58 views

Signal Processing First: Periodic Signals, Harmonics & Time-Varying Sinusoids

Uploaded by

Berkay Özerbay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Signal Processing First: Periodic Signals, Harmonics & Time-Varying Sinusoids

Uploaded by

Berkay Özerbay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Signal Processing First

Lecture 5
Periodic Signals, Harmonics
& Time-Varying Sinusoids

2/9/2015 © 2003, JH McClellan & RW Schafer 1


READING ASSIGNMENTS
 This Lecture:
 Chapter 3, Sections 3-2 and 3-3
 Chapter 3, Sections 3-7 and 3-8

 Next Lecture:
 Fourier Series ANALYSIS
 Sections 3-4, 3-5 and 3-6

2/9/2015 © 2003, JH McClellan & RW Schafer 3


Problem Solving Skills

 Math Formula  Plot & Sketches


 Sum of Cosines  S(t) versus t
 Amp, Freq, Phase  Spectrum

 Recorded Signals  MATLAB


 Speech  Numerical
 Music  Computation
 No simple formula  Plotting list of
numbers

2/9/2015 © 2003, JH McClellan & RW Schafer 4


LECTURE OBJECTIVES
 Signals with HARMONIC Frequencies
 Add Sinusoids with fk = kf0
N
x(t )  A0   Ak cos(2 kf0t   k )
k 1
FREQUENCY can change vs. TIME

x(t) = cos(at )
Chirps: 2

Introduce Spectrogram Visualization (specgram.m)


(plotspec.m)
2/9/2015 © 2003, JH McClellan & RW Schafer 5
SPECTRUM DIAGRAM

 Recall Complex Amplitude vs. Freq


1 X k 10 1 X k  ak
2 j / 3  j / 3 2
7e 7e
 j / 2 j / 2
4e j k
4e
X k  Ak e
–250 –100 0 100 250
f (in Hz)

x(t )  10  14 cos(2 (100)t   / 3)


 8 cos(2 (250)t   / 2)
2/9/2015 © 2003, JH McClellan & RW Schafer 6
SPECTRUM for PERIODIC ?
 Nearly Periodic in the Vowel Region
 Period is (Approximately) T = 0.0065 sec

2/9/2015 © 2003, JH McClellan & RW Schafer 7


PERIODIC SIGNALS

 Repeat every T secs


 Definition
x (t )  x (t  T )
 Example:
T ?
x(t) = cos(3t)

 Speech can be “quasi-periodic”

2/9/2015 © 2003, JH McClellan & RW Schafer 8


Period of Complex Exponential
j t
x (t )  e
x (t  T )  x (t ) ? Definition: Period is T

j ( t T ) j t
e e e j 2 k  1
jT
e  1  T  2 k
2 k  2 
    k   0k k = integer

2/9/2015
T T 
© 2003, JH McClellan & RW Schafer 9
Harmonic Signal Spectrum

Periodic signal can only have : f k  k f0


N
x (t )  A0   Ak cos(2 kf0t   k )
1
k 1 f0 
j k T
X k  Ak e

 
N
x (t )  X 0   1
2
X ke j 2 kf0t
 1
2
  j 2 kf0t
Xke
k 1
2/9/2015 © 2003, JH McClellan & RW Schafer 10
Define FUNDAMENTAL FREQ
N
x(t) = A0 + å Ak cos(2p kf0 t + fk )
k=1

fk = kf0 (w 0 = 2p f0 ) 1
f0 
T0
f0 = fundamental Frequency
T0 = fundamental Period
2/9/2015 © 2003, JH McClellan & RW Schafer 11
Harmonic Signal (3 Freqs)

3rd
5th

What is the fundamental frequency? 10 Hz

2/9/2015 © 2003, JH McClellan & RW Schafer 12


POP QUIZ: FUNDAMENTAL
 Here’s another spectrum:
10
j / 3  j / 3
7e 7e
 j / 2 j / 2
4e 4e

–250 –100 0 100 250


f (in Hz)

What is the fundamental frequency?

2/9/2015 © 2003, JH McClellan & RW Schafer 13


IRRATIONAL SPECTRUM

SPECIAL RELATIONSHIP
to get a PERIODIC SIGNAL

2/9/2015 © 2003, JH McClellan & RW Schafer 14


Harmonic Signal (3 Freqs)
T=0.1

2/9/2015 © 2003, JH McClellan & RW Schafer 15


NON-Harmonic Signal

NOT
2/9/2015 © 2003, JH McClellan & RW Schafer PERIODIC
16
FREQUENCY ANALYSIS
 Now, 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

2/9/2015 © 2003, JH McClellan & RW Schafer 17


Time-Varying
FREQUENCIES Diagram
Frequency is the vertical axis

A-440

Time is the horizontal axis


2/9/2015 © 2003, JH McClellan & RW Schafer 18
SIMPLE TEST SIGNAL
 C-major SCALE: stepped frequencies
 Frequency is constant for each note

IDEAL

2/9/2015 © 2003, JH McClellan & RW Schafer 19


R-rated: ADULTS ONLY
 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)

2/9/2015 © 2003, JH McClellan & RW Schafer 20


SPECTROGRAM EXAMPLE
 Two Constant Frequencies: Beats

cos(2 (660)t ) sin(2 (12)t )

2/9/2015 © 2003, JH McClellan & RW Schafer 21


AM Radio Signal
 Same as BEAT Notes
cos(2 (660)t ) sin(2 (12)t )
1
2
e j 2 ( 660 ) t
 e  j 2 ( 660) t  e
1
2j
j 2 (12 ) t
 e  j 2 (12 ) t 
1
4j
e j 2 ( 672 ) t
e  j 2 ( 672) t
e j 2 ( 648) t
e  j 2 ( 648) t

1 cos(2 (672)t  2 )  12 cos(2 (648)t  2 )
2

2/9/2015 © 2003, JH McClellan & RW Schafer 22


SPECTRUM of AM (Beat)
 4 complex exponentials in AM:

1
4
e j / 2 1
4
e j / 2 1
4
e j / 2 1
4
e j / 2

–672 –648 0 648 672


f (in Hz)

What is the fundamental frequency?

648 Hz ? 24 Hz ?
2/9/2015 © 2003, JH McClellan & RW Schafer 23
STEPPED FREQUENCIES
 C-major SCALE: successive sinusoids
 Frequency is constant for each note

IDEAL

2/9/2015 © 2003, JH McClellan & RW Schafer 24


SPECTROGRAM of C-Scale
Sinusoids ONLY

From SPECGRAM
ANALYSIS PROGRAM

ARTIFACTS at Transitions

2/9/2015 © 2003, JH McClellan & RW Schafer 25


Spectrogram of LAB SONG

Sinusoids ONLY
Analysis Frame = 40ms
ARTIFACTS at Transitions

2/9/2015 © 2003, JH McClellan & RW Schafer 26


Time-Varying Frequency
 Frequency can change vs. time
 Continuously, not stepped
 FREQUENCY MODULATION (FM)

x(t )  cos(2 f c t  v(t ))


VOICE
 CHIRP SIGNALS
 Linear Frequency Modulation (LFM)

2/9/2015 © 2003, JH McClellan & RW Schafer 27


New Signal: Linear FM

 Called Chirp Signals (LFM)


QUADRATIC
 Quadratic phase

x(t )  A cos( t  2 f0 t   )
2

 Freq will change LINEARLY vs. time


 Example of Frequency Modulation (FM)
 Define “instantaneous frequency”

2/9/2015 © 2003, JH McClellan & RW Schafer 28


INSTANTANEOUS FREQ
 Definition
x(t )  A cos( (t ))
Derivative
 i (t )  dt
d  (t )
of the “Angle”

 For Sinusoid:
x(t )  A cos(2 f 0t   )
 (t )  2 f 0t   Makes sense

 i ( t )  d  (t )
dt
 2 f 0
2/9/2015 © 2003, JH McClellan & RW Schafer 29
INSTANTANEOUS FREQ
of the Chirp

 Chirp Signals have Quadratic phase


 Freq will change LINEARLY vs. time

x(t )  A cos( t   t   ) 2

  (t )   t   t  
2

 i (t )  d  (t )  2 t  
dt
2/9/2015 © 2003, JH McClellan & RW Schafer 30
CHIRP SPECTROGRAM

2/9/2015 © 2003, JH McClellan & RW Schafer 31


CHIRP WAVEFORM

2/9/2015 © 2003, JH McClellan & RW Schafer 32


OTHER CHIRPS

 (t) can be anything:

x(t )  A cos( cos(  t )   )


 i (t )  d
dt
 ( t )   sin(  t )
 (t) could be speech or music:
 FM radio broadcast

2/9/2015 © 2003, JH McClellan & RW Schafer 33


SINE-WAVE FREQUENCY
MODULATION (FM)

Look at CD-ROM Demos in Ch 3

2/9/2015 © 2003, JH McClellan & RW Schafer 34

You might also like