30
Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan- Dearborn Math Review with Matlab: Sinusoidal Addition

Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

Embed Size (px)

Citation preview

Page 1: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

ComplexNumbers

S. Awad, Ph.D.

M. Corless, M.S.E.E.

E.C.E. Department

University of Michigan-Dearborn

Math Review with Matlab:

Sinusoidal Addition

Page 2: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

2

Complex Numbers: Sinusoidal Addition

Sinusoidal AdditionA useful application of complex numbers is the addition

of sinusoidal signals having the same frequency

General Sinusoid Euler’s Identity Sinusoidal Addition Proof Phasor Representation of Sinusoids Phasor Addition Example Addition of 4 Sinusoids Example

Page 3: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

3

Complex Numbers: Sinusoidal Addition

General Sinusoid A general cosine wave, v(t), has the form:

)cos()( tMtv

M = Magnitude, amplitude, maximum value

= Angular Frequency in radians/sec (=2F)

F = Frequency in Hz

T = Period in seconds (T=1/F)

t = Time in seconds

= Phase Shift, angular offset in radians or degrees

Page 4: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

4

Complex Numbers: Sinusoidal Addition

Euler’s Identity A general complex number can be

written in exponential polar form as:

)sin()cos( jMMMe j

)sin(Im

)cos(Re

MMe

MMej

j

Euler’s Identity describes a relationship between polar form complex numbers and sinusoidal signals:

jMez

Page 5: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

5

Complex Numbers: Sinusoidal Addition

Useful Relationship Euler’s Identity can be rewritten as a function of general

sinusoids:

)sin()cos( tjMtMMe tj

)sin(Im

)cos(Re

tMMe

tMMetj

tj

tjMetM Re)cos(

Resulting in the useful relationship:

Page 6: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

6

Complex Numbers: Sinusoidal Addition

Sinusoidal Addition Proof Show that the sum of two generic cosine waves, of the

same frequency, results in another cosine wave of the same frequency but having a different Magnitude and Phase Shift (angular offset)

)cos()(

)cos()(

222

111

tMtv

tMtv

)cos()(

)()()(

333

213

tMtv

tvtvtv

Given:

Prove:

Page 7: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

7

Complex Numbers: Sinusoidal Addition

Complex Representation

Each cosine function can be written as the sum of the real portion of two complex numbers

)cos()cos()( 22113 tMtMtv

21213 ReRe)( tjtj eMeMtv

21213 Re)( tjtj eMeMtv

21213 Re)( jtjjtj eeMeeMtv

Page 8: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

8

Complex Numbers: Sinusoidal Addition

Complex Addition ejt is common

and can be distributed out

The addition of the complex numbers M1ej and M2ej results in a new complex number M3ej 3

33 Re)( jj eMetv

213213

jjj eMeMeM

21213 Re)( jjtj eMeMetv

21213 Re)( jtjjtj eeMeeMtv

Page 9: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

9

Complex Numbers: Sinusoidal Addition

Return to Time Domain The steps can be

repeated in reverse order to convert back to a sinusoidal function of time

3

3

3

33

33

33

Re)(

Re)(

Re)(

tj

jtj

jtj

eMtv

eMetv

eMetv

)cos()( 333 tMtv

We see v3(t) is also a cosine wave of the same frequency as v1(t) and v2(t), but having a different Magnitude and Phase

Page 10: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

10

Complex Numbers: Sinusoidal Addition

Phasors In electrical engineering, it is often convenient to

represent a time domain sinusoidal voltages as complex number called a Phasor

MMejV j)(Complex Domain

Phasor: V(j)

)cos()( tMtvTime Domain

Voltage: v(t)

Standard Phasor Notation of a sinusoidal voltage is:

Page 11: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

11

Complex Numbers: Sinusoidal Addition

Phasor Addition As shown previously, two sinusoidal voltages of the same

frequency can easily be added using their phasors

TimeDomain

)cos()cos()( 22113 tMtMtv

)cos()( 333 tMtv TimeDomain

ComplexDomain332211 MMM

Page 12: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

12

Complex Numbers: Sinusoidal Addition

Phasor Addition Example

Example: Use the Phasor Technique to add the following two 1k Hz sinusoidal signals. Graphically verify the results using Matlab.

ttv

ttv

)1000(2sin3)(

)1000(2cos2)(

2

1

)()()( 213 tvtvtv

Given:

Determine:

Page 13: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

13

Complex Numbers: Sinusoidal Addition

Phasor Transformation Since Standard Phasors are written in terms of cosine

waves, the sine wave must be rewritten as:

The signals can now be converted into Phasor form

903)(902000cos3)(

02)()2000cos(2)(

22

11

jVttv

jVttv

22000cos3)2000sin(3)(2 tttv

902000cos3)(2 ttv

Page 14: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

14

Complex Numbers: Sinusoidal Addition

Rectangular Addition To perform addition by hand, the Phasors must be written

in rectangular (conventional) form

30903)(

0202)(

2

1

jjV

jjV

32)(

3002)(

)()()(

3

3

213

jjV

jjjV

jVjVjV

Now the Phasors can be added

Page 15: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

15

Complex Numbers: Sinusoidal Addition

Transform Back to Time Domain Before converting the signal to the time domain, the result

must be converted back to polar form:

23tan)3(2)(

32)(

1223

3

jV

jjV

3.566056.3)(3 jV

The result can be transformed back to the time domain:

)3.562000cos(6056.3)(3 ttv

Page 16: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

16

Complex Numbers: Sinusoidal Addition

» V1=2*exp(j*0);» V2=3*exp(-j*pi/2);

Addition Verification Matlab can be used to verify the complex addition:

903)(

02)(

2

1

jV

jV

3.566056.3)(3 jV

» V3=V1+V2V3 = 2.0000 - 3.0000i» M3=abs(V3)M3 = 3.6056

» theta3= angle(V3)*180/pitheta3 = -56.3099

Page 17: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

17

Complex Numbers: Sinusoidal Addition

Time Domain Addition The original cosine waves can be added in the time

domain using Matlab:

f =1000; % FrequencyT = 1/f; % Find the periodTT=2*T; % Two periodst =[0:TT/256:TT]; % Time Vector

v1=2*cos(2*pi*f*t);v2=3*sin(2*pi*f*t);v3=v1+v2;

tttv )1000(2sin3)1000(2cos2)(3

Page 18: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

18

Complex Numbers: Sinusoidal Addition

Code to Plot Results Plot all signals in

Matlab using three subplots

subplot(3,1,1); plot(t,v1);grid on; axis([ 0 TT -4 4]);ylabel('v_1=2cos(2000\pit)');title('Sinusoidal Addition'); subplot(3,1,2); plot(t,v2);grid on; axis([ 0 TT -4 4]);ylabel('v_2=3sin(2000\pit)');

subplot(3,1,3); plot(t,v3);grid on; axis([ 0 TT -4 4]);ylabel('v_3 = v_1 + v_2');xlabel('Time');

\pi prints

v_1 prints v1

Page 19: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

19

Complex Numbers: Sinusoidal Addition

Plot Results

Plots show addition of time domain signals

Page 20: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

20

Complex Numbers: Sinusoidal Addition

Verification Code Plot the added signal, v3, and the hand derived signal

to verify that they are the same

v_hand=3.6056*cos(2*pi*f*t-56.3059*pi/180);

subplot(2,1,1);plot(t,v3);grid on; ylabel('v_3 = v_1 + v_2');xlabel('Time');title('Graphical Verification');subplot(2,1,2);plot(t,v_hand);grid on; ylabel('3.6cos(2000\pit - 56.3\circ)');xlabel('Time');

Page 21: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

21

Complex Numbers: Sinusoidal Addition

Graphical Verification

The results are the same

Thus Phasor addition is verified

Page 22: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

22

Complex Numbers: Sinusoidal Addition

Four Cosines Example Example: Use Matlab to add the following four sinusoidal

signals and extract the Magnitude, M5 and Phase, 5 of the resulting signal. Also plot all of the signals to verify the solution.

90)1000(2cos4)(

60)1000(2cos3)(

30)1000(2cos2)(

)1000(2cos1)(

4

3

2

1

ttv

ttv

ttv

ttv

555

43215

)1000(2cos)(

)()()()()(

tMtv

tvtvtvtvtv

Given:

Determine:

Page 23: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

23

Complex Numbers: Sinusoidal Addition

Enter in Phasor Form Transform signals into phasor form

24904)(902000cos4)(

33603)(602000cos3)(

62302)(302000cos2)(

0101)(2000cos1)(

44

33

22

11

jVttv

jVttv

jVttv

jVttv

» V1 = 1*exp(j*0);» V2 = 2*exp(-j*pi/6);» V3 = 3*exp(-j*pi/3);» V4 = 4*exp(-j*pi/2);

Create phasors as Matlab variables in polar form

Page 24: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

24

Complex Numbers: Sinusoidal Addition

Add Phasors Add phasors

then extract Magnitude and Phase

» V5 = V1 + V2 + V3 + V4;» M5 = abs(V5)M5 = 8.6972

» theta5_rad = angle(V5);» theta5_deg = theta5_rad*180/pitheta5_deg = -60.8826

Convert back into Time Domain

8826.606972.8)(5 jV

8826.60)1000(2cos6972.8)(5 ttv

Page 25: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

25

Complex Numbers: Sinusoidal Addition

Code to Plot Voltages Plot all 4 input

voltages on same plot with different colors

f =1000; % FrequencyT = 1/f; % Find the periodt =[0:T/256:T]; % Time Vector

v1=1*cos(2*pi*f*t);v2=2*cos(2*pi*f*t-pi/6);v3=3*cos(2*pi*f*t-pi/3);v4=4*cos(2*pi*f*t-pi/2);

plot(t,v1,'k'); hold on;plot(t,v2,'b'); plot(t,v3,'m');plot(t,v4,'r'); grid on;title('Waveforms to be added');xlabel('Time');ylabel('Amplitude');

Page 26: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

26

Complex Numbers: Sinusoidal Addition

Signals to be Added

t2000cos1

302000cos2 t

602000cos3 t

902000cos4 t

Page 27: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

27

Complex Numbers: Sinusoidal Addition

Code to Plot Results Add the original Time Domain signals

Transform Phasor result into time domain

v5_time = v1 + v2 + v3 + v4;subplot(2,1,1);plot(t,v5_time);grid on; ylabel('From Time Addition');xlabel('Time');title('Results of Addition of 4 Sinusoids');

v5_phasor = M5*cos(2*pi*f*t+theta5_rad);subplot(2,1,2);plot(t,v5_phasor);grid on; ylabel('From Phasor Addition');xlabel('Time');

Page 28: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

28

Complex Numbers: Sinusoidal Addition

Compare Results The results

are the same

Thus Phasor addition is verified

Page 29: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

29

Complex Numbers: Sinusoidal Addition

Sinusoidal Analysis The application of phasors to analyze circuits with

sinusoidal voltages forms the basis of sinusoidal analysis techniques used in electrical engineering

In sinusoidal analysis, voltages and currents are expressed as complex numbers called Phasors. Resistors, capacitors, and inductors are expressed as complex numbers called Impedances

Representing circuit elements as complex numbers allows engineers to treat circuits with sinusoidal sources as linear circuits and avoid directly solving differential equations

Page 30: Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Sinusoidal Addition

U of M-Dearborn ECE DepartmentMath Review with Matlab

30

Complex Numbers: Sinusoidal Addition

Summary Reviewed general form of a sinusoidal signal

Used Euler’s identity to express sinusoidal signals as complex exponential numbers called phasors

Described how Phasors can be used to easily add sinusoidal signals and verified the results in Matlab

Explained phasor addition concepts are useful for sinusoidal analysis of electrical circuits subject to sinusoidal voltages and currents