Working with complex numbers - Page 1
Forum section: electronics / beginners

author: Simon
author_rank: Unknown
timestamp: December 18, 2016, 03:31:52 pm
content: I have a problem to solve as per the attached image. I have tried simulating this in Proteus but the result is wildly different from the result I calculate on paper.In order to simulate the circuit I have to convert everything into a frequency and inductance. V1 is 415 V AC at 50 Hz. The two is 415 V AC at 50 Hz but with a 90° lag. At 50 Hz the inductors are 12.7 mH and 19.1 mH. I calculate this by dividing the impedance by the angular frequency to get the inductance.Given 0.7 power factor which is lagging for a 50 ohm impedance I work that out at 35 ohms resistance and 35.7 ohms reactants which at 50 Hz is 113 mH. The resulting current through the load according to Proteus is 4.2 A. It doesn't matter which source I make the leading or lagging as the 2 ohms difference between the two inductors is neither here nor there.Trying to solve the circuit using Thevenin: resulting voltage source is 415+ J 415. The resulting source impedance is 2.4 ohms. Dividing this voltage by 35+ J 35.7 being the load impedance gives me a total current having some real and imaginary currents of 11.34 A. Vastly different from what Proteus has simulated. Have I done something wrong in either case? I'm a little bit confused about which voltage leads which but at the end of the day I can't see it causing such a difference in results. If I am using the current as the reference phase so in a Angharad diagram I assume the first voltage lags the second voltage as at time zero the first voltage will be zero in the second voltage will already be at peak. Obviously as we are talking about sinusoidal voltages the square root of two can be ignored and was clearly put in by the question designer to make things simpler as I am not using the voltage as displayed in the question I am obviously supposed to render it in a format that is more useful to me and that format would be the complex number of the RMS value. Full of pure maths of it given that everything is specified in resistance and not in Henry's I don't even need to know what the angular frequency is also obviously this is useful if I'm tried to simulate the circuit although it looks like that is tying me in further knots.

author: Simon
author_rank: Unknown
timestamp: December 18, 2016, 04:01:17 pm
content: Well I had filled in the wrong box for the simulation putting the voltage into amplitude instead of RMS but that still only gets me barely 6A still 5.34A to account for.

author: vodka
author_rank: Frequent Contributor
timestamp: December 18, 2016, 04:30:52 pm
content: Quote from: Simon on December 18, 2016, 04:01:17 pmCareful, Thevenin is an aproximation of lineal system and it is equivalent , it isn't equal to other methods of resolution circuits (According my "Theory of circuit" teacher).You may try to resolve with alternative methods as : "by Mesh", "by Nodes" and "by Superposition".

author: Simon
author_rank: Unknown
timestamp: December 18, 2016, 04:32:35 pm
content: Well I am asked to solve it by superposition and by norton. So roll on yet more different numbers.

author: mstevens
author_rank: Regular Contributor
timestamp: December 18, 2016, 04:50:37 pm
content: Sorry I did not read you whole post but this problem is pretty easy once you solve a few of them; there is not need to covert this circuit to a Norton or Thevenin eq. ckt. Convert the current sources to phasors as it seems you have done, see the web for phasors if you're not familiar. Next do nodal analysis on the node in the center at the top of the circuit; by inspection i=I1<delta1+I2<delta2, where < means angle... so not you have i in phasor form as the sum of the other two currents, that is KCL.If you know i and you know Z, S=VI*, that reads apparent power = V times the complex conjugate of I. And you know that V=IZ; now you should have all you need to solve for whatever you need.Hope this helps.

author: Simon
author_rank: Unknown
timestamp: December 18, 2016, 05:02:13 pm
content: Unfortunately the question actually asks me to use Norton and thevenin as well as superposition. I am a bit confused about how I go about summing up phasors. If the angle is different between phasors which in this case they are by 90° how can I add them up? I have been working with complex numbers instead as this seems to be far simpler. I calculator only allows me to use phasors or complex numbers not both. My course notes show both been used together was of course don't show the actual working out.

