You are on page 1of 24

Signal Processing First

LECTURE #2
Phase & Time-Shift
Complex Exponentials

10/30/2014

2003, JH McClellan & RW Schafer

License Info for SPFirst Slides


This work released under a Creative Commons License
with the following terms:
Attribution
The licensor permits others to copy, distribute, display, and perform
the work. In return, licensees must give the original authors credit.

Non-Commercial
The licensor permits others to copy, distribute, display, and perform
the work. In return, licensees may not use the work for commercial
purposesunless they get the licensor's permission.

Share Alike
The licensor permits others to distribute derivative works only under
a license identical to the one that governs the licensor's work.

Full Text of the License


This (hidden) page should be kept with the presentation

10/30/2014

2003, JH McClellan & RW Schafer

READING ASSIGNMENTS
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
10/30/2014

2003, JH McClellan & RW Schafer

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

z(t ) Xe
10/30/2014

2003, JH McClellan & RW Schafer

jt
4

SINUSOIDAL SIGNAL

A cos( t )
FREQUENCY
AMPLITUDE A
Radians/sec
or, Hertz (cycles/sec)

Magnitude

(2 ) f

PERIOD (in sec)

PHASE

1 2
T
f

10/30/2014

2003, JH McClellan & RW Schafer

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
10/30/2014

2003, JH McClellan & RW Schafer

ANSWER for the PLOT

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

20
3

10/30/2014

2003, JH McClellan & RW Schafer

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

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
10/30/2014

2003, JH McClellan & RW Schafer

TIME-SHIFTED SINUSOID
x(t 4) 5 cos(0.3 (t 4)) 5 cos(0.3 (t (4))

10/30/2014

2003, JH McClellan & RW Schafer

PHASE <--> TIME-SHIFT


Equate the formulas:

A cos( (t tm )) A cos( t )
tm

and we obtain:
or,

10/30/2014

tm

2003, JH McClellan & RW Schafer

10

SINUSOID from a PLOT


Measure the period, T
Between peaks or zero crossings

Compute frequency: = 2/T

3 steps

Measure time of a peak: tm


Compute phase: f = - tm

Measure height of positive peak: A

10/30/2014

2003, JH McClellan & RW Schafer

11

(A, , f) from a PLOT

.01sec
1
T 10period
100

2T 02.01 200

tm 0.00125 sec

tm (200 )(tm ) 0.25

10/30/2014

2003, JH McClellan & RW Schafer

12

SINE DRILL (MATLAB GUI)

10/30/2014

2003, JH McClellan & RW Schafer

13

PHASE is AMBIGUOUS
The cosine signal is periodic
Period is 2

A cos( t 2 ) A cos( t )

Thus adding any multiple of 2 leaves x(t)


unchanged

if tm
tm2
10/30/2014

, then

( 2 )

2 tm T

2003, JH McClellan & RW Schafer

14

COMPLEX NUMBERS
To solve: z2 = -1
z=j
Math and Physics use z = i

Complex number: z = x + j y
y

10/30/2014

2003, JH McClellan & RW Schafer

Cartesian
coordinate
system

15

PLOT COMPLEX NUMBERS

10/30/2014

2003, JH McClellan & RW Schafer

16

COMPLEX ADDITION =
VECTOR Addition

10/30/2014

z3 z1 z2
(4 j 3) (2 j5)
(4 2) j ( 3 5)
6 j2
2003, JH McClellan & RW Schafer

17

*** POLAR FORM ***


Vector Form
Length =1
Angle = q

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
10/30/2014

2003, JH McClellan & RW Schafer

18

POLAR <--> RECTANGULAR


Relate (x,y) to (r,q)

r x y
2

1 y
Tan x

Most calculators do
Polar-Rectangular

x
x r cos q
y r sin q

Need a notation for POLAR FORM


10/30/2014

2003, JH McClellan & RW Schafer

19

Eulers FORMULA
Complex Exponential
Real part is cosine
Imaginary part is sine
Magnitude is one

e
re
10/30/2014

jq

cos(q ) j sin(q )

jq

r cos(q ) jr sin(q )
2003, JH McClellan & RW Schafer

20

COMPLEX EXPONENTIAL

j t

cos( t ) j sin( t )

Interpret this as a Rotating Vector

q t
Angle changes vs. time
ex: 20 rad/s
Rotates 0.2 in 0.01 secs

e
10/30/2014

jq

cos(q ) j sin(q )

2003, JH McClellan & RW Schafer

21

cos = REAL PART


Real Part of Eulers
General Sinusoid
So,

cos( t ) e{ e

j t

x(t ) A cos( t )

A cos( t ) e{ Ae

j ( t )
j j t

e{ Ae e
10/30/2014

2003, JH McClellan & RW Schafer

}
22

REAL PART EXAMPLE

j j t

A cos( t ) e Ae e

Evaluate:

x(t ) e 3 je

Answer:

x(t ) e ( 3 j )e

e 3e
10/30/2014

j t

j 0.5 j t

j t

3cos( t 0.5 )

2003, JH McClellan & RW Schafer

23

COMPLEX AMPLITUDE
General Sinusoid

x(t ) A cos( t ) eAe e


j

jt

Complex AMPLITUDE = X

z(t ) Xe

jt

X Ae

Then, any Sinusoid = REAL PART of Xejt

x(t ) eXe

10/30/2014

jt

eAe

2003, JH McClellan & RW Schafer

jt

24