DSP First, 2/e: Lecture #2 Phase & Time-Shift Delay & Attenuation
DSP First, 2/e: Lecture #2 Phase & Time-Shift Delay & Attenuation
DSP First, 2/e: Lecture #2 Phase & Time-Shift Delay & Attenuation
LECTURE #2
Phase & Time-Shift
Delay & Attenuation
This Lecture:
Chapter 2, Sects. 2-3 to 2-5
Appendix B: MATLAB
Next Lecture: Complex Exponentials
A cos( t )
FREQUENCY
AMPLITUDE A
Radians/sec
Magnitude
or, Hertz
( 2 )
(cycles/sec) f
PHASE
1 2
T
PERIOD
f (insec)
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 5
PLOTTING COSINE SIGNAL
from the FORMULA
5 cos(0.3 t 1.2 )
Determine period:
T 2 / 2 / 0.3 20 / 3
Determine a peak location by solving
( t ) 0
Peak at t=-4 0.3 t 1.2 0
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 6
ANSWER for the PLOT
5 cos(0.3 t 1.2 )
Use T=20/3 and the peak location at t = -4
20
3
A cos( (t tm )) A cos( t )
and we obtain: tm
or,
tm
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 10
SINUSOID from a PLOT
T0
1
.
01
sec
1
period
100
20 2 2
T0.
01
20
3
20
3 Many peaks;
One will be closest
to the origin
(t 2) / 2
However, the amplitude can
A(t ) e
have exponential decay, e.g.,
A(t ) Ae t /
t /
x (t ) Ae cos( t )
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 20
MATLAB Example (I)
Generating sinusoids in MATLAB is easy:
% define how many values in a second
fs = 8000;
% define array tt for time
% time runs from -1s to +3.2s
% sampled at an interval of 1/fs
tt = -1 : 1/fs : 3.2;
xx = 2.1 * cos(2*pi*440*tt + 0.4*pi);
a short slice