author: orolo
author_rank: Frequent Contributor
timestamp: December 18, 2016, 05:16:09 pm
content: QuoteShouldn't the Thevenin equivalent voltage be affected by the 4J/6J voltage divider?Edit: I don't know if the objection is clear. I mean, two voltage sources V1, V2 sepparated by two impedances in series Z1, Z2, give a voltage at the middle Veq = (Z2*V1 + Z1*V2)/(Z1 + Z2). Make V1 = 415J, V2 = 415, Z1 = 4J, Z2 = 6J, and you get: Veq = 166 + 249J, not 415 + 415J.

author: radiogeek381
author_rank: Regular Contributor
timestamp: December 18, 2016, 05:17:26 pm
content: Homework assignment? Your efforts may be helped by reviewing two procedures:solving branch currents by superposition, and converting thevenin circuits intoNorton equivalents.First, you have correctly calculated the actual load impedance... good. Don't getwrapped up in calculating the inductances, the impedance of the componentsmatter here.Some other posters may have been mislead by the somewhat unconventionalrepresentation in the drawing, or perhaps I have been. I'm assuming herethat V1 and V2 are voltage sources.So, a quick reference to the Wikipedia entry on superposition suggests thatyou calculate the current flowing out of V1 (and through the j4 ohm inductor) by shorting V2and calculating the current from V1 with ohm's law. Do the same with V2by shorting V1. Now you know that i is the sum of the two currents....The Norton solution involves applying Norton's theorem to the left and rightbranches to produce a Norton equivalent source. That will get you to thepoint where you have two current sources and three parallel loads. The restis Ohm's law again.Review of Norton's Theorem: we can convert any combination of voltagesources and linear components into a single current source in parallelwith an impedance by measuring the short circuit current and the opencircuit voltage. (where "any" means "not any" but something like lineartime invariant. Circuits with dependent sources need a different approach,but the principle is similar.)As for phasor addition, convert anything that looks like A*sin(wt+phi) intocomplex form cos(phi) + j*sin(phi) -- as long as we're all at the same frequency,everybody is happy. You can convert back by taking the two argument arctan,taking care to put the angle in the correct quadrant based on the signs ofthe imaginary and real parts.

author: Simon
author_rank: Unknown
timestamp: December 18, 2016, 05:47:21 pm
content: Yes this is part of my HNC coursework. I have hundreds of pages on this stuff, it goes into so much mathematical detail that I get lost. So I'm trying to distill out the information i need to actually do something with it,.

author: Simon
author_rank: Unknown
timestamp: December 18, 2016, 05:52:29 pm
content: Quote from: orolo on December 18, 2016, 05:16:09 pmHow do you arrive at that ? I thought i had to find the equivalent voltage by looking "into" the load terminals where i would see the two voltage sources as one as I "probe" with an infinite impedence and then the source impedence is the resulting impedence having shorted the voltage sources which puts the two inductors in parallel.

author: orolo
author_rank: Frequent Contributor
timestamp: December 18, 2016, 06:03:41 pm
content: For the equivalent voltage, disconnect the 50 Ohm resistor, and compute the voltage from that node to the other side of the resistor, which is ground.

author: Simon
author_rank: Unknown
timestamp: December 18, 2016, 06:19:07 pm
content: yes and you "look" with infinite impedence so all you see is two sources in parallel. Which in complex notation is 415+j415

author: orolo
author_rank: Frequent Contributor
timestamp: December 18, 2016, 06:25:07 pm
content: Quote from: Simon on December 18, 2016, 05:52:29 pmI'm sorry if I'm being opaque, I was writing from a tablet. When computing the equivalent voltage, the voltage sources remain (as opposed to when computing the resistance), so the inductors are not exactly in parallel, because each one is connected to a different voltage, v1 and v2. The best way of seeing it is that your infinite impedance probe is at the middle of a voltage divider between v1 and v2.To complete the computation:Veq = 166 + 249JReq = 2.4 OhmThe resistor sees a voltage v_load = Veq * Zload / (Zload + Req) = 152.6 + 245.9J (Zload = 35.5 + 35.7J)The current through the load is I = v_load / Zload = 5.6 + 1.3J, with modulus |I| = 5.75 A.I think that's closer to the simulation.Edit: in other words, you see the two voltage sources, but each loads the other, so from the middle point you see a middle voltage. The voltages don't simply add, nor they average, because the impedances looking into each one are different.

author: Simon
author_rank: Unknown
timestamp: December 18, 2016, 06:40:43 pm
content: Oh I see, of course because the two voltages are out of phase current flows between them so there will be voltage across the inductors.

author: Simon
author_rank: Unknown
timestamp: December 18, 2016, 06:42:35 pm
content: How do I even calculate that ? I suppose do ohms law on the two inductors to find out the current through them and the ohms law to find the voltage drops and the voltage in the middle.

author: orolo
author_rank: Frequent Contributor
timestamp: December 18, 2016, 06:52:50 pm
content: QuoteIt's a bit confussing, the first time I followed the calculations in the original post I also arrived at 11 amps or so and was puzzled. Had to backtrack step by step to find the catch.QuoteYes, the classic voltage divider but with voltages at the two extremes.v1 -- Z1 -- Z2 -- v2the current is (v1 - v2)/(Z1 + Z2).The voltage at the middle, v1 - I*Z1 = v1 - Z1 * (v1 - v2) / (Z1 + Z2) = (v1*Z1 + v1*Z2 - v1*Z1 + v2*Z2)/(Z1 + Z2) = (v1*Z2 + v2*Z1)/(Z1 + Z2)If v2=0 the classical formula for grounded divider results.

author: Simon
author_rank: Unknown
timestamp: December 18, 2016, 07:06:55 pm
content: well I assume this will have to be done as a subtraction with complex numbers due to the 90 degree phase difference or it's not possible to solve unless for a specific instant in time.

author: Simon
author_rank: Unknown
timestamp: December 18, 2016, 07:08:59 pm
content: by which calculation you get -41.5-i41.5 amps with is still the same as assuming one side is ground but takes into account the phase differences.

author: Simon
author_rank: Unknown
timestamp: December 18, 2016, 07:46:53 pm
content: Well superposition gets me 6.02A which is not far off the proteus figure of 5.99A with my calculated inductances ect.

author: Simon
author_rank: Unknown
timestamp: December 18, 2016, 07:52:33 pm
content: The thing with thevenin is do I arbitrarily decide which voltage to subtract from which ? it's not like one is higher than the other, they are identical and at some point one is 0 while the other is 415

author: orolo
author_rank: Frequent Contributor
timestamp: December 18, 2016, 08:19:16 pm
content: The formula for the divider is symmetrical if you interchange voltages and impedances. So if you take v2-v1 instead of v1-v2, the resulting voltage will be the same, but the current during the Thevenin calculation will change sign:I = (v2-v1)/(Z1+Z2), Veq = v2 - Z2*I = v2 - Z2*(v2-v1)/(Z1+Z2) = (v2*Z1 + v2*Z2 - v2*Z2 + v1*Z2)/(Z1 + Z2) = (v2*Z1 + v1*Z2)/(Z1+Z2).This is valid even if voltages are changing in time. Note that the formula is linear in v1 and v2, so it works for phasors, because the time-dependent factor e^(j*w*t) can be extracted as a common factor from v1 and v2:(v1*Z2 + v2*Z1)/(Z1+Z2) = (A*e^jwt*Z2 + B*e^jwt*Z2)/(Z1 + Z2) = (A*Z2 + B*Z1)/(Z1+Z2) * e^jwtYou get a new phasor from the two v1 and v2, where the phases-amplitudes have been transformed by the voltage divider.

author: IanB
author_rank: Super Contributor
timestamp: December 18, 2016, 08:53:55 pm
content: This is not my field so I'm kind of feeling my way with this stuff, but having said that I just tried to brute force the problem by doing a nodal analysis and I got an RMS current through the resistor of 5.978 A. (If it is in fact a resistor, but now I am not sure that it is.)Edit: if I change the load to a complex impedance I get i = 5.784 A

author: IanB
author_rank: Super Contributor
timestamp: December 18, 2016, 08:59:30 pm
content: By the way, what's the significance of the "0.7 p.f. lag" on the diagram? Is that an important piece of information that needs to be worked into the solution?In other words, is that not actually a resistor, but rather a "black box" with a complex impedance?

