I was playing around with capacitors in LTspice today to grasp a better understand of how they shift the phase of voltage and current. I created what would be considered a 1st order filter. See image below enter image description here

I then plotted the current through the resistor and the current through the capacitor. To my surprise, they are 180 degrees out of phase. How is this possible? Shouldn't the current be exactly the same through any element in the circuit?

enter image description here

  • 2
    \$\begingroup\$ Have you tried to rotate the resistor or the capacitor? \$\endgroup\$
    – Carl
    Apr 18, 2021 at 17:32
  • \$\begingroup\$ Carl - I just deleted and replaced the capacitor and now they are in phase! I guess this is just a weird bug in LTSpice? Thanks \$\endgroup\$
    – John Allen
    Apr 18, 2021 at 17:35
  • 3
    \$\begingroup\$ LTspice has to pick a reference current direction, and it can only be one way. Think of it like the current convention used in Kirchhoff's circuit laws. Simply rotate your resistor 180 degrees in the schematic and the current will be to your liking. Alternate: Download File:Res.asy and place in your /lib/sym folder. This symbol has a small arrow indicating the defined way current flows ltwiki.org/… \$\endgroup\$
    – G36
    Apr 18, 2021 at 17:37
  • 1
    \$\begingroup\$ @G36 Much more obvious if you note that whenever you mousover a component to display its current, the cursor always has an arrow. \$\endgroup\$
    – DKNguyen
    Apr 18, 2021 at 19:58
  • \$\begingroup\$ It's not a "weird bug". It's how LTSpice makes it so that you don't have to specify the direction every time you drop a component onto the schematic. Moreover, I know that LTSpice's convention is that when you're graphically dropping current measurements, it measures the current into a pin on a block or a transistor -- I'm 99.44% sure that it's the same for a resistor or cap. \$\endgroup\$
    – TimWescott
    Apr 18, 2021 at 20:04

1 Answer 1


All simple components in a simulator have an orientation. If you plotted the current it can be reversed by reversing the orientation. In other words, when you asked your sim to plot I(C1), if C1 was placed the wrong way round it will plot -I(C1). Your sim has no idea what orientation you favour so internally for each simple model, there is a "pin 1" and a "pin 2".

Sometimes they are called "+" and "-".

You need to get the orientation correct to have "pin 1" or pin "+" the one that is receiving the current and the other pin passing the current out.

  • \$\begingroup\$ Andy - Ah! That makes a lot of sense. I'll have to pay attention to the current symbol next time. Thanks \$\endgroup\$
    – John Allen
    Apr 18, 2021 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.