Author Topic: Help with branch current analysis.  (Read 10973 times)

0 Members and 1 Guest are viewing this topic.

Offline antoniopetitoTopic starter

  • Contributor
  • Posts: 10
  • Country: au
Re: Help with branch current analysis.
« Reply #25 on: April 04, 2013, 10:30:10 am »
Ok so I've spent the whole day doing this nonsense

If you have so little respect for your study that you call it nonsense you are not going to get very far.


I 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.
« Last Edit: April 04, 2013, 10:37:24 am by antoniopetito »
 

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
Re: Help with branch current analysis.
« Reply #26 on: April 04, 2013, 10:58:58 am »
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   .    V1
I2                 -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 vector

I = G.V

then 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 the
sum 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 hand
for 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 it
is quite easy for signs to misbehave. Especially given that I3 doesn't really exist as a physical entity separate from I1 and I2.
 

Offline antoniopetitoTopic starter

  • Contributor
  • Posts: 10
  • Country: au
Re: Help with branch current analysis.
« Reply #27 on: April 04, 2013, 11:23:29 am »
So what you're saying jpb is I may have nailed it in reference to the actual circuit digram?
 

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
Re: Help with branch current analysis.
« Reply #28 on: April 04, 2013, 11:45:09 am »
So what you're saying jpb is I may have nailed it in reference to the actual circuit digram?
I 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.
 

Offline Jope

  • Regular Contributor
  • *
  • Posts: 109
  • Country: de
Re: Help with branch current analysis.
« Reply #29 on: April 04, 2013, 12:11:37 pm »
Now I2 checks out fine in LTspice but as for I1 and I3 their sign are suppose to be negative. I dont now where I have goofed up?

Your 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).
 

Offline antoniopetitoTopic starter

  • Contributor
  • Posts: 10
  • Country: au
Re: Help with branch current analysis.
« Reply #30 on: April 04, 2013, 12:26:14 pm »
Now I2 checks out fine in LTspice but as for I1 and I3 their sign are suppose to be negative. I dont now where I have goofed up?

Your 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).

I thought the resistor polarity was based on the voltage polarity like for example a single battery and resistor?

So what you're saying jpb is I may have nailed it in reference to the actual circuit digram?
I 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.

How would I go about reversing the ammeters polarity?
 

Offline Jope

  • Regular Contributor
  • *
  • Posts: 109
  • Country: de
Re: Help with branch current analysis.
« Reply #31 on: April 04, 2013, 12:47:39 pm »
I thought the resistor polarity was based on the voltage polarity like for example a single battery and resistor?

The polarity of a resistor is its first node (+) to its second node (-).

Quote
How would I go about reversing the ammeters polarity?

By turning around the resistor on the schematic 180 degrees (or in a netlist: swapping node 1 and node 2).
 

Offline antoniopetitoTopic starter

  • Contributor
  • Posts: 10
  • Country: au
Re: Help with branch current analysis.
« Reply #32 on: April 04, 2013, 01:02:07 pm »
I thought the resistor polarity was based on the voltage polarity like for example a single battery and resistor?

The polarity of a resistor is its first node (+) to its second node (-).

Quote
How would I go about reversing the ammeters polarity?

By turning around the resistor on the schematic 180 degrees (or in a netlist: swapping node 1 and node 2).


OMFG.. IT WORKED!! Well there you go, you learn something new everyday. Thanks a million Jope. :-+
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf