You are on page 1of 42

DSP-First, 2/e

LECTURE #3
Complex Exponentials
& Complex Numbers

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 1


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-Commerical
 The licensor permits others to copy, distribute, display, and perform
the work. In return, licensees may not use the work for commercial
purposes—unless 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

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 2


READING ASSIGNMENTS

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

 Appendix A: Complex Numbers

 Appendix B: MATLAB
 Next Lecture: Complex Exponentials

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 3


LECTURE OBJECTIVES
 Introduce more tools for manipulating
complex numbers
 Conjugate
 Multiplication & Division
 Powers
 N-th Roots of unity

j 2k / N
For z  e , z 1
N

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 4


LECTURE OBJECTIVES
 Phasors = Complex Amplitude
 Complex Numbers represent Sinusoids

j j t
A cos( t   )  {( Ae )e }
 Next Lecture: Develop the ABSTRACTION:
 Adding Sinusoids = Complex Addition
 PHASOR ADDITION THEOREM
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 5
WHY? What do we gain?

 Sinusoids are the basis of DSP,


 but trig identities are very tedious

 Abstraction of complex numbers


 Represent cosine functions
 Can replace most trigonometry with algebra

 Avoid all Trigonometric manipulations


Aug 2016 © 2003-2016, JH McClellan & RW Schafer 6
COMPLEX NUMBERS

 To solve: z2 = -1
z=j
 Math and Physics use z = i
 Complex number: z = x + j y
y z
Cartesian
coordinate
x system

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 7


PLOT COMPLEX NUMBERS
{2  j5}  5
{2  j5}  2
Real part:

 5  {5  j 0}
x  {z}
Imaginary part:
y  {z}

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 8


COMPLEX ADDITION =
VECTOR Addition

z3  z1  z2
 ( 4  j 3)  ( 2  j5)
 ( 4  2)  j ( 3  5)
Aug 2016
 6  j2
© 2003-2016, JH McClellan & RW Schafer 9
*** 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

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 10


POLAR <--> RECTANGULAR

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


y
r x y
2 2 2
q
x
q  Tan 1 y
x
x  r cosq
Most calculators do
Polar-Rectangular y  r sin q
Need a notation for POLAR FORM
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 11
Euler’s FORMULA

 Complex Exponential
 Real part is cosine
 Imaginary part is sine
 Magnitude is one
jq
e  cos(q )  j sin(q )
jq
re  r cos(q )  jr sin(q )
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 12
Cosine = Real Part

 Complex Exponential
 Real part is cosine
 Imaginary part is sine

jq
re  r cos(q )  jr sin(q )
jq
{re }  r cos(q )
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 13
Common Values of exp(jq)
 Changing the angle
q  0  1  1  j 0  e j 0  e j 2 n

q    1  1  j 0  e j  e j ( 2 n 1)

q   / 2  j  e j / 2  e j ( 2 n 1 / 2 )
j 3 / 2  j / 2 j ( 2 n 1 / 2 )
q  3 / 2   j  e e e

1  j  2e  j / 4 1 j  ?
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 14
COMPLEX EXPONENTIAL
j t
e  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
jq
e  cos(q )  j sin(q )
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 15
Cos = REAL PART
Real Part of Euler’s
j t
cos( t )  {e }
General Sinusoid
x(t )  A cos( t   )
So,
j ( t  )
A cos( t   )  { Ae }
j j t
 { Ae e }
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 16
COMPLEX AMPLITUDE
General Sinusoid
j j t
x(t )  A cos( t   )  { Ae e }
Sinusoid = REAL PART of complex exp: z(t)=(Aejf)ejt
j t
x(t )  { Xe }  {z (t )}
Complex AMPLITUDE = X, which is a constant
j j t
X  Ae when z (t )  Xe
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 17
POP QUIZ: Complex Amp
 Find the COMPLEX AMPLITUDE for:
x(t )  3 cos(77 t  0.5 )
 Use EULER’s FORMULA:
j ( 77 t  0.5 )
x(t )  { 3e }
j 0.5 j 77 t
 { 3e e }
j 0.5
Aug 2016 X  3e
© 2003-2016, JH McClellan & RW Schafer 18
POP QUIZ-2: Complex Amp
 Determine the 60-Hz sinusoid whose
COMPLEX AMPLITUDE is:
X  3  j3
 Convert X to POLAR:
j (120 t )
x(t )  {( 3  j 3)e }
j / 3 j120 t
 { 12 e e }

Aug 2016
 x(t )  12 cos(120 t   / 3)
© 2003-2016, JH McClellan & RW Schafer 19
COMPLEX CONJUGATE (z*)
 Useful concept: change the sign of all j’s

 RECTANGULAR: If z = x + j y, then the


complex conjugate is z* = x – j y

 POLAR: Magnitude is the same but angle


has sign change
jq  jq
z  re  z*  re
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 20
COMPLEX CONJUGATION
 Flips vector
about the real
axis!

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 21


USES OF CONJUGATION
 Conjugates useful for many calculations
 Real part:
z  z * ( x  jy )  ( x  jy )
  x  {z}
