Mesh analysis - Page 1
Forum section: electronics / beginners

author: Simon
author_rank: Unknown
timestamp: December 27, 2016, 02:24:42 pm
content: Attached is a photo of an exercise I am doing. I'm trying to work out if I have written the equations out correctly. My main concern is V3 that is just dumped in there. Unfortunately most books and examples online seem to give very simple networks usually it's a three-way network with The voltage source on each of the outer branches and the centre branch is a resistor.

author: f5r5e5d
author_rank: Frequent Contributor
timestamp: December 27, 2016, 02:38:10 pm
content: http://cirlab.det.unifi.it/Sapwin/could be helpful for checking but you may still need to do some algebra since computer algebra systems don't always order/factor things the way you wantfree CAS aren't up to the standards of Maple, Mathematica but can still sometimes be helpful in circuit analysishttps://www-fourier.ujf-grenoble.fr/~parisse/giac.html

author: Simon
author_rank: Unknown
timestamp: December 27, 2016, 02:40:58 pm
content: Is it a simulation program ?

author: f5r5e5d
author_rank: Frequent Contributor
timestamp: December 27, 2016, 02:47:27 pm
content: read the page? - SapWin is a schematic entry driven Symbolic Transfer Function generator, with the option for substituting real values and doing Bode Plotsbut it is the Symbolic Equation output that is unique, valuable for verifying hand mesh analysis

author: Simon
author_rank: Unknown
timestamp: December 27, 2016, 02:48:16 pm
content: I see well the beta 4 won't launch, I'll try 3

author: Simon
author_rank: Unknown
timestamp: December 27, 2016, 02:55:32 pm
content: Because i don't have a frequency i can't convert the complex impedences into henrys. I'm really justying to check I wrote the equations right. I am using wolfram alpha to sole the equations

author: jm_araujo
author_rank: Regular Contributor
timestamp: December 27, 2016, 03:05:47 pm
content: I'm a bit rusty on my equations, but it it seems that the terms related to Z4 (1st and 2nd line) are with the wrong sign (Z4 in the diagram is "-j5").

author: Simon
author_rank: Unknown
timestamp: December 27, 2016, 03:11:11 pm
content: Yes it is certainly wrong in the first line, thank you

author: orolo
author_rank: Frequent Contributor
timestamp: December 27, 2016, 03:23:40 pm
content: Save for the Z4 sign, I get the same equations.The system is triangular: in eq1 you can put I1 in terms of I2, in eq3 I3 in terms of I2, and in eq4 I4 in terms of I2. Divide eq2 by j, substitute I1, I3 and I4, and solve for I2.

author: f5r5e5d
author_rank: Frequent Contributor
timestamp: December 27, 2016, 06:40:38 pm
content: I'd guess the expectation is for you to use superposition, simplifying the circuit for each Vsource considered independently with the others shortedproperly done the full mesh/nodal analysis will give the same answer but superpostion lets you easily do it "by inspection" with just series/parallel, I, V divider relations

author: Simon
author_rank: Unknown
timestamp: December 27, 2016, 06:58:24 pm
content: No the question specifically wants me to use mesh and then nodal.Sent from my phone so mind the autocorrect.

author: lordvader88
author_rank: Frequent Contributor
timestamp: December 27, 2016, 08:48:00 pm
content: I've never done this stuff with reactance added in, only just resistance. I'm good at math but lazy. If I ever get serious about this stuff on a real EE level I''ll be going along by proper course syllabus for 1-2nd year EE

author: Simon
author_rank: Unknown
timestamp: December 27, 2016, 08:50:05 pm
content: Quote from: lordvader88 on December 27, 2016, 08:48:00 pmYea that is what this is. With inductances it all works the same, it's just that the math is complex number math. I just use wolfram alpha for that, tutor is quite happy with me to do that. It's all a giant waste of time but one has to tick boxes in order to get to the useful stuff.

author: Simon
author_rank: Unknown
timestamp: December 29, 2016, 11:18:39 am
content: I am now asked to do nodal analysis on this circuit. The problem for me is what do I do about the branches from the top power supply that is not even referenced to ground. I have tried various permutations of equations none of which look like they will produce the same current as the mesh analysis.

author: Simon
author_rank: Unknown
timestamp: December 29, 2016, 11:26:39 am
content: my equations so far are like the attached.

author: SingedFingers
author_rank: Frequent Contributor
timestamp: December 29, 2016, 11:34:35 am
content: Quote from: Simon on December 27, 2016, 08:50:05 pmCan confirm. Did EE degree. Never used this once. Usually you just use a rough calculation and finger in air estimate, stick it in a SPICE variant and frig the values with empirical methods.Ergo, I can't remember how you do this but I'll stick with the thread in case I learn something useful

author: Simon
author_rank: Unknown
timestamp: December 29, 2016, 11:40:11 am
content: This is what annoys me so much. I am forced to jump through these hoops when in actual fact the knowledge is completely useless to me. My time would be better spent working on my own customer projects or learning something pertinent to what I am doing like programming in C. But instead in order to get all of the formal qualifications required to either land myself a better job later or be better at what I would like to do on my own I have to start at this level doing advanced physics that nobody uses any more. It's extremely annoying and I've got deadlines on it as well or rather I have to do two modules a year but this is one question out of one third of one module and with the time it is taking me there is a fat chance of that and it's all over stuff that is completely and utterly useless.

author: IanB
author_rank: Super Contributor
timestamp: December 29, 2016, 11:51:42 am
content: I would not agree that it's useless. You may not need to go through the calculations of a solution very often, but you will want to be able to replay the solution method in your mind without thinking too hard about it. It is the conceptual understanding that is important.For example, your question above: "V3 is not even referenced to ground". Doing this exercise successfully will help illustrate why "ground" is just a notational convenience and does not play any part in the actual solution.

author: Simon
author_rank: Unknown
timestamp: December 29, 2016, 11:56:58 am
content: Well unfortunately the pages and pages of drivel that I have been given to study from don't clearly explain what to do in a situation like V3. Without it having some sort of reference to somewhere the current into the node is infinite, so I have to tight down to somewhere. I also can't simulate it because I'm not giving a frequency of the voltage or the inductance of the impedances and any simulation program works on an AC voltage with a frequency and inductance values not complex numbers so I effectually have no way of resolving this. It's actually a giant waste of time studying the material I have been given. Given that this is just a massive box ticking exercise I may as well just go straight to the assignment and do my best to solve them using the study material if necessary. If I miss learning something because it is not covered in the assignment then so be it. I've spent the last month reading pages and pages of mathematical explanation which have gone straight through my head and have completely obfuscated the actual principles that I'm supposed to be learning.

author: snarkysparky
author_rank: Frequent Contributor
timestamp: December 29, 2016, 12:37:30 pm
content: I think octave ( free matlab equivalent ) will solve complex matrix equations easily.In these problems you have to attack them by shutting off the brain momentarily and just write down the equations. Don't try to consider each circuit as a special case, just concentrate on getting the equations correct. So V3 will just be another term in there. When you have the equations correct then next step is to solve them.""But instead in order to get all of the formal qualifications required to either land myself a better job later or be better at what I would like to do on my own I have to start at this level doing advanced physics that nobody uses any more""You may use it and not know that you are doing so. See learning all that theory changes how you think about things even if you don't do the calculations. You should consider if you really want to torture yourself with a engineering degree if you have no taste for the theory.BTW this class was the first in my EE program and they tried really hard to get those who don't really want it to drop out at that point. It was a tough one.

author: Simon
author_rank: Unknown
timestamp: December 29, 2016, 12:42:34 pm
content: Well I'll go back through my coursework and try and find example similar to what I have. The problem with trying to shut off and just write equations is that there are up to 4 combinations of equtions I can write, only one is right.

author: sibeen
author_rank: Frequent Contributor
timestamp: December 29, 2016, 12:47:29 pm
content: OK, I'm an old fart and have done this for quite a few years, and I'll state that it's not useless. It is actually trying to teach you a few simple rules. KVL = mesh and KCL = Nodal. Learn these grasshopper and they will stand you in good stead for the rest of your liferNow to your nodal equations. KCL states that the currents into and out of a node sum to zero.So we have node 1 which is at the top of Z4, (node 2 at top of Z5). I'm assuming here that the 'earth' is at the bottom of Z4, but in reality you can throw that wherever you want. Node 1 has 4 currents into / out of.Branch 1 = (N1 - V1)/ Z1. A simple ohms law.Branch 2 = N1/Z4. as the bottom of Z4 = 0 volts (earth) then N1 - 0 = N.Branch 3 = (N1 - N2)/ Z2. A simple ohms law.Now the tricky branch 4. Here the question is trying to teach you something. Nodes 1 and 2 are connected by a voltage. This means that whatever the voltage is at node 1 then the voltage at node 2 will be V3 less than. Doesn't matter what all the other branches are doing -Node 2 will be V3 less than Node 1.N1 = N2 + V3This is showing you that in this Nodal instance you only need to actually solve for N1. N2 is just going to be V3 less.

author: Simon
author_rank: Unknown
timestamp: December 29, 2016, 12:53:41 pm
content: Well granted the tutor has said he intends rewriting some of the module so maybe the module material is the mess i think it is. I can see where the principles can be useful but I am getting questions that are more complex than the material explains and all I need to understand is the principles not use this to solve massive stuff. The classic example is just like this but without V3.So my understanding is that we are producing equations that define currents in and out, so if N1= N2+V3 then what is the current in that branch ? or is it ok to just state a voltage in the equations ?

author: IanB
author_rank: Super Contributor
timestamp: December 29, 2016, 01:03:17 pm
content: Quote from: Simon on December 29, 2016, 12:53:41 pmWell the current law says the currents into and out of a node sum to zero, so once the currents through Z1, Z2 and Z4 are discovered, the current through V3 will be whatever is required to make the sum around the node equal to zero.

author: orolo
author_rank: Frequent Contributor
timestamp: December 29, 2016, 01:10:54 pm
content: The voltage source forces a constant current from a to b through the -5i resistor, letting pass an arbitrary current 'k'. So a nodal analysis could be like this:

author: Simon
author_rank: Unknown
timestamp: December 29, 2016, 01:23:23 pm
content: so does the voltage go into the equation at all ? I'll have another go shortly

author: orolo
author_rank: Frequent Contributor
timestamp: December 29, 2016, 01:39:43 pm
content: If you mean the V3=20/45 voltage source, it is needed in the equations to solve the circuit. If you forget the -5i impedance from a to b for a moment (it does nothing but letting pass a constant current, it is completely dominated by V3), then V3 must let pass enough current to make sure that, from a to b, there is a voltage equal to 20/45. The amount of that current is determined by voltage V3. So V3 will go into your system sooner or later.

author: Simon
author_rank: Unknown
timestamp: December 29, 2016, 03:24:40 pm
content: right so what decides if it is 120-N1 or N1-120, this is the sirt of thing that confuses me.

author: jm_araujo
author_rank: Regular Contributor
timestamp: December 29, 2016, 03:34:04 pm
content: That one I rememberYou do. You define the orientation of the currents going into and out of the node. If you where wrong, you will get a negative result (going the other way)when solving the system. Just be consistent in all the equations.I hope it makes sense, it's kind of hard to explain without visual aids, and on non native language.

author: Simon
author_rank: Unknown
timestamp: December 29, 2016, 03:44:21 pm
content: so if I assume currents going into the node external voltages will be higher and the node voltage is subtracted from the external voltage. If the current is coming out of the node the node would be at a higher voltage so the fixed external voltages are subtracted from the node voltage. Would that be correct?

author: orolo
author_rank: Frequent Contributor
timestamp: December 29, 2016, 03:51:26 pm
content: You can imagine the direction you choose for the current as the probes in a multimeter. If you swap them, the measured current changes sign, but the real current stays the same. The change in sign in the measured current compensates inverting the probes.

author: Simon
author_rank: Unknown
timestamp: December 29, 2016, 04:06:52 pm
content: yes my problem is making sure I get everything going in the same direction.

author: orolo
author_rank: Frequent Contributor
timestamp: December 29, 2016, 04:17:58 pm
content: As Araujo said, choose the orientations of the current as you see fit, and make a drawing to be sure you keep consistent (I did that in a drawing above). If, after solving for that random orientation, you get a negative current in some net, you know that the real current runs opposite to your randomly chosen direction.

author: Simon
author_rank: Unknown
timestamp: December 29, 2016, 04:41:15 pm
content: So now I am at the attached. I'm not sure it wiull give the same result as for the mesh method but I've given up giving a shit.

author: orolo
author_rank: Frequent Contributor
timestamp: December 29, 2016, 05:30:43 pm
content: The equations are not consistent, dimensionally. b - (14.14 + 14.14·i) is measured in volts, so it's not a current. The problem, like in your previous attempt, is trying to measure the current through V3 using some variation of Ohm's law.Since V3 is from a to b, you are given the fact a - b = V3 as a present, so that should be one of your equations. Now take the two nodal equations, one for a and one for b, and use them to obtain a single equation in 'a' and 'b' with the current through V3 removed. There you have two linear equations in a and b, which solve the problem.Edit:Anyway, I've solved the problem both in mesh and node, and got the same results:I1 = 16.81123818 - 22.87925079 JI2 = 25.96293849 - 40.15475552 JI3 = 18.05884700 - 22.0959085 JI4 = 28.79136562 - 42.98318264 Ja = 86.37752364 + 45.75850157 Jb = 72.23538800 + 31.61636595 J------Mesh equations (using Maple):eq1 := 0 = -120 + 2*I1 - (5*I)*(I1-I2) ;eq2 := 0 = -(5*I)*(I2-I1) - (5*I)*(I2-I4) + (4*I)*(I2-I3) ;eq3 := 0 = (4*I)*(I3-I2) + 4*I3+120*I ;eq4 := 0 = -(5*I)*(I4-I2) + (1+I)*(20*sqrt(2)*(1/2)) ;evalf(solve([eq1, eq2, eq3, eq4]));{I1 = 16.81123818-22.87925079*I, I2 = 25.96293849-40.15475552*I, I3 = 18.05884700-22.09590851*I, I4 = 28.79136562-42.98318264*I}To get voltage at nodes a, b, we compute:a = 120 - 2*I1 = 120 - 2*(16.81123818-22.87925079*I) = 86.37752364+45.75850158*Ib = 120*I + 4*I3 = 120*I+4*(18.05884700-22.09590851*I) = 72.23538800+31.61636596*I-------Now for the node, we have three equations:eq5 := a - b = (1+I)*(20*sqrt(2)*(1/2)) ; # V3 is a current source from b to a.eq6 := (120-a)*(1/2) + k + (1+I)*(20*sqrt(2)*(1/2))/(5*I) = a/(-5*I) ; # Node a.eq7 := (120*I-b)*(1/4) = k + b/(4*I) + (1+I)*(20*sqrt(2)*(1/2))/(5*I) ; # Node b.evalf(solve([eq5, eq6, eq7]));{k = -28.79136562+42.98318264*I, a = 86.37752364+45.75850157*I, b = 72.23538800+31.61636595*I}Note that the current k through V3 is -I4 in the mesh analysis.

author: orolo
author_rank: Frequent Contributor
timestamp: December 29, 2016, 07:04:04 pm
content: Sorry for the saturation. If you want to model this thing, set the frequency to 1/2Pi, so omega=1. Then the 4J impedance are 4 Henries, and the -5J impedance are 1/5 = 0.2 Farads. So you get something like the attached model. I've tested the RMS values, and they hold rather well.This thing is rather technical and very sensible to the tiny mistakes.

author: snarkysparky
author_rank: Frequent Contributor
timestamp: December 29, 2016, 07:34:42 pm
content: Phheewww. Let me put in my two cents worth. After all I worked on it for a few hours.Spice seems to verify. I only solved for three currents but the others come easily from them.

author: kulky64
author_rank: Regular Contributor
timestamp: December 29, 2016, 08:55:33 pm
content: I don't understand why orolo and snarkysparky reversed the direction of arrow on all voltage sources from original OP's direction. I respected OP's arrow directions and got this:

author: Simon
author_rank: Unknown
timestamp: December 29, 2016, 10:40:17 pm
content: Maple ? is that easier to use than wolfram alpha where you sign up to ine thing as it's all thats on offer and then find you should buy something else? Seems to be a lot of maple versions out there.

author: Simon
author_rank: Unknown
timestamp: December 29, 2016, 10:41:36 pm
content: Quote from: orolo on December 29, 2016, 07:04:04 pmYes that is true, never thought of that, was anicking over the stupid maths. So after 2 days at this hardly solved one question, uh maybe one day they will let me study transistors!

author: orolo
author_rank: Frequent Contributor
timestamp: December 29, 2016, 11:26:10 pm
content: Quote from: Simon on December 29, 2016, 10:40:17 pmMaple is a symbolic algebra package, similar to Wolfram's Mathematica and venerable Maxima (and superior to both, at least for pure math work, IMHO). A Maple license is expensive, but Maxima is free. I have also heard very good things about SageMath, but didn't find the time to mess with it. Anyway, if I were to solve lots of equations I'd downloadwxmaxima(maxima + graphical interface), which I deem more versatile than Wolfram's online tools.For example, I downloaded wxmaxima and translated the mesh problem in a few moments: maxima declares variables with ':' and represents the imaginary unity as %i:Code:eq1 : 0 = -120 + 2*I1 - (5*%i)*(I1-I2) ;eq2 : 0 = -(5*%i)*(I2-I1) - (5*%i)*(I2-I4) + (4*%i)*(I2-I3) ;eq3 : 0 = (4*%i)*(I3-I2) + 4*I3 + 120*%i ;eq4 : 0 = -(5*%i)*(I4-I2) + (1+%i)*(20*sqrt(2)*(1/2)) ;res : solve([eq1,eq2,eq3,eq4]);expand(float(res));The answer being:[[I4=28.79136561796584-42.98318264169568*%i,I3=18.05884700508457-22.09590851186492*%i,I2=25.96293849321965-40.15475551694949*%i,I1=16.81123817796539-22.87925078813564*%i]]Very easy to modify and play with.

author: rstofer
author_rank: Super Contributor
timestamp: December 31, 2016, 12:41:23 am
content: Quote from: orolo on December 29, 2016, 11:26:10 pmI decided to follow the same path with wxMaxima/Maxima, copied your code block and got the same answers. Looking at the results of res = ..., I sure wouldn't want to do this by hand!I have also found Microsoft Mathematics (free) to be useful as is GNU Octave. I didn't try to solve this problem using either program because the equation notation for Maxima seems more intuitive.The thing I find staggering is that, once upon a time, I used to do this stuff with a sliderule. Calculators (like the HP35) didn't come out until my senior year. I didn't have one but I certainly admired the capability. I did have a plug-in 4 function calculator but it was pretty useless.

author: Simon
author_rank: Unknown
timestamp: December 31, 2016, 11:51:30 am
content: Microsoft mathematics seems user friendly. Unless i use software to solve it I will never get it done as with complex numbers it's just not going to happen and I'd need to solve every iteration that I come up with until I get an answer.

author: kulky64
author_rank: Regular Contributor
timestamp: December 31, 2016, 12:26:31 pm
content: Matlab is pretty elegant too:Code:format longV1 = 120; V2 = 120i; V3 = 20*(cos(pi/4)+i*sin(pi/4));Z1 = 2; Z2 = -5i; Z3 = 4; Z4 = -5i; Z5 = 4i;Z = [Z1+Z4 -Z4 0 0;-Z4 Z2+Z4+Z5 -Z5 -Z2;0 -Z5 Z3+Z5 0;0 -Z2 0 Z2];V = [-V1; 0; V2; V3];I = inv(Z)*VI_modulus = abs(I)I_angle = rad2deg(angle(I))Results:

author: rstofer
author_rank: Super Contributor
timestamp: December 31, 2016, 04:25:40 pm
content: Quote from: kulky64 on December 31, 2016, 12:26:31 pmThat's really slick! I own a copy of Matlab and have been using the Simulink package to play around with analog computing. I can even add knobs and dials to my models. It works really well! For some reason, I have been fooling around with differential equations for the last couple of years.However, I have absolutely no knowledge of Matlab itself so replicating your example was interesting. Obviously I got the same results but the thing I like is how clean the input is. It is really easy to follow along with the equations.Where this becomes important is finding a math package that will be useful to my grandson as he wanders through college. I'm looking at Matlab, Octave, Maximua, Microsoft Mathematics and I'll probably find a couple of others. It's a given his major won't be Mathematics and it probably won't be EE. Right now he's looking at Economics (math will be useful) or Software Engineering (I don't see math as a major component). Apparently, he will be required to take math up through Differential Equations regardless of the major.I need to try and keep up!Completely off topic, here is the Simulink diagram for the Predator-Prey problem in differential equations:

author: Simon
author_rank: Unknown
timestamp: December 31, 2016, 04:27:26 pm
content: Well I've decided to guve up, I have some equations, some sort of a result and have wasted too much time on it already. All I need to do is get a pass, tick the box and get on with life.

author: rstofer
author_rank: Super Contributor
timestamp: December 31, 2016, 05:11:24 pm
content: Quote from: Simon on December 31, 2016, 04:27:26 pmI think the exercise is to write the loop and node equations. Solving them is a computer process where there is little 'electronics' learning but it does require stumbling through the User Manual. Unfortunately, these problems won't be in the Quick Start Guide (if one exists) so it can take a little effort.It looks to me like you have the right equations and that was the point of the exercise (I think...).I learned (relearned?) a lot by following along. One thing I relearned is the foibles of using the arctan() function on a calculator. In the Matlab solution, if you take the last current (approx -28.8+43.0i) and stuff that into a calculator as real numbers, you will get an angle of -56 degrees (more of less). Note that Matlab got the proper answer of about 124 degrees (180 degrees away) and you can see that 124 is correct if you plot the value on the x-i plane. The domain of arctan() is -90 deg .. +90 deg. I need to remember that!If your calculator can do complex arithmetic (like my HP 48GX and MANY others), you will get the correct answer as did Matlab.The elegance on the Maxima and Matlab solutions is just awesome! I wish we had had this type of thing when I went to EE school. I could have spent more time on concepts and less time enjoying my sliderule. I need to spend more time with these packages!

author: orolo
author_rank: Frequent Contributor
timestamp: December 31, 2016, 05:18:38 pm
content: Quote from: Simon on December 31, 2016, 04:27:26 pmWhat is the problem, exactly? For the node equations, you need to measure the currents entering/leaving each node. When a resistor connects two nodes, you can use Ohm's law, I = V/R, so you implicitly do the substitution. Instead, if a current source like V3 connects two nodes, you can't use Ohm's law beacuse it's a voltage source, not a resistor. So you need to use the the voltage source defining equation, a-b=V3, and from there obtain the current across V3.Think in terms of nodes and the elements that connect them. Imagine two nodes, a and b, and some element that joins them. Depending on the connecting element, you get an equation:Connected by a resistor R --> I_ab = (V_b - V_a) / RConnected by a current source Is --> I_ab = IsConnected by a voltage source V --> a - b = VThe problem with the last case is that you don't have I_ab in the equation, so obtaining the current for that node is a bit more indirect. In the other cases, you just substitute I_ab directly into the nodal equation, without thinking about it.Post your equations, it's a pity you give up on the problem. These things become routine, once the pieces click in.

author: Simon
author_rank: Unknown
timestamp: December 31, 2016, 05:54:12 pm
content: Well for the nodal analysis the voltage source throws it right out. The resistance is 0 and you can't devide by 0 to get the current. I can't put a voltage into the equation. So does that make it a system of 3 equations ? I can add a "k" to take up the extra current but my knowledge of math is not enough to tell me if I am formulating dit right. I can simulate the hell out of it but that won't give me the equations. if I use a "k" I need to have a third equation for anything to want to solve it for me which would be V1-V2=14.14+i14.14.Yes the whole point is to find the equations not show the working out, the tutor has already said he only want to see that I have understood how to do it, but I have not because all of the pages of mathematical drivel I have read is only for simpler examples and this is a whole new concept. I have a simialr thing with a delta star question where now they want to know the power which they have not explained so I might as well ditch this course material and use seperate books (and this drivel costs nearly £500 a module up from £200 a few years ago, what I get for my employers money other than the act of marking an assignment is a mystery to me)I could ignore the extra voltage source perhaps and work only in terms of the node I need to find the voltage at.My assumption is something like:for left node = x, right hand node = y and the mystery current = kleft node: (120-x)/2 + (0-x)/(-i5) + k + (-14.14-i14.14)/(-i5) = 0right node: (i120-y)/4 + (0-y)/4 + k + (14.14+i14.14)/(-i5) = 0the third equation to shut the software up: x-y=14.14+i14.14The result of that in microsoft mathematica is attached - I'm sure this is yet another version of the many I have tried and might have done a better job this time as the difference between the voltages at the nodes actually looks like 14.14+i14.14

author: orolo
author_rank: Frequent Contributor
timestamp: December 31, 2016, 06:18:19 pm
content: Ok, at first sight, you forgot the imaginary unit at: (0-y)/4, which should be (0-y)/(4I). The rest is formally correct, let me solve it to see if it works, I haven't checked the current directions for consistency.Edit: The current k is inconsistent, because it enters one node and leaves the other. So in one nodal equation you must use k, and in the other -k. With that, your equations give the correct results.Instead of using the idea: the sum of all currents is zero, it is best to give an orientation to each wire, and use for each node: sum of incoming currents = sum of outgoing currents. From there, the opposite signs for k (and for 14.14 + 14.14J, which you did well) are obvious.

author: IanB
author_rank: Super Contributor
timestamp: December 31, 2016, 06:26:08 pm
content: Quote from: Simon on December 31, 2016, 05:54:12 pmI'm not quite sure if you are reading what people have been saying here to help you?For example, right above your post:Quote from: orolo on December 31, 2016, 05:18:38 pmWhen there is a voltage source you cannot use Ohm's law, but you can write an equation about the difference of the adjacent node voltages.It is important to pause and reflect on what people write and not skip over things in a panic.

author: Simon
author_rank: Unknown
timestamp: December 31, 2016, 07:35:33 pm
content: Well this is where it gets confusing because the theory says to assume all being summed or subtracted and let the signs take care of themselves. a +K would probably end up as +-k or would the + still throw it ?

author: IanB
author_rank: Super Contributor
timestamp: December 31, 2016, 07:54:39 pm
content: Quote from: Simon on December 31, 2016, 07:35:33 pmIn your original diagram the voltages have arrows indicating their direction. Here, "direction" in AC terms has the same meaning as "sign" in DC terms. So for example, if the arrow on V3 points from b to a, then the equation becomes:V3 = Va - VbHowever, if the arrow happened to point from a to b, then the equation would be:V3 = Vb - VaIf you do this then everything will work out appropriately.

author: Simon
author_rank: Unknown
timestamp: December 31, 2016, 07:56:31 pm
content: well yes voltages have direction and are given. But the theory told me to subtract all terms or add them. Now if I make K negative in the second equation i get a totally different result. This is a bloody minefield.

author: orolo
author_rank: Frequent Contributor
timestamp: December 31, 2016, 07:57:34 pm
content: Quote from: Simon on December 31, 2016, 07:35:33 pmThe theory says that you must add all the currents converging into the node.In order to do that, you must make sure that the currents are incoming into that node, consistent with the global orientation you chose for the circuit.For example, when writing the equation for the left node, you did:left node: (120-x)/2 + (0-x)/(-i5) + k + (-14.14-i14.14)/(-i5) = 0Since you are adding all these currents, you are using the fact that they are converging into node x: a <---(k)--- b, and also: a <---(-14.14-i14.14)/(-i5)--- bWhen it's time to write the equation for node 'y', you must add currents converging into that node, so:a <---(k)--- b turns into: a ---(-k)---> ba <---(-14.14-i14.14)/(-i5)--- b turns into: a ---(14.14+14.14i)---> bNote that a <---(k)--- b and a ---(-k)---> b are saying exactly the same, but in order to add currents converging into the node, you must choose the latter. So the equation is:right node: (i120-y)/4 + (0-y)/(i4) - k + (14.14+i14.14)/(-i5) = 0So, yes, in the second eqation you used +(-k) = -k.Anyway, for me it works better to choose a clear orientation for each wire and separately add incoming and outgoing currents in each node.

author: Simon
author_rank: Unknown
timestamp: December 31, 2016, 07:58:01 pm
content: (posted while previous post was being written)I can't know which way every current goes until I do the math. This case is rather awkward as both sources are the same voltage albeit 90 degrees out of phase. I suppose the only certainty with K is that because it IS driven by a voltage of known sign it's direction is known

author: Simon
author_rank: Unknown
timestamp: December 31, 2016, 08:00:03 pm
content: I see so the equations need to work with each other. So ait does not matter the sign of K but that it's oposite as it can't enter or exit both nodes.

author: IanB
author_rank: Super Contributor
timestamp: December 31, 2016, 08:03:32 pm
content: Quote from: Simon on December 31, 2016, 07:58:01 pmBut you don't need to wait until the end to find out which way each current goes, you can choose this for yourself right at the start. Simply draw an arrow on the diagram next to each current path, and whichever way that arrow points, that is the way the current goes. Then write down the equations accordingly.After you have solved everything, it might turn out that some currents have negative values. This is perfectly fine. If a current has a negative value it is simply going in the opposite direction of the arrow.(And I made a blunder in that last paragraph! When you are dealing with complex numbers in AC theory there are no negative and positive numbers. Complex numbers do not have a sign!)

