# Si gnal Pr oc essi ng Fi r st

LECTURE #1
Si nusoi ds
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 2, pp. 9-17
 Appendix A: Complex Numbers
 Appendix B: MATLAB
 Chapter 1: Introduction
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 4
CONVERGI NG FI ELDS
EE
CmpE
Math
Applications
Physics
Computer
Science
BIO
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 5
COURSE OBJ ECTI VE
 Students will be able to:
 Understand mathematical descriptions of
signal processing algorithms and express
those algorithms as computer
implementations (MATLAB)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 6
WHY USE DSP ?
generalization and discovery of new
processing techniques
 Computer implementations are flexible
 Applications provide a physical context
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 7
Four i er Ever yw her e
 Telecommunications
 Sound & Music
 CDROM, Digital Video
 Fourier Optics
 X-ray Crystallography
 Protein Structure & DNA
 Computerized Tomography
 Nuclear Magnetic Resonance: MRI
 Ref: Prestini, “The Evolution of Applied Harmonic Analysis”
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 8
LECTURE OBJ ECTI VES
 Write general formula for a “sinusoidal”
waveform, or signal
 From the formula, plot the sinusoid versus
time
 What’s a signal?
 It’s a function of time, x(t)
 in the mathematical sense
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 9
TUNI NG FORK EXAMPLE
 CD-ROM demo
 “A” is at 440 Hertz (Hz)
 Waveform is a SINUSOIDAL SIGNAL
 Computer plot looks like a sine wave
 This should be the mathematical formula:
) ) 440 ( 2 cos( ϕ π + t A
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 10
TUNI NG FORK A-440 Wavef or m
ms 3 . 2
85 . 5 15 . 8
=
− ≈ T
Hz 435
3 . 2 / 1000
/ 1

=
= T f
Time (sec)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 11
SPEECH EXAMPLE
 More complicated signal (BAT.WAV)
 Waveform x(t) is NOT a Sinusoid
 Theory will tell us
 x(t) is approximately a sum of sinusoids
 FOURIER ANALYSIS
 Break x(t) into its sinusoidal components
 Called the FREQUENCY SPECTRUM
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 12
Speec h Si gnal : BAT
 Nearly Periodic Periodic in Vowel Region
 Period is (Approximately) T = 0.0065 sec
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 13
DI GI TI ZE t he WAVEFORM
 x[n] is a SAMPLED SINUSOID
 A list of numbers stored in memory
 Sample at 11,025 samples per second
 Called the SAMPLING RATE of the A/D
 Time between samples is
 1/11025 = 90.7 microsec
 Output via D/A hardware (at F
samp
)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 14
STORI NG DI GI TAL SOUND
 x[n] is a SAMPLED SINUSOID
 A list of numbers stored in memory
 CD rate is 44,100 samples per second
 16-bit samples
 Stereo uses 2 channels
 Number of bytes for 1 minute is
 2 X (16/8) X 60 X 44100 = 10.584 Mbytes
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 15
 Always use the COSINE FORM
 Sine is a special case:
) ) 440 ( 2 cos( ϕ π + t A
SI NES and COSI NES
) cos( ) sin(
2
π
ω ω − = t t
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 16
SI NUSOI DAL SI GNAL
 FREQUENCY
 Hertz (cycles/sec)
 PERIOD (in sec)
 AMPLITUDE
 Magnitude
 PHASE
A t cos( ) ω ϕ +
ω
A
ϕ
ω π =( ) 2 f
T
f
= =
1 2π
ω
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 17
EXAMPLE of SI NUSOI D
 Given the Formula
 Make a plot
) 2 . 1 3 . 0 cos( 5 π π + t
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 18
PLOT COSI NE SI GNAL
 Formula defines A, ω, and φ
5 03 12 cos( . . ) π π t +
A = 5
ω = 0.3π
ϕ = 1.2π
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 19
PLOTTI NG COSI NE SI GNAL
f r om t he FORMULA
 Determine period:
 Determine a peak location by solving
 Zero crossing is T/4 before or after
 Positive & Negative peaks spaced by T/2
) 2 . 1 3 . 0 cos( 5 π π + t
3 / 20 3 . 0 / 2 / 2 = = = π π ω π T
0 ) 2 . 1 3 . 0 ( 0 ) ( = + ⇒ = + π π ϕ ω t t
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 20
PLOT t he SI NUSOI D
 Use T=20/3 and the peak location at t=-4
) 2 . 1 3 . 0 cos( 5 π π + t
→ ← " "
3
20
8/22/2003 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
LECTURE #2
Phase & Time-Shift
Complex Exponentials
8/22/2003 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 2, Sects. 2-3 to 2-5
 Appendix A: Complex Numbers
 Appendix B: MATLAB
 Next Lecture: finish Chap. 2,
 Section 2-6 to end
8/22/2003 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 Define Sinusoid Formula from a plot
 Relate TIME-SHIFT to PHASE
t j
Xe t z
ω
= ) (
Introduce an ABSTRACTION:
Complex Numbers represent Sinusoids
Complex Exponential Signal
8/22/2003 © 2003, JH McClellan & RW Schafer 5
SINUSOIDAL SIGNAL
 FREQUENCY
 or, Hertz (cycles/sec)
 PERIOD (in sec)
 AMPLITUDE
 Magnitude
 PHASE
) cos( ϕ ω + t A
f ) 2 ( π ω =
ω
π 2 1
= =
f
T
A
ϕ
ω
8/22/2003 © 2003, JH McClellan & RW Schafer 6
PLOTTING COSINE SIGNAL
from the FORMULA
 Determine period:
 Determine a peak location by solving
 Peak at t=-4
) 2 . 1 3 . 0 cos( 5 π π + t
0 ) ( = +ϕ ωt
3 / 20 3 . 0 / 2 / 2 = = = π π ω π T
8/22/2003 © 2003, JH McClellan & RW Schafer 7
 Use T=20/3 and the peak location at t=-4
) 2 . 1 3 . 0 cos( 5 π π + t
→ ← " "
3
20
8/22/2003 © 2003, JH McClellan & RW Schafer 8
TIME-SHIFT
 In a mathematical formula we can replace
t with t-t
m
 Then the t=0 point moves to t=t
m
 Peak value of cos(ω(t-t
m
)) is now at t=t
m
)) ( cos( ) (
m m
t t A t t x − = − ω
8/22/2003 © 2003, JH McClellan & RW Schafer 9
TIME-SHIFTED SINUSOID
)) 4 ( ( 3 . 0 cos( 5 )) 4 ( 3 . 0 cos( 5 ) 4 ( − − = + = + t t t x π π
8/22/2003 © 2003, JH McClellan & RW Schafer 10
PHASE <--> TIME-SHIFT
 Equate the formulas:
 and we obtain:
 or,
) cos( )) ( cos( ϕ ω ω + = − t A t t A
m
ϕ ω = −
m
t
ω
ϕ
− =
m
t
8/22/2003 © 2003, JH McClellan & RW Schafer 11
SINUSOID from a PLOT
 Measure the period, T
 Between peaks or zero crossings
 Compute frequency: ω ωω ω = 2π/T
 Measure time of a peak: t
m
 Compute phase: φ φφ φ = -ω t
m
 Measure height of positive peak: A
3 steps
8/22/2003 © 2003, JH McClellan & RW Schafer 12
(A, ω, φ) from a PLOT
π π ω ϕ 25 . 0 ) )( 200 ( = − = − =
m m
t t
π ω
π π
200
01 . 0
2 2
= = =
T 100
1
period 1
sec 01 . 0
= = T
sec 00125 . 0 − =
m
t
8/22/2003 © 2003, JH McClellan & RW Schafer 13
SINE DRILL (MATLAB GUI)
8/22/2003 © 2003, JH McClellan & RW Schafer 14
T t t
t
m m
m
− = − = =
=
− + −

ω
π
ω
ϕ
ω
π ϕ
ω
ϕ
2
) 2 (
2
then , if
PHASE is AMBIGUOUS
 The cosine signal is periodic
 Period is 2π
 Thus adding any multiple of 2π leaves x(t)
unchanged
) cos( ) 2 cos( ϕ ω π ϕ ω + = + + t A t A
8/22/2003 © 2003, JH McClellan & RW Schafer 15
COMPLEX NUMBERS
 To solve: z
2
= -1
 z = j
 Math and Physics use z = i
 Complex number: z = x + j y
x
y z
Cartesian
coordinate
system
8/22/2003 © 2003, JH McClellan & RW Schafer 16
PLOT COMPLEX NUMBERS
8/22/2003 © 2003, JH McClellan & RW Schafer 17
2 6
) 5 3 ( ) 2 4 (
) 5 2 ( ) 3 4 (
2 1 3
j
j
j j
z z z
+ =
+ − + + =
+ + − =
+ =
8/22/2003 © 2003, JH McClellan & RW Schafer 18
*** POLAR FORM ***
 Vector Form
 Length =1
 Angle = θ
 Common Values
 j has angle of 0.5π
 −1 has angle of π
 − −− − j has angle of 1.5π
 also, angle of − −− −j could be −0.5π = 1.5π −2π
 because the PHASE is AMBIGUOUS
8/22/2003 © 2003, JH McClellan & RW Schafer 19
POLAR <--> RECTANGULAR
 Relate (x,y) to (r,θ)
r
θ
x
y
Need a notation for POLAR FORM
( )
x
y
y x r
1
2 2 2
Tan

=
+ =
θ
θ
θ
sin
cos
r y
r x
=
=
Most calculators do
Polar-Rectangular
8/22/2003 © 2003, JH McClellan & RW Schafer 20
Euler’s FORMULA
 Complex Exponential
 Real part is cosine
 Imaginary part is sine
 Magnitude is one
) sin( ) cos( θ θ
θ
jr r re
j
+ =
) sin( ) cos( θ θ
θ
j e
j
+ =
8/22/2003 © 2003, JH McClellan & RW Schafer 21
COMPLEX EXPONENTIAL
 Interpret this as a Rotating Vector
 θ = ω θ = ω θ = ω θ = ωt
 Angle changes vs. time
 Rotates 0.2π in 0.01 secs
) sin( ) cos( t j t e
t j
ω ω
ω
+ =
) sin( ) cos( θ θ
θ
j e
j
+ =
8/22/2003 © 2003, JH McClellan & RW Schafer 22
cos = REAL PART
Real Part of Euler’s
} { ) cos(
t j
e e t
ω
ω ℜ =
General Sinusoid
) cos( ) ( ϕ ω + = t A t x
So,
} {
} { ) cos(
) (
t j j
t j
e Ae e
Ae e t A
ω ϕ
ϕ ω
ϕ ω
ℜ =
ℜ = +
+
8/22/2003 © 2003, JH McClellan & RW Schafer 23
REAL PART EXAMPLE
Evaluate:
{ }
t j j
e Ae e t A
ω ϕ
ϕ ω ℜ = + ) cos(
{ }
t j
je e t x
ω
3 ) ( − ℜ =
{ }
{ } ) 5 . 0 cos( 3 3
) 3 ( ) (
5 . 0
π ω
ω π
ω
− = ℜ =
− ℜ =

t e e e
e j e t x
t j j
t j
8/22/2003 © 2003, JH McClellan & RW Schafer 24
COMPLEX AMPLITUDE
Then, any Sinusoid = REAL PART of Xe
jωt
{ } { }
t j j t j
e Ae e Xe e t x
ω ϕ ω
ℜ = ℜ = ) (
General Sinusoid
{ }
t j j
e Ae e t A t x
ω ϕ
ϕ ω ℜ = + = ) cos( ) (
Complex AMPLITUDE = X Complex AMPLITUDE = X
ϕ ω j t j
Ae X Xe t z = = ) (
1/12/2004 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
LECTURE #3
1/12/2004 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 2, Section 2-6
 Appendix A: Complex Numbers
 Appendix B: MATLAB
 Next Lecture: start Chapter 3
1/12/2004 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 Phasors = Complex Amplitude
 Complex Numbers represent Sinusoids
 Develop the ABSTRACTION:
t j j t j
e Ae Xe t z
ω ϕ ω
) ( ) ( = =
1/12/2004 © 2003, JH McClellan & RW Schafer 5
Z DRILL (Complex Arith)
1/12/2004 © 2003, JH McClellan & RW Schafer 6
AVOID Trigonometry
 Algebra, even complex, is EASIER !!!
 Can you recall cos(θ
1

2
) ?
 Use: real part of e
j(θ
1

2
)
= cos(θ
1

2
)
2 1 2 1
) ( θ θ θ θ j j j
e e e =
+
) sin )(cos sin (cos
2 2 1 1
θ θ θ θ j j + + =
(...) ) sin sin cos (cos
2 1 2 1
j + − = θ θ θ θ
1/12/2004 © 2003, JH McClellan & RW Schafer 7
Euler’s FORMULA
 Complex Exponential
 Real part is cosine
 Imaginary part is sine
 Magnitude is one
) sin( ) cos( t j t e
t j
ω ω
ω
+ =
) sin( ) cos( θ θ
θ
j e
j
+ =
1/12/2004 © 2003, JH McClellan & RW Schafer 8
Real & Imaginary Part Plots
PHASE DIFFERENCE = π ππ π/2
1/12/2004 © 2003, JH McClellan & RW Schafer 9
COMPLEX EXPONENTIAL
 Interpret this as a Rotating Vector
 θ = ω θ = ω θ = ω θ = ωt
 Angle changes vs. time
 Rotates 0.2π in 0.01 secs
e j

θ θ = + cos( ) sin( )
) sin( ) cos( t j t e
t j
ω ω
ω
+ =
1/12/2004 © 2003, JH McClellan & RW Schafer 10
Rotating Phasor
See Demo on CD-ROM
Chapter 2
1/12/2004 © 2003, JH McClellan & RW Schafer 11
Cos = REAL PART
cos(ωt) = ℜe e
jωt
{ }
Real Part of Euler’s
x(t) = Acos(ωt +ϕ)
General Sinusoid
Acos(ωt +ϕ) = ℜe Ae
j (ωt +ϕ)
{ }
= ℜe Ae

e
jωt
{ }
So,
1/12/2004 © 2003, JH McClellan & RW Schafer 12
COMPLEX AMPLITUDE
x(t) = Acos(ωt +ϕ) = ℜe Ae

e
jωt
{ }
General Sinusoid
z(t) = Xe
jωt
X = Ae

Complex AMPLITUDE = X Complex AMPLITUDE = X
x(t) = ℜe Xe
jωt
{ }
= ℜe z(t) { }
Sinusoid = REAL PART of (Ae

)e
jωt
1/12/2004 © 2003, JH McClellan & RW Schafer 13
POP QUIZ: Complex Amp
 Find the COMPLEX AMPLITUDE for:
 Use EULER’s FORMULA:
π 5 . 0
3
j
e X =
) 5 . 0 77 cos( 3 ) ( π π + = t t x
{ }
{ }
t j j
t j
e e e
e e t x
π π
π π
77 5 . 0
) 5 . 0 77 (
3
3 ) (
ℜ =
ℜ =
+
1/12/2004 © 2003, JH McClellan & RW Schafer 14
 ALL SINUSOIDS have SAME FREQUENCY
 HOW to GET {Amp,Phase} of RESULT ?
1/12/2004 © 2003, JH McClellan & RW Schafer 15
 Sum Sinusoid has SAME SAME Frequency
1/12/2004 © 2003, JH McClellan & RW Schafer 16
Get the new complex amplitude by complex addition
1/12/2004 © 2003, JH McClellan & RW Schafer 17
1/12/2004 © 2003, JH McClellan & RW Schafer 18
π 5 . 0 0
3 1
j j
e e +
) 5 . 0 77 cos( 3 ) (
) 77 cos( ) (
2
1
π π
π
+ =
=
t t x
t t x
1/12/2004 © 2003, JH McClellan & RW Schafer 19
 CONVERT back to cosine form:
j 3 = 3e
j 0.5π
1
3 1 j +
3 /
2 3 1
π j
e j = +
) 77 cos( 2 ) (
3
3
π
π + = t t x
1/12/2004 © 2003, JH McClellan & RW Schafer 20
t
m1
t
m2
t
m3
) ( ) ( ) (
2 1 3
t x t x t x + =
) (
1
t x
) (
2
t x
1/12/2004 © 2003, JH McClellan & RW Schafer 21
Convert Time-Shift to Phase
 Measure peak times:
 t
m1
=-0.0194, t
m2
=-0.0556, t
m3
=-0.0394
 Convert to phase (T=0.1)
 φ
1
=-ω ωω ωt
m1
= -2π ππ π(t
m1
/T) = 70π/180,
 φ
2
= 200π/180
 Amplitudes
 A
1
=1.7, A
2
=1.9, A
3
=1.532
1/12/2004 © 2003, JH McClellan & RW Schafer 22
 Convert Polar to Cartesian
 X
1
= 0.5814 + j1.597
 X
2
= -1.785 - j0.6498
 sum =
 X
3
= -1.204 + j0.9476
 Convert back to Polar
 X
3
= 1.532 at angle 141.79π/180
 This is the sum
1/12/2004 © 2003, JH McClellan & RW Schafer 23
VECTOR
(PHASOR)
X
1
X
2
X
3
8/31/2003 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 4
Spectrum Representation
8/31/2003 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 3, Section 3-1
 Appendix A: Complex Numbers
 Next Lecture: Ch 3, Sects 3-2, 3-3, 3-7 & 3-8
8/31/2003 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 Sinusoids with DIFFERENT Frequencies
 SPECTRUM Representation
 Graphical Form shows DIFFERENT DIFFERENT Freqs

=
+ =
N
k
k k k
t f A t x
1
) 2 cos( ) ( ϕ π
8/31/2003 © 2003, JH McClellan & RW Schafer 5
FREQUENCY DIAGRAM
 Plot Complex Amplitude vs. Freq
0 100 250 –100 –250
f (in Hz)
3 /
7
π j
e
3 /
7
π j
e

2 /
4
π j
e
− 2 /
4
π j
e
10
8/31/2003 © 2003, JH McClellan & RW Schafer 6
Another FREQ. Diagram
F
r
e
q
u
e
n
c
y

i
s

t
h
e

v
e
r
t
i
c
a
l

a
x
i
s
Time is the horizontal axis
A-440
8/31/2003 © 2003, JH McClellan & RW Schafer 7
MOTIVATION
 Synthesize Complicated Signals
 Musical Notes
 Piano uses 3 strings for many notes
 Chords: play several notes simultaneously
 Human Speech
 Vowels have dominant frequencies
 Application: computer generated speech
 Can all signals be generated this way?
 Sum of sinusoids?
8/31/2003 © 2003, JH McClellan & RW Schafer 8
Fur Elise WAVEFORM
Beat
Notes
8/31/2003 © 2003, JH McClellan & RW Schafer 9
Speech Signal: BAT
 Nearly Periodic Periodic in Vowel Region
 Period is (Approximately) T = 0.0065 sec
8/31/2003 © 2003, JH McClellan & RW Schafer 10
Euler’s Formula Reversed
 Solve for cosine (or sine)
) sin( ) cos( t j t e
t j
ω ω
ω
+ =
) sin( ) cos( t j t e
t j
ω ω
ω
− + − =

) sin( ) cos( t j t e
t j
ω ω
ω
− =

) cos( 2 t e e
t j t j
ω
ω ω
= +

) ( ) cos(
2
1
t j t j
e e t
ω ω
ω

+ =
8/31/2003 © 2003, JH McClellan & RW Schafer 11
INVERSE Euler’s Formula
 Solve for cosine (or sine)
) ( ) cos(
2
1
t j t j
e e t
ω ω
ω

+ =
) ( ) sin(
2
1
t j t j
j
e e t
ω ω
ω

− =
8/31/2003 © 2003, JH McClellan & RW Schafer 12
SPECTRUM Interpretation
 Cosine = sum of 2 complex exponentials:
One has a positive frequency
The other has negative freq.
Amplitude of each is half as big
t j
A
t j
A
e e t A
7
2
7
2
) 7 cos(

+ =
8/31/2003 © 2003, JH McClellan & RW Schafer 13
NEGATIVE FREQUENCY
 Is negative frequency real?
 Doppler Radar provides an example
 Police radar measures speed by using the
Doppler shift principle
 Let’s assume 400Hz ÅÆ60 mph
 +400Hz means towards the radar
 -400Hz means away (opposite direction)
 Think of a train whistle
8/31/2003 © 2003, JH McClellan & RW Schafer 14
SPECTRUM of SINE
 Sine = sum of 2 complex exponentials:
 Positive freq. has phase = -0.5π
 Negative freq. has phase = +0.5π
t j j t j j
t j
j
A
t j
j
A
e Ae e Ae
e e t A
7 5 . 0
2
1
7 5 . 0
2
1
7
2
7
2
) 7 sin(
− −

+ =
− =
π π
π 5 . 0
1
j
j
e j = =

8/31/2003 © 2003, JH McClellan & RW Schafer 15
GRAPHICAL SPECTRUM
EXAMPLE of SINE
AMPLITUDE, PHASE & FREQUENCY are shown
ω ωω ω
7 -7 0
t j j t j j
e Ae e Ae t A
7 5 . 0
2
1
7 5 . 0
2
1
) 7 sin(
− −
+ =
π π
π 5 . 0
2
1
) (
j
e A
π 5 . 0
2
1
) (
j
e A

8/31/2003 © 2003, JH McClellan & RW Schafer 16
SPECTRUM ---> SINUSOID
What is the formula for the signal x(t)?
0 100 250 –100 –250
f (in Hz)
3 /
7
π j
e
3 /
7
π j
e

2 /
4
π j
e
− 2 /
4
π j
e
10
8/31/2003 © 2003, JH McClellan & RW Schafer 17
Gather (A,ω,φ ω,φ ω,φ ω,φ) information
 Frequencies:
 -250 Hz
 -100 Hz
 0 Hz
 100 Hz
 250 Hz
 Amplitude & Phase
 4 -π/2
 7 +π/3
 10 0
 7 -π/3
 4 +π/2
DC is another name for zero-freq component
DC component always has φ=0 φ=0 φ=0 φ=0 or π π π π (for real x(t) )
Note the conjugate phase
8/31/2003 © 2003, JH McClellan & RW Schafer 18
 Amplitude & Phase
 4 -π ππ π/2
 7 +π ππ π/3
 10 0
 7 -π ππ π/3
 4 +π ππ π/2
 Frequencies:
 -250 Hz
 -100 Hz
 0 Hz
 100 Hz
 250 Hz
t j j t j j
t j j t j j
e e e e
e e e e
t x
) 250 ( 2 2 / ) 250 ( 2 2 /
) 100 ( 2 3 / ) 100 ( 2 3 /
4 4
7 7
10 ) (
π π π π
π π π π
− −
− −
+
+
+ =
8/31/2003 © 2003, JH McClellan & RW Schafer 19
t j j t j j
t j j t j j
e e e e
e e e e
t x
) 250 ( 2 2 / ) 250 ( 2 2 /
) 100 ( 2 3 / ) 100 ( 2 3 /
4 4
7 7
10 ) (
π π π π
π π π π
− −
− −
+
+
+ =
0 100 250 –100 –250
f (in Hz)
3 /
7
π j
e
3 /
7
π j
e

2 /
4
π j
e
− 2 /
4
π j
e
10
8/31/2003 © 2003, JH McClellan & RW Schafer 20
Use Euler’s Formula to get REAL sinusoids:
Simplify Components
t j j t j j
t j j t j j
e e e e
e e e e
t x
) 250 ( 2 2 / ) 250 ( 2 2 /
) 100 ( 2 3 / ) 100 ( 2 3 /
4 4
7 7
10 ) (
π π π π
π π π π
− −
− −
+
+
+ =
t j j t j j
e Ae e Ae t A
ω ϕ ω ϕ
ϕ ω
− −
+ = +
2
1
2
1
) cos(
8/31/2003 © 2003, JH McClellan & RW Schafer 21
So, we get the general form:

=
+ + =
N
k
k k k
t f A A t x
1
0
) 2 cos( ) ( ϕ π
) 2 / ) 250 ( 2 cos( 8
) 3 / ) 100 ( 2 cos( 14 10 ) (
π π
π π
+ +
− + =
t
t t x
8/31/2003 © 2003, JH McClellan & RW Schafer 22
Summary: GENERAL FORM

+ = ℜ z z z e
2
1
2
1
} { k
j
k k
f
e A X
k
=
=
Frequency
ϕ
{ }

=
ℜ + =
N
k
t f j
k
k
e X e X t x
1
2
0
) (
π
{ }

=
− ∗
+ + =
N
k
t f j
k
t f j
k
k k
e X e X X t x
1
2
2
1
2
2
1
0
) (
π π

=
+ + =
N
k
k k k
t f A A t x
1
0
) 2 cos( ) ( ϕ π
8/31/2003 © 2003, JH McClellan & RW Schafer 23
Example: Synthetic Vowel
 Sum of 5 Frequency Components
8/31/2003 © 2003, JH McClellan & RW Schafer 24
SPECTRUM of VOWEL
 Note: Spectrum has 0.5X
k
(except X
DC
)
 Conjugates in negative frequency
8/31/2003 © 2003, JH McClellan & RW Schafer 25
SPECTRUM of VOWEL
(Polar Format)
φ φφ φ
k
0.5A
k
8/31/2003 © 2003, JH McClellan & RW Schafer 26
Vowel Waveform
(sum of all 5 components)
1/28/2005 © 2003, JH McClellan & RW Schafer 1
Si gnal Pr oc essi ng Fi r st
Lec t ur e 5
Per i odi c Si gnal s, Har moni c s
& Ti me-Var yi ng Si nusoi ds
1/28/2005 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 3, Sections 3-2 and 3-3
 Chapter 3, Sections 3-7 and 3-8
 Next Lecture:
  Fourier Series ANALYSIS Fourier Series ANALYSIS
 Sections 3-4, 3-5 and 3-6
1/28/2005 © 2003, JH McClellan & RW Schafer 4
Pr obl em Sol vi ng Sk i l l s
 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
1/28/2005 © 2003, JH McClellan & RW Schafer 5
LECTURE OBJ ECTI VES
 Signals with HARMONIC HARMONIC Frequencies
k
= kf
0
FREQUENCY can change vs. TIME
Chirps:
Introduce Spectrogram Visualization (specgram.m)
(plotspec.m)
x(t) = cos(αt
2
)

=
+ + =
N
k
k k
t kf A A t x
1
0 0
) 2 cos( ) ( ϕ π
1/28/2005 © 2003, JH McClellan & RW Schafer 6
SPECTRUM DI AGRAM
 Recall Complex Amplitude vs. Freq
k k
a X =
2
1
0 100 250 –100 –250
f (in Hz)
3 /
7
π j
e
3 /
7
π j
e

2 /
4
π j
e
− 2 /
4
π j
e
10
) 2 / ) 250 ( 2 cos( 8
) 3 / ) 100 ( 2 cos( 14 10 ) (
π π
π π
+ +
− + =
t
t t x
k
j
k k
e A X
ϕ
=

k
X
2
1
1/28/2005 © 2003, JH McClellan & RW Schafer 7
SPECTRUM f or PERI ODI C ?
 Nearly Periodic in the Vowel Region
 Period is (Approximately) T = 0.0065 sec
1/28/2005 © 2003, JH McClellan & RW Schafer 8
PERI ODI C SI GNALS
 Repeat every T secs
 Definition
 Example:
 Speech can be “quasi-periodic”
) ( ) ( T t x t x + =
) 3 ( cos ) (
2
t t x =
? = T
3
π
= T
3

= T
1/28/2005 © 2003, JH McClellan & RW Schafer 9
Per i od of Compl ex Ex ponent i al
Definition: Period is T
k = integer
t j T t j
e e
ω ω
=
+ ) (
? ) ( ) (
) (
t x T t x
e t x
t j
= +
=
ω
1
2
=
k j
e
π
k T e
T j
π ω
ω
2 1 = ⇒ = ⇒
k k
T T
k
0
2 2
ω
π π
ω =

= =
1/28/2005 © 2003, JH McClellan & RW Schafer 10
{ }

=
− ∗
=
+ + =
=
+ + =
N
k
t kf j
k
t kf j
k
j
k k
N
k
k k
e X e X X t x
e A X
t kf A A t x
k
1
2
2
1
2
2
1
0
1
0 0
0 0
) (
) 2 cos( ) (
π π
ϕ
ϕ π
Har moni c Si gnal Spec t r um
0
: have only can signal Periodic f k f
k
=
T
f
1
0
=
1/28/2005 © 2003, JH McClellan & RW Schafer 11
Def i ne FUNDAMENTAL FREQ
0
0
1
T
f =
(shortest) Period l fundamenta
(largest) Frequency l fundamenta
) 2 (
) 2 cos( ) (
0
0
0 0 0
1
0 0
=
=
= =
+ + =

=
T
f
f f k f
t kf A A t x
k
N
k
k k
π ω
ϕ π
1/28/2005 © 2003, JH McClellan & RW Schafer 12
What is the fundamental frequency?
Har moni c Si gnal (3 Fr eqs)
3rd
5th
10 Hz
1/28/2005 © 2003, JH McClellan & RW Schafer 13
POP QUI Z: FUNDAMENTAL
 Here’s another spectrum:
What is the fundamental frequency?
100 Hz ? 50 Hz ?
0 100 250 –100 –250
f (in Hz)
3 /
7
π j
e
3 /
7
π j
e

2 /
4
π j
e
− 2 /
4
π j
e
10
1/28/2005 © 2003, JH McClellan & RW Schafer 14
SPECIAL RELATIONSHIP
to get a PERIODIC SIGNAL
I RRATI ONAL SPECTRUM
1/28/2005 © 2003, JH McClellan & RW Schafer 15
Har moni c Si gnal (3 Fr eqs)
T=0.1
1/28/2005 © 2003, JH McClellan & RW Schafer 16
NON-Har moni c Si gnal
NOT
PERIODIC
1/28/2005 © 2003, JH McClellan & RW Schafer 17
FREQUENCY ANALYSI S
  Now, a much HARDER problem 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
1/28/2005 © 2003, JH McClellan & RW Schafer 18
Ti me-Var yi ng
FREQUENCI ES Di agr am
F
r
e
q
u
e
n
c
y

i
s

t
h
e

v
e
r
t
i
c
a
l

a
x
i
s
Time is the horizontal axis
A-440
1/28/2005 © 2003, JH McClellan & RW Schafer 19
SI MPLE TEST SI GNAL
 C-major SCALE: stepped frequencies
 Frequency is constant for each note
IDEAL
1/28/2005 © 2003, JH McClellan & RW Schafer 20
 SPECTROGRAM Tool
 MATLAB function is specgram.m
 SP-First has plotspec.m & spectgr.m
 ANALYSIS program
 Takes x(t) as input &
 Produces spectrum values X
k
 Breaks x(t) into SHORT TIME SEGMENTS
 Then uses the FFT (Fast Fourier Transform)
1/28/2005 © 2003, JH McClellan & RW Schafer 21
SPECTROGRAM EXAMPLE
 Two Constant Frequencies: Beats
) ) 12 ( 2 sin( ) ) 660 ( 2 cos( t t π π
1/28/2005 © 2003, JH McClellan & RW Schafer 22
( ) ( )
t j t j
j
t j t j
e e e e
) 12 ( 2 ) 12 ( 2
2
1
) 660 ( 2 ) 660 ( 2
2
1
π π π π − −
− +
 Same as BEAT Notes
) ) 12 ( 2 sin( ) ) 660 ( 2 cos( t t π π
) ) 648 ( 2 cos( ) ) 672 ( 2 cos(
2 2
1
2 2
1 π π
π π + + − t t
( )
t j t j t j t j
j
e e e e
) 648 ( 2 ) 648 ( 2 ) 672 ( 2 ) 672 ( 2
4
1
π π π π − −
+ − −
1/28/2005 © 2003, JH McClellan & RW Schafer 23
SPECTRUM of AM (Beat )
 4 complex exponentials in AM:
What is the fundamental frequency?
648 Hz ? 24 Hz ?
0 648 672
f (in Hz)
–672 –648
2 /
4
1
π j
e
2 /
4
1
π j
e
− 2 /
4
1
π j
e
− 2 /
4
1
π j
e
1/28/2005 © 2003, JH McClellan & RW Schafer 24
STEPPED FREQUENCI ES
 C-major SCALE: successive sinusoids
 Frequency is constant for each note
IDEAL
1/28/2005 © 2003, JH McClellan & RW Schafer 25
SPECTROGRAM of C-Sc al e
ARTIFACTS at Transitions
Sinusoids ONLY
From SPECGRAM
ANALYSIS PROGRAM
1/28/2005 © 2003, JH McClellan & RW Schafer 26
Spec t r ogr am of LAB SONG
ARTIFACTS at Transitions
Sinusoids ONLY
Analysis Frame = 40ms
1/28/2005 © 2003, JH McClellan & RW Schafer 27
Ti me-Var yi ng Fr equenc y
 Frequency can change vs. time
 Continuously, not stepped
  FREQUENCY MODULATION (FM) FREQUENCY MODULATION (FM)
 CHIRP SIGNALS
 Linear Frequency Modulation (LFM)
)) ( 2 cos( ) ( t v t f t x
c
+ = π
VOICE
1/28/2005 © 2003, JH McClellan & RW Schafer 28
) 2 cos( ) (
0
2
ϕ π α + + = t f t A t x
New Si gnal : Li near FM
 Called Chirp Signals (LFM)
 Freq will change LINEARLY vs. time
 Example of Frequency Modulation (FM)
 Define “instantaneous frequency”
1/28/2005 © 2003, JH McClellan & RW Schafer 29
I NSTANTANEOUS FREQ
 Definition
 For Sinusoid:
Derivative
of the “Angle”
) ( ) (
)) ( cos( ) (
t t
t A t x
dt
d
i
ψ ω
ψ
= ⇒
=
Makes sense
0
0
0
2 ) ( ) (
2 ) (
) 2 cos( ) (
f t t
t f t
t f A t x
dt
d
i
π ψ ω
ϕ π ψ
ϕ π
= = ⇒
+ =
+ =
1/28/2005 © 2003, JH McClellan & RW Schafer 30
I NSTANTANEOUS FREQ
of t he Chi r p
 Chirp Signals have Quadratic phase
 Freq will change LINEARLY vs. time
ϕ β α ψ
ϕ β α
+ + = ⇒
+ + =
t t t
t t A t x
2
2
) (
) cos( ) (
β α ψ ω + = = ⇒ t t t
dt
d
i
2 ) ( ) (
1/28/2005 © 2003, JH McClellan & RW Schafer 31
CHI RP SPECTROGRAM
1/28/2005 © 2003, JH McClellan & RW Schafer 32
CHI RP WAVEFORM
1/28/2005 © 2003, JH McClellan & RW Schafer 33
OTHER CHI RPS
 ψ(t) can be anything:
 ψ(t) could be speech or music:
) ) cos( cos( ) ( ϕ β α + = t A t x
) sin( ) ( ) ( t t t
dt
d
i
β αβ ψ ω − = = ⇒
1/28/2005 © 2003, JH McClellan & RW Schafer 34
SI NE-WAVE FREQUENCY
MODULATI ON (FM)
Look at CD-ROM Demos in Ch 3
9/8/2003 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 6
Fourier Series Coefficients
9/8/2003 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
  Fourier Series in Ch 3, Sects 3 Fourier Series in Ch 3, Sects 3- -4, 3 4, 3- -5 & 3 5 & 3- -6 6
 Replaces pp. 62-66 in Ch 3 in DSP First
 Notation: a
k
for Fourier Series
 Next Lecture: More Fourier Series
9/8/2003 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 Work with the Fourier Series Integral
  ANALYSIS ANALYSIS via Fourier Series
 For PERIODIC signals: x(t+T
0
) = x(t)
 Later: spectrum from the Fourier Series

=
0
0
0
0
) / 2 (
1
) (
T
dt e t x a
t T k j
T
k
π
9/8/2003 © 2003, JH McClellan & RW Schafer 5
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
9/8/2003 © 2003, JH McClellan & RW Schafer 6 9/8/2003 © 2003, JH McClellan & RW Schafer 7
0 100 250 –100 –250
f (in Hz)
3 /
7
π j
e
3 /
7
π j
e

2 /
4
π j
e
− 2 /
4
π j
e
10
SPECTRUM DIAGRAM
 Recall Complex Amplitude vs. Freq
k k
a X =
2
1
X
k
= A
k
e

k
1
2
X
k
*
{ }

=
− ∗
+ + =
N
k
t f j
k
t f j
k
k k
e X e X X t x
1
2
2
1
2
2
1
0
) (
π π
k
a {
*
k
a
0
a
9/8/2003 © 2003, JH McClellan & RW Schafer 8
Harmonic Signal
PERIOD/FREQUENCY of COMPLEX EXPONENTIAL:
t f k j
k
k
e a t x
0
2
) (
π

−∞ =
=
( )
0
0
0
0 0
1
or
2
2
f
T
T
f = = =
π
ω π
9/8/2003 © 2003, JH McClellan & RW Schafer 9
k
j
k k
N
k
k k
e A X
t kf A A t x
ϕ
ϕ π
=
+ + =

=1
0 0
) 2 cos( ) (
k
j
k k k
e A X a
ϕ
2
1
2
1
= =
Fourier Series Synthesis
COMPLEX
AMPLITUDE
t f k j
k
k
e a t x
0
2
) (
π

−∞ =
=
9/8/2003 © 2003, JH McClellan & RW Schafer 10
Harmonic Signal (3 Freqs)
T = 0.1
a
3
a
5
a
1
9/8/2003 © 2003, JH McClellan & RW Schafer 11
SYNTHESIS vs. ANALYSIS
 SYNTHESIS
 Easy
 Given (ω
k
,A
k

k
) create
x(t)
 Synthesis can be
HARD
 Synthesize Speech so that
it sounds good
 ANALYSIS
 Hard
 Given x(t), extract
(ω ωω ω
k
,A
k

k
)
 How many?
 Need algorithm for
computer
9/8/2003 © 2003, JH McClellan & RW Schafer 12
STRATEGY: x(t) Æ a
k
 ANALYSIS
 Get representation from the signal
 Works for PERIODIC PERIODIC Signals
 Fourier Series
 Answer is: an INTEGRAL over one period

=
0
0
0
0
) (
1
T
dt e t x a
t k j
T
k
ω
9/8/2003 © 2003, JH McClellan & RW Schafer 13
INTEGRAL Property of exp(j)
 INTEGRATE over ONE PERIOD
0
) 1 (
2
2
0
0
0
0
0
0
0
) / 2 (
2
0
0
) / 2 (
0
0
) / 2 (
=

=

=

− −
T
mt T j
m j
T
mt T j
T
mt T j
dt e
e
m j
T
e
m j
T
dt e
π
π
π π
π
π
0 ≠ m 0
0
2
T
π
ω =
9/8/2003 © 2003, JH McClellan & RW Schafer 14
ORTHOGONALITY of exp(j)
 PRODUCT of exp(+j ) and exp(-j )
¦
¹
¦
´
¦
=

=

k
k
dt e e
T
T
kt T j t T j
1
0
1
0
0 0
0
) / 2 ( ) / 2 (
0
π π

0
0
0
) )( / 2 (
0
1
T
t k T j
dt e
T
π
9/8/2003 © 2003, JH McClellan & RW Schafer 15
Isolate One FS Coefficient

−∞ =

−∞ =

−∞ =
= ⇒
=
|
|
.
|

\
|
=
|
|
.
|

\
|
=
=
0
0
0
0
0 0
0
0
0
0
0
0 0
0
0
0
0
0
0
) / 2 (
1
0
) / 2 ( ) / 2 (
1
0
) / 2 (
1
0
) / 2 ( ) / 2 (
1
0
) / 2 (
1
) / 2 (
) (
) (
) (
) (
T
t k T j
T
k
T
t T j t k T j
T
k
k
T
t T j
T
T
t T j t k T j
k
k
T
T
t T j
T
t k T j
k
k
dt e t x a
a dt e e a dt e t x
dt e e a dt e t x
e a t x
π
π π π
π π π
π

= k for except
zero is Integral
9/8/2003 © 2003, JH McClellan & RW Schafer 16
SQUARE WAVE EXAMPLE
0 –.02 .02 0.04
1
t
x(t)
.01
sec. 04 . 0 for
0
0 1
) (
0
0 0
2
1
0
2
1
=
¦
¹
¦
´
¦
< ≤
< ≤
=
T
T t T
T t
t x
9/8/2003 © 2003, JH McClellan & RW Schafer 17
FS for a SQUARE WAVE {a
k
}
) 0 ( ) (
1
0
0
0
) / 2 (
0
≠ =

k dt e t x
T
a
T
kt T j
k
π
02 .
0
) 04 . / 2 (
) 04 . / 2 ( 04 .
1
02 .
0
) 04 . / 2 (
1
04 .
1
kt j
k j
kt j
k
e dt e a
π
π
π −

= =

k j
e
k j
k
k j
π π
π
2
) 1 ( 1
) 1 (
) 2 (
1
) (
− −
= −

=

9/8/2003 © 2003, JH McClellan & RW Schafer 18
DC Coefficient: a
0
) 0 ( ) (
1
0
0
0
) / 2 (
0
= =

k dt e t x
T
a
T
kt T j
k
π
) Area (
1
) (
1
0
0
0
0
0
T
dt t x
T
a
T
= =

2
1
02 .
0
0
) 0 02 (.
04 .
1
1
04 .
1
= − = =

dt a
9/8/2003 © 2003, JH McClellan & RW Schafer 19
Fourier Coefficients a
k
 a
k
is a function of k
 Complex Amplitude for k-th Harmonic
 This one doesn’t depend on the period, T
0
¦
¦
¹
¦
¦
´
¦
=
± ± =
± ± =
=
− −
=
0
, 4 , 2 0
, 3 , 1
1
2
) 1 ( 1
2
1
k
k
k
k j
k j
a
k
k

π
π
9/8/2003 © 2003, JH McClellan & RW Schafer 20
Spectrum from Fourier Series
¦
¦
¹
¦
¦
´
¦
=
± ± =
± ± =

=
0
, 4 , 2 0
, 3 , 1
2
1
k
k
k
k
j
a
k

π
) 25 ( 2 ) 04 . 0 /( 2
0
π π ω = =
9/8/2003 © 2003, JH McClellan & RW Schafer 21
0 0
/ 1 Frequency l Fundamenta T f =
Fourier Series Integral
 HOW do you determine a
k
from x(t) ?
component) (DC ) (
) (
0
0
0
0
0
0
1
0
0
) / 2 (
1

=
=

T
T
T
t k T j
T
k
dt t x a
dt e t x a
π
real is ) ( when
*
t x a a
k k
=

Si gnal Pr oc essi ng Fi r st
Lec t ur e 7
Four i er Ser i es & Spec t r um
9/13/2006 EE-2025 Spring-2005 jMc 3
 This Lecture:
  Fourier Series in Ch 3, Sects 3 Fourier Series in Ch 3, Sects 3- -4, 3 4, 3- -5 & 3 5 & 3- -6 6
 Replaces pp. 62-66 in Ch 3 in DSP First
 Notation: a
k
for Fourier Series
 Next Lecture: Sampling
9/13/2006 EE-2025 Spring-2005 jMc 4
LECTURE OBJ ECTI VES
  ANALYSIS ANALYSIS via Fourier Series
 For PERIODIC signals: x(t+T
0
) = x(t)
  SPECTRUM SPECTRUM from Fourier Series
 a
k
is Complex Amplitude for k-th Harmonic

=
0
0
0
0
) / 2 (
1
) (
T
dt e t x a
t T k j
T
k
π
9/13/2006 EE-2025 Spring-2005 jMc 5
0 100 250 –100 –250
f (in Hz)
3 /
7
π j
e
3 /
7
π j
e

2 /
4
π j
e
− 2 /
4
π j
e
10
SPECTRUM DI AGRAM
 Recall Complex Amplitude vs. Freq
{ }

=
− ∗
+ + =
N
k
t f j
k
t f j
k
k k
e a e a a t x
1
2 2
0
) (
π π
k
j
k k
e A a
ϕ
2
1
=

k
a
0
a
9/13/2006 EE-2025 Spring-2005 jMc 6
Har moni c Si gnal
PERIOD/FREQUENCY of COMPLEX EXPONENTIAL:
t f k j
k
k
e a t x
0
2
) (
π

−∞ =
=
( )
0
0
0
0 0
1
or
2
2
f
T
T
f = = =
π
ω π
9/13/2006 EE-2025 Spring-2005 jMc 7
Ex ampl e
) 3 ( sin ) (
3
t t x π =
t j t j t j t j
e
j
e
j
e
j
e
j
t x
π π π π 9 3 3 9
8 8
3
8
3
8
) (
− −

+

+

+

=
9/13/2006 EE-2025 Spring-2005 jMc 8
Ex ampl e
In this case, analysis
just requires picking
off the coefficients.
) 3 ( sin ) (
3
t t x π =
t j t j t j t j
e
j
e
j
e
j
e
j
t x
π π π π 9 3 3 9
8 8
3
8
3
8
) (
− −

+

+

+

=
3 = k
1 = k 1 − = k
3 − = k
k
a
9/13/2006 EE-2025 Spring-2005 jMc 9
STRATEGY: x (t ) Æ a
k
 ANALYSIS
 Get representation from the signal
 Works for PERIODIC PERIODIC Signals
 Fourier Series
 Answer is: an INTEGRAL over one period

=
0
0
0
0
) (
1
T
dt e t x a
t k j
T
k
ω
9/13/2006 EE-2025 Spring-2005 jMc 10
FS: Rec t i f i ed Si ne Wave {a
k
}
) 1 ( ) (
1
0
0
0
) / 2 (
0
± ≠ =

k dt e t x
T
a
T
kt T j
k
π
2 /
0
)) 1 )( / 2 ( ( 2
) 1 )( / 2 (
2 /
0
)) 1 )( / 2 ( ( 2
) 1 )( / 2 (
2 /
0
) 1 )( / 2 (
2
1
2 /
0
) 1 )( / 2 (
2
1
2 /
0
) / 2 (
) / 2 ( ) / 2 (
1
2 /
0
) / 2 (
2 1
0
0 0
0
0
0 0
0
0
0
0
0
0
0
0
0
0 0
0
0
0
0 0
2
) sin(
T
k T j T j
t k T j
T
k T j T j
t k T j
T
t k T j
T j
T
t k T j
T j
T
kt T j
t T j t T j
T
T
kt T j
T T
k
e e
dt e dt e
dt e
j
e e
dt e t a
+ −
+ −
− −
− −
+ − − −

− =
− =

=
=
∫ ∫

π
π
π
π
π π
π
π π
π
π
Half-Wave Rectified Sine
9/13/2006 EE-2025 Spring-2005 jMc 11
( ) ( )
( ) ( )
( )( )

± = = − − − =
− − − =
− − − =
− =

− − +
+ −
+
− −

+ −
+
− −

+ −
+ −
− −
− −
even
1 ?
odd 0
1 ) 1 (
1 1
1 1
) 1 (
1
) 1 ( 4
) 1 ( 1
) 1 (
) 1 ( 4
1
) 1 (
) 1 ( 4
1
2 / ) 1 )( / 2 (
) 1 ( 4
1
2 / ) 1 )( / 2 (
) 1 ( 4
1
2 /
0
)) 1 )( / 2 ( ( 2
) 1 )( / 2 (
2 /
0
)) 1 )( / 2 ( ( 2
) 1 )( / 2 (
2
2
0 0 0 0
0
0 0
0
0
0 0
0
k
k
k
e e
e e
e e
a
k
k
k
k k
k j
k
k j
k
T k T j
k
T k T j
k
T
k T j T j
t k T j
T
k T j T j
t k T j
k
π
π
π
π
π
π
π
π
π
π
π
π
π
π
FS: Rec t i f i ed Si ne Wave
{a
k
}
4
1
j
±
9/13/2006 EE-2025 Spring-2005 jMc 12
SQUARE WAVE EXAMPLE
0 –.02 .02 0.04
1
t
x(t)
.01
sec. 04 . 0 for
0
0 1
) (
0
0 0
2
1
0
2
1
=

< ≤
< ≤
=
T
T t T
T t
t x
9/13/2006 EE-2025 Spring-2005 jMc 15
Four i er Coef f i c i ent s a
k
 a
k
is a function of k
 Complex Amplitude for k-th Harmonic
 This one doesn’t depend on the period, T
0

=
± ± =
± ± =
=
− −
=
0
, 4 , 2 0
, 3 , 1
1
2
) 1 ( 1
2
1
k
k
k
k j
k j
a
k
k
K
K
π
π
9/13/2006 EE-2025 Spring-2005 jMc 16
Spec t r um f r om Four i er Ser i es

=
± ± =
± ± =

=
0
, 4 , 2 0
, 3 , 1
2
1
k
k
k
k
j
a
k
K
K
π
) 25 ( 2 ) 04 . 0 /( 2
0
π π ω = =
9/13/2006 EE-2025 Spring-2005 jMc 17
Four i er Ser i es Synt hesi s
 HOW do you APPROXIMATE x(t) ?
 Use FINITE number of coefficients

=
0
0
0
0
) / 2 (
1
) (
T
t k T j
T
k
dt e t x a
π
real is ) ( when
*
t x a a
k k
=

t f k j
N
N k
k
e a t x
0
2
) (
π

− =
=
9/13/2006 EE-2025 Spring-2005 jMc 18
Four i er Ser i es Synt hesi s
9/13/2006 EE-2025 Spring-2005 jMc 19
Synt hesi s: 1st & 3r d Har moni c s
) ) 75 ( 2 cos(
3
2
) ) 25 ( 2 cos(
2
2
1
) (
2 2
π π
π
π
π
π
− + − + = t t t y
9/13/2006 EE-2025 Spring-2005 jMc 20
Synt hesi s: up t o 7t h Har moni c
) 350 sin(
7
2
) 250 sin(
5
2
) 150 sin(
3
2
) 50 cos(
2
2
1
) (
2
t t t t t y π
π
π
π
π
π
π
π
π
+ + + − + =
9/13/2006 EE-2025 Spring-2005 jMc 21
Four i er Synt hesi s
K + + + = ) 3 sin(
3
2
) sin(
2
2
1
) (
0 0
t t t x
N
ω
π
ω
π
9/13/2006 EE-2025 Spring-2005 jMc 22
Gi bbs’ Phenomenon
 Convergence at DISCONTINUITY of x(t)
 There is always an overshoot
 9% for the Square Wave case
9/13/2006 EE-2025 Spring-2005 jMc 23
Four i er Ser i es 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
9/13/2006 EE-2025 Spring-2005 jMc 24
f ser i esdemo GUI
9/14/2003 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 8
Sampling & Aliasing
9/14/2003 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chap 4, Sections 4-1 and 4-2
 Replaces Ch 4 in DSP First, pp. 83-94
 Recitation: Strobe Demo (Sect 4-3)
 Next Lecture: Chap. 4 Sects. 4-4 and 4-5
9/14/2003 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 SAMPLING can cause ALIASING
 Sampling Theorem
 Sampling Rate > 2(Highest Frequency)
 Spectrum for digital signals, x[n]
 Normalized Frequency
π
π
ω ω 2
2
ˆ
+ = =
s
s
f
f
T
ALIASING
9/14/2003 © 2003, JH McClellan & RW Schafer 5
SYSTEMS Process Signals
 PROCESSING GOALS:
 Change x(t) into y(t)
 For example, more BASS
 Improve x(t), e.g., image deblurring
 Extract Information from x(t)
SYSTEM
x(t) y(t)
9/14/2003 © 2003, JH McClellan & RW Schafer 6
System IMPLEMENTATION
 DIGITAL/MICROPROCESSOR
 Convert x(t) to numbers stored in memory
ELECTRONICS
x(t) y(t)
COMPUTER D-to-A A-to-D
x(t) y(t) y[n] x[n]
 ANALOG/ELECTRONIC:
 Circuits: resistors, capacitors, op-amps
9/14/2003 © 2003, JH McClellan & RW Schafer 7
SAMPLING x(t)
 SAMPLING PROCESS
 Convert x(t) to numbers x[n]
 “n” is an integer; x[n] is a sequence of values
 Think of “n” as the storage address in memory
 UNIFORM SAMPLING at t = nT
s
 IDEAL: x[n] = x(nT
s
)
C-to-D
x(t) x[n]
9/14/2003 © 2003, JH McClellan & RW Schafer 8
SAMPLING RATE, f
s
 SAMPLING RATE (f
s
)
 f
s
=1/T
s
 NUMBER of SAMPLES PER SECOND
 T
s
= 125 microsec Æf
s
= 8000 samples/sec
• UNITS ARE HERTZ: 8000 Hz
 UNIFORM SAMPLING at t = nT
s
= n/f
s
 IDEAL: x[n] = x(nT
s
)=x(n/f
s
)
C-to-D
x(t)
x[n]=x(nT
s
)
9/14/2003 © 2003, JH McClellan & RW Schafer 9
f
s
= 2 kHz
f
s
= 500Hz
Hz 100 = f
9/14/2003 © 2003, JH McClellan & RW Schafer 10
SAMPLING THEOREM
 HOW OFTEN ?
 DEPENDS on FREQUENCY of SINUSOID
 ALSO DEPENDS on “RECONSTRUCTION”
9/14/2003 © 2003, JH McClellan & RW Schafer 11
Reconstruction? Which One?
) 4 . 0 cos( ] [ n n x π =
) 4 . 2 cos( ) 4 . 0 cos(
integer an is When
n n
n
π π =
Given the samples, draw a sinusoid through the values
9/14/2003 © 2003, JH McClellan & RW Schafer 12
STORING DIGITAL SOUND
 x[n] is a SAMPLED SINUSOID
 A list of numbers stored in memory
 EXAMPLE: audio CD
 CD rate is 44,100 samples per second
 16-bit samples
 Stereo uses 2 channels
 Number of bytes for 1 minute is
 2 X (16/8) X 60 X 44100 = 10.584 Mbytes
9/14/2003 © 2003, JH McClellan & RW Schafer 13
s
f
s
T
n A n x
ω
ω ω
ϕ ω
= =
+ =
ˆ
)
ˆ
cos( ] [
) cos( ) ( ] [
) cos( ) (
ϕ ω
ϕ ω
+ = =
+ =
s s
nT A nT x n x
t A t x
DISCRETE-TIME SINUSOID
 Change x(t) into x[n] DERIVATION
) ) cos(( ] [ ϕ ω + = n T A n x
s
DEFINE DIGITAL FREQUENCY
9/14/2003 © 2003, JH McClellan & RW Schafer 14
DIGITAL FREQUENCY
 VARIES from 0 to 2π ππ π, as f varies from
0 to the sampling frequency
 DIGITAL FREQUENCY is NORMALIZED
s
s
f
f
T
π
ω ω
2
ˆ
= =
ω
ˆ
ω
ˆ
9/14/2003 © 2003, JH McClellan & RW Schafer 15
SPECTRUM (DIGITAL)
s
f
f
π ω 2 ˆ =
kHz 1 =
s
f
ˆ
ω
1
2
X
1
2
X
*
2π(0.1) π(0.1) π(0.1) π(0.1) –0.2π ππ π
) ) 1000 / )( 100 ( 2 cos( ] [ ϕ π + = n A n x
9/14/2003 © 2003, JH McClellan & RW Schafer 16
SPECTRUM (DIGITAL) ???
ˆ
ω = 2π
f
f
s
f
s
=100 Hz
ˆ
ω
1
2
X
1
2
X
*
2π(1) π(1) π(1) π(1) –2π ππ π
?
x[n] is zero frequency???
) ) 100 / )( 100 ( 2 cos( ] [ ϕ π + = n A n x
9/14/2003 © 2003, JH McClellan & RW Schafer 17
The REST of the STORY
 Spectrum of x[n] has more than one line for
each complex exponential
 Called ALIASING
 MANY SPECTRAL LINES
 SPECTRUM is PERIODIC with period = 2π ππ π
 Because
Acos(
ˆ
ω n + ϕ) = Acos((
ˆ
ω + 2π)n +ϕ)
9/14/2003 © 2003, JH McClellan & RW Schafer 18
ALIASING DERIVATION
 Other Frequencies give the same
ˆ
ω
Hz 1000 at sampled ) 400 cos( ) (
1
= =
s
f t t x π
) 4 . 0 cos( ) 400 cos( ] [
1000
1
n n x
n
π π = =
Hz 1000 at sampled ) 2400 cos( ) (
2
= =
s
f t t x π
) 4 . 2 cos( ) 2400 cos( ] [
1000
2
n n x
n
π π = =
) 4 . 0 cos( ) 2 4 . 0 cos( ) 4 . 2 cos( ] [
2
n n n n n x π π π π = + = =
] [ ] [
1 2
n x n x = ⇒
) 1000 ( 2 400 2400 π π π = −
9/14/2003 © 2003, JH McClellan & RW Schafer 19
ALIASING DERIVATION–2
 Other Frequencies give the same
s
s
f
f
T
π
ω ω
2
ˆ = = π 2 +
ˆ
ω
s
s
s s
s
f
f
f
f
f
f f π π π
ω
2 2 ) ( 2
ˆ : then + =
+
=
and we want : x[n] = Acos(
ˆ
ω n +ϕ)

If x(t ) = A cos( 2π( f + f
s
)t + ϕ)
t ←
n
f
s
9/14/2003 © 2003, JH McClellan & RW Schafer 20
ALIASING CONCLUSIONS
s
or 2f
s
or –f
s
to the FREQ of x(t)
gives exactly the same x[n]
 The samples, x[n] = x(n/ f
s
) are EXACTLY
THE SAME VALUES
 GIVEN x[n], WE CAN’T DISTINGUISH f
o
FROM (f
o
+ f
s
) or (f
o
+ 2f
s
)
9/14/2003 © 2003, JH McClellan & RW Schafer 21
NORMALIZED FREQUENCY
 DIGITAL FREQUENCY
s
s
f
f
T
π
ω ω
2
ˆ
= =
π 2 +
9/14/2003 © 2003, JH McClellan & RW Schafer 22
SPECTRUM for x[n]
 PLOT versus NORMALIZED FREQUENCY
 INCLUDE ALL SPECTRUM LINES
 ALIASES
 ADD MULTIPLES of 2π ππ π
 SUBTRACT MULTIPLES of 2π ππ π
 FOLDED ALIASES
 (to be discussed later)
 ALIASES of NEGATIVE FREQS
9/14/2003 © 2003, JH McClellan & RW Schafer 23
SPECTRUM (MORE LINES)
ˆ
ω
1
2
X
1
2
X
*
2π(0.1) π(0.1) π(0.1) π(0.1) –0.2π ππ π
1
2
X
*
1.8π ππ π
1
2
X
–1.8π ππ π
) ) 1000 / )( 100 ( 2 cos( ] [ ϕ π + = n A n x
kHz 1 =
s
f
s
f
f
π ω 2 ˆ =
9/14/2003 © 2003, JH McClellan & RW Schafer 24
SPECTRUM (ALIASING CASE)
1
2
X
*
–0.5π ππ π
1
2
X
–1.5π ππ π
1
2
X
0.5π ππ π 2.5π ππ π –2.5π ππ π
ˆ
ω
1
2
X
1
2
X
*
1
2
X
*
1.5π ππ π
) ) 80 / )( 100 ( 2 cos( ] [ ϕ π + = n A n x
kHz 80 =
s
f
s
f
f
π ω 2 ˆ =
9/14/2003 © 2003, JH McClellan & RW Schafer 25
SAMPLING GUI (con2dis)
9/14/2003 © 2003, JH McClellan & RW Schafer 26
SPECTRUM (FOLDING CASE)
ˆ
ω = 2π
f
f
s
f
s
= 125Hz
1
2
X
*
0.4π ππ π
1
2
X
–0.4π ππ π 1.6π ππ π –1.6π ππ π
ˆ
ω
1
2
X
1
2
X
*
) ) 125 / )( 100 ( 2 cos( ] [ ϕ π + = n A n x
8/22/2003 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 9
D-to-A Conversion
8/22/2003 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 4: Sections 4-4, 4-5
 Recitation: Section 4-3 (Strobe Demo)
 Next Lecture: Chapter 5 (beginning)
8/22/2003 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 FOLDING: a type of ALIASING
 DIGITAL-to-ANALOG CONVERSION is
 Reconstruction from samples
 SAMPLING THEOREM applies
 Smooth Interpolation
 Mathematical Model of D-to-A
 SUM of SHIFTED PULSES
 Linear Interpolation example
8/22/2003 © 2003, JH McClellan & RW Schafer 5
 A-to-D
 Convert x(t) to numbers stored in memory
 D-to-A
 Convert y[n] back to a “continuous-time”
signal, y(t)
 y[n] is called a “discrete-time” signal
SIGNAL TYPES
COMPUTER D-to-A A-to-D
x(t) y(t) y[n] x[n]
8/22/2003 © 2003, JH McClellan & RW Schafer 6
SAMPLING x(t)
 UNIFORM SAMPLING at t = nT
s
 IDEAL: x[n] = x(nT
s
)
C-to-D
x(t) x[n]
8/22/2003 © 2003, JH McClellan & RW Schafer 7
NYQUIST RATE
 “Nyquist Rate” Sampling
 f
s
> TWICE the HIGHEST Frequency in x(t)
 “Sampling above the Nyquist rate”
 BANDLIMITED SIGNALS
 DEF: x(t) has a HIGHEST FREQUENCY
COMPONENT in its SPECTRUM
 NON-BANDLIMITED EXAMPLE
 TRIANGLE WAVE is NOT BANDLIMITED
8/22/2003 © 2003, JH McClellan & RW Schafer 8
SPECTRUM for x[n]
 INCLUDE ALL SPECTRUM LINES
 ALIASES
 ADD INTEGER MULTIPLES of 2π ππ π and -2π ππ π
 FOLDED ALIASES
 ALIASES of NEGATIVE FREQS
 PLOT versus NORMALIZED
FREQUENCY
 i.e., DIVIDE f
o
by f
s
π π ω 2 2
ˆ
+ =
s
f
f
8/22/2003 © 2003, JH McClellan & RW Schafer 9
EXAMPLE: SPECTRUM
 x[n] = Acos(0.2πn+φ)
 FREQS @ 0.2π and -0.2π
 ALIASES:
 {2.2π, 4.2π, 6.2π, …} & {-1.8π,-3.8π,…}
 EX: x[n] = Acos(4.2πn+φ)
 ALIASES of NEGATIVE FREQ:
 {1.8π,3.8π,5.8π,…} & {-2.2π, -4.2π …}
8/22/2003 © 2003, JH McClellan & RW Schafer 10
SPECTRUM (MORE LINES)
ˆ
ω
1
2
X
1
2
X
*
2π(0.1) π(0.1) π(0.1) π(0.1) –0.2π ππ π
1
2
X
*
1.8π ππ π
1
2
X
–1.8π ππ π
) ) 1000 / )( 100 ( 2 cos( ] [ ϕ π + = n A n x
kHz 1 =
s
f
s
f
f
π ω 2 ˆ =
8/22/2003 © 2003, JH McClellan & RW Schafer 11
SPECTRUM (ALIASING CASE)
1
2
X
*
–0.5π ππ π
1
2
X
–1.5π ππ π
1
2
X
0.5π ππ π 2.5π ππ π –2.5π ππ π
ˆ
ω
1
2
X
1
2
X
*
1
2
X
*
1.5π ππ π
) ) 80 / )( 100 ( 2 cos( ] [ ϕ π + = n A n x
kHz 80 =
s
f
s
f
f
π ω 2 ˆ =
8/22/2003 © 2003, JH McClellan & RW Schafer 12
FOLDING (a type of ALIASING)
 EXAMPLE: 3 different x(t); same x[n]
] ) 1 . 0 ( 2 cos[ ] ) 1 . 0 ( 2 cos[ ] 2 ) 9 . 0 ( 2 cos[
] ) 9 . 0 ( 2 cos[ ) ) 900 ( 2 cos(
] ) 1 . 0 ( 2 cos[ ] ) 1 . 1 ( 2 cos[ ) ) 1100 ( 2 cos(
] ) 1 . 0 ( 2 cos[ ) ) 100 ( 2 cos(
1000
n n n n
n t
n n t
n t
f
s
π π π π
π π
π π π
π π
= − = − =

= →

=
) 1 . 0 ( 2
1000
100
2 ˆ π π ω = =
 900 Hz “folds” to 100 Hz when f
s
=1kHz
8/22/2003 © 2003, JH McClellan & RW Schafer 13
DIGITAL FREQ AGAIN
s
s
f
f
T
π
ω ω
2
ˆ
= =
π 2 +
π
π
ω ω 2
2
ˆ
+ − = =
s
s
f
f
T
FOLDED ALIAS
ω
ˆ
ALIASING
8/22/2003 © 2003, JH McClellan & RW Schafer 14
SPECTRUM (FOLDING CASE)
ˆ
ω = 2π
f
f
s
f
s
= 125Hz
1
2
X
*
0.4π ππ π
1
2
X
–0.4π ππ π 1.6π ππ π –1.6π ππ π
ˆ
ω
1
2
X
1
2
X
*
) ) 125 / )( 100 ( 2 cos( ] [ ϕ π + = n A n x
8/22/2003 © 2003, JH McClellan & RW Schafer 15
FREQUENCY DOMAINS
D-to-A A-to-D
x(t) y(t) x[n]
f
f
ω
f
ˆ
ω
ˆ
y[n]
s
f f
π
ω
2
ˆ
=
π 2 +
s
f
f
π ω 2 ˆ =
8/22/2003 © 2003, JH McClellan & RW Schafer 16
DEMOS from CHAPTER 4
 CD-ROM DEMOS
 SAMPLING DEMO (con2dis GUI)
 Different Sampling Rates
 Aliasing of a Sinusoid
 STROBE DEMO
 Synthetic vs. Real
 Television SAMPLES at 30 fps
 Sampling & Reconstruction
8/22/2003 © 2003, JH McClellan & RW Schafer 17
SAMPLING GUI (con2dis)
8/22/2003 © 2003, JH McClellan & RW Schafer 19
D-to-A Reconstruction
 Create continuous y(t) from y[n]
  IDEAL IDEAL
 If you have formula for y[n]
 Replace n in y[n] with f
s
t
 y[n] = Acos(0.2πn+φ) with f
s
= 8000 Hz
 y(t) = Acos(2π(800)t+φ)
COMPUTER D-to-A A-to-D
x(t) y(t) y[n] x[n]
8/22/2003 © 2003, JH McClellan & RW Schafer 20
D-to-A is AMBIGUOUS !
 ALIASING
 Given y[n], which y(t) do we pick ? ? ?
 INFINITE NUMBER of y(t)
 PASSING THRU THE SAMPLES, y[n]
 D-to-A RECONSTRUCTION MUST CHOOSE
ONE OUTPUT
 RECONSTRUCT THE SMOOTHEST
ONE
 THE LOWEST FREQ, if y[n] = sinusoid
8/22/2003 © 2003, JH McClellan & RW Schafer 21
SPECTRUM (ALIASING CASE)
ˆ
ω = 2π
f
f
s
f
s
= 80Hz
1
2
X
*
–0.5π ππ π
1
2
X
–1.5π ππ π
1
2
X
0.5π ππ π 2.5π ππ π –2.5π ππ π
ˆ
ω
1
2
X
1
2
X
*
1
2
X
*
1.5π ππ π
) ) 80 / )( 100 ( 2 cos( ] [ ϕ π + = n A n x
8/22/2003 © 2003, JH McClellan & RW Schafer 22
Reconstruction (D-to-A)
 CONVERT STREAM of NUMBERS to x(t)
 “CONNECT THE DOTS”
 INTERPOLATION
y(t)
y[k]
kT
s
(k+1)T
s
t
INTUITIVE,
conveys the idea
8/22/2003 © 2003, JH McClellan & RW Schafer 23
SAMPLE & HOLD DEVICE
 CONVERT y[n] to y(t)
 y[k] should be the value of y(t) at t = kT
s
 Make y(t) equal to y[k] for
 kT
s
-0.5T
s
< t < kT
s
+0.5T
s
y(t)
y[k]
kT
s
(k+1)T
s
t
STAIR-STEP
APPROXIMATION
8/22/2003 © 2003, JH McClellan & RW Schafer 24
SQUARE PULSE CASE
8/22/2003 © 2003, JH McClellan & RW Schafer 25
OVER-SAMPLING CASE
EASIER TO RECONSTRUCT
8/22/2003 © 2003, JH McClellan & RW Schafer 26
MATH MODEL for D-to-A
SQUARE PULSE:
8/22/2003 © 2003, JH McClellan & RW Schafer 27
EXPAND the SUMMATION
 SUM of SHIFTED PULSES p(t-nT
s
)
 “WEIGHTED” by y[n]
 CENTERED at t=nT
s
 SPACED by T
s
 RESTORES “REAL TIME”

y[n]p(t − nT
s
) =
n= −∞

…+ y[0]p(t) + y[1]p(t − T
s
) + y[2]p(t − 2T
s
) +…
8/22/2003 © 2003, JH McClellan & RW Schafer 28
p(t)
8/22/2003 © 2003, JH McClellan & RW Schafer 29
TRIANGULAR PULSE (2X)
8/22/2003 © 2003, JH McClellan & RW Schafer 30
OPTIMAL PULSE ?
CALLED
“BANDLIMITED
INTERPOLATION”
… , 2 , for 0 ) (
for
sin
) (
s s
T
t
T
t
T T t t p
t t p
s
s
± ± = =
∞ < < ∞ − =
π
π
2/18/2005 © 2003, JH McClellan & RW Schafer 1
Si gnal Pr oc essi ng Fi r st
Lec t ur e 10
FI R Fi l t er i ng I nt r o
2/18/2005 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 5, Sects. 5-1, 5-2 and 5-3 (partial)
 Recitation: Ch. 5, Sects 5-4, 5-6, 5-7 and 5-8
 CONVOLUTION
 Next Lecture: Ch 5, Sects. 5-3, 5-5 and 5-6
2/18/2005 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJ ECTI VES
 INTRODUCE FILTERING IDEA
 Weighted Average
 Running Average
 FINITE IMPULSE RESPONSE FILTERS
  FIR FIR Filters
 Show how to compute the output y[n] from
the input signal, x[n]
2/18/2005 © 2003, JH McClellan & RW Schafer 5
DI GI TAL FI LTERI NG
 CONCENTRATE on the COMPUTER
 PROCESSING ALGORITHMS
 SOFTWARE (MATLAB)
 HARDWARE: DSP chips, VLSI
 DSP: DIGITAL SIGNAL PROCESSING
COMPUTER D-to-A A-to-D
x(t) y(t) y[n] x[n]
2/18/2005 © 2003, JH McClellan & RW Schafer 6
The TMS32010, 1983
First PC plug-in board from Atlanta Signal Processors Inc.
2/18/2005 © 2003, JH McClellan & RW Schafer 7
Roc k l and Di gi t al Fi l t er , 1971
For the price of a small house, you could have one of these.
2/18/2005 © 2003, JH McClellan & RW Schafer 8
Di gi t al Cel l Phone (c a. 2000)
Now it plays video
2/18/2005 © 2003, JH McClellan & RW Schafer 9
DI SCRETE-TI ME SYSTEM
 OPERATE on x[n] to get y[n]
 WANT a GENERAL CLASS of SYSTEMS
 ANALYZE the SYSTEM
 TOOLS: TIME-DOMAIN & FREQUENCY-
DOMAIN
 SYNTHESIZE the SYSTEM
COMPUTER
y[n] x[n]
2/18/2005 © 2003, JH McClellan & RW Schafer 10
D-T SYSTEM EXAMPLES
 EXAMPLES:
 POINTWISE OPERATORS
 SQUARING: y[n] = (x[n])
2
 RUNNING AVERAGE
 RULE: “the output at time n is the average of three
consecutive input values”
SYSTEM
y[n] x[n]
2/18/2005 © 2003, JH McClellan & RW Schafer 11
DI SCRETE-TI ME SI GNAL
 x[n] is a LIST of NUMBERS
 INDEXED by “n”
STEM PLOT
2/18/2005 © 2003, JH McClellan & RW Schafer 12
3-PT AVERAGE SYSTEM
 Do this for each “n”
Make a TABLE
n=0
n=1
]) 2 [ ] 1 [ ] [ ( ] [
3
1
+ + + + = n x n x n x n y
2/18/2005 © 2003, JH McClellan & RW Schafer 13
INPUT SIGNAL
OUTPUT SIGNAL
]) 2 [ ] 1 [ ] [ ( ] [
3
1
+ + + + = n x n x n x n y
2/18/2005 © 2003, JH McClellan & RW Schafer 14
PAST, PRESENT, FUTURE
“n” is TIME
2/18/2005 © 2003, JH McClellan & RW Schafer 15
ANOTHER 3-pt AVERAGER
 Uses “PAST” VALUES of x[n]
 IMPORTANT IF “n” represents REAL TIME
 WHEN x[n] & y[n] ARE STREAMS
]) 2 [ ] 1 [ ] [ ( ] [
3
1
− + − + = n x n x n x n y
2/18/2005 © 2003, JH McClellan & RW Schafer 16
GENERAL CAUSAL FI R FI LTER
 FILTER COEFFICIENTS {b
k
}
 DEFINE THE FILTER
 For example,

=
− =
M
k
k
k n x b n y
0
] [ ] [
] 3 [ ] 2 [ 2 ] 1 [ ] [ 3
] [ ] [
3
0
− + − + − − =
− =

=
n x n x n x n x
k n x b n y
k
k
} 1 , 2 , 1 , 3 { − =
k
b
2/18/2005 © 2003, JH McClellan & RW Schafer 17
GENERAL FI R FI LTER
 FILTER COEFFICIENTS {b
k
}
 FILTER ORDER is M
 FILTER LENGTH is L = M+1
 NUMBER of FILTER COEFFS is L

=
− =
M
k
k
k n x b n y
0
] [ ] [
2/18/2005 © 2003, JH McClellan & RW Schafer 18
 SLIDE a WINDOW across x[n]
x[n] x[n-M]

=
− =
M
k
k
k n x b n y
0
] [ ] [
GENERAL CAUSAL FI R FI LTER
2/18/2005 © 2003, JH McClellan & RW Schafer 19
FI LTERED STOCK SI GNAL
OUTPUT
INPUT
50-pt Averager
2/18/2005 © 2003, JH McClellan & RW Schafer 20

=
=
0 0
0 1
] [
n
n
n δ
SPECI AL I NPUT SI GNALS
 x[n] = SINUSOID
 x[n] has only one NON-ZERO VALUE
1
n
UNIT-IMPULSE
FREQUENCY RESPONSE (LATER)
2/18/2005 © 2003, JH McClellan & RW Schafer 21
UNI T I MPULSE SI GNAL δ[n]
δ[n] is NON-ZERO
When its argument
is equal to ZERO
] 3 [ − n δ
3 = n
2/18/2005 © 2003, JH McClellan & RW Schafer 22
] 4 [ 2 ] 3 [ 4 ] 2 [ 6 ] 1 [ 4 ] [ 2 ] [ − + − + − + − + = n n n n n n x δ δ δ δ δ
MATH FORMULA f or x [ n]
 Use SHIFTED IMPULSES to write x[n]
2/18/2005 © 2003, JH McClellan & RW Schafer 23
SUM of SHI FTED I MPULSES
This formula ALWAYS works
2/18/2005 © 2003, JH McClellan & RW Schafer 24
4-pt AVERAGER
 CAUSAL SYSTEM: USE PAST VALUES
]) 3 [ ] 2 [ ] 1 [ ] [ ( ] [
4
1
− + − + − + = n x n x n x n x n y
 INPUT = UNIT IMPULSE SIGNAL = δ[n]
] 3 [ ] 2 [ ] 1 [ ] [ ] [
] [ ] [
4
1
4
1
4
1
4
1
− + − + − + =
=
n n n n n y
n n x
δ δ δ δ
δ
 OUTPUT is called “IMPULSE RESPONSE”
} , 0 , 0 , , , , , 0 , 0 , { ] [
4
1
4
1
4
1
4
1
K K = n h
2/18/2005 © 2003, JH McClellan & RW Schafer 25
} , 0 , 0 , , , , , 0 , 0 , { ] [
4
1
4
1
4
1
4
1
K K = n h
4-pt Avg I mpul se Response
δ[n] “READS OUT” the FILTER COEFFICIENTS
n=0
“h” in h[n] denotes
Impulse Response
1
n
n=0
n=1
n=4
n=5
n=–1
NON-ZERO
When window
overlaps δ[n]
]) 3 [ ] 2 [ ] 1 [ ] [ ( ] [
4
1
− + − + − + = n x n x n x n x n y
2/18/2005 © 2003, JH McClellan & RW Schafer 26
FI R I MPULSE RESPONSE
 Convolution = Filter Definition
 Filter Coeffs = Impulse Response

=
− =
M
k
k n x k h n y
0
] [ ] [ ] [
CONVOLUTION

=
− =
M
k
k
k n x b n y
0
] [ ] [
2/18/2005 © 2003, JH McClellan & RW Schafer 27
FI LTERI NG EXAMPLE
 7-point AVERAGER
 Removes cosine
 By making its amplitude (A) smaller
 3-point AVERAGER
 Changes A slightly
( )

=
− =
6
0
7
1
7
] [ ] [
k
k n x n y
( )

=
− =
2
0
3
1
3
] [ ] [
k
k n x n y
2/18/2005 © 2003, JH McClellan & RW Schafer 28
3-pt AVG EXAMPLE
USE PAST VALUES
40 0 for ) 4 / 8 / 2 cos( ) 02 . 1 ( ] [ : Input ≤ ≤ + + = n n n x
n
π π
2/18/2005 © 2003, JH McClellan & RW Schafer 29
7-pt FI R EXAMPLE (AVG)
CAUSAL: Use Previous
LONGER OUTPUT
40 0 for ) 4 / 8 / 2 cos( ) 02 . 1 ( ] [ : Input ≤ ≤ + + = n n n x
n
π π
8/22/2003 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 11
Linearity & Time-Invariance
Convolution
8/22/2003 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 5, Sections 5-5 and 5-6
 Section 5-4 will be covered, but not “in depth”
 Recitation: Ch. 5, Sects 5-6, 5-7 & 5-8
 CONVOLUTION
 Next Lecture: start Chapter 6
8/22/2003 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 BLOCK DIAGRAM REPRESENTATION
 Components for Hardware
 Connect Simple Filters Together to Build More
Complicated Systems
LTI SYSTEMS
 GENERAL PROPERTIES of FILTERS
  L LINEARITY
  T TIME-I INVARIANCE
 ==> CONVOLUTION CONVOLUTION
8/22/2003 © 2003, JH McClellan & RW Schafer 5
 IMPULSE RESPONSE,
 FIR case: same as
 CONVOLUTION
 GENERAL:
 GENERAL CLASS of SYSTEMS
 LINEAR and TIME-INVARIANT
 ALL LTI systems have h[n] & use convolution
OVERVIEW
] [ ] [ ] [ n x n h n y ∗ =
] [n h
} {
k
b
8/22/2003 © 2003, JH McClellan & RW Schafer 6
 CONCENTRATE on the FILTER (DSP)
 DISCRETE-TIME SIGNALS
 FUNCTIONS of n, the “time index”
 INPUT x[n]
 OUTPUT y[n]
DIGITAL FILTERING
FILTER D-to-A A-to-D
x(t) y(t) y[n] x[n]
8/22/2003 © 2003, JH McClellan & RW Schafer 7
BUILDING BLOCKS
 BUILD UP COMPLICATED FILTERS
 FROM SIMPLE MODULES
 Ex: FILTER MODULE MIGHT BE 3-pt FIR
FILTER
y[n] x[n]
FILTER
FILTER
+
+
INPUT
OUTPUT
8/22/2003 © 2003, JH McClellan & RW Schafer 8
GENERAL FIR FILTER
 FILTER COEFFICIENTS {b
k
}
 DEFINE THE FILTER
 For example,

=
− =
M
k
k
k n x b n y
0
] [ ] [
] 3 [ ] 2 [ 2 ] 1 [ ] [ 3
] [ ] [
3
0
− + − + − − =
− =

=
n x n x n x n x
k n x b n y
k
k
} 1 , 2 , 1 , 3 { − =
k
b
8/22/2003 © 2003, JH McClellan & RW Schafer 9
MATLAB for FIR FILTER
 yy = conv(bb,xx)
 VECTOR bb contains Filter Coefficients
 DSP-First: yy = firfilt(bb,xx)
 FILTER COEFFICIENTS {b
k
}
conv2()
for images

=
− =
M
k
k
k n x b n y
0
] [ ] [
8/22/2003 © 2003, JH McClellan & RW Schafer 10
SPECIAL INPUT SIGNALS
 x[n] = SINUSOID
 x[n] has only one NON-ZERO VALUE
1
n
UNIT-IMPULSE
FREQUENCY RESPONSE

=
=
0 0
0 1
] [
n
n
n δ
8/22/2003 © 2003, JH McClellan & RW Schafer 11
FIR IMPULSE RESPONSE
 Convolution = Filter Definition
 Filter Coeffs = Impulse Response

=
− =
M
k
k
k n x b n y
0
] [ ] [

=
− =
M
k
k
k n b n h
0
] [ ] [ δ
8/22/2003 © 2003, JH McClellan & RW Schafer 12
] 4 [ ] 3 [ ] 2 [ 2 ] 1 [ ] [ ] [ − + − − − + − − = n n n n n n h δ δ δ δ δ
MATH FORMULA for h[n]
 Use SHIFTED IMPULSES to write h[n]
1
n
–1
2
0
4
] [n h
} 1 , 1 , 2 , 1 , 1 { − − =
k
b
8/22/2003 © 2003, JH McClellan & RW Schafer 13

=
− =
M
k
k n x k h n y
0
] [ ] [ ] [
LTI: Convolution Sum
  Output = Convolution of x[n] & h[n] Output = Convolution of x[n] & h[n]
 NOTATION:
 Here is the FIR case:
FINITE LIMITS
FINITE LIMITS
Same as b
k
] [ ] [ ] [ n x n h n y ∗ =
8/22/2003 © 2003, JH McClellan & RW Schafer 14
CONVOLUTION Example
n −1 0 1 2 3 4 5 6 7
x[n] 0 1 1 1 1 1 1 1 ...
h[n] 0 1 −1 2 −1 1 0 0 0
0 1 1 1 1 1 1 1 1
0 0 −1 −1 −1 −1 −1 −1 −1
0 0 0 2 2 2 2 2 2
0 0 0 0 −1 −1 −1 −1 −1
0 0 0 0 0 1 1 1 1
y[n] 0 1 0 2 1 2 2 2 ...
] [ ] [
] 4 [ ] 3 [ ] 2 [ 2 ] 1 [ ] [ ] [
n u n x
n n n n n n h
=
− + − − − + − − = δ δ δ δ δ
] 4 [ ] 4 [
] 3 [ ] 3 [
] 2 [ ] 2 [
] 1 [ ] 1 [
] [ ] 0 [

n x h
n x h
n x h
n x h
n x h
8/22/2003 © 2003, JH McClellan & RW Schafer 15
GENERAL FIR FILTER
 SLIDE a Length-L WINDOW over x[n]
x[n] x[n-M]
8/22/2003 © 2003, JH McClellan & RW Schafer 16
DCONVDEMO: MATLAB GUI
8/22/2003 © 2003, JH McClellan & RW Schafer 17
] 1 [ ] [ ] [ − − = n u n u n y
POP QUIZ
 FIR Filter is “FIRST DIFFERENCE”
 y[n] = x[n] - x[n-1]
 INPUT is “UNIT STEP”
 Find y[n]

<

=
0 0
0 1
] [
n
n
n u
] [ ] 1 [ ] [ ] [ n n u n u n y δ = − − =
8/22/2003 © 2003, JH McClellan & RW Schafer 18
HARDWARE STRUCTURES
 INTERNAL STRUCTURE of “FILTER”
 WHAT COMPONENTS ARE NEEDED?
 HOW DO WE “HOOK” THEM TOGETHER?
 SIGNAL FLOW GRAPH NOTATION
FILTER
y[n] x[n]

=
− =
M
k
k
k n x b n y
0
] [ ] [
8/22/2003 © 2003, JH McClellan & RW Schafer 19
HARDWARE ATOMS

=
− =
M
k
k
k n x b n y
0
] [ ] [
] [ ] [ n x n y β =
] 1 [ ] [ − = n x n y
] [ ] [ ] [
2 1
n x n x n y + =
8/22/2003 © 2003, JH McClellan & RW Schafer 20
FIR STRUCTURE
 Direct Form
SIGNAL
FLOW GRAPH

=
− =
M
k
k
k n x b n y
0
] [ ] [
8/22/2003 © 2003, JH McClellan & RW Schafer 21
Moore’s Law for TI DSPs
Double every
18 months ?
LOG SCALE
8/22/2003 © 2003, JH McClellan & RW Schafer 22
SYSTEM PROPERTIES
  MATHEMATICAL DESCRIPTION MATHEMATICAL DESCRIPTION
  TIME TIME- -INVARIANCE INVARIANCE
  LINEARITY LINEARITY
 CAUSALITY
 “No output prior to input”
SYSTEM
y[n] x[n]
8/22/2003 © 2003, JH McClellan & RW Schafer 23
TIME-INVARIANCE
 IDEA:
 “Time-Shifting the input will cause the same
time-shift in the output”
 EQUIVALENTLY,
 We can prove that
 The time origin (n=0) is picked arbitrary
8/22/2003 © 2003, JH McClellan & RW Schafer 24
TESTING Time-Invariance
8/22/2003 © 2003, JH McClellan & RW Schafer 25
LINEAR SYSTEM
 LINEARITY = Two Properties
 SCALING
 “Doubling x[n] will double y[n]”
 SUPERPOSITION:
 “Adding two inputs gives an output that is the
sum of the individual outputs”
8/22/2003 © 2003, JH McClellan & RW Schafer 26
TESTING LINEARITY
8/22/2003 © 2003, JH McClellan & RW Schafer 27
LTI SYSTEMS
 LTI: Linear & Time-Invariant
 COMPLETELY CHARACTERIZED by:
 IMPULSE RESPONSE h[n]
 CONVOLUTION: y[n] = x[n]*h[n]
 The “rule”defining the system can ALWAYS be re-
written as convolution
 FIR Example: h[n] is same as b
k
8/22/2003 © 2003, JH McClellan & RW Schafer 28
POP QUIZ
 FIR Filter is “FIRST DIFFERENCE”
 y[n] = x[n] - x[n -1]
 Write output as a convolution
 Need impulse response
 Then, another way to compute the output:
] 1 [ ] [ ] [ − − = n n n h δ δ
( ) ] [ ] 1 [ ] [ ] [ n x n n n y ∗ − − = δ δ
8/22/2003 © 2003, JH McClellan & RW Schafer 29
 Does the order of S
1
& S
2
matter?
 NO, LTI SYSTEMS can be rearranged !!!
 WHAT ARE THE FILTER COEFFS? {b
k
}
S
1
S
2
8/22/2003 © 2003, JH McClellan & RW Schafer 30
 Find “overall” h[n] for a cascade ?
S
1
S
2
S
1
S
2
2/25/2005 © 2003, JH McClellan & RW Schafer 1
Si gnal Pr oc essi ng Fi r st
Lec t ur e 12
Fr equenc y Response
of FI R Fi l t er s
2/25/2005 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 6, Sections 6-1, 6-2, 6-3, 6-4, & 6-5
 Recitation: Chapter 6
 FREQUENCY RESPONSE EXAMPLES
 Next Lecture: Chap. 6, Sects. 6-6, 6-7 & 6-8
2/25/2005 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJ ECTI VES
 SINUSOIDAL INPUT SIGNAL
 DETERMINE the FIR FILTER OUTPUT
 FREQUENCY RESPONSE of FIR
 PLOTTING vs. Frequency
 MAGNITUDE vs. Freq
 PHASE vs. Freq
) ( ˆ ˆ
ˆ
) ( ) (
ω
ω ω
j
e H j j j
e e H e H

=
MAG
PHASE
2/25/2005 © 2003, JH McClellan & RW Schafer 5
DOMAI NS: Ti me & Fr equenc y
 Time-Domain: “n” = time
 x[n] discrete-time signal
 x(t) continuous-time signal
 Frequency Domain (sum of sinusoids)
 Spectrum vs. f (Hz)
• ANALOG vs. DIGITAL
 Spectrum vs. omega-hat
 Move back and forth QUICKLY
2/25/2005 © 2003, JH McClellan & RW Schafer 8
DI GI TAL “ FI LTERI NG”
 CONCENTRATE on the SPECTRUM SPECTRUM
 SINUSOIDAL INPUT
 INPUT x[n] = SUM of SINUSOIDS
 Then, OUTPUT y[n] = SUM of SINUSOIDS
FILTER D-to-A A-to-D
x(t) y(t) y[n] x[n]
ωˆ
ωˆ
2/25/2005 © 2003, JH McClellan & RW Schafer 9
FI LTERI NG EXAMPLE
 7-point AVERAGER
 Removes cosine
 By making its amplitude (A) smaller
 3-point AVERAGER
 Changes A slightly
( )

=
− =
6
0
7
1
7
] [ ] [
k
k n x n y
( )

=
− =
2
0
3
1
3
] [ ] [
k
k n x n y
2/25/2005 © 2003, JH McClellan & RW Schafer 10
3-pt AVG EXAMPLE
USE PAST VALUES
40 0 for ) 4 / 8 / 2 cos( ) 02 . 1 ( ] [ : Input ≤ ≤ + + = n n n x
n
π π
2/25/2005 © 2003, JH McClellan & RW Schafer 11
7-pt FI R EXAMPLE (AVG)
CAUSAL: Use Previous
LONGER OUTPUT
40 0 for ) 4 / 8 / 2 cos( ) 02 . 1 ( ] [ : Input ≤ ≤ + + = n n n x
n
π π
2/25/2005 © 2003, JH McClellan & RW Schafer 12
SI NUSOI DAL RESPONSE
 INPUT: x[n] = SINUSOID
 OUTPUT: y[n] will also be a SINUSOID
 Different Amplitude and Phase
SAMEFrequency
 AMPLITUDE & PHASE CHANGE
 Called the FREQUENCY RESPONSE FREQUENCY RESPONSE
2/25/2005 © 2003, JH McClellan & RW Schafer 13
DCONVDEMO: MATLAB GUI
2/25/2005 © 2003, JH McClellan & RW Schafer 14
COMPLEX EXPONENTI AL
∑ ∑
= =
− = − =
M
k
M
k
k
k n x k h k n x b n y
0 0
] [ ] [ ] [ ] [
FIR DIFFERENCE EQUATION
∞ < < ∞ − = n e Ae n x
n j j ω ϕ ˆ
] [
x[n] is the input signal—a complex exponential
2/25/2005 © 2003, JH McClellan & RW Schafer 15
COMPLEX EXP OUTPUT
 Use the FIR “Difference Equation”
n j j
e Ae H
ω ϕ
ω
ˆ
)
ˆ
( =
∑ ∑
=

=
= − =
M
k
k n j j
k
M
k
k
e Ae b k n x b n y
0
) ( ˆ
0
] [ ] [
ω ϕ
n j j
M
k
k j
k
e Ae e b
ω ϕ ω ˆ
0
) ( ˆ

=

=

2/25/2005 © 2003, JH McClellan & RW Schafer 16
FREQUENCY RESPONSE
 Complex-valued formula
 Has MAGNITUDE vs. frequency
 And PHASE vs. frequency
 Notation:
FREQUENCY
RESPONSE
 At each frequency, we can DEFINE
) ˆ ( of place in ) (
ˆ
ω
ω
H e H
j
k j
M
k
k
e b H
ω
ω
ˆ
0
) ˆ (

=

=
k j
M
k
k
j
e b e H
ω ω ˆ
0
ˆ
) (

=

=
2/25/2005 © 2003, JH McClellan & RW Schafer 17
EXAMPLE 6.1
EXPLOIT
SYMMETRY
} 1 , 2 , 1 { } { =
k
b
) ˆ cos 2 2 (
) 2 (
2 1 ) (
ˆ
ˆ ˆ ˆ
ˆ 2 ˆ ˆ
ω
ω
ω ω ω
ω ω ω
+ =
+ + =
+ + =

− −
− −
j
j j j
j j j
e
e e e
e e e H
ω
ω
ω
ω
ω
ˆ ) ( is Phase and
) ˆ cos 2 2 ( ) ( is Magnitude
0 ) ˆ cos 2 2 ( Since
ˆ
ˆ
− = ∠
+ =
≥ +
j
j
e H
e H
2/25/2005 © 2003, JH McClellan & RW Schafer 18
PLOT of FREQ RESPONSE
ω ω
ω
ˆ ˆ
) ˆ cos 2 2 ( ) (
j j
e e H

+ = RESPONSE at π/3
} 1 , 2 , 1 { } { =
k
b
π − π
ωˆ
2/25/2005 © 2003, JH McClellan & RW Schafer 19
EXAMPLE 6.2
y[n] x[n]
) (
ˆ ω j
e H
ω ω
ω
ˆ ˆ
) ˆ cos 2 2 ( ) (
j j
e e H

+ =
n j j
j
e e n x
e H n y
) 3 / ( 4 /
ˆ
2 ] [ and
known is ) ( when ] [ Find
π π
ω
=
2/25/2005 © 2003, JH McClellan & RW Schafer 20
n j j
e e n x n y
) 3 / ( 4 /
2 ] [ when ] [ Find
π π
=
EXAMPLE 6.2 (answ er )
3 / ˆ at ) ( evaluate - Step One
ˆ
π ω
ω
=
j
e H
ω ω
ω
ˆ ˆ
) ˆ cos 2 2 ( ) (
j j
e e H

+ =
3 / ˆ @ 3 ) (
3 / ˆ
π ω
π ω
= =
− j j
e e H
( )
n j j j
e e e n y
) 3 / ( 4 / 3 /
2 3 ] [
π π π
× =
− n j j
e e
) 3 / ( 12 /
6
π π −
=
2/25/2005 © 2003, JH McClellan & RW Schafer 21
EXAMPLE: COSI NE I NPUT
) cos( 2 ] [ and
known is ) ( when ] [ Find
4 3
ˆ
π π
ω
+ = n n x
e H n y
j
ω ω
ω
ˆ ˆ
) ˆ cos 2 2 ( ) (
j j
e e H

+ =
y[n] x[n]
) (
ˆ ω j
e H
ωˆ ωˆ
2/25/2005 © 2003, JH McClellan & RW Schafer 22
EX: COSI NE I NPUT
) cos( 2 ] [ when ] [ Find
4 3
π π
+ = n n x n y
] [ ] [ ] [
) cos( 2
2 1
) 4 / 3 / ( ) 4 / 3 / (
4 3
n x n x n x
e e n
n j n j
+ = ⇒
+ = +
+ − + π π π π
π π
] [ ] [ ] [
) ( ] [
) ( ] [
2 1
) 4 / 3 / ( 3 /
2
) 4 / 3 / ( 3 /
1
n y n y n y
e e H n y
e e H n y
n j j
n j j
+ = ⇒
=
=
+ − −
+
π π π
π π π
Use
Linearity
2/25/2005 © 2003, JH McClellan & RW Schafer 23
EX: COSI NE I NPUT (ans-2)
) cos( 2 ] [ when ] [ Find
4 3
π π
+ = n n x n y
) 4 / 3 / ( ) 3 / ( ) 4 / 3 / ( 3 /
2
) 4 / 3 / ( ) 3 / ( ) 4 / 3 / ( 3 /
1
3 ) ( ] [
3 ) ( ] [
π π π π π π
π π π π π π
+ − + − −
+ − +
= =
= =
n j j n j j
n j j n j j
e e e e H n y
e e e e H n y
) cos( 6 ] [
3 3 ] [
12 3
) 12 / 3 / ( ) 12 / 3 / (
π π
π π π π
− = ⇒
+ =
− − −
n n y
e e n y
n j n j
ω ω
ω
ˆ ˆ
) ˆ cos 2 2 ( ) (
j j
e e H

+ =
2/25/2005 © 2003, JH McClellan & RW Schafer 24
MATLAB:
FREQUENCY RESPONSE
 HH = freqz(bb,1,ww)
 VECTOR bb contains Filter Coefficients
 SP-First: HH = freekz(bb,1,ww)
 FILTER COEFFICIENTS {b
k
}
k j
M
k
k
j
e b e H
ω ω ˆ
0
ˆ
) (

=

=
2/25/2005 © 2003, JH McClellan & RW Schafer 26
Ti me & Fr equenc y Rel at i on
 Get Frequency Response from h[n]
 Here is the FIR case:
k j
M
k
k j
M
k
k
j
e k h e b e H
ω ω ω ˆ
0
ˆ
0
ˆ
] [ ) (

=

=
∑ ∑
= =
IMPULSE RESPONSE
2/25/2005 © 2003, JH McClellan & RW Schafer 27
BLOCK DI AGRAMS
 Equivalent Representations
y[n] x[n]
y[n] x[n]
) (
ˆ ω j
e H
] [n h
ωˆ
ˆ
ω
2/25/2005 © 2003, JH McClellan & RW Schafer 28
UNI T-DELAY SYSTEM
y[n] x[n]
] 1 [ − n δ
y[n] x[n]
ωˆ j
e

) (
ˆ ω j
e H
ˆ
ω
ˆ
ω
] 1 [ ] [ for ) ( and ] [ Find
ˆ
− = n x n y e H n h

} 1 , 0 { } { =
k
b
2/25/2005 © 2003, JH McClellan & RW Schafer 29
FI RST DI FFERENCE SYSTEM
y[n]
x[n]
ωˆ
1
j
e

y[n] x[n]
] 1 [ ] [ − − n n δ δ
) (
ˆ ω j
e H
] 1 [ ] [ ] [ : Equation
e Differenc for the ) ( and ] [ Find
ˆ
− − = n x n x n y
e H n h

2/25/2005 © 2003, JH McClellan & RW Schafer 30
DLTI Demo w i t h Si nusoi ds
FILTER
x[n]
y[n]
2/25/2005 © 2003, JH McClellan & RW Schafer 31
 Does the order of S
1
& S
2
matter?
 NO, LTI SYSTEMS can be rearranged !!!
 WHAT ARE THE FILTER COEFFS? {b
k
}
 WHAT is the overall FREQUENCY
RESPONSE ?
S
1
S
2
] [n δ
] [
1
n h ] [ ] [
2 1
n h n h ∗
] [
1
n h ] [
2
n h
2/25/2005 © 2003, JH McClellan & RW Schafer 32
 MULTIPLY the Frequency Responses
y[n] x[n]
) (
ˆ ω j
e H
x[n]
) (
ˆ
1
ω j
e H
y[n]
) (
ˆ
2
ω j
e H
) ( ) ( ) (
ˆ
2
ˆ
1
ˆ ω ω ω j j j
e H e H e H =
EQUIVALENT
SYSTEM
10/6/2003 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 13
Digital Filtering
of Analog Signals
10/6/2003 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 6, Sections 6-6, 6-7 & 6-8
 Recitation: Chapter 6
 FREQUENCY RESPONSE EXAMPLES
 Next Lecture: Chapter 7
10/6/2003 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 Two Domains: Time & Frequency
 Track the spectrum of x[n] thru an FIR
Filter: Sinusoid-IN gives Sinusoid-OUT
 UNIFICATION: How does Frequency
Response affect x(t) to produce y(t) ?
D-to-A A-to-D
x(t) y(t) y[n] x[n]
) (
ˆ ω j
e H
FIR
ωˆ ωˆ
10/6/2003 © 2003, JH McClellan & RW Schafer 5
TIME & FREQUENCY
FIR DIFFERENCE EQUATION is the TIME-DOMAIN
∑ ∑
= =
− = − =
M
k
M
k
k
k n x k h k n x b n y
0 0
] [ ] [ ] [ ] [

=

=
M
k
k j j
e k h e H
0
ˆ ˆ
] [ ) (
ω ω
" + + + + =
− − − ω ω ω ω ˆ 3 ˆ 2 ˆ ˆ
] 3 [ ] 2 [ ] 1 [ ] 0 [ ) (
j j j j
e h e h e h h e H
10/6/2003 © 2003, JH McClellan & RW Schafer 6
Ex: DELAY by 2 SYSTEM
y[n] x[n]
) (
ˆ ω j
e H
y[n] x[n]
] [n h
] 2 [ ] [ for ) ( and ] [ Find
ˆ
− = n x n y e H n h

] 2 [ ] [ − = n n h δ
} 1 , 0 , 0 { =
k
b
ωˆ ωˆ
10/6/2003 © 2003, JH McClellan & RW Schafer 7
DELAY by 2 SYSTEM
k = 2 ONLY
y[n] x[n]
] 2 [ − n δ
] 2 [ ] [ for ) ( and ] [ Find
ˆ
− = n x n y e H n h

=

− =
M
k
k j j
e k e H
0
ˆ ˆ
] 2 [ ) (
ω ω
δ
) (
ˆ ω j
e H
y[n] x[n]
ωˆ 2 j
e

ωˆ ωˆ
10/6/2003 © 2003, JH McClellan & RW Schafer 8
GENERAL DELAY PROPERTY
ONLY ONE
non-ZERO TERM
for k at k = n
d
d
n j
M
k
k j
d
j
e e n k e H
ω ω ω
δ
ˆ
0
ˆ ˆ
] [ ) (

=

= − =

] [ ] [ for ) ( and ] [ Find
ˆ
d
j
n n x n y e H n h − =
ω
] [ ] [
d
n n n h − = δ
10/6/2003 © 2003, JH McClellan & RW Schafer 9
FREQ DOMAIN --> TIME ??
k
j
b n h e H or find and ] [ ) (
ˆ ω
) ˆ cos( 7 ) (
ˆ 2 ˆ
ω
ω ω j j
e e H

=
y[n] x[n]
] [n h
? ] [ = n h
y[n] x[n]
) (
ˆ ω j
e H
ωˆ ωˆ
10/6/2003 © 2003, JH McClellan & RW Schafer 10
FREQ DOMAIN --> TIME
EULER’s Formula
)
ˆ
cos( 7 ) (
ˆ 2 ˆ
ω
ω ω j j
e e H

=
) 5 . 0 5 . 0 ( 7
ˆ ˆ ˆ 2 ω ω ω j j j
e e e
− −
+ =
) 5 . 3 5 . 3 (
ˆ 3 ˆ ω ω j j
e e
− −
+ =
] 3 [ 5 . 3 ] 1 [ 5 . 3 ] [ − + − = n n n h δ δ
} 5 . 3 , 0 , 5 . 3 , 0 { =
k
b
10/6/2003 © 2003, JH McClellan & RW Schafer 11
PREVIOUS LECTURE REVIEW
 SINUSOIDAL INPUT SIGNAL
 OUTPUT has SAME FREQUENCY
 DIFFERENT Amplitude and Phase
 FREQUENCY RESPONSE of FIR
 MAGNITUDE vs. Frequency
 PHASE vs. Freq
 PLOTTING
) ( ˆ ˆ
ˆ
) ( ) (
ω
ω ω
j
e H j j j
e e H e H

=
MAG
PHASE
10/6/2003 © 2003, JH McClellan & RW Schafer 12
FREQ. RESPONSE PLOTS
 DENSE GRID (ww) from -π ππ π to +π ππ π
 ww = -pi:(pi/100):pi;
 HH = freqz(bb,1,ww)
 VECTOR bb contains Filter Coefficients
 DSP-First: HH = freekz(bb,1,ww)

=

=
M
k
k j
k
j
e b e H
0
ˆ ˆ
) (
ω ω
10/6/2003 © 2003, JH McClellan & RW Schafer 13
PLOT of FREQ RESPONSE
ω ω
ω
ˆ ˆ
) ˆ cos 2 2 ( ) (
j j
e e H

+ = RESPONSE at π ππ π/3
} 1 , 2 , 1 { } { =
k
b
π − π
ωˆ
10/6/2003 © 2003, JH McClellan & RW Schafer 14
EXAMPLE 6.2
ωˆ ωˆ
y[n] x[n]
) (
ˆ ω j
e H
ω ω
ω
ˆ ˆ
) ˆ cos 2 2 ( ) (
j j
e e H

+ =
n j j
j
e e n x
e H n y
) 3 / ( 4 /
ˆ
2 ] [ and
known is ) ( when ] [ Find
π π
ω
=
10/6/2003 © 2003, JH McClellan & RW Schafer 15
n j j
e e n x n y
) 3 / ( 4 /
2 ] [ when ] [ Find
π π
=
3 / ˆ at ) ( evaluate - Step One
ˆ
π ω
ω
=
j
e H
ω ω
ω
ˆ ˆ
) ˆ cos 2 2 ( ) (
j j
e e H

+ =
3 / ˆ @ 3 ) (
3 / ˆ
π ω
π ω
= =
− j j
e e H
( )
n j j j
e e e n y
) 3 / ( 4 / 3 /
2 3 ] [
π π π
× =
− n j j
e e
) 3 / ( 12 /
6
π π −
=
10/6/2003 © 2003, JH McClellan & RW Schafer 16
EXAMPLE: COSINE INPUT
) cos( 2 ] [ and
known is ) ( when ] [ Find
4 3
ˆ
π π
ω
+ = n n x
e H n y
j
ω ω
ω
ˆ ˆ
) ˆ cos 2 2 ( ) (
j j
e e H

+ =
y[n] x[n]
) (
ˆ ω j
e H
ωˆ ωˆ
10/6/2003 © 2003, JH McClellan & RW Schafer 17
EX: COSINE INPUT (ans-1)
) cos( 2 ] [ when ] [ Find
4 3
π π
+ = n n x n y
] [ ] [ ] [
) cos( 2
2 1
) 4 / 3 / ( ) 4 / 3 / (
4 3
n x n x n x
e e n
n j n j
+ = ⇒
+ = +
+ − + π π π π
π π
] [ ] [ ] [
) ( ] [
) ( ] [
2 1
) 4 / 3 / ( 3 /
2
) 4 / 3 / ( 3 /
1
n y n y n y
e e H n y
e e H n y
n j j
n j j
+ = ⇒
=
=
+ − −
+
π π π
π π π
10/6/2003 © 2003, JH McClellan & RW Schafer 18
EX: COSINE INPUT (ans-2)
) cos( 2 ] [ when ] [ Find
4 3
π π
+ = n n x n y
) 4 / 3 / ( ) 3 / ( ) 4 / 3 / ( 3 /
2
) 4 / 3 / ( ) 3 / ( ) 4 / 3 / ( 3 /
1
3 ) ( ] [
3 ) ( ] [
π π π π π π
π π π π π π
+ − + − −
+ − +
= =
= =
n j j n j j
n j j n j j
e e e e H n y
e e e e H n y
) cos( 6 ] [
3 3 ] [
12 3
) 12 / 3 / ( ) 12 / 3 / (
π π
π π π π
− = ⇒
+ =
− − −
n n y
e e n y
n j n j
ω ω
ω
ˆ ˆ
)
ˆ
cos 2 2 ( ) (
j j
e e H

+ =
10/6/2003 © 2003, JH McClellan & RW Schafer 19
SINUSOID thru FIR
 IF
 Multiply the Magnitudes
)) ( ˆ cos( ) ( ] [
) ˆ cos( ] [
1 1
ˆ
1
ˆ
1
ω ω
φ ω
φ ω
j j
e H n e H A n y
n A n x
∠ + + = ⇒
+ =
) ( ) (
ˆ ˆ * ω ω j j
e H e H

=
10/6/2003 © 2003, JH McClellan & RW Schafer 20
LTI Demo with Sinusoids
FILTER
x[n]
y[n]
10/6/2003 © 2003, JH McClellan & RW Schafer 21
DIGITAL “FILTERING”
 SPECTRUM of x(t) (SUM of SINUSOIDS)
 SPECTRUM of x[n]
 Is ALIASING a PROBLEM ?
 SPECTRUM y[n] (FIR Gain or Nulls)
 Then, OUTPUT y(t) = SUM of SINUSOIDS
D-to-A A-to-D
x(t) y(t) y[n] x[n]
) (
ˆ ω j
e H
ωˆ ωˆ
ω ω
ω
ˆ
ω
ω
10/6/2003 © 2003, JH McClellan & RW Schafer 22
FREQUENCY SCALING
 TIME SAMPLING:
 IF NO ALIASING:
 FREQUENCY SCALING
D-to-A A-to-D
x(t) y(t) y[n] x[n]
) (
ˆ ω j
e H
ˆ
ω
ˆ
ω
ω ω
s
f
s
T
ω
ω ω = =
ˆ
s
nT t =
10/6/2003 © 2003, JH McClellan & RW Schafer 23
11-pt AVERAGER Example
D-to-A A-to-D
x(t) y(t) y[n] x[n]
) (
ˆ ω j
e H
ˆ
ω
ˆ
ω
ω ω
250 Hz
25 Hz
?
) ) 250 ( 2 cos( ) ) 25 ( 2 cos( ) (
2
1
π π π − + = t t t x
ω ω
ω
ω
ˆ 5
2
1
2
11
ˆ
)
ˆ
sin( 11
)
ˆ
sin(
) (
j j
e e H

=

=
− =
10
0
11
1
] [ ] [
k
k n x n y
10/6/2003 © 2003, JH McClellan & RW Schafer 24
D-A FREQUENCY SCALING
 RECONSTRUCT up to 0.5f
s
 FREQUENCY SCALING
D-to-A A-to-D
x(t) y(t) y[n] x[n]
) (
ˆ ω j
e H
ˆ
ω
ˆ
ω
ω ω
 TIME SAMPLING:
s
f ω ω
ˆ
=
s s
f t n nT t ← ⇒ =
10/6/2003 © 2003, JH McClellan & RW Schafer 25
TRACK the FREQUENCIES
D-to-A A-to-D
x(t) y(t) y[n] x[n]
) (
ˆ ω j
e H
ˆ
ω
ˆ
ω
ω ω
Fs = 1000 Hz
 0.5π ππ π
 .05π ππ π
 0.5π ππ π
 .05π ππ π
 250 Hz
 25 Hz
NO new freqs
 250 Hz
 25 Hz
) (
) (
05 . 0
5 . 0
π
π
j
j
e H
e H
10/6/2003 © 2003, JH McClellan & RW Schafer 26
11-pt AVERAGER
NULLS or ZEROS
π ω 5 . 0 ˆ =
π ω 05 . 0 ˆ =
10/6/2003 © 2003, JH McClellan & RW Schafer 27
EVALUATE Freq. Response
ω ω
ω
ω
ˆ 5
2
1
2
11
ˆ
) ˆ sin( 11
) ˆ sin(
) (
j j
e e H

=
) 5 . 0 ( 5
2
1
2
11
ˆ
)) 5 . 0 ( sin( 11
)) 5 . 0 ( sin(
) (
π ω
π
π
j j
e e H

=
π ω 5 . 0 ˆ At =
π
π
π
5 . 2
) 25 . 0 sin( 11
) 75 . 2 sin(
j
e

=
π 5 . 0
0909 . 0
j
e

=
10/6/2003 © 2003, JH McClellan & RW Schafer 28
EVALUATE Freq. Response
f
s
= 1000
MAG SCALE
PHASE CHANGE
) (
1000 / ) 25 ( 2π j
e H
) (
1000 / ) 250 ( 2π j
e H
10/6/2003 © 2003, JH McClellan & RW Schafer 29
EFFECTIVE RESPONSE
DIGITAL FILTER
LOW-PASS FILTER
) (
ˆ ω j
e H
10/6/2003 © 2003, JH McClellan & RW Schafer 30
FILTER TYPES
 LOW-PASS FILTER (LPF)
 BLURRING
 ATTENUATES HIGH FREQUENCIES
 HIGH-PASS FILTER (HPF)
 SHARPENING for IMAGES
 BOOSTS THE HIGHS
 REMOVES DC
 BAND-PASS FILTER
(BPF)
10/6/2003 © 2003, JH McClellan & RW Schafer 31
B & W IMAGE
10/6/2003 © 2003, JH McClellan & RW Schafer 32
B&W IMAGE with COSINE
FILTERED: 11-pt AVG
10/6/2003 © 2003, JH McClellan & RW Schafer 33
FILTERED B&W IMAGE
LPF:
BLUR
10/6/2003 © 2003, JH McClellan & RW Schafer 34
ROW of B&W IMAGE
BLACK = 255
WHITE = 0
10/6/2003 © 2003, JH McClellan & RW Schafer 35
FILTERED ROW of IMAGE
8/22/2003 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 14
Z Transforms: Introduction
8/22/2003 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 7, Sects 7-1 through 7-5
 Recitation: Ch. 7
 Next Lecture: Chapter 7, 7-6 to the end
8/22/2003 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 INTRODUCE the Z-TRANSFORM
 Give Mathematical Definition
 Show how the H(z) POLYNOMIAL simplifies
analysis
 CONVOLUTION is SIMPLIFIED !
 Z-Transform can be applied to
 FIR Filter: h[n] --> H(z)
 Signals: x[n] --> X(z)

=
n
n
z n h z H ] [ ) (
) ( ] [ z H n h →
) ( ] [ z X n x →
8/22/2003 © 2003, JH McClellan & RW Schafer 5
TWO (no, THREE) DOMAINS
Z-TRANSFORM-DOMAIN
POLYNOMIALS: H(z)
FREQ-DOMAIN
k j
M
k
k
j
e b e H
ω ω ˆ
0
ˆ
) (

=

=
TIME-DOMAIN

=
− =
M
k
k
k n x b n y
0
] [ ] [
} {
k
b
8/22/2003 © 2003, JH McClellan & RW Schafer 6
TRANSFORM CONCEPT
 Move to a new domain where
 OPERATIONS are EASIER & FAMILIAR
 Use POLYNOMIALS
 TRANSFORM both ways
 x[n] ---> X(z) (into the z domain)
 X(z) ---> x[n] (back to the time domain)
) ( ] [ z X n x →
] [ ) ( n x z X →
8/22/2003 © 2003, JH McClellan & RW Schafer 7
“TRANSFORM” EXAMPLE
 Equivalent Representations
y[n] x[n]
y[n] x[n]

=
n
n j j
e n h e H
ω ω ˆ ˆ
] [ ) (
ω ω ˆ ˆ
1 ) (
j j
e e H

− =
] 1 [ ] [ ] [ − − = n n n h δ δ
8/22/2003 © 2003, JH McClellan & RW Schafer 8
Z-TRANSFORM IDEA
 POLYNOMIAL REPRESENTATION
y[n] x[n]
y[n] x[n]
) (z H
] [n h

=
n
n
z n h z H ] [ ) (
8/22/2003 © 2003, JH McClellan & RW Schafer 9
Z-Transform DEFINITION
 POLYNOMIAL Representation of LTI
SYSTEM:
 EXAMPLE:

=
n
n
z n h z H ] [ ) (
APPLIES to
Any SIGNAL
POLYNOMIAL in z
-1
4 3 2 1 0
2 0 3 0 2 ) (
− − − − −
+ + − + = z z z z z z H
4 2
2 3 2
− −
+ − = z z
4 1 2 1
) ( 2 ) ( 3 2
− −
+ − = z z
} 2 , 0 , 3 , 0 , 2 { ]} [ { − = n h
8/22/2003 © 2003, JH McClellan & RW Schafer 10
Z-Transform EXAMPLE
 ANY SIGNAL has a z-Transform:

=
n
n
z n x z X ] [ ) (
4 3 2 1
2 4 6 4 2 ) (
− − − −
+ + + + = z z z z z X ? ) ( = z X
8/22/2003 © 2003, JH McClellan & RW Schafer 11
5 3 1
3 2 1 ) (
− − −
− + − = z z z z X
EXPONENT GIVES
TIME LOCATION
? ] [ = n x
8/22/2003 © 2003, JH McClellan & RW Schafer 12
Z-Transform of FIR Filter
 CALLED the SYSTEM FUNCTION SYSTEM FUNCTION
 h[n] is same as {b
k
}
FIR DIFFERENCE EQUATION
∑ ∑
= =
− = − =
M
k
M
k
k
k n x k h k n x b n y
0 0
] [ ] [ ] [ ] [
CONVOLUTION
SYSTEM
FUNCTION
∑ ∑
=

=

= =
M
k
k
M
k
k
k
z k h z b z H
0 0
] [ ) (
8/22/2003 © 2003, JH McClellan & RW Schafer 13
] 2 [ ] 1 [ 5 ] [ 6 ] [ − + − − = n x n x n x n y
2 1 1
5 6 ) (
− − −
+ − = =

z z z b z H
k
Z-Transform of FIR Filter
 Get H(z) DIRECTLY from the {b
k
}
 Example 7.3 in the book:
} 1 , 5 , 6 { } { − =
k
b
8/22/2003 © 2003, JH McClellan & RW Schafer 14
Ex. DELAY SYSTEM
 UNIT DELAY: find h[n] and H(z)
y[n] x[n]
y[n] = x[n-1] x[n]
] 1 [ − n δ

− =
n
z n z H ] 1 [ ) ( δ
1 −
= z
1 −
z
8/22/2003 © 2003, JH McClellan & RW Schafer 15
DELAY EXAMPLE
 UNIT DELAY: find y[n] via polynomials
 x[n] = {3,1,4,1,5,9,0,0,0,...}
6 5 4 3 2 1 0
9 5 4 3 0 ) (
− − − − − −
+ + + + + + = z z z z z z z z Y
) 9 5 4 3 ( ) (
5 4 3 2 1 1 − − − − − −
+ + + + + = z z z z z z z Y
) ( ) (
1
z X z z Y

=
8/22/2003 © 2003, JH McClellan & RW Schafer 16
DELAY PROPERTY
8/22/2003 © 2003, JH McClellan & RW Schafer 17
GENERAL I/O PROBLEM
 Input is x[n], find y[n] (for FIR, h[n])
 How to combine X(z) and H(z) ?
8/22/2003 © 2003, JH McClellan & RW Schafer 18
FIR Filter = CONVOLUTION
∑ ∑
= =
− = − =
M
k
M
k
k
k n x k h k n x b n y
0 0
] [ ] [ ] [ ] [
CONVOLUTION 8/22/2003 © 2003, JH McClellan & RW Schafer 19
CONVOLUTION PROPERTY
 PROOF:
MULTIPLY
Z-TRANSFORMS
8/22/2003 © 2003, JH McClellan & RW Schafer 20
CONVOLUTION EXAMPLE
 MULTIPLY the z-TRANSFORMS:
MULTIPLY H(z)X(z)
8/22/2003 © 2003, JH McClellan & RW Schafer 21
CONVOLUTION EXAMPLE
 Finite-Length input x[n]
 FIR Filter (L=4)
MULTIPLY
Z-TRANSFORMS
y[n] = ?
8/22/2003 © 2003, JH McClellan & RW Schafer 22
 Does the order of S
1
& S
2
matter?
 NO, LTI SYSTEMS can be rearranged !!!
 Remember: h
1
[n] * h
2
[n]
 How to combine H
1
(z) and H
2
(z) ?
S
1
S
2
8/22/2003 © 2003, JH McClellan & RW Schafer 23
 Multiply the System Functions
x[n]
) (
1
z H
y[n]
) (
2
z H
) ( ) ( ) (
2 1
z H z H z H =
y[n] x[n]
) (z H
EQUIVALENT
SYSTEM
8/22/2003 © 2003, JH McClellan & RW Schafer 24
y[n] x[n]
) (z H
x[n]
) (
1
z H
y[n]
) (
2
z H
w[n]
1
2
1 ) (

+ = z z H
1
1
1 ) (

− = z z H
2 1 1
1 ) 1 )( 1 ( ) (
− − −
− = + − = z z z z H
] 2 [ ] [ ] [ − − = n x n x n y
] 1 [ ] [ ] [ − − = n x n x n w
] 1 [ ] [ ] [ − + = n w n w n y
8/22/2003 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 15
Zeros of H(z) and the
Frequency Domain
8/22/2003 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 7, Section 7-6 to end
 Recitation & Lab: Chapter 7
 ZEROS (and POLES)
 Next Lecture:Chapter 8
8/22/2003 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 ZEROS and POLES
 Relate H(z) to FREQUENCY RESPONSE
 THREE DOMAINS:
 Show Relationship for FIR:
ω
ω
ˆ
) ( ) (
ˆ
j
e z
j
z H e H
=
=
) ( ) ( ] [
ˆ ω j
e H z H n h ↔ ↔
8/22/2003 © 2003, JH McClellan & RW Schafer 5
DESIGN PROBLEM
 Example:
 Design a Lowpass FIR filter (Find b
k
)
 Reject completely 0.7π ππ π, 0.8π ππ π, and 0.9π ππ π
 This is NULLING
 Estimate the filter length needed to
accomplish this task. How many b
k
?
 Z POLYNOMIALS provide the TOOLS
8/22/2003 © 2003, JH McClellan & RW Schafer 6
Z-Transform DEFINITION
 POLYNOMIAL Representation of LTI
SYSTEM:
 EXAMPLE:

=
n
n
z n h z H ] [ ) (
APPLIES to
Any SIGNAL
POLYNOMIAL in z
-1
4 3 2 1 0
2 0 3 0 2 ) (
− − − − −
+ + − + = z z z z z z H
4 2
2 3 2
− −
+ − = z z
4 1 2 1
) ( 2 ) ( 3 2
− −
+ − = z z
} 2 , 0 , 3 , 0 , 2 { ]} [ { − = n h
8/22/2003 © 2003, JH McClellan & RW Schafer 7
) ( ) ( ) ( ] [ ] [ ] [ z X z H z Y n x n h n y = ↔ ∗ =
CONVOLUTION PROPERTY
 Convolution in the n-domain
 SAME AS
 Multiplication in the z-domain
MULTIPLY
z-TRANSFORMS
FIR Filter

=
− =
∗ =
M
k
k n x k h
n h n x n y
0
] [ ] [
] [ ] [ ] [
8/22/2003 © 2003, JH McClellan & RW Schafer 8
CONVOLUTION EXAMPLE
y[n] x[n]
H(z)
] [ ] [ ] [ n h n x n y ∗ =
2 1
2 ) (
− −
+ = z z z X
1
1 ) (

− = z z H
3 2 1 1 2 1
2 ) 1 )( 2 ( ) (
− − − − − −
− + = − + = z z z z z z z Y
] 1 [ ] [ ] [ − − = n n n h δ δ ] 2 [ 2 ] 1 [ ] [ − + − = n n n x δ δ
] 3 [ 2 ] 2 [ ] 1 [ ] [ − − − + − = n n n n y δ δ δ
8/22/2003 © 2003, JH McClellan & RW Schafer 9
THREE DOMAINS
Z-TRANSFORM-DOMAIN
POLYNOMIALS: H(z)
FREQ-DOMAIN
k j
M
k
k
j
e b e H
ω ω ˆ
0
ˆ
) (

=

=
TIME-DOMAIN

=
− =
M
k
k
k n x b n y
0
] [ ] [
} {
k
b
8/22/2003 © 2003, JH McClellan & RW Schafer 10
k j
M
k
k
j
k j
M
k
k
j
e b e H
e b e H

=

=

=
=

) ( ) (
) (
Domain
ˆ
ˆ
0
ˆ
ˆ
0
ˆ
ω ω
ω ω
ω
FREQUENCY RESPONSE ?
 Same Form:
SAME COEFFICIENTS
ω
ˆ
j
e z =
k
M
k
k
z b z H
z

=

=

0
) (
Domain
8/22/2003 © 2003, JH McClellan & RW Schafer 11
ANOTHER ANALYSIS TOOL
 z-Transform POLYNOMIALS are EASY !
 ROOTS, FACTORS, etc.
  ZEROS and POLES: where is H(z) = 0 ? ZEROS and POLES: where is H(z) = 0 ?
 The z-domain is COMPLEX
 H(z) is a COMPLEX-VALUED function of a COMPLEX
VARIABLE z.
8/22/2003 © 2003, JH McClellan & RW Schafer 12
ZEROS of H(z)
 Find z, where H(z)=0
1
2
1
1 ) (

− = z z H
2
1
: at Zero = z
0
? 0 1
2
1
1
2
1
= −
= −

z
z
8/22/2003 © 2003, JH McClellan & RW Schafer 13
ZEROS of H(z)
 Find z, where H(z)=0
 Interesting when z is ON the unit circle.
3 2 1
2 2 1 ) (
− − −
− + − = z z z z H
) 1 )( 1 ( ) (
2 1 1 − − −
+ − − = z z z z H
2
3
2
1
, 1 : Roots j z ± =
3 / π j
e
±
8/22/2003 © 2003, JH McClellan & RW Schafer 14
PLOT ZEROS in z-DOMAIN
3 ZEROS
H(z) = 0
3 POLES
UNIT
CIRCLE
8/22/2003 © 2003, JH McClellan & RW Schafer 15
POLES of H(z)
 Find z, where
 Not very interesting for the FIR case
3 2 1
2 2 1 ) (
− − −
− + − = z z z z H
∞ → ) (z H
3
2 3
1 2 2
) (
z
z z z
z H
− + −
=
0 : at Poles Three = z
8/22/2003 © 2003, JH McClellan & RW Schafer 16
FREQ. RESPONSE from ZEROS
 Relate H(z) to FREQUENCY RESPONSE
 EVALUATE H(z) on the UNIT CIRCLE UNIT CIRCLE
 ANGLE is same as FREQUENCY
ω
ω
ˆ
) ( ) (
ˆ
j
e z
j
z H e H
=
=
varies)
ˆ
(as
ˆ
=
= ω
ω j
e z
8/22/2003 © 2003, JH McClellan & RW Schafer 17
ANGLE is FREQUENCY
ω
ω
ˆ
) ( ) (
ˆ
j
e z
j
z H e H
=
=
8/22/2003 © 2003, JH McClellan & RW Schafer 18
FIR Frequency Response
) ( and ) ( of Zeros
ˆ
z H e H

8/22/2003 © 2003, JH McClellan & RW Schafer 19
3 DOMAINS MOVIE: FIR
ZEROS MOVE
) (
ˆ ω j
e H ] [n h
) (z H
8/22/2003 © 2003, JH McClellan & RW Schafer 20
n j j
e e H n y
) 3 / ( ) 3 / (
) ( ] [
π π
⋅ =
NULLING PROPERTY of H(z)
 When H(z)=0 on the unit circle.
 Find inputs x[n] that give zero output
y[n] x[n]
) (z H
3 2 1
2 2 1 ) (
− − −
− + − = z z z z H
ω ω ω ω ˆ 3 ˆ 2 ˆ ˆ
2 2 1 ) (
j j j j
e e e e H
− − −
− + − =
n j
e n x
) 3 / (
] [
π
=
? ) (
3 /
=
π j
e H
8/22/2003 © 2003, JH McClellan & RW Schafer 21
PLOT ZEROS in z-DOMAIN
3 ZEROS
H(z) = 0
3 POLES
UNIT
CIRCLE
8/22/2003 © 2003, JH McClellan & RW Schafer 22
NULLING PROPERTY of H(z)
 Evaluate H(z) at the input “frequency”
ω ω ω ω ˆ 3 ˆ 2 ˆ ˆ
2 2 1 ) (
j j j j
e e e e H
− − −
− + − =
n j j
e e H n y
) 3 / ( 3 /
) ( ] [
π π
⋅ =
n j j j j
e e e e n y
) 3 / ( 3 / 3 3 / 2 3 /
) 2 2 1 ( ] [
π π π π
⋅ − + − =
− − −
)) 1 ( ) ( 2 ) ( 2 1 (
2
3
2
1
2
3
2
1
− − − − + − − j j
0 ) 1 3 1 3 1 1 ( ] [
) 3 / (
= ⋅ + − − + − =
n j
e j j n y
π
8/22/2003 © 2003, JH McClellan & RW Schafer 23
FIR Frequency Response
) ( and ) ( of Zeros
ˆ
z H e H

8/22/2003 © 2003, JH McClellan & RW Schafer 24
DESIGN PROBLEM
 Example:
 Design a Lowpass FIR filter (Find b
k
)
 Reject completely 0.7π ππ π, 0.8π ππ π, and 0.9π ππ π
 Estimate the filter length needed to
accomplish this task. How many b
k
?
 Z POLYNOMIALS provide the TOOLS
8/22/2003 © 2003, JH McClellan & RW Schafer 25
PeZ Demo: Zero Placing
8/22/2003 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 16
IIR Filters: Feedback
and H(z)
8/22/2003 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 8, Sects. 8-1, 8-2 & 8-3
 Recitation: Ch. 8, Sects 8-1 thru 8-4
 POLES & ZEROS
 Next Lecture: Chapter 8, Sects. 8-4 8-5 & 8-6
8/22/2003 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 Show how to compute the output y[n]
 FIRST-ORDER CASE (N=1)
 Z-transform: Impulse Response h[n] ÅÆH(z)

y[n] = a

y[n − ]
=1
N

+ b
k
x[n − k]
k=0
M

 INFINITE IMPULSE RESPONSE FILTERS
 Define IIR IIR DIGITAL Filters
 Have FEEDBACK FEEDBACK: use PREVIOUS OUTPUTS
8/22/2003 © 2003, JH McClellan & RW Schafer 5
THREE DOMAINS
Z-TRANSFORM-DOMAIN
POLYNOMIALS: H(z)
FREQ-DOMAIN
k j
M
k
k
j
e b e H
ω ω ˆ
0
ˆ
) (

=

=
TIME-DOMAIN

=
− =
M
k
k
k n x b n y
0
] [ ] [
} {
k
b
8/22/2003 © 2003, JH McClellan & RW Schafer 6
Quick Review: Delay by n
d
IMPULSE RESPONSE
SYSTEM FUNCTION d
n
z z H

= ) (
] [ ] [
d
n n x n y − =
FREQUENCY RESPONSE
] [ ] [
d
n n n h − = δ
d
n j j
e e H
ω ω ˆ ˆ
) (

=
8/22/2003 © 2003, JH McClellan & RW Schafer 8
 FIND the IMPULSE RESPONSE, h[n]
 INFINITELY LONG
  IIR IIR Filters
 EXPLOIT THREE DOMAINS:
 Show Relationship for IIR:
h[n] ↔ H(z) ↔ H(e
j
ˆ
ω
)
H(z) = h[n]z
−n
n=0

8/22/2003 © 2003, JH McClellan & RW Schafer 9
ONE FEEDBACK TERM
 CAUSALITY
 NOT USING FUTURE OUTPUTS or INPUTS
y[n] = a
1
y[n −1]+ b
0
x[n] +b
1
x[n −1]
FIR PART of the FILTER
FEED-FORWARD
PREVIOUS
FEEDBACK
8/22/2003 © 2003, JH McClellan & RW Schafer 10
FILTER COEFFICIENTS
 MATLAB
 yy = filter([3,-2],[1,-0.8],xx)
y[n] = 0.8y[n −1]+ 3x[n] −2x[n −1]
SIGN CHANGE
FEEDBACK COEFFICIENT
8/22/2003 © 2003, JH McClellan & RW Schafer 11
COMPUTE OUTPUT
8/22/2003 © 2003, JH McClellan & RW Schafer 12
COMPUTE y[n]
 FEEDBACK DIFFERENCE EQUATION:
y[n] = 0.8y[n −1]+ 5x[n]
y[0] = 0.8y[−1] + 5x[0]
 NEED y[-1] to get started
8/22/2003 © 2003, JH McClellan & RW Schafer 13
AT REST CONDITION
 y[n] = 0, for n<0
 BECAUSE x[n] = 0, for n<0
8/22/2003 © 2003, JH McClellan & RW Schafer 14
COMPUTE y[0]
 THIS STARTS THE RECURSION:
 SAME with MORE FEEDBACK TERMS
y[n] = a
1
y[n −1]+ a
2
y[n − 2] + b
k
x[n − k]
k=0
2

8/22/2003 © 2003, JH McClellan & RW Schafer 15
COMPUTE MORE y[n]
 CONTINUE THE RECURSION:
8/22/2003 © 2003, JH McClellan & RW Schafer 16
PLOT y[n]
8/22/2003 © 2003, JH McClellan & RW Schafer 17
y[n] = a
1
y[n −1]+ b
0
x[n]
IMPULSE RESPONSE
u[n] =1, for n ≥ 0
h[n] = a
1
h[n −1]+ b
0
δ[n]
] [ ) ( ] [
1 0
n u a b n h
n
=
8/22/2003 © 2003, JH McClellan & RW Schafer 18
IMPULSE RESPONSE
 DIFFERENCE EQUATION:
 Find h[n]
 CONVOLUTION in TIME-DOMAIN
h[n]
y[n] = h[n]∗ x[n]
x[n]
IMPULSE
RESPONSE
y[n] = 0.8y[n −1]+ 3x[n]
h[n] = 3(0.8)
n
u[n]
LTI SYSTEM
8/22/2003 © 2003, JH McClellan & RW Schafer 19
PLOT IMPULSE RESPONSE
h[n] = b
0
(a
1
)
n
u[n] = 3(0.8)
n
u[n]
8/22/2003 © 2003, JH McClellan & RW Schafer 20
Infinite-Length Signal: h[n]
 POLYNOMIAL Representation
 SIMPLIFY the SUMMATION
H(z) = h[n]z
−n
n=−∞

APPLIES to
Any SIGNAL
∑ ∑

=
− −

−∞ =
= =
0
1 0 1 0
] [ ) ( ) (
n
n n n
n
n
z a b z n u a b z H
8/22/2003 © 2003, JH McClellan & RW Schafer 21
Derivation of H(z)
 Recall Sum of Geometric Sequence:
 Yields a COMPACT FORM
r
n
n=0

=
1
1− r
1
1
1
0
0
1
1 0
0
1 0
if
1
) ( ) (
a z
z a
b
z a b z a b z H
n
n
n
n n
>

=
= =

=

=

∑ ∑
8/22/2003 © 2003, JH McClellan & RW Schafer 22
H(z) = z-Transform{ h[n] }
 FIRST-ORDER IIR FILTER:
y[n] = a
1
y[n −1]+ b
0
x[n]
H(z) =
b
0
1− a
1
z
−1
] [ ) ( ] [
1 0
n u a b n h
n
=
8/22/2003 © 2003, JH McClellan & RW Schafer 23
H(z) = z-Transform{ h[n] }
 ANOTHER FIRST-ORDER IIR FILTER:
y[n] = a
1
y[n −1]+ b
0
x[n] +b
1
x[n −1]
H(z) =
b
0
1− a
1
z
−1
+
b
1
z
−1
1− a
1
z
−1
=
b
0
+ b
1
z
−1
1 − a
1
z
−1
] 1 [ ) ( ] [ ) ( ] [
1
1 1 1 0
− + =

n u a b n u a b n h
n n
shift a is
1 −
z
8/22/2003 © 2003, JH McClellan & RW Schafer 24
CONVOLUTION PROPERTY
 MULTIPLICATION of z-TRANSFORMS
 CONVOLUTION in TIME-DOMAIN
Y(z) = H(z)X(z)
X(z)
h[n]
y[n] = h[n]∗ x[n]
x[n]
H(z)
IMPULSE
RESPONSE
8/22/2003 © 2003, JH McClellan & RW Schafer 25
STEP RESPONSE: x[n]=u[n]
u[n] =1, for n ≥ 0
8/22/2003 © 2003, JH McClellan & RW Schafer 26
DERIVE STEP RESPONSE
8/22/2003 © 2003, JH McClellan & RW Schafer 27
PLOT STEP RESPONSE
y[n] = 15 1 − 0.8
n+1
( )
u[n] y[n] = 0.8y[n −1]+ 3u[n]
Si gnal Pr oc essi ng Fi r st
Lec t ur e 17
I I R Fi l t er s: H(z) and
Fr equenc y Response
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 8, Sects. 8-4 8-5 & 8-6
 Recitation: Chapter 8, all
 POLE-ZERO PLOTS
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 4
LECTURE OBJ ECTI VES
 SYSTEM FUNCTION: H(z)
 H(z) has POLES and ZEROS
 FREQUENCY RESPONSE of IIR
 Get H(z) first
 THREE-DOMAIN APPROACH
ω
ω
ˆ
) ( ) (
ˆ
j
e z
j
z H e H
=
=
) ( ) ( ] [
ˆ ω j
e H z H n h ↔ ↔
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 5
THREE DOMAI NS
Z-TRANSFORM-DOMAIN
POLYNOMIALS: H(z)
FREQ-DOMAIN

ω
ω
ω
ˆ
1
ˆ
0
ˆ
1
) (
j
N
k j
M
k
k
j
e a
e b
e H

=

=

=
TIME-DOMAIN
∑ ∑
= =
− + − =
M
k
k
N
k n x b n y a n y
0 1
] [ ] [ ] [

} , {
k
b a

Use H(z) to get
Freq. Response
z = e
j
ˆ
ω
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 6
H(z) = z-Tr ansf or m{ h[ n] }
 FIRST-ORDER IIR FILTER:
y[n] = a
1
y[n −1]+ b
0
x[n]
H(z) =
b
0
1− a
1
z
−1
] [ ) ( ] [
1 0
n u a b n h
n
=
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 7
Typi c al I MPULSE Response
h[n] = b
0
(a
1
)
n
u[n] = 3(0.8)
n
u[n]
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 8
Fi r st -Or der Tr ansf or m Pai r
 GEOMETRIC SEQUENCE:
h[n] = ba
n
u[n] ↔ H(z) =
b
1− a z
−1
1
1
1
0
0
1
1 0
0
1 0
if
1
) ( ) (
a z
z a
b
z a b z a b z H
n
n
n
n n
>

=
= =

=

=

∑ ∑
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 9
DELAY PROPERTY of X(z)
 DELAY in TIME<-->Multiply X(z) by z
-1
x[n]↔ X(z)
x[n −1] ↔z
−1
X(z)

Proof: x[n −1]z
−n
n= −∞

= x[]z
− ( +1)
=−∞

= z
−1
x[]z

= −∞

= z
−1
X(z)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 10
y[n] = a
1
y[n −1]+ b
0
x[n] +b
1
x[n −1]
Z-Tr ansf or m of I I R Fi l t er
 DERIVE the SYSTEM FUNCTION H(z)
 Use DELAY DELAY PROPERTY
Y(z) = a
1
z
−1
Y(z) + b
0
X(z) + b
1
z
−1
X(z)
EASIER with DELAY PROPERTY
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 11
H(z) =
Y(z)
X(z)
=
b
0
+b
1
z
−1
1− a
1
z
−1
=
B(z)
A(z)
SYSTEM FUNCTI ON of I I R
 NOTE the FILTER COEFFICIENTS
Y(z) − a
1
z
−1
Y(z) = b
0
X(z) + b
1
z
−1
X(z)
(1 − a
1
z
−1
)Y(z) = (b
0
+ b
1
z
−1
)X(z)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 12
SYSTEM FUNCTI ON
 DIFFERENCE EQUATION:
y[n] = 0.8y[n −1]+ 3x[n] −2x[n −1]
) (
8 . 0 1
2 3
) (
1
1
z X
z
z
z Y

=

H(z)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 13
CONVOLUTI ON PROPERTY
  MULTIPLICATION MULTIPLICATION of z-TRANSFORMS
  CONVOLUTION CONVOLUTION in TIME-DOMAIN
Y(z) = H(z)X(z)
X(z)
h[n]
y[n] = h[n]∗ x[n]
x[n]
H(z)
IMPULSE
RESPONSE
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 14
POLES & ZEROS
 ROOTS of Numerator & Denominator
POLE: H(z) Æinf
ZERO:
H(z)=0
H(z) =
b
0
+ b
1
z
−1
1 − a
1
z
−1
→ H(z) =
b
0
z + b
1
z − a
1
b
0
z + b
1
= 0 ⇒ z = −
b
1
b
0
z − a
1
= 0 ⇒ z = a
1
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 15
EXAMPLE: Pol es & Zer os
 VALUE of H(z) at POLES is INFINITE INFINITE
POLE at z=0.8
ZERO at z= -1
∞ → =

+
=
=
− −
− +
=

+
=

0 ) ( 8 . 0 1
) ( 2 2
) (
0
) 1 ( 8 . 0 1
) 1 ( 2 2
) (
8 . 0 1
2 2
) (
2
9
1
5
4
1
5
4
1
1
z H
z H
z
z
z H
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 16
POLE-ZERO PLOT
2 + 2z
−1
1 −0.8z
−1
ZERO at z = -1
POLE at
z = 0.8
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 17
FREQUENCY RESPONSE
 SYSTEM FUNCTION: H(z)
 H(z) has DENOMINATOR
 FREQUENCY RESPONSE of IIR
 We have H(z)
 THREE-DOMAIN APPROACH
H(e
j
ˆ
ω
) = H(z)
z =e
j
ˆ
ω
h[n] ↔ H(z) ↔ H(e
j
ˆ
ω
)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 18
FREQUENCY RESPONSE
 EVALUATE on the UNIT CIRCLE
H(e
j
ˆ
ω
) = H(z)
z =e
j
ˆ
ω
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 19
FREQ. RESPONSE FORMULA
ω
ω
ω
ˆ
ˆ
ˆ
1
1
8 . 0 1
2 2
) (
8 . 0 1
2 2
) (
j
j
j
e
e
e H
z
z
z H

+
= →

+
=
=
2
ˆ
) (
ω j
e H
ω
ω
ω
ω
ω
ω
ˆ
ˆ
ˆ
ˆ
2
ˆ
ˆ
8 . 0 1
2 2
8 . 0 1
2 2
8 . 0 1
2 2
j
j
j
j
j
j
e
e
e
e
e
e

+

+
=

+

=
− − +
+ + +

ω ω
ω ω
ˆ ˆ
ˆ ˆ
8 . 0 8 . 0 64 . 0 1
4 4 4 4
j j
j j
e e
e e
ω
ω
ˆ cos 6 . 1 64 . 1
ˆ cos 8 8

+
? ˆ @ , 400
04 . 0
8 8
) ( , 0 ˆ @
2
ˆ
π ω ω
ω
= =
+
= =
j
e H
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 20
Fr equenc y Response Pl ot
ω
ω
ω
ˆ
ˆ
ˆ
8 . 0 1
2 2
) (
j
j
j
e
e
e H

+
=
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 21
UNI T CI RCLE
 MAPPING BETWEEN
z = e
j
ˆ
ω
z = 1 ↔
ˆ
ω = 0
z = −1 ↔
ˆ
ω = ±π
z = ±j ↔
ˆ
ω = ±
1
2
π
z and
ˆ
ω
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 22
3-D VI EW
3-D VIEWPOINT:
EVALUATE H(z) EVERYWHERE
UNIT CIRCLE
WHERE is
the POLE ?
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 23
MOVI E f or H(z) i n 3-D
 POLES to H(z) to Frequency Reponse
 TWO POLES SHOWN
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 24
Fr equenc y Response f r om H(z)
Walking around the Unit Circle
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 25
3 DOMAI NS MOVI E: I I R
POLE MOVES
h[n]
H(z)
) (
ˆ ω j
e H
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 26
PeZ Demo: Pol e-Zer o Pl ac i ng
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 27
SI NUSOI DAL RESPONSE
 x[n] = SINUSOID => y[n] is SINUSOID
 Get MAGNITUDE & PHASE from H(z)
ω
ω
ω ω
ω
ˆ
) ( ) ( where
) ( ] [ then
] [ if
ˆ
ˆ ˆ
ˆ
j
e z
j
n j j
n j
z H e H
e e H n y
e n x
=
=
=
=
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 28
POP QUI Z
 Given:
 Find the Impulse Response, h[n]
 Find the output, y[n]
 When
x[n] = cos(0.25πn)
H(z) =
2 + 2z
−1
1− 0.8z
−1
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 29
Eval uat e FREQ. RESPONSE
2 + 2z
−1
1 − 0.8z
−1
at
ˆ
ω = 0.25π
zero at ω=π
ˆ
ω = 0.25π
0 ˆ is 1 = = ω z
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 30
POP QUI Z: Eval Fr eq. Resp.
 Given:
 Find output, y[n],
when
 Evaluate at
x[n] = cos(0.25πn)
H(z) =
2 + 2z
−1
1− 0.8z
−1
z = e
j0.25π
y[n] = 5.182cos(0.25πn − 0.417π)
309 . 1
25 . 0
2
2
2
2
182 . 5
8 . 0 1
) ( 2 2
) (
j
j
e
e
j
z H

=

− +
=
π
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 31
 Multiply the System Functions
y[n] x[n]
H(z)
x[n]
H
1
(z)
y[n]
H
2
(z)
H(z) = H
1
(z)H
2
(z)
EQUIVALENT
SYSTEM
4/18/2004 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 18
3-Domains for IIR
4/18/2004 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 8, all
 Recitation: Ch. 8, all
 POLES & ZEROS
 Next Lecture: Chapter 9
4/18/2004 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 SECOND-ORDER IIR FILTERS
 TWO FEEDBACK TERMS
 H(z) can have COMPLEX POLES & ZEROS
 THREE-DOMAIN APPROACH
 BPFs have POLES NEAR THE UNIT CIRCLE
y[n] = a
1
y[n −1]+ a
2
y[n − 2] + b
k
x[n − k]
k=0
2

4/18/2004 © 2003, JH McClellan & RW Schafer 5
THREE DOMAINS

a

, b
k
{ }
Z-TRANSFORM-DOMAIN: poles & zeros
POLYNOMIALS: H(z)
Use H(z) to get
Freq. Response
z = e
j
ˆ
ω

H(z) =
b
k
z
− k

1− a

z

FREQ-DOMAIN

ω
ω
ω
ˆ
1
ˆ
0
ˆ
1
) (
j
N
k j
M
k
k
j
e a
e b
e H

=

=

=
TIME-DOMAIN
∑ ∑
= =
− + − =
M
k
k
N
k n x b n y a n y
0 1
] [ ] [ ] [

4/18/2004 © 2003, JH McClellan & RW Schafer 6
Z-TRANSFORM TABLES
4/18/2004 © 2003, JH McClellan & RW Schafer 7
SECOND-ORDER FILTERS
 Two FEEDBACK TERMS
y[n] = a
1
y[n −1] + a
2
y[n −2]
+ b
0
x[n] + b
1
x[n −1] + b
2
x[n −2]
H(z) =
b
0
+ b
1
z
−1
+ b
2
z
−2
1− a
1
z
−1
− a
2
z
−2
4/18/2004 © 2003, JH McClellan & RW Schafer 8
MORE POLES
 2 Poles: REAL
 or COMPLEX CONJUGATES
H(z) =
b
0
+ b
1
z
−1
+ b
2
z
−2
1 − a
1
z
−1
− a
2
z
−2
=
b
0
z
2
+ b
1
z + b
2
z
2
− a
1
z − a
2
4/18/2004 © 2003, JH McClellan & RW Schafer 9
TWO COMPLEX POLES
 Find Impulse Response ?
 Can OSCILLATE vs. n
 “RESONANCE”
 Find FREQUENCY RESPONSE FREQUENCY RESPONSE
 Depends on Pole Location
 Close to the Unit Circle?
 Make BANDPASS FILTER BANDPASS FILTER
p
k
( )
n
= re

( )
n
= r
n
e
jnθ
pole = re

r →1?
4/18/2004 © 2003, JH McClellan & RW Schafer 10
2nd ORDER EXAMPLE
H(z) =
1− 0.45z
−1
1− 0.9z
−1
+ 0.81z
−2
H(z) =
0.5
1− 0.9e
jπ/3
z
−1
+
0.5
1− 0.9e
−jπ/ 3
z
−1
H(z) =
1− 0.9cos(
π
3
)z
−1
(1− 0.9e
jπ /3
z
−1
)(1− 0.9e
− jπ /3
z
−1
)
] [ ) ( ) 9 . 0 ( ] [ ) cos( ) 9 . 0 ( ] [
3 / 3 /
2
1
3
n u e e n u n n h
n j n j n n π π
π

+ = =
4/18/2004 © 2003, JH McClellan & RW Schafer 11
h[n]: Decays & Oscillates
1 −0.45z
−1
1 −0.9z
−1
+0.81z
−2
h[n] = (0.9)
n
cos(
π
3
n)u[n]
“PERIOD”=6
4/18/2004 © 2003, JH McClellan & RW Schafer 12
2nd ORDER Z-transform PAIR
h[n] = r
n
cos(θn)u[n]
H(z) =
1 −r cosθz
−1
1− 2r cosθz
−1
+ r
2
z
−2
h[n] = Ar
n
cos(θn +ϕ)u[n]
H(z) = A
cosϕ − rcos(θ −ϕ)z
−1
1 −2rcosθz
−1
+ r
2
z
−2
GENERAL ENTRY for
z-Transform TABLE
4/18/2004 © 2003, JH McClellan & RW Schafer 13
2nd ORDER EX: n-Domain
1 −0.45z
−1
1 −0.9z
−1
+0.81z
−2
aa = [ 1, -0.9, 0.81 ];
bb = [ 1, -0.45 ];
nn = -2:19;
hh = filter( bb, aa, (nn==0) );
HH = freqz( bb, aa, [-pi,pi/100:pi] );
y[n] = 0.9y[n −1]− 0.81y[n − 2]+ x[n]− 0.45x[n −1]
4/18/2004 © 2003, JH McClellan & RW Schafer 14
Complex POLE-ZERO PLOT
1− z
−2
1 +0.7225z
−2
4/18/2004 © 2003, JH McClellan & RW Schafer 15
UNIT CIRCLE
 MAPPING BETWEEN
z = e
j
ˆ
ω
z = 1 ↔
ˆ
ω = 0
z = −1 ↔
ˆ
ω = ±π
z = ±j ↔
ˆ
ω = ±
1
2
π
z and
ˆ
ω
4/18/2004 © 2003, JH McClellan & RW Schafer 16
FREQUENCY RESPONSE
from POLE-ZERO PLOT
H(e
j
ˆ
ω
) =
1− e
−j 2
ˆ
ω
1+ 0.7225e
− j 2
ˆ
ω
4/18/2004 © 2003, JH McClellan & RW Schafer 17
h[n]: Decays & Oscillates
1 −0.45z
−1
1 −0.9z
−1
+0.81z
−2
h[n] = (0.9)
n
cos(
π
3
n)u[n]
“PERIOD”=6
4/18/2004 © 2003, JH McClellan & RW Schafer 18
Complex POLE-ZERO PLOT
1 −0.45z
−1
1 −0.9z
−1
+0.81z
−2
4/18/2004 © 2003, JH McClellan & RW Schafer 19
h[n]: Decays & Oscillates
1− 0.8227z
−1
1 −1.6454z
−1
+ 0.9025z
−2
h[n] = (0.95)
n
cos(
π
6
n)u[n]
“PERIOD”=12
4/18/2004 © 2003, JH McClellan & RW Schafer 20
Complex POLE-ZERO PLOT
1− 0.8227z
−1
1 −1.6454z
−1
+ 0.9025z
−2
4/18/2004 © 2003, JH McClellan & RW Schafer 21
3 DOMAINS MOVIE: IIR
POLE MOVES
h[n]
H(ω ωω ω)
H(z)
4/18/2004 © 2003, JH McClellan & RW Schafer 22
THREE INPUTS
 Given:
 Find the output, y[n]
 When
H(z) =
5
1+ 0.8z
−1
x[n] = cos(0.2πn)
x[n] = u[n]
x[n] = cos(0.2πn)u[n]
4/18/2004 © 2003, JH McClellan & RW Schafer 23
π
π
π 089 . 0
2 . 0
2 . 0
919 . 2
8 . 0 1
5
) (
j
j
j
e
e
e H =
+
=

 Given:
 The input:
 Then y[n]
x[n] = cos(0.2πn)
y[n] = Mcos(0.2πn +ψ)
H(z) =
5
1+ 0.8z
−1
4/18/2004 © 2003, JH McClellan & RW Schafer 27
Step Response
Y(z) = H(z)X(z) =
5
1+ .8z
−1

1
1− z
−1

Y(z) =
A
1+.8z
−1
+
B
1− z
−1
=
(A+ B) + (.8B− A)z
−1
1+.8z
−1
( )
1− z
−1
( )
⇒ (A+ B) = 5 and (.8B− A) = 0
Y(z) =
A
1+.8z
−1
+
B
1− z
−1
Partial Fraction Expansion
4/18/2004 © 2003, JH McClellan & RW Schafer 28
Step Response
Y(z) =
20
9
1+.8z
−1
+
25
9
1− z
−1
y[n] =
20
9
(−.8)
n
u[n] +
25
9
u[n]
y[n] →
25
9
as n →∞
4/18/2004 © 2003, JH McClellan & RW Schafer 29
Stability
 Nec. & suff. condition:
h[n]
n=−∞

∑ < ∞
h[n] = b(a)
n
u[n] ⇔ H(z) =
b
1− az
−1
b a
n
n=0

∑ < ∞ if a <1⇒
Pole must be
Inside unit circle
4/18/2004 © 2003, JH McClellan & RW Schafer 30
SINUSOID starting at n=0
 We’ll look at an example in MATLAB
 cos(0.2π ππ πn)
 Pole at –0.8, so a
n
is (–0.8)
n
 There are two components:
 TRANSIENT
 Start-up region just after n=0; (–0.8)
n
 Eventually, y[n] looks sinusoidal.
 Magnitude & Phase from Frequency Response
4/18/2004 © 2003, JH McClellan & RW Schafer 31
ˆ
ω
0
=

10
Cosine input
(−0.8)
n
cos(0.2πn)u[n]
4/18/2004 © 2003, JH McClellan & RW Schafer 32
STABILITY
 When Does the TRANSIENT DIE OUT ?
need a
1
<1
4/18/2004 © 2003, JH McClellan & RW Schafer 33
STABILITY CONDITION
 ALL POLES INSIDE the UNIT CIRCLE
 UNSTABLE EXAMPLE:
POLE @ z=1.1
x[n] = cos(0.2πn)u[n]
4/18/2004 © 2003, JH McClellan & RW Schafer 34
BONUS QUESTION
 Given:
 The input is
 Then find y[n]
H(z) =
5
1+ 0.8z
−1
) 5 . 0 cos( 4 ] [ π π − = n n x
? ] [ = n y
Si gnal Pr oc essi ng Fi r st
Lec t ur e 19
Cont i nuous-Ti me Si gnal s
and Syst ems
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 9, Sects 9-1 to 9-5
 Recitation: Ch. 9, all
 Next Lecture: Chapter 9, Sects 9-6 to 9-8
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 4
LECTURE OBJ ECTI VES
 Bye bye to D-T Systems for a while
 The UNIT IMPULSE signal
 Definition
 Properties
 Continuous-time signals and systems
 Example systems
 Review: L Linearity and T Time-I Invariance
 Convolution integral: impulse response
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 5
D-T Fi l t er i ng of C-T Si gnal s
C-to-D D-to-C
LTI System
H(z)
x(t) y(t)
LTI ANALOG
System
x(t) y(t)
ˆ
ω =ω T
s
or ω =
ˆ
ω f
s
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 6
ANALOG SI GNALS x (t )
 INFINITE LENGTH
 SINUSOIDS: (t = time in secs)
 PERIODIC SIGNALS
 ONE-SIDED, e.g., for t>0
 UNIT STEP: u(t)
 FINITE LENGTH
 SQUARE PULSE
 IMPULSE SIGNAL: δ(t)
 DISCRETE-TIME: x[n] is list of numbers
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 7
CT Si gnal s: PERI ODI C
x(t) = 10cos(200πt)
Sinusoidal signal
Square Wave
INFINITE DURATION
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 8
CT Si gnal s: ONE-SI DED
v(t) = e
−t
u(t)
Unit step signal
u(t) =
1 t > 0
0 t < 0

One-Sided
Sinusoid
“Suddenly applied”
Exponential
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 9
CT Si gnal s: FI NI TE LENGTH
Square Pulse signal
p(t) = u(t − 2) −u(t − 4)
Sinusoid multiplied
by a square pulse
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 10
What i s an I mpul se?
 A signal that is “concentrated” at one point.
lim
Δ→0
δ
Δ
(t) = δ(t)
δ
Δ
(t)dt = 1
−∞

4/3/2006 © 2003-2006, JH McClellan & RW Schafer 11
 Assume the properties apply to the limit:
 One “INTUITIVE” definition is:
Def i ni ng t he I mpul se
Unit area
δ(τ )dτ
−∞

=1
Concentrated at t=0
δ(t) = 0, t ≠ 0
lim
Δ→0
δ
Δ
(t) = δ(t)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 12
Sampl i ng Pr oper t y
f (t)δ(t) = f (0)δ(t)
f (t)δ
Δ
(t) ≈ f (0)δ
Δ
(t)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 13
Gener al Sampl i ng Pr oper t y
f (t)δ(t − t
0
) = f (t
0
)δ(t − t
0
)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 14
Pr oper t i es of t he I mpul se
Concentrated at one time
Sampling Property
Unit area
Extract one value of f(t)
Derivative of unit step
f (t)δ(t −t
0
) = f (t
0
)δ(t − t
0
)
δ(t −t
0
)dt
−∞

= 1
δ(t − t
0
) = 0, t ≠ t
0
f (t)δ(t − t
0
)dt
−∞

= f (t
0
)
du(t)
dt
= δ(t)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 15
Cont i nuous-Ti me Syst ems
 Examples:
 Delay
 Modulator
 Integrator

x(t) y(t)
y(t) = x(t − t
d
)
y(t) = [A+ x(t)]cosω
c
t
y(t) = x(τ
−∞
t

)dτ
Input
Output
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 16
CT BUI LDI NG BLOCKS
 INTEGRATOR (CIRCUITS)
 DIFFERENTIATOR
 DELAY by t
o
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 17
I deal Del ay:
 Mathematical Definition:
 To find the IMPULSE RESPONSE, h(t),
let x(t) be an impulse, so
h(t) = δ(t − t
d
)
y(t) = x(t − t
d
)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 18
Out put of I deal Del ay of 1 sec
x(t) = e
−t
u(t)
y(t) = x(t −1) = e
−(t−1)
u(t −1)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 19
I nt egr at or :
 Mathematical Definition:
 To find the IMPULSE RESPONSE, h(t),
let x(t) be an impulse, so
y(t) = x(τ
−∞
t

)dτ
h(t) = δ(τ
−∞
t

)dτ = u(t)
Running Integral
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 20
I nt egr at or :
 Integrate the impulse
 IF t<0, we get zero
 IF t>0, we get one
 Thus we have h(t) = u(t) for the integrator
y(t) = x(τ
−∞
t

)dτ
δ(τ
−∞
t

)dτ = u(t)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 21
Gr aphi c al Repr esent at i on
δ(t) =
du(t)
dt
u(t) = δ(τ )dτ =
1 t > 0
0 t < 0

−∞
t

4/3/2006 © 2003-2006, JH McClellan & RW Schafer 22
Out put of I nt egr at or
) ( ) (
) ( ) (
t u t x
d x t y
t
∗ =
=

∞ −
τ τ
) ( ) 1 ( 25 . 1
0 ) (
0 0
) ( ) (
8 . 0
0
8 . 0
8 . 0
t u e
t d u e
t
d u e t y
t
t
t

∞ −

− =

<
=
=

τ τ
τ τ
τ
τ
) ( ) (
8 . 0
t u e t x
t −
=
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 23
Di f f er ent i at or :
 Mathematical Definition:
 To find h(t), let x(t) be an impulse, so
y(t) =
dx(t)
dt
h(t) =
dδ(t)
dt
= δ
(1)
(t)
Doublet
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 24
Di f f er ent i at or Out put :
y(t) =
dx(t)
dt
) 1 ( ) (
) 1 ( 2
− =
− −
t u e t x
t
( )
) 1 ( 1 ) 1 ( 2
) 1 ( ) 1 ( 2
) 1 ( ) (
) 1 ( 2
) 1 ( 2 ) 1 ( 2
) 1 ( 2
− + − − =
− + − − =
− =
− −
− − − −
− −
t t u e
t e t u e
t u e
dt
d
t y
t
t t
t
δ
δ
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 25
Li near and Ti me-I nvar i ant
(LTI ) Syst ems
 If a continuous-time system is both linear and
time-invariant, then the output y(t) is related to
the input x(t) by a convolution integral convolution integral
where h(t) is the impulse response impulse response of the system.
y(t) = x(τ )h(t −τ )dτ = x(t) ∗h(t)
−∞

4/3/2006 © 2003-2006, JH McClellan & RW Schafer 26
Test i ng f or Li near i t y
x
1
(t)
x
2
(t)
y
1
(t)
y
2
(t)
w(t)
y(t)
x(t)
x
2
(t)
x
1
(t)
w(t)
y(t)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 27
Test i ng Ti me-I nvar i anc e
x(t)
x(t − t
0
)
y(t)
w(t)
y(t − t
0
)
t
0
w(t) y(t − t
0
)
t
0
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 29
I nt egr at or :
 Linear
 And Time-Invariant
y(t) = x(τ
−∞
t

)dτ
[ax
1

−∞
t

) + bx
2
(τ )]dτ = ay
1
(t) + by
2
(t)
w(t) = x(τ − t
0
−∞
t

)dτ let σ = τ − t
0
⇒ w(t) = x(σ)dσ
−∞
t−t
0

= y(t - t
0
)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 30
Modul at or :
  Not Not linear--obvious because
  Not Not time-invariant
y(t) = [A+ x(t)]cosω
c
t
w(t) = [A+ x(t − t
0
)]cosω
c
t ≠ y(t − t
0
)
[A+ ax
1
(t) + bx
2
(t)] ≠
[A+ ax
1
(t)] +[A+ bx
2
(t)]
11/3/2003 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 20
Convolution
(Continuous-Time)
11/3/2003 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 9, Sects. 9-6, 9-7, and 9-8
 Recitation: Ch. 9, all
 Next Lecture: Start reading Chapter 10
11/3/2003 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 Review of C-T LTI systems
 Evaluating convolutions
 Examples
 Impulses
 LTI Systems
 Stability and causality
11/3/2003 © 2003, JH McClellan & RW Schafer 5
Linear and Time-Invariant
(LTI) Systems
 If a continuous-time system is both linear and
time-invariant, then the output y(t) is related to
the input x(t) by a convolution integral convolution integral
where h(t) is the impulse response impulse response of the system.

∞ −
∗ = − = ) ( ) ( ) ( ) ( ) ( t h t x d t h x t y τ τ τ
11/3/2003 © 2003, JH McClellan & RW Schafer 6
Testing for Linearity
x
1
(t)
x
2
(t)
y
1
(t)
y
2
(t)
w(t)
y(t)
x(t)
x
2
(t)
x
1
(t)
w(t)
y(t)
11/3/2003 © 2003, JH McClellan & RW Schafer 7
Testing Time-Invariance
x(t)
x(t −t
0
)
y(t)
w(t)
y(t − t
0
)
t
0
w(t) y(t −t
0
)
t
0
11/3/2003 © 2003, JH McClellan & RW Schafer 8
Ideal Delay:
 Linear
 and Time-Invariant
) ( ) (
d
t t x t y − =
) ) (( ) (
0
t t t x t w
d
− − =
) ) (( ) (
0 0 d
t t t x t t y − − = −
) ( ) ( ) ( ) (
2 1 2 1
t by t ay t t bx t t ax
d d
+ = − + −
11/3/2003 © 2003, JH McClellan & RW Schafer 9
0 0
Let ) ( ) ( t d t x t w
t
− = − =

∞ −
τ σ τ τ
Integrator:
 Linear
 And Time-Invariant
τ τ d x t y
t
) ( ) (

∞ −
=
) ( ) (
) ( ) ( )] ( ) ( [
2 1
2 1 2 1
t by t ay
d bx d ax d bx ax
t t t
+ =
+ = +
∫ ∫ ∫
∞ − ∞ − ∞ −
τ τ τ τ τ τ τ
) ( ) ( ) (
0
0
t t y d x t w
t t
− = = ⇒

∞ −
σ σ
11/3/2003 © 2003, JH McClellan & RW Schafer 10
Modulator:
  Not Not linear--obvious because
  Not Not time-invariant
t t x A t y
c
ω cos )] ( [ ) ( + =
) ( cos )] ( [ ) (
0 0
t t y t t t x A t w
c
− ≠ − + = ω
)] ( [ )] ( [
)] ( ) ( [
2 1
2 1
t bx A t ax A
t bx t ax A
+ + +
≠ + +
11/3/2003 © 2003, JH McClellan & RW Schafer 11
Linear and Time-Invariant
(LTI) Systems
 If a continuous-time system is both linear and
time-invariant, then the output y(t) is related to
the input x(t) by a convolution integral convolution integral
where h(t) is the impulse response impulse response of the system.

∞ −
∗ = − = ) ( ) ( ) ( ) ( ) ( t h t x d t h x t y τ τ τ
11/3/2003 © 2003, JH McClellan & RW Schafer 12
Convolution of Impulses, etc.
 Convolution of two impulses
 Convolution of step and shifted impulse
= − ∗ − ) ( ) (
2 1
t t t t δ δ ) (
2 1
t t t − − δ
= − ∗ ) ( ) (
0
t t t u δ ) (
0
t t u −
11/3/2003 © 2003, JH McClellan & RW Schafer 13
Evaluating a Convolution

∞ −
∗ = − = ) ( ) ( ) ( ) ( ) ( t x t h d t x h t y τ τ τ
) ( ) ( t u e t h
t −
=
) 1 ( ) ( − = t u t x
11/3/2003 © 2003, JH McClellan & RW Schafer 14
“Flipping and Shifting”
) (τ x
g(τ ) = x(−τ ) = u(−τ −1)
g(τ − t) = x(−(τ − t)) = x(t −τ)
“flipping”
“flipping and shifting”
t 1 − t
11/3/2003 © 2003, JH McClellan & RW Schafer 15
Evaluating the Integral

> −
< −
=

0 1
0 1 0
) (
1
0
t d e
t
t y
t
τ
τ
11/3/2003 © 2003, JH McClellan & RW Schafer 16
Solution
1 0 ) ( t< t y =
1 1
) (
) 1 (
1
0
1
0
≥ − =
− = =
− −

− −

t e
e d e t y
t
t
t
τ τ
τ
11/3/2003 © 2003, JH McClellan & RW Schafer 17
Convolution GUI
11/3/2003 © 2003, JH McClellan & RW Schafer 18
General Convolution Example
) (
0 0
0
0 0
0
) ( ) (
) ( ) ( ) ( ) ( ) (
0
) (
t u
a b
e e
t
t
b a
e e
t
t d e e e
d t u e u e
t h t x d t h x t y
bt at
bt at
t
b a bt
t b a

=

<
>
+ −

=

<
>
= − =
∗ = − =
− −
− −
− −

∞ −
− − −

∞ −

τ
τ τ τ
τ τ τ
τ τ
τ τ
) ( ) ( t u e t x
at −
= a b t u e t h
bt
≠ =

), ( ) (
11/3/2003 © 2003, JH McClellan & RW Schafer 19
Special Case: u(t)
) ( ) 1 (
1
) ( ) ( ) ( ) ( ) (
t u e
a
t h t x d t h x t y
at −

∞ −
− =
∗ = − =

τ τ τ
0 ), ( ) ( ≠ =

a t u e t x
at
) ( ) ( t u t h =
) ( ) 1 (
2
1
) (
2 if
2
t u e t y
a
t −
− =
=
11/3/2003 © 2003, JH McClellan & RW Schafer 20
Convolve Unit Steps
) (
0 0
0
0 0
0 1
) ( ) (
) ( ) ( ) ( ) ( ) (
0
t u t
t
t t
t
t d
d t u u
t h t x d t h x t y
t
=

<
>
=

<
>
= − =
∗ = − =

∞ −

∞ −
τ
τ τ τ
τ τ τ
) ( ) ( t u t x = ) ( ) ( t u t h =
Unit Ramp
11/3/2003 © 2003, JH McClellan & RW Schafer 21
Convolution is Commutative

∞ −
∞ −

∞ −
∗ = − =
− − = ∗
− = − =
− = ∗
) ( ) ( ) ( ) (
) ( ) ( ) ( ) (
and let
) ( ) ( ) ( ) (
t h t x d x t h
d x t h t x t h
d d t
d t x h t x t h
σ σ σ
σ σ σ
τ σ τ σ
τ τ τ
11/3/2003 © 2003, JH McClellan & RW Schafer 22
δ(t) h
1
(t) h
1
(t) ∗ h
2
(t)
δ(t) h
2
(t) h
2
(t) ∗h
1
(t)
h(t) = h
1
(t) ∗ h
2
(t) = h
2
(t) ∗h
1
(t)
11/3/2003 © 2003, JH McClellan & RW Schafer 23
Stability
 A system is stable if every bounded input
produces a bounded output.
 A continuous-time LTI system is stable if
and only if
h(t) dt < ∞
−∞

11/3/2003 © 2003, JH McClellan & RW Schafer 24
Causal Systems
 A system is causal if and only if y(t
0
)
depends only on x(τ) for τ< t
0
.
 An LTI system is causal if and only if
0 for 0 ) ( < = t t h
11/3/2003 © 2003, JH McClellan & RW Schafer 25
 Substitute x(t)=ax
1
(t)+bx
2
(t)
Therefore, convolution is linear.
) ( ) (
) ( ) ( ) ( ) (
) ( )] ( ) ( [ ) (
2 1
2 1
2 1
t by t ay
d t h x b d t h x a
d t h bx ax t y
+ =
− + − =
− + =
∫ ∫

∞ −

∞ −

∞ −
τ τ τ τ τ τ
τ τ τ τ
Convolution is Linear
11/3/2003 © 2003, JH McClellan & RW Schafer 26
Convolution is Time-Invariant
 Substitute x(t-t
0
)
w(t) = h(τ )x((t − τ) −t
o
)dτ
−∞

= h(τ )x((t −t
o
) −τ )dτ
−∞

= y(t − t
o
)
Si gnal Pr oc essi ng Fi r st
Lec t ur e 21
Fr equenc y Response of
Cont i nuous-Ti me Syst ems
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 10, all
 Recitation: Ch. 10 all, start Ch 11
 Next Lecture: Chapter 11
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 4
LECTURE OBJ ECTI VES
 Review of convolution
  THE THE operation for LTI LTI Systems
 Complex exponential input signals
 Frequency Response
 Cosine signals
 Real part of complex exponential
 Fourier Series thru H(jω)
 These are Analog Filters
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 5
LTI Syst ems
 Convolution defines an LTI system
 Response to a complex exponential gives
frequency response H(jω)
y(t) = h(t)∗ x(t) = h(τ )
−∞

x(t −τ )dτ
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 6
Thought Pr oc ess #1
 SUPERPOSITION (Linearity)
 Make x(t) a weighted sum of signals
 Then y(t) is also a sum—same weights
• But DIFFERENT OUTPUT SIGNALS usually
 Use SINUSOIDS
• “SINUSOID IN GIVES SINUSOID OUT”
 Make x(t) a weighted sum of sinusoids
 Then y(t) is also a sum of sinusoids
 Different Magnitudes and Phase
 LTI SYSTEMS: Sinusoidal Response
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 7
Thought Pr oc ess #2
 SUPERPOSITION (Linearity)
 Make x(t) a weighted sum of signals
  Use Use SINUSOIDS SINUSOIDS
  Any Any x(t) = weighted sum of sinusoids x(t) = weighted sum of sinusoids
  HOW? HOW? Use FOURIER ANALYSIS INTEGRAL Use FOURIER ANALYSIS INTEGRAL
  To find the weights from x(t) To find the weights from x(t)
 LTI SYSTEMS:
 Frequency Response changes each sinusoidal
component
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 8
Compl ex Ex ponent i al I nput
t j j t j j
e Ae j H t y e Ae t x
ω ϕ ω ϕ
ω) ( ) ( ) ( = =

∞ −

= τ τ
τ ω ϕ
d e Ae h t y
t j j ) (
) ( ) (
Frequency
Response

∞ −

= τ τ ω
ωτ
d e h j H
j
) ( ) (
t j j j
e Ae d e h t y
ω ϕ ωτ
τ τ

=

∞ −

) ( ) (
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 9
When does H(j ω) Ex i st ?
 When is ?
 Thus the frequency response exists if the LTI
system is a stable system.
H( jω) = h(τ )
−∞

e
− jωτ
dτ ≤ h(τ )
−∞

e
− jωτ

H( jω) ≤ h(τ )
−∞

dτ < ∞
H( jω) < ∞
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 10
 Suppose that h(t) is:
h(t) = e
−t
u(t)
H( jω) = e
− aτ
u(
−∞

τ )e
− jωτ
dτ = e
−(a+ jω)τ

0

H( jω) =
e
−(a+ jω)τ
−(a + jω)
0

=
e
−aτ
e
− jωτ
−(a + jω)
0

=
1
a + jω
h(t) = e
−at
u(t) ⇔ H( jω) =
1
a + jω
a = 1
a > 0
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 11
Magni t ude and Phase Pl ot s
1
1+ jω
=
1
1+ω
2
∠H( jω) = −atan(ω)
H( jω) =
1
1+ jω
H(− jω) = H

( jω)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 12
Fr eq Response of I nt egr at or ?
 Impulse Response
 h(t) = u(t)
 NOT a Stable System
 Frequency response H(jω) does NOT exist
h(t) = e
−at
u(t) ⇔ H( jω) =
1
a + jω

1

?
Need another term
a →0
“Leaky” Integrator (a is small)
Cannot build a perfect Integral
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 13
( )
t j t j t t j
t j
e e e t y
e t x
d d
ω ω ω
ω
− −
= =
=
) (
) (
) (
I deal Del ay:
y(t) = x(t − t
d
)
H( jω) = e
− jωt
d
H( jω) = δ(τ − t
d
)
−∞

e
−jωτ
dτ = e
−jωt
d
H( jω)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 14
I deal Low pass Fi l t er w / Del ay
H
LP
( jω) =
e
−jωt
d
ω < ω
co
0 ω > ω
co

f
co
"cutoff freq."
Magnitude
Linear Phase
ω
ω
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 15
Si nusoi d i n Gi ves Si nusoi d out
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 16
Ex ampl e: I deal Low Pass
H
LP
( jω) =
e
− j 3ω
ω < 2
0 ω > 2

= = ) ( 10 ) (
5 . 1 3 /
t y e e t x
t j j

π
t j j
e e j H
5 . 1 3 /
10 ) 5 . 1 (
π
( )
) 3 ( 5 . 1 3 / 5 . 1 3 / 5 . 4
10 10 ) (
− −
= =
t j j t j j j
e e e e e t y
π π
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 17
Cosi ne I nput
x(t) = Acos(ω
0
t +φ) =
A
2
e

e

0
t
+
A
2
e
− jφ
e
− jω
0
t
y(t) = H( jω
0
)
A
2
e

e

0
t
+ H(− jω
0
)
A
2
e
− jφ
e
− jω
0
t
Since H(− jω
0
) = H

(jω
0
)
y(t) = A H( jω
0
) cos(ω
0
t + φ + ∠H( jω
0
))
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 18
Revi ew Four i er Ser i es
 ANALYSIS
 Get representation from the signal
 Works for PERIODIC Signals
 Fourier Series
 INTEGRAL over one period
a
k
=
1
T
0
x(t)e
− jω
0
kt
dt
0
T
0

4/3/2006 © 2003-2006, JH McClellan & RW Schafer 19
Gener al Per i odi c Si gnal s
x(t) = x(t + T
0
)
T
0
−2T
0
−T
0
2T
0
0
t
x(t) = a
k
e

0
k t
k =−∞

a
k
=
1
T
0
x(t)e
− jω
0
kt
dt
0
T
0

Fundamental Freq.
ω
0
= 2π / T
0
= 2πf
0
Fourier Synthesis
Fourier Analysis
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 20
Squar e Wave Si gnal
x(t) = x(t + T
0
)
T
0
−2T
0
−T
0
2T
0
0
t
a
k
=
e
− jω
0
kt
− jω
0
kT
0
0
T
0
/ 2

e
− jω
0
kt
−jω
0
kT
0
T
0
/2
T
0
=
1− e
−jπk
jπk
a
k
=
1
T
0
(1)e
−jω
0
kt
dt +
1
T
0
(−1)e
−jω
0
kt
dt
T
0
/ 2
T
0

0
T
0
/ 2

4/3/2006 © 2003-2006, JH McClellan & RW Schafer 21
Spec t r um f r om Four i er Ser i es

a
k
=
1− e
−jπk
jπk
=
2
jπk
k = ±1,±3,…
0 k = 0, ±2, ±4,…

ω
0
= 2π(25)
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 22
LTI Syst ems w i t h Per i odi c
I nput s
 By superposition,
a
k
e

0
kt
H( jω
0
k )a
k
e

0
kt
y(t) = a
k
H( jω
0
k )e

0
k t
= b
k
e

0
k t
k = −∞

k= −∞

b
k
= a
k
H( jω
0
k)
Output has same frequencies
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 23
I deal Low pass Fi l t er (100 Hz)
y(t) =
4
π
sin 50πt ( ) +
4

sin 150πt ( )
H( jω) =
1 ω < ω
co
0 ω > ω
co

f
co
"cutoff freq."
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 24
I deal Low pass Fi l t er (200 Hz)
H( jω) =
1 ω < ω
co
0 ω > ω
co

f
co
"cutoff"
y(t) =
4
π
sin 50πt ( ) +
4

sin 150πt ( ) +
4

sin 250πt ( ) +
4

sin 350πt ( )
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 25
I deal Bandpass Fi l t er
y(t) =
2
j 7π
e
j 2π (175)t

2
j 7π
e
− j 2π (175)t
=
4

cos 2π(175)t −
1
2
π ( )
H( jω) =
1 ω ± ω
c
<
1
2
ω
B
0 elsewhere

What is the ouput signal ?
Passband Passband
4/3/2006 © 2003-2006, JH McClellan & RW Schafer 26
Ex ampl e
y(t) = a
k
e
− jω
0
k t
d
e

0
k t
= a
k
e

0
k ( t −t
d
)
k =−∞

k= −∞

b
k
= a
k
H( jω
0
k) = a
k
e
− jω
0
kt
d
H( jω) = e
− jω t
d

x(t) = a
k
e

0
k t
k =−∞

y(t) = b
k
e

0
k t
k = −∞

∴ y(t) = x(t − t
d
)
3/27/2004 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 22
Introduction to the Fourier
Transform
3/27/2004 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 11, Sects. 11-1 to 11-4
 Recitation: Ch. 10
 And Chapter 11, Sects. 11-1 to 11-4
 Next Lecture: Chapter 11, Sects. 11-5, 11-6
3/27/2004 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 Review
 Frequency Response
 Fourier Series
 Definition of Fourier transform
Relation to Fourier Series
 Examples of Fourier transform pairs

∞ −

= dt e t x j X
t jω
ω ) ( ) (
3/27/2004 © 2003, JH McClellan & RW Schafer 5
Everything = Sum of Sinusoids
 One Square Pulse = Sum of Sinusoids
 ???????????
 Finite Length
 Not Periodic
 Limit of Square Wave as Period Æinfinity
 Intuitive Argument
3/27/2004 © 2003, JH McClellan & RW Schafer 6
Fourier Series: Periodic x(t)
x(t) = x(t + T
0
)
T
0
−2T
0
−T
0
2T
0
0
t
x(t) = a
k
e

0
k t
k =−∞

a
k
=
1
T
0
x(t)e
− jω
0
kt
dt
−T
0
/ 2
T
0
/ 2

Fundamental Freq.
ω
0
= 2π / T
0
= 2πf
0
Fourier Synthesis
Fourier Analysis
3/27/2004 © 2003, JH McClellan & RW Schafer 7
Square Wave Signal
a
k
=
e
− jω
0
kt
− jω
0
kT
0
−T
0
/4
T
0
/ 4
=
e
−jπk/ 2
− e
jπk/ 2
− j2πk
=
sin(πk / 2)
πk
x(t) = x(t + T
0
)
T
0
−2T
0
−T
0
2T
0
0
t

=
4 /
4 /
0
0
0
0
) 1 (
1
T
T
t k j
k
dt e
T
a
ω
3/27/2004 © 2003, JH McClellan & RW Schafer 8
Spectrum from Fourier Series
¦
¹
¦
´
¦
± ± =
± ± = ≠
= =

, 4 , 2 0
, 3 , 1 , 0 0
) 2 / sin(
k
k
k
k
a
k
π
π
3/27/2004 © 2003, JH McClellan & RW Schafer 9
What if x(t) is not periodic?
 Sum of Sinusoids?
 Non-harmonically related sinusoids
 Would not be periodic, but would probably be
non-zero for all t.
 Fourier transform
 gives a “sum” (actually an integral integral) that
involves ALL ALL frequencies
 can represent signals that are identically zero
for negative t. !!!!!!!!!
3/27/2004 © 2003, JH McClellan & RW Schafer 10
Limiting Behavior of FS
T
0
=2T
T
0
=4T
T
0
=8T
3/27/2004 © 2003, JH McClellan & RW Schafer 11
Limiting Behavior of Spectrum
T
0
=2T
T
0
=4T
T
0
=8T
) (
Plot
0 k
a T
3/27/2004 © 2003, JH McClellan & RW Schafer 12
FS in the LIMIT (long period)
Fourier Synthesis
Fourier Analysis
( ) ( )

∞ −

−∞ =
= = ω ω
ω
π
π
ω
π
d e j X t x e a T t x
t j
T
t k j
k
k T
) ( ) ( ) (
2
1 2
0
2
1
0
0
0

∫ ∫

∞ −

= = dt e t x j X dt e t x a T
t j
T
T
t k j
T k
ω ω
ω ) ( ) ( ) (
2 /
2 /
0
0
0
0
0

ω
π
d
T
T
=
∞ →
0
2
lim
0
ω
π
=
∞ →
k
T
T
0
2
lim
0
) ( lim
0
0
ω j X a T
k
T
=
∞ →
3/27/2004 © 2003, JH McClellan & RW Schafer 13
Fourier Transform Defined
 For non-periodic signals
Fourier Synthesis
Fourier Analysis

∞ −

= dt e t x j X
t jω
ω ) ( ) (

∞ −
= ω ω
ω
π
d e j X t x
t j
) ( ) (
2
1
3/27/2004 © 2003, JH McClellan & RW Schafer 14
Example 1:
x(t) = e
−at
u(t)
X( jω) =
1
a + jω
X( jω) = e
−at
0

e
− jωt
dt =
0

e
− (a+ jω)t
dt
X( jω) = −
e
−at
e
− jωt
a + jω
0

=
1
a + jω
a > 0
3/27/2004 © 2003, JH McClellan & RW Schafer 15
Frequency Response
 Fourier Transform of h(t) is the Frequency
Response
ω
ω
j
j H t u e t h
t
+
= ⇔ =

1
1
) ( ) ( ) (
) ( ) ( t u e t h
t −
=
3/27/2004 © 2003, JH McClellan & RW Schafer 16
Magnitude and Phase Plots
ω
ω
j a
j H
+
=
1
) (
|
.
|

\
|
− = ∠

a
j H
ω
ω
1
tan ) (
2 2
1 1
ω
ω
+
=
+
a
j a
) ( ) ( ω ω j H j H

= −
3/27/2004 © 2003, JH McClellan & RW Schafer 17
X( jω) =
sin(ωT / 2)
ω / 2 ( )
Example 2:
x(t) =
1 t < T / 2
0 t > T / 2
¦
´
¹
X( jω) =
e
− jωt
−jω
−T/ 2
T /2
=
e
− jωT/ 2
− e
jωT/2
−jω
X( jω) = (1)e
− jωt
dt
−T/ 2
T/2

= e
− jωt
dt
−T/ 2
T/2

3/27/2004 © 2003, JH McClellan & RW Schafer 18
x(t) =
1 t < T / 2
0 t > T / 2
¦
´
¹
⇔ X( jω) =
sin(ωT / 2)
ω / 2 ( )
3/27/2004 © 2003, JH McClellan & RW Schafer 19
Example 3:
¦
¹
¦
´
¦
>
<
=
b
b
j X
ω ω
ω ω
ω
0
1
) (
t
t
t x
b
π
ω ) sin(
) ( =
∫ ∫

∞ −
= =
b
b
d e d e j X t x
t j t j
ω
ω
ω ω
ω
π
ω ω
π
1
2
1
) (
2
1
) (
jt
e e
jt
e
t x
t j t j t j
b b
b
b
ω ω
ω
ω
ω
π π

= =
2
1
2
1
) (
3/27/2004 © 2003, JH McClellan & RW Schafer 20
¦
¹
¦
´
¦
>
<
= ⇔ =
b
b
b
j X
t
t
t x
ω ω
ω ω
ω
π
ω
0
1
) (
) sin(
) (
3/27/2004 © 2003, JH McClellan & RW Schafer 21
Example 4:
X( jω) = δ(t)e
− jωt
dt
−∞

= 1
Shifting Property of the Impulse
) ( ) (
0
t t t x − = δ
0
) ( ) (
0
t j t j
e dt e t t j X
ω ω
δ ω

∞ −

= − =

3/27/2004 © 2003, JH McClellan & RW Schafer 22
x(t) = δ(t) ⇔ X( jω) = 1
3/27/2004 © 2003, JH McClellan & RW Schafer 23
Example 5:
X( jω) = 2πδ(ω −ω
0
)
x(t) =
1

2πδ(ω −ω
0
)e
jωt

−∞

= e

0
t
x(t) =1⇔ X( jω) = 2πδ(ω)
x(t) = e

0
t
⇔ X( jω) = 2πδ(ω −ω
0
)
x(t) = cos(ω
0
t) ⇔
X( jω) = πδ(ω −ω
0
) +πδ(ω +ω
0
)
3/27/2004 © 2003, JH McClellan & RW Schafer 24
x(t) = cos(ω
0
t) ⇔
X( jω) = πδ(ω −ω
0
) +πδ(ω +ω
0
)
3/27/2004 © 2003, JH McClellan & RW Schafer 25
Table of Fourier Transforms
x(t) = e
−at
u(t) ⇔ X( jω) =
1
a + jω
x(t) =
1 t < T / 2
0 t > T / 2
¦
´
¹
⇔ X( jω) =
sin(ωT / 2)
ω / 2 ( )
x(t) =
sin(ω
0
t)
π t ( )
⇔ X( jω) =
1 ω < ω
0
0 ω > ω
0
¦
´
¹
x(t) = δ(t − t
0
) ⇔ X( jω) = e
− jωt
0
x(t) = e

0
t
⇔ X( jω) = 2πδ(ω −ω
0
)
3/27/2004 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 23
Fourier Transform
Properties
3/27/2004 © 2003, JH McClellan & RW Schafer 3
 This Lecture:
 Chapter 11, Sects. 11-5 to 11-9
 Tables in Section 11-9
 Recitation: Chapter 11, Sects. 11-1 to 11-9
 Next Lectures: Chapter 12 (Applications)
3/27/2004 © 2003, JH McClellan & RW Schafer 4
LECTURE OBJECTIVES
 The Fourier transform
 More examples of Fourier transform pairs
 Basic properties of Fourier transforms
 Convolution property
 Multiplication property

∞ −

= dt e t x j X
t jω
ω ) ( ) (
3/27/2004 © 2003, JH McClellan & RW Schafer 5
Fourier Transform
Fourier Analysis
(Forward Transform)

∞ −

= dt e t x j X
t jω
ω ) ( ) (
Fourier Synthesis
(Inverse Transform)

∞ −
= ω ω
π
ω
d e j X t x
t j
) (
2
1
) (
) ( ) (
Domain - Frequency Domain - Time
ω j X t x ⇔

3/27/2004 © 2003, JH McClellan & RW Schafer 6
WHY use the Fourier transform?
 Manipulate the “Frequency Spectrum”
 Analog Communication Systems
 AM: Amplitude Modulation; FM
 What are the “Building Blocks” ?
 Abstract Layer, not implementation
 Ideal Filters: mostly BPFs
 Frequency Shifters
 aka Modulators, Mixers or Multipliers: x(t)p(t)
3/27/2004 © 2003, JH McClellan & RW Schafer 7
Frequency Response
 Fourier Transform of h(t) is the Frequency
Response
ω
ω
j
j H t u e t h
t
+
= ⇔ =

1
1
) ( ) ( ) (
) ( ) ( t u e t h
t −
=
3/27/2004 © 2003, JH McClellan & RW Schafer 8
2 /
) 2 / sin(
) (
2 / 0
2 / 1
) (
ω
ω
ω
T
j X
T t
T t
t x = ⇔
¦
¹
¦
´
¦
>
<
=
3/27/2004 © 2003, JH McClellan & RW Schafer 9
¦
¹
¦
´
¦
>
<
= ⇔ =
b
b
b
j X
t
t
t x
ω ω
ω ω
ω
π
ω
0
1
) (
) sin(
) (
3/27/2004 © 2003, JH McClellan & RW Schafer 10
0
) ( ) ( ) (
0
t j
e j X t t t x
ω
ω δ

= ⇔ − =
0
0
= t
3/27/2004 © 2003, JH McClellan & RW Schafer 11
Table of Fourier Transforms
) ( 2 ) ( ) (
c
t j
j X e t x
c
ω ω πδ ω
ω
− = ⇔ =
0
) ( ) ( ) (
0
t j
e j X t t t x
ω
ω δ

= ⇔ − =
¦
¹
¦
´
¦
>
<
= ⇔ =
b
b
b
j X
t
t
t x
ω ω
ω ω
ω
π
ω
0
1
) (
) sin(
) (
2 /
) 2 / sin(
) (
2 / 0
2 / 1
) (
ω
ω
ω
T
j X
T t
T t
t x = ⇔
¦
¹
¦
´
¦
>
<
=
ω
ω
j
j X t u e t x
t
+
= ⇔ =

1
1
) ( ) ( ) (
3/27/2004 © 2003, JH McClellan & RW Schafer 12
) ( ) ( ) ( ) cos( ) (
c c c
j X t t x ω ω πδ ω ω πδ ω ω + + − = ⇔ =
3/27/2004 © 2003, JH McClellan & RW Schafer 13
Fourier Transform of a
General Periodic Signal
 If x(t) is periodic with period T
0
,

−∞ =
= =
0
0 0
0
0
) (
1
) (
T
t jk
k
k
t jk
k
dt e t x
T
a e a t x
ω ω
) ( 2 since Therefore,
0
0
ω ω πδ
ω
k e
t jk
− ⇔

−∞ =
− =
k
k
k a j X ) ( 2 ) (
0
ω ω δ π ω
3/27/2004 © 2003, JH McClellan & RW Schafer 14
Square Wave Signal
x(t) = x(t + T
0
)
T
0
−2T
0
−T
0
2T
0
0
t
a
k
=
e
− jω
0
kt
− jω
0
kT
0
0
T
0
/ 2

e
−jω
0
kt
−jω
0
kT
0
T
0
/2
T
0
=
1− e
−jπk
jπk
a
k
=
1
T
0
(1)e
−jω
0
kt
dt +
1
T
0
(−1)e
−jω
0
kt
dt
T
0
/ 2
T
0

0
T
0
/ 2

3/27/2004 © 2003, JH McClellan & RW Schafer 15
Square Wave Fourier Transform
X( jω) = 2π a
k
δ(ω − kω
0
)
k=−∞

x(t) = x(t + T
0
)
T
0
−2T
0
−T
0
2T
0
0
t
3/27/2004 © 2003, JH McClellan & RW Schafer 16
Table of Easy FT Properties
ax
1
(t) +bx
2
(t) ⇔ aX
1
( jω) + bX
2
( jω)
x(t − t
d
) ⇔ e
− jωt
d
X( jω)
x(t)e

0
t
⇔ X( j(ω −ω
0
))
Delay Property
Frequency Shifting
Linearity Property
x(at) ⇔
1
| a|
X( j(
ω
a
))
Scaling
3/27/2004 © 2003, JH McClellan & RW Schafer 17
Scaling Property
expands ) ( shrinks; ) 2 (
2 2
1 ω
j X t x
) (
) ( ) (
1
) / (
a
a
a
d
a j t j
j X
e x dt e at x
ω
λ
λ ω ω
λ
=
=
∫ ∫

∞ −

∞ −

) ( ) (
1
a
a
j X at x
ω

3/27/2004 © 2003, JH McClellan & RW Schafer 18
Scaling Property
) ( ) (
1
a
a
j X at x
ω

) 2 ( ) (
1 2
t x t x =
3/27/2004 © 2003, JH McClellan & RW Schafer 19
Uncertainty Principle
 Try to make x(t) shorter
 Then X(jω ωω ω) will get wider
 Narrow pulses have wide bandwidth
 Try to make X(jω ωω ω) narrower
 Then x(t) will have longer duration
  Cannot simultaneously reduce time Cannot simultaneously reduce time
duration and bandwidth duration and bandwidth
3/27/2004 © 2003, JH McClellan & RW Schafer 20
Significant FT Properties
x(t) ∗h(t) ⇔ H( jω)X( jω)
x(t)e

0
t
⇔ X( j(ω −ω
0
))
x(t)p(t) ⇔
1

X( jω)∗ P( jω)
dx(t)
dt
⇔( jω)X( jω)
Differentiation Property
3/27/2004 © 2003, JH McClellan & RW Schafer 21
Convolution Property
 Convolution in the time-domain
corresponds to MULTIPLICATION MULTIPLICATION in the
frequency-domain
y(t) = h(t) ∗ x(t) = h(τ)
−∞

x(t −τ)dτ
Y( jω) = H( jω)X( jω)
y(t) = h(t) ∗ x(t) x(t)
Y( jω) = H( jω)X( jω) X( jω)
3/27/2004 © 2003, JH McClellan & RW Schafer 22
Convolution Example
 Bandlimited Input Signal
 “sinc” function
 Ideal LPF (Lowpass Filter)
 h(t) is a “sinc”
 Output is Bandlimited
 Convolve “sincs”
3/27/2004 © 2003, JH McClellan & RW Schafer 23
Ideally Bandlimited Signal
¦
¹
¦
´
¦
>
<
= ⇔ =
π ω
π ω
ω
π
π
100 0
100 1
) (
) 100 sin(
) ( j X
t
t
t x
π ω 100 =
b
3/27/2004 © 2003, JH McClellan & RW Schafer 24
Convolution Example
sin(100πt)
πt

sin(200πt)
πt
=
x(t) ∗h(t) ⇔ H( jω)X( jω)
sin(100πt)
πt
3/27/2004 © 2003, JH McClellan & RW Schafer 25
Cosine Input to LTI System
Y(jω) = H( jω)X(jω)
= H( jω)[πδ(ω − ω
0
) +πδ(ω +ω
0
)]
= H( jω
0
)πδ (ω −ω
0
) + H(− jω
0
)πδ (ω +ω
0
)
y(t) = H(jω
0
)
1
2
e

0
t
+ H(−jω
0
)
1
2
e
− jω
0
t
= H( jω
0
)
1
2
e

0
t
+ H
*
( jω
0
)
1
2
e
− jω
0
t
= H( jω
0
) cos(ω
0
t +∠H( jω
0
))
3/27/2004 © 2003, JH McClellan & RW Schafer 26
Ideal Lowpass Filter
H
lp
( jω)
ω
co
−ω
co
y(t) = x(t) if ω
0

co
y(t) = 0 if ω
0
> ω
co
3/27/2004 © 2003, JH McClellan & RW Schafer 27
Ideal Lowpass Filter
y(t) =
4
π
sin 50πt ( ) +
4

sin 150πt ( )
f
co
"cutoff freq."
H( jω) =
1 ω <ω
co
0 ω >ω
co
¦
´
¹
3/27/2004 © 2003, JH McClellan & RW Schafer 28
Signal Multiplier (Modulator)
 Multiplication in the time-domain
corresponds to convolution in the
frequency-domain.
Y( jω) =
1

X( jω) ∗ P( jω)
y(t) = p(t)x(t)
X( jω)
x(t)
p(t)
Y( jω) =
1

X( jθ)
−∞

P( j(ω −θ))dθ
3/27/2004 © 2003, JH McClellan & RW Schafer 29
Frequency Shifting Property
x(t)e

0
t
⇔ X( j(ω −ω
0
))
y(t) =
sin 7t
πt
e

0
t
⇔Y( jω) =
1 ω
0
−7 < ω <ω
0
+7
0 elsewhere
¦
´
¹
)) ( (
) ( ) (
0
) (
0 0
ω ω
ω ω ω ω
− =
=
∫ ∫

∞ −
− −

∞ −

j X
dt e t x dt e t x e
t j t j t j
3/27/2004 © 2003, JH McClellan & RW Schafer 30
y(t) = x(t)cos(ω
0
t) ⇔
Y( jω) =
1
2
X( j(ω −ω
0
)) +
1
2
X( j(ω + ω
0
))
x(t)
3/27/2004 © 2003, JH McClellan & RW Schafer 31
Differentiation Property
dx(t )
dt
=
d
dt
1

X( jω)e
jωt

−∞

|
\

|
.
|
=
1

( jω) X( jω)e
jωt

−∞

d
dt
e
−at
u(t)
( )
= −ae
−at
u(t) + e
−at
δ(t)
= δ(t) − ae
−at
u(t)

a + jω
Multiply by jω ωω ω
4/19/2005 © 2003, JH McClellan & RW Schafer 1
Si gnal Pr oc essi ng Fi r st
Lec t ur e 24
Ampl i t ude Modul at i on (AM)
4/19/2005 © 2003, JH McClellan & RW Schafer 3
LECTURE OBJ ECTI VES
 Review of FT properties
 Convolution <--> multiplication
 Frequency shifting
 Sinewave Amplitude Modulation
 Frequency-division multiplexing
 FDM
 Reading: Chapter 12, Section 12-2
4/19/2005 © 2003, JH McClellan & RW Schafer 4
Tabl e of Easy FT Pr oper t i es
ax
1
(t) + bx
2
(t) ⇔ aX
1
( jω) + bX
2
( jω)
x(t − t
d
) ⇔ e
− jωt
d
X( jω)
x(t)e

0
t
⇔ X( j(ω −ω
0
))
Delay Property
Frequency Shifting
Linearity Property
x(at) ⇔
1
| a|
X( j(
ω
a
))
Scaling
4/19/2005 © 2003, JH McClellan & RW Schafer 5
Tabl e of FT Pr oper t i es
x(t) ∗h(t) ⇔ H( jω)X( jω)
x(t)e

0
t
⇔ X( j(ω −ω
0
))
x(t)p(t) ⇔
1

X( jω)∗ P( jω)
dx(t)
dt
⇔( jω)X( jω)
Differentiation Property
4/19/2005 © 2003, JH McClellan & RW Schafer 6
Fr equenc y Shi f t i ng Pr oper t y
e
− jω
0
t
x(t )e
− jωt
dt
−∞

= x(t)e
− j (ω−ω
0
)t
dt
−∞

= X( j(ω −ω
0
))
x(t)e

0
t
⇔ X( j(ω −ω
0
))
y(t) =
sin 7t
πt
e

0
t
⇔ Y( jω) =
1 ω
0
−7 < ω <ω
0
+7
0 elsewhere

4/19/2005 © 2003, JH McClellan & RW Schafer 7
Convol ut i on Pr oper t y
 Convolution in the time-domain
corresponds to MULTIPLICATION MULTIPLICATION in the
frequency-domain
y(t) = h(t) ∗ x(t) = h(τ )
−∞

x(t −τ )dτ
Y( jω) = H( jω)X( jω)
y(t) = h(t) ∗ x(t)
x(t)
Y( jω) = H( jω)X( jω) X( jω)
4/19/2005 © 2003, JH McClellan & RW Schafer 8
Cosi ne I nput t o LTI Syst em
Y(jω) = H( jω)X(jω)
= H( jω)[πδ(ω − ω
0
) +πδ(ω +ω
0
)]
= H( jω
0
)πδ (ω −ω
0
) + H(− jω
0
)πδ (ω +ω
0
)
y(t) = H(jω
0
)
1
2
e

0
t
+ H(−jω
0
)
1
2
e
− jω
0
t
= H( jω
0
)
1
2
e

0
t
+ H
*
( jω
0
)
1
2
e
− jω
0
t
= H( jω
0
) cos(ω
0
t +∠H( jω
0
))
4/19/2005 © 2003, JH McClellan & RW Schafer 9
I deal Low pass Fi l t er
H
lp
( jω)
ω
co
−ω
co
y(t) = x(t) if ω
0
< ω
co
y(t) = 0 if ω
0
> ω
co
4/19/2005 © 2003, JH McClellan & RW Schafer 10
I deal LPF: Four i er Ser i es
y(t) =
4
π
sin 50πt ( ) +
4

sin 150πt ( )
f
co
"cutoff freq."
H( jω) =
1 ω < ω
co
0 ω > ω
co

4/19/2005 © 2003, JH McClellan & RW Schafer 11
The w ay c ommuni c at i on
syst ems w or k
How do we share
bandwidth ?
4/19/2005 © 2003, JH McClellan & RW Schafer 12
Tabl e of FT Pr oper t i es
x(t) ∗h(t) ⇔ H( jω)X( jω)
x(t)e

0
t
⇔ X( j(ω −ω
0
))
x(t)p(t) ⇔
1

X( jω)∗ P( jω)
dx(t)
dt
⇔( jω)X( jω)
Differentiation Property
4/19/2005 © 2003, JH McClellan & RW Schafer 13
Si gnal Mul t i pl i er (Modul at or )
 Multiplication in the time-domain corresponds to
convolution in the frequency-domain.
Y( jω) =
1

X( jω) ∗ P( jω)
y(t) = p(t)x(t)
X( jω)
x(t)
p(t)
Y( jω) =
1

X( jθ)
−∞

P( j(ω −θ))dθ
4/19/2005 © 2003, JH McClellan & RW Schafer 14
) ( ) ( ) ( ) ( ) ( ) (
2
1
ω ω ω
π
j P j X j Y t p t x t y ∗ = ⇔ =
[ ] ) ( ) ( ) ( ) (
) cos( ) ( ) (
2
1
c c
c
j X j Y
t t x t y
ω ω πδ ω ω πδ ω ω
ω
π
+ + − ∗ =
⇔ =
) ( ) ( ) (
) cos( ) (
c c
c
j P
t t p
ω ω πδ ω ω πδ ω
ω
+ + − =
⇔ =
)) ( ( )) ( ( ) (
2
1
2
1
c c
j X j X j Y ω ω ω ω ω + + − =
4/19/2005 © 2003, JH McClellan & RW Schafer 15
Ampl i t ude Modul at or
 x(t) modulates the amplitude of the cosine
wave. The result in the frequency-domain
is two shifted copies of X(jω).
y(t) = x(t)cos(ω
c
t)
X( jω)
x(t)
cos(ω
c
t)
Y( jω) =
1
2
X( j(ω −ω
c
))
+
1
2
X( j(ω + ω
c
))
4/19/2005 © 2003, JH McClellan & RW Schafer 16
)) ( ( )) ( ( ) (
) cos( ) ( ) (
2
1
2
1
c c
c
j X j X j Y
t t x t y
ω ω ω ω ω
ω
+ + − =
⇔ =
) (
) ) sin((
) (
) ) sin((
) (
) cos( ) ( ) (
c
c
c
c
c
T T
j Y
t t x t y
ω ω
ω ω
ω ω
ω ω
ω
ω
+
+
+

=
⇔ =
) (
) sin(
2 ) (
0
1
) (
ω
ω
ω
T
j X
T t
T t
t x = ⇔

>
<
=
4/19/2005 © 2003, JH McClellan & RW Schafer 17
x(t)
ω
c
−ω
c
)) ( (
2
1
c
j X ω ω + )) ( (
2
1
c
j X ω ω −
)) ( ( )) ( ( ) (
) cos( ) ( ) (
2
1
2
1
c c
c
j X j X j Y
t t x t y
ω ω ω ω ω
ω
+ + − =
⇔ =
4/19/2005 © 2003, JH McClellan & RW Schafer 18
DSBAM Modul at or
 If X(jω)=0 for |ω|>ω
b
and ω
c

b
,the result
in the frequency-domain is two shifted and
scaled exact copies of X(jω).
y(t) = x(t)cos(ω
c
t)
X( jω)
x(t)
cos(ω
c
t)
Y( jω) =
1
2
X( j(ω −ω
c
))
+
1
2
X( j(ω + ω
c
))
4/19/2005 © 2003, JH McClellan & RW Schafer 19
DSBAM Wavef or m
 In the time-domain, the “envelope” of sine-
wave peaks follows |x(t)|
4/19/2005 © 2003, JH McClellan & RW Schafer 20
Doubl e Si deband AM (DSBAM)
“Typical”
bandlimited
input signal
Frequency-shifted
copies
Upper sideband
Lower sideband
4/19/2005 © 2003, JH McClellan & RW Schafer 21
DSBAM DEmodul at or
w(t) = x(t)[cos(ω
c
t)]
2
=
1
2
x(t) +
1
2
x(t)cos(2ω
c
t)
W( jω) =
1
2
X( jω) +
1
4
X( j(ω − 2ω
c
)) +
1
4
X( j(ω + 2ω
c
))
V( jω) = H( jω)W( jω)
w(t) v(t) x(t)
cos(ω
c
t) cos(ω
c
t)
y(t) = x(t)cos(ω
c
t)
4/19/2005 © 2003, JH McClellan & RW Schafer 22
DSBAM Demodul at i on
V( jω) = H( jω)W( jω) = X( jω) if ω
b
< ω
co
< 2ω
c
−ω
b
H( jω) =
2 | ω | < ω
co
0 | ω | >ω
co

4/19/2005 © 2003, JH McClellan & RW Schafer 23
Fr equenc y-Di vi si on
Mul t i pl ex i ng (FDM)
 Shifting spectrum of signal to higher
frequency:
 Permits transmission of low-frequency signals
with high-frequency EM waves
 By allocating a frequency band to each signal
multiple bandlimited signals can share the same
channel
 AM radio: 530-1620 kHz (10 kHz bands)
 FM radio: 88.1-107.9 MHz (200 kHz bands)
4/19/2005 © 2003, JH McClellan & RW Schafer 24
FDM Bl oc k Di agr am (Xmi t t er )
cos(ω
c1
t)
cos(ω
c 2
t)
ω
c1
ω
c2
Spectrum of inputs
must be bandlimited
Need ω
c2
−ω
c1
> 2ω
b
4/19/2005 © 2003, JH McClellan & RW Schafer 25
Fr equenc y-Di vi si on De-Mux
cos(ω
c1
t)
cos(ω
c 2
t)
ω
c1
ω
c2
4/19/2005 © 2003, JH McClellan & RW Schafer 26
Bandpass Fi l t er s f or De-Mux
4/19/2005 © 2003, JH McClellan & RW Schafer 27
Pop Qui z: FT t hr u LPF

−∞ =
− = ↔
k
k j X t x ) 30 ( 4 ) ( ) ( Input π ω δ π ω
co
for a value find then , 2 ) ( is output the If ω = t y
1
co
ω
co
ω −
) (
LP
ω j H
ω
8/22/2003 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 25
Sampling and Reconstruction
(Fourier View)
8/22/2003 © 2003, JH McClellan & RW Schafer 3
LECTURE OBJECTIVES
 Sampling Theorem Revisited
 GENERAL: in the FREQUENCY DOMAIN
 Fourier transform of sampled signal
 Reconstruction from samples
 Reading: Chap 12, Section 12-3
 Review of FT properties
 Convolution ÅÆmultiplication
 Frequency shifting
 Review of AM
8/22/2003 © 2003, JH McClellan & RW Schafer 4
Table of FT Properties
x(t − t
d
) ⇔ e
− jωt
d
X( jω)
x(t)e

0
t
⇔ X( j(ω −ω
0
))
Delay Property
Frequency Shifting
x(at) ⇔
1
| a|
X( j(
ω
a
))
Scaling
x(t) ∗h(t) ⇔ H( jω)X( jω)
8/22/2003 © 2003, JH McClellan & RW Schafer 5
Amplitude Modulator
 x(t) modulates the amplitude of the cosine
wave. The result in the frequency-domain
is two SHIFTED copies of X(jω).
y(t) = x(t)cos(ω
c
t +ϕ)
X( jω)
x(t)
cos(ω
c
t + ϕ)
Y(jω) =
1
2
e

X( j(ω −ω
c
))
+
1
2
e
− jϕ
X(j(ω + ω
c
))
Phase
8/22/2003 © 2003, JH McClellan & RW Schafer 6
DSBAM: Frequency-Domain
“Typical”
bandlimited
input signal
Frequency-shifted
copies
)) ( (
2
1
c
j
j X e ω ω
ϕ
+

)) ( (
2
1
c
j
j X e ω ω
ϕ

Upper sideband
Lower sideband
) ( ω j X
8/22/2003 © 2003, JH McClellan & RW Schafer 7
DSBAM Demod Phase Synch
w(t) v(t) x(t)
cos(ω
c
t) ) cos( ϕ ω + t
c
) cos( ) ( ) ( t t x t y
c
ω =
)) 2 ( ( )) 2 ( (
) ( ) ( ) (
4
1
4
1
4
1
4
1
c
j
c
j
j j
j X e j X e
j X e j X e j W
ω ω ω ω
ω ω ω
ϕ ϕ
ϕ ϕ
+ + − +
+ =

? if what ) ( ) cos( ) (
2
1
2
1
π ϕ ω ϕ ω = = j X j V
8/22/2003 © 2003, JH McClellan & RW Schafer 8
TWO signals on ONE channel: “out of phase”
Can you “separate” them in the demodulator ?
)) ( ( )) ( (
)) ( ( )) ( ( ) (
2 2 1 2
1
2 2 1 2
1
c
j
c
c
j
c
j X j X
j X j X j Y
ω ω ω ω
ω ω ω ω ω
+ + + +
− − − =
8/22/2003 © 2003, JH McClellan & RW Schafer 9
) cos( ϕ ω + t
c
) ( ) (
) ( ) ( ) (
2
2 /
4
1
1
4
1
2
2 /
4
1
1
4
1
ω ω
ω ω ω
ϕ π ϕ
ϕ π ϕ
j X e e j X e
j X e e j X e j V
j j j
j j j
+
+ + =
− − −
0 if ) ( ) (
1
= = ϕ t x t v
2 / if ) ( ) (
2
π ϕ − = = t x t v
)) ( ( )) ( (
)) ( ( )) ( ( ) (
2
2
1
2
1
2 2 1 2
1
c
j
c
c
j
c
j X j X
j X j X j Y
ω ω ω ω
ω ω ω ω ω
+ + + +
− − − =
8/22/2003 © 2003, JH McClellan & RW Schafer 10
8700 Hz
3600 Hz
8/22/2003 © 2003, JH McClellan & RW Schafer 11
Ideal C-to-D Converter
• Mathematical Model for A-to-D
x[n] = x(nT
s
)
FOURIER
TRANSFORM
of x
s
(t) ???
8/22/2003 © 2003, JH McClellan & RW Schafer 12
Periodic Impulse Train
ω
s
=

T
s
∑ ∑

−∞ =

−∞ =
= − =
k
t jk
k
n
s
s
e a nT t t p
ω
δ ) ( ) (
s
T
T
t jk
s
k
T
dt e t
T
a
s
s
s
1
) (
1
2 /
2 /
= =

− ω
δ
Fourier Series
8/22/2003 © 2003, JH McClellan & RW Schafer 13
FT of Impulse Train
∑ ∑

−∞ =

−∞ =
− = ↔ − =
k
s
s n
s
k
T
j P nT t t p ) (
2
) ( ) ( ) ( ω ω δ
π
ω δ
s
s
T
π
ω
2
=
8/22/2003 © 2003, JH McClellan & RW Schafer 14
Impulse Train Sampling
x
s
(t) = x(t) δ(t − nT
s
)
n=−∞

∑ = x(t)δ(t − nT
s
)
n=−∞

x
s
(t) = x(nT
s
)δ(t −nT
s
)
n=−∞

8/22/2003 © 2003, JH McClellan & RW Schafer 15
Illustration of Sampling
x(t)
x[n] = x(nT
s
)

−∞ =
− =
n
s s s
nT t nT x t x ) ( ) ( ) ( δ
n
t
8/22/2003 © 2003, JH McClellan & RW Schafer 16
Sampling: Freq. Domain
EXPECT
FREQUENCY
SHIFTING !!!
∑ ∑

−∞ =

−∞ =
= − =
k
t jk
k
n
s
s
e a nT t t p
ω
δ ) ( ) (

−∞ =
=
k
t jk
k
s
e a
ω
8/22/2003 © 2003, JH McClellan & RW Schafer 17
Frequency-Domain Analysis
x
s
(t) = x(t) δ(t − nT
s
)
n=−∞

∑ = x(nT
s
)δ(t − nT
s
)
n=−∞

x
s
(t) = x(t)
1
T
s
k=−∞

∑ e
jkω
s
t
=
1
T
s
x(t)
k=−∞

∑ e
jkω
s
t
X
s
( jω) =
1
T
s
X( j(ω
k=−∞

∑ − kω
s
))
ω
s
=

T
s
8/22/2003 © 2003, JH McClellan & RW Schafer 18
Frequency-Domain
Representation of Sampling
X
s
( jω) =
1
T
s
X( j(ω
k=−∞

∑ − kω
s
))
“Typical”
bandlimited signal
8/22/2003 © 2003, JH McClellan & RW Schafer 19
Aliasing Distortion
 If ω
s
< 2ω
b
, the copies of X(jω) overlap,
and we have aliasing distortion.
“Typical”
bandlimited signal
8/22/2003 © 2003, JH McClellan & RW Schafer 20
Reconstruction of x(t)
x
s
(t) = x(nT
s
)δ(t − nT
s
)
n=−∞

X
s
( jω) =
1
T
s
X( j(ω
k=−∞

∑ − kω
s
))
X
r
( jω) = H
r
( jω)X
s
( jω)
8/22/2003 © 2003, JH McClellan & RW Schafer 21
Reconstruction: Frequency-Domain
) ( ) ( ) (
so overlap, not do ) (
of copies the , 2 If
ω ω ω
ω
ω ω
j X j H j X
j X
s r r
b s
=
>
H
r
( jω)
8/22/2003 © 2003, JH McClellan & RW Schafer 22
Ideal Reconstruction Filter
h
r
(t) =
sin
π
T
s
t
π
T
s
t
H
r
( jω) =
T
s
ω <
π
T
s
0 ω >
π
T
s

h
r
(0) =1

h
r
(nT
s
) = 0, n = ±1, ±2,…
8/22/2003 © 2003, JH McClellan & RW Schafer 23
Signal Reconstruction
x
r
(t) = h
r
(t) ∗ x
s
(t) = h
r
(t)∗ x(nT
s
)δ(t − nT
s
)
n=−∞

x
r
(t) = x(nT
s
)
sin
π
T
s
(t − nT
s
)
π
T
s
(t −nT
s
)
n=−∞

Ideal bandlimited interpolation formula
x
r
(t) = x(nT
s
)h
r
(t − nT
s
)
n=−∞

8/22/2003 © 2003, JH McClellan & RW Schafer 24
Shannon Sampling Theorem
 “SINC” Interpolation is the ideal
 PERFECT RECONSTRUCTION
 of BANDLIMITED SIGNALS
8/22/2003 © 2003, JH McClellan & RW Schafer 25
Reconstruction in Time-Domain
8/22/2003 © 2003, JH McClellan & RW Schafer 26
Ideal C-to-D and D-to-C
x[n] = x(nT
s
)
x
r
(t) = x[n]
sin
π
T
s
(t − nT
s
)
π
T
s
(t − nT
s
)
n=−∞

Ideal Sampler Ideal bandlimited interpolator
X
r
( jω) = H
r
( jω)X
s
( jω)
X
s
( jω) =
1
T
s
X( j(ω
k=−∞

∑ − kω
s
))
8/22/2003 © 2003, JH McClellan & RW Schafer 1
Signal Processing First
Lecture 26
Review: Digital Filtering
of Analog Signals
8/22/2003 © 2003, JH McClellan & RW Schafer 3
LECTURE OBJECTIVES
 Sampling Theorem Revisited
 GENERAL: in the FREQUENCY DOMAIN
 Fourier transform of sampled signal
 Reconstruction from samples
 Effective Frequency Response
 Important FT properties
 Convolution ÅÆmultiplication
 Frequency shifting
8/22/2003 © 2003, JH McClellan & RW Schafer 4
Sampling: Freq. Domain
EXPECT
FREQUENCY
SHIFTING !!!
∑ ∑

−∞ =

−∞ =
= − =
k
t jk
k
n
s
s
e a nT t t p
ω
δ ) ( ) (

−∞ =
=
k
t jk
k
s
e a t p
ω
) (
8/22/2003 © 2003, JH McClellan & RW Schafer 5
Frequency-Domain
Representation of Sampling
X
s
( jω) =
1
T
s
X( j(ω
k=−∞

∑ − kω
s
))
“Typical”
bandlimited signal
8/22/2003 © 2003, JH McClellan & RW Schafer 6
Aliasing Distortion
 If ω
s
< 2ω
b
, the copies of X(jω) overlap,
and we have aliasing distortion.
“Typical”
bandlimited signal
8/22/2003 © 2003, JH McClellan & RW Schafer 7
Reconstruction of x(t)
x
s
(t) = x(nT
s
)δ(t − nT
s
)
n=−∞

X
s
( jω) =
1
T
s
X( j(ω
k=−∞

∑ − kω
s
))
X
r
( jω) = H
r
( jω)X
s
( jω)
8/22/2003 © 2003, JH McClellan & RW Schafer 8
Reconstruction: Frequency-Domain
) ( ) ( ) (
so overlap, not do ) (
of copies the , 2 If
ω ω ω
ω
ω ω
j X j H j X
j X
s r r
b s
=
>
H
r
( jω)
8/22/2003 © 2003, JH McClellan & RW Schafer 9
Ideal Reconstruction Filter
h
r
(t) =
sin
π
T
s
t
π
T
s
t
H
r
( jω) =
T
s
ω <
π
T
s
0 ω >
π
T
s

h
r
(0) =1

h
r
(nT
s
) = 0, n = ±1, ±2,…
8/22/2003 © 2003, JH McClellan & RW Schafer 10
Signal Reconstruction
x
r
(t) = h
r
(t) ∗ x
s
(t) = h
r
(t)∗ x(nT
s
)δ(t − nT
s
)
n=−∞

x
r
(t) = x(nT
s
)
sin
π
T
s
(t − nT
s
)
π
T
s
(t −nT
s
)
n=−∞

Ideal bandlimited interpolation formula
x
r
(t) = x(nT
s
)h
r
(t − nT
s
)
n=−∞

8/22/2003 © 2003, JH McClellan & RW Schafer 11
Shannon Sampling Theorem
 “SINC” Interpolation is the ideal
 PERFECT RECONSTRUCTION
 of BANDLIMITED SIGNALS
8/22/2003 © 2003, JH McClellan & RW Schafer 12
Reconstruction in Time-Domain
8/22/2003 © 2003, JH McClellan & RW Schafer 13
Ideal C-to-D and D-to-C
x[n] = x(nT
s
)
x
r
(t) = x[n]
sin
π
T
s
(t − nT
s
)
π
T
s
(t − nT
s
)
n=−∞

Ideal Sampler Ideal bandlimited interpolator
X
r
( jω) = H
r
( jω)X
s
( jω)
X
s
( jω) =
1
T
s
X( j(ω
k=−∞

∑ − kω
s
))
8/22/2003 © 2003, JH McClellan & RW Schafer 14
DT Filtering of CT Signals
D-to-C C-to-D
x(t) y(t) y[n] x[n]
H(e
j ˆ ω
)
X( jω)
Y( jω)
X(e
j ˆ ω
) Y(e
j ˆ ω
)
If no aliasing occurs in sampling x(t), then it follows that
Y( jω) = H
eff
( jω)X( jω)
H
eff
( jω) =
H(e
jωT
s
) ω <
1
2
ω
s
0 ω >
1
2
ω
s

UNDEFINED
NOT LTI
8/22/2003 © 2003, JH McClellan & RW Schafer 15
DT Filtering of a CT Signal
Spectrum of
Discrete-Time Signal
Digital Filter
Reconstruction Filter
(Analog)
ω
ωˆ
ωˆ
ω
Analog Output
8/22/2003 © 2003, JH McClellan & RW Schafer 16
EFFECTIVE Freq. Response
 Assume NO Aliasing, then
 ANALOG FREQ <--> DIGITAL FREQ
 So, we can plot:
 Scaled Freq. Axis
ˆ
ω =ωT
s
=
ω
f
s
H(e
jωT
s
) vs. ω
ANALOG FREQUENCY
DIGITAL FILTER
8/22/2003 © 2003, JH McClellan & RW Schafer 17
EFFECTIVE RESPONSE
DIGITAL FILTER
H(e
j ˆ ω
)
H
eff
( jω)
f
s
= 1000 Hz
sin(11
ˆ
ω / 2)
sin(
ˆ
ω / 2)
8/22/2003 © 2003, JH McClellan & RW Schafer 18
 Frequency Response for Discrete-time
 Analog Frequency Response
H
eff
for 11-pt Averager
1000
ˆ
ω ω
ω ω = = =
s
f
s
T
) 2 / ˆ sin(
) 2 / ˆ 11 sin(
) (
ˆ
ω
ω
ω
=
j
e H
) 2000 / sin(
) 2000 / 11 sin(
) (
ω
ω
ω = j H
8/22/2003 © 2003, JH McClellan & RW Schafer 19
POP QUIZ
 Given:
 Find the output, y(t)
 When
x(t) = cos(2000πt)
2 + 2z
−1
1 −0.8z
−1
D-to-A A-to-D
x(t) y(t) y[n] x[n]
f
s
= 5000Hz
8/22/2003 © 2003, JH McClellan & RW Schafer 20
POP QUIZ BECOMES
 Given:
 Find the output, y[n]
 When
 Because
x[n] = cos(0.4πn)
H(z) =
2 + 2z
−1
1− 0.8z
−1
ωT
s
= 2000π / 5000 = 0.4π
NO Aliasing
8/22/2003 © 2003, JH McClellan & RW Schafer 21
ω
ω
ω ω
ω
ˆ
) ( ) ( where
) ( ] [
then ] [ if
ˆ
ˆ ˆ
ˆ
j
e z
j
n j j
n j
z H e H
e e H n y
e n x
=
=
=
=
SINUSOIDAL RESPONSE
 x[n] = SINUSOID => y[n] is SINUSOID
 Get MAGNITUDE & PHASE from H(z)
8/22/2003 © 2003, JH McClellan & RW Schafer 22
 Given:
 The input:
 Then y[n]
x[n] = cos(0.4πn)
H(z) =
2 + 2z
−1
1− 0.8z
−1
y[n] = Mcos(0.4πn +ψ)
H(e
j 0.4π
) =
2 + 2e
− j0.4π
1− 0.8e
− j 0.4π
= 3.02e
− j 0.452π
8/22/2003 © 2003, JH McClellan & RW Schafer 23
 Given:
 When
 The output is
x(t) = cos(2000πt)
2 + 2z
−1
1 −0.8z
−1
D-to-A A-to-D
x(t) y(t) y[n] x[n]
f
s
= 5000Hz
y(t) = 3.02cos(2000πt − 0.452π )
8/22/2003 © 2003, JH McClellan & RW Schafer 24
ANOTHER INPUT FREQ
 Given:
 Find the output, y(t)
 When
2 + 2z
−1
1 −0.8z
−1
D-to-A A-to-D
x(t) y(t) y[n] x[n]
f
s
= 5000Hz
ˆ
ω = ?
ˆ
ω = ?
) ) 7500 ( 2 cos( ) ( t t x π =
8/22/2003 © 2003, JH McClellan & RW Schafer 25
 Given:
 When
2 + 2z
−1
1 −0.8z
−1
D-to-A A-to-D
x(t) y(t) y[n] x[n]
f
s
= 5000Hz
y(t) = ?
ω = ?
) ) 7500 ( 2 cos( ) ( t t x π =
) 5 . 1 ( 2 5000 / ) 7500 ( 2 cos( ˆ π π ω = =
π ω 3
ˆ
=
8/22/2003 © 2003, JH McClellan & RW Schafer 26
IMPORTANT CONCEPTS
 ALL Signals have Frequency Content
 Sum of Sinusoids
 Complex Exponentials
 Impulses, Square Pulses
 FILTERS alter the Frequency Content
 Image Processing Example: Blur
 Linear Time-Invariant Processing
 3 Domains for Analysis
8/22/2003 © 2003, JH McClellan & RW Schafer 27
Superficial Knowledge
 It depends how carefully you think about
it. If you don’t think very carefully it’s
obvious; but if you think about it in
depth, you’ll get confused and it won’t
be obvious.
…anon
8/22/2003 © 2003, JH McClellan & RW Schafer 28
THREE DOMAINS

H(z) =
b
k
z
−k

1− a

z

z = e
j
ˆ
ω
8/22/2003 © 2003, JH McClellan & RW Schafer 29
THE FUTURE
 Circuits & Laplace Transforms
H(s)
H( jω)
h(t)
Frequency
Response
Implementation is
RLC-op-amp circuit
Polynomials: Poles & Zeros
8/22/2003 © 2003, JH McClellan & RW Schafer 30
Mathematical Elegance
x(t ) =
1

X( jω)e
jωt

−∞

Fourier Synthesis
(Inverse Transform)
Time - domain ⇔Frequency - domain
x(t) ⇔ X( jω)
X( jω) = x(t)
−∞

e
− jωt
dt
Fourier Analysis
(Forward Transform)

WHY USE DSP ?
Mathematical abstractions lead to generalization and discovery of new processing techniques Computer implementations are flexible Applications provide a physical context
4/3/2006
© 2003-2006, JH McClellan & RW Schafer

Fourier Everywhere
Telecommunications Sound & Music
CDROM, Digital Video

Fourier Optics X-ray Crystallography
Protein Structure & DNA

Computerized Tomography Nuclear Magnetic Resonance: MRI Radioastronomy
Ref: Prestini, “The Evolution of Applied Harmonic Analysis”
6 4/3/2006
© 2003-2006, JH McClellan & RW Schafer

7

LECTURE OBJECTIVES
Write general formula for a “sinusoidal” waveform, or signal From the formula, plot the sinusoid versus time What’s a signal?
It’s a function of time, x(t) in the mathematical sense
4/3/2006
© 2003-2006, JH McClellan & RW Schafer

TUNING FORK EXAMPLE
CD-ROM demo “A” is at 440 Hertz (Hz) Waveform is a SINUSOIDAL SIGNAL Computer plot looks like a sine wave This should be the mathematical formula:

A cos(2π ( 440)t + ϕ )
8 4/3/2006
© 2003-2006, JH McClellan & RW Schafer

9

TUNING FORK A-440 Waveform
T ≈ 8.15 − 5.85 = 2.3 ms

SPEECH EXAMPLE
More complicated signal (BAT.WAV) Waveform x(t) is NOT a Sinusoid Theory will tell us
x(t) is approximately a sum of sinusoids FOURIER ANALYSIS
Break x(t) into its sinusoidal components

Time (sec)

f = 1/ T = 1000 / 2.3
4/3/2006

Called the FREQUENCY SPECTRUM

≈ 435 Hz

© 2003-2006, JH McClellan & RW Schafer

10

4/3/2006

© 2003-2006, JH McClellan & RW Schafer

11

Speech Signal: BAT
Nearly Periodic in Vowel Region
Period is (Approximately) T = 0.0065 sec

DIGITIZE the WAVEFORM
x[n] is a SAMPLED SINUSOID
A list of numbers stored in memory

Sample at 11,025 samples per second
Called the SAMPLING RATE of the A/D Time between samples is
1/11025 = 90.7 microsec

Output via D/A hardware (at Fsamp)
4/3/2006
© 2003-2006, JH McClellan & RW Schafer

12

4/3/2006

© 2003-2006, JH McClellan & RW Schafer

13

STORING DIGITAL SOUND x[n] is a SAMPLED SINUSOID A list of numbers stored in memory SINES and COSINES Always use the COSINE FORM CD rate is 44. JH McClellan & RW Schafer T= 4/3/2006 © 2003-2006. JH McClellan & RW Schafer 17 .3π t + 1.2π ) Make a plot ω = (2π ) f 1 2π = f ω PERIOD (in sec) PHASE ϕ 16 4/3/2006 © 2003-2006.584 Mbytes 4/3/2006 © 2003-2006. JH McClellan & RW Schafer A cos(2π ( 440)t + ϕ ) Sine is a special case: sin(ω t ) = cos(ω t − π ) 2 14 4/3/2006 © 2003-2006.100 samples per second 16-bit samples Stereo uses 2 channels Number of bytes for 1 minute is 2 X (16/8) X 60 X 44100 = 10. JH McClellan & RW Schafer 15 SINUSOIDAL SIGNAL EXAMPLE of SINUSOID Given the Formula A cos(ω t + ϕ ) FREQUENCY Radians/sec Hertz (cycles/sec) ω AMPLITUDE Magnitude A 5 cos(0.

PLOT COSINE SIGNAL

PLOTTING COSINE SIGNAL from the FORMULA

5cos(0.3π t +12π ) .
Formula defines A, ω, and φ

5 cos(0.3π t + 1.2π )
Determine period:

A=5

T = 2π / ω = 2π / 0.3π = 20 / 3

Determine a peak location by solving

ω = 0.3π ϕ = 1.2π
4/3/2006
© 2003-2006, JH McClellan & RW Schafer

(ω t + ϕ ) = 0 ⇒ (0.3π t + 1.2π ) = 0
Zero crossing is T/4 before or after Positive & Negative peaks spaced by T/2
18 4/3/2006
© 2003-2006, JH McClellan & RW Schafer

19

PLOT the SINUSOID

5 cos(0.3π t + 1.2π )
Use T=20/3 and the peak location at t=-4

20 3

4/3/2006

© 2003-2006, JH McClellan & RW Schafer

20

Signal Processing First

This Lecture:
Chapter 2, Sects. 2-3 to 2-5

LECTURE #2 Phase & Time-Shift Complex Exponentials

Appendix A: Complex Numbers Appendix B: MATLAB Next Lecture: finish Chap. 2,
Section 2-6 to end

8/22/2003

© 2003, JH McClellan & RW Schafer

1

8/22/2003

© 2003, JH McClellan & RW Schafer

3

LECTURE OBJECTIVES
Define Sinusoid Formula from a plot Relate TIME-SHIFT to PHASE
Introduce an ABSTRACTION: Complex Numbers represent Sinusoids Complex Exponential Signal

SINUSOIDAL SIGNAL

A cos(ω t + ϕ ) FREQUENCY ω AMPLITUDE A Radians/sec
or, Hertz (cycles/sec) Magnitude

ω = ( 2π ) f
1 2π = ω f

z (t ) = Xe
8/22/2003
© 2003, JH McClellan & RW Schafer

jωt
4

PERIOD (in sec)

PHASE

ϕ
5

T=
8/22/2003

© 2003, JH McClellan & RW Schafer

PLOTTING COSINE SIGNAL from the FORMULA

5 cos(0.3π t + 1.2π )
Determine period:

5 cos(0.3π t + 1.2π )
Use T=20/3 and the peak location at t=-4

T = 2π / ω = 2π / 0.3π = 20 / 3
Determine a peak location by solving

(ω t + ϕ ) = 0
Peak at t=-4
8/22/2003
© 2003, JH McClellan & RW Schafer

20 3

6

8/22/2003

© 2003, JH McClellan & RW Schafer

7

TIME-SHIFT
In a mathematical formula we can replace t with t-tm

TIME-SHIFTED SINUSOID
x (t + 4) = 5 cos(0.3π (t + 4)) = 5 cos(0.3π (t − ( −4))

x (t − tm ) = A cos(ω (t − tm ))

Then the t=0 point moves to t=tm Peak value of cos(ω(t-tm)) is now at t=tm
8/22/2003
© 2003, JH McClellan & RW Schafer

8

8/22/2003

© 2003, JH McClellan & RW Schafer

9

T Between peaks or zero crossings Compute frequency: ω = 2π/T A cos(ω (t − tm )) = A cos(ω t + ϕ ) and we obtain: or. 3 steps − ω tm = ϕ Measure time of a peak: tm Compute phase: φ = -ω tm ϕ tm = − ω © 2003. JH McClellan & RW Schafer 12 8/22/2003 © 2003. JH McClellan & RW Schafer 13 .00125 sec 8/22/2003 ϕ = −ω tm = −(200π )(tm ) = 0. ω.01sec 1 T = 1 period = 100 ω= 2π T = 2π 0. JH McClellan & RW Schafer 8/22/2003 11 (A. φ) from a PLOT SINE DRILL (MATLAB GUI) 0.25π © 2003.01 = 200π tm = −0.PHASE <--> TIME-SHIFT Equate the formulas: SINUSOID from a PLOT Measure the period. JH McClellan & RW Schafer Measure height of positive peak: A 10 8/22/2003 © 2003.

PHASE is AMBIGUOUS The cosine signal is periodic Period is 2π COMPLEX NUMBERS To solve: z2 = -1 z=j Math and Physics use z = i A cos(ω t + ϕ + 2π ) = A cos(ω t + ϕ ) −ϕ Thus adding any multiple of 2π leaves x(t) unchanged Complex number: z = x + j y y x z Cartesian coordinate system 15 if tm = tm 2 = 8/22/2003 ω − (ϕ + 2π ) ω . JH McClellan & RW Schafer z3 = z1 + z2 = (4 − j 3) + (2 + j5) = (4 + 2) + j ( −3 + 5) = 6 + j2 17 . JH McClellan & RW Schafer 16 8/22/2003 © 2003. JH McClellan & RW Schafer © 2003. then = −ϕ ω − 2π ω = tm − T 14 8/22/2003 © 2003. JH McClellan & RW Schafer PLOT COMPLEX NUMBERS COMPLEX ADDITION = VECTOR Addition 8/22/2003 © 2003.

*** POLAR FORM *** Vector Form Length =1 Angle = θ POLAR <--> RECTANGULAR Relate (x. JH McClellan & RW Schafer .θ) r θ r =x +y 2 2 2 y x Common Values j has angle of 0.y) to (r.5π −2π because the PHASE is AMBIGUOUS 8/22/2003 © 2003. angle of −j could be −0.2π in 0.5π = 1. time ex: ω=20π rad/s Rotates 0. JH McClellan & RW Schafer e = cos(θ ) + j sin(θ ) 21 20 8/22/2003 © 2003.5π −1 has angle of π − j has angle of 1. JH McClellan & RW Schafer Euler’s FORMULA Complex Exponential Real part is cosine Imaginary part is sine Magnitude is one COMPLEX EXPONENTIAL e jω t = cos(ω t ) + j sin(ω t ) Interpret this as a Rotating Vector ωt θ=ω Angle changes vs.5π also. JH McClellan & RW Schafer θ= y Tan −1 x () Most calculators do Polar-Rectangular x = r cosθ y = r sin θ 19 Need a notation for POLAR FORM 18 8/22/2003 © 2003.01 secs jθ e jθ = cos(θ ) + j sin(θ ) re jθ = r cos(θ ) + jr sin(θ ) 8/22/2003 © 2003.

REAL PART EXAMPLE jω t cos(ω t ) = ℜe{ e } A cos(ω t + ϕ ) = ℜe Ae jϕ e jω t Evaluate: Answer: x (t ) = A cos(ω t + ϕ ) x (t ) = ℜe − 3 je jω t { { } } A cos(ω t + ϕ ) = ℜe{ Ae j (ω t +ϕ ) } = ℜe{ Ae jϕ e jω t } © 2003.cos = REAL PART Real Part of Euler’s General Sinusoid So. JH McClellan & RW Schafer x (t ) = ℜe ( −3 j )e jω t = ℜe 3e − j 0. any Sinusoid = REAL PART of Xejωt x(t ) = ℜe Xe jωt = ℜe Ae jϕ e jωt 8/22/2003 © 2003. JH McClellan & RW Schafer { } { } 24 .5π ) 22 8/22/2003 © 2003. JH McClellan & RW Schafer { { } } 8/22/2003 23 COMPLEX AMPLITUDE General Sinusoid x(t ) = A cos(ω t + ϕ ) = ℜe Ae jϕ e jωt Complex AMPLITUDE = X { } z (t ) = Xe jωt X = Ae jϕ Then.5π e jω t = 3 cos(ω t − 0.

JH McClellan & RW Schafer 1 1/12/2004 © 2003. JH McClellan & RW Schafer 5 . Section 2-6 LECTURE #3 Phasor Addition Theorem Other Reading: Appendix A: Complex Numbers Appendix B: MATLAB Next Lecture: start Chapter 3 1/12/2004 © 2003. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES Phasors = Complex Amplitude Complex Numbers represent Sinusoids Z DRILL (Complex Arith) z (t ) = Xe jωt = ( Ae jϕ )e jωt Develop the ABSTRACTION: Adding Sinusoids = Complex Addition PHASOR ADDITION THEOREM 1/12/2004 © 2003.Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 2. JH McClellan & RW Schafer 4 1/12/2004 © 2003.

time ex: ω=20π rad/s Rotates 0. JH McClellan & RW Schafer e jθ = cos(θ ) + j sin(θ ) e jωt = cos(ω t ) + j sin(ω t ) 1/12/2004 © 2003..) 1/12/2004 © 2003.2π in 0. JH McClellan & RW Schafer 8 1/12/2004 © 2003. JH McClellan & RW Schafer 9 . is EASIER !!! Can you recall cos(θ1+θ2) ? Use: real part of ej(θ1+θ2) = cos(θ +θ ) 1 2 Euler’s FORMULA Complex Exponential Real part is cosine Imaginary part is sine Magnitude is one e j (θ1 +θ 2 ) = e jθ1 e jθ 2 = (cosθ1 + j sin θ1 )(cosθ 2 + j sin θ 2 ) = (cosθ1 cosθ 2 − sin θ1 sin θ 2 ) + j (.01 secs e jθ = cos(θ ) + j sin(θ ) 1/12/2004 © 2003. even complex. JH McClellan & RW Schafer 6 7 Real & Imaginary Part Plots COMPLEX EXPONENTIAL e jω t = cos(ω t ) + j sin(ω t ) Interpret this as a Rotating Vector PHASE DIFFERENCE = π/2 ωt θ=ω Angle changes vs.AVOID Trigonometry Algebra..

5π z(t) = Xe 1/12/2004 jω t { = ℜe{ 3e e j 77π t } } 13 © 2003. JH McClellan & RW Schafer 1/12/2004 © 2003.5π ) j 0.5π © 2003. A cos(ω t + ϕ ) = ℜe{ j (ω t +ϕ ) } Ae = ℜe{ jϕ e jω t } Ae © 2003.Rotating Phasor See Demo on CD-ROM Chapter 2 Cos = REAL PART Real Part of Euler’s General Sinusoid cos(ω t) = ℜe{ jω t } e x(t) = Acos(ω t + ϕ ) So. JH McClellan & RW Schafer X = 3e j 0. JH McClellan & RW Schafer .5π ) Use EULER’s FORMULA: x(t) = ℜe { Xe Complex AMPLITUDE = X jω t }= ℜe{z(t)} X = Ae jϕ 12 1/12/2004 x(t ) = ℜe 3e j ( 77π t +0. JH McClellan & RW Schafer 10 1/12/2004 11 COMPLEX AMPLITUDE General Sinusoid POP QUIZ: Complex Amp Find the COMPLEX AMPLITUDE for: x(t) = Acos(ω t + ϕ ) = ℜe{Ae jϕ e jω t } Sinusoid = REAL PART of (Aejφ)ejωt x(t ) = 3 cos(77π t + 0.

JH McClellan & RW Schafer 15 PHASOR ADDITION RULE Phasor Addition Proof Get the new complex amplitude by complex addition 1/12/2004 © 2003.WANT to ADD SINUSOIDS ALL SINUSOIDS have SAME FREQUENCY HOW to GET {Amp. JH McClellan & RW Schafer 16 1/12/2004 © 2003. JH McClellan & RW Schafer 14 1/12/2004 © 2003.Phase} of RESULT ? ADD SINUSOIDS Sum Sinusoid has SAME Frequency 1/12/2004 © 2003. JH McClellan & RW Schafer 17 .

7.POP QUIZ: Add Sinusoids ADD THESE 2 SINUSOIDS: POP QUIZ (answer) COMPLEX ADDITION: x1 (t ) = cos(77π t ) x2 (t ) = 3 cos(77π t + 0. tm3=-0.0394 x2 (t ) tm2 Convert to phase (T=0.5π ) COMPLEX ADDITION: 1 + j 3 = 2e jπ / 3 j 0.532 20 1/12/2004 © 2003. JH McClellan & RW Schafer 1/12/2004 © 2003.0556. JH McClellan & RW Schafer 19 ADD SINUSOIDS EXAMPLE x1 (t ) tm1 Convert Time-Shift to Phase Measure peak times: tm1=-0.5π 1/12/2004 © 2003. JH McClellan & RW Schafer x3 (t ) = 2 cos(77π t + π ) 3 18 1/12/2004 © 2003.0194. A3=1. tm2=-0.9. A2=1. JH McClellan & RW Schafer 21 . ω π φ2= 200π/180 x3 (t ) = x1 (t ) + x2 (t ) Amplitudes tm3 A1=1.1) φ1=-ωtm1 = -2π(tm1 /T) = 70π/180.5π j 3 = 3e 1 CONVERT back to cosine form: 1e j 0 + 3e j 0.

JH McClellan & RW Schafer VECTOR (PHASOR) ADD 22 1/12/2004 X3 X2 © 2003.785 .532 at angle 141.9476 ADD SINUSOIDS X1 Convert back to Polar X3 = 1.Phasor Add: Numerical Convert Polar to Cartesian X1 = 0.597 X2 = -1.6498 sum = X3 = -1. JH McClellan & RW Schafer 23 .79π/180 This is the sum 1/12/2004 © 2003.204 + j0.j0.5814 + j1.

3-3. Section 3-1 Lecture 4 Spectrum Representation Other Reading: Appendix A: Complex Numbers Next Lecture: Ch 3. JH McClellan & RW Schafer 5 . JH McClellan & RW Schafer 3 LECTURE OBJECTIVES Sinusoids with DIFFERENT Frequencies SYNTHESIZE by Adding Sinusoids FREQUENCY DIAGRAM Plot Complex Amplitude vs. JH McClellan & RW Schafer N 10 k =1 4e − jπ / 2 –250 7e 7e − jπ / 3 4e jπ / 2 250 f (in Hz) –100 0 100 4 8/31/2003 © 2003.Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 3. 3-7 & 3-8 8/31/2003 © 2003. JH McClellan & RW Schafer 1 8/31/2003 © 2003. Freq jπ / 3 x (t ) = ∑ Ak cos(2π f k t + ϕ k ) SPECTRUM Representation Graphical Form shows DIFFERENT Freqs 8/31/2003 © 2003. Sects 3-2.

Diagram Frequency is the vertical axis A-440 MOTIVATION Synthesize Complicated Signals Musical Notes Piano uses 3 strings for many notes Chords: play several notes simultaneously Human Speech Vowels have dominant frequencies Application: computer generated speech Can all signals be generated this way? Time is the horizontal axis Sum of sinusoids? 6 8/31/2003 © 2003. JH McClellan & RW Schafer 8/31/2003 © 2003. JH McClellan & RW Schafer 9 .Another FREQ. JH McClellan & RW Schafer 7 Fur Elise WAVEFORM Beat Notes Speech Signal: BAT Nearly Periodic in Vowel Region Period is (Approximately) T = 0.0065 sec 8/31/2003 © 2003. JH McClellan & RW Schafer 8 8/31/2003 © 2003.

JH McClellan & RW Schafer 13 . JH McClellan & RW Schafer SPECTRUM Interpretation Cosine = sum of 2 complex exponentials: NEGATIVE FREQUENCY Is negative frequency real? Doppler Radar provides an example Police radar measures speed by using the Doppler shift principle Let’s assume 400Hz 60 mph +400Hz means towards the radar -400Hz means away (opposite direction) Think of a train whistle 12 8/31/2003 © 2003.Euler’s Formula Reversed Solve for cosine (or sine) INVERSE Euler’s Formula Solve for cosine (or sine) e jω t = cos(ω t ) + j sin(ω t ) − jω t e = cos( −ω t ) + j sin( −ω t ) e − jω t = cos(ω t ) − j sin(ω t ) e jω t + e − jω t = 2 cos(ω t ) cos(ω t ) = 1 (e jω t + e − jω t ) 2 8/31/2003 © 2003. JH McClellan & RW Schafer A cos(7t ) = A e j 7t 2 A + 2 e− j 7t One has a positive frequency The other has negative freq. JH McClellan & RW Schafer cos(ω t ) = 1 (e jω t + e − jω t ) 2 sin(ω t ) = 10 8/31/2003 1 2j (e jω t − e − jω t ) 11 © 2003. Amplitude of each is half as big 8/31/2003 © 2003.

JH McClellan & RW Schafer 8/31/2003 15 SPECTRUM ---> SINUSOID Add the spectrum components: − jπ / 2 Gather (A. JH McClellan & RW Schafer 17 .5π e j 7t + 1 Ae j 0. has phase = +0.5π e − j 7t 2 ( 1 A)e j 0. JH McClellan & RW Schafer GRAPHICAL SPECTRUM EXAMPLE of SINE A sin(7t ) = 1 2 Ae − j 0.5π AMPLITUDE.5π © 2003.φ) ω.SPECTRUM of SINE Sine = sum of 2 complex exponentials: A sin(7t ) = 2Aj e j 7t − 2Aj e − j 7t = 1 Ae − j 0.5π 2 7 ω j = e j 0.5π e − j 7t 2 2 −1 = j Positive freq.φ Frequencies: -250 Hz -100 Hz 0 Hz 100 Hz 250 Hz f (in Hz) Amplitude & Phase 4 7 10 7 4 -π/2 +π/3 0 -π/3 +π/2 4e 7e jπ / 3 10 7e − jπ / 3 4e jπ / 2 250 –250 –100 0 100 Note the conjugate phase DC is another name for zero-freq component DC component always has φ=0 or π (for real x(t) ) What is the formula for the signal x(t)? 8/31/2003 © 2003.5π 2 -7 0 ( 1 A)e − j 0. has phase = -0. PHASE & FREQUENCY are shown 14 8/31/2003 © 2003.5π e j 7t + 1 Ae j 0.ω.φ information ω. JH McClellan & RW Schafer 16 8/31/2003 © 2003.5π Negative freq.

JH McClellan & RW Schafer x (t ) = A0 + ∑ Ak cos(2π f k t + ϕ k ) k =1 8/31/2003 © 2003. we get the general form: A cos(ω t + ϕ ) = 1 Ae jϕ e jω t + 1 Ae − jϕ e − jω t 2 2 8/31/2003 © 2003. JH McClellan & RW Schafer 19 Simplify Components FINAL ANSWER x (t ) = 10 + 7e − jπ / 3 j 2π (100) t e + 7e jπ / 3 − j 2π (100) t e 4e jπ / 2e j 2π ( 250)t + 4e − jπ / 2e − j 2π ( 250)t Use Euler’s Formula to get REAL sinusoids: x (t ) = 10 + 14 cos(2π (100)t − π / 3) + 8 cos(2π ( 250)t + π / 2) So.Add Spectrum Components-1 Frequencies: -250 Hz -100 Hz 0 Hz 100 Hz 250 Hz Add Spectrum Components-2 4e − jπ / 2 –250 Amplitude & Phase 4 7 10 7 4 -π/2 π +π/3 π 0 -π/3 π +π/2 π 7e jπ / 3 10 7e − jπ / 3 4e jπ / 2 250 f (in Hz) –100 0 100 x (t ) = 10 + 7e − jπ / 3e j 2π (100)t + 7e jπ / 3e − j 2π (100)t 8/31/2003 x (t ) = 10 + 7e − jπ / 3e j 2π (100)t + 7e jπ / 3e − j 2π (100)t 8/31/2003 4e jπ / 2e j 2π ( 250)t + 4e − jπ / 2e − j 2π ( 250)t © 2003. JH McClellan & RW Schafer 18 4e jπ / 2e j 2π ( 250)t + 4e − jπ / 2e − j 2π ( 250)t © 2003. JH McClellan & RW Schafer N 20 21 .

Summary: GENERAL FORM x (t ) = A0 + ∑ Ak cos(2π f k t + ϕ k ) x (t ) = X 0 + ∑ ℜe X k e j 2π f k t k =1 N N Example: Synthetic Vowel Sum of 5 Frequency Components ℜe{z} = 1 z + 2 x (t ) = X 0 + ∑ 8/31/2003 k =1 1 z∗ 2 N { } X k = Ak e jϕ k Frequency = f k k =1 { 1 2 ∗ X k e j 2π f k t + 1 X k e − j 2π f k t 2 } 22 8/31/2003 © 2003.5Xk (except XDC) Conjugates in negative frequency SPECTRUM of VOWEL (Polar Format) 0. JH McClellan & RW Schafer © 2003. JH McClellan & RW Schafer 24 8/31/2003 © 2003. JH McClellan & RW Schafer 23 SPECTRUM of VOWEL Note: Spectrum has 0. JH McClellan & RW Schafer 25 .5Ak φk 8/31/2003 © 2003.

JH McClellan & RW Schafer 26 .Vowel Waveform (sum of all 5 components) 8/31/2003 © 2003.

Phase LECTURE OBJECTIVES Signals with HARMONIC Frequencies Add Sinusoids with fk = kf0 N Plot & Sketches S(t) versus t Spectrum x (t ) = A0 + ∑ Ak cos(2π kf 0t + ϕ k ) k =1 Recorded Signals Speech Music No simple formula MATLAB Numerical Computation Plotting list of numbers 4 FREQUENCY can change vs. Sections 3-7 and 3-8 Lecture 5 Periodic Signals. TIME Chirps: 2 x(t) = cos(α t ) © 2003. 3-5 and 3-6 1/28/2005 © 2003. JH McClellan & RW Schafer . JH McClellan & RW Schafer 3 Problem Solving Skills Math Formula Sum of Cosines Amp.m) (plotspec. Harmonics & Time-Varying Sinusoids Next Lecture: Fourier Series ANALYSIS Sections 3-4. Freq. Sections 3-2 and 3-3 Chapter 3.m) 1/28/2005 1/28/2005 © 2003. JH McClellan & RW Schafer 5 Introduce Spectrogram Visualization (specgram. JH McClellan & RW Schafer 1 1/28/2005 © 2003.Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 3.

SPECTRUM DIAGRAM Recall Complex Amplitude vs. JH McClellan & RW Schafer 8 T ⎝ T ⎠ © 2003. Freq 1 2 ∗ Xk SPECTRUM for PERIODIC ? Nearly Periodic in the Vowel Region Period is (Approximately) T = 0. JH McClellan & RW Schafer 6 1/28/2005 © 2003.0065 sec 1 2 4e − jπ / 2 7e jπ / 3 10 7e jϕ k − jπ / 3 X k = ak X k = Ak e –100 0 4e jπ / 2 250 f (in Hz) –250 100 x (t ) = 10 + 14 cos(2π (100)t − π / 3) + 8 cos(2π ( 250)t + π / 2) 1/28/2005 © 2003. JH McClellan & RW Schafer 9 . JH McClellan & RW Schafer 7 PERIODIC SIGNALS Repeat every T secs Definition Example: Period of Complex Exponential x (t ) = x (t + T ) x (t ) = cos2 (3t ) T =? T= 2π 3 x (t ) = e jω t x (t + T ) = x (t ) ? T =π 3 Definition: Period is T Speech can be “quasi-periodic” e jω ( t +T ) = e jω t e j 2π k = 1 ⇒ e jωT = 1 ⇒ ωT = 2π k 2π k ⎛ 2π ⎞ k = integer ω= =⎜ ⎟k = ω 0k 1/28/2005 1/28/2005 © 2003.

Harmonic Signal Spectrum Define FUNDAMENTAL FREQ x (t ) = A0 + ∑ Ak cos(2π kf 0t + ϕ k ) k =1 N Periodic signal can only have : f k = k f 0 x (t ) = A0 + ∑ Ak cos(2π kf 0t + ϕ k ) X k = Ak e jϕ k x (t ) = X 0 + ∑ k =1 1/28/2005 N k =1 f0 = 1 T fk = k f0 (ω0 = 2π f 0 ) f0 = N { 1 2 ∗ X k e j 2π kf 0t + 1 X k e − j 2π kf 0t 2 } 1 T0 f 0 = fundamental Frequency (largest) T0 = fundamental Period (shortest) 1/28/2005 © 2003. JH McClellan & RW Schafer 12 1/28/2005 50 Hz ? © 2003. JH McClellan & RW Schafer 10 Harmonic Signal (3 Freqs) POP QUIZ: FUNDAMENTAL Here’s another spectrum: 3rd 5th 4e − jπ / 2 –250 7e jπ / 3 10 7e − jπ / 3 4e jπ / 2 250 f (in Hz) –100 0 100 What is the fundamental frequency? 10 Hz What is the fundamental frequency? 100 Hz ? 1/28/2005 © 2003. JH McClellan & RW Schafer 11 © 2003. JH McClellan & RW Schafer 13 .

JH McClellan & RW Schafer NOT PERIODIC 16 1/28/2005 © 2003. if we COMPUTE the spectrum for x(t) During short intervals 1/28/2005 © 2003. have the computer write the music Can a machine extract frequencies? Yes. JH McClellan & RW Schafer 14 1/28/2005 © 2003. JH McClellan & RW Schafer 17 .1 SPECIAL RELATIONSHIP to get a PERIODIC SIGNAL 1/28/2005 © 2003. JH McClellan & RW Schafer 15 NON-Harmonic Signal FREQUENCY ANALYSIS Now. a much HARDER problem Given a recording of a song.IRRATIONAL SPECTRUM Harmonic Signal (3 Freqs) T=0.

JH McClellan & RW Schafer 18 1/28/2005 © 2003.m & spectgr.m SP-First has plotspec. JH McClellan & RW Schafer 19 1/28/2005 R-rated: ADULTS ONLY SPECTROGRAM Tool MATLAB function is specgram.m SPECTROGRAM EXAMPLE Two Constant Frequencies: Beats 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) 1/28/2005 © 2003. JH McClellan & RW Schafer 20 1/28/2005 © 2003.Time-Varying FREQUENCIES Diagram Frequency is the vertical axis A-440 SIMPLE TEST SIGNAL C-major SCALE: stepped frequencies Frequency is constant for each note IDEAL Time is the horizontal axis © 2003. JH McClellan & RW Schafer 21 cos(2π (660)t ) sin(2π (12)t ) .

AM Radio Signal Same as BEAT Notes SPECTRUM of AM (Beat) 4 complex exponentials in AM: 1 2 (e 1 2 cos(2π (660)t ) sin(2π (12)t ) + e − j 2π ( 660) t j 2π ( 660 ) t ) (e 1 2j j 2π (12 ) t − e − j 2π (12 ) t ) ) 1 4 e jπ / 2 1 4 e − jπ / 2 1 4 e jπ / 2 1 4 e − jπ / 2 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π (648)t 2 2 –672 –648 0 648 672 f (in Hz) cos(2π (672)t − + π) 2 22 What is the fundamental frequency? 648 Hz ? 1/28/2005 24 Hz ? © 2003. JH McClellan & RW Schafer 23 1/28/2005 © 2003. JH McClellan & RW Schafer 24 1/28/2005 © 2003. JH McClellan & RW Schafer STEPPED FREQUENCIES C-major SCALE: successive sinusoids Frequency is constant for each note SPECTROGRAM of C-Scale Sinusoids ONLY IDEAL From SPECGRAM ANALYSIS PROGRAM ARTIFACTS at Transitions 1/28/2005 © 2003. JH McClellan & RW Schafer 25 .

JH McClellan & RW Schafer 27 New Signal: Linear FM Called Chirp Signals (LFM) Quadratic phase QUADRATIC INSTANTANEOUS FREQ Definition x (t ) = A cos(α t 2 + 2π f 0 t + ϕ ) Freq will change LINEARLY vs. JH McClellan & RW Schafer . time Example of Frequency Modulation (FM) Define “instantaneous frequency” 1/28/2005 © 2003. JH McClellan & RW Schafer 28 x (t ) = A cos(ψ (t )) d ⇒ ωi (t ) = dt ψ (t ) Derivative of the “Angle” For Sinusoid: x (t ) = A cos(2π f 0t + ϕ ) ψ (t ) = 2π f 0t + ϕ ⇒ ωi ( t ) = 1/28/2005 Makes sense d ψ (t ) dt = 2π f 0 29 © 2003.Spectrogram of LAB SONG Sinusoids ONLY Analysis Frame = 40ms ARTIFACTS at Transitions Time-Varying Frequency Frequency can change vs. not stepped FREQUENCY MODULATION (FM) x (t ) = cos(2π f c t + v (t )) VOICE CHIRP SIGNALS Linear Frequency Modulation (LFM) 1/28/2005 © 2003. JH McClellan & RW Schafer 26 1/28/2005 © 2003. time Continuously.

JH McClellan & RW Schafer 33 . JH McClellan & RW Schafer CHIRP WAVEFORM OTHER CHIRPS ψ(t) can be anything: x (t ) = A cos(α cos( β t ) + ϕ ) d ⇒ ωi (t ) = dt ψ (t ) = −αβ sin( β t ) ψ(t) could be speech or music: FM radio broadcast 1/28/2005 © 2003. time CHIRP SPECTROGRAM x (t ) = A cos(α t 2 + β t + ϕ ) ⇒ ψ (t ) = α t 2 + β t + ϕ ⇒ ωi ( t ) = 1/28/2005 d ψ (t ) dt = 2α t + β 30 1/28/2005 © 2003. JH McClellan & RW Schafer 31 © 2003. JH McClellan & RW Schafer 32 1/28/2005 © 2003.INSTANTANEOUS FREQ of the Chirp Chirp Signals have Quadratic phase Freq will change LINEARLY vs.

SINE-WAVE FREQUENCY MODULATION (FM) Look at CD-ROM Demos in Ch 3 1/28/2005 © 2003. JH McClellan & RW Schafer 34 .

uk/~history/Mathematicians/Fourier. JH McClellan & RW Schafer 5 .html 4 9/8/2003 © 2003.ac. Sects 3-4. 62-66 in Ch 3 in DSP First Notation: ak for Fourier Series Other Reading: Next Lecture: More Fourier Series 9/8/2003 © 2003.Signal Processing First READING ASSIGNMENTS This Lecture: Fourier Series in Ch 3. JH McClellan & RW Schafer Heat ! Napoleonic era http://www-groups. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES Work with the Fourier Series Integral T0 HISTORY Jean Baptiste Joseph Fourier 1807 thesis (memoir) On the Propagation of Heat in Solid Bodies ak = 1 T0 ∫ x (t )e − j ( 2π k / T0 ) t dt 0 ANALYSIS via Fourier Series For PERIODIC signals: x(t+T0) = x(t) Later: spectrum from the Fourier Series 9/8/2003 © 2003. JH McClellan & RW Schafer 1 9/8/2003 © 2003. 3-5 & 3-6 Lecture 6 Fourier Series Coefficients Replaces pp.dcs.st-and.

JH McClellan & RW Schafer Harmonic Signal Fourier Series Synthesis x (t ) = k = −∞ ∑ ak e ∞ j 2π k f 0 t x (t ) = k = −∞ ak e j 2π k f0 t ∑ ak = 1 X k = 1 Ak e jϕ k 2 2 ∞ PERIOD/FREQUENCY of COMPLEX EXPONENTIAL: 2π 2π ( f 0 ) = ω0 = T0 9/8/2003 1 or T0 = f0 8 x (t ) = A0 + ∑ Ak cos(2π kf 0t + ϕ k ) k =1 N X k = Ak e 9/8/2003 jϕ k COMPLEX AMPLITUDE 9 © 2003. JH McClellan & RW Schafer © 2003.SPECTRUM DIAGRAM Recall Complex Amplitude vs. JH McClellan & RW Schafer 6 9/8/2003 © 2003. JH McClellan & RW Schafer . Freq 1 2 4e − jπ / 2 –250 X k* 7e jπ / 3 10 7e jϕ k − jπ / 3 1 2 X k = ak X k = Ake –100 0 4e jπ / 2 250 f (in Hz) 100 * 1 X a x (t ) = X 0 + ∑ { akk e j 2π f t + 1 akk e − j 2π f t X∗ 2 2 k k N k =1 { } 7 9/8/2003 © 2003.

1 Synthesis can be HARD Synthesize Speech so that it sounds good 9/8/2003 © 2003.φk) create x(t) ANALYSIS Hard Given x(t).Ak.Harmonic Signal (3 Freqs) a1 a3 a5 SYNTHESIS vs. JH McClellan & RW Schafer .Ak. JH McClellan & RW Schafer 9/8/2003 © 2003. ANALYSIS SYNTHESIS Easy Given (ωk. extract (ωk.φk) ω How many? Need algorithm for computer T = 0. JH McClellan & RW Schafer 10 9/8/2003 © 2003. JH McClellan & RW Schafer 11 STRATEGY: x(t) ANALYSIS ak INTEGRAL Property of exp(j) INTEGRATE over ONE PERIOD T0 Get representation from the signal Works for PERIODIC Signals Fourier Series Answer is: an INTEGRAL over one period T0 T0 e − j ( 2π / T0 ) mt e − j ( 2π / T0 ) mt dt = ∫ − j 2π m 0 0 T0 = (e − j 2π m − 1) − j 2π m − j ( 2π / T0 ) mt dt = 0 ∫e 0 T0 ak = 9/8/2003 1 T0 ∫ x (t )e − jω 0k t dt 12 T0 0 m≠0 ω0 = 2π T0 13 © 2003.

04 ) e 0 . JH McClellan & RW Schafer © 2003. x(t) 1 T (k ≠ 0) .04 sec.02 1 − j ( 2π / .02 9/8/2003 0 .04 ) kt 1 ak = 1e dt = . JH McClellan & RW Schafer SQUARE WAVE EXAMPLE FS for a SQUARE WAVE 1 0 ak = ∫ x (t )e − j ( 2π / T0 ) kt dt T0 0 .ORTHOGONALITY of exp(j) PRODUCT of exp(+j ) and exp(-j ) T 0 k ≠ 1 0 j ( 2π / T0 ) t − j ( 2π / T0 ) kt  e e dt =  T0 ∫ 1 k = 0  Isolate One FS Coefficient x (t ) = T0 1 T0 0 k = −∞ ∑ ak e j ( 2π / T )k t 0 ∞ ∫ x (t )e 0 − j ( 2π / T0 ) t T0 dt = 1 T0  ∞ j ( 2π / T ) k t  − j ( 2π / T0 ) t dt ∫  k∑ ak e 0 e    0  = −∞ T0 1 T0 1 0 j ( 2π / T0 )( ∫e T0 0 9/8/2003 T −k ) t dt 14 ∫ x (t )e − j ( 2π / T0 ) t ⇒ ak = 9/8/2003 T0 1 T0 0  T0 j ( 2π / T ) k t − j ( 2π / T ) t  1 0 0 dt = ∑ ak  T ∫ e e dt  = a  0  k = −∞  0 Integral is zero  ∞ ∫ x (t )e − j ( 2π / T0 ) k t dt except for k = 15 © 2003.01 .04 ∫ 0 –. JH McClellan & RW Schafer © 2003.02 {ak} 1 0 ≤ t < 1 T0 2  x (t ) =  0 1 T0 ≤ t < T0  2 for T0 = 0.04 ) kt − j ( 2π / .04( − j 2π k / . JH McClellan & RW Schafer 17 .02 0.04 t 16 9/8/2003 1 1 − ( −1)k − j (π ) k (e = − 1) = ( − j 2π k ) j 2π k © 2003.

±3.04) = 2π (25) − j  πk  ak =  0   1 2  k = ±1. JH McClellan & RW Schafer . JH McClellan & RW Schafer 1 T0 ∫ x(t )dt 0 (DC component) © 2003.04 ∫ .±4. JH McClellan & RW Schafer 20 9/8/2003 21 .±4.04 0 © 2003.±3.DC Coefficient: a0 1 0 ak = ∫ x (t )e − j ( 2π / T0 ) kt dt T0 0 1 0 1 a0 = ∫ x (t )dt = ( Area ) T0 0 T0 a0 = 9/8/2003 Fourier Coefficients ak (k = 0) ak is a function of k Complex Amplitude for k-th Harmonic This one doesn’t depend on the period.… k =0 19 © 2003.02 − 0) = .… k = ±2. T0 T T 1 1 1 dt = (.… k = ±2.02 1 2 18 9/8/2003  1  jπ k k 1 − ( −1)  ak = = 0 j 2π k   1 2  k = ±1. JH McClellan & RW Schafer Spectrum from Fourier Series ω0 = 2π /(0.… k =0 Fourier Series Integral HOW do you determine ak from x(t) ? T0 ak = 1 T0 x (t )e − j ( 2π / T0 ) k t dt ∫ 0 * a − k = ak Fundamental Frequency f 0 = 1 / T0 T0 when x (t ) is real a0 = 9/8/2003 © 2003.

Signal Processing First READING ASSIGNMENTS This Lecture: Fourier Series in Ch 3. Sects 3-4. 62-66 in Ch 3 in DSP First Notation: ak for Fourier Series Other Reading: Next Lecture: Sampling 9/13/2006 EE-2025 Spring-2005 jMc 3 LECTURE OBJECTIVES ANALYSIS via Fourier Series For PERIODIC signals: x(t+T0) = x(t) T0 SPECTRUM DIAGRAM Recall Complex Amplitude vs. 3-5 & 3-6 Lecture 7 Fourier Series & Spectrum Replaces pp. Freq ∗ ak ak = 1 T0 ∫ x (t )e − j ( 2π k / T0 ) t dt 4e − jπ / 2 –250 7e jπ / 3 10 a0 7e − jπ / 3 ak = 1 Ak e jϕ k 2 4e jπ / 2 250 f (in Hz) 0 –100 0 100 SPECTRUM from Fourier Series ak is Complex Amplitude for k-th Harmonic 9/13/2006 EE-2025 Spring-2005 jMc ∗ x (t ) = a0 + ∑ ak e j 2π f k t + ak e − j 2π f k t k =1 4 9/13/2006 EE-2025 Spring-2005 jMc N { } 5 .

ak Get representation from the signal Works for PERIODIC Signals Fourier Series Answer is: an INTEGRAL over one period T0 k = −3 9/13/2006 k = −1 k =1 k =3 8 9/13/2006 ak = 1 T0 ∫ x (t )e − jω0k t dt jMc 0 Spring-2005 EE-2025 Spring-2005 jMc EE-2025 9 .Harmonic Signal Example 0 x (t ) = sin 3 (3π t ) x (t ) = k = −∞ ∑ ak e j 2π k f t 1 or T0 = f0 jMc ∞ PERIOD/FREQUENCY of COMPLEX EXPONENTIAL: ( f 0 ) = ω0 = 2π 2π T0 9/13/2006 EE-2025 Spring-2005 ⎛ j⎞ ⎛ − 3 j ⎞ j 3π t ⎛ 3 j ⎞ − j 3π t ⎛ − j ⎞ − j 9π t x (t ) = ⎜ ⎟e j 9π t + ⎜ +⎜ + ⎜ ⎟e ⎟e ⎟e ⎝ 8 ⎠ ⎝ 8 ⎠ ⎝8⎠ ⎝ 8 ⎠ 6 9/13/2006 EE-2025 Spring-2005 jMc 7 Example x (t ) = sin 3 (3π t ) STRATEGY: x(t) ANALYSIS ak ⎛ j⎞ ⎛ − 3 j ⎞ j 3π t ⎛ 3 j ⎞ − j 3π t ⎛ − j ⎞ − j 9π t x (t ) = ⎜ ⎟e j 9π t + ⎜ +⎜ + ⎜ ⎟e ⎟e ⎟e ⎝8⎠ ⎝ 8 ⎠ ⎝ 8 ⎠ ⎝ 8 ⎠ In this case. analysis just requires picking off the coefficients.

01 . T0 ⎧1 0 ≤ t < 1 T0 2 ⎪ x (t ) = ⎨ ⎪0 1 T0 ≤ t < T0 ⎩ 2 for T0 = 0.±4. x(t) 1 –.K k = ±2.04 sec.±3.K k =0 15 Spring-2005 .02 9/13/2006 0 EE-2025 .FS: Rectified Sine Wave {ak} 1 ak = T0 ak = = = = 1 T0 T0 ∫ x (t )e 0 − j ( 2π / T0 ) kt dt ( k ≠ ±1) Half-Wave Rectified Sine FS: Rectified Sine Wave {ak} ak = = e − j ( 2π / T0 )( k −1)t j 2T0 ( − j ( 2π / T0 )( k −1)) 1 4π ( k −1) 1 4π ( k −1) T0 / 2 T0 / 2 ∫ 0 sin( 2π T0 e t) e − j ( 2π / T0 ) kt − 0 e − j ( 2π / T0 )( k +1)t j 2T0 ( − j ( 2π / T0 )( k +1)) T0 / 2 dt e − j ( 2π / T0 ) kt dt T0 / 2 1 j 2T0 T0 / 2 1 T0 ∫ 0 j ( 2π / T0 ) t −e 2j − j ( 2π / T0 ) t = = 10 (e (e − j ( 2π / T0 )( k −1)T0 / 2 − jπ ( k −1) − 1 − 4π (1 +1) e − jπ ( k +1) − 1 k ) − 1 − 4π (1 +1) e − j ( 2π / T0 )( k +1)T0 / 2 − 1 k ) ( ( 0 ) ) T0 / 2 1 j 2T0 ∫ 0 e − j ( 2π / T0 )( k −1) t dt − − ∫ 0 e − j ( 2π / T0 )( k +1) t dt T0 / 2 ( k +1− ( k −1) 4π ( k 2 −1) )( e − j ( 2π / T0 )( k −1) t j 2T0 ( − j ( 2π / T0 )( k −1)) T0 / 2 e − j ( 2π / T0 )( k +1) t j 2T0 ( − j ( 2π / T0 )( k +1)) Spring-2005 jMc ⎧ 0 ⎪ 1 − (−1) k − 1 = ⎨ ±?j 4 ⎪ −1 ⎩ π ( k 2 −1) ) k odd k = ±1 k even 11 9/13/2006 0 EE-2025 0 9/13/2006 EE-2025 Spring-2005 jMc SQUARE WAVE EXAMPLE Fourier Coefficients ak ak is a function of k Complex Amplitude for k-th Harmonic This one doesn’t depend on the period.02 jMc 0.04 t 12 ⎧ 1 ⎪ jπ k k 1 − ( −1) ⎪ ak = =⎨ 0 j 2π k ⎪ ⎪ 1 2 ⎩ 9/13/2006 EE-2025 Spring-2005 jMc k = ±1.

04) = 2π (25) ⎧− j ⎪πk ⎪ ak = ⎨ 0 ⎪ ⎪ 1 2 ⎩ k = ±1.K k = ±2.±3.K k =0 Fourier Series Synthesis HOW do you APPROXIMATE x(t) ? T0 1 T0 ak = x (t )e − j ( 2π / T0 ) k t dt ∫ 0 Use FINITE number of coefficients x (t ) = 9/13/2006 EE-2025 Spring-2005 jMc k =− N 16 9/13/2006 ak e j 2π k f0 t ∑ EE-2025 Spring-2005 N * a − k = ak when x (t ) is real 17 jMc Fourier Series Synthesis Synthesis: 1st & 3rd Harmonics y (t ) = 1 2 2 + cos(2π ( 25)t − π ) + cos(2π (75)t − π ) 2 2 2 π 3π 9/13/2006 EE-2025 Spring-2005 jMc 18 9/13/2006 EE-2025 Spring-2005 jMc 19 .±4.Spectrum from Fourier Series ω0 = 2π /(0.

edu/mcclella/2025/Fsdemo_Slabaugh/fourier.html MATLAB GUI: fseriesdemo http://users.gatech.Synthesis: up to 7th Harmonic 2 2 1 2 2 y (t ) = + cos(50π t − π ) + sin(150π t ) + sin( 250π t ) + sin(350π t ) 2 5π 7π 2 π 3π Fourier Synthesis x N (t ) = 1 2 2 + sin(ω0t ) + sin(3ω0t ) + K 2 π 3π 9/13/2006 EE-2025 Spring-2005 jMc 20 9/13/2006 EE-2025 Spring-2005 jMc 21 Gibbs’ Phenomenon Convergence at DISCONTINUITY of x(t) There is always an overshoot 9% for the Square Wave case Fourier Series Demos Fourier Series Java Applet Greg Slabaugh Interactive http://users.edu/mcclella/matlabGUIs/index.ece.gatech.html 9/13/2006 EE-2025 Spring-2005 jMc 22 9/13/2006 EE-2025 Spring-2005 jMc 23 .ece.

fseriesdemo GUI 9/13/2006 EE-2025 Spring-2005 jMc 24 .

image deblurring Extract Information from x(t) 4 9/14/2003 © 2003. JH McClellan & RW Schafer 1 9/14/2003 © 2003. Sections 4-1 and 4-2 Replaces Ch 4 in DSP First. 4-4 and 4-5 9/14/2003 © 2003. 4 Sects. 83-94 Lecture 8 Sampling & Aliasing Other Reading: Recitation: Strobe Demo (Sect 4-3) Next Lecture: Chap. more BASS 2πf ˆ + 2π ω = ωTs = fs 9/14/2003 © 2003. e. JH McClellan & RW Schafer ALIASING 5 . JH McClellan & RW Schafer 3 LECTURE OBJECTIVES SAMPLING can cause ALIASING Sampling Theorem Sampling Rate > 2(Highest Frequency) SYSTEMS Process Signals x(t) SYSTEM y(t) Spectrum for digital signals. x[n] Normalized Frequency PROCESSING GOALS: Change x(t) into y(t) For example.g.Signal Processing First READING ASSIGNMENTS This Lecture: Chap 4. pp. JH McClellan & RW Schafer Improve x(t)..

JH McClellan & RW Schafer © 2003. JH McClellan & RW Schafer 6 9/14/2003 © 2003. fs SAMPLING RATE (fs) fs =1/Ts NUMBER of SAMPLES PER SECOND • UNITS ARE HERTZ: 8000 Hz f = 100Hz f s = 2 kHz Ts = 125 microsec fs = 8000 samples/sec UNIFORM SAMPLING at t = nTs = n/fs IDEAL: x[n] = x(nTs)=x(n/fs) x(t) 9/14/2003 f s = 500Hz C-to-D x[n]=x(nTs) 8 9/14/2003 © 2003. x[n] is a sequence of values Think of “n” as the storage address in memory DIGITAL/MICROPROCESSOR Convert x(t) to numbers stored in memory x(t) A-to-D x[n] COMPUTER y[n] D-to-A y(t) UNIFORM SAMPLING at t = nTs IDEAL: x[n] = x(nTs) x(t) x[n] C-to-D 9/14/2003 © 2003. JH McClellan & RW Schafer 7 SAMPLING RATE. op-amps x(t) ELECTRONICS y(t) SAMPLING x(t) SAMPLING PROCESS Convert x(t) to numbers x[n] “n” is an integer. capacitors.System IMPLEMENTATION ANALOG/ELECTRONIC: Circuits: resistors. JH McClellan & RW Schafer 9 .

584 Mbytes 9/14/2003 © 2003. draw a sinusoid through the values x[n ] = cos(0. JH McClellan & RW Schafer Number of bytes for 1 minute is 2 X (16/8) X 60 X 44100 = 10.4π n ) 11 10 9/14/2003 © 2003.SAMPLING THEOREM HOW OFTEN ? DEPENDS on FREQUENCY of SINUSOID ANSWERED by SHANNON/NYQUIST Theorem ALSO DEPENDS on “RECONSTRUCTION” Reconstruction? Which One? Given the samples.4π n ) 9/14/2003 © 2003. JH McClellan & RW Schafer When n is an integer cos(0. JH McClellan & RW Schafer 13 .4π n ) = cos(2. JH McClellan & RW Schafer STORING DIGITAL SOUND x[n] is a SAMPLED SINUSOID A list of numbers stored in memory DISCRETE-TIME SINUSOID Change x(t) into x[n] DERIVATION EXAMPLE: audio CD CD rate is 44.100 samples per second 16-bit samples Stereo uses 2 channels x (t ) = A cos(ω t + ϕ ) x[n ] = x ( nTs ) = A cos(ω nTs + ϕ ) x[n ] = A cos((ωTs )n + ϕ ) ˆ x[n ] = A cos(ω n + ϕ ) ˆ ω = ω Ts = ω DEFINE DIGITAL FREQUENCY f s 12 9/14/2003 © 2003.

not rad/sec DIGITAL FREQUENCY is NORMALIZED ˆ ω X* 1 2 X –0.1) ˆ ω x[n ] = A cos(2π (100)( n / 1000) + ϕ ) ˆ ω = ωTs = 9/14/2003 2πf fs 14 9/14/2003 © 2003. JH McClellan & RW Schafer 15 SPECTRUM (DIGITAL) ??? ˆ ω = 2π f s = 100 Hz The REST of the STORY Spectrum of x[n] has more than one line for each complex exponential f fs 1 2 X* ? 1 2 X –2π π 2π(1) π(1) x[n ] = A cos(2π (100)( n / 100) + ϕ ) ˆ ω Called ALIASING MANY SPECTRAL LINES SPECTRUM is PERIODIC with period = 2π π Because x[n] is zero frequency??? 9/14/2003 © 2003. JH McClellan & RW Schafer © 2003. as f varies from π 0 to the sampling frequency UNITS are radians. JH McClellan & RW Schafer 17 .2π π 2π(0.1) π(0. JH McClellan & RW Schafer ˆ ˆ A cos(ω n + ϕ ) = A cos((ω + 2π )n + ϕ ) 16 9/14/2003 © 2003.DIGITAL FREQUENCY ˆ ω SPECTRUM (DIGITAL) f ˆ ω = 2π fs f s = 1 kHz 1 2 VARIES from 0 to 2π.

4π n ) ⇒ x2 [n ] = x1[n ] 9/14/2003 ˆ then : ω = 2π ( f + f s ) 2π f 2π f s = + fs fs fs 2400π − 400π = 2π (1000) © 2003. x[n] = x(n/ fs ) are EXACTLY THE SAME VALUES NORMALIZED FREQUENCY DIGITAL FREQUENCY ˆ ω = ωTs = GIVEN x[n]. WE CAN’T DISTINGUISH fo FROM (fo + fs ) or (fo + 2fs ) 9/14/2003 © 2003. JH McClellan & RW Schafer 2π f + 2π fs 19 ALIASING CONCLUSIONS ADDING fs or 2fs or –fs to the FREQ of x(t) gives exactly the same x[n] The samples.4π n ) = cos(0.4π n ) ˆ and we want : x[n] = Acos(ω n + ϕ ) x2 [n ] = cos(2.4π n + 2π n ) = cos(0. JH McClellan & RW Schafer 2πf + 2π fs 20 9/14/2003 © 2003. JH McClellan & RW Schafer ˆ ω = ωTs = 18 9/14/2003 © 2003.4π n ) ALIASING DERIVATION–2 x1 (t ) = cos(400π t ) sampled at f s = 1000 Hz ˆ ω Other Frequencies give the same If x (t) = A cos( 2 π ( f + f s )t + ϕ ) ˆ ω t← n fs x2 (t ) = cos(2400π t ) sampled at f s = 1000 Hz n x2 [n ] = cos(2400π 1000 ) = cos(2.ALIASING DERIVATION Other Frequencies give the same n x1[n ] = cos(400π 1000 ) = cos(0. JH McClellan & RW Schafer 21 .

1) π(0.5π π 0. JH McClellan & RW Schafer 25 . JH McClellan & RW Schafer 24 9/14/2003 © 2003.5π π –1.8π π –0.5π π ˆ ω x[n ] = A cos(2π (100)( n / 80) + ϕ ) 9/14/2003 © 2003.1) 1.5π π 2.SPECTRUM for x[n] PLOT versus NORMALIZED FREQUENCY INCLUDE ALL SPECTRUM LINES ALIASES ADD MULTIPLES of 2π π SUBTRACT MULTIPLES of 2π π SPECTRUM (MORE LINES) f ˆ ω = 2π fs f s = 1 kHz 1 2 X 1 2 X* 1 2 X 1 2 X* –1. JH McClellan & RW Schafer 23 SPECTRUM (ALIASING CASE) ˆ ω = 2π f fs 1 2 SAMPLING GUI (con2dis) X* 1 2 X 1 2 X* 1 2 X 1 2 X* 1 2 X f s = 80 kHz –2.5π π –0.2π π 2π(0.8π π ˆ ω x[n ] = A cos(2π (100)( n / 1000) + ϕ ) FOLDED ALIASES (to be discussed later) ALIASES of NEGATIVE FREQS 9/14/2003 © 2003. JH McClellan & RW Schafer 22 9/14/2003 © 2003.5π π 1.

6π π –0. JH McClellan & RW Schafer 26 .4π π 1.4π π 0.6π π ˆ ω x[n ] = A cos(2π (100)( n / 125) + ϕ ) 9/14/2003 © 2003.SPECTRUM (FOLDING CASE) f ˆ ω = 2π fs f s = 125Hz 1 2 X* 1 2 X 1 2 X* 1 2 X –1.

JH McClellan & RW Schafer 8/22/2003 © 2003. 4-5 Lecture 9 D-to-A Conversion Other Reading: Recitation: Section 4-3 (Strobe Demo) Next Lecture: Chapter 5 (beginning) 8/22/2003 © 2003. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES FOLDING: a type of ALIASING DIGITAL-to-ANALOG CONVERSION is Reconstruction from samples SAMPLING THEOREM applies SIGNAL TYPES x(t) A-to-D x[n] COMPUTER y[n] D-to-A y(t) A-to-D Convert x(t) to numbers stored in memory Smooth Interpolation Mathematical Model of D-to-A SUM of SHIFTED PULSES Linear Interpolation example D-to-A Convert y[n] back to a “continuous-time” signal.Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 4: Sections 4-4. y(t) y[n] is called a “discrete-time” signal 4 8/22/2003 © 2003. JH McClellan & RW Schafer 5 . JH McClellan & RW Schafer 1 8/22/2003 © 2003.

…} & {-2.2πn+φ) 2π and -2π π π FOLDED ALIASES ALIASES of NEGATIVE FREQS PLOT versus NORMALIZED FREQUENCY i. DIVIDE fo by fs 8/22/2003 ˆ ω = 2π f + 2π fs 8 ALIASES of NEGATIVE FREQ: {1.2π. 6.2πn+φ) FREQS @ 0.8π..2π and -0.SAMPLING x(t) UNIFORM SAMPLING at t = nTs IDEAL: x[n] = x(nTs) x(t) C-to-D x[n] NYQUIST RATE “Nyquist Rate” Sampling fs > TWICE the HIGHEST Frequency in x(t) “Sampling above the Nyquist rate” BANDLIMITED SIGNALS DEF: x(t) has a HIGHEST FREQUENCY COMPONENT in its SPECTRUM NON-BANDLIMITED EXAMPLE TRIANGLE WAVE is NOT BANDLIMITED 8/22/2003 © 2003. JH McClellan & RW Schafer 6 8/22/2003 © 2003. JH McClellan & RW Schafer 9 .2π ALIASES: {2.2π.8π.8π.2π.e.2π …} © 2003.…} EX: x[n] = Acos(4. 4.5.3. -4.2π. …} & {-1.8π. JH McClellan & RW Schafer 7 SPECTRUM for x[n] INCLUDE ALL SPECTRUM LINES ALIASES ADD INTEGER MULTIPLES of EXAMPLE: SPECTRUM x[n] = Acos(0.8π.-3. JH McClellan & RW Schafer 8/22/2003 © 2003.

same x[n] 100 ˆ ω = 2π = 2π (0. JH McClellan & RW Schafer ˆ ω = ωTs = − 8/22/2003 FOLDED ALIAS 12 © 2003.5π π 0.1)n ] cos(2π (900)t ) → cos[2π (0.5π π 2.5π π 1.SPECTRUM (MORE LINES) f ˆ ω = 2π fs f s = 1 kHz 1 2 SPECTRUM (ALIASING CASE) X* f ˆ ω = 2π fs f s = 80 kHz 1 2 X 1 2 X* 1 2 X 1 2 X* 1 2 X 1 2 X* 1 2 X 1 2 X* 1 2 X –1. JH McClellan & RW Schafer 10 8/22/2003 © 2003.5π π –1.1) 1.1) π(0.1)n ] = cos[2π (0.8π π ˆ ω –2.1) f s = 1000 1000 cos(2π (100)t ) → cos[2π (0.1)n ] cos(2π (1100)t ) → cos[2π (1.9)n ] = cos[2π (0.2π π 2π(0.5π π –0.9)n − 2π n ] = cos[2π ( −0.8π π –0.5π π ˆ ω x[n ] = A cos(2π (100)( n / 1000) + ϕ ) x[n ] = A cos(2π (100)( n / 80) + ϕ ) 8/22/2003 © 2003. JH McClellan & RW Schafer 13 .1)n ] = cos[2π (0.1)n ] DIGITAL FREQ ˆ ω AGAIN ˆ ω = ωTs = 2π f + 2π fs 2π f + 2π fs ALIASING 900 Hz “folds” to 100 Hz when fs=1kHz 8/22/2003 © 2003. JH McClellan & RW Schafer 11 FOLDING (a type of ALIASING) EXAMPLE: 3 different x(t).

JH McClellan & RW Schafer 15 DEMOS from CHAPTER 4 CD-ROM DEMOS SAMPLING DEMO (con2dis GUI) Different Sampling Rates Aliasing of a Sinusoid SAMPLING GUI (con2dis) STROBE DEMO Synthetic vs. JH McClellan & RW Schafer ˆ ω fs 2π f 14 8/22/2003 © 2003. JH McClellan & RW Schafer 17 .4π π 1. Real Television SAMPLES at 30 fps Sampling & Reconstruction 8/22/2003 © 2003. JH McClellan & RW Schafer 16 8/22/2003 © 2003.6π π ˆ ω x[n ] = A cos(2π (100)( n / 125) + ϕ ) ω f f ω ˆ ˆ ω = 2π fs ˆ f f = + 2π 8/22/2003 © 2003.6π π –0.4π π 0.SPECTRUM (FOLDING CASE) f ˆ ω = 2π fs f s = 125Hz 1 2 FREQUENCY DOMAINS x(t) A-to-D X* 1 2 X 1 2 X* 1 2 X x[n] y[n] D-to-A y(t) –1.

5π π 2.5π π –0.5π π ˆ ω x[n ] = A cos(2π (100)( n / 80) + ϕ ) conveys the idea 8/22/2003 © 2003. JH McClellan & RW Schafer 21 8/22/2003 © 2003. which y(t) do we pick ? ? ? INFINITE NUMBER of y(t) PASSING THRU THE SAMPLES. y[k] y(t) kTs (k+1)Ts t 22 X* 1 2 X 1 2 X* 1 2 X 1 2 X* 1 2 X π f s = 80Hz –2.5π π 0. JH McClellan & RW Schafer 20 SPECTRUM (ALIASING CASE) ˆ ω = 2π f fs 1 2 Reconstruction (D-to-A) CONVERT STREAM of NUMBERS to x(t) “CONNECT THE DOTS” INTERPOLATION INTUITIVE.5π –1. if y[n] = sinusoid 19 8/22/2003 © 2003.5π π 1.D-to-A Reconstruction x(t) A-to-D D-to-A is AMBIGUOUS ! y(t) x[n] COMPUTER y[n] D-to-A ALIASING Given y[n]. y[n] Create continuous y(t) from y[n] IDEAL If you have formula for y[n] Replace n in y[n] with fst y[n] = Acos(0. JH McClellan & RW Schafer . JH McClellan & RW Schafer D-to-A RECONSTRUCTION MUST CHOOSE ONE OUTPUT RECONSTRUCT THE SMOOTHEST ONE THE LOWEST FREQ.2πn+φ) with fs = 8000 Hz y(t) = Acos(2π(800)t+φ) 8/22/2003 © 2003.

JH McClellan & RW Schafer 25 8/22/2003 © 2003. JH McClellan & RW Schafer 24 OVER-SAMPLING CASE MATH MODEL for D-to-A EASIER TO RECONSTRUCT SQUARE PULSE: 8/22/2003 © 2003. JH McClellan & RW Schafer © 2003.5Ts y[k] y(t) kTs 8/22/2003 SQUARE PULSE CASE STAIR-STEP APPROXIMATION (k+1)Ts t 23 8/22/2003 © 2003.SAMPLE & HOLD DEVICE CONVERT y[n] to y(t) y[k] should be the value of y(t) at t = kTs Make y(t) equal to y[k] for kTs -0. JH McClellan & RW Schafer 26 .5Ts < t < kTs +0.

… 8/22/2003 © 2003.EXPAND the SUMMATION n= −∞ ∑ y[n]p(t − nT ) = s ∞ …+ y[0]p(t) + y[1]p(t − Ts ) + y[2]p(t − 2Ts ) + … SUM of SHIFTED PULSES p(t-nTs) “WEIGHTED” by y[n] CENTERED at t=nTs SPACED by Ts RESTORES “REAL TIME” 8/22/2003 © 2003. JH McClellan & RW Schafer p(t) 27 8/22/2003 © 2003. ± 2Ts . JH McClellan & RW Schafer 30 . JH McClellan & RW Schafer 29 8/22/2003 © 2003. JH McClellan & RW Schafer 28 TRIANGULAR PULSE (2X) OPTIMAL PULSE ? CALLED “BANDLIMITED INTERPOLATION” p (t ) = sin π st T πt Ts for − ∞ < t < ∞ p(t ) = 0 for t = ±Ts .

5-2 and 5-3 (partial) Lecture 10 FIR Filtering Intro Other Reading: Recitation: Ch. Sects 5-4. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES INTRODUCE FILTERING IDEA Weighted Average Running Average DIGITAL FILTERING x(t) A-to-D x[n] COMPUTER y[n] D-to-A y(t) FINITE IMPULSE RESPONSE FILTERS CONCENTRATE on the COMPUTER PROCESSING ALGORITHMS SOFTWARE (MATLAB) HARDWARE: DSP chips. 5-7 and 5-8 CONVOLUTION Next Lecture: Ch 5. 5-1. Sects. x[n] DSP: DIGITAL SIGNAL PROCESSING 4 2/18/2005 © 2003. JH McClellan & RW Schafer . JH McClellan & RW Schafer 5 2/18/2005 © 2003.Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 5. 5-5 and 5-6 2/18/2005 © 2003. VLSI FIR Filters Show how to compute the output y[n] from the input signal. 5-6. Sects. 5. 5-3. JH McClellan & RW Schafer 1 2/18/2005 © 2003.

JH McClellan & RW Schafer 7 Digital Cell Phone (ca. 1983 Rockland Digital Filter. 1971 First PC plug-in board from Atlanta Signal Processors Inc. you could have one of these. 8 2/18/2005 © 2003. JH McClellan & RW Schafer 6 2/18/2005 © 2003. 2/18/2005 © 2003.The TMS32010. 2000) DISCRETE-TIME SYSTEM x[n] COMPUTER y[n] OPERATE on x[n] to get y[n] WANT a GENERAL CLASS of SYSTEMS ANALYZE the SYSTEM TOOLS: TIME-DOMAIN & FREQUENCYDOMAIN SYNTHESIZE the SYSTEM 2/18/2005 Now JH McClellan & RW Schafer it plays video © 2003. JH McClellan & RW Schafer 9 . For the price of a small house.

D-T SYSTEM EXAMPLES
x[n] SYSTEM y[n]

DISCRETE-TIME SIGNAL
x[n] is a LIST of NUMBERS
INDEXED by “n”

EXAMPLES:
POINTWISE OPERATORS
SQUARING: y[n] = (x[n])2 STEM PLOT

RUNNING AVERAGE
RULE: “the output at time n is the average of three consecutive input values”
2/18/2005 © 2003, JH McClellan & RW Schafer 10 2/18/2005 © 2003, JH McClellan & RW Schafer 11

3-PT AVERAGE SYSTEM
Do this for each “n”
Make a TABLE

INPUT SIGNAL

y[n ] = 1 ( x[n ] + x[n + 1] + x[n + 2]) 3

y[n ] = 1 ( x[n ] + x[n + 1] + x[n + 2]) 3
OUTPUT SIGNAL

n=0
2/18/2005 © 2003, JH McClellan & RW Schafer

n=1

12

2/18/2005

© 2003, JH McClellan & RW Schafer

13

PAST, PRESENT, FUTURE

ANOTHER 3-pt AVERAGER
Uses “PAST” VALUES of x[n]
IMPORTANT IF “n” represents REAL TIME
WHEN x[n] & y[n] ARE STREAMS

y[n ] = 1 ( x[n ] + x[n − 1] + x[n − 2]) 3
“n” is TIME

2/18/2005

© 2003, JH McClellan & RW Schafer

14

2/18/2005

© 2003, JH McClellan & RW Schafer

15

GENERAL CAUSAL FIR FILTER
FILTER COEFFICIENTS {bk}
DEFINE THE FILTER

GENERAL FIR FILTER
FILTER COEFFICIENTS {bk}

y[n ] = ∑ bk x[n − k ]
k =0

M

y[n ] = ∑ bk x[n − k ]
k =0

M

For example, bk = {3, − 1, 2,1}

y[n ] = ∑ bk x[n − k ] = 3x[n ] − x[n − 1] + 2 x[n − 2] + x[n − 3]
2/18/2005 © 2003, JH McClellan & RW Schafer 16

3

FILTER ORDER is M FILTER LENGTH is L = M+1
NUMBER of FILTER COEFFS is L
2/18/2005 © 2003, JH McClellan & RW Schafer 17

k =0

GENERAL CAUSAL FIR FILTER
SLIDE a WINDOW across x[n]
y[n ] = ∑ bk x[n − k ]
k =0 M

FILTERED STOCK SIGNAL

INPUT OUTPUT

x[n-M]
2/18/2005

x[n]
© 2003, JH McClellan & RW Schafer 18 2/18/2005 © 2003, JH McClellan & RW Schafer

50-pt Averager 19

SPECIAL INPUT SIGNALS
x[n] = SINUSOID FREQUENCY RESPONSE (LATER) x[n] has only one NON-ZERO VALUE

UNIT IMPULSE SIGNAL δ[n]

UNIT-IMPULSE

⎧1 n = 0 ⎪ δ [n ] = ⎨ ⎪0 n ≠ 0 ⎩
1 n

δ[n] is NON-ZERO When its argument is equal to ZERO

δ [n − 3]

n=3

2/18/2005

© 2003, JH McClellan & RW Schafer

20

2/18/2005

© 2003, JH McClellan & RW Schafer

21

0. 1 . JH McClellan & RW Schafer 22 2/18/2005 © 2003. 1 . 1 . 0. JH McClellan & RW Schafer 24 2/18/2005 n n=4 n=5 © 2003. 1 . 1 . K} 4 4 4 4 2/18/2005 © 2003. 0. 0. 0. JH McClellan & RW Schafer 25 . 0. JH McClellan & RW Schafer 23 4-pt AVERAGER CAUSAL SYSTEM: USE PAST VALUES y[n ] = 1 ( x[n ] + x[n − 1] + x[n − 2] + x[n − 3]) 4 4-pt Avg Impulse Response y[n ] = 1 ( x[n ] + x[n − 1] + x[n − 2] + x[n − 3]) 4 δ[n] “READS OUT” the FILTER COEFFICIENTS INPUT = UNIT IMPULSE SIGNAL = δ[n] x[n ] = δ [n ] y[n ] = 1 δ [n ] + 1 δ [n − 1] + 1 δ [n − 2] + 1 δ [n − 3] 4 4 4 4 OUTPUT is called “IMPULSE RESPONSE” h[n ] = {K . 1 . 0. 0. K} 4 4 4 4 “h” in h[n] denotes Impulse Response n=0 n=–1 n=0 n=1 1 NON-ZERO When window overlaps δ[n] h[n ] = {K .MATH FORMULA for x[n] Use SHIFTED IMPULSES to write x[n] x[n ] = 2δ [n ] + 4δ [n − 1] + 6δ [n − 2] + 4δ [n − 3] + 2δ [n − 4] SUM of SHIFTED IMPULSES This formula ALWAYS works 2/18/2005 © 2003. 1 . 1 .

JH McClellan & RW Schafer 28 2/18/2005 © 2003. JH McClellan & RW Schafer 2/18/2005 © 2003. JH McClellan & RW Schafer 3-pt AVG EXAMPLE Input : x[n ] = (1.02)n + cos(2π n / 8 + π / 4) for 0 ≤ n ≤ 40 7-pt FIR EXAMPLE (AVG) Input : x[n ] = (1.02)n + cos(2π n / 8 + π / 4) for 0 ≤ n ≤ 40 USE PAST VALUES CAUSAL: Use Previous 2/18/2005 © 2003.FIR IMPULSE RESPONSE Convolution = Filter Definition Filter Coeffs = Impulse Response FILTERING EXAMPLE 7-point AVERAGER Removes cosine k =0 By making its amplitude (A) smaller 2 y7 [n ] = ∑ (1 )x[n − k ] 7 6 y[n ] = ∑ bk x[n − k ] k =0 2/18/2005 M y[n ] = ∑ h[k ] x[n − k ] k =0 CONVOLUTION 26 M 3-point AVERAGER Changes A slightly y3[n ] = ∑ (1 )x[n − k ] 3 k =0 27 © 2003. JH McClellan & RW Schafer LONGER OUTPUT 29 .

5-7 & 5-8 CONVOLUTION Next Lecture: start Chapter 6 8/22/2003 © 2003. 5. Sections 5-5 and 5-6 Section 5-4 will be covered.Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 5. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES GENERAL PROPERTIES of FILTERS LINEARITY LTI SYSTEMS TIME-INVARIANCE ==> CONVOLUTION BLOCK DIAGRAM REPRESENTATION Components for Hardware Connect Simple Filters Together to Build More Complicated Systems 8/22/2003 © 2003. JH McClellan & RW Schafer OVERVIEW IMPULSE RESPONSE. JH McClellan & RW Schafer 1 8/22/2003 © 2003. h[n ] FIR case: same as {bk } CONVOLUTION GENERAL: y[n ] = h[n ] ∗ x[n ] GENERAL CLASS of SYSTEMS LINEAR and TIME-INVARIANT ALL LTI systems have h[n] & use convolution 4 8/22/2003 © 2003. Sects 5-6. but not “in depth” Lecture 11 Linearity & Time-Invariance Convolution Other Reading: Recitation: Ch. JH McClellan & RW Schafer 5 .

the “time index” INPUT x[n] OUTPUT y[n] 8/22/2003 © 2003. bk = {3. JH McClellan & RW Schafer 3 k =0 y[n ] = ∑ bk x[n − k ] k =0 8 8/22/2003 © 2003.xx) VECTOR bb contains Filter Coefficients DSP-First: yy = firfilt(bb.xx) FILTER COEFFICIENTS {bk} conv2() for images y[n ] = ∑ bk x[n − k ] k =0 M For example. JH McClellan & RW Schafer M 9 . 2. JH McClellan & RW Schafer FILTER BUILD UP COMPLICATED FILTERS FROM SIMPLE MODULES Ex: FILTER MODULE MIGHT BE 3-pt FIR 6 8/22/2003 © 2003.DIGITAL FILTERING x(t) A-to-D x[n] FILTER y[n] D-to-A y(t) BUILDING BLOCKS x[n] OUTPUT FILTER INPUT FILTER + + y[n] CONCENTRATE on the FILTER (DSP) DISCRETE-TIME SIGNALS FUNCTIONS of n. JH McClellan & RW Schafer 7 GENERAL FIR FILTER FILTER COEFFICIENTS {bk} DEFINE THE FILTER MATLAB for FIR FILTER yy = conv(bb.1} y[n ] = ∑ bk x[n − k ] = 3x[n ] − x[n − 1] + 2 x[n − 2] + x[n − 3] 8/22/2003 © 2003. − 1.

1 } 8/22/2003 –1 © 2003. 2. JH McClellan & RW Schafer M bk = { 1. − 1. − 1. JH McClellan & RW Schafer 11 MATH FORMULA for h[n] Use SHIFTED IMPULSES to write h[n] h[n ] = δ [n ] − δ [n − 1] + 2δ [n − 2] − δ [n − 3] + δ [n − 4] h[n ] 1 0 4 LTI: Convolution Sum Output = Convolution of x[n] & h[n] NOTATION: y[n ] = h[n ] ∗ x[n ] Here is the FIR case: FINITE LIMITS 2 n y[n ] = ∑ h[k ]x[n − k ] k =0 Same as bk 12 8/22/2003 © 2003.SPECIAL INPUT SIGNALS x[n] = SINUSOID FREQUENCY RESPONSE x[n] has only one NON-ZERO VALUE FIR IMPULSE RESPONSE Convolution = Filter Definition Filter Coeffs = Impulse Response 1 n = 0  δ [n ] =  0 n ≠ 0  UNIT-IMPULSE 1 n h[n ] = ∑ bkδ [n − k ] y kx k =0 k =0 10 8/22/2003 © 2003. JH McClellan & RW Schafer M M 8/22/2003 © 2003. JH McClellan & RW Schafer FINITE LIMITS 13 .

.. 14 8/22/2003 x[n-M] x[n] © 2003. JH McClellan & RW Schafer 15 DCONVDEMO: MATLAB GUI POP QUIZ FIR Filter is “FIRST DIFFERENCE” y[n] = x[n] . JH McClellan & RW Schafer y[n] © 2003... JH McClellan & RW Schafer 16 8/22/2003 17 .CONVOLUTION Example h[n ] = δ [n ] − δ [n − 1] + 2δ [n − 2] − δ [n − 3] + δ [n − 4] x[n ] = u[n ] n −1 0 x[n] h[n] 0 0 0 1 2 3 4 1 1 1 5 1 0 1 6 1 0 1 7 .x[n-1] INPUT is “UNIT STEP” 1 n ≥ 0  u[n ] =  0 n < 0  Find y[n] 8/22/2003 © 2003. 0 1 1 1 1 −1 1 1 0 0 0 0 1 1 2 −1 1 1 GENERAL FIR FILTER SLIDE a Length-L WINDOW over x[n] h[0] x[n ] h[1] x[n − 1] h[2]x[n − 2] h[3]x[n − 3] h[4]x[n − 4] 8/22/2003 0 0 0 0 0 0 0 0 0 1 −1 −1 −1 −1 −1 −1 −1 2 2 2 2 2 2 0 −1 −1 −1 −1 −1 0 2 0 1 1 2 1 2 1 2 1 . JH McClellan & RW Schafer y[n ] = u[n ] − u[n − 1] = δ [n ] © 2003.

Multiply & Store FILTER y[n] y[n ] = ∑ bk x[n − k ] k =0 M y[n ] = ∑ bk x[n − k ] k =0 M INTERNAL STRUCTURE of “FILTER” WHAT COMPONENTS ARE NEEDED? HOW DO WE “HOOK” THEM TOGETHER? y[n ] = β x[n ] y[n ] = x1[n ] + x2 [n ] SIGNAL FLOW GRAPH NOTATION 8/22/2003 © 2003. JH McClellan & RW Schafer 20 8/22/2003 © 2003. JH McClellan & RW Schafer 18 8/22/2003 © 2003. JH McClellan & RW Schafer 21 . JH McClellan & RW Schafer y[n ] = x[n − 1] 19 FIR STRUCTURE Direct Form SIGNAL FLOW GRAPH Moore’s Law for TI DSPs M LOG SCALE y[n ] = ∑ bk x[n − k ] k =0 Double every 18 months ? 8/22/2003 © 2003.HARDWARE STRUCTURES x[n] HARDWARE ATOMS Add.

SYSTEM PROPERTIES x[n] SYSTEM y[n] TIME-INVARIANCE IDEA: “Time-Shifting the input will cause the same time-shift in the output” MATHEMATICAL DESCRIPTION TIME-INVARIANCE LINEARITY CAUSALITY “No output prior to input” 8/22/2003 © 2003. We can prove that The time origin (n=0) is picked arbitrary 22 8/22/2003 © 2003. JH McClellan & RW Schafer 25 . JH McClellan & RW Schafer 24 8/22/2003 © 2003. JH McClellan & RW Schafer EQUIVALENTLY. JH McClellan & RW Schafer 23 TESTING Time-Invariance LINEAR SYSTEM LINEARITY = Two Properties SCALING “Doubling x[n] will double y[n]” SUPERPOSITION: “Adding two inputs gives an output that is the sum of the individual outputs” 8/22/2003 © 2003.

x[n -1] CASCADE SYSTEMS Does the order of S1 & S2 matter? NO. JH McClellan & RW Schafer S2 29 8/22/2003 © 2003. JH McClellan & RW Schafer 27 POP QUIZ FIR Filter is “FIRST DIFFERENCE” y[n] = x[n] . JH McClellan & RW Schafer . LTI SYSTEMS can be rearranged !!! WHAT ARE THE FILTER COEFFS? {bk} Write output as a convolution Need impulse response h[n ] = δ [n ] − δ [n − 1] Then.TESTING LINEARITY LTI SYSTEMS LTI: Linear & Time-Invariant COMPLETELY CHARACTERIZED by: IMPULSE RESPONSE h[n] CONVOLUTION: y[n] = x[n]*h[n] The “rule”defining the system can ALWAYS be rewritten as convolution FIR Example: h[n] is same as bk 8/22/2003 © 2003. another way to compute the output: y[n ] = (δ [n ] − δ [n − 1]) ∗ x[n ] S1 28 8/22/2003 © 2003. JH McClellan & RW Schafer 26 8/22/2003 © 2003.

CASCADE EQUIVALENT Find “overall” h[n] for a cascade ? S1 S2 S2 8/22/2003 © 2003. JH McClellan & RW Schafer S1 30 .

6-6. Freq PHASE vs. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES SINUSOIDAL INPUT SIGNAL DETERMINE the FIR FILTER OUTPUT DOMAINS: Time & Frequency Time-Domain: “n” = time x[n] x(t) discrete-time signal continuous-time signal FREQUENCY RESPONSE of FIR PLOTTING vs. omega-hat ) ˆ H ( e ) = H ( e jω ) e j∠H ( e 4 Move back and forth QUICKLY 2/25/2005 © 2003. f (Hz) • ANALOG vs. JH McClellan & RW Schafer . Sects. Freq ˆ jω 2/25/2005 Frequency Domain (sum of sinusoids) MAG PHASE ˆ jω Spectrum vs. & 6-5 Lecture 12 Frequency Response of FIR Filters Other Reading: Recitation: Chapter 6 FREQUENCY RESPONSE EXAMPLES Next Lecture: Chap. Sections 6-1. JH McClellan & RW Schafer 5 © 2003. DIGITAL Spectrum vs. 6. 6-3. 6-4. 6-7 & 6-8 2/25/2005 © 2003. 6-2.Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 6. JH McClellan & RW Schafer 1 2/25/2005 © 2003. Frequency MAGNITUDE vs.

DIGITAL “FILTERING” x(t) A-to-D x[n] FILTER y[n] D-to-A y(t) FILTERING EXAMPLE 7-point AVERAGER Removes cosine ˆ ω ˆ ω k =0 By making its amplitude (A) smaller 2 y7 [n ] = ∑ (1 )x[n − k ] 7 6 CONCENTRATE on the SPECTRUM SINUSOIDAL INPUT INPUT x[n] = SUM of SINUSOIDS Then. JH McClellan & RW Schafer 3-pt AVG EXAMPLE Input : x[n ] = (1. JH McClellan & RW Schafer 10 2/25/2005 © 2003. OUTPUT y[n] = SUM of SINUSOIDS 2/25/2005 © 2003. JH McClellan & RW Schafer LONGER OUTPUT 11 .02)n + cos(2π n / 8 + π / 4) for 0 ≤ n ≤ 40 7-pt FIR EXAMPLE (AVG) Input : x[n ] = (1. JH McClellan & RW Schafer 8 2/25/2005 3-point AVERAGER Changes A slightly y3[n ] = ∑ (1 )x[n − k ] 3 k =0 9 © 2003.02)n + cos(2π n / 8 + π / 4) for 0 ≤ n ≤ 40 USE PAST VALUES CAUSAL: Use Previous 2/25/2005 © 2003.

JH McClellan & RW Schafer 15 . JH McClellan & RW Schafer 12 2/25/2005 © 2003. JH McClellan & RW Schafer 14 2/25/2005 © 2003. JH McClellan & RW Schafer 13 COMPLEX EXPONENTIAL ˆ x[n ] = Ae jϕ e jω n COMPLEX EXP OUTPUT Use the FIR “Difference Equation” ˆ y[n ] = ∑ bk x[n − k ] = ∑ bk Ae jϕ e jω ( n −k ) k =0 k =0 M M −∞<n<∞ M x[n] is the input signal—a complex exponential y[n ] = ∑ bk x[n − k ] = ∑ h[k ] x[n − k ] k =0 k =0 FIR DIFFERENCE EQUATION M ⎛M ⎞ ˆ ˆ = ⎜ ∑ bk e jω ( − k ) ⎟ Ae jϕ e jω n ⎜ ⎟ ⎝ k =0 ⎠ ˆ ˆ = H (ω ) Ae jϕ e jω n 2/25/2005 © 2003.SINUSOIDAL RESPONSE INPUT: x[n] = SINUSOID OUTPUT: y[n] will also be a SINUSOID Different Amplitude and Phase DCONVDEMO: MATLAB GUI SAME Frequency AMPLITUDE & PHASE CHANGE Called the FREQUENCY RESPONSE 2/25/2005 © 2003.

1 } ˆ ˆ ˆ H ( e jω ) = 1 + 2e − jω + e − j 2ω ˆ ˆ ˆ = e − jω ( e jω + 2 + e − jω ) ˆ ˆ = e − jω ( 2 + 2 cos ω ) H ( e (ω))= ∑ bkke H ˆ = ∑b e ˆ jω kk =0 =0 ˆ − jωˆkk − jω FREQUENCY RESPONSE EXPLOIT SYMMETRY Complex-valued formula Has MAGNITUDE vs. JH McClellan & RW Schafer 16 2/25/2005 ˆ Since ( 2 + 2 cos ω ) ≥ 0 ˆ ˆ Magnitude is H ( e jω ) = ( 2 + 2 cos ω ) ˆ ˆ and Phase is ∠ H ( e jω ) = −ω © 2003.2.2 ˆ Find y[n ] when H ( e jω ) is known ˆ ˆ ˆ H ( e jω ) = ( 2 + 2 cos ω )e − jω ˆ ω RESPONSE at π/3 and x[n ] = 2e jπ / 4e j (π / 3) n x[n] ˆ H ( e jω ) y[n] ˆ ˆ ˆ H ( e jω ) = ( 2 + 2 cos ω )e − jω −π 2/25/2005 © 2003. frequency ˆ Notation: H ( e jω ) in place of H (ω ) ˆ 2/25/2005 © 2003. JH McClellan & RW Schafer ˆ ω (radians) 18 π 2/25/2005 © 2003. JH McClellan & RW Schafer 19 . 2. we can DEFINE M M EXAMPLE 6.1} EXAMPLE 6. frequency And PHASE vs.FREQUENCY RESPONSE At each frequency.1 {bk } = { 1. JH McClellan & RW Schafer 17 {bk } PLOT of FREQ RESPONSE = {1.

JH McClellan & RW Schafer 21 EX: COSINE INPUT EX: COSINE INPUT (ans-2) Find y[n ] when x[n ] = 2 cos( π n + π ) 3 4 n+ 4 =e ⇒ x[n ] = x1[n ] + x2 [n ] 3 Use Linearity Find y[n ] when x[n ] = 2 cos( π n + π ) 3 4 ˆ ˆ ˆ H ( e jω ) = ( 2 + 2 cos ω )e − jω 2 cos( π π) j (π n / 3+π / 4 ) +e − j (π n / 3+π / 4 ) y1[n ] = H ( e jπ / 3 )e j (π n / 3+π / 4 ) = 3e − j (π / 3) e j (π n / 3+π / 4 ) j (π n / 3+π / 4 ) 2/25/2005 y2 [n ] = H ( e − jπ / 3 )e − j (π n / 3+π / 4 ) ⇒ y[n ] = y1[n ] + y2 [n ] © 2003.2 (answer) EXAMPLE: COSINE INPUT ˆ Find y[n ] when H ( e jω ) is known and x[n ] = 2 cos( π n + π ) 3 4 x[n] Find y[n ] when x[n ] = 2e jπ / 4e j (π / 3) n ˆ ˆ One Step .evaluate H ( e jω ) at ω = π / 3 ˆ ˆ ˆ H ( e jω ) = ( 2 + 2 cos ω )e − jω H ( e ) = 3e ˆ jω − jπ / 3 y[n ] = 3e − jπ / 3 × 2e jπ / 4e j (π / 3) n = 6 e − jπ /12e j (π / 3) n 2/25/2005 © 2003. JH McClellan & RW Schafer y1[n ] = H ( e jπ / 3 )e y2 [n ] = H ( e − jπ / 3 )e − j (π n / 3+π / 4 ) = 3e j (π / 3) e − j (π n / 3+π / 4 ) 22 y[n ] = 3e j (π n / 3−π /12 ) + 3e − j (π n / 3−π /12 ) π ⇒ y[n ] = 6 cos( π n − 12 ) 3 2/25/2005 © 2003.EXAMPLE 6. JH McClellan & RW Schafer 20 2/25/2005 ( ) ˆ @ω = π / 3 H (e ) ˆ ω ˆ jω y[n] ˆ ω ˆ ˆ ˆ H ( e jω ) = ( 2 + 2 cos ω )e − jω © 2003. JH McClellan & RW Schafer 23 .

MATLAB: FREQUENCY RESPONSE Time & Frequency Relation Get Frequency Response from h[n] Here is the FIR case: HH = freqz(bb. 1 } e ˆ ω ˆ − jω y[n] ˆ ω 27 2/25/2005 ˆ ω 28 2/25/2005 © 2003.1. JH McClellan & RW Schafer 24 H ( e ) = ∑ bk e ˆ jω k =0 M ˆ − jω k ˆ = ∑ h[k ] e − jω k k =0 M M IMPULSE RESPONSE 2/25/2005 © 2003. JH McClellan & RW Schafer © 2003. JH McClellan & RW Schafer 26 BLOCK DIAGRAMS Equivalent Representations x[n] UNIT-DELAY SYSTEM ˆ Find h[n ] and H ( e jω ) for y[n ] = x[n − 1] x[n] h[n ] ˆ H ( e jω ) ˆ ω y[n] δ [n − 1] x[n] y[n] x[n] y[n] ˆ H ( e jω ) {bk } = { 0. JH McClellan & RW Schafer .1.ww) FILTER COEFFICIENTS {bk} ˆ ˆ H ( e jω ) = ∑ bk e − jω k k =0 2/25/2005 © 2003.ww) VECTOR bb contains Filter Coefficients SP-First: HH = freekz(bb.

JH McClellan & RW Schafer h2 [n ] S2 h1[n ] ∗ h2 [n ] 31 EQUIVALENT SYSTEM 2/25/2005 ˆ ˆ ˆ H ( e jω ) = H1 ( e jω ) H 2 ( e jω ) © 2003. LTI SYSTEMS can be rearranged !!! WHAT ARE THE FILTER COEFFS? {bk} WHAT is the overall FREQUENCY RESPONSE ? CASCADE EQUIVALENT MULTIPLY the Frequency Responses x[n] ˆ H1 ( e jω ) x[n] ˆ H 2 ( e jω ) y[n] y[n] ˆ H ( e jω ) δ [n ] 2/25/2005 h1[n ] S1 h1[n ] © 2003. JH McClellan & RW Schafer 30 CASCADE SYSTEMS Does the order of S1 & S2 matter? NO. JH McClellan & RW Schafer 29 2/25/2005 © 2003. JH McClellan & RW Schafer 32 .FIRST DIFFERENCE SYSTEM ˆ Find h[n ] and H ( e jω ) for the Differenc e Equation : y[n ] = x[n ] − x[n − 1] x[n] DLTI Demo with Sinusoids x[n] FILTER y[n] δ [n ] − δ [n − 1] y[n] ˆ H ( e jω ) x[n] 1− e ˆ − jω y[n] 2/25/2005 © 2003.

6-7 & 6-8 Lecture 13 Digital Filtering of Analog Signals Other Reading: Recitation: Chapter 6 FREQUENCY RESPONSE EXAMPLES Next Lecture: Chapter 7 10/6/2003 © 2003. JH McClellan & RW Schafer 1 10/6/2003 © 2003. JH McClellan & RW Schafer M FIR 10/6/2003 © 2003. JH McClellan & RW Schafer 5 . Sections 6-6. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES Two Domains: Time & Frequency Track the spectrum of x[n] thru an FIR Filter: Sinusoid-IN gives Sinusoid-OUT UNIFICATION: How does Frequency Response affect x(t) to produce y(t) ? x(t) A-to-D x[n] TIME & FREQUENCY y[n ] = ∑ bk x[n − k ] = ∑ h[k ] x[n − k ] k =0 k =0 FIR DIFFERENCE EQUATION is the TIME-DOMAIN M M ˆ H ( e jω ) ˆ ω y[n] D-to-A ˆ ω y(t) ˆ ˆ H ( e jω ) = ∑ h[k ] e − jω k k =0 ˆ ˆ ˆ ˆ H ( e jω ) = h[0] + h[1] e − jω + h[2] e − j 2ω + h[3] e − j 3ω + 4 10/6/2003 © 2003.Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 6.

Ex: DELAY by 2 SYSTEM ˆ Find h[n ] and H (e jω ) for y[n ] = x[n − 2] x[n] DELAY by 2 SYSTEM ˆ Find h[n ] and H (e jω ) for y[n ] = x[n − 2] x[n] h[n ] ˆ H ( e jω ) ˆ ω y[n] bk = { 0. JH McClellan & RW Schafer 6 10/6/2003 © 2003. 1 } h[n ] = δ [n − 2] δ [n − 2] y[n] ˆ H ( e ) = ∑ δ [k − 2] e − jω k ˆ jω k =0 M ˆ H ( e jω ) x[n] x[n] y[n] ˆ ω ˆ e − j 2ω ˆ ω y[n] ˆ ω k = 2 ONLY 10/6/2003 © 2003. 0. JH McClellan & RW Schafer 8 10/6/2003 9 . JH McClellan & RW Schafer ONLY ONE non-ZERO TERM for k at k = nd 10/6/2003 © 2003. JH McClellan & RW Schafer 7 GENERAL DELAY PROPERTY ˆ Find h[n ] and H (e jω ) for y[n ] = x[n − nd ] FREQ DOMAIN --> TIME ?? START with x[n] ˆ H (e jω ) and find h[n ] or bk y[n] h[n ] = δ [n − nd ] ˆ ˆ H ( e ) = ∑ δ [k − nd ] e − jω k = e − jω nd ˆ jω k =0 M h[n ] ˆ H ( e jω ) ˆ ω h[n ] = ? ˆ ˆ ˆ H ( e jω ) = 7e − j 2ω cos(ω ) x[n] y[n] ˆ ω © 2003.

Freq PLOTTING MAG PHASE ˆ jω h[n ] = 3. RESPONSE PLOTS DENSE GRID (ww) from -π to +π π π ww = -pi:(pi/100):pi. JH McClellan & RW Schafer ˆ ω (radians) 13 π .2. 3.1} HH = freqz(bb. JH McClellan & RW Schafer FREQ. 0.5 } 10/6/2003 © 2003.ww) ˆ H (e ) = ( 2 + 2 cos ω )e ˆ jω ˆ − jω RESPONSE at π/3 ˆ ω ˆ H ( e ) = ∑ bk e − jω k ˆ jω k =0 10/6/2003 © 2003.FREQ DOMAIN --> TIME ˆ ˆ ˆ H ( e jω ) = 7e − j 2ω cos(ω ) EULER’s Formula PREVIOUS LECTURE REVIEW SINUSOIDAL INPUT SIGNAL OUTPUT has SAME FREQUENCY DIFFERENT Amplitude and Phase = 7e ˆ − j 2ω (0.5e − jω + 3. {bk } PLOT of FREQ RESPONSE = {1.5δ [n − 3] bk = { 0. JH McClellan & RW Schafer ˆ ˆ H ( e jω ) = H (e jω ) e j∠H ( e 11 ) 10 10/6/2003 © 2003.5δ [n − 1] + 3.ww) VECTOR bb contains Filter Coefficients DSP-First: HH = freekz(bb.3.5e ˆ jω + 0.1.5.1.5e ˆ − jω ) ˆ ˆ = (3.5e − j 3ω ) FREQUENCY RESPONSE of FIR MAGNITUDE vs. JH McClellan & RW Schafer M 12 −π 10/6/2003 © 2003. Frequency PHASE vs.

2 (answer) Find y[n ] when x[n ] = 2e jπ / 4e j (π / 3) n ˆ ˆ One Step . JH McClellan & RW Schafer y[n ] = (3e − jπ / 3 ) × 2e jπ / 4e j (π / 3) n = 6 e − jπ /12e j (π / 3) n 14 10/6/2003 © 2003. JH McClellan & RW Schafer ˆ H ( e jω ) ˆ ω y[n] ˆ ω ˆ ˆ H ( e ) = ( 2 + 2 cos ω )e − jω 10/6/2003 © 2003.EXAMPLE 6. JH McClellan & RW Schafer 15 EXAMPLE: COSINE INPUT ˆ Find y[n ] when H ( e jω ) is known and x[n ] = 2 cos( π n + π ) 3 4 x[n] EX: COSINE INPUT (ans-1) Find y[n ] when x[n ] = 2 cos( π n + π ) 3 4 2 cos( π n + π ) = e j (π n / 3+π / 4 ) + e − j (π n / 3+π / 4 ) 3 4 ⇒ x[n ] = x1[n ] + x2 [n ] y1[n ] = H ( e jπ / 3 )e j (π n / 3+π / 4 ) y2 [n ] = H ( e − jπ / 3 )e − j (π n / 3+π / 4 ) ⇒ y[n ] = y1[n ] + y2 [n ] © 2003.2 ˆ Find y[n ] when H (e jω ) is known EXAMPLE 6.evaluate H ( e jω ) at ω = π / 3 and x[n ] = 2e jπ / 4e j (π / 3) n x[n] H (e ) ˆ ω ˆ jω y[n] ˆ ω ˆ ˆ ˆ H ( e jω ) = ( 2 + 2 cos ω )e − jω ˆ ˆ H ( e jω ) = 3e − jπ / 3 @ ω = π / 3 ˆ ˆ ˆ H ( e jω ) = ( 2 + 2 cos ω )e − jω 10/6/2003 © 2003. JH McClellan & RW Schafer ˆ jω 16 10/6/2003 17 .

EX: COSINE INPUT (ans-2) SINUSOID thru FIR ) IF H ( e ) = H ( e Multiply the Magnitudes Add the Phases * ˆ jω ˆ − jω Find y[n ] when x[n ] = 2 cos( π n + π ) 3 4 ˆ ˆ ˆ H ( e jω ) = ( 2 + 2 cos ω )e − jω y1[n ] = H ( e jπ / 3 )e j (π n / 3+π / 4 ) = 3e − j (π / 3)e j (π n / 3+π / 4 ) y2 [n ] = H ( e − jπ / 3 )e − j (π n / 3+π / 4 ) = 3e j (π / 3)e − j (π n / 3+π / 4 ) ˆ x[n ] = A cos(ω1n + φ ) ˆ ˆ ˆ ⇒ y[n ] = A H ( e jω1 ) cos(ω1n + φ + ∠ H ( e jω1 )) y[n ] = 3e + 3e π ⇒ y[n ] = 6 cos( π n − 12 ) 3 10/6/2003 j (π n / 3−π / 12 ) − j (π n / 3−π / 12 ) © 2003. OUTPUT y(t) = SUM of SINUSOIDS © 2003. JH McClellan & RW Schafer 18 10/6/2003 © 2003. JH McClellan & RW Schafer 20 10/6/2003 21 . JH McClellan & RW Schafer 19 LTI Demo with Sinusoids x[n] FILTER y[n] DIGITAL “FILTERING” x(t) A-to-D x[n] ˆ H ( e jω ) ˆ ω y[n] D-to-A y(t) ω ˆ ω ω ω ˆ ω ω 10/6/2003 © 2003. JH McClellan & RW Schafer SPECTRUM of x(t) (SUM of SINUSOIDS) SPECTRUM of x[n] Is ALIASING a PROBLEM ? SPECTRUM y[n] (FIR Gain or Nulls) Then.

05π H ( e j 0.5π ) π . JH McClellan & RW Schafer ? 23 10/6/2003 © 2003. JH McClellan & RW Schafer x (t ) = cos(2π (25)t ) + cos(2π ( 250)t − 1 π ) 2 10/6/2003 D-A FREQUENCY SCALING x(t) A-to-D x[n] TRACK the FREQUENCIES x(t) A-to-D x[n] ˆ H (e jω ) y[n] D-to-A y(t) ˆ H (e jω ) y[n] D-to-A y(t) ω ˆ ω ˆ ω ω ω ˆ ω ˆ ω ω TIME SAMPLING: t = nTs ⇒ n ← t f s 250 Hz 25 Hz 0.05π π NO new freqs 250 Hz 25 Hz RECONSTRUCT up to 0.05π ) π 0. JH McClellan & RW Schafer ˆ ω = ω fs 24 Fs = 1000 Hz 10/6/2003 © 2003.5π H ( e j 0. JH McClellan & RW Schafer 25 .5fs FREQUENCY SCALING 10/6/2003 © 2003.5π π .FREQUENCY SCALING x(t) A-to-D x[n] 11-pt AVERAGER Example y(t) x(t) A-to-D x[n] ˆ H (e jω ) y[n] D-to-A ˆ H (e jω ) y[n] D-to-A y(t) ω ˆ ω ˆ ω ω 250 Hz ω TIME SAMPLING: t = nTs 1 y[n ] = ∑ 11 x[n − k ] k =0 ˆ ω 10 ˆ ω ω IF NO ALIASING: FREQUENCY SCALING ˆ ω = ωTs = ω 22 25 Hz fs ˆ sin( 11 ω ) − j 5ω 2 H (e ) = e ˆ ˆ 11sin( 1 ω ) 2 ˆ jω © 2003.

Response ˆ At ω = 0. JH McClellan & RW Schafer EVALUATE Freq.5π )) − j 5( 0.05π ˆ sin( 11 ω ) − j 5ω 2 H (e ) = e ˆ ˆ 11sin( 1 ω ) 2 ˆ jω ˆ jω ˆ ω = 0.5π e 11sin(0.5π )) 2 = sin(2.5π sin( 11 (0.5π ˆ ω = 0.5π ) 2 H (e ) = e 11sin( 1 (0.25π ) 27 = 0. JH McClellan & RW Schafer 28 10/6/2003 © 2003. JH McClellan & RW Schafer 29 .5π 10/6/2003 © 2003. Response DIGITAL FILTER ˆ H ( e jω ) H ( e j 2π ( 25) /1000 ) MAG SCALE fs = 1000 PHASE CHANGE EFFECTIVE RESPONSE LOW-PASS FILTER H ( e j 2π ( 250) /1000 ) 10/6/2003 © 2003. JH McClellan & RW Schafer 26 10/6/2003 © 2003.75π ) − j 2.11-pt AVERAGER NULLS or ZEROS EVALUATE Freq.0909e − j 0.

JH McClellan & RW Schafer 31 B&W IMAGE with COSINE FILTERED: 11-pt AVG FILTERED B&W IMAGE LPF: BLUR 10/6/2003 © 2003.FILTER TYPES LOW-PASS FILTER (LPF) BLURRING ATTENUATES HIGH FREQUENCIES B & W IMAGE HIGH-PASS FILTER (HPF) SHARPENING for IMAGES BOOSTS THE HIGHS REMOVES DC BAND-PASS FILTER (BPF) 10/6/2003 © 2003. JH McClellan & RW Schafer 32 10/6/2003 © 2003. JH McClellan & RW Schafer 33 . JH McClellan & RW Schafer 30 10/6/2003 © 2003.

JH McClellan & RW Schafer 10/6/2003 34 10/6/2003 © 2003.ROW of B&W IMAGE BLACK = 255 FILTERED ROW of IMAGE WHITE = 0 ADJUSTED DELAY by 5 samples © 2003. JH McClellan & RW Schafer 35 .

JH McClellan & RW Schafer FREQ-DOMAIN ˆ H (e ) = ∑ bk e − jω k k =0 5 H ( z ) = ∑ h[n ]z n 4 −n y[n ] = ∑ bk x[n − k ] k =0 8/22/2003 M M © 2003. JH McClellan & RW Schafer . 7-6 to the end 8/22/2003 © 2003.Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 7. THREE) DOMAINS Z-TRANSFORM-DOMAIN POLYNOMIALS: H(z) Z-Transform can be applied to FIR Filter: h[n ] → H ( z ) h[n] --> H(z) x[n → X(z) Signals: x[n]]--> X ( z ) 8/22/2003 TIME-DOMAIN {bk } ˆ jω © 2003. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES INTRODUCE the Z-TRANSFORM Give Mathematical Definition Show how the H(z) POLYNOMIAL simplifies analysis CONVOLUTION is SIMPLIFIED ! TWO (no. 7 CASCADING SYSTEMS Next Lecture: Chapter 7. JH McClellan & RW Schafer 1 8/22/2003 © 2003. Sects 7-1 through 7-5 Lecture 14 Z Transforms: Introduction Other Reading: Recitation: Ch.

JH McClellan & RW Schafer -1 8/22/2003 © 2003. JH McClellan & RW Schafer 9 . − 3. 0. JH McClellan & RW Schafer 7 Z-TRANSFORM IDEA POLYNOMIAL REPRESENTATION x[n] Z-Transform DEFINITION POLYNOMIAL Representation of LTI SYSTEM: H ( z ) = ∑ h[n ]z − n EXAMPLE: {h[n ]} = { 2. 2 } n APPLIES to Any SIGNAL h[n ] y[n] H ( z ) = ∑ h[n ]z − n n x[n] H (z ) y[n] H ( z ) = 2 z −0 + 0 z −1 − 3z −2 + 0 z −3 + 2 z −4 = 2 − 3 z −2 + 2 z −4 POLYNOMIAL in z = 2 − 3( z −1 )2 + 2( z −1 )4 8 8/22/2003 © 2003. 0.TRANSFORM CONCEPT Move to a new domain where OPERATIONS are EASIER & FAMILIAR Use POLYNOMIALS “TRANSFORM” EXAMPLE Equivalent Representations x[n] h[n ] = δ [n ] − δ [n − 1] y[n] ˆ ˆ H ( e jω ) = ∑ h[n ]e − jω n n TRANSFORM both ways x[n → X(z) x[n]]--->X ( z ) (into the z domain) X(z) )--->xx[n] (back to the time domain) X ( z → [n ] 8/22/2003 © 2003. JH McClellan & RW Schafer x[n] ˆ ˆ H ( e jω ) = 1 − e − jω y[n] 6 8/22/2003 © 2003.

3 in the book: H ( z ) = ∑ bk z k =0 M M −k = ∑ h[k ]z −k k =0 M M y[n ] = 6 x[n ] − 5 x[n − 1] + x[n − 2] {bk } = { 6. JH McClellan & RW Schafer CONVOLUTION 12 H ( z ) = ∑ bk z −1 = 6 − 5z −1 + z −2 8/22/2003 © 2003. JH McClellan & RW Schafer 13 .1} y[n ] = ∑ bk x[n − k ] = ∑ h[k ] x[n − k ] k =0 k =0 FIR DIFFERENCE EQUATION 8/22/2003 © 2003. JH McClellan & RW Schafer 10 8/22/2003 © 2003. JH McClellan & RW Schafer 11 Z-Transform of FIR Filter CALLED the SYSTEM FUNCTION h[n] is same as {bk} SYSTEM FUNCTION Z-Transform of FIR Filter Get H(z) DIRECTLY from the {bk} Example 7.Z-Transform EXAMPLE ANY SIGNAL has a z-Transform: X ( z ) = 1 − 2 z −1 + 3z −3 − z −5 EXPONENT GIVES TIME LOCATION X ( z ) = ∑ x[n ]z − n n X ( z) = ? 8/22/2003 x[n ] = ? X ( z ) = 2 + 4 z −1 + 6 z −2 + 4 z −3 + 2 z −4 © 2003. − 5.

1.} δ [n − 1] −n y[n] = x[n-1] Y ( z ) = z −1 X ( z ) Y ( z ) = z −1 (3 + z −1 + 4 z −2 + z −3 + 5z −4 + 9 z −5 ) Y ( z ) = 0 z 0 + 3z −1 + z −2 + 4 z −3 + z −4 + 5z −5 + 9 z −6 H ( z ) = ∑ δ [n − 1]z x[n] =z −1 z −1 © 2003. DELAY SYSTEM UNIT DELAY: find h[n] and H(z) x[n] DELAY EXAMPLE UNIT DELAY: find y[n] via polynomials x[n] = {3. find y[n] (for FIR.5. JH McClellan & RW Schafer y[n] 8/22/2003 14 8/22/2003 © 2003. h[n]) How to combine X(z) and H(z) ? 8/22/2003 © 2003.1..0.0. JH McClellan & RW Schafer 16 8/22/2003 © 2003.Ex.0..4. JH McClellan & RW Schafer 15 DELAY PROPERTY GENERAL I/O PROBLEM Input is x[n]. JH McClellan & RW Schafer 17 ..9.

FIR Filter = CONVOLUTION CONVOLUTION PROPERTY PROOF: MULTIPLY Z-TRANSFORMS y[n ] = ∑ bk x[n − k ] = ∑ h[k ]x[n − k ] 8/22/2003 M M k =0 © 2003. JH McClellan & RW Schafer 19 CONVOLUTION EXAMPLE MULTIPLY the z-TRANSFORMS: CONVOLUTION EXAMPLE Finite-Length input x[n] FIR Filter (L=4) MULTIPLY Z-TRANSFORMS MULTIPLY H(z)X(z) 8/22/2003 © 2003. JH McClellan & RW Schafer y[n] = ? 20 8/22/2003 © 2003. JH McClellan & RW Schafer k =0 18 CONVOLUTION 8/22/2003 © 2003. JH McClellan & RW Schafer 21 .

JH McClellan & RW Schafer 23 CASCADE EXAMPLE x[n] H1 ( z ) w[n] H 2 ( z) y[n] w[n ] = x[n ] − x[n − 1] y[n ] = w[n ] + w[n − 1] H 2 ( z ) = 1 + z −1 y[n] H1 ( z ) = 1 − z −1 x[n] H (z ) H ( z ) = (1 − z −1 )(1 + z −1 ) = 1 − z −2 y[n ] = x[n ] − x[n − 2] 8/22/2003 © 2003. JH McClellan & RW Schafer S2 22 EQUIVALENT SYSTEM 8/22/2003 H ( z ) = H1 ( z ) H 2 ( z ) © 2003. LTI SYSTEMS can be rearranged !!! Remember: h1[n] * h2[n] How to combine H1(z) and H2(z) ? CASCADE EQUIVALENT Multiply the System Functions x[n] H1 ( z ) x[n] H 2 ( z) y[n] H (z ) y[n] S1 8/22/2003 © 2003.CASCADE SYSTEMS Does the order of S1 & S2 matter? NO. JH McClellan & RW Schafer 24 .

and 0. 0.8π. JH McClellan & RW Schafer 8/22/2003 5 .9π π π π This is NULLING ˆ H ( e jω ) = H ( z ) z =e jωˆ THREE DOMAINS: Show Relationship for FIR: Estimate the filter length needed to accomplish this task. How many bk ? ˆ h[n ] ↔ H ( z ) ↔ H (e jω ) © 2003. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES ZEROS and POLES Relate H(z) to FREQUENCY RESPONSE DESIGN PROBLEM Example: Design a Lowpass FIR filter (Find bk) Reject completely 0.7π. Section 7-6 to end Lecture 15 Zeros of H(z) and the Frequency Domain Other Reading: Recitation & Lab: Chapter 7 ZEROS (and POLES) Next Lecture:Chapter 8 8/22/2003 © 2003. JH McClellan & RW Schafer 1 8/22/2003 © 2003. JH McClellan & RW Schafer Z POLYNOMIALS provide the TOOLS 4 8/22/2003 © 2003.Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 7.

JH McClellan & RW Schafer CONVOLUTION EXAMPLE x[n] THREE DOMAINS Z-TRANSFORM-DOMAIN POLYNOMIALS: H(z) H(z) y[n] x[n ] = δ [n − 1] + 2δ [n − 2] X ( z ) = z −1 + 2 z −2 h[n ] = δ [n ] − δ [n − 1] H ( z ) = 1 − z −1 y[n ] = x[n ] ∗ h[n ] TIME-DOMAIN M {bk } ˆ jω © 2003. 0. JH McClellan & RW Schafer M MULTIPLY z-TRANSFORMS FIR Filter 7 -1 6 © 2003. − 3. JH McClellan & RW Schafer y[n ] = ∑ bk x[n − k ] k =0 8/22/2003 M 8 . 0. 2 } n APPLIES to Any SIGNAL CONVOLUTION PROPERTY Convolution in the n-domain SAME AS Multiplication in the z-domain y[n ] = h[n ] ∗ x[n ] ↔ Y ( z ) = H ( z ) X ( z ) y[n ] = x[n ] ∗ h[n ] = ∑ h[k ] x[n − k ] k =0 8/22/2003 H ( z ) = 2 z −0 + 0 z −1 − 3z −2 + 0 z −3 + 2 z −4 = 2 − 3 z −2 + 2 z −4 POLYNOMIAL in z −1 2 −1 4 = 2 − 3( z ) + 2( z ) 8/22/2003 © 2003. JH McClellan & RW Schafer FREQ-DOMAIN ˆ H (e ) = ∑ bk e − jω k k =0 9 Y ( z ) = ( z −1 + 2 z −2 )(1 − z −1 ) = z −1 + z −2 − 2 z −3 y[n ] = δ [n − 1] + δ [n − 2] − 2δ [n − 3] 8/22/2003 © 2003.Z-Transform DEFINITION POLYNOMIAL Representation of LTI SYSTEM: H ( z ) = ∑ h[n ]z − n EXAMPLE: {h[n ]} = { 2.

JH McClellan & RW Schafer 11 ZEROS of H(z) Find z.FREQUENCY RESPONSE ? Same Form: ANOTHER ANALYSIS TOOL z-Transform POLYNOMIALS are EASY ! ROOTS. JH McClellan & RW Schafer . JH McClellan & RW Schafer © 2003. ˆ ω − Domain ˆ ˆ H ( e jω ) = ∑ bk e − jω k M k =0 M k =0 z=e M ˆ jω z − Domain H ( z ) = ∑ bk z k =0 −k ZEROS and POLES: where is H(z) = 0 ? The z-domain is COMPLEX H(z) is a COMPLEX-VALUED function of a COMPLEX VARIABLE z. JH McClellan & RW Schafer 10 8/22/2003 © 2003. H ( z ) = 1 − 1 z −1 2 1 − 1 z −1 = 0 ? 2 z−1 =0 2 H ( z ) = 1 − 2 z −1 + 2 z −2 − z −3 H ( z ) = (1 − z −1 )(1 − z −1 + z −2 ) Roots : z = 1. 1 ± j 2 12 8/22/2003 Zero at : z = 8/22/2003 1 2 3 2 e ± jπ / 3 13 © 2003. FACTORS. H ( e ) = ∑ bk (e ˆ jω 8/22/2003 ˆ jω −k ) SAME COEFFICIENTS © 2003. etc. where H(z)=0 Interesting when z is ON the unit circle. where H(z)=0 ZEROS of H(z) Find z.

where H (z ) → ∞ Not very interesting for the FIR case H ( z ) = 1 − 2 z −1 + 2 z −2 − z −3 z3 − 2z2 + 2 z − 1 H ( z) = z3 Three Poles at : z = 0 3 POLES 8/22/2003 © 2003. JH McClellan & RW Schafer 14 8/22/2003 © 2003. radius = 1 8/22/2003 © 2003. JH McClellan & RW Schafer 15 FREQ. JH McClellan & RW Schafer 16 8/22/2003 © 2003.PLOT ZEROS in z-DOMAIN UNIT CIRCLE 3 ZEROS H(z) = 0 POLES of H(z) Find z. JH McClellan & RW Schafer 17 . RESPONSE from ZEROS ˆ H ( e jω ) = H ( z ) z =e jωˆ Relate H(z) to FREQUENCY RESPONSE EVALUATE H(z) on the UNIT CIRCLE ANGLE is same as FREQUENCY ˆ H ( e jω ) = H ( z ) z =e jωˆ ANGLE is FREQUENCY ˆ ˆ z = e jω (as ω varies) defines a CIRCLE.

JH McClellan & RW Schafer 18 8/22/2003 © 2003. JH McClellan & RW Schafer 19 NULLING PROPERTY of H(z) When H(z)=0 on the unit circle. JH McClellan & RW Schafer 21 . JH McClellan & RW Schafer 20 8/22/2003 © 2003.FIR Frequency Response ˆ Zeros of H ( e jω ) and H ( z ) 3 DOMAINS MOVIE: FIR ZEROS MOVE H (z ) h[n ] ˆ H ( e jω ) 8/22/2003 © 2003. Find inputs x[n] that give zero output PLOT ZEROS in z-DOMAIN UNIT CIRCLE 3 ZEROS H(z) = 0 H ( z ) = 1 − 2 z −1 + 2 z −2 − z −3 ˆ ˆ ˆ ˆ H (e jω ) = 1 − 2e − jω + 2e − j 2ω − e − j 3ω x[n] H (z ) y[n] H (e jπ / 3 ) = ? 3 POLES x[n ] = e j (π / 3) n 8/22/2003 y [ n ] = H ( e j ( π / 3) ) ⋅ e j ( π / 3) n © 2003.

9π π π π Estimate the filter length needed to accomplish this task. How many bk ? PeZ Demo: Zero Placing Z POLYNOMIALS provide the TOOLS 8/22/2003 © 2003. 0. JH McClellan & RW Schafer 22 8/22/2003 © 2003. JH McClellan & RW Schafer 25 . JH McClellan & RW Schafer 24 8/22/2003 © 2003.NULLING PROPERTY of H(z) Evaluate H(z) at the input “frequency” ˆ ˆ ˆ ˆ H (e jω ) = 1 − 2e − jω + 2e − j 2ω − e − j 3ω FIR Frequency Response ˆ Zeros of H ( e jω ) and H ( z ) y[n ] = H ( e jπ / 3 ) ⋅ e j (π / 3) n y[n ] = (1 − 2e − jπ / 3 + 2e − j 2π / 3 − e − j 3π / 3 ) ⋅ e j (π / 3) n (1 − 2( 1 − j 2 8/22/2003 3 ) + 2( − 1 2 2 −j 3 ) − ( −1)) 2 y[n ] = (1 − 1 + j 3 − 1 − j 3 + 1) ⋅ e j (π / 3) n = 0 © 2003.8π. JH McClellan & RW Schafer 23 DESIGN PROBLEM Example: Design a Lowpass FIR filter (Find bk) Reject completely 0. and 0.7π.

Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 8. Sects. 8-2 & 8-3 Lecture 16 IIR Filters: Feedback and H(z) Other Reading: Recitation: Ch. Sects 8-1 thru 8-4 POLES & ZEROS Next Lecture: Chapter 8. JH McClellan & RW Schafer FREQ-DOMAIN ˆ H (e ) = ∑ bk e − jω k k =0 5 H(z) 4 y[n ] = ∑ bk x[n − k ] k =0 8/22/2003 M . JH McClellan & RW Schafer 3 LECTURE OBJECTIVES INFINITE IMPULSE RESPONSE FILTERS Define IIR DIGITAL Filters Have FEEDBACK: use PREVIOUS OUTPUTS FEEDBACK THREE DOMAINS Z-TRANSFORM-DOMAIN POLYNOMIALS: H(z) y[n] = ∑ a y[n − ] + ∑ bk x[n − k] =1 k =0 N M Show how to compute the output y[n] FIRST-ORDER CASE (N=1) Z-transform: Impulse Response h[n] 8/22/2003 © 2003. JH McClellan & RW Schafer TIME-DOMAIN M {bk } ˆ jω © 2003. Sects. 8. 8-1. JH McClellan & RW Schafer 1 8/22/2003 © 2003. 8-4 8-5 & 8-6 8/22/2003 © 2003.

JH McClellan & RW Schafer 9 8/22/2003 © 2003. JH McClellan & RW Schafer 10 .8].Quick Review: Delay by nd LOGICAL THREAD FIND the IMPULSE RESPONSE.-0. JH McClellan & RW Schafer 8 ONE FEEDBACK TERM ADD PREVIOUS OUTPUTS FILTER COEFFICIENTS ADD PREVIOUS OUTPUTS y[n] = a1 y[n −1]+ b0 x[n] + b1 x[n − 1] FIR PART of the FILTER PREVIOUS FEEDBACK FEED-FORWARD y[n] = 0. JH McClellan & RW Schafer ˆ jω 8/22/2003 © 2003.8y[n −1]+ 3x[n] − 2x[n − 1] FEEDBACK COEFFICIENT SIGN CHANGE MATLAB yy = filter([3.[1. h[n] INFINITELY LONG IIR Filters ∞ y[n ] = x[n − nd ] IMPULSE RESPONSE SYSTEM FUNCTION h[n ] = δ [n − nd ] H ( z ) = z − nd ˆ ˆ H (e jω ) = e − jω nd 6 8/22/2003 H(z) = ∑ h[n]z n= 0 −n EXPLOIT THREE DOMAINS: Show Relationship for IIR: FREQUENCY RESPONSE h[n] ↔ H (z) ↔ H(e ) © 2003.xx) CAUSALITY NOT USING FUTURE OUTPUTS or INPUTS 8/22/2003 © 2003.-2].

8y[n −1]+ 5x[n] NEED y[-1] to get started y[0] = 0. JH McClellan & RW Schafer 2 13 8/22/2003 © 2003. JH McClellan & RW Schafer 11 8/22/2003 © 2003.COMPUTE OUTPUT COMPUTE y[n] FEEDBACK DIFFERENCE EQUATION: y[n] = 0. for n<0 BECAUSE x[n] = 0.8y[−1] + 5x[0] 8/22/2003 © 2003. for n<0 COMPUTE y[0] THIS STARTS THE RECURSION: SAME with MORE FEEDBACK TERMS y[n] = a1 y[n −1]+ a2 y[n − 2] + ∑ bk x[n − k] k =0 8/22/2003 © 2003. JH McClellan & RW Schafer 14 . JH McClellan & RW Schafer 12 AT REST CONDITION y[n] = 0.

for n ≥ 0 8/22/2003 h[n] = b0 (a1 ) n u[n] 17 x[n] IMPULSE RESPONSE 8/22/2003 h[n] © 2003.8)n u[n] y[n] = h[n]∗ x[n] 18 CONVOLUTION in TIME-DOMAIN u[n] = 1.COMPUTE MORE y[n] CONTINUE THE RECURSION: PLOT y[n] 8/22/2003 © 2003. JH McClellan & RW Schafer 16 IMPULSE RESPONSE h[n] = a1 y[n −1]+ b0δ [n] y[n] h[n x[n] IMPULSE RESPONSE DIFFERENCE EQUATION: y[n] = 0. JH McClellan & RW Schafer 15 8/22/2003 © 2003. JH McClellan & RW Schafer © 2003.8y[n −1]+ 3x[n] Find h[n] h[n] = 3(0. JH McClellan & RW Schafer LTI SYSTEM .

PLOT IMPULSE RESPONSE

Infinite-Length Signal: h[n]
POLYNOMIAL Representation

h[n] = b0 (a1 ) u[n] = 3(0.8) u[n]

n

n

H(z) =

n=−∞

∑ h[n]z

−n

APPLIES to Any SIGNAL

SIMPLIFY the SUMMATION

H ( z) =
8/22/2003
© 2003, JH McClellan & RW Schafer

n =−∞
19 8/22/2003

∑ b (a ) u[n] z
n 0 1

−n

= b0 ∑ a1n z −n
n =0
20

© 2003, JH McClellan & RW Schafer

Derivation of H(z)
Recall Sum of Geometric Sequence: Yields a COMPACT FORM
1 ∑ r = 1− r n=0
n ∞

H(z) = z-Transform{ h[n] }
FIRST-ORDER IIR FILTER:

y[n] = a1 y[n −1]+ b0 x[n]

H ( z ) = b0 ∑ a z
n =0

n −n 1

= b0 ∑ (a1 z )
n =0

−1 n

h[n] = b0 (a1 ) n u[n]
H(z) =
21 8/22/2003

b0 = 1 − a1 z −1
8/22/2003

if z > a1

b0 1− a1 z−1
© 2003, JH McClellan & RW Schafer

© 2003, JH McClellan & RW Schafer

22

H(z) = z-Transform{ h[n] }
ANOTHER FIRST-ORDER IIR FILTER:

CONVOLUTION PROPERTY
MULTIPLICATION of z-TRANSFORMS

y[n] = a1 y[n −1]+ b0 x[n] + b1 x[n − 1]

X(z)

h[n ] = b0 (a1 )n u[n ] + b1 (a1 )n −1 u[n − 1]
z
−1

H(z)

Y (z) = H(z)X(z)

CONVOLUTION in TIME-DOMAIN

is a shift
−1

H(z) =
8/22/2003

b0 bz b +bz + 1 −1 = 0 1 −1 1− a1 z−1 1− a1 z 1 − a1 z
© 2003, JH McClellan & RW Schafer

−1

x[n]
23

h[n]

y[n] = h[n] ∗ x[n]
24

IMPULSE RESPONSE 8/22/2003

© 2003, JH McClellan & RW Schafer

STEP RESPONSE: x[n]=u[n]
u[n] = 1, for n ≥ 0

DERIVE STEP RESPONSE

8/22/2003

© 2003, JH McClellan & RW Schafer

25

8/22/2003

© 2003, JH McClellan & RW Schafer

26

PLOT STEP RESPONSE

y[n] = 0.8y[n −1]+ 3u[n]

y[n] = 15( − 0.8n+1 )u[n] 1

8/22/2003

© 2003, JH McClellan & RW Schafer

27

Signal Processing First

This Lecture:
Chapter 8, Sects. 8-4 8-5 & 8-6

Lecture 17 IIR Filters: H(z) and Frequency Response

Recitation: Chapter 8, all
POLE-ZERO PLOTS

4/3/2006

© 2003-2006, JH McClellan & RW Schafer

3

LECTURE OBJECTIVES
SYSTEM FUNCTION: H(z) H(z) has POLES and ZEROS FREQUENCY RESPONSE of IIR
Get H(z) first

THREE DOMAINS
Z-TRANSFORM-DOMAIN Use H(z) to get Freq. Response POLYNOMIALS: H(z)

THREE-DOMAIN APPROACH

ˆ H ( e jω ) = H ( z ) z =e jωˆ

z=e

ˆ jω

TIME-DOMAIN
N M

{a , bk }
k =0

FREQ-DOMAIN
ˆ H ( e jω ) =

ˆ h[n ] ↔ H ( z ) ↔ H ( e jω )
4/3/2006
© 2003-2006, JH McClellan & RW Schafer

y[n ] = ∑ a y[n − ] + ∑ bk x[n − k ]
=1
4 4/3/2006
© 2003-2006, JH McClellan & RW Schafer

ˆ 1 − ∑ a e − jω =1
5

k =0 N

∑ bk e− jωˆ k

M

H(z) = z-Transform{ h[n] } FIRST-ORDER IIR FILTER: Typical IMPULSE Response y[n] = a1 y[n −1]+ b0 x[n] h[n] = b0 (a1 )n u[n] = 3(0. JH McClellan & RW Schafer 6 4/3/2006 © 2003-2006. JH McClellan & RW Schafer .8)n u[n] h[n] = b0 (a1 ) n u[n] b0 H(z) = −1 1− a1 z 4/3/2006 © 2003-2006. JH McClellan & RW Schafer © 2003-2006. JH McClellan & RW Schafer 7 First-Order Transform Pair DELAY PROPERTY of X(z) DELAY in TIME<-->Multiply X(z) by z-1 h[n] = ba u[n] ↔ n b H(z) = 1− a z−1 = b0 ∑ (a1 z ) n =0 ∞ −1 n x[n]↔ X(z) x[n −1] ↔ z −1 X(z) Proof: n= −∞ GEOMETRIC SEQUENCE: H ( z ) = b0 ∑ a z n =0 ∞ n −n 1 ∑ x[n − 1]z −1 ∞ −n = ∑ x[ =−∞ ∞ ]z− ( +1) b0 = 1 − a1 z −1 4/3/2006 if z > a1 8 4/3/2006 =z ∑ x[ ]z = −∞ ∞ − = z−1 X(z) 9 © 2003-2006.

JH McClellan & RW Schafer 11 SYSTEM FUNCTION DIFFERENCE EQUATION: CONVOLUTION PROPERTY MULTIPLICATION of z-TRANSFORMS y[n] = 0.Z-Transform of IIR Filter DERIVE the SYSTEM FUNCTION H(z) Use DELAY PROPERTY SYSTEM FUNCTION of IIR NOTE the FILTER COEFFICIENTS y[n] = a1 y[n −1]+ b0 x[n] + b1 x[n − 1] Y (z) − a1z −1Y(z) = b0 X(z) + b1 z−1 X(z) (1 − a1 z−1 )Y (z) = (b0 + b1 z −1 )X(z) Y (z) b0 + b1 z −1 B(z) H(z) = = = X(z) 1− a1 z −1 A(z) 10 4/3/2006 © 2003-2006. JH McClellan & RW Schafer 13 . JH McClellan & RW Schafer Y (z) = a1z Y(z) + b0 X(z) + b1 z X(z) EASIER with DELAY PROPERTY −1 −1 4/3/2006 © 2003-2006. JH McClellan & RW Schafer CONVOLUTION in TIME-DOMAIN x[n] 12 h[n] y[n] = h[n]∗ x[n] IMPULSE RESPONSE 4/3/2006 © 2003-2006.8y[n −1]+ 3x[n] − 2x[n − 1] READ the FILTER COEFFS: H(z) X(z) H(z) Y (z) = H(z)X(z) ⎛ 3 − 2 z −1 ⎞ ⎟ Y ( z) = ⎜ ⎜ 1 − 0.8 z −1 ⎟ X ( z ) ⎝ ⎠ 4/3/2006 © 2003-2006.

JH McClellan & RW Schafer .8( 5 © 2003-2006.8 15 POLE-ZERO PLOT ZERO at z = -1 FREQUENCY RESPONSE SYSTEM FUNCTION: H(z) H(z) has DENOMINATOR FREQUENCY RESPONSE of IIR We have H(z) POLE at z = 0.8( −1) ZERO at z= -1 b0 + b1 z−1 b z + b1 H(z) = → H (z) = 0 −1 1 − a1 z z − a1 b0 z + b1 = 0 ⇒ z = − z − a1 = 0 ⇒ z = a1 4/3/2006 © 2003-2006. JH McClellan & RW Schafer H(e ) = H(z ) z = e jωˆ ˆ jω 17 ˆ jω THREE-DOMAIN APPROACH h[n] ↔ H (z) ↔ H(e ) 16 4/3/2006 © 2003-2006.8 z −1 H ( z) = 2 + 2( −1) =0 1 − 0.8z−1 −1 4/3/2006 © 2003-2006.8 2 + 2z 1 − 0. JH McClellan & RW Schafer POLE at z=0.POLES & ZEROS ROOTS of Numerator & Denominator EXAMPLE: Poles & Zeros VALUE of H(z) at POLES is INFINITE 2 + 2 z −1 H ( z) = 1 − 0. JH McClellan & RW Schafer b1 b0 ZERO: H(z)=0 inf 14 4/3/2006 POLE: H(z) 9 2 + 2( 4 ) −1 5 H ( z) = = 2 →∞ 4 ) −1 0 1 − 0.

RESPONSE FORMULA ˆ 2 + 2 z −1 2 + 2e − jω ˆ jω H ( z) = → H (e ) = ˆ 1 − 0.8e − jω UNIT CIRCLE MAPPING BETWEEN ˆ z and ω z=e ˆ jω ˆ z=1 ↔ ω=0 ˆ z = −1 ↔ ω = ±π ˆ z = ±j ↔ ω = ± 1π 2 4/3/2006 © 2003-2006.64 − 1.8e jω ˆ ˆ ˆ 8 + 8 cos ω 4 + 4 + 4e − jω + 4e jω = ˆ ˆ ˆ 1 + 0. JH McClellan & RW Schafer 20 4/3/2006 © 2003-2006.8e − jω 1 − 0. @ ω = π ? 0.8e − jω 1 − 0.8e − jω − 0.64 − 0.8e jω 1.6 cos ω ˆ @ ω = 0. 4/3/2006 © 2003-2006.8e − jω 2 ˆ ˆ 2 + 2e − jω 2 + 2e jω = ˆ ⋅ ˆ 1 − 0.FREQUENCY RESPONSE EVALUATE on the UNIT CIRCLE FREQ.04 19 Frequency Response Plot ˆ 2 + 2e − jω ˆ jω H (e ) = ˆ 1 − 0. JH McClellan & RW Schafer 21 . JH McClellan & RW Schafer ˆ H ( e jω ) = 2 18 4/3/2006 © 2003-2006. JH McClellan & RW Schafer 8+8 ˆ = 400.8 z −1 H(e ) = H(z ) z = e jωˆ ˆ jω H (e ) = ˆ jω 2 ˆ 2 + 2e − jω ˆ 1 − 0.

JH McClellan & RW Schafer 25 .3-D VIEWPOINT: EVALUATE H(z) EVERYWHERE 3-D VIEW WHERE is the POLE ? MOVIE for H(z) in 3-D POLES to H(z) to Frequency Reponse TWO POLES SHOWN 4/3/2006 UNIT CIRCLE © 2003-2006. JH McClellan & RW Schafer 23 Frequency Response from H(z) Walking around the Unit Circle 3 DOMAINS MOVIE: IIR H(z) POLE MOVES ˆ H ( e jω ) h[n] 4/3/2006 © 2003-2006. JH McClellan & RW Schafer 22 4/3/2006 © 2003-2006. JH McClellan & RW Schafer 24 4/3/2006 © 2003-2006.

8z Find the Impulse Response. JH McClellan & RW Schafer 27 POP QUIZ Given: Evaluate FREQ.25π 2 + 2z−1 ˆ −1 at ω = 0. y[n] When zero at ω=π x[n] = cos(0. JH McClellan & RW Schafer 26 4/3/2006 © 2003-2006.25π 1 − 0. RESPONSE ˆ z = 1 is ω = 0 2 + 2z−1 H(z) = 1− 0. JH McClellan & RW Schafer 4/3/2006 28 4/3/2006 © 2003-2006.8z −1 ˆ ω = 0.25π n) © 2003-2006. JH McClellan & RW Schafer 29 . h[n] Find the output.PeZ Demo: Pole-Zero Placing SINUSOIDAL RESPONSE x[n] = SINUSOID => y[n] is SINUSOID Get MAGNITUDE & PHASE from H(z) ˆ if x[n ] = e jω n ˆ ˆ then y[n ] = H ( e jω ) e jω n ˆ where H ( e jω ) = H ( z ) z =e jωˆ 4/3/2006 © 2003-2006.

8z −1 x[n] = cos(0.25π n) x[n] Find output.8e 4/3/2006 y[n] = 5.417π ) © 2003-2006. Resp.182cos(0.182e − j1. JH McClellan & RW Schafer EQUIVALENT SYSTEM 4/3/2006 H(z) = H1 (z)H2 (z) © 2003-2006.309 − j 0. JH McClellan & RW Schafer 30 31 .25π 1 − 0.25π 2 + 2( 22 − j 22 ) H ( z) = = 5.POP QUIZ: Eval Freq. Given: CASCADE EQUIVALENT Multiply the System Functions 2 + 2z−1 H(z) = 1− 0. y[n]. when Evaluate at H1 (z) x[n] H2 (z) H(z) y[n] y[n] z = e j0.25π n − 0.

JH McClellan & RW Schafer 1 4/18/2004 © 2003. JH McClellan & RW Schafer z = e jω FREQ-DOMAIN ˆ y[n ] = ∑ a y[n − ] + ∑ bk x[n − k ] =1 4 4/18/2004 ˆ H ( e jω ) = ˆ 1 − ∑ a e − jω =1 5 k =0 N ∑ bk e− jωˆ k M . all POLES & ZEROS Next Lecture: Chapter 9 4/18/2004 © 2003. all Lecture 18 3-Domains for IIR Other Reading: Recitation: Ch. Response y[n] = a1 y[n −1]+ a2 y[n − 2] + ∑ bk x[n − k] k =0 2 ∑b z H(z) = 1− ∑ a z k Z-TRANSFORM-DOMAIN: poles & zeros POLYNOMIALS: H(z) − −k H(z) can have COMPLEX POLES & ZEROS THREE-DOMAIN APPROACH BPFs have POLES NEAR THE UNIT CIRCLE 4/18/2004 © 2003. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES SECOND-ORDER IIR FILTERS TWO FEEDBACK TERMS THREE DOMAINS Use H(z) to get Freq. 8. JH McClellan & RW Schafer TIME-DOMAIN N {a .bk } M k =0 © 2003.Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 8.

Z-TRANSFORM TABLES SECOND-ORDER FILTERS Two FEEDBACK TERMS y[n] = a1 y[n −1] + a2 y[n − 2] + b0 x[n] + b1 x[n −1] + b2 x[n − 2] b0 + b1z −1 + b2 z −2 H(z) = 1 − a1z −1 − a2 z −2 4/18/2004 © 2003. JH McClellan & RW Schafer . n “RESONANCE” n b0 + b1 z−1 + b2 z−2 b0 z2 + b1 z + b2 H(z) = = 2 1 − a1 z−1 − a2 z −2 z − a1 z − a2 (pk ) = (re ) jθ n = rn e jnθ Find FREQUENCY RESPONSE Depends on Pole Location Close to the Unit Circle? Make BANDPASS FILTER pole = re jθ r →1? 9 4/18/2004 © 2003. JH McClellan & RW Schafer 8 4/18/2004 © 2003. JH McClellan & RW Schafer 6 4/18/2004 © 2003. JH McClellan & RW Schafer 7 MORE POLES Denominator is QUADRATIC 2 Poles: REAL or COMPLEX CONJUGATES TWO COMPLEX POLES Find Impulse Response ? Can OSCILLATE vs.

9e jπ /3 z −1 1− 0.2nd ORDER EXAMPLE h[n ] = (0. freqz( bb. JH McClellan & RW Schafer 4/18/2004 1 − 0.45 ]. aa.9)n cos( π n)u[n] 3 10 4/18/2004 © 2003.5 + 1− 0. 0.81y[n − 2]+ x[n]− 0. © 2003.5 0.81z y[n] = 0. JH McClellan & RW Schafer 12 4/18/2004 13 .9y[n − 1]− 0.9e − jπ / 3 z −1 1− 0.45x[n − 1] aa bb nn hh HH = = = = = [ 1.pi/100:pi] ).9e z ) 1− 0.45z−1 −1 −2 1 − 0.9z + 0. [-pi. JH McClellan & RW Schafer h[n] = r cos(θn)u[n] n GENERAL ENTRY for z-Transform TABLE 1 − r cosθ z −1 H(z) = −1 2 −2 1− 2r cosθ z + r z h[n] = Arn cos(θn + ϕ )u[n] cosϕ − r cos(θ − ϕ )z−1 H(z) = A −1 2 −2 1 − 2r cos θ z + r z 4/18/2004 © 2003.81z 11 2nd ORDER Z-transform PAIR 2nd ORDER EX: n-Domain 1 − 0.9e z )(1− 0.9cos( π )z−1 3 H(z) = jπ /3 −1 − jπ /3 −1 (1− 0. -0. JH McClellan & RW Schafer h[n] = (0. -2:19.81 ]. -0.9z + 0. [ 1. filter( bb.9. aa. (nn==0) ).9) n 1 ( e jπ n / 3 + e − jπ n / 3 )u[n ] 3 2 h[n]: Decays & Oscillates “PERIOD”=6 H(z) = 0.9)n cos( π n )u[n ] = (0.45z −1 H(z) = −1 −2 1− 0.81z © 2003.45z−1 −1 −2 1 − 0.9z + 0.

9)n cos( π n)u[n] 3 4/18/2004 © 2003. JH McClellan & RW Schafer 14 4/18/2004 © 2003.81z 17 .45z−1 −1 −2 1 − 0.Complex POLE-ZERO PLOT 1− z −2 −2 1 + 0. JH McClellan & RW Schafer 1 − 0. JH McClellan & RW Schafer 15 FREQUENCY RESPONSE from POLE-ZERO PLOT 1− e H(e ) = ˆ − j 2ω 1+ 0.9z + 0.7225z UNIT CIRCLE MAPPING BETWEEN ˆ z and ω z=e z=1 ↔ ˆ jω ˆ ω=0 ˆ z = −1 ↔ ω = ±π ˆ z = ±j ↔ ω = ± 1π 2 4/18/2004 © 2003. JH McClellan & RW Schafer 16 4/18/2004 © 2003.7225e ˆ jω ˆ − j 2ω h[n]: Decays & Oscillates “PERIOD”=6 h[n] = (0.

9025z 19 Complex POLE-ZERO PLOT 3 DOMAINS MOVIE: IIR POLE MOVES H(z) H(ω) ω 1− 0. JH McClellan & RW Schafer 1− 0. JH McClellan & RW Schafer −1 h[n] = (0.8227z−1 1 −1.9z + 0. JH McClellan & RW Schafer 21 .45z −1 −2 1 − 0. JH McClellan & RW Schafer h[n] 20 4/18/2004 © 2003.95)n cos( π n)u[n] 6 18 4/18/2004 © 2003.8227z−1 −1 −2 1 −1.Complex POLE-ZERO PLOT h[n]: Decays & Oscillates “PERIOD”=12 1 − 0.81z 4/18/2004 © 2003.9025z−2 4/18/2004 © 2003.6454z−1 + 0.6454z + 0.

8z −1   1 − z −1  Step Response 20 25 9 9 Y(z) = −1 + 1 + . JH McClellan & RW Schafer 27 28 .8z −1 1 − z −1 © 2003.2π ) = 22 4/18/2004 5 = 2.8z 1 − z −1 20 25 y[n] = (−. y[n] When 5 1+ 0.8B − A)z −1 Y(z) = −1 + −1 = 1 + .2π © 2003.8z Given: H(z) = H(z) = Find the output.919e j 0.8z −1 x[n] = cos(0.2π n + ψ ) H (e j 0.2π n) y[n] = M cos(0.8)n u[n] + u[n] 9 9 25 y[n] → as n → ∞ 9 4/18/2004 © 2003.2π n) x[n] = u[n] x[n] = cos(0. JH McClellan & RW Schafer 23 Step Response 5  1  Y(z) = H(z)X(z) =   1 + . JH McClellan & RW Schafer 4/18/2004 © 2003.THREE INPUTS Given: SINUSOID ANSWER 5 −1 1+ 0.8z 1− z 1 + .2π n)u[n] The input: Then y[n] x[n] = cos(0.8B − A) = 0 Y(z) = 4/18/2004 ( )( ) A B + 1 + . JH McClellan & RW Schafer A B (A + B) + (.089π 1 + 0.8z −1 1 − z −1 Partial Fraction Expansion ⇒ (A + B) = 5 and (.8e − j 0.

& suff. condition: SINUSOID starting at n=0 n=−∞ ∑ h[n] < ∞ ∞ We’ll look at an example in MATLAB cos(0.2πn) π Pole at –0.8) n h[n] = b(a)n u[n] ⇔ H(z) = b 1 − az −1 There are two components: TRANSIENT Start-up region just after n=0. y[n] looks sinusoidal. (–0. JH McClellan & RW Schafer 31 4/18/2004 © 2003.2π n)u[n] (−0.Stability Nec.8)n When Does the TRANSIENT DIE OUT ? ˆ ω0 = 2π 10 need a1 < 1 4/18/2004 © 2003. JH McClellan & RW Schafer 32 . JH McClellan & RW Schafer 4/18/2004 30 STABILITY Cosine input cos(0. JH McClellan & RW Schafer ∞ n STEADY-STATE Pole must be Inside unit circle 29 4/18/2004 Eventually.8) n n=0 ∑ b a < ∞ if a < 1 ⇒ © 2003.8. so an is (–0. Magnitude & Phase from Frequency Response © 2003.

5π ) The input is Then find y[n] y[ n ] = ? © 2003.STABILITY CONDITION ALL POLES INSIDE the UNIT CIRCLE UNSTABLE EXAMPLE: POLE @ z=1. JH McClellan & RW Schafer 4/18/2004 © 2003.8z x[n ] = 4 cos(π n − 0. JH McClellan & RW Schafer 33 4/18/2004 34 .1 x[n] = cos(0.2πn)u[n] BONUS QUESTION Given: 5 H(z) = −1 1+ 0.

all Next Lecture: Chapter 9. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES Bye bye to D-T Systems for a while The UNIT IMPULSE signal Definition Properties D-T Filtering of C-T Signals x(t) C-to-D LTI System H(z) D-to-C y(t) Continuous-time signals and systems Example systems Review: Linearity and Time-Invariance Convolution integral: impulse response 4/3/2006 © 2003-2006. Sects 9-1 to 9-5 Lecture 19 Continuous-Time Signals and Systems Other Reading: Recitation: Ch. JH McClellan & RW Schafer 5 . JH McClellan & RW Schafer ˆ ω = ω Ts x(t) ˆ or ω = ω fs y(t) LTI ANALOG System 4 4/3/2006 © 2003-2006.Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 9. Sects 9-6 to 9-8 4/3/2006 © 2003-2006. 9.

g.ANALOG SIGNALS x(t) INFINITE LENGTH SINUSOIDS: (t = time in secs) PERIODIC SIGNALS CT Signals: PERIODIC x(t) = 10cos(200π t) Sinusoidal signal ONE-SIDED. JH McClellan & RW Schafer Square Wave 7 © 2003-2006. JH McClellan & RW Schafer “Suddenly applied” Exponential 8 4/3/2006 © 2003-2006. for t>0 UNIT STEP: u(t) FINITE LENGTH SQUARE PULSE IMPULSE SIGNAL: δ(t) INFINITE DURATION 6 4/3/2006 DISCRETE-TIME: x[n] is list of numbers 4/3/2006 © 2003-2006.. JH McClellan & RW Schafer Sinusoid multiplied by a square pulse 9 . JH McClellan & RW Schafer CT Signals: ONE-SIDED ⎧1 t > 0 u(t) = ⎨ ⎩0 t < 0 CT Signals: FINITE LENGTH p(t) = u(t − 2) − u(t − 4) Square Pulse signal Unit step signal One-Sided Sinusoid v(t) = e −t u(t) 4/3/2006 © 2003-2006. e.

t ≠ 0 ∞ −∞ ∫ δ (τ )dτ = 1 Unit area © 2003-2006. JH McClellan & RW Schafer 4/3/2006 © 2003-2006. JH McClellan & RW Schafer 13 . JH McClellan & RW Schafer 12 4/3/2006 © 2003-2006. JH McClellan & RW Schafer 10 4/3/2006 11 Sampling Property f (t)δ Δ (t) ≈ f (0)δ Δ (t) General Sampling Property f (t)δ (t − t0 ) = f (t0 )δ (t − t0 ) f (t)δ (t) = f (0)δ (t) 4/3/2006 © 2003-2006.What is an Impulse? A signal that is “concentrated” at one point. ∞ Defining the Impulse Assume the properties apply to the limit: Δ→0 −∞ ∫ δ Δ (t)dt = 1 Δ→0 lim δ Δ (t) = δ (t) lim δ Δ (t) = δ (t) Concentrated at t=0 One “INTUITIVE” definition is: δ (t) = 0.

. h(t). t ≠ t0 ∞ −∞ Concentrated at one time ∫ δ (t − t 0 )dt = 1 Unit area Sampling Property x(t) Delay y(t) f (t)δ (t − t 0 ) = f (t 0 )δ (t − t 0 ) ∞ −∞ Examples: y(t) = x(t − t d ) y(t) = [A + x(t)]cos ω c t y(t) = ∫ x(τ )dτ −∞ © 2003-2006.g. JH McClellan & RW Schafer 17 . JH McClellan & RW Schafer 14 4/3/2006 15 CT BUILDING BLOCKS INTEGRATOR (CIRCUITS) DIFFERENTIATOR DELAY by to MODULATOR (e. JH McClellan & RW Schafer ∫ f (t)δ (t − t0 )dt = f (t0 ) Extract one value of f(t) Modulator Integrator 4/3/2006 du(t) = δ (t) dt t Derivative of unit step © 2003-2006. AM Radio) MULTIPLIER & ADDER 4/3/2006 © 2003-2006. so h(t) = δ (t − td ) 16 4/3/2006 © 2003-2006.Properties of the Impulse Continuous-Time Systems Output Input δ (t − t0 ) = 0. let x(t) be an impulse. JH McClellan & RW Schafer Ideal Delay: Mathematical Definition: y(t) = x(t − t d ) To find the IMPULSE RESPONSE.

JH McClellan & RW Schafer t 19 Integrator: t y(t) = ∫ x(τ )dτ −∞ t Graphical Representation δ (t) = du(t) dt Integrate the impulse −∞ ∫ δ (τ )dτ = u(t) IF t<0. let x(t) be an impulse.Output of Ideal Delay of 1 sec x(t) = e −t u(t) Integrator: Mathematical Definition: t y(t) = ∫ x(τ )dτ Running Integral y(t) = x(t −1) = e−(t−1)u(t − 1) −∞ To find the IMPULSE RESPONSE. we get one Thus we have h(t) = u(t) for the integrator 4/3/2006 © 2003-2006. h(t). so h(t) = 4/3/2006 © 2003-2006. JH McClellan & RW Schafer −∞ 18 4/3/2006 ∫ δ (τ )dτ = u(t) © 2003-2006. we get zero IF t>0. JH McClellan & RW Schafer t ⎧1 t > 0 u(t) = ∫ δ (τ )dτ = ⎨ ⎩0 t < 0 −∞ 20 4/3/2006 © 2003-2006. JH McClellan & RW Schafer 21 .

Output of Integrator y (t ) = ∫ x (τ )dτ x (t ) = e −0. let x(t) be an impulse. JH McClellan & RW Schafer 25 .8t t Differentiator: Mathematical Definition: u (t ) = x (t ) ∗ u (t ) −∞ y(t) = y (t ) = ∫ e −0. so 4/3/2006 © 2003-2006.8t )u (t ) 22 h(t) = 4/3/2006 dδ (t) = δ (1) (t) dt © 2003-2006. JH McClellan & RW Schafer 0 t<0 ⎧ ⎪t = ⎨ e −0. 24 4/3/2006 © 2003-2006. then the output y(t) is related to the input x(t) by a convolution integral y(t) = ∫ x(τ )h(t − τ )dτ = x(t) ∗ h(t) d −2( t −1) y (t ) = e u(t − 1) dt = −2e −2( t −1)u (t − 1) + e −2( t −1)δ (t − 1) 4/3/2006 ∞ ( ) −∞ where h(t) is the impulse response of the system.25(1 − e −0. JH McClellan & RW Schafer Doublet 23 dx(t) y(t) = Differentiator Output: dt x (t ) = e −2( t −1)u(t − 1) Linear and Time-Invariant (LTI) Systems If a continuous-time system is both linear and time-invariant.8τ u (τ )dτ −∞ t dx(t) dt To find h(t).8τ u (τ )dτ t ≥ 0 ⎪∫ ⎩0 = 1. JH McClellan & RW Schafer = −2e −2( t −1)u (t − 1) + 1δ (t − 1) © 2003-2006.

JH McClellan & RW Schafer 26 4/3/2006 © 2003-2006. JH McClellan & RW Schafer 30 .t0 ) 29 w(t) = [A + x(t − t0 )]cos ω c t ≠ y(t − t0 ) 4/3/2006 © 2003-2006. JH McClellan & RW Schafer © 2003-2006.Testing for Linearity x1 (t) x2 (t) x1 (t) x(t) x2 (t) y(t) y1 (t) w(t) y2 (t) w(t) Testing Time-Invariance x(t − t0 ) t0 y(t) y(t) t 0 y(t − t ) 0 w(t) y(t − t0 ) x(t) w(t) 4/3/2006 © 2003-2006. JH McClellan & RW Schafer 27 Integrator: Linear −∞ t y(t) = ∫ x(τ )dτ −∞ t Modulator: y(t) = [A + x(t)]cos ω c t Not linear--obvious because ∫ [ax1 (τ ) + bx2 (τ )]dτ = ay1 (t) + by2 (t) [A + ax1 (t) + bx2 (t)] ≠ [A + ax1 (t)] + [A + bx2 (t)] Not time-invariant And Time-Invariant w(t) = −∞ ∫ x(τ − t )dτ 0 t−t 0 −∞ t let σ = τ − t 0 ⇒ w(t) = 4/3/2006 ∫ x(σ )dσ = y(t .

Sects.Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 9. and 9-8 Lecture 20 Convolution (Continuous-Time) Other Reading: Recitation: Ch. then the output y(t) is related to the input x(t) by a convolution integral LTI Systems Stability and causality Cascade and parallel connections 11/3/2003 © 2003. JH McClellan & RW Schafer 1 11/3/2003 © 2003. JH McClellan & RW Schafer where h(t) is the impulse response of the system. 9. JH McClellan & RW Schafer y (t ) = ∞ −∞ ∫ x(τ )h(t − τ )dτ = x(t ) ∗ h(t ) © 2003. 9-7. 4 11/3/2003 5 . 9-6. all Next Lecture: Start reading Chapter 10 11/3/2003 © 2003. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES Review of C-T LTI systems Evaluating convolutions Examples Impulses Linear and Time-Invariant (LTI) Systems If a continuous-time system is both linear and time-invariant.

JH McClellan & RW Schafer 6 11/3/2003 © 2003.Testing for Linearity x1 (t) x2 (t) x1 (t) x(t) Testing Time-Invariance w(t) x(t) y1 (t) y2 (t) x(t − t0 ) t0 y(t) w(t) w(t) y(t − t0 ) w(t) y(t) x2 (t) y(t) t 0 y(t − t ) 0 11/3/2003 © 2003. JH McClellan & RW Schafer 7 Ideal Delay: Linear y ( t ) = x ( t − td ) Integrator: Linear t y (t ) = t −∞ ∫ x(τ )dτ t −∞ t ax1 (t − td ) + bx2 (t − td ) = ay1 (t ) + by2 (t ) and Time-Invariant −∞ ∫ [ax1(τ ) + bx2 (τ )]dτ = ∫ ax1(τ )dτ + ∫ bx2 (τ )dτ = ay1 (t ) + by2 (t ) −∞ w(t ) = x ((t − td ) − t0 ) y (t − t0 ) = x ((t − t0 ) − td ) 11/3/2003 © 2003. JH McClellan & RW Schafer And Time-Invariant w(t ) = −∞ ∫ x(τ − t0 )dτ t −t0 t Let σ = τ − t0 ⇒ w( t ) = 8 11/3/2003 −© 2003. JH McClellan & RW Schafer ∞ ∫ x(σ )dσ = y (t − t0 ) 9 .

Convolution of two impulses Evaluating a Convolution x (t ) = u(t − 1) h (t ) = e − t u (t ) δ (t − t1 ) ∗ δ (t − t2 ) = δ (t − t1 − t2 ) Convolution of step and shifted impulse u(t ) ∗ δ (t − t0 ) = u(t − t0 ) 11/3/2003 © 2003. then the output y(t) is related to the input x(t) by a convolution integral Not linear--obvious because [ A + ax1 (t ) + bx2 (t )] ≠ [ A + ax1 (t )] + [ A + bx2 (t )] Not time-invariant y (t ) = ∞ w(t ) = [ A + x (t − t0 )] cos ω ct ≠ y (t − t0 ) 11/3/2003 © 2003. 10 11/3/2003 11 Convolution of Impulses. JH McClellan & RW Schafer y (t ) = 12 11/3/2003 ∞ −∞ ∫ h(τ ) x(t − τ )dτ = h(t ) ∗ x(t ) © 2003. JH McClellan & RW Schafer −∞ ∫ x(τ )h(t − τ )dτ = x(t ) ∗ h(t ) © 2003. JH McClellan & RW Schafer where h(t) is the impulse response of the system. JH McClellan & RW Schafer 13 .Modulator: y (t ) = [ A + x (t )] cos ω c t Linear and Time-Invariant (LTI) Systems If a continuous-time system is both linear and time-invariant. etc.

JH McClellan & RW Schafer 16 11/3/2003 © 2003. JH McClellan & RW Schafer Solution y (t ) = = t −1 Convolution GUI ∫ 0 e −τ dτ = − e −τ t −1 0 1 − e −( t −1) t ≥1 y (t ) = 0 11/3/2003 t<1 © 2003.“Flipping and Shifting” x (τ ) Evaluating the Integral “flipping” g(τ ) = x(−τ ) = u(− τ −1) “flipping and shifting” g(τ − t) = x(−(τ − t)) = x(t − τ ) © 2003. JH McClellan & RW Schafer 17 . JH McClellan & RW Schafer 11/3/2003 t −1 t 14 11/3/2003  0 t −1 y (t ) =  −τ e dτ ∫ 0 t −1 < 0 t −1 > 0 15 © 2003.

JH McClellan & RW Schafer h(t ) ∗ x(t ) = − ∫ h(t − σ ) x(σ )dσ = 20 11/3/2003 ∞ −∞ ∫ h(t − σ ) x(σ )dσ = x(t ) ∗ h(t ) © 2003.General Convolution Example x (t ) = e − at u(t ) y (t ) = ∞ ∞ Special Case: u(t) x (t ) = e − at u(t ). JH McClellan & RW Schafer 21 . JH McClellan & RW Schafer 19 Convolve Unit Steps x (t ) = u (t ) h (t ) = u (t ) ∞ Convolution is Commutative h(t ) ∗ x(t ) = ∞ −∞ ∫ h(τ ) x(t − τ )dτ −∞ y (t ) = ∞ −∞ ∫ x(τ )h(t − τ )dτ = x(t ) ∗ h(t ) let σ = t − τ and dσ = −dτ ∞ 11/3/2003 t  1 dτ t > 0 = ∫ u(τ )u(t − τ )dτ =  ∫ 0  0 −∞ t<0  t t > 0  = = t u (t ) Unit Ramp 0 t < 0  © 2003. b ≠ a h (t ) = u (t ) −∞ ∫ x(τ )h(t − τ )dτ = x(t ) ∗ h(t ) u(τ )e −b ( t −τ ) y (t ) = t ∞ = −∞ ∫e −aτ  −bt −aτ bτ e ∫ e e dτ u ( t − τ ) dτ =  0  0  = e −at − e −bt u (t ) b−a t>0 t<0 = 1 (1 − e −at )u(t ) a −∞ ∫ x(τ )h(t − τ )dτ = x(t ) ∗ h(t )  e −at − e −bt  =  −a+b  0  11/3/2003 t>0 t<0 © 2003. JH McClellan & RW Schafer 18 11/3/2003 if a = 2 1 y (t ) = (1 − e −2t )u(t ) 2 © 2003. a ≠ 0 h(t ) = e − bt u(t ).

JH McClellan & RW Schafer 25 . An LTI system is causal if and only if Convolution is Linear Substitute x(t)=ax1(t)+bx2(t) y (t ) = ∫ [ax1 (τ ) + bx2 (τ )]h(t − τ )dτ = a ∫ x1 (τ )h(t − τ )dτ + b ∫ x2 (τ )h(t − τ )dτ = ay1 (t ) + by2 (t ) −∞ −∞ −∞ ∞ ∞ ∞ h(t ) = 0 for t < 0 11/3/2003 © 2003.Cascade of LTI Systems δ (t) h1 (t) h1 (t) ∗ h2 (t) Stability A system is stable if every bounded input produces a bounded output. A continuous-time LTI system is stable if and only if h(t) = h1 (t) ∗ h2 (t) = h2 (t) ∗ h1(t) ∞ δ (t) 11/3/2003 h2 (t) © 2003. convolution is linear. JH McClellan & RW Schafer Therefore. JH McClellan & RW Schafer 23 Causal Systems A system is causal if and only if y(t0) depends only on x(τ) for τ< t0 . 24 11/3/2003 © 2003. JH McClellan & RW Schafer h2 (t) ∗ h1(t) 22 11/3/2003 −∞ ∫ h(t) dt < ∞ © 2003.

Convolution is Time-Invariant Substitute x(t-t0) w(t) = = −∞ ∞ ∫ h(τ )x((t − τ ) − t )dτ o ∞ −∞ ∫ h(τ )x((t − t o ) − τ )dτ = y(t − to ) 11/3/2003 © 2003. JH McClellan & RW Schafer 26 .

all Lecture 21 Frequency Response of Continuous-Time Systems Other Reading: Recitation: Ch. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES Review of convolution THE operation for LTI Systems LTI Systems Complex exponential input signals Frequency Response Cosine signals Real part of complex exponential Convolution defines an LTI system ∞ Fourier Series thru H(jω) These are Analog Filters y(t) = h(t)∗ x(t) = −∞ ∫ h(τ )x(t − τ )dτ 5 Response to a complex exponential gives frequency response H(jω) 4 4/3/2006 © 2003-2006. JH McClellan & RW Schafer 4/3/2006 © 2003-2006. start Ch 11 Next Lecture: Chapter 11 4/3/2006 © 2003-2006. JH McClellan & RW Schafer .Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 10. 10 all.

JH McClellan & RW Schafer −∞ − jωτ ∫ h(τ )e dτ Frequency Response 8 −∞ Thus the frequency response exists if the LTI system is a stable system.Thought Process #1 SUPERPOSITION (Linearity) Make x(t) a weighted sum of signals Then y(t) is also a sum—same weights • But DIFFERENT OUTPUT SIGNALS usually Thought Process #2 SUPERPOSITION (Linearity) Make x(t) a weighted sum of signals Use SINUSOIDS Any x(t) = weighted sum of sinusoids HOW? Use FOURIER ANALYSIS INTEGRAL To find the weights from x(t) Use SINUSOIDS • “SINUSOID IN GIVES SINUSOID OUT” Make x(t) a weighted sum of sinusoids Then y(t) is also a sum of sinusoids Different Magnitudes and Phase LTI SYSTEMS: Frequency Response changes each sinusoidal component LTI SYSTEMS: Sinusoidal Response 4/3/2006 © 2003-2006. 4/3/2006 © 2003-2006. JH McClellan & RW Schafer H( jω ) ≤ ∫ h(τ )dτ < ∞ ∞ 9 . JH McClellan & RW Schafer 7 Complex Exponential Input x (t ) = Ae jϕ e jω t ∞ When does H(jω) Exist? When is y (t ) = H ( jω ) Ae jϕ e jω t jϕ H( jω ) < ∞ −∞ ? y (t ) = −∞ ∫ h(τ ) Ae ∞ e jω ( t −τ ) dτ H( j ω ) = ∫ h(τ )e ∞ − jωτ dτ ≤ ⎛ ⎞ y (t ) = ⎜ ∫ h(τ )e − jωτ dτ ⎟ Ae jϕ e jω t ⎜ ⎟ ⎝ −∞ ⎠ −∞ ∫ ∞ h(τ ) e − jωτ dτ H ( jω ) = 4/3/2006 ∞ © 2003-2006. JH McClellan & RW Schafer 6 4/3/2006 © 2003-2006.

JH McClellan & RW Schafer H( jω ) = e x (t ) = e jω t 4/3/2006 − jω td H( jω ) © 2003-2006. JH McClellan & RW Schafer 11 Freq Response of Integrator? Impulse Response h(t) = u(t) Ideal Delay: ∞ y(t) = x(t − t d ) d H( jω ) = NOT a Stable System Frequency response H(jω) does NOT exist −∞ δ (τ − t d )e − jωτ dτ = e − jωt ∫ 1 1 h(t) = e − at u(t) ⇔ H( jω ) = → ? a + jω jω Need another term “Leaky” Integrator (a is small) Cannot build a perfect Integral 4/3/2006 © 2003-2006. JH McClellan & RW Schafer a →0 12 y (t ) = e jω ( t −td ) = e − jω td e jω t ( ) 13 . JH McClellan & RW Schafer ∞ 4/3/2006 10 H(− jω ) = H ∗ ( jω ) 4/3/2006 © 2003-2006.h(t) = e − at u(t) ⇔ H( jω ) = Suppose that h(t) is: 1 a + jω Magnitude and Phase Plots a=1 ∞ h(t) = e u(t) −t H( jω ) = 1 1 + jω 1 1 = 1 + jω 1+ω2 H( jω ) = a>0 −∞ ∫e − aτ u(τ )e ∞ − jωτ dτ = ∫ e −(a+ jω) τ dτ 0 ∞ ∠H( jω ) = −atan(ω ) e −(a+ jω) τ e − aτ e− jωτ 1 H( jω ) = = = −(a + jω ) 0 −(a + jω ) 0 a + jω © 2003-2006.

5)10e jπ / 3e j1. JH McClellan & RW Schafer 14 4/3/2006 © 2003-2006.5(t −3) 4/3/2006 © 2003-2006. JH McClellan & RW Schafer 15 Example: Ideal Low Pass Cosine Input A jφ jω 0 t A − jφ − jω 0 t e e + e e 2 2 A A y(t) = H( jω 0 ) e jφ e jω 0 t + H(− jω 0 ) e − jφ e − jω0 t 2 2 x(t) = Acos(ω 0 t + φ ) = ⎧e − j 3ω HLP ( jω ) = ⎨ ⎩ 0 x(t ) = 10e jπ / 3e j1. JH McClellan & RW Schafer 16 17 .5t = 10e jπ / 3e j1.5t y (t ) = e − j 4. JH McClellan & RW Schafer ( ) Since H(− jω 0 ) = H (j ω 0 ) ∗ y(t) = A H( jω 0 ) cos(ω 0 t + φ + ∠H( jω 0 )) 4/3/2006 © 2003-2006.5t ω <2 ω >2 y (t ) = H ( j1." ω Linear Phase ω 4/3/2006 © 2003-2006.Ideal Lowpass Filter w/ Delay ⎧e − jω td HLP ( jω ) = ⎨ ⎩ 0 Magnitude Sinusoid in Gives Sinusoid out ω < ω co ω > ω co fco "cutoff freq.5 10e jπ / 3e j1.

JH McClellan & RW Schafer © e − jω 0 kt − − j ω 0 kT0 T 0 /2 1− e − jπk = j πk 20 4/3/2006 © 2003-2006.Review Fourier Series ANALYSIS Get representation from the signal Works for PERIODIC Signals General Periodic Signals x(t) = x(t + T0 ) Fourier Series INTEGRAL over one period −2T0 −T0 0 1 ak = T0 4/3/2006 T0 x(t) = ∫ x(t)e 0 − jω 0 kt dt 18 4/3/2006 k =−∞ ∑ 0 ∞ T0 2T0 t a ke j ω 0 k t − jω 0 kt Fourier Synthesis © 2003-2006. JH McClellan & RW Schafer 1 ak = T0 T0 ∫ x(t)e Fundamental Freq. JH McClellan & RW Schafer Square Wave Signal x(t) = x(t + T0 ) −2T0 −T0 Spectrum from Fourier Series 2 1 − e − jπk ⎧ ⎪ ak = = ⎨ jπ k jπ k ⎪ 0 ⎩ k = ±1.… k = 0.… ω 0 = 2π (25) 0 T0 T0 2T0 t ak = 1 T0 T0 / 2 ∫ 0 (1)e − jω0 kt dt + 1 − jω kt (−1)e 0 dt T0 T0∫/ 2 T0 4/3/2006 e − jω0 kt ak = − jω 0 kT0 T0 / 2 0 2003-2006.±3. JH McClellan & RW Schafer 21 . ±4. ω 0 = 2π / T0 = 2πf 0 Fourier Analysis 19 dt © 2003-2006. ±2.

JH McClellan & RW Schafer 23 Ideal Lowpass Filter (200 Hz) ⎧1 ω < ω co H( jω ) = ⎨ ⎩0 ω > ω co Ideal Bandpass Filter ⎧1 H( jω ) = ⎨ ⎩0 Passband ω ± ωc < 1 ωB 2 elsewhere fco "cutoff" Passband y(t) = 4 π sin(50πt ) + 4 4 4 sin (150πt ) + sin(250πt ) + sin(350πt ) 3π 5π 7π What is the ouput signal ? y(t) = 4/3/2006 © 2003-2006. JH McClellan & RW Schafer . Output has same frequencies k= −∞ ∑a ∞ k = k = −∞ ∑ ∞ y(t) = 4 b ke jω 0 k t π sin(50πt ) + 4 sin (150πt ) 3π 4/3/2006 bk = ak H( jω 0 k) © 2003-2006. JH McClellan & RW Schafer 2 j 7π e j 2 π (175)t − 2 j 7π e − j 2 π (175)t = 4 cos(2π (175)t − 1 π ) 2 7π 25 24 4/3/2006 © 2003-2006." By superposition.LTI Systems with Periodic Inputs jω0 kt Ideal Lowpass Filter (100 Hz) ⎧1 ω < ω co H( jω ) = ⎨ ⎩0 ω > ω co jω 0 kt ak e y(t) = H( jω 0 k )ake H( jω 0 k )e jω 0 k t fco "cutoff freq. JH McClellan & RW Schafer 22 4/3/2006 © 2003-2006.

Example x(t) = H( jω ) = e jω 0 k t − jω td k =−∞ ∑ ∞ a ke y(t) = k = −∞ ∑ ∞ bk e jω 0 k t bk = ak H( jω 0 k) = ak e y(t) = k= −∞ − jω 0 k t d ∑ae k ∞ − jω 0 k td e jω 0 k t = k =−∞ ∑ ∞ ak e jω 0 k ( t −td ) 4/3/2006 ∴ y(t) = x(t − t d ) © 2003-2006. JH McClellan & RW Schafer 26 .

JH McClellan & RW Schafer dt infinity Relation to Fourier Series Examples of Fourier transform pairs 3/27/2004 © 2003. 10 And Chapter 11.Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 11. Sects. Sects. 11-6 3/27/2004 © 2003. Sects. 11-5. JH McClellan & RW Schafer 1 3/27/2004 © 2003. JH McClellan & RW Schafer 5 . 11-1 to 11-4 Lecture 22 Introduction to the Fourier Transform Other Reading: Recitation: Ch. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES Review Frequency Response Fourier Series Everything = Sum of Sinusoids One Square Pulse = Sum of Sinusoids ??????????? Definition of Fourier transform X ( jω ) = ∞ −∞ ∫ x (t )e − jω t Finite Length Not Periodic Limit of Square Wave as Period Intuitive Argument 4 3/27/2004 © 2003. 11-1 to 11-4 Next Lecture: Chapter 11.

±4. JH McClellan & RW Schafer 8 3/27/2004 © 2003.Fourier Series: Periodic x(t) x(t) = x(t + T0 ) Square Wave Signal x(t) = x(t + T0 ) −2T0 −T0 0 T0 2T0 t −2T0 −T0 T0 / 4 0 T0 2T0 t x(t) = 1 ak = T0 k =−∞ T0 / 2 ∑ ∞ a ke jω 0 k t Fourier Synthesis 3/27/2004 −T0 / 2 ∫ x(t)e − jω0 kt dt Fundamental Freq. JH McClellan & RW Schafer 9 .…  What if x(t) is not periodic? Sum of Sinusoids? Non-harmonically related sinusoids Would not be periodic. JH McClellan & RW Schafer e − jω0 kt ak = − jω 0 kT0 3/27/2004 −T0 /4 2003.±1. !!!!!!!!! 3/27/2004 © 2003. but would probably be non-zero for all t. ω 0 = 2π / T0 = 2πf0 Fourier Analysis 6 1 ak = T0 −T0 / 4 (1)e − jω0k t dt ∫ T0 / 4 © 2003. JH McClellan & RW Schafer © e − jπk / 2 − e jπk / 2 sin(π k / 2) = = − j2π k πk 7 Spectrum from Fourier Series sin(π k / 2) ≠ 0 k = 0.…  ak = = πk 0 k = ±2.±3. Fourier transform gives a “sum” (actually an integral) that integral involves ALL frequencies can represent signals that are identically zero for negative t.

JH McClellan & RW Schafer 13 . JH McClellan & RW Schafer T0=8T 10 3/27/2004 © 2003. JH McClellan & RW Schafer 11 FS in the LIMIT (long period) xT0 (t ) = 1 2π k = −∞ ∑ (T0ak )e jω kt (2Tπ ) ∞ 0 0 x (t ) = ∞ 1 2π Fourier Transform Defined For non-periodic signals ∞ 1 2π −∞ ∫ X ( jω )e jωt dω Fourier Synthesis 2π 2π k =ω lim = dω lim T →∞ T T0 →∞ T 0 0 0 T0 →∞ lim T0ak = X ( jω ) ∞ x (t ) = dt −∞ ∫ X ( jω )e ∞ jω t Fourier Synthesis dω Fourier Analysis T0 / 2 T0ak = −T0 / 2 3/27/2004 ∫ xT (t )e 0 − jω 0kt dt X ( jω ) = −∞ ∫ x (t )e − jωt X ( jω ) = 3/27/2004 Fourier Analysis © 2003.Limiting Behavior of FS T0=2T Limiting Behavior of Spectrum T0=2T T0=4T T0=4T Plot (T0ak ) T0=8T 3/27/2004 © 2003. JH McClellan & RW Schafer −∞ 12 x (t )e − jω t dt ∫ © 2003.

JH McClellan & RW Schafer sin(ωT / 2) (ω / 2) 17 16 3/27/2004 © 2003. JH McClellan & RW Schafer Magnitude and Phase Plots 1 H ( jω ) = a + jω 1 = a + jω 1 a2 + ω 2 Example 2: X( jω ) = ∫ (1)e −T / 2 T /2 1 x(t) =  0 − jω t t <T /2 t >T /2 T /2 dt = ∫ e− jω t dt −T / 2 ω  ∠H ( jω ) = − tan −1   a e − jω t X( jω ) = − jω T /2 −T / 2 e− jω T / 2 − e jω T /2 = − jω H ( − jω ) = H ∗ ( jω ) 3/27/2004 X( jω ) = © 2003.Example 1: X( jω ) = ∫ e 0 ∞ −at x(t) = e −at u(t) Frequency Response dt a>0 Fourier Transform of h(t) is the Frequency Response h (t ) = e − t u (t ) e − jω t dt = ∫ e 0 ∞ − (a+ jω )t X( jω ) = − e e a + jω −at − jω t ∞ 0 = 1 a + jω X( jω ) = 3/27/2004 1 a + jω 14 3/27/2004 h(t ) = e −t u(t ) ⇔ H ( jω ) = © 2003. JH McClellan & RW Schafer . JH McClellan & RW Schafer 1 1 + jω 15 © 2003.

JH McClellan & RW Schafer 21 .1 x(t) =  0 t <T /2 t >T /2 ⇔ X( jω ) = sin(ωT / 2) (ω / 2 ) Example 3: 1 x (t ) = 2π ∞ 1 ω < ωb  X ( jω ) =  0 ω > ω b  ωb 1 X ( jω )e jω t dω = ∫ 2π −∞ jω t ω b −ω b −ω b 1 e jω t dω ∫ 1 e x (t ) = 2π jt 1 e jωb t − e − jωb t = 2π jt sin(ωbt ) πt x (t ) = 3/27/2004 © 2003. JH McClellan & RW Schafer ∞ 20 3/27/2004 © 2003. JH McClellan & RW Schafer 19 sin(ωbt ) x (t ) = πt ⇔ 1 ω < ωb  X ( jω ) =  0 ω > ωb  Example 4: ∞ x (t ) = δ (t − t0 ) X( jω ) = ∫ δ (t)e− jω t dt = 1 −∞ Shifting Property of the Impulse X ( jω ) = ∫ δ (t − t0 )e − jω t dt = e − jω t0 −∞ 3/27/2004 © 2003. JH McClellan & RW Schafer 18 3/27/2004 © 2003.

JH McClellan & RW Schafer 23 x(t) = cos(ω 0 t) ⇔ X( jω ) = πδ (ω − ω 0 ) + πδ (ω + ω 0 ) Table of Fourier Transforms 1 a + jω sin(ωT / 2) 1 t < T / 2 ⇔ X( jω ) = x(t) =  (ω / 2 ) 0 t > T / 2 x(t) = e −at u(t) ⇔ X( jω ) = x(t) = sin(ω 0 t) ⇔ (π t ) 1 ω < ω 0 X( jω ) =  0 ω > ω 0 x(t) = δ (t − t0 ) ⇔ X( jω ) = e− jω t 0 3/27/2004 © 2003. JH McClellan & RW Schafer 22 3/27/2004 X( jω ) = πδ (ω − ω 0 ) + πδ (ω + ω 0 ) © 2003. JH McClellan & RW Schafer 24 3/27/2004 x(t) = e jω 0 t ⇔ X( jω ) = 2πδ (ω − ω 0 ) © 2003. JH McClellan & RW Schafer 25 .x(t) = δ (t) ⇔ X( jω ) = 1 Example 5: X( jω ) = 2πδ (ω − ω 0 ) x(t) = 1 2π ∞ jωt ∫ 2πδ (ω − ω 0 )e dω = e jω 0 t x(t) = e −∞ jω 0 t ⇔ X( jω ) = 2πδ (ω − ω 0 ) x(t) = 1 ⇔ X( jω ) = 2πδ (ω ) x(t) = cos(ω 0 t) ⇔ 3/27/2004 © 2003.

Sects. JH McClellan & RW Schafer 1 3/27/2004 © 2003. JH McClellan & RW Schafer X ( jω ) = −∞ ∫ x (t )e − jω t dt Fourier Analysis (Forward Transform) 4 Time . Sects. 11-5 to 11-9 Tables in Section 11-9 Lecture 23 Fourier Transform Properties Other Reading: Recitation: Chapter 11. 11-1 to 11-9 Next Lectures: Chapter 12 (Applications) 3/27/2004 © 2003.Domain x (t ) ⇔ X ( jω ) 3/27/2004 © 2003. JH McClellan & RW Schafer 3 LECTURE OBJECTIVES The Fourier transform Fourier Transform 1 x (t ) = 2π ∞ X ( jω ) = ∞ −∞ x (t )e − jω t dt ∫ −∞ X ( jω )e jω t dω ∫ ∞ Fourier Synthesis (Inverse Transform) More examples of Fourier transform pairs Basic properties of Fourier transforms Convolution property Multiplication property 3/27/2004 © 2003. JH McClellan & RW Schafer 5 .Domain ⇔ Frequency .Signal Processing First READING ASSIGNMENTS This Lecture: Chapter 11.

WHY use the Fourier transform? Manipulate the “Frequency Spectrum” Analog Communication Systems AM: Amplitude Modulation. JH McClellan & RW Schafer 1 1 + jω 7 1  x (t ) =  0  t <T /2 t > T /2 ⇔ X ( jω ) = sin(ωT / 2) ω /2 sin(ωbt ) x (t ) = πt ⇔ 1 ω < ωb  X ( jω ) =  0 ω > ωb  3/27/2004 © 2003. JH McClellan & RW Schafer h(t ) = e −t u(t ) ⇔ H ( jω ) = 6 3/27/2004 © 2003. FM What are the “Building Blocks” ? Abstract Layer. not implementation Frequency Response Fourier Transform of h(t) is the Frequency Response h (t ) = e − t u (t ) Ideal Filters: mostly BPFs Frequency Shifters aka Modulators. JH McClellan & RW Schafer 8 3/27/2004 © 2003. JH McClellan & RW Schafer 9 . Mixers or Multipliers: x(t)p(t) 3/27/2004 © 2003.

JH McClellan & RW Schafer X ( jω ) = 2πδ (ω − ω c ) x (t ) = cos(ω ct ) ⇔ X ( jω ) = πδ (ω − ω c ) + πδ (ω + ω c ) Fourier Transform of a General Periodic Signal If x(t) is periodic with period T0 . JH McClellan & RW Schafer X ( jω ) = e − jω t0 11 10 3/27/2004 x (t ) = e jωct ⇔ © 2003. JH McClellan & RW Schafer k = −∞ 12 3/27/2004 ∑ 2π akδ (ω − kω0 ) 13 ∞ © 2003.x (t ) = δ (t − t0 ) ⇔ t0 = 0 X ( jω ) = e − jω t0 Table of Fourier Transforms x ( t ) = e −t u ( t ) ⇔ 1  x (t ) =  0  t < T /2 t > T /2 ⇔ X ( jω ) = 1 1 + jω sin(ωT / 2) ω /2 X ( jω ) = sin(ωbt ) x (t ) = πt ⇔ 1 ω < ωb  X ( jω ) =  0 ω > ωb  x (t ) = δ (t − t0 ) ⇔ 3/27/2004 © 2003. JH McClellan & RW Schafer . ∞ x (t ) = k = −∞ ∑ ak e jkω 0 t 1 ak = T0 T0 0 ∫ x (t )e − jkω 0 t dt Therefore. since e jkω0t ⇔ 2πδ (ω − kω0 ) X ( jω ) = 3/27/2004 © 2003.

16 3/27/2004 1 2 X ( j ω ) expands 2 17 © 2003.Square Wave Signal x(t) = x(t + T0 ) −2T0 −T0 T0 / 2 Square Wave Fourier Transform x(t) = x(t + T0 ) T0 2T0 t −2T0 −T0 0 0 T0 T0 X( jω ) = ∞ 2T0 k t ) 1 ak = T0 ∫ 0 1 − jω kt − jω kt (1)e 0 dt + ∫/ 2 (−1)e 0 dt T0 T0 T0 / 2 k =−∞ ∑ 2π a δ (ω − k ω 0 3/27/2004 e − jω0 kt ak = − jω 0 kT0 0 © 2003. JH McClellan & RW Schafer . JH McClellan & RW Schafer 15 Table of Easy FT Properties Linearity Property Scaling Property x (at ) ⇔ ∞ ax1 (t) + bx2 (t) ⇔ aX1 ( jω ) + bX2 ( jω ) Delay Property 1 a X( jω) a − jω ( λ / a ) dλ a x(t − td ) ⇔ e Frequency Shifting − jω t d X( jω ) −∞ ∫ x(at )e − jω t dt = = ∞ −∞ 1 a ∫ x ( λ )e x(t)e Scaling 3/27/2004 jω 0 t ⇔ X( j(ω − ω 0 )) X( jω) a 1 x(at) ⇔ |a| X( j( ω )) a © 2003. JH McClellan & RW Schafer x ( 2t ) shrinks. JH McClellan & RW Schafer e − jω 0 kt 1− e − jπk − = − j ω 0 kT0 T0 /2 j πk T0 14 3/27/2004 © 2003.

JH McClellan & RW Schafer Cannot simultaneously reduce time duration and bandwidth 18 3/27/2004 © 2003. JH McClellan & RW Schafer 21 . JH McClellan & RW Schafer corresponds to MULTIPLICATION in the frequency-domain Y( jω ) = H( jω )X( jω ) 20 3/27/2004 © 2003. JH McClellan & RW Schafer 19 Significant FT Properties Convolution Property x(t) x(t) ∗ h(t) ⇔ H( jω )X( jω ) x(t)p(t) ⇔ 1 X( jω )∗ P( jω ) 2π x(t)e jω 0 t ⇔ X( j(ω − ω 0 )) y(t) = h(t) ∗ x(t) X( jω ) ∞ Y( jω ) = H( jω )X( jω ) y(t) = h(t) ∗ x(t) = ∫ h(τ )x(t − τ )dτ −∞ Convolution in the time-domain Differentiation Property 3/27/2004 dx(t) ⇔ ( jω )X( jω ) dt © 2003.Scaling Property x (at ) ⇔ 1 a X( jω) a Uncertainty Principle Try to make x(t) shorter Then X(jω) will get wider ω Narrow pulses have wide bandwidth Try to make X(jω) narrower ω Then x(t) will have longer duration x2 (t ) = x1 (2t ) 3/27/2004 © 2003.

JH McClellan & RW Schafer 22 3/27/2004 © 2003.Convolution Example Bandlimited Input Signal “sinc” function Ideally Bandlimited Signal sin(100π t ) x (t ) = πt ⇔ 1 ω < 100π  X ( jω ) =  0 ω > 100π  Ideal LPF (Lowpass Filter) h(t) is a “sinc” ωb = 100π Output is Bandlimited Convolve “sincs” 3/27/2004 © 2003. JH McClellan & RW Schafer 23 Convolution Example Cosine Input to LTI System Y (j ω ) = H( jω )X(j ω ) = H( jω )[πδ (ω − ω 0 ) + πδ (ω + ω 0 )] = H( jω 0 )πδ (ω − ω 0 ) + H(− jω 0 )πδ (ω + ω 0 ) x(t) ∗ h(t) ⇔ H( jω )X( jω ) sin(100π t) sin(200π t) sin(100π t) ∗ = πt πt πt y(t) = = = H (j ω 0 ) 1 e jω0 t + H(− j ω 0 ) 1 e − jω 0t 2 2 H( jω 0 ) 1 e 0 + H ( jω 0 ) 1 e 2 2 H( jω 0 ) cos(ω 0t + ∠H( jω 0 )) © 2003. JH McClellan & RW Schafer 24 3/27/2004 25 . JH McClellan & RW Schafer jω t * − jω 0 t 3/27/2004 © 2003.

JH McClellan & RW Schafer y(t) = 28 3/27/2004 29 .Ideal Lowpass Filter Hlp ( jω ) Ideal Lowpass Filter 1 H( jω ) =  0 ω < ω co ω > ω co f co "cutoff freq. JH McClellan & RW Schafer 27 Signal Multiplier (Modulator) x(t) Frequency Shifting Property y(t) = p(t)x(t) Y( jω ) = p(t) 1 2π X( jω ) x(t)e ∞ jω 0 t ⇔ X( j(ω − ω 0 )) ∞ X( jω ) ∗ P( jω ) Multiplication in the time-domain corresponds to convolution in the frequency-domain. JH McClellan & RW Schafer −∞ x (t )e − j (ω −ω0 ) t dt ∫ 3/27/2004 1 ∞ Y( jω ) = ∫ X( jθ )P( j(ω − θ ))dθ 2π −∞ © 2003." −ω co ω co y(t) = 4 y(t) = x(t) y(t) = 0 3/27/2004 if ω 0 < ω co if ω 0 > ω co 26 3/27/2004 π sin(50πt ) + 4 sin (150πt ) 3π © 2003. JH McClellan & RW Schafer © 2003. −∞ e jω0t x (t )e − jω t dt = ∫ = X ( j (ω − ω0 )) 1 ω 0 −7 < ω < ω 0 +7 sin 7t jω 0 t e ⇔ Y ( jω ) =  elsewhere πt 0 © 2003.

JH McClellan & RW Schafer . JH McClellan & RW Schafer ⇔ jω a + jω 31 30 3/27/2004 © 2003.y(t) = x(t)cos(ω 0 t) ⇔ Y( jω ) = X( j(ω − ω 0 )) + X( j(ω + ω 0 )) 1 2 1 2 Differentiation Property  dx (t ) d  1 ∞ = X ( jω )e jω t d ω  ∫ dt dt  2 π −∞   = 1 2π ∞ jω t ∫ ( j ω ) X( j ω )e d ω x(t) Multiply by jω d −at e u(t) = −ae−at u(t) + e −atδ (t) dt −∞ ( ) = δ (t) − ae −at u(t) 3/27/2004 © 2003.

JH McClellan & RW Schafer 5 © 2003. Section 12-2 4/19/2005 © 2003. JH McClellan & RW Schafer 1 4/19/2005 © 2003. JH McClellan & RW Schafer .Signal Processing First LECTURE OBJECTIVES Review of FT properties Convolution <--> multiplication Frequency shifting Lecture 24 Amplitude Modulation (AM) Sinewave Amplitude Modulation AM radio Frequency-division multiplexing FDM Reading: Chapter 12. JH McClellan & RW Schafer 3 Table of Easy FT Properties Linearity Property Table of FT Properties ax1 (t) + bx2 (t) ⇔ aX1 ( jω ) + bX2 ( jω ) Delay Property x(t) ∗ h(t) ⇔ H( jω )X( jω ) x(t)p(t) ⇔ 1 X( jω )∗ P( jω ) 2π jω t x(t)e 0 ⇔ X( j(ω − ω 0 )) x(t − td ) ⇔ e Frequency Shifting − jω t d X( jω ) x(t)e jω 0 t ⇔ X( j(ω − ω 0 )) Differentiation Property Scaling 4/19/2005 x(at) ⇔ 1 |a| X( j( a )) 4 4/19/2005 ω dx(t) ⇔ ( jω )X( jω ) dt © 2003.

JH McClellan & RW Schafer 7 Cosine Input to LTI System Y (j ω ) = H( jω )X(j ω ) = H( jω )[πδ (ω − ω 0 ) + πδ (ω + ω 0 )] = H( jω 0 )πδ (ω − ω 0 ) + H(− jω 0 )πδ (ω + ω 0 ) Ideal Lowpass Filter Hlp ( jω ) y(t) = = = 4/19/2005 H (j ω 0 ) 1 e jω0 t + H(− j ω 0 ) 1 e − jω 0t 2 2 H( jω 0 ) 1 e 0 + H ( jω 0 ) 1 e 2 2 H( jω 0 ) cos(ω 0t + ∠H( jω 0 )) * © 2003. JH McClellan & RW Schafer −ω co ω co jω t − jω 0 t y(t) = x(t) y(t) = 0 4/19/2005 if ω 0 < ω co if ω 0 > ω co 9 8 © 2003. JH McClellan & RW Schafer .Frequency Shifting Property Convolution Property x(t) y(t) = h(t) ∗ x(t) x(t)e jω 0 t ⇔ X( j(ω − ω 0 )) −∞ ∫ ∞ e − jω 0 t x(t )e − jω t dt = = −∞ ∫ ∞ x(t)e − j (ω −ω 0 )t dt X( jω ) ∞ Y( jω ) = H( jω )X( jω ) y(t) = h(t) ∗ x(t) = ∫ h(τ )x(t − τ )dτ −∞ X( j(ω − ω 0 )) Convolution in the time-domain sin 7t jω 0 t ⎧1 ω 0 −7 < ω < ω 0 +7 y(t) = e ⇔ Y ( jω ) = ⎨ elsewhere πt ⎩0 4/19/2005 © 2003. JH McClellan & RW Schafer 6 corresponds to MULTIPLICATION in the frequency-domain Y( jω ) = H( jω )X( jω ) 4/19/2005 © 2003.

JH McClellan & RW Schafer 10 4/19/2005 © 2003. JH McClellan & RW Schafer 11 Table of FT Properties Signal Multiplier (Modulator) x(t) x(t) ∗ h(t) ⇔ H( jω )X( jω ) x(t)p(t) ⇔ 1 X( jω )∗ P( jω ) 2π jω t x(t)e 0 ⇔ X( j(ω − ω 0 )) y(t) = p(t)x(t) Y( jω ) = p(t) 1 2π X( jω ) X( jω ) ∗ P( jω ) Differentiation Property Multiplication in the time-domain corresponds to convolution in the frequency-domain. dx(t) ⇔ ( jω )X( jω ) dt 4/19/2005 © 2003." The way communication systems work 4 y(t) = sin(50πt ) + sin (150πt ) 3π π 4 How do we share bandwidth ? 4/19/2005 © 2003. JH McClellan & RW Schafer 13 . JH McClellan & RW Schafer 12 4/19/2005 1 ∞ Y( jω ) = ∫ X( jθ )P( j(ω − θ ))dθ 2π −∞ © 2003.Ideal LPF: Fourier Series ⎧1 ω < ω co H( jω ) = ⎨ ⎩0 ω > ω co f co "cutoff freq.

y (t ) = x (t ) p(t ) ⇔ Y ( jω ) = p(t ) = cos(ωc t ) ⇔ 1 2π X ( jω ) ∗ P( jω ) Amplitude Modulator x(t) y(t) = x(t)cos(ω c t) cos(ω ct) P ( jω ) = πδ (ω − ωc ) + πδ (ω + ωc ) y (t ) = x (t ) cos(ωct ) ⇔ Y ( jω ) = 1 2π X( jω ) Y( jω ) = X( j(ω − ω c )) + X( j(ω + ω c )) 1 2 1 2 X ( jω ) ∗ [πδ (ω − ωc ) + πδ (ω + ωc )] Y ( jω ) = 1 X ( j (ω − ωc )) + 1 X ( j (ω + ωc )) 2 2 4/19/2005 © 2003. JH McClellan & RW Schafer 15 y (t ) = x (t ) cos(ωc t ) ⇔ Y ( jω ) = 1 X ( j (ω − ωc )) + 1 X ( j (ω + ωc )) 2 2 y (t ) = x (t ) cos(ωct ) ⇔ Y ( jω ) = 1 X ( j (ω − ωc )) + 1 X ( j (ω + ωc )) 2 2 ⎧1 ⎪ x (t ) = ⎨ ⎪0 ⎩ t <T t >T x(t) ⇔ X ( jω ) = 2 sin(ω T ) (ω ) X ( j (ω + ωc )) X ( j (ω − ωc )) y (t ) = x (t ) cos(ω c t ) ⇔ Y ( jω ) = 4/19/2005 sin((ω − ω c )T ) sin((ω + ω c )T ) + (ω − ω c ) (ω + ω c ) © 2003. JH McClellan & RW Schafer 14 x(t) modulates the amplitude of the cosine wave. JH McClellan & RW Schafer 16 4/19/2005 1 2 1 2 −ω c © 2003. 4/19/2005 © 2003. The result in the frequency-domain is two shifted copies of X(jω). JH McClellan & RW Schafer ωc 17 .

JH McClellan & RW Schafer 19 Double Sideband AM (DSBAM) “Typical” bandlimited input signal DSBAM DEmodulator x(t) y(t) = x(t)cos(ω ct) w(t) v(t) cos(ω ct) Frequency-shifted copies Lower sideband Upper sideband cos(ω ct) w(t) = x(t)[cos(ω c t)]2 = x(t) + x(t)cos(2ω c t) W( jω ) = X( jω ) + X( j(ω − 2ω c )) + X( j(ω + 2ω c )) 1 2 1 4 1 4 1 2 1 2 V ( jω ) = H( jω )W( jω ) 4/19/2005 © 2003. JH McClellan & RW Schafer 20 4/19/2005 © 2003.DSBAM Modulator x(t) DSBAM Waveform y(t) = x(t)cos(ω c t) X( jω ) cos(ω ct) Y( jω ) = X( j(ω − ω c )) + X( j(ω + ω c )) 1 2 1 2 In the time-domain. JH McClellan & RW Schafer 18 4/19/2005 © 2003. 4/19/2005 © 2003. JH McClellan & RW Schafer 21 .the result in the frequency-domain is two shifted and scaled exact copies of X(jω). the “envelope” of sinewave peaks follows |x(t)| If X(jω)=0 for |ω|>ωb and ωc >ωb.

JH McClellan & RW Schafer 25 .DSBAM Demodulation Frequency-Division Multiplexing (FDM) Shifting spectrum of signal to higher frequency: Permits transmission of low-frequency signals with high-frequency EM waves By allocating a frequency band to each signal multiple bandlimited signals can share the same channel AM radio: 530-1620 kHz (10 kHz bands) FM radio: 88. JH McClellan & RW Schafer ω c1 ω c2 24 4/19/2005 © 2003.1-107. JH McClellan & RW Schafer 23 ⎧2 | ω |< ω co H( jω ) = ⎨ ⎩0 | ω |> ω co V ( jω ) = H( jω )W( jω ) = X( jω ) if ω b < ω co < 2ω c − ω b 4/19/2005 © 2003.9 MHz (200 kHz bands) 4/19/2005 © 2003. JH McClellan & RW Schafer 22 FDM Block Diagram (Xmitter) Frequency-Division De-Mux cos(ω c1t) ω c1 ω c2 Spectrum of inputs must be bandlimited Need ω c 2 − ω c1 > 2ω b cos(ω c1t) cos(ω c 2t) cos(ω c 2t) 4/19/2005 © 2003.

JH McClellan & RW Schafer 26 4/19/2005 © 2003. then find a value for ωco 4/19/2005 © 2003. JH McClellan & RW Schafer .Bandpass Filters for De-Mux Pop Quiz: FT thru LPF 1 H LP ( jω ) ω − ωco ωco Input x (t ) ↔ X ( jω ) = k = −∞ ∑ 4π δ (ω − 30π k ) 27 ∞ If the output is y (t ) = 2.

8/22/2003 © 2003. Section 12-3 Review of FT properties Convolution multiplication Frequency shifting Review of AM 8/22/2003 © 2003.Signal Processing First LECTURE OBJECTIVES Sampling Theorem Revisited GENERAL: in the FREQUENCY DOMAIN Fourier transform of sampled signal Reconstruction from samples Lecture 25 Sampling and Reconstruction (Fourier View) Reading: Chap 12. JH McClellan & RW Schafer 1 3 Table of FT Properties Amplitude Modulator x(t) x(t) ∗ h(t) ⇔ H( jω )X( jω ) Delay Property y(t) = x(t)cos(ω ct + ϕ ) X( jω ) cos(ω ct + ϕ ) Phase Y (j ω ) = 1 e jϕ X( j(ω − ω c )) 2 + 1 e − jϕ X(j(ω + ω c )) 2 x(t − td ) ⇔ e Frequency Shifting − jω t d X( jω ) x(t)e Scaling 8/22/2003 jω 0 t ⇔ X( j(ω − ω 0 )) 4 1 x(at) ⇔ |a| X( j( ω )) a © 2003. The result in the frequency-domain is two SHIFTED copies of X(jω). JH McClellan & RW Schafer x(t) modulates the amplitude of the cosine wave. JH McClellan & RW Schafer 8/22/2003 © 2003. JH McClellan & RW Schafer 5 .

DSBAM: Frequency-Domain “Typical” bandlimited input signal DSBAM Demod Phase Synch x(t) X ( jω ) y (t ) = x(t ) cos(ω ct ) w(t) v(t) cos(ω ct) Frequency-shifted copies Lower sideband Upper sideband 1 2 cos(ω ct + ϕ ) V ( jω ) = 1 cos(ϕ ) X ( jω ) 2 what if ϕ = 1 π ? 2 1 2 e − jϕ X ( j (ω + ω c )) e jϕ X ( j (ω − ω c )) W ( jω ) = 1 e jϕ X ( jω ) + 1 e − jϕ X ( jω ) 4 4 + 1 e jϕ X ( j (ω − 2ω c )) + 1 e − jϕ X ( j (ω + 2ω c )) 4 4 8/22/2003 © 2003. JH McClellan & RW Schafer V ( jω ) = 1 e − jϕ X 1 ( jω ) + 1 e − jπ / 2e − jϕ X 2 ( jω ) + 4 4 8 8/22/2003 1 4 e jϕ X 1 ( jω ) + 1 e jπ / 2e jϕ X 2 ( jω ) 4 © 2003. JH McClellan & RW Schafer 6 7 Quadrature Modulator Demod: Quadrature System v (t ) = x1 (t ) if ϕ = 0 cos(ω ct + ϕ ) j Y ( jω) = 1 X1( j(ω − ωc )) − 2 X2 ( j(ω −ωc )) 2 j + 1 X1( j(ω + ωc )) + 2 X2 ( j(ω + ωc )) 2 v (t ) = x2 (t ) if ϕ = −π / 2 j Y ( jω ) = 1 X 1 ( j (ω − ω c )) − 2 X 2 ( j (ω − ω c )) 2 j + 1 X 1 ( j (ω + ω c )) + 2 X 2 ( j (ω + ω c )) 2 TWO signals on ONE channel: “out of phase” Can you “separate” them in the demodulator ? 8/22/2003 © 2003. JH McClellan & RW Schafer 9 . JH McClellan & RW Schafer 8/22/2003 © 2003.

JH McClellan & RW Schafer 10 11 Periodic Impulse Train FT of Impulse Train p (t ) = n = −∞ ∑δ (t − nTs ) ∞ ↔ P ( jω ) = 2π δ (ω − kω s ) Ts k = −∞ ∑ ∞ ωs = 2π Ts p (t ) = 1 ak = Ts 8/22/2003 n = −∞ ∑δ (t − nTs ) = ∑ ak e jkω t s ∞ ∞ k = −∞ ωs = 2π Ts Ts / 2 −Ts / 2 − jkω t ∫ δ (t )e dt = s © 2003. JH McClellan & RW Schafer 8/22/2003 © 2003. JH McClellan & RW Schafer 1 Ts Fourier Series 12 8/22/2003 © 2003. JH McClellan & RW Schafer 13 .Quadrature Modulation: 4 sigs Ideal C-to-D Converter • Mathematical Model for A-to-D 8700 Hz x[n] = x(nTs ) 3600 Hz FOURIER TRANSFORM of xs(t) ??? 8/22/2003 © 2003.

JH McClellan & RW Schafer 2π Ts 17 . JH McClellan & RW Schafer 15 Sampling: Freq. JH McClellan & RW Schafer n=−∞ © 2003. Domain Frequency-Domain Analysis xs (t) = x(t) ∑ δ (t − nTs ) = ∑ x(nTs )δ (t − nTs ) n=−∞ n=−∞ ∞ ∞ = p(t ) = 8/22/2003 k = −∞ ∞ ∑ ak e ∞ jkω s t EXPECT FREQUENCY SHIFTING !!! ∞ jkω s t 16 xs (t) = x(t) ∑ 1 e jkω st k=−∞ Ts 1 Ts ∞ ∞ = 1 Ts k =−∞ jkω t ∑ x(t)e s ∞ n = −∞ ∑δ (t − nTs ) = ∑ ak e k = −∞ © 2003. JH McClellan & RW Schafer Xs ( jω ) = 8/22/2003 k =−∞ ∑ X( j(ω − kω s )) ωs = © 2003.Impulse Train Sampling Illustration of Sampling x(t) t xs (t ) = n = −∞ ∑ x(nTs )δ (t − nTs ) ∞ xs (t) = x(t) ∑ δ (t − nTs ) = ∑ x(t)δ (t − nTs ) n=−∞ n=−∞ ∞ ∞ x[n] = x(nTs ) xs (t) = ∑ x(nT )δ(t −nT ) s s 8/22/2003 ∞ n 14 8/22/2003 © 2003.

so X r ( jω ) = H r ( jω ) X s ( jω ) Xs ( jω ) = 1 Ts k =−∞ ∑ X( j(ω − kω s )) ∞ Xr ( jω ) = Hr ( jω )Xs ( jω ) 8/22/2003 © 2003.Frequency-Domain Representation of Sampling “Typical” bandlimited signal Aliasing Distortion “Typical” bandlimited signal Xs ( jω ) = 1 ∞ ∑ X( j(ω Ts k=−∞ − kω s )) If ωs < 2ωb . the copies of X ( jω ) do not overlap. JH McClellan & RW Schafer 21 . JH McClellan & RW Schafer 18 8/22/2003 © 2003. 8/22/2003 © 2003. and we have aliasing distortion. the copies of X(jω) overlap. JH McClellan & RW Schafer 19 Reconstruction of x(t) Reconstruction: Frequency-Domain xs (t) = ∑ x(nTs )δ (t − nTs ) n=−∞ ∞ H r ( jω ) If ω s > 2ωb . JH McClellan & RW Schafer 20 8/22/2003 © 2003.

… © 2003. JH McClellan & RW Schafer 25 .Ideal Reconstruction Filter Ts  H r ( jω ) =  0  Signal Reconstruction xr (t) = hr (t) ∗ xs (t) = hr (t)∗ ∑ x(nTs )δ (t − nTs ) n=−∞ ∞ ω< ω> π Ts π Ts xr (t) = ∑ x(nTs )hr (t − nTs ) ∞ hr (t) = 8/22/2003 sin T t π s Ts π n=−∞ ∞ hr (0) = 1 hr (nTs ) = 0. n = ±1. JH McClellan & RW Schafer Shannon Sampling Theorem “SINC” Interpolation is the ideal PERFECT RECONSTRUCTION of BANDLIMITED SIGNALS Reconstruction in Time-Domain 8/22/2003 © 2003. JH McClellan & RW Schafer t xr (t) = ∑ x(nTs ) n=−∞ π sin T (t − nTs ) π Ts s (t − nTs ) 23 Ideal bandlimited interpolation formula 22 8/22/2003 © 2003. ±2. JH McClellan & RW Schafer 24 8/22/2003 © 2003.

JH McClellan & RW Schafer .Ideal C-to-D and D-to-C x[n] = x(nTs ) Ideal Sampler xr (t) = ∑ x[n] n=−∞ ∞ π sin T (t − nTs ) π Ts s (t − nTs ) Ideal bandlimited interpolator Xs ( jω ) = 8/22/2003 1 ∞ ∑ X( j(ω Ts k =−∞ − kω s )) Xr ( jω ) = Hr ( jω )Xs ( jω ) 26 © 2003.

JH McClellan & RW Schafer 8/22/2003 © 2003.Signal Processing First LECTURE OBJECTIVES Sampling Theorem Revisited GENERAL: in the FREQUENCY DOMAIN Fourier transform of sampled signal Reconstruction from samples Lecture 26 Review: Digital Filtering of Analog Signals Effective Frequency Response Important FT properties Convolution multiplication Frequency shifting 1 8/22/2003 © 2003. Domain Frequency-Domain Representation of Sampling “Typical” bandlimited signal p (t) = k = −∞ ∑ ak e ∞ ∞ jk ω s t EXPECT FREQUENCY SHIFTING !!! ∞ s Xs ( jω ) = 1 ∞ ∑ X( j(ω Ts k=−∞ − kω s )) p(t ) = 8/22/2003 n = −∞ ∑δ (t − nTs ) = ∑ ak e jkω t k = −∞ © 2003. JH McClellan & RW Schafer 3 Sampling: Freq. JH McClellan & RW Schafer 5 . JH McClellan & RW Schafer 4 8/22/2003 © 2003.

JH McClellan & RW Schafer t 8 8/22/2003 9 . JH McClellan & RW Schafer sin T t π s Ts π hr (0) = 1 hr (nTs ) = 0. n = ±1. the copies of X ( jω ) do not overlap. so X r ( jω ) = H r ( jω ) X s ( jω ) Ts hr (t) = 8/22/2003 © 2003. JH McClellan & RW Schafer 6 8/22/2003 © 2003. xs (t) = ∑ x(nTs )δ (t − nTs ) n=−∞ ∞ Xs ( jω ) = 1 Ts k =−∞ ∑ X( j(ω − kω s )) ∞ Xr ( jω ) = Hr ( jω )Xs ( jω ) 8/22/2003 © 2003.… © 2003.Aliasing Distortion “Typical” bandlimited signal Reconstruction of x(t) If ωs < 2ωb . the copies of X(jω) overlap. ±2. and we have aliasing distortion. JH McClellan & RW Schafer 7 Reconstruction: Frequency-Domain Ideal Reconstruction Filter Ts  H r ( jω ) =  0  ω< ω> π Ts π H r ( jω ) If ω s > 2ωb .

JH McClellan & RW Schafer 11 Reconstruction in Time-Domain Ideal C-to-D and D-to-C x[n] = x(nTs ) Ideal Sampler xr (t) = ∑ x[n] n=−∞ ∞ π sin T (t − nTs ) π Ts s (t − nTs ) Ideal bandlimited interpolator Xs ( jω ) = 8/22/2003 © 2003. JH McClellan & RW Schafer . JH McClellan & RW Schafer 1 ∞ ∑ X( j(ω Ts k =−∞ − kω s )) Xr ( jω ) = Hr ( jω )Xs ( jω ) 13 12 8/22/2003 © 2003. JH McClellan & RW Schafer Ideal bandlimited interpolation formula 8/22/2003 © 2003.Signal Reconstruction xr (t) = hr (t) ∗ xs (t) = hr (t)∗ ∑ x(nTs )δ (t − nTs ) n=−∞ ∞ Shannon Sampling Theorem “SINC” Interpolation is the ideal PERFECT RECONSTRUCTION of BANDLIMITED SIGNALS xr (t) = ∑ x(nTs )hr (t − nTs ) n=−∞ ∞ ∞ xr (t) = ∑ x(nTs ) n=−∞ π sin T (t − nTs ) π Ts s (t − nTs ) 10 8/22/2003 © 2003.

Axis ω fs DIGITAL FILTER f s = 1000 Hz EFFECTIVE RESPONSE H(e jω Ts ) vs. then it follows that Y( jω ) = Heff ( jω )X( jω ) H(e ) ω < ω s Heff ( jω ) =  UNDEFINED ω > 1ωs  NOT0LTI 2 1 2 © 2003. ω 16 Heff ( jω ) 8/22/2003 © 2003. Response Assume NO Aliasing. then ANALOG FREQ <--> DIGITAL FREQ DIGITAL FILTER H(e ˆ jω ) ˆ sin(11ω / 2) ˆ sin(ω / 2) ˆ ω = ω Ts = So. JH McClellan & RW Schafer ˆ ω Digital Filter jωTs ˆ ω Reconstruction Filter (Analog) ω Analog Output 14 8/22/2003 © 2003. we can plot: Scaled Freq.DT Filtering of CT Signals x(t) DT Filtering of a CT Signal Analog Input X( jω ) C-to-D x[n] H(e ˆ jω ) y[n] D-to-C y(t) ω X(e jω ) ˆ Y(e jω ) ˆ Y( jω ) Spectrum of Discrete-Time Signal If no aliasing occurs in sampling x(t). JH McClellan & RW Schafer 8/22/2003 15 EFFECTIVE Freq. JH McClellan & RW Schafer ANALOG FREQUENCY 8/22/2003 © 2003. JH McClellan & RW Schafer 17 .

JH McClellan & RW Schafer sin(11ω / 2000) sin(ω / 2000) © 2003.4π n) ωTs = 2000π / 5000 = 0.4π 21 . JH McClellan & RW Schafer x[n] = cos(0.8z −1 Find the output. y[n] When Because NO Aliasing 8/22/2003 © 2003.Heff for 11-pt Averager Frequency Response for Discrete-time ˆ sin(11ω / 2) ˆ H ( e jω ) = ˆ sin(ω / 2) POP QUIZ Given: x(t) A-to-D x[n] ˆ ω = ωTs = Analog Frequency Response H ( jω ) = 8/22/2003 ω fs ω = 1000 2 + 2z −1 1 − 0. y(t) When x(t) = cos(2000π t) © 2003.8z−1 y[n] D-to-A y(t) Find the output. JH McClellan & RW Schafer f s = 5000Hz 18 8/22/2003 19 POP QUIZ BECOMES Given: SINUSOIDAL RESPONSE x[n] = SINUSOID => y[n] is SINUSOID Get MAGNITUDE & PHASE from H(z) ˆ if x[n] = e jω n then ˆ ˆ y[n] = H (e jω )e jω n ˆ where H (e jω ) = H ( z ) z =e jωˆ 20 8/22/2003 © 2003. JH McClellan & RW Schafer 2 + 2z−1 H(z) = 1− 0.

JH McClellan & RW Schafer − j0.452 π − j 0.4π n) y[n] = M cos(0.8z −1 The input: Then y[n] x[n] = cos(0.5) x[n] ˆ ω =? 2 + 2z −1 1 − 0.4π n + ψ ) f s = 5000Hz 2 + 2z −1 −1 1 − 0. y(t) When x(t ) = cos(2π (7500)t ) © 2003. JH McClellan & RW Schafer 23 ANOTHER INPUT FREQ Given: x(t) A-to-D x[n] 2nd POP QUIZ ANSWER Given: ˆ ω = cos(2π (7500) / 5000 = 2π (1.02e− j 0.4π The output is x(t) = cos(2000π t) y(t) = 3.8z −1 y[n] D-to-A y(t) x(t) A-to-D 2 + 2z −1 −1 1 − 0. JH McClellan & RW Schafer When x(t ) = cos(2π (7500)t ) ω =? f s = 5000Hz 8/22/2003 ˆ ω =? f s = 5000Hz 24 8/22/2003 ˆ ω = 3π © 2003.POP QUIZ INSIDE ANSWER Given: POP QUIZ ANSWER Given: x(t) A-to-D x[n] 2 + 2z−1 H(z) = 1− 0.8z y[n] D-to-A y(t) Find the output. JH McClellan & RW Schafer y(t) = ? 25 .8z y[n] D-to-A y(t) When H(e j 0.4 π 1− 0.452π ) 22 8/22/2003 © 2003.02 cos(2000π t − 0.4 π ) = 8/22/2003 2 + 2e = 3.8e © 2003.

JH McClellan & RW Schafer 29 . but if you think about it in depth. …anon FILTERS alter the Frequency Content Image Processing Example: Blur Linear Time-Invariant Processing 3 Domains for Analysis 8/22/2003 © 2003.IMPORTANT CONCEPTS ALL Signals have Frequency Content Sum of Sinusoids Complex Exponentials Impulses. If you don’t think very carefully it’s obvious. you’ll get confused and it won’t be obvious. JH McClellan & RW Schafer 26 8/22/2003 © 2003. JH McClellan & RW Schafer 27 THREE DOMAINS THE FUTURE Circuits & Laplace Transforms ∑b z H(z) = 1− ∑ a z k −k − z=e ˆ jω H(s) Polynomials: Poles & Zeros h(t) Implementation is RLC-op-amp circuit 8/22/2003 © 2003. JH McClellan & RW Schafer H( jω ) Frequency Response 28 8/22/2003 © 2003. Square Pulses Superficial Knowledge It depends how carefully you think about it.

domain ⇔ Frequency .domain x(t) ⇔ X( jω ) 8/22/2003 © 2003.Mathematical Elegance x(t ) = 1 ∞ jω t ∫ X( jω )e d ω 2π −∞ Fourier Synthesis (Inverse Transform) ∞ X( jω ) = ∫ x(t)e − jω t dt −∞ Fourier Analysis (Forward Transform) Time . JH McClellan & RW Schafer 30 .