Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LTspice confusing resistor current reference direction

Status
Not open for further replies.
It is well-known that rotating a resistor in LTspice by 180 degrees will change the reference current direction through this resistor, and the voltage across and current through this resistor will appear to be 180 degrees out of phase. I don't think this has anything to do with the so-called passive sign convention. It appears to be just a potentially misleading implementation detail. Does anybody have more insight into why things are done this way?
See attached sample circuit.
Thanks,
Electronaut
 

Attachments

  • LTspiceResistorCurrentSignConvention.asc
    1.1 KB · Views: 310
I don´t see a problem with that. How else would you want to decide which direction is the positive way?
 
The problem is there is a change in modeling conventions with no observable change in the circuit. It might be clearer if LTspice added some kind of annotation to the resistor to indicate what sign convention applies (like the dot annotation used with inductors).
 
There are two+ ways to do the 180 thing.
Pull the resistor out and turn it 180.
On the graph change I(R1) to -I(R1). Add a " - " to the name.
 
The problem is there is a change in modeling conventions with no observable change in the circuit. It might be clearer if LTspice added some kind of annotation to the resistor to indicate what sign convention applies (like the dot annotation used with inductors).

hi

The resistor has a 'polarity' for mathmatilcal computation reasons. Current flow is from pin1 towards pin2.
If desired, one could make their own symbol to indicate this direction. I believe the LTspice Yahoo group has a symbol with an arrow next to the resistor graphic.

eT
 
It might be clearer if LTspice added some kind of annotation to the resistor to indicate what sign convention applies (like the dot annotation used with inductors).
You could do that yourself by editing the symbol file for the resistor (res.asy).
Below is an example of this, with a small circle next to the the positive side (top) of the resistor symbol for current entering the dot side.
You could also add an arrow in addition to, or instead of the dot, if you like.
 

Attachments

  • res.asy
    457 bytes · Views: 324
Last edited:
The problem is there is a change in modeling conventions with no observable change in the circuit. It might be clearer if LTspice added some kind of annotation to the resistor to indicate what sign convention applies (like the dot annotation used with inductors).

I agree it would be cleaner as you suggested with some type of symbol on the resistor as a default instead of having to add or own. Luckily in LTSpice, one can add their own. In other simulation software, it it not possible. Interestingly, I don't know of any simulation software that does give any little visual queue of asymmetry to easily spot pin1 vs pin2 as the default resistor symbol.
 
Actually, LTspice provides a partial solution by displaying an arrow icon showing the current convention used for every element when you place the cursor over the element after a simulation is done. It is a partial solution because it only works after a simulation.
 
Actually, LTspice provides a partial solution by displaying an arrow icon showing the current convention used for every element when you place the cursor over the element after a simulation is done. It is a partial solution because it only works after a simulation.

I'll give it a try next time I use it - thanks.
 
As Electronaut says, the arrow that is displayed when you hover over the component indicates which way the current flows when you probe it. As bad luck would have it, it always displays in the opposite you way you want it. However, if you go to the plot window and right click over the plot icon you can put a '-' sign in front of the icon and it will invert the current, so you can change the current flowing into a node into a current flowing out of that node. Hope this helps - Simon
 
As Electronaut says, the arrow that is displayed when you hover over the component indicates which way the current flows when you probe it. As bad luck would have it, it always displays in the opposite you way you want it. However, if you go to the plot window and right click over the plot icon you can put a '-' sign in front of the icon and it will invert the current, so you can change the current flowing into a node into a current flowing out of that node. Hope this helps - Simon

Or...you can rotate or mirror the symbol on the schematic 180 degrees to reverse the connections...

eT
 
I am rather far from understanding how spice calculations are done. Why a resistor needs/has a "direction" already defined (for a current that it does not exist yet) when that should result from the interaction of voltages at its nodes?
 
Why a resistor needs/has a "direction" already defined (for a current that it does not exist yet) when that should result from the interaction of voltages at its nodes?
Because when you click on a resistor to display the current through the resistor you need to know which direction is plus current.
It's easier to have the resistor tell us that, then having to measure the voltage at both ends of the resistor to determine the direction.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top