author: snarkysparky
author_rank: Frequent Contributor
timestamp: December 18, 2016, 09:05:24 pm
content: I gave it a try. It's been a loooooong time since my circuits class.

author: orolo
author_rank: Frequent Contributor
timestamp: December 18, 2016, 09:38:05 pm
content: Python makes for a good complex number calculator.Code:from math import *Z1 = 4.J # First inductor.Z2 = 6.J # Second inductor.ZL = 35.5 + 35.7J # Complex load.V1 = 415.J # Voltages.V2 = 415.# Thevenin equivalents:Re = 1/(1/Z1+1/Z2) # Impedance.Ve = (Z1*V2 + Z2*V1)/(Z1+Z2) # Voltage.# Results:WL = Ve*ZL/(ZL + Re) # Potential across resistor.IL = WL/ZL # Resistor current.# Prettyprint:print "Re = ", Reprint "Ve = ", Veprint "WL = ", WLprint "IL = ", ILprint "|IL| = ", abs(IL)Result:Code:Re = (-0+2.4j)Ve = (166+249j)VL = (168.225690117+235.388766382j)IL = (5.67134734094+0.927370881978j)|IL| = 5.74666837518I have emulated the circuit in LTspice and got 5.7579 Amps across the load.

author: snarkysparky
author_rank: Frequent Contributor
timestamp: December 18, 2016, 09:44:59 pm
content: i ran in LTSpice also. I get 10A there

author: orolo
author_rank: Frequent Contributor
timestamp: December 18, 2016, 09:49:45 pm
content: Here is my simulation. 586.8986V is 415*sqrt(2). The inductances are for the given reactances at 50 hertz. The complex load as calculated by the OP.

author: IanB
author_rank: Super Contributor
timestamp: December 18, 2016, 10:04:29 pm
content: Quote from: orolo on December 18, 2016, 09:38:05 pmIf the complex load is 50 \$ \Omega \$ with 0.7 p.f. lagging, shouldn't this mean that \$ \cos \phi = 0.7 \text{ (lagging)} \$ ?So \$ Z_L = 50(\cos \phi - j \sin \phi) = 50(0.7 - j0.714) \$

author: orolo
author_rank: Frequent Contributor
timestamp: December 18, 2016, 10:15:15 pm
content: Quote from: IanB on December 18, 2016, 10:04:29 pmIn fact, yes. I've been using the OP calculated values for the circuit, to match his original simulation, and since the discussion was around the Thevenin equivalents. The load should be capacitive, and in that case the RMS current, if I'm not mistaken, is 6.15 amps RMS. It just requires changing the code from 35.5 + 35.7J to 35.5 - 35.7J. Once the algebra of the problem has been solved, the rest is quite easy.

author: Benta
author_rank: Super Contributor
timestamp: December 18, 2016, 10:28:01 pm
content: QuoteThat's an extremely good question, I wondered about that myself. But not knowing the symbol usage in Simon's textbook, impossible to answer.It could be a simple resistor, but more likely a "black box" symbolizing, eg, a motor with PF. No way of knowing without more information.

author: Simon
author_rank: Unknown
timestamp: December 19, 2016, 06:43:31 am
content: Yes the load is complex, but I was of the understanding that a lagging PF is inductive, ie the current follows or lags the voltage applied.

author: Simon
author_rank: Unknown
timestamp: December 19, 2016, 08:00:13 am
content: Quote from: Benta on December 18, 2016, 10:28:01 pmThe 50 ohm impedence and lagging power factor of 0.7 iss that is needed to convert it to a resistor and inductor or capacitor.

author: Simon
author_rank: Unknown
timestamp: December 19, 2016, 12:48:54 pm
content: Using Thevenin I get 5.99A so not far off the superposition method giving 6.02, reasuring.

author: mstevens
author_rank: Regular Contributor
timestamp: December 20, 2016, 12:24:43 am
content: Correct.Quote from: IanB on December 18, 2016, 08:59:30 pm

author: Simon
author_rank: Unknown
timestamp: December 20, 2016, 07:37:39 am
content: Quote from: Simon on December 19, 2016, 12:48:54 pmActually a bit less because I forgot to add the i2.4 to the impedence at the end but hey ho I think I am done with it.