author: rstofer
author_rank: Super Contributor
timestamp: December 31, 2016, 08:07:54 pm
content: If you swap the signs of the k terms, both of them together, you will get different answer for the k result. The signs of the terms will swap.For your original equations, I got something like -29+43i but when I make a different assumption for k (now negative in the node x equation), I get 29-43i.Which leads me to a question: When we do this stuff for DC, it is obvious when we have an incorrect assumption because the sign of the real number will be negative. How do we tell in the case of AC and complex numbers? Do we just look at the real component?

author: kulky64
author_rank: Regular Contributor
timestamp: December 31, 2016, 08:17:19 pm
content: Quote from: rstofer on December 31, 2016, 08:07:54 pmModulus of complex number will be the same, but the phase will be 180 degrees shifted.

author: IanB
author_rank: Super Contributor
timestamp: December 31, 2016, 08:21:47 pm
content: Quote from: rstofer on December 31, 2016, 08:07:54 pmThe current doesn't have an "absolute" value like -29+43i or 29-43i; rather the current is expressed relative to some reference voltage and it leads or lags this voltage. So for example if we look at the direction arrow on V3, then this sets what should happen to the current in the V3 branch relative to this arrow. Given the direction of the arrow, there is only one possible outcome.

author: kulky64
author_rank: Regular Contributor
timestamp: December 31, 2016, 08:24:03 pm
content: Calculating nodal voltages is easy:

author: Simon
author_rank: Unknown
timestamp: December 31, 2016, 08:26:40 pm
content: yes but just putting -K instead of +K in one equation completey changes the absolute numbers and their signs. So on the one hand the theory I was given says just add everything OR subtract everything and if you add them all the currents that instead leave the node and there will be at least one will come negative. Or does this only apply to actual numbers or expresions with numbers and not to variables or constants (we define the voltages to ground 0-x and 0-y in order to effectively get -x and -y)

author: rstofer
author_rank: Super Contributor
timestamp: December 31, 2016, 08:54:00 pm
content: Quote from: Simon on December 31, 2016, 08:26:40 pmIf you swap the signs of K in both places, no change occurs to Vx or Vy. Only the value of K changes from +Re -Im to -Re +Im. A 180 degree phase change as would be expected.

author: rstofer
author_rank: Super Contributor
timestamp: December 31, 2016, 08:55:46 pm
content: Quote from: Simon on December 31, 2016, 05:54:12 pmBTW, nice use of Microsoft Mathematics!

author: Simon
author_rank: Unknown
timestamp: December 31, 2016, 09:04:22 pm
content: Quote from: rstofer on December 31, 2016, 08:54:00 pmWell this all comes down to the deep theory of this sort of analysis that was not covered in my course material, they did similar circuits without the "extra" voltage source and with one vertical branch. the whole concept of an extra constant voltage thrown in there and turning what would have been a 2 term equation setup into a 3 equation one. I'd have never have gotten anywhere without the help here. Once again I have learnt more trying to do the assignment than reading tens of pages of meaningless maths.At present the course is going something like:read course material - forget all the deap maths as there is 200 pages of drivelget totally confused and consult a real book.attempt assignment only to discover that the course material too 100 pages to explain what could have been explained in 20 pages and that I need more information than the course material gives despite it being 5 times the amount of material required and start reasding the book and consulting the forum. This is a very long winded process. I am on the verge of abandoning the course material and jiuat studying for each question using the book and forum.

author: Simon
author_rank: Unknown
timestamp: December 31, 2016, 09:08:20 pm
content: Quote from: rstofer on December 31, 2016, 08:55:46 pmYea, they managed to turn out a program that is user friendly and does not need a session of RTFM before you can get anything done.

author: rstofer
author_rank: Super Contributor
timestamp: December 31, 2016, 09:47:34 pm
content: Quote from: Simon on December 31, 2016, 09:08:20 pmWe have been using it for my grandson't PreCalc class for the past two semesters. We mostly use it to plot functions rather than crunch numbers.For some mysterious reason, they messed up the graphics and the calculator interface is very difficult to use on high res displays. This could also be a problem with Win10, I wouldn't know. I need to install it on a machine with a 1024x768 display to see if it looks better.

author: Simon
author_rank: Unknown
timestamp: December 31, 2016, 10:13:14 pm
content: yes the display is a bit small on the calculator. It's a 2010 vintage program so probably not designed to work well with screen magnification or they just buggered it up.

author: rstofer
author_rank: Super Contributor
timestamp: December 31, 2016, 10:22:05 pm
content: Quote from: Simon on December 31, 2016, 09:04:22 pmI think this has been the most interesting thread on the Forum in the several months I have been here. It's about the tools! Look at all the neat ways to solve these equations. Writing the loop equations is pretty straightforward (well, that 3rd source is a PITA) but the real issue is getting a solution. That may not be important for the course work but what we've done with Maxima, Matlab and Microsoft Mathematics has been hugely educational. I have learned a lot!Oh, BTW, there are some very talented folks visiting this thread!

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2017, 11:30:11 am
content: Having read through this thread, I thought I would just add my take on how I would approach it. It seems to me that an important part of the solution process is to start from first principles and only later try to simplify things down. To that end I wrote it out as attached, using the absolute basic theory of current balances around the nodes. One thing to note is that there is no issue with sign conventions (the labels on the drawing clarify that), and there is no new variable "K" appearing (no need).I have to be sure omitted all the later stages of substitution, simplification and numerical calculation, but those things are quite mechanical. They don't really touch on the core theory of the problem.(NOTE: I buggered up equations 4 and 8. They should be:i1 = (V1 - Va) / Z1 ( 4 )i6 = (V2 - Vb) / Z3 ( 8 )Sorry about that. I should have checked my work.)

author: snarkysparky
author_rank: Frequent Contributor
timestamp: January 01, 2017, 04:24:48 pm
content: Just define a current in each branch with an arrow showing its direction.Make equations with KCL summing the current into each node = 0Make equations with KVL going around loops. I use convention that going from minus to plus is a positive voltage step.Keep the same direction as you write terms around the loop.When going across an element in the same direction as the defined current this will be a negative voltage because the convention that follows what you would expect if it was just a resistor. It is a drop in the direction you are traveling.You can at a first step ignore all the values of the impedances, just label them as Z1,Z2........ and fill them in later. It helps sometimes because the minus in complex impedances can confuse.So when crossing an element opposite the direction of your labeled current the drop will be a plus voltage.Count the number of unknown variables. If you have the same number of independent equations you are done with the hard part. Just solve those babies.It takes practice. Lots of practice..

author: kulky64
author_rank: Regular Contributor
timestamp: January 01, 2017, 05:20:16 pm
content: Quote from: IanB on January 01, 2017, 11:30:11 amUnfortunately you buggered equations 3, 4, 6 and 8 (equations 4 and 8 are still wrong even after your "correction"). They should be:V3 = - Va + Vb ( 3 )i1 = (- V1 - Va) / Z1 ( 4 )i2 = - V3 / Z2 ( 6 )i6 = (- V2 - Vb) / Z3 ( 8 )

author: rstofer
author_rank: Super Contributor
timestamp: January 01, 2017, 06:01:08 pm
content: Quote from: kulky64 on December 31, 2016, 08:24:03 pmI have been staring at these equations for a couple of hours and I think I'm stuck.IZ1= V1 / Z1 = 60AIZ3= V3 / Z3 = 30AI can see where these would be true if V10and V20was 0V but that isn't the case. Suppose the circuit beyond Z1 and Z4 didn't even exist. The current certainly wouldn't be 60A.I'm missing something...

author: kulky64
author_rank: Regular Contributor
timestamp: January 01, 2017, 06:10:30 pm
content: Quote from: rstofer on January 01, 2017, 06:01:08 pmI can guarantee they are correct. I attached simulation from Tina-TI. I chose frequency 50 Hz and calculated capacitor and inductor values accordingly. I highlighted in red my manually calculated values of V10, V20 and Is.

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2017, 06:56:06 pm
content: Quote from: kulky64 on January 01, 2017, 05:20:16 pmKindly explain?Firstly, if the direction of V3 is from b to a, then V3 as a voltage difference is Va - Vb (destination minus source).Secondly, the current through an impedance is proportional to the voltage difference across that impedance. In your equation 4 you have written "- (V1 + Va)". This is not a voltage difference, it is a voltage sum. Therefore it cannot possibly be correct.Thirdly, the voltage V3 appears directly across Z2 according to the arrows on the diagram. Why do you wish to introduce a minus sign?Lastly, your equation 8 has the same problem as your equation 4. You have written the current in terms of a voltage sum instead of a voltage difference.

author: kulky64
author_rank: Regular Contributor
timestamp: January 01, 2017, 07:36:27 pm
content: Quote from: IanB on January 01, 2017, 06:56:06 pmAgain, you are wrong on all parts. I have attached corrected calculations. I draw 4 loops according to 2nd Kirchhoff law, numbered I. to IV. and written equations. If direction of voltage agreed with my chosen direction of loop arrow I assigned it positive value, if the direction of voltage is opposite I gave it negative value.

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2017, 07:45:39 pm
content: Quote from: kulky64 on January 01, 2017, 07:36:27 pmI'm not presenting a voltage loop analysis (KVL), I am presenting a node analysis (KCL). Don't equations 1 and 2 make that clear? The nodal analysis using the current law is the subject of the later part of the thread.

author: kulky64
author_rank: Regular Contributor
timestamp: January 01, 2017, 07:49:05 pm
content: Quote from: IanB on January 01, 2017, 07:45:39 pmSo if you are doing KCL, 2nd Kirchhoff law is not valid?

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2017, 08:00:16 pm
content: Quote from: kulky64 on January 01, 2017, 07:49:05 pmOf course it's valid. For example, in the leftmost loop we have:V1 - (V1 - Va) - Va = 0as expected.Similarly with any other loop we look at.

