Help with branch current analysis. - Page 1
Forum section: electronics / beginners

author: antoniopetito
author_rank: Contributor
timestamp: April 03, 2013, 01:23:42 pm
content: Hello everyone,Long time reader first time poster.As you can tell from the heading, I'm kind of stuck between a hard place and a rock doing an assignment for my electronic engineering subject and I'm stuck on what to do next. I have never done simultaneous equations ever but my algebra skills are ok (I know what you're thinking; how the F&*# did you end up getting in such a subject. Yer, long story).I'm good with ohms law but shocking with this KVL/KCL nonsense, to me its just blasphemy (I know, what comes in must come out and vise verser)I will include I picture to show where I am up to if any math buffs are around willing to help to get me on the right track (I'm open for creative criticism). I'm following the same procedures to another circuit that looks similar to the one I have posted but my lecture only shows pretty much what I have shown and then just dives right into the answer.If anyone can help that would be great and I thank whoever in advance. Yes I have youtubed and googled the sh1t out of the interwebs to try and get a better understanding, without prevail.Regards,Antonio

author: c4757p
author_rank: Super Contributor
timestamp: April 03, 2013, 01:31:37 pm
content: Quote from: antoniopetito on April 03, 2013, 01:23:42 pmVice versa. And no matter how obvious it seems, it is the foundation of circuit analysis.You need to brush up on your algebra. Go look up "systems of linear equations". You are behind on your math and will soon be up the creek without a paddle if you don't rectify thatnow.

author: antoniopetito
author_rank: Contributor
timestamp: April 03, 2013, 01:44:32 pm
content: Quote from: c4757p on April 03, 2013, 01:31:37 pmAHHH CRAP!Thanks for the tip

author: Galaxyrise
author_rank: Frequent Contributor
timestamp: April 03, 2013, 05:16:08 pm
content: Everything on that sheet looks ok to me. You're just a couple of steps away from having all the values. What were you looking for help with?

author: helloworld922
author_rank: Regular Contributor
timestamp: April 03, 2013, 06:08:41 pm
content: I've always been a fan of the nodal analysis/modified nodal analysis approach. Conceptually these are very easy to setup the problem correctly, and once setup you can just solve the equations in a step by step fashion. It's so simple that MNA is the technique SPICE uses for setting up problems to be solved.If you're allowed to use MNA, here's the general steps:1. Label every node and define a ground node.2. Define a convention you're going to use for assumed current flow. I usually use current flowing out of a node is positive and current flowing into a node is negative.3. All non-ground nodal voltages are considered "unknown". In addition, every voltage source has an unknown current.4. For every node (except ground), write out the KCL equations.5. For every voltage source, add a fundamental voltage equation (i.e. Va-Vb = Vs describes a voltage source between nodes a and b).6. Solve. If you're only dealing with linear components, this is "very easy" to do: just use linear algebra (if you're not good with LA, you had better get good).There's fancy stuff you can add in to handle transients, non-linear components/fancy models, etc. but this is the basic method for solving pretty much any circuit you can imagine. No mucking about worrying what components are in parallel, series, or require a Y-delta transform, you just plug and chug.

author: olsenn
author_rank: Frequent Contributor
timestamp: April 03, 2013, 06:14:53 pm
content: I like to keep the direction of current in each loop constant, but that is ultimately up to you (as long as you keep track of this convention yourself). Kirchoff's law says that the sum of voltages in a closed loop must equal zero, which is fairly intuitive when you think about it. The voltage drop accross a resistor is I*R (Ohm's law) and currents superimpose (so for the 1-ohm resistor in your diagram, the total current through it, going downward, is I1+I2. Voltage always drops over a resistor in the direction that the current is flowing.

author: IanB
author_rank: Super Contributor
timestamp: April 03, 2013, 07:46:02 pm
content: Quote from: antoniopetito on April 03, 2013, 01:23:42 pmOK, now what stage are you at in your academic career?If you are in high school then you can be forgiven for struggling a bit, but you really will need to catch up on your mathematics.If you are in college/university studying electronic engineering, then you are in big trouble. This is the kind of elementary math problem that should be like something you do to relax after working on hard stuff. You should be seeing it as no more than a warm up exercise. Should this be your position you need to seriously think about whether you have picked the right subject to study.

author: c4757p
author_rank: Super Contributor
timestamp: April 03, 2013, 10:32:05 pm
content: helloworld922, I think every word of that was Greek to him.Ihad to take a second to focus my eyes on it and I've got no problem with this stuff.

author: helloworld922
author_rank: Regular Contributor
timestamp: April 03, 2013, 10:55:43 pm
content: Yeah, it's hard to condense Modified Nodal Analysis into a small easy to read post (quite hard to explain, straight-forward to do)Swathmore has somenoteswhich explain MNA in greater detail. They have the problem arranged in matrix form which is a great way for solving larger linear systems, but does look strange and daunting for someone not familiar with it.

author: c4757p
author_rank: Super Contributor
timestamp: April 03, 2013, 11:01:25 pm
content: I think he should probably tackle linear systems before bothering with MNA. He's got a lot of catching up to do, but it can definitely be done - probably best not to overwhelm.

author: 4to20Milliamps
author_rank: Regular Contributor
timestamp: April 03, 2013, 11:18:19 pm
content: Visualization is the key.It's really not as hard as it seems, go with what you know, and if you don't have a good grasp of how voltage and current behave in a series and parallel circuit< you probably need to review.http://www.tpub.com/neets/book1/chapter3/1-17.htm

author: IanB
author_rank: Super Contributor
timestamp: April 03, 2013, 11:25:20 pm
content: Quote from: IanB on April 03, 2013, 07:46:02 pmBy the way, you seem to have got very close with your working. Your approach is sound, and you seem just to have a problem keeping track of signs and that's what is messing you up. Everyone gets signs wrong in their algebra from time to time, it is a rite of passage and quite normal. Just go back over each line carefully and double check every term.

author: Architect_1077
author_rank: Regular Contributor
timestamp: April 04, 2013, 01:10:34 am
content: @helloworldIsn't it easier/simpler to write the equations in terms of conductances rather than resistances?Regarding the OP... he has a couple of mistakes. I didn't point them out directly as I take it the idea is for him to find out himself with just a few pointers on our part.

author: c4757p
author_rank: Super Contributor
timestamp: April 04, 2013, 01:17:00 am
content: Quote from: Architect_1077 on April 04, 2013, 01:10:34 amIt's easier not to introduce a million ways to represent the same thing until it's at least understood properly in one way. I have yet to meet a student who says "Gee, isn't it great that we use different units for this depending on the equation?"

author: antoniopetito
author_rank: Contributor
timestamp: April 04, 2013, 01:34:24 am
content: Quote from: Galaxyrise on April 03, 2013, 05:16:08 pmThanks for the feedback Galaxyrise, I'm just stuck on what to do next.I know I need to somehow get equation (4) into equation (5) or what ever way you go about it. I tried to get 1I1in equation (5) to be the same as 3I1in equation (4) and to do that I multiply equation (5) by 3 witch gives me 21-3I1=0. So from here, whats next? I also have made the circuit in LTspice to help me get somewhat on the right track.Quote from: olsenn on April 03, 2013, 06:14:53 pmSo what you're trying to say olsenn is that I should make both loops go the same way and redo my equations?Quote from: helloworld922 on April 03, 2013, 06:08:41 pmThanks helloworld922. My lecturer calls it 'node voltage analysis' (if thats the same as MNA) and for this assignment it said specifically to use branch current analysis as I have to provide the workings to get full marks or any marks at all, I maybe able to use it (to the best of my ability) on the next assignment as I'm sure thats next.Quote from: c4757p on April 03, 2013, 11:01:25 pmI like your optimism c4757p, but I have my doubtsQuote from: IanB on April 03, 2013, 11:25:20 pmIanB, It's my first year at uni after working 9 years in the IT/Telecommunications industry. I knew I needed maths but didn't realise how hard it was going to be. It's past the sensis date to change subjects, and if I do change I have to pay for the new subject and the subject I didn't do. Also I dont really want to try and catch up on a subject I just got into as I'm sure to fail. Also you mentioned that I have my signs wrong, would it be in my intrest to re-write the equation again and see where it leads me or would that be a bad idea?

author: Dave
author_rank: Super Contributor
timestamp: April 04, 2013, 01:39:08 am
content: The easiest way to analyse these simple circuits issuperposition. But keep in mind, thisonly works with linear circuits.Also, I would like to point out the incorrect use of the idiom "stuck between a rock and a hard place".You use this when you have to make a choice between doing two things, which both give you unwanted results.Let me give you an example:You are on your way your girlfriend's place, when you run into your friends, whom you have not seen in a long time, and they invite you for a drink.You are now stuck between a rock and a hard place, because you have a decision to make:a) Go for a drink with your buddies and blow off your girl. ---> She is p*ssed.b) Tell your friends you don't have time right now. ---> They think you are an a**hole.I hope that clears it up.

author: notsob
author_rank: Frequent Contributor
timestamp: April 04, 2013, 01:39:50 am
content: The UNI should have a student tutoring system, just ask, I'm sure there would be help with engineering maths.AND never be afraid to ask.

author: antoniopetito
author_rank: Contributor
timestamp: April 04, 2013, 01:56:38 am
content: Quote from: Dave on April 04, 2013, 01:39:08 amThanks Dave I'll keep that in mind for next time.Quote from: notsob on April 04, 2013, 01:39:50 amnotsob, apparently there was tute classes but the uni did some changes and removed the tute classes as from this year.

author: helloworld922
author_rank: Regular Contributor
timestamp: April 04, 2013, 02:27:38 am
content: QuoteThey're probably referring to basic nodal analysis which has troubles handling voltage sources, but they're basically the same thing. It's understandable that you have to use branch analysis for an assignment, if nothing else it gets you to think of how to think of and solve a problem from a different mindset (a very valuable skill to master). I'll leave my own biases against mesh/loop analysis outAnyways, getting back to solving the problem:Setup of KVL/KCL look correct.Take a look at the last two statements in (4) (side-node: does the forum support better math entry? this can get kind of messy):QuoteI don't know if this is an old erasure mark, but2*I1-I1!=3*I1^2.Also, take a look at the second and third statements in (5):QuoteCheck your signs.As a further hint for how to continue with solving the problem:You've already substituted the KCL equation in to get rid of I3 in the other two equations. See if you can't re-arrange one of the other equations so you can substitute in for either I1 or I2.Hope that helps without spoiling too much.

author: IanB
author_rank: Super Contributor
timestamp: April 04, 2013, 02:35:02 am
content: Quote from: antoniopetito on April 04, 2013, 01:34:24 amJust make sure you remember thata - (-b) = a + bI think I saw you get that wrong and something then cancelled that wasn't supposed to cancel.Pretty much everyone who does algebra has to remember not to change a "+" into a "-" or a "-" into a "+" during their working. It is easy to do and it will really spoil your day.

author: c4757p
author_rank: Super Contributor
timestamp: April 04, 2013, 02:40:07 am
content: That's why I usually work entirely in terms of addition and put negative signs on everything that's meant to be subtracted. Something like "a - (b + c)" gets turned into "a + -b + -c" very quickly, and I write the signs dark and clearly separate. Not as pretty, but who cares? I can clean it up later if I'm making the final version of a paper or something, and if I forget to, it's still not incorrect. I used to have massive problems with + and - until I started doing that.

author: Galaxyrise
author_rank: Frequent Contributor
timestamp: April 04, 2013, 06:01:36 am
content: Quote from: antoniopetito on April 04, 2013, 01:34:24 amI double-checked your work by using a different setup, but it seems I made a sign error of my own! Always plug your solutions back into the original equations to make sure you didn't mess up the algebraThe step you're describing above, multiplying (5) by 3, is close to a method of solving systems of linear equations. But it seems like you're operating off a dim memory of the steps and not an understanding of why you would do that. That sort of procedure isn't even really called for here. Fix up the sign error, then take a closer look at equation 5. What does equation 5 mean? What relationship does it express?The technique you were thinking of is nicely explained here:https://www.khanacademy.org/math/algebra/systems-of-eq-and-ineq/fast-systems-of-equations/v/systems-of-equations

author: antoniopetito
author_rank: Contributor
timestamp: April 04, 2013, 07:53:09 am
content: Ok so I've spent the whole day doing this nonsense and this is what I have come up with.I rewrote the KVL equations and came up with this:(I've added spaces for clarity)KVLLoop 1: 9 - 2I1- 1I3= 0____(1)Loop 2: 7 - 1I3- 1I2= 0____(2)KCLNode a: I1+ I2= I3____(3)Substituting I3from (3) into (1) and (2)(1)=> 9 - 2I1- 1(I1+ I2) = 09 - 2I1- 1I1- 1I2= 09 - 3I1- 1I2= 0_______(4)(2)=> 7 - (I1+ I2) - 1I2= 07 - 1I1- 1I2- 1I2= 07 - 1I1- 2I2= 0_______(5)Eliminating I13 * (7 - 1I1- 2I2= 0)21 -3I1- 6I2= 09 -3I1- 1I2= 021 - 6I2= 0_______(6)9 - 1I2= 0_______(7)(6) - (7)21 - 9 = 126 - 1 = 512 - 5I2= 012 / 5 = 2.4I2= 2.4AChecking if true; 12 - 5(2.4) = 0Now to eliminate I22 * (9 - 3I1- 1I2= 0)18 - 6I1-2I2= 07 - 1I1-2I2= 018 - 6I1= 0_____(8 )7 - 1I1= 0 ______(9)(8 ) - (9)18 - 7 = 116 - 1 = 511 - 5I1= 011 / 5 = 2.2I1= 2.2AChecking if true; 11 - 5(2.2) = 0I1+ I2= I32.2 + 2.4 = 2.6Now I2checks out fine in LTspice but as for I1and I3their sign are suppose to be negative. I dont now where I have goofed up? Also I noticed my I3equation is suppose to be I1- I2= I3but Im sure I interpreted what was drawn correctly.

author: IanB
author_rank: Super Contributor
timestamp: April 04, 2013, 09:05:40 am
content: Quote from: antoniopetito on April 04, 2013, 07:53:09 amIf you have so little respect for your study that you call it nonsense you are not going to get very far.It seems like you have the right answers for I1 and I2 though.Why do you think I1 and I3 are supposed to be negative? And why should I3 = I1 - I2?

author: jpb
author_rank: Super Contributor
timestamp: April 04, 2013, 09:33:29 am
content: I wouldn't have had a separate I3 current at all, just the two loop currents.So first eliminate I3 by replacing it with I1+I2 to give just two equations:9 - 3I1 - I2 = 0 ---(1)7 - I1 - 2I2 = 0 ---(2)take equation (2) away from 2 x equation (1) to eliminate I2 giving18-7 - 5I1 = 0 so I1 = 11/5substitute into (2) to give7 - 11/5 = 2I2 so I2 = 12/5as done by antoniopetito

author: antoniopetito
author_rank: Contributor
timestamp: April 04, 2013, 10:30:10 am
content: Quote from: IanB on April 04, 2013, 09:05:40 amI do apologise for the inappropriate use of words as I was somewhat happy that I had finally worked it out during time of frustration. (I was about to rage quit)When I put the circuit through LTspice it gives -2.2A for I1 and -4.6A for I3, and so I assume the KCL equation should of been -2.2 - 2.4 = -4.6A if that makes any sense.

author: jpb
author_rank: Super Contributor
timestamp: April 04, 2013, 10:58:58 am
content: LT Spice like almost all computer circuit analysis systems uses a nodal approach - the unknowns are voltages at each node, KCL gives the sum of currents into a node as zero. Impedances then give a matrix relationship between the nodal voltages and the contribution to the nodal currents, e.g. a resistor between nodes 1 and 2 would give the matrix relationship:I1 = 1/R -1/R . V1I2 -1/R 1/R V2(difficult to format matrices). All the contributions can be added for a linear circuit to give an overall G matrix which relates external currents as a vector to an overall V vectorI = G.Vthen G is essentially inverted (in SPICE LU decomposition is used as the process needs to be repeated many times for each linearisation of the nonlinear circuit).So LTSPICE thinks in terms of currents into nodes. For hand analysis it is easier in this example to think in terms of loop currents (I1 and I2) and just use KVL to state thesum of voltages around a loop is zero (instead of the sum of currents into a node is zero). I3 is neither a nodal current nor a loop current so is best looked at as short handfor the sum of I1 + I2.Sorry, a bit long winded, but what I'm trying to say is that if you use LTSPICE to check results you need to convert nodal currents back into loop currents and I would guess itis quite easy for signs to misbehave. Especially given that I3 doesn't really exist as a physical entity separate from I1 and I2.

author: antoniopetito
author_rank: Contributor
timestamp: April 04, 2013, 11:23:29 am
content: So what you're saying jpb is I may have nailed it in reference to the actual circuit digram?

author: jpb
author_rank: Super Contributor
timestamp: April 04, 2013, 11:45:09 am
content: Quote from: antoniopetito on April 04, 2013, 11:23:29 amI don't use LTSpice though I've used several SPICE derivatives in the past and I don't know how you defined the circuit in SPICE but I would guess that the currents are by default defined as the nodal currents entering the circuit which may not be the natural way to think about them when doing a hand analysis. I used to use some very expensive Agilent simulation software and in that you "measured" currents by inserting a symbolic ammeter in the circuit but such ammeters have a polarity and if you reversed the polarity you would measure the negated value relative to the other polarity.If LTSPICE is the same then I guess you just need t reverse your ammeters to get positive current values.

author: Jope
author_rank: Regular Contributor
timestamp: April 04, 2013, 12:11:37 pm
content: Quote from: antoniopetito on April 04, 2013, 07:53:09 amYour results are right; the resistors R1 and R3 in your Spice schematic are the wrong way. Resistors in Spice have a direction. You can easily check this in LTspice by hovering the mouse pointer over them in the schematic and look at the ammeter popping up - it has an arrow. This shows you the direction of the current (and resistor).

author: antoniopetito
author_rank: Contributor
timestamp: April 04, 2013, 12:26:14 pm
content: Quote from: Jope on April 04, 2013, 12:11:37 pmI thought the resistor polarity was based on the voltage polarity like for example a single battery and resistor?Quote from: jpb on April 04, 2013, 11:45:09 amHow would I go about reversing the ammeters polarity?

author: Jope
author_rank: Regular Contributor
timestamp: April 04, 2013, 12:47:39 pm
content: Quote from: antoniopetito on April 04, 2013, 12:26:14 pmThe polarity of a resistor is its first node (+) to its second node (-).QuoteBy turning around the resistor on the schematic 180 degrees (or in a netlist: swapping node 1 and node 2).

author: antoniopetito
author_rank: Contributor
timestamp: April 04, 2013, 01:02:07 pm
content: Quote from: Jope on April 04, 2013, 12:47:39 pmOMFG.. IT WORKED!! Well there you go, you learn something new everyday. Thanks a million Jope.