author: sibeen
author_rank: Frequent Contributor
timestamp: December 27, 2016, 09:19:28 am
content: I'll throw my two cents worth in.With the diagram showing that the complex impedance is 50 ohms 0.7 lagging this requires that the impedance have a positive j figure. So when we have a simple ohms law I = V/Z, then when the Z has a +J the current ends up with a -j answer, and is therefore lagging. So the correct impedance should be Z = 35 + 35.7J.V1 = 415. V2 = -j 415 (setting the voltages)A simple Nodal analysis then gives us the equation:(N - V1)/4j + N/(35 + 35.7J) + (N-V2)/6j = 0Solving for the single node gives us N = 235.28 - 168.14jThe current through the complex load is therefore:Iz = (235.28 - 168.14j)/(35 + 35.7J) = 0.893 - 5.72J|Iz| = 5.78Now to do a sanity check and make sure that the load current is actually lagging by the amount we need it to be.The angle of the node voltage N is arg(N) = -35.55 deg. The angle of the current is arg(Iz) = -81.12 deg.arg(N) - arg(Iz) = 45.57 deg.cos (45.57) = 0.7 and the current is lagging the voltage, so all looks good.BTW, I'm an old fart who uses mathcad, so that's why my maths is laid out as it is.

author: The Electrician
author_rank: Frequent Contributor
timestamp: December 28, 2016, 02:50:19 am
content: This seems to be a popular problem. It has been beat to death on another forum:https://www.physicsforums.com/threads/thevenins-theorem.775385/

author: sibeen
author_rank: Frequent Contributor
timestamp: December 28, 2016, 03:58:29 am
content: Just to be pedantic,and to try to avoid some confusion, in my solution I set V1 = 415. V2 = -j 415, thereby setting V1 as the reference phasor.This then gives the result as I showed:Iz = (235.28 - 168.14j)/(35 + 35.7J) = 0.893 - 5.72JIf the reference phasor is given as V2 then we have V1 =j* 415. V2 = 415This then gives the result of:N1= 168.14 + 235.28jIz = (168.14 + 235.28j)/(35 + 35.7J) = 5.72 + 0.89j.Your reference phasor makes a difference to what answer you calculate.

author: Simon
author_rank: Unknown
timestamp: December 28, 2016, 10:21:29 am
content: Quote from: The Electrician on December 28, 2016, 02:50:19 amthats because it is a course assignment question for the only university that can be bothered to do a distance learning HNC so there is only one assignment people are trying to do at home so always the same question is asked about. Which is why no one has asked for an outrigfht solution just confirmstion on the direction they are going in.I take "i" to mean that it is 90 degrees ahead of the real term voltage. To a degree the questions seem made up in such a way that it's hard to get them wrong or not be able to assign some competence to the student, but then this is yhe british education system.

author: Simon
author_rank: Unknown
timestamp: December 28, 2016, 10:28:43 am
content: and the guy in the physics forum really is clueless and has not read the course material very well. Granted it is a bit of a mess (long winded mathematical proofs with little preactical explanation on what to do with it) but power factor and what it means were clearly explained, although when you have dundreds of pages of drivel on PDF or in HTML locating the crucial few sentences that explain what to go do with it is quite hard. I bought a book by john bird to use as a reference.

author: The Electrician
author_rank: Frequent Contributor
timestamp: December 28, 2016, 10:48:57 am
content: Quote from: orolo on December 18, 2016, 06:25:07 pmSome of your numerical results are a little off because you have Zload = 35.5 + 35.7J, when in fact it's Zload = 35.0 + 35.7J

author: Simon
author_rank: Unknown
timestamp: December 28, 2016, 10:51:32 am
content: yes it looks like they didn't know which way to go. 0.7 is just shy of 0.707 which gets you 45 degrees phasor angle.

author: sibeen
author_rank: Frequent Contributor
timestamp: December 28, 2016, 01:52:57 pm
content: Quote from: Simon on December 28, 2016, 10:51:32 am*Cough*Or perhaps 0.7, or 0.8, or even 0.9 are what are common power factor style questions, or even industry standards. Nearly every generator in the world is rated at 0.8 lagging PF. The industry didn't do this because it was close to 37 degrees.