0
\$\begingroup\$

I have a simple RC circuit as below :

enter image description here

I'm trying to visualize current curve and voltage curve (Vout and I(R1)) vs Vin using LtSpice and I obtain the result below:

enter image description here

It's OK that the Vout is leading Vin. However, I do not understand why the current curve I(R1) is completely out of phase with Vout. Any one have explanation for that ? Thanks for your support.

\$\endgroup\$
5
  • 2
    \$\begingroup\$ The voltage across the resistor is in phase with the current through it. \$\endgroup\$
    – Chu
    Aug 6 '20 at 15:10
  • \$\begingroup\$ @Chu: Thanks for your answer. Yes It must be in phase. But I don't understand why I obtain the current (I(R1)) and Vout out of phase. Is there any explanation ? Or How I can fix this ? Thanks. \$\endgroup\$
    – geek225
    Aug 6 '20 at 15:21
  • 2
    \$\begingroup\$ If the current's positive direction is defined, in your simulation, as from ground to Vout that's what you get. \$\endgroup\$
    – user128351
    Aug 6 '20 at 15:33
  • 4
    \$\begingroup\$ Turn the resistor around 180 degrees and you'll get the results you expect. \$\endgroup\$
    – The Photon
    Aug 6 '20 at 15:43
  • \$\begingroup\$ When you use the current probe on LTSpice on that resistor, which direction does the tip of the arrow point? \$\endgroup\$
    – Big6
    Aug 6 '20 at 16:53
1
\$\begingroup\$

the same simulationvia LTspice

I simulated the same circuit and current seems fine and I used LTspice XVII. Maybe the issue is your version of LTspice. I think you might try to delete your version and upload the latest again.I hope this fixes your problem.

\$\endgroup\$
5
  • 2
    \$\begingroup\$ Now try rotating R1 180 degrees and reconnecting and what do you get? \$\endgroup\$
    – Andy aka
    Aug 6 '20 at 17:17
  • \$\begingroup\$ Yep I got my current out of phase.I didnt know that Ltspice has this issue.The 'plus' terminal of a resistor isn't shown on the schematic so you have no good way of knowing which direction the current actually is. It is annoying :/ \$\endgroup\$ Aug 7 '20 at 13:24
  • 2
    \$\begingroup\$ All 2-pin bidirectional components in all sims have this "issue". Some explicitly show + as in inductors, resistors and capacitors don't. Personally I think they should. \$\endgroup\$
    – Andy aka
    Aug 7 '20 at 13:28
  • \$\begingroup\$ @DamlaCelik It's no issue, it's standard SPICE convention since 40+ years ago: two pin elements have a pre-defined direction of current as a convenience for the matrix solver. Elements with more than two pins consider the current as going into the pin. And, as a general rule, don't rush to blame the tool ("Maybe the issue is your version of LTspice", or whatever other simulator); instead, try to first learn what that tool does and how. \$\endgroup\$ Aug 7 '20 at 13:47
  • \$\begingroup\$ @Andyaka: I think you for your answer. It resolves my issue. I have just rotate the R1 like you tell me and all it's OK. \$\endgroup\$
    – geek225
    Aug 7 '20 at 13:52

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.