Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

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 the number system to two dimensions –i 2 = j 2 = -1 2+4j Rectangular Notation Note: Mathematicians use the symbol i; DSP normally uses j

2 Polar Notation Rectangular Form 4+i3 Convert to Polar Form (5,36.87) –M = sqrt(4 2 +3 2 ) = 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

3 Understanding Digital Signal Processing, Third Edition, Richard Lyons (0-13-261480-4) © Pearson Education, 2011. Multiplications of complex numbers are rotations

4 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)/(c 2 + d 2 ) Definition: Conjugate of a + bj is a - bj

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

6 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 = 12 Radius = 1 Multiplying rotates a unit circle point by the angle of the other For N roots, other than unity, simply multiply by the magnitude

7 Euler’s Formula The properties of exponentials enable Fast multiplies/divides: M 1 e Ө1j * M 2 e Ө2j = M 1 * M 2 e j(Ө1 + Ө2) and M 1 e Ө1j / M 2 e Ө2j = M 1 / M 2 e j(Ө1 - Ө2) Reduced calculations: e 128/256 = e 64/128 = e 32/64 = e 16/32 = e 8/16 = e 4/8 = e 2/4 = e 1/2 Consise polar notation (represents magnitude and phase): Me j ϕ Elegant FFT algorithm: transfer from time to frequency domain e jӨ = M(CosӨ + j SinӨ)

8 Trigonometric Identities cos(x)=cos(-x) and sin(x)=-sin(-x) cos(x) = (e ix + e -ix )/2 sin(x) = (e ix – e -ix )/2i sin 2 (x)+ cos 2 (x) = 1 sin(x+y) = sin(x)cos(y) + cos(x)sin(y) cos(x+y) = cos(x)cos(y) - sin(x)sin(y)

9 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 characteristics Note: derivatives and integrals are functions themselves. Given one function, we can in a well-defined way, compute the results

10 Example

11 The derivative of x 2 = 2x (Notation: f’(x 2 ) = 2x) lim ∆x->0 ( (x+∆x) 2 – x 2 )/ ∆x = lim ∆x->0 (x 2 + 2x∆x + ∆x 2 – x 2 )/∆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’(x n ) = nx n-1 – f’(Sin kx) = kCos x, f’(Cos kx) = -kSin x – f’(e x ) = e x, f’(e ax ) = a e ax

12 Tables: Common Integrals/Derivatives

13 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 e x e x = 1 + x/1! + x 2 /2! + x 3 /3! +... sin(x) = x - x 3 /3! + x 5 /5! - x 7 /7! +... cos(x) = 1 - x 2 /2! + x 4 /4! - x 6 /6! +...

14 The amazing number e = 2.718281828459005… Relates to Compound Interest: e = lim n->∞ {(1 + 1/n) n } When n = 1 e ≈ 2 When n = 2 e ≈ (1 + ½) 2 = 9/4 = 2.25 When n = 3 e ≈ (1 + 1/3) 3 = 64/27 = 2.37037 When n is extremely large, it approaches the value: e = 2.718281828 … Relates to the Taylor series: e x = 1 + x + x 2 /2! + x 3 /3! + x 4 /4! + … If x = 1, e = 1 + 1 + ½ + 1/6 + 1/24 + … + 1/n! + … When n = 3, e ≈ 1 + 1 + 1/2 + 1/6 = 2.66667 When n is extremely large, it approaches the value: e = 2.718281828 … Other amazing characteristics – Euler’s formula: e jx = 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 e x is special because it’s the function describing its integral and derivative is itself

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

16 Phase change over time with complex numbers


Download ppt "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."

Similar presentations


Ads by Google