Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of...
-
Upload
jerry-stallworth -
Category
Documents
-
view
220 -
download
0
Transcript of Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of...
ComplexNumbers
S. Awad, Ph.D.
M. Corless, M.S.E.E.
E.C.E. Department
University of Michigan-Dearborn
Math Review with Matlab:
Complex Number Theory
U of M-Dearborn ECE DepartmentMath Review with Matlab
2
Complex Numbers: Complex Number Theory
Complex Number Theory
General Complex Numbers General Complex Numbers in Matlab Argand Diagrams Exponential Form Polar Form Polar Form in Matlab
U of M-Dearborn ECE DepartmentMath Review with Matlab
3
Complex Numbers: Complex Number Theory
Representing Complex Numbers The conventional representation of a complex number z
is the sum of a real part x and an imaginary part y
iyxz
i is the imaginary unit where: 12 i
Complex Real Imaginary
Conventional representation is also referred to as the rectangular form of a complex number
U of M-Dearborn ECE DepartmentMath Review with Matlab
4
Complex Numbers: Complex Number Theory
Functional Notation In different applications, the imaginary unit may be
represented as i or j and may be placed before or after the imaginary part
yjxzyixz
jyxziyxz
In functional notation, it is sometimes convenient to write:
zx Re zy Im
U of M-Dearborn ECE DepartmentMath Review with Matlab
5
Complex Numbers: Complex Number Theory
Matlab Complex Numbers Matlab complex numbers consist of a real portion plus an
imaginary portion
For example, use Matlab to find the square root of -1
» sqrt(-1)
ans = 0 + 1.0000i
1i
Real Portion = 0 Imaginary Portion = -1
U of M-Dearborn ECE DepartmentMath Review with Matlab
6
Complex Numbers: Complex Number Theory
Entering Complex Numbers Both the variables i and j in the Matlab workspace are
reserved for representing imaginary numbers
Placing i or j after a number defines it as imaginary
Example: A complex number with real portion = 1 and imaginary portion = 2 can be entered in two ways:
» z = 1+2i
z = 1.0000 + 2.0000i
» z = 1+2j
z = 1.0000 + 2.0000i
OR
U of M-Dearborn ECE DepartmentMath Review with Matlab
7
Complex Numbers: Complex Number Theory
Real and Imag Commands The real and imag functions extract the real and
imaginary portion of a complex number respectively
Example: » z1= 2+4iz1 = 2.0000 + 4.0000i
» z1_re = real(z1)z1_re = 2
» z1_im = imag(z1)z1_imag = 4
U of M-Dearborn ECE DepartmentMath Review with Matlab
8
Complex Numbers: Complex Number Theory
Argand Diagram A complex number can be
represented as a Point P(x,y) in the xy-plane (Cartesian plane)
Ordered Pair Notation
yxz ,
This representation is called an Argand Diagram
The xy-plane is often referred to as the Complex Plane or the z-plane
zIm
zRex
y yxz ,
U of M-Dearborn ECE DepartmentMath Review with Matlab
9
Complex Numbers: Complex Number Theory
Feather Command The feather command draws complex numbers as
arrows in the xy plane
» z1=1+2j;» z2=3+3j;» z3=3+j;» feather(z1,'r');» hold on» feather(z2,'b');» feather(z3,'g');» feather(z3,'k');» ylabel('Imaginary');» xlabel('Real');
U of M-Dearborn ECE DepartmentMath Review with Matlab
10
Complex Numbers: Complex Number Theory
Exponential Representation Sometimes an exponential representation of a complex
number is easier to manipulate than the rectangular sum of the real and imaginary part
The Complex Exponential Function ez will be used to represent a complex number whose Taylor Series Expansion is:
!3!2
1)exp(32 zz
zze z
We can assume that ez will be valid for all z
U of M-Dearborn ECE DepartmentMath Review with Matlab
11
Complex Numbers: Complex Number Theory
Exponential Series If z = i, purely imaginary, where is real, the complex
exponential function can be written using a Taylor Series Expansion:
!3
)(
!2
)(1
32 iiiei
Which can be separated into real and imaginary components since i raised to even powers of n will be -1
!5!3!4!21
5342 iei
U of M-Dearborn ECE DepartmentMath Review with Matlab
12
Complex Numbers: Complex Number Theory
Derivation of Euler’s Equation
Knowing that the Taylor Series Expansions for sine and cosine functions are:
Through substitution, Euler’s Equation is derived:
!5!3!4!21
5342 iei
sincos iei
!4!2
1cos42
!5!3sin
53
U of M-Dearborn ECE DepartmentMath Review with Matlab
13
Complex Numbers: Complex Number Theory
Exponential Polar Form
Through Euler’s Equation we see that:
iyxre
irrei
i
sincos
This representation of a complex number is referred to as the Exponential Polar Form:
irez Sometimes Polar Form is written
using the shortened notation: rz
U of M-Dearborn ECE DepartmentMath Review with Matlab
14
Complex Numbers: Complex Number Theory
Plotting Polar Form Graphically depicting Euler’s
Equation in the First Quadrant of an Argand Diagram we see:
zIm
zRex
y
r yxz ,
sincos rirrez i
r refers to the radius from z to the origin, commonly called the Magnitude of z
is the Angle of z with respect to the Real Axis measured in degrees or radians
sin)Im(
cos)Re(
rzy
rzx
U of M-Dearborn ECE DepartmentMath Review with Matlab
15
Complex Numbers: Complex Number Theory
Magnitude Through use of the Pythagorean theorem, the Magnitude
(radius) of a complex number always has the relationship:
22 yxr This relationship always holds true regardless of which
quadrant of the Argand diagram that the number lies in
The Magnitude of a complex number z=x+iy is denoted using Absolute Value notation
22 yxrz
U of M-Dearborn ECE DepartmentMath Review with Matlab
16
Complex Numbers: Complex Number Theory
Angle
Determining the angle of a complex number depends on the quadrant of the Argand diagram
The angle, , of a complex number z denoted by: z
Measuring the angle counter-clockwise from the x-axis gives a positive
Measuring the angle clockwise from the x-axis gives a negative
2702
390
2
z
Example: The angle of z=0+j can be represented in multiple ways
U of M-Dearborn ECE DepartmentMath Review with Matlab
17
Complex Numbers: Complex Number Theory
Angle of Quadrants I and IVQuadrant I
zIm
zRex
y
r yxz ,
zIm
zRe
x
y
r
yxz ,
x
y1tan
x
y
x
y 11 tantan
Quadrant IV
U of M-Dearborn ECE DepartmentMath Review with Matlab
18
Complex Numbers: Complex Number Theory
Angle of Quadrants II and IIIQuadrant II
zIm
zRex
y
r
yxz , zIm zRex
y
r
yxz ,
x
y1tan
x
y1tan
Quadrant III
U of M-Dearborn ECE DepartmentMath Review with Matlab
19
Complex Numbers: Complex Number Theory
Purely Real or Imaginary Numbers
Rectangular Rectangular Polar Polar
Short Long Degrees Radians
iiji-ji
U of M-Dearborn ECE DepartmentMath Review with Matlab
20
Complex Numbers: Complex Number Theory
Abs and Angle Commands The abs command in Matlab returns the magnitude of a
complex number The angle command returns the angle of a complex
number in radians
Remember that the conversion between radians and degrees is:
rad
180rad
U of M-Dearborn ECE DepartmentMath Review with Matlab
21
Complex Numbers: Complex Number Theory
» z=1+i;» r=abs(z)r = 1.4142
» theta_rads=angle(z)theta_rads = 0.7854
» theta_degs=theta_rads*180/pitheta_degs = 45
Polar Example Use Matlab to find the magnitude and angle of z=1+i
4142.1
211 22
r
r
7854.04
1
1tan 1
RADS
45DEGREES
U of M-Dearborn ECE DepartmentMath Review with Matlab
22
Complex Numbers: Complex Number Theory
Entering Polar Form Complex numbers can be directly entered into Matlab
using the exponential polar form
» z=2*exp(i*pi/2)
z = 0.0000 + 2.0000i
Example: Create a complex number z with a magnitude of 2 and an angle of /2 radians
iz
z
z
ezi
2
902
2
2
2
2
U of M-Dearborn ECE DepartmentMath Review with Matlab
23
Complex Numbers: Complex Number Theory
Polar Plotting Matlab’s compass(z) or compass(x,y) command can
be used to draw complex numbers on a polar plot Note that z is a complex number in rectangular form
» z1=3+3i;» compass(z1)» hold on» compass(4,-3)
Angles are displayed in degrees
U of M-Dearborn ECE DepartmentMath Review with Matlab
24
Complex Numbers: Complex Number Theory
Plotting Example Example: Plot the following complex numbers by hand.
Use Matlab’s compass function to verify your results.
21505.2
488
302
65
243
6021
izz
ezjz
ezzi
i
U of M-Dearborn ECE DepartmentMath Review with Matlab
25
Complex Numbers: Complex Number Theory
Matlab Verification
z(1) = 2;z(2) = 3*exp(i*60*(pi/180));z(3) = -(8^0.5) + j*(8^0.5);z(4) = 4*exp(-i*pi/2);z(5) = 2.5*exp(-i*150*(pi/180));z(6) = 2i;compass(z)
21505.24
88302
652
4
360
21
izzez
jzezzi
i
U of M-Dearborn ECE DepartmentMath Review with Matlab
26
Complex Numbers: Complex Number Theory
Polar Plot
2
1505.2
4
88
3
02
6
5
24
3
602
1
iz
z
ez
jz
ez
z
i
i
1z
2z3z
4z
6z
5z
U of M-Dearborn ECE DepartmentMath Review with Matlab
27
Complex Numbers: Complex Number Theory
Summary Representing complex numbers in rectangular,
exponential, and polar forms
Using Euler’s Equation to represent real and imaginary parts of complex numbers
Determining magnitude and angles of complex numbers
Graphing complex numbers using Argand Diagrams