### Author Topic: Calculating power with complex numbers  (Read 1322 times)

0 Members and 1 Guest are viewing this topic.

#### Simon

• Global Moderator
• Posts: 13124
• Country:
• Did that just blow up? No? might work after all !!
##### Calculating power with complex numbers
« on: December 14, 2015, 08:32:40 am »
I have a little problem to solve. I am given a voltage and current in the form of a complex number. It is in rectangular form but I have been asked to calculate the phase difference so have converted to polar form so that I can take the difference of the angles. I am then asked to calculate the power bearing in mind that the power is volts times amps times the cosine of the phase difference angle.

Now the course itself has not explained how to calculate wattage at the moment I'm going through the maths so it has not dealt in detail with electronic matters. I expect there is a catch that I have to research myself although I'm not having much success. My gut feeling is that I need to take the modulus of the voltage and the modulus of the current or in other words the total voltage vector and total current vector which would also explain why I am then multiplying their product by the cosine of the phase angle and I can't see any point in using numbers that already involve the phase angle if the phase angle is already in the calculation.

Is my gut feeling correct?
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559

#### TimFox

• Frequent Contributor
• Posts: 897
• Country:
• Retired, now restoring antique test equipment
##### Re: Calculating power with complex numbers
« Reply #1 on: December 14, 2015, 08:40:18 am »
Yes, that is how to calculate the power from modulus and phase.
Mathematically, this is a "scalar product" or "inner product" or "dot product" in vector analysis or linear algebra.

#### IanB

• Super Contributor
• Posts: 9447
• Country:
##### Re: Calculating power with complex numbers
« Reply #2 on: December 14, 2015, 08:46:10 am »
I'm a bit rusty on this because EE is not my field, but the key thing to bear in mind is that the complex numbers are not real, they are just a mathematical "trick" to help with the calculations.

Think of it like this: the voltage and current are both sine waves, and they can either be in phase, or out of phase, or somewhere in between. The magnitude of the complex number is the amplitude of the wave (volts or amps), and the argument (angle) of the complex number is the phase angle of the wave compared to a reference wave. If two waves are in phase, the angle between them is 0°, and if the waves are out of phase the angle is ±90°. (Think of plotting voltage and current on an oscilloscope and seeing whether they line up.)

If the voltage and current waves are in phase (as with a resistive load) then the power is simply voltage x current. This is intuitive, and it also works out because the cosine of zero is one. So volts times amps times cos 0 = volts times amps.

If the voltage and current waves are out of phase (as with reactive loads like ideal capacitors or inductors), then the power is zero. This also works out because cos 90° = 0. So volts times amps times cos ±90° = 0.

If the angle is somewhere between 0° and ±90° then the power is somewhere in between two, and is given by the formula V x I x cos (phase angle).

The reason for this formula requires a mathematical derivation, and I think you are being asked to take it as read.
I'm not an EE--what am I doing here?

#### T3sl4co1l

• Super Contributor
• Posts: 13089
• Country:
• Expert, Analog Electronics, PCB Layout, EMC
##### Re: Calculating power with complex numbers
« Reply #3 on: December 14, 2015, 08:49:50 am »
|V| * |I| == |S| (apparent power)
V * I' = S = P + jQ (real power + reactive power; note the transpose on current.. I think?)

(denoting scalar / RMS values with magnitude || and leaving complex phasors as capital symbols)

Complex multiplication is quite straightforward in rectangular form, otherwise, you multiply the moduli and add the angles (or subtract, if a transpose is involved).  Which ends up the same as cos phi, or whatever.

Don't take my word for it, work out the geometry -- it's just triangles.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!

#### Simon

• Global Moderator
• Posts: 13124
• Country:
• Did that just blow up? No? might work after all !!
##### Re: Calculating power with complex numbers
« Reply #4 on: December 14, 2015, 08:57:13 am »
I see it seems like something has been missed out. Introducing phase angle or phase difference to the formula makes me think that I have to calculate a vector of the voltage and current which I have been given in rectangular form but that is just Pythagoras formula. But if I was to just multiply the two numbers in polar form I would presumably come up with the same result? Although it would not be a single number whereas if I use the voltage vector and the current vector to calculate what is probably the apparent power and then multiply by the cosine of the phase difference I am in fact calculating the real power taking into account the power factor although being a mathematical module such things have not been discussed but I am aware that this is where they will lead later.
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559

#### IanB

• Super Contributor
• Posts: 9447
• Country:
##### Re: Calculating power with complex numbers
« Reply #5 on: December 14, 2015, 09:01:59 am »
I think if you multiply voltage and current in rectangular form, then you will get a result which is power in rectangular form. This result will have two components, real power, or watts, and reactive power (in VA). The real power is the real part of the complex number and the reactive power is the imaginary part.

If the complex power were expressed in polar form, then the real power would be equal to the magnitude of the vector times the cosine of the angle.

So yes, whether you do the calculations in rectangular form or in polar form, you will get the same result in the end. Often the choice is just a matter of convenience.
I'm not an EE--what am I doing here?

Smf