author: kulky64
author_rank: Regular Contributor
timestamp: January 01, 2017, 08:05:09 pm
content: Damn it dude! Look at the direction of arrow on voltage source V1. It goes from BOTTOM to TOP. Your equation would be true if it were going from TOP to BOTTOM.

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2017, 08:18:02 pm
content: Quote from: kulky64 on January 01, 2017, 08:05:09 pmEr...exactly?If we take the bottom rail as our reference, the voltage goes UP through the voltage source V1, and then it goes DOWN through Z1 and Z4 to get back to the starting point.

author: kulky64
author_rank: Regular Contributor
timestamp: January 01, 2017, 08:25:53 pm
content: This has nothing to do with any reference. You can pick reference point wherever you want.

author: rstofer
author_rank: Super Contributor
timestamp: January 01, 2017, 08:31:01 pm
content: Quote from: kulky64 on January 01, 2017, 06:10:30 pmTINA shows I_R1(1,3) as 28A at 126 deg, not 60A and you use the 60A value when you set up the matrix earlier - a short circuit current, perhaps. This is where I'm confused. It's nice that TINA gives you a tabular display. I have yet to figure out how to do that with LTSpice.I got a free copy of TINA a couple of years ago and never really used it. It is installed on another computer that doesn't see much use. I may have to look again.

author: kulky64
author_rank: Regular Contributor
timestamp: January 01, 2017, 08:57:48 pm
content: Quote from: rstofer on January 01, 2017, 08:31:01 pmCurrent Iz1 DOES NOT flow through impedance Z1. Iz1 and Iz2 are flowing as indicated on my top right picture. I replaced voltage source V1 and its series impedance Z1 with current source Iz1 with his parallel admitance Y1. This changed topology of circuit a bit, but does not have effect on nodal voltages V10 and V20. Similarly i replaced voltage source V2 and its series impedance Z3 with current source Iz2 with parallel admitance Y3. Voltage source V3 does not have any direct series impedance connected to it, so i have to leave it as is. Otherwise I would replaced it as well. Currents Iz1 and Iz2 of ideal current sources are not regular dependent circuit currents. They are FORCED by current sources and they direction is DICTATED by direction of voltages V1 and V2 respectivrely.Check this wikipedia article on how to convert voltage source to current source and vice versa:https://en.wikipedia.org/wiki/Source_transformation

author: rstofer
author_rank: Super Contributor
timestamp: January 01, 2017, 09:41:14 pm
content: Quote from: kulky64 on January 01, 2017, 08:57:48 pmGot it! Actually, I had it earlier when you converted to current sources and admittances and then I had a brain fade.

author: kulky64
author_rank: Regular Contributor
timestamp: January 01, 2017, 10:09:51 pm
content: I re-simulated this circuit with current sources just for you. You can now see where currents Iz1 and Iz2 flow. Unfortunately ammeters dont show phase angle, but trust me, I set sinusoidal current sources exactly as I calculated to 60A 0 deg and 30A +90 deg.

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2017, 10:33:07 pm
content: Quote from: kulky64 on January 01, 2017, 08:25:53 pmI know that. And since I can pick a reference point wherever I want, I chose to pick a reference point at the bottom of the circuit.Quote from: kulky64 on January 01, 2017, 08:05:09 pmMy equation satisfies the KVL. If I changed it the way you suggest, then KVL would not be satisfied. So why would you have me change it?

author: kulky64
author_rank: Regular Contributor
timestamp: January 01, 2017, 10:52:11 pm
content: I will not argue any more on this with you. If you cannot see why you are wrong, even after I drew nice loop for you according to 2nd Kirchhoff law and mechanically wrote equation in my Reply #76 for this loop, then I can't explain it any better. Just calculate some numbers according to what you think are correct equations and let's see what you will get.

author: Simon
author_rank: Unknown
timestamp: January 04, 2017, 07:00:24 pm
content: I have emailed my tutor about this particular question and he has come up with rather an interesting answer. The solution it would seem is to treat the two nodes as one "supernode". In this way the current through the resistor between the two nodes is totally irrelevant as is the current through the voltage source. This apparently is even simpler than it looks as it will then become an equation for one node having taken into account the voltage difference throughout the supernode. I hope to God this stuff is going to be useful one day because I spent three days trying to figure it out the wrong way. I can't see me ever having to solve anything like this in real life, I just need to get the ticket for doing this stuff so that I can move on to something more useful.

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 04, 2017, 11:28:06 pm
content: This problem is also dealt with at great length on the other forum:https://www.physicsforums.com/threads/ac-circuit-analysis-mesh-and-nodal.791744/

author: orolo
author_rank: Frequent Contributor
timestamp: January 05, 2017, 12:13:59 am
content: Quote from: Simon on January 04, 2017, 07:00:24 pmThat supernode idea seems like a pedantic way of introducing equation a-b=V3 into the game so, yes, a = b + V3, and only an unknwon remains: b.But it is unfair to tell you to forget about the currents, because if I'm not mistaken they were asking you to solve this using strict nodal and mesh analysis. Of course, if you can do it freestyle, you can annihilate the problem like kulky64 did with the help of admittances, or like Ian did with an exhaustive list of all the variables and equations relating them. With that last method, you could even create a computer program to solve any circuit thrown at you.By the way, the trouble arose in node analysis because V3 is a voltage source. Change V3 for a current source, and the trouble would have appeared in the mesh analysis. What is the dual concept to a supernode (a supercycle)? Does it really matter, if one has a grip on the fundaments?QuoteWhen it comes to electronics, I'm just a hobbyist, but I think this stuff if pretty useful. Eg. analysing small signal models, or when dealing with passive filters and matching networks.Review the maths involved: Rouché's theorem is the key, you need as many independent equations as there are unknowns. You can isolate one unknown at a time, which essentially amounts to Gaussian ellimination. Each wire connecting two nodes contributes an equation, and also an unknown (the current across it). In strict mathematical terms, you have agraph, which you should turn into a directed graph choosing an orientation convention for the wires. If you look at a raw spice file, it is essentially a very sophisticated graph description language.So your unknowns are: the voltage at each node, and the currents across each wire. One (arbitrary) node you can call earth, and assign 0V to it. As we said, if you have a current source at a wire, you know the current across it, so it contributes a linear equation I_wire = Is, which identifies that unknown. If you have an impedance, you get v_a - v_b = k·I_wire, a linear equation that relates the current to the node voltages. And if you get a voltage source, you have v_a - v_b = Vs, so if you know one node voltage, you know the other (the "supernode idea"). That is, you get a bunch of linear equations.Two questions remain: 1) do you have enough linear equations? 2) are these equations compatible?Question 2) is not always true: imagine two nodes connected by two different voltage sources. The equations involved are incompatible. So you must be given a coherent circuit, that's not your problem.Question 1) is more subtle. First, you must not have isolated nodes (nodes with no connecting wires). It does not take much imagination to understand that your graph must be connected, that is, you can walk from node to node using the wires. Otherwise, you can reduce the problem to solving each connected subcircuit. So it is safe to assume that your graph is connected.Assuming a connected graph, you get enough equations? Well, not always: if you only have two nodes, and they are connected only by current sources, the voltages at each end are unrelated. Here you get an undetermined problem, not an incompatible one.So what can you do? Easy: carefully list all the nodes and wires; each contributes an unknown. Then, for each wire, derive a linear equation. Then try to solve the system. If you can, mission acomplished. If you can't, signal an error. That's what spice does.

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 12:18:21 am
content: Quote from: kulky64 on December 31, 2016, 08:24:03 pmYour node voltages have the wrong sign. orolo got it right in reply #34.

author: kulky64
author_rank: Regular Contributor
timestamp: January 05, 2017, 12:20:39 am
content: Quote from: The Electrician on January 04, 2017, 11:28:06 pm139 replies in this forum, but not a single correct answer

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 12:24:35 am
content: Quote from: orolo on January 05, 2017, 12:13:59 amWhen I was taking circuits analysis a long time ago, the supernode concept hadn't been thought of yet. It is the standard thing taught nowadays:https://en.wikipedia.org/wiki/Supernode_(circuit)There is a dual concept; it's called a supermesh:https://en.wikipedia.org/wiki/Mesh_analysis

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 12:26:15 am
content: Quote from: kulky64 on January 05, 2017, 12:20:39 amorolo's answers are correct. You can find more about this problem here, including correct answers:https://www.physicsforums.com/threads/ac-circuit-analysis-mesh-and-nodal.791744/

author: kulky64
author_rank: Regular Contributor
timestamp: January 05, 2017, 12:32:16 am
content: Quote from: The Electrician on January 05, 2017, 12:26:15 amCheck picture in my Reply #74. Does orolo's or my signs match the simulation result? Or are you saying SPICE has it wrong?

author: orolo
author_rank: Frequent Contributor
timestamp: January 05, 2017, 12:39:57 am
content: Quote from: kulky64 on January 05, 2017, 12:32:16 amI think it all boils down at how do you interpret the arrows in the voltage sources in the OP's diagram. Invert all voltages, and all the results get inverted. That also goes for the spice simulation. BTW, I really liked your solution to the problem, it's simple and elegant.

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 12:45:15 am
content: Quote from: kulky64 on January 05, 2017, 12:32:16 amIt's not a question of whether Spice has it wrong. You chose to orient your voltage sources with the + sign corresponding to the tail of the arrow rather than the point of the arrow, said arrow being the one(s) shown in the image in the first post. I believe the convention is that the direction of the arrow shows the direction of voltage rise through the voltage source. This would correspond to the + sign on the source in Spice.

author: kulky64
author_rank: Regular Contributor
timestamp: January 05, 2017, 12:49:11 am
content: Arrows on voltage sources in OP's diagram are clear and unambiguous and so are the simulation results. If you have defined arrow direction, then to this given direction exists only one correct numerical value.

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 01:08:17 am
content: Quote from: kulky64 on January 05, 2017, 12:49:11 amIndeed the arrows on the OP's diagram are clear and unambiguous. The issue is whether your choice of polarity is in agreement with the convention for the meaning of arrows on voltage sources.If you put the + sign on the voltage sources VG1, VG2 and VG2 in your simulation on the other side, you will get the same result signs that everybody else is getting.

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 01:13:50 am
content: Quote from: orolo on January 05, 2017, 12:39:57 amSince the problem only wanted a current (the current out of the bottom of Z4) an elegant solution wouldn't calculate any more voltages or currents than needed to get that current. Calculating the voltage at node a would be the bare minimum needed, and in fact only one equation is needed, if we substitute Vb = Va - V3 at same time we are creating the node equation for Va.Using a math software like Matlab, Maple, or Mathematica, we can set up a 2x2 system and get the voltages Va and Vb in a compact way:

author: kulky64
author_rank: Regular Contributor
timestamp: January 05, 2017, 01:35:27 am
content: Quote from: The Electrician on January 05, 2017, 12:45:15 amSo how would you draw arrows on voltage sources E1 and E2 in the attachad picture? Would you draw arrows from top to bottom, or from bottom to top?

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 01:43:45 am
content: Quote from: kulky64 on January 05, 2017, 01:35:27 amFrom bottom to top--pointing up, in other words.Having arrows on voltage sources is non-standard in my experience. The conventions I see in current texts and classrooms is to use a circle with an arrow inside to represent a current source, and a circle with a + and - sign inside for a voltage source.I would have thought the sources in the OP's image were current sources if it weren't for the fact that they are designated V1, V2 and V3.Perhaps Simon can consult with his tutor and find out for sure what is intended.

author: kulky64
author_rank: Regular Contributor
timestamp: January 05, 2017, 01:47:38 am
content: Quote from: The Electrician on January 05, 2017, 01:43:45 amThats weird, I have never seen this convention. Anyone else?

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 01:57:06 am
content: Quote from: kulky64 on January 05, 2017, 01:47:38 amEverybody who solved it in this thread and got the same signs I did, assumed it. Also, all the results on the Physics forum thread:https://www.physicsforums.com/threads/ac-circuit-analysis-mesh-and-nodal.791744/assumed it.By the way, I'm not criticizing your work at all. Your solutions are top-notch. I just think you are making an assumption about polarity that is not conventional.

author: kulky64
author_rank: Regular Contributor
timestamp: January 05, 2017, 02:13:10 am
content: Every textbook I ever read draw arrow from place with higher potential towars place with lower potential. If you saw otherwise, please point me to that source.

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 02:39:48 am
content: Quote from: kulky64 on January 05, 2017, 02:13:10 amI haven't seen this convention in textbooks used in the USA. I think the OP's image is from a U.K. source. I have only seen it in problems and source materials posted by persons from outside the USA, but what I have seen has consistently used the direction of the arrow to indicate lower to higher potential. The direction of the arrow from lower to higher potential in the source is the same direction as the (conventional) current flow when the source is delivering power to a resistor.Can you post a picture of an illustration from one of your textbooks showing the arrow going from high to low potential?Simon, can you find out about this? What does your tutor say? Can you cite any other authorities?

author: kulky64
author_rank: Regular Contributor
timestamp: January 05, 2017, 03:18:25 am
content: Can you draw me a simple picture with voltage source, resistor and forward biased diode with voltage arrows on all components? Because this is getting ridiculous.

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 03:41:10 am
content: Quote from: kulky64 on January 05, 2017, 03:18:25 amWhat would be the purpose of doing this?I thought it was only the arrows associated with the sources in the OP's image whose interpretation is in question.

author: kulky64
author_rank: Regular Contributor
timestamp: January 05, 2017, 03:50:01 am
content: Because i would like to know how would you draw an arrow on diode whose anode is more positive than cathode. And this would clarify also in which direction an arrow on voltage source must point.

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 04:15:16 am
content: Quote from: kulky64 on January 05, 2017, 03:50:01 amI've already said several times that the convention for the arrow direction on voltage sources is in the direction of increasing potential, and I say it again. Does that provide clarification?For passive devices such as resistors and ordinary forward biased diodes, if one wanted to draw an arrow for the same reason that the arrows are shown in the OP's image, it would point in the direction of increasing potential.

author: rstofer
author_rank: Super Contributor
timestamp: January 05, 2017, 04:16:47 am
content: Quote from: The Electrician on January 05, 2017, 03:41:10 amI don't have a decent way to annotate an LTSpice schematic but you can consider I1 to be going clockwise around the loop starting at the lower left corner. The battery is a voltage gain, the resistor and diode are voltage losses. Their assumed polarity is marked.Hope it's right...

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 04:33:42 am
content: I notice that this other problem Simon posted:https://www.eevblog.com/forum/beginners/working-with-complex-numbers/uses the same convention of an arrow beside a voltage source. Apparently both of these problems are from an HNC distance learning course in the U.K.All the posts in that thread assumed that the arrow pointed in the direction of increasing potential. I would not use that "arrow" designation myself; I would use a + on the more positive end as Spice does.

author: Simon
author_rank: Unknown
timestamp: January 05, 2017, 07:55:35 am
content: At the end of the day does it matter ? as long as the rule used is consistent ?I don't know what the question author intended, the questions I feel are often asked in an ambiguos way. so I don't know if strict nodal analysis was intended and I didn't know the supernode was not a strict node method. The course does not deal in too much theory and did not explain what strict and none strict is,apparently the question was designed to be easy....... I have no faith in UK education standards.

author: IanB
author_rank: Super Contributor
timestamp: January 05, 2017, 08:37:44 am
content: All the arguing about arrow directions and conventions is like arguing whether buses should be painted red or green. The truth is that whatever direction voltage and current arrows point doesn't matter as long as you define your convention and apply it properly during the analysis. Similarly, you don't have to draw loops on the diagram if you are doing a current balance around nodes, you just need a direction arrow to give a sign convention for each current path. You only need the loops if doing a mesh analysis summing voltages around a current loop.This is all part of the "deeper" understanding of concepts and theory, which goes beyond simple mechanical application of formulas.Ultimately there is no single "correct" solution to a problem like this. There are many equivalent solutions that may be obtained depending on where you place your reference point for voltages and which direction you draw your current arrows. There are as many correct solutions as there are permutations of these choices.

author: IanB
author_rank: Super Contributor
timestamp: January 05, 2017, 08:48:03 am
content: Quote from: Simon on January 05, 2017, 07:55:35 amI think the question was easy. I wrote out the solution I posted in a couple of minutes. Simplifying the equations and crunching the numbers to complete the problem would have taken a bit longer of course, but knowing how to write down a set of equations is main learning expected of students. If you can comfortably write down some equations to define the problem then you are on the way to solving any problem you are presented with--and you will find that core knowledge helps you in many ways in future. (For example, this kind of analysis does not have to be applied to an AC circuit like this, it could be applied to some electronic circuit with transistors in it.)

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 09:35:29 am
content: Quote from: IanB on January 05, 2017, 08:37:44 amIt's quite true that the choice of branch current assumed directions is arbitrary, and will have no effect on the final result. Likewise, any node can be chosen as the reference node for a nodal solution, and won't affect therelativevalues of node voltages in the result solution.But this ability to make arbitrary choices about assumed directions and polarity of currents and voltages does not apply to the 3 independent sources. The two possible ways to interpret the polarity of those sources give results with differing signs even if consistently applied to all 3 sources at the same time. Circuit voltages are always measured with respect to a reference. Considering only V1, if we choose the bottom of the source as a reference then the top can be either 120 volts or -120 volts. It has both a magnitude and polarity. Without the arrow how would we know the polarity? The arrow tells us the polarity, and the polarity matters, so the choice of whether the polarity indicates rising potential or falling potential matters.As far as whether there are many correct solutions, I think this is a question of semantics.Different choices of reference will result in different values of node voltages with respect to that reference, but the constellation of node voltages all have the same values relative to one another. There is only one correct constellation of relative node voltages.The same sort of reasoning applies to branch currents. If one person assumes the current in Z5 is upward, and another person assumes it's downward, the two solutions will result in the same magnitude for that current but with different signs. After reconciling the sign of the calculated current with the assumed direction, the actual direction, up or down, can be determined. The "actual" directions of branch currents are unique, and there is only one correct solution for actual branch current directions.The original problem only asked for a current I, which is the current out of the bottom of Z4. There is no single "correct"methodof solution, but there is most assuredly one, and only one, answer for the current I which is correct in both sign and magnitude.The direction of the required current I is indicated on the diagram, and that direction is not subject to arbitrary choice; it's part of the problem description.

author: IanB
author_rank: Super Contributor
timestamp: January 05, 2017, 09:58:41 am
content: Quote from: The Electrician on January 05, 2017, 09:35:29 amAgreed. Thanks for the additional clarification.

author: kulky64
author_rank: Regular Contributor
timestamp: January 05, 2017, 11:15:00 am
content: Quote from: IanB on January 05, 2017, 08:37:44 amThis is not part of the deeper understanding. Arrow must simply point from + to -, that is from point with higher potential to point with lower potential irrespective wheter it is voltage source or passive component. Otherwise KVL would simply not work.Check out this link:https://www.tina.com/course/13kirch/kirchRead it 2 times, 5 times or 20 times if needed. I highlighted for you some important points.

author: Simon
author_rank: Unknown
timestamp: January 05, 2017, 12:45:16 pm
content: Quote from: kulky64 on January 05, 2017, 11:15:00 amBut this is about mesh analysis where providing the relative directions are more important than the actual polarity. The nodal analysis may be affected ? I'm not good enough at maths to work that one out in a hurry. Now we are told conventional electricity goes from positive to negative, so in a DC circuit which this is not the point of the arrow would be positive as the current flows from the + through the circuit and to the -, the the arrow on the voltage source would go from - to + inside the voltage source.

author: kulky64
author_rank: Regular Contributor
timestamp: January 05, 2017, 01:10:24 pm
content: Mesh analysis, nodal analysis, superposition principle or whatever, KVL is valid universally. I'm glad you realised that INSIDE voltage source, the current flows from - to + terminal against indicated voltage arrow (I'm talking about arrow as is drawn in the posted link, not your weird-ass belief). Therefore power V*I inside voltage source must be negative. On load, for example resistor the voltage arrow and current arrow are in the same direction, therefore power has positive sign.