2 2
 Imaginary part:
z  z * j2 y
  y  {z}
2j 2j
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 22
Z DRILL (Complex Arith)

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 23


Inverse Euler Relations
 Cosine is real part of exp, sine is imaginary part
 Real part: z  z *
 {z}
2
jq  jq
e  e
z  e jq ,  {e jq }   cos(q )
2
 Imaginary part:
z  z*
 y  {z}
2j
jq  jq
e  e
z  e jq ,  {e jq }   sin(q )
Aug 2016
2j 24
© 2003-2016, JH McClellan & RW Schafer
Mag & Magnitude Squared
 Magnitude Squared (polar form):
jq  jq
z z*  (re )(re )  r | z | 2 2

 Magnitude Squared (Cartesian form):


z z*  (x  jy)  (x  jy)  x  j y  x  y 2 2 2 2 2

 Magnitude of complex exponential is one:


|e |  cos q   sin q   1
jq 2 2 2

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 25


COMPLEX MULTIPLY =
VECTOR ROTATION
 Multiplication/division scales and rotates
vectors

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 26


POWERS
 Raising to a power N rotates vector by Nθ
and scales vector length by rN
z  re
N jq N
 r e N jNq

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 27


MORE POWERS

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 28


ROOTS OF UNITY
 We often have to solve zN=1
 How many solutions?
j Nq j 2 k
z r e
N N
1 e
2 k
 r  1, Nq  2 k  q 
N
j 2 k N
ze , k  0,1, 2,  N  1
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 29
ROOTS OF UNITY for N=6

 Solutions to zN=1
are N equally
spaced vectors on
the unit circle!
 What happens if
we take the sum
of all of them?

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 30


Sum the Roots of Unity
 Looks like the answer is zero (for N=6)
N 1

e j 2 k / N
 0?
k 0
 Write as geometric sum
N 1 N
1 r
 r  1 r
k
then let r  e j 2 / N

k 0
j 2 / N j 2
Numerator 1  r  1  (eN
)  1 e
N
0
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 31
Integrate Complex Exp
 Needed later to describe periodic signals
in terms of sinusoids (Fourier Series)
 Especially over one period
b jq b
e e e jb ja


jq
e d q  
a
j a
j
T j 2 T / T
e e j0
11
e
j 2 t / T
dt   0
0
j j
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 32
BOTTOM LINE

 CARTESIAN: Addition/subtraction is most


efficient in Cartesian form
 POLAR: good for multiplication/division
 STEPS:
 Identify arithmetic operation
 Convert to easy form
 Calculate
 Convert back to original form
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 33
Harder N-th Roots
 Want to solve zN = c
 where c is a complex number

j Nq j j 2 k
z r e
N N
 c  (  e )e
  2 k
 r  N  , Nq    2 k  q 
N
j / N j 2 k N
z e N e , k  0,1, 2,  N  1
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 34
Euler’s FORMULA

 Complex Exponential
 Real part is cosine
 Imaginary part is sine
 Magnitude is one
jq
e  cos(q )  j sin(q )
jt
e  cos( t )  j sin( t )
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 35
Real & Imaginary Part Plots

PHASE DIFFERENCE = /2

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 36


COMPLEX EXPONENTIAL
j t
e  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
jq
e  cos(q )  j sin(q )
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 37
Rotating Phasor

See Demo on CD-ROM


Chapter 2

Aug 2016 © 2003-2016, JH McClellan & RW Schafer 38


AVOID Trigonometry
 Algebra, even complex, is EASIER !!!
 Can you recall cos(q1+q2) ?
 Use: real part of e jq 1q2  = cos(q +q ) 1 2

cosq1  q 2   e{e j (q1 q 2 )


}  e{e e }jq1 jq 2

 e{(cos q1  j sin q1 )(cos q 2  j sin q 2 )}

 (cosq1 cosq 2  sin q1 sin q 2 )  j (...)


Aug 2016 © 2003-2016, JH McClellan & RW Schafer 39
MULTIPLICATION
 CARTESIAN: use polynomial algebra
z1  z2  (x1  jy1 )  (x 2  jy 2 )
 (x1 x 2  y1 y 2 )  j(x1 y 2  y1 x 2 )
 POLAR: easier because you can leverage the
properties of exponentials
jq1 jq 2 j (q1 q 2 )
z1  z 2  r1e  r2 e  r1r2 e
 Multiply the magnitudes and add the angles
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 40
DIVISION
 CARTESIAN: use complex conjugate to
convert to multiplication:
z1 ( x1  jy1 ) z z zz * *
   1 2 1 2
z 2 ( x2  jy2 ) z z |z | *
2 2 2
2

 POLAR: simpler to subtract exponents


jq 1
z1 r1e r1 j(q 1 q 2 )
 jq 2
 e
z 2 r2e r2
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 41
Complex Numbers

 WHY? need to ADD sinusoids


20

s(t)   k cos(120 (t  0.002k))


k 1

 Use an ABSTRACTION
 Complex Amplitude, X, has mag & phase
 Complex Exponential
 Euler’s Formula
j t
z(t)  Xe
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 42

You might also like