LC Circuit Simulation in Pspice

Discussion in 'Homework Help' started by Chacabucogod, Dec 16, 2014.

  1. Chacabucogod

    Thread Starter New Member

    Nov 16, 2013
    26
    1
    Hi,

    I was doing an LC circuit with voltage source simulation both in pspice and in mathematica when I noticed that the current in the simulations are different. Anybody knows why pspice is giving me that error? Both the voltage in the capacitor and in the inductor are the same in both simulations, but the current in the pspice simulation is shifted by 180 degrees; furthermore; when I check the current in the capacitor node it gives me the right value.


    [​IMG]
    [​IMG]
    [​IMG]
    Thank you
     
  2. mvaseem

    Member

    Jan 31, 2014
    48
    8
    Pspice shows current coming out of a device as negative of current entering into device.
    When you put probe on capacitor (plus treminal), you get current entering into the device. When you put probe on voltage source terminal, it is current coming out of source, so it is opposite polarity.
     
  3. WBahn

    Moderator

    Mar 31, 2012
    17,751
    4,799
    Why do you conclude that PSpice is giving an error? Did you define your Mathematica current directions so that they are consistent with the PSpice convention?

    By convention, Spice simulators define current at a pin as being the current entering the pin. This is so that the simulator doesn't have to be concerned with whether a pin is an output pin or an input pin or a power pin or a bi-directional pin.
     
  4. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    I'm sure PSpice uses the same convention as LTSpice. Note that -I(V1) = I(L1) = I(C1).

    252.gif
     
    Last edited: Dec 22, 2014
  5. WBahn

    Moderator

    Mar 31, 2012
    17,751
    4,799
    For two terminal devices, it makes sense to ask what is the current in the device. The convention is that this means the current into Pin 1, which is synonymous with the current through the device from Pin 1 to Pin 2. Since the current at a pin is defined as the current into the pin, this also means that the current in a two-terminal device is the same as the current at Pin 1 and so it is a simple matter of translation.

    Look at your diagram. You say that the dashed arrows give the current direction. Since this is a series circuit and since your arrows are all shown going clockwise around the circuit, these currents must all be the same, in both magnitude and direction, at all times. Yet in order to satisfy KCL at Node A you are having to take the negative of the current in the supply! The reason is that the current in the supply is defined as the current INTO Pin 1 (which is the positive terminal of the supply). If that isn't sufficient, ask whether you expect the current, according to the dashed arrow you have next to the supply, to start out going positive or negative and then compare that to the simulation results.
     
  6. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    I had already fixed the diagram before you posted. Look again...
     
  7. WBahn

    Moderator

    Mar 31, 2012
    17,751
    4,799
    It appears that it was fixed five minutes after I posted, but I'll happily consider it a cross-post.
     
Loading...