author: rstofer
author_rank: Super Contributor
timestamp: January 05, 2017, 04:32:38 pm
content: Quote from: kulky64 on January 05, 2017, 11:15:00 amI don't know if TINA is being deliberately obtuse or not but I certainly don't agree with their assumed current directions nor the related loop equations.In the schematic on your attached page, I would have started at the bottom left corner and used the voltage source as the only gain (+) in the circuit and the two resistors as the two losses (-). In other words, my signs would be exactly opposite in the loop equation. +Vs- I1*R1- I1*R2= 0. Just a nice simple loop with the proper signs.I have never seen the 'arrow' notation. Sure, I draw arrows for nodal analysis but I don't use the same definition of the voltmeter and the arrow head. In the schematic, I would have chosen to make the arrow go in the direction of voltage gain through the source such that the current going into the top left corner came from the source and the current leaving the node passed through R1 and R2 on the way back to ground (-). I would still have had 0 current residual at the node (as required, current can't pile up!) but my 'arrow' through the source would have been 180 degrees the other way around.I guess it comes down to the 'arrow' notation. That's not something I have ever seen used in loop equations. We assigned assumed (+) and (-) from time to time but the arrow seems like something I missed and don't regret.ETA: There is a school of thought that says for nodal equations, all currents are assumed to be coming into the node or all currents are assumed to be going out of the node. Using the 'out of the node' thought, the direction of the arrow through the source makes sense. We'll just wind up with the wrong sign.I really like the capability of TINA for working these kinds of problems. If my grandson winds up doing EE, he can buy the Student version at quite a discount. I don't think I am interested enough to pay for the Pro version out of pocket.

