complex numbers complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies...

16
Complex Numbers • Complex numbers are written a + bi – a and b are real numbers – i (or j) satisfies the equation: • Characteristics of Complex Numbers – Extend the number system to two dimensions –i 2 = j 2 = -1 2+4j Rectangular Notation : Mathematicians use the symbol i; DSP normally use

Upload: andrea-bruce

Post on 11-Jan-2016

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

Complex Numbers

• Complex numbers are written a + bi– a and b are real numbers – i (or j) satisfies the equation:

• Characteristics of Complex Numbers– Extend the number system to two dimensions– i2 = j2 = -1

2+4j

Rectangular Notation

Note: Mathematicians use the symbol i; DSP normally uses j

Page 2: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

Polar Notation

• Rectangular Form 4+i3

• Convert to Polar Form (5,36.87)– M = sqrt(42+32) = 5

– Ө = arctan(3/4)

• Convert to Rectangular– A+ib = M(cos Ө + i * sinӨ)

Distance and angle from the origin

Be Careful: At 90 and 270 degrees we have a divide by zero

Page 3: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

Understanding Digital Signal Processing, Third Edition, Richard Lyons(0-13-261480-4) © Pearson Education, 2011.

Multiplications of complex numbers are rotations

Page 4: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

Operations on Complex Numbers

• Addition: (a + bj) + (c+dj) = (a+c) + (b+d)j• Subtraction: (a+bj) – (c+dj) = (a-c) + (b-d)j• Multiplication: (a+bj) * (c+dj) = (ac-bd) + (bc+ad)j• Division: Change the problem to a multiplication

– Trick: Multiply the numerator and denominator by the conjugate of the denominator

– Result: Complex parts of denominator cancel, which effectively changes the division to a multiplication

(a+bj) / (c+dj) =(a+bj) * (c-dj) / {(c+dj)*(c-di) } = ((ac+bd) + (bc-ad)i)/(c2 + d2)

Definition: Conjugate of a + bj is a - bj

Page 5: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

Understanding Digital Signal Processing, Third Edition, Richard Lyons(0-13-261480-4) © Pearson Education, 2011.

Page 6: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

N Roots of Unity

for (double angle=0;

angle<Math.PI * 2;

angle += 2*Math.PI/N)

{

System.out.println (cos(angle) + "j" +

sin(angle);

}

N = 12Radius = 1

Multiplying rotates a unit circle point by the angle of the other

For N roots, other than unity, simply multiply by the magnitude

Page 7: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

Euler’s Formula

The properties of exponentials enable• Fast multiplies/divides:

M1 eӨ1j * M2 eӨ2j = M1 * M2 ej(Ө1 + Ө2) and M1 eӨ1j / M2 eӨ2j = M1 / M2 ej(Ө1 - Ө2)

• Reduced calculations: e128/256 = e64/128 = e32/64 = e16/32 = e8/16 = e4/8 = e2/4 = e1/2

• Consise polar notation (represents magnitude and phase): Mejϕ

• Elegant FFT algorithm: transfer from time to frequency domain

ejӨ = M(CosӨ + j SinӨ)

Page 8: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

Trigonometric Identities

cos(x)=cos(-x) and sin(x)=-sin(-x)cos(x) = (eix + e-ix)/2 sin(x) = (eix – e-ix)/2isin2(x)+ cos2(x) = 1

sin(x+y) = sin(x)cos(y) + cos(x)sin(y)cos(x+y) = cos(x)cos(y) - sin(x)sin(y)

Page 9: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

Quick Review of Calculus• Function: Given a set of input parameters, a method

performs some calculation and returns a well defined result

• Integral: Area under a function’s curve between a range of points, which could possibly be infinite

• Derivative: The slope of a function at a particular point

• Transform: A calculation that transfers a problem from one domain (coordinate space) to another, while maintaining the problem’s characteristicsNote: derivatives and integrals are functions themselves. Given one

function, we can in a well-defined way, compute the results

Page 10: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

Example

Page 11: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

Example

• The derivative of x2 = 2x (Notation: f’(x2) = 2x)lim ∆x->0 ( (x+∆x)2 – x2 )/ ∆x

= lim ∆x->0 (x2 + 2x∆x + ∆x2 – x2)/∆x = lim ∆x->0 (2x + ∆x) = 2x

• Fortunately, tables of derivative functions proved by mathematicians exist. We can simply look up the derivatives to the functions we are working with.

• Some common derivatives that are useful to memorize:– f’(xn) = nxn-1

– f’(Sin kx) = kCos x, f’(Cos kx) = -kSin x– f’(ex) = ex, f’(eax) = a eax

Page 12: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

Tables: Common Integrals/Derivatives

Page 13: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

Taylor’s Theorem

• Taylor’s Theorem– f(x) is nicely behaved (continuous without sharp points)– We can evaluate the function and its derivatives at point (a)– THEN

f(x) = f(a)+f'(a)*(x-a)/1!+f''(a)*(x-a)2/2!+f'''(a)(x-a)3/3! + ···

• Taylor applied to sin(x), cos (x), and ex

ex = 1 + x/1! + x2/2! + x3/3! + ...

sin(x) = x - x3/3! + x5/5! - x7/7! + ...

cos(x) = 1 - x2/2! + x4/4! - x6/6! + ...

Page 14: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

The amazing number e = 2.718281828459005…

• Relates to Compound Interest: e = limn->∞{(1 + 1/n)n} When n = 1 e ≈ 2When n = 2 e ≈ (1 + ½)2 = 9/4 = 2.25When n = 3 e ≈ (1 + 1/3)3 = 64/27 = 2.37037When n is extremely large, it approaches the value: e = 2.718281828 …

• Relates to the Taylor series: ex = 1 + x + x2/2! + x3/3! + x4/4! + …If x = 1, e = 1 + 1 + ½ + 1/6 + 1/24 + … + 1/n! + …When n = 3, e ≈ 1 + 1 + 1/2 + 1/6 = 2.66667When n is extremely large, it approaches the value: e = 2.718281828 …

• Other amazing characteristics–Euler’s formula: ejx = cos(x) + jsin(x) relates e to the ratio between lengths of sides of a right triangle, and also to the roots of unity–The function ex is special because it’s the function describing its integral and derivative is itself

Page 15: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

Understanding Digital Signal Processing, Third Edition, Richard Lyons(0-13-261480-4) © Pearson Education, 2011.

Page 16: Complex Numbers Complex numbers are written a + bi –a and b are real numbers –i (or j) satisfies the equation: Characteristics of Complex Numbers –Extend

Understanding Digital Signal Processing, Third Edition, Richard Lyons(0-13-261480-4) © Pearson Education, 2011.

Phase change over time with complex numbers