author: kulky64
author_rank: Regular Contributor
timestamp: January 05, 2017, 08:23:48 pm
content: OK, now I see where the problem is. If I type in Google english phrasekirchhoff's voltage lawand do an image search, then majority of the results doesn't have voltage arrows in it (english speakers doesn't like voltage arrows) and when they do, they are highly inconsistent. Some are drawn with arrows pointing from + to -, some in the other way. But when I type for example german phrase2. Kirchhoffsches GesetzI get higly consistent results, where almost all images have volatge arrows in it and they are pointg the way I (and SPICE) suggest. Similar situation is when I do search in slovak or czech language. I guess for Americans is more intuituve when voltage arrow points against direction of current on passive components like resistors.

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 08:41:10 pm
content: Quote from: kulky64 on January 05, 2017, 11:15:00 amSo here we have the classic "dueling authorities" battle.Tina may be the only site on the internet that chooses to show the arrow in the direction of decreasing potential.All the other references I could find use the opposite direction. For example:https://en.wikipedia.org/wiki/Passive_sign_conventionhttp://fourier.eng.hmc.edu/e84/lectures/ch2/node2.htmlHere somebody asks the question and gets an answer agreeing with Wikipedia:https://www.physicsforums.com/threads/voltage-reference-direction.695989/Every single person who posted answers to Simon's two problems on the Physics Forum used the convention given by Wikipedia.Everybody on this forum other than kulky64 and Tina uses the convention given by Wikipedia.My answer to the issue is to not use an arrow, but to use + and - signs. So when encountering a problem using a voltage source whose reference direction is given by an arrow rather than + and -, beware. If possible, check with the instructor as to what is intended. If I were solving a homework problem with this issue, my answer would mention which convention I was assuming, and say that the only result of assuming the opposite would be a change of sign in answers.

author: Simon
author_rank: Unknown
timestamp: January 05, 2017, 08:45:21 pm
content: You have to use arrows as these are alternating voltages without DC polarity. You could just mark the equation quantities with + or - but putting an arrow to paper helps get it right and not loose track or consistency between multiple equations.Sent from my phone so mind the autocorrect.

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 08:49:06 pm
content: Quote from: kulky64 on January 05, 2017, 08:23:48 pmIt's not that the arrow points against the direction of current in passive components; it's that the arrow points in the direction of increasing potential inallcomponents, sources and loads alike.

author: rstofer
author_rank: Super Contributor
timestamp: January 05, 2017, 08:49:15 pm
content: Quote from: kulky64 on January 05, 2017, 08:23:48 pmI knew this would come down to a U.S. vs <everybody else in the world> kind of thing. Now, it's been 40+ years since I graduated from EE school and things could have changed but I really had never seen the voltage arrows before. Current arrows, certainly, but never voltage arrows.It's sometimes hard to remember that many of the participants here are NOT from the U.S.

author: The Electrician
author_rank: Frequent Contributor
timestamp: January 05, 2017, 09:24:54 pm
content: Quote from: kulky64 on January 05, 2017, 08:23:48 pmUsing the search term "Kirchoff's voltage law" in Google, within the first 50 hits, only 3 had an arrow associated with a voltage source, but they all but one also had a + and - sign. One followed the Wikipedia convention and the other two (one of which was the Tina site) didn't. I don't think you can conclude that use of the arrow is "highly inconsistent" with such a small sample; but regardless of their use of an arrow, they were very consistent in their use of + and -.The one that didn't also have a + and - sign was:http://www.resistorguide.com/kirchhoff-law/and the author was probably of German ancestry; he had a picture of Kirchoff himself on the site.I don't think I have seen the use of an arrow associated with a voltage source except in these two problems from the HNC coursework that Simon posted (and were also posted on the Physics forum). It's not common on the English speaking forums, and the ambiguity can be avoided by using + and - instead of an arrow.The polarity of an AC source can also be indicated by use of a + and - sign. Just realize that for this purpose it doesn't mean that the side with the + sign is always positive. It just means that the whatever voltage is given for the source, it is to be understood as explained in the Wikipedia article on the passive sign convention under the heading "AC circuits":Quote

author: rstofer
author_rank: Super Contributor
timestamp: January 05, 2017, 10:25:15 pm
content: Over on the Digilent site they have a Real Analog course of EE101.https://learn.digilentinc.com/classroom/realanalog/In the 7th lecture, the instructor talks about Nodal Analysis in considerable detail (from an American point of view). At the 40 minute mark, he talks about the Super Node idea and this applies directly to Simon's problem.One of the cool things about Nodal Analysis is that you need not be consistent in how you assign current flows into or out of nodes. You can, for example, assign all currents as leaving all nodes even though the current arrows clearly conflict. It doesn't matter, it all works out.I had gotten a little fuzzy re: shorting out voltage sources and replacing current sources with an open circuit to find independent nodes. It's a pretty good video.ETA: More on the Super Node in video 8

author: Simon
author_rank: Unknown
timestamp: January 07, 2017, 02:09:55 pm
content: Well I have watched various videos on both methods and beleive I now have a thorough understanding yet still come up ith 2 difference results, another 1/2 day down the drain. Time to move onto the next question.

author: orolo
author_rank: Frequent Contributor
timestamp: January 07, 2017, 02:23:12 pm
content: If you have them around, please post your equations and diagrams. I'm not familiar with the super node/mesh formulation, and I would like to take a look.

author: rstofer
author_rank: Super Contributor
timestamp: January 07, 2017, 04:45:06 pm
content: If you watch the videos, you will see that there is only one node and that Z2 is irrelevant. The current through Z2 is determined, if necessary, strictly from V3. The reasoning behind this is that the source, V3, has zero impedance. In the resistor sense, it appears as 0 Ohms between VAand VBshorting out Z2.Here is a video that is right on point:At 3:20, the author points out that the impedance across V3 doesn't matter.So, what you wind up with is (hopefully I get this right):-(V1-VA)/Z1+ VA/Z4+ VB/Z5- (V2-VB)/Z3= 0andVA= VB+ V3I haven't cranked this out and I certainly wouldn't want to guarantee the correctness but, if I understand the Super Node idea, this is kind of what it looks like.After I have some caffeine, I'll try to grind through these equations. One thing this thread has demonstrated, there are a number of tools that solve these kinds of equations.All in, it seems that Nodal Analysis is the easy way to deal with this circuit. I really need to spend more time thinking about this approach.BTW, there is a bunch of material that goes along with the Digilent Real Analog Circuits course:https://learn.digilentinc.com/classroom/realanalog/Note that Analog Devices wrote a lot of the material.Budding EE's might be interested in this course as a way to get started or at least a preview of what's coming at them.

author: Simon
author_rank: Unknown
timestamp: January 07, 2017, 04:56:09 pm
content: I will post my working out later. The nodal analysis I think is okay. The super node idea is in fact fairly simple. You just treat the two nodes that the voltage source spans as one node. So only one real equation is written in terms of both nodes. A second equation tells you that the left node minus the right node is equal to the voltage source. Alternatively you could probably just put that voltage into the main equation and eliminate the right hand node as a term.I've spent most of today going round in circles with the mesh analysis again having looked at a few videos including Daves. I now have it fairly clear that I draw clockwise arrows around each loop or mash or whatever you call the damn thing and make any voltage source that contributes to current going in that direction positive and any voltage drops across loads that that voltage source is driving current through negative. This of course means that when you come upon the right hand voltage source this is in fact nowt negative although apparently you also assume the voltage drops across the impedances are also negatives. But the result is vastly different from the nodal analysis result and to be honest I'm getting pretty fed up because I have very carefully followed all of the advice in the videos.

author: IanB
author_rank: Super Contributor
timestamp: January 07, 2017, 05:08:17 pm
content: Quote from: Simon on January 07, 2017, 04:56:09 pmIf we take the diagram from your first post and look at the mesh analysis, then for the leftmost loop we will have this:$$ + V_1 - I_1 Z_1 - (I_1 - I_2)Z_4 = 0$$For the rightmost loop we will have:$$ - (I_3 - I_2)Z_5 - I_3 Z_3 - V_2 = 0 $$If you wanted to make this more intuitive you could draw the \$ I_3 \$ loop anti-clockwise instead, and then you would write:$$ + V_2 - I_3 Z_3 - (I_3 + I_2) Z_5 = 0 $$Changing the loop direction from clockwise to anti-clockwise just changes the sign convention for that particular current in the equations, but ultimately the final answer should come out the same.

author: Simon
author_rank: Unknown
timestamp: January 07, 2017, 05:13:17 pm
content: Quote from: IanB on January 07, 2017, 05:08:17 pmThis confuses me, because if I just change the sign of the voltage and nothing else in that equation it changes the result with respect to the other equations. If i was to change the sign of the voltage source and the voltage drops then I can understand things may be equal.

author: IanB
author_rank: Super Contributor
timestamp: January 07, 2017, 05:21:06 pm
content: Quote from: Simon on January 07, 2017, 05:13:17 pmOK, but when you do the mesh analysis you are following the current loops. The current loop arrow indicates which way you presume the current to be flowing. (In actual fact, if the current happens to end up flowing against the arrow it will have a negative sign in the solution, but since a negative times a negative is a positive it all cancels out in the end.)So what you do is draw your current loop and you follow the current on its path around the loop. If the current flows through a voltage source from - to + then the voltage increases at that step, but if the current flows from + to - then the voltage decreases.When the current flows through an impedance the voltage always decreases with a voltage drop of \$IZ\$.If the final current happens to end up with a negative sign, then the "decrease" through the impedance is actually an "increase" (because a decrease in one direction is always in increase in the reverse direction).The important thing is that we do not need to care whether the actual current value is positive or negative when we write the equations. All we must do is respect whatever sign convention we have chosen for our current loops.

author: Simon
author_rank: Unknown
timestamp: January 07, 2017, 05:23:43 pm
content: Thats what I meant. if all loops are going clockwise and we suddenly make one anticlockwise that messes up the system of equations does it not?

author: IanB
author_rank: Super Contributor
timestamp: January 07, 2017, 05:27:22 pm
content: Quote from: Simon on January 07, 2017, 05:13:17 pmBy the way, you have notjustchanged the sign of the voltage and nothing else, you havealsochanged the direction of the current arrow. Since you have changed two signs, and a minus times a minus is a positive, the two changes cancel out and the result remains the same.Quote from: Simon on January 07, 2017, 05:23:43 pmWell no, because see my comment above. If the current arrow is reversed in direction, then the voltage change across a voltage source changes in sign according to which way you follow the current through the voltage source.

author: Simon
author_rank: Unknown
timestamp: January 07, 2017, 05:31:49 pm
content: yes but if you reverse the current arrow and thus change the voltage from - to + then you do the same for the drops across the impedences surely which would null out the effect of inverting a sources polarity and bring the same result. But in your example the drops across the impedences are still negative while the voltage is now positive, so in the overall system of 4 equations this changes things. A similar situation can arise for the top loop. I'm going by Daves video, I don't have a problemwith being consistent in assumed current direction but something is not right.

author: IanB
author_rank: Super Contributor
timestamp: January 07, 2017, 05:32:37 pm
content: In other words, it does not "mess up" the equations, but it does alter the equations we write.For instance, see where I wrote \$-(I_3 + I_2)Z_5\$. I added \$I_3\$ and \$I_2\$ together according to the convention of the direction arrows in the two loops shared by \$Z_5\$. (Note for future readers: this is when the \$I_3\$ loop has been drawn counterclockwise, rather than clockwise.)The way to look at it is to imagine yourself flowing with the current on its journey around the loop, adding and subtracting voltages for each element you pass through as you go along.

author: IanB
author_rank: Super Contributor
timestamp: January 07, 2017, 05:34:36 pm
content: Quote from: Simon on January 07, 2017, 05:31:49 pmNo, the voltagealwaysdrops when you go through an impedance. That is one of the golden rules. If you follow the current on its journey, then each time you go through an impedance you have to add a \$-IZ\$ term to your equation.

author: Simon
author_rank: Unknown
timestamp: January 07, 2017, 05:37:42 pm
content: ok my equations are:\$ 120-2I_1+i5( I_1 - I_2 ) = 0 \$\$ i5( I_2 - I_1 )+i5( I_2 - I_2 ) - i4( I_2 - I_3 ) = 0 \$\$ -i120 - i4( I_3 - I_2 ) - 4I_3 = 0 \$\$ -14.14-i14.14 + i5( I_4 - I_3 ) = 0 \$

author: IanB
author_rank: Super Contributor
timestamp: January 07, 2017, 05:38:53 pm
content: Quote from: IanB on January 07, 2017, 05:34:36 pmIf you are not convinced of this, set up a really simple DC example with a battery and a resistor. Draw a clockwise loop arrow and solve the problem. Then draw a counterclockwise loop arrow and solve the same problem. You will find the answers to be identical in each case.This must be so, because the arrow is something you have drawn on the paper for your convenience. The presence of the arrow does not change the circuit diagram in any way.

author: Simon
author_rank: Unknown
timestamp: January 07, 2017, 05:42:23 pm
content: So what your saying is to just make -i120 into i120 in the third equation ? that will change the overall result. So is this the right way and I've got the equation wrong ?

author: IanB
author_rank: Super Contributor
timestamp: January 07, 2017, 05:48:44 pm
content: Quote from: Simon on January 07, 2017, 05:37:42 pmI'm not saying they are right or wrong at this point, because I will have to carefully step through them term by term.In light of that comment, I suggest it is better to begin by writing the down the equations symbolically before substituting in the values of the variables.Firstly, it is much easier to check they are correct when written that way. And secondly, it is then a simpler step to carefully substitute in the values and keep the signs in check while doing so.For instance, I would not write \$+i5(I_1-I_2)\$, I would write \$-(-i5)(I_1-I_2)\$.Hard experience has taught me that mistakes happen if I try to take shortcuts like cancelling signs along the way like that.

author: IanB
author_rank: Super Contributor
timestamp: January 07, 2017, 05:57:09 pm
content: Quote from: Simon on January 07, 2017, 05:42:23 pmWhat I'm saying is you need to "follow the current around the loop", and don't try to put in the values until after you have checked the equation.So let's start at the bottom left. Our current goes through \$Z_5\$, so we have a drop of \$-I_3 Z_5\$. But \$I_2\$ is going through \$Z_5\$ the other way, so we also have a \$+I_2 Z_5\$ term.Next, our current goes through \$Z_3\$, giving us a \$-I_3 Z_3\$ term.Lastly our current goes backwards through \$V_2\$, so we will have a \$-V_2\$ term (negative because backwards).Adding them all up, our loop equation becomes:$$-I_3 Z_5 + I_2 Z_5 - I_3 Z_3 - V_2 = 0$$This equation we can double check to make sure it is right, and only then should we plug in the numbers.

author: orolo
author_rank: Frequent Contributor
timestamp: January 07, 2017, 06:19:13 pm
content: Quote from: Simon on January 07, 2017, 05:37:42 pmTwo small errors:-> In the second equation, it's +i5(I_2 - I_4), not +i5(I_2 - I_2).-> In the fourth equation, it's +i5(I_4 - I_2), not +i5(I_4 - I_3).With that corrected, you get the right results. The rest is perfect, even conceptually. Just tiny mistakes with the indices.

author: Simon
author_rank: Unknown
timestamp: January 07, 2017, 06:38:51 pm
content: ah, yes I wrote them out right but copied them out wrong into the post. I'll rereun the calculation later to make sure I copy it right into the computer.

author: rstofer
author_rank: Super Contributor
timestamp: January 07, 2017, 07:04:35 pm
content: Quote from: rstofer on January 07, 2017, 04:45:06 pmStuffing these 2 equations plus several definitions intoMicrosoft MathemeticswxMaxima, we get:Code:eq1 : 0 = -(V1-VA)/Z1 +(VA/Z4) + (VB / Z5) - (V2 - VB)/Z3;eq2 : VA = VB + V3;eq3 : V1 = 120;eq4 : V2 = 120*%i;eq5 : V3 = 14.14 + 14.14 * %i;eq6 : Z1 = 2;eq7 : Z3 = 4;eq8 : Z4 = 0 -5 * %i;eq9 : Z5 = 0 + 4 * %i;res : solve([eq1,eq2,eq3,eq4,eq5,eq6,eq7,eq8,eq9]);expand(float(res));We get:VA = 86.38+i45.76VB = 72.24+i31.62V3 = 14.14+i14.14 <= VA - VB = V3 as given in the problemIt's nice when the voltages balance!The Super Node idea is really the easy way to solve the nodal analysis portion of the problem. One node equation plus one identity and it's done!

author: rstofer
author_rank: Super Contributor
timestamp: January 08, 2017, 01:22:41 am
content: One last pass for Mesh Analysis (what a PITA) for wxMaxima:Code:eq1 : 0 = -V1 + Z1*I1 + Z4*(I1-I2) ;eq2 : 0 = Z4*(I2-I1) + Z2*(I2-I4) + Z5*(I2-I3) ;eq3 : 0 = Z5*(I3-I2) + Z3*I3 + V2 ;eq4 : 0 = Z2*(I4-I2) + V3 ;eq5 : VA = V1 - I1*Z1 ;eq6 : VB = VA - V3 ;eq7 : Z1 = 2 ;eq8 : Z2 = -5*%i ;eq9 : Z3 = 4 ;eq10 : Z4 = -5*%i ;eq11 : Z5 = 4*%i ;eq12 : V1 = 120 ;eq13 : V2 = 120*%i ;eq14 : V3 = 14.14*%i + 14.14 ;res : solve([eq1,eq2,eq3,eq4,eq5,eq6,eq7,eq8,eq9,eq10,eq11,eq12,eq13,eq14]);expand(float(res));We get:Code:VA=86.37610619469027 + 45.75840707964602*%iVB=72.23610619469027 + 31.61840707964602*%iI1=16.81194690265487 - 22.87920353982301*%iI2=25.96362831858407 - 40.15442477876106*%iI3=18.05902654867257 - 22.0953982300885*%iI3=18.05902654867257 - 22.0953982300885*%iI4=28.79162831858407 - 42.98242477876106*%i