1
\$\begingroup\$

I have tested a simple RLC series circuit for plotting current vs time using two versions of LTspice and I am getting different results!The input is 1 volt dc.R = 2 ohms. C = 1 F and L = 1 H. Initial conditions for C and L are zero.Thus this is a critically damped circuit and the analytic solution is i = t e ^ (-t).Thus the peak value of the current occurs at t =1 second and is near 360 mA. The following graph will show you that I get correct response in the LTspice version 4.23e and get half the value of correct current in the version 4.23I. Is there a bug in the later versions? Ashok Ranade

Circuit: enter image description here

Response with version 4.23e

Response with version 4.23I

\$\endgroup\$
3
  • 3
    \$\begingroup\$ You linked to your email account. Unless you expect us to have your username/password, they will not work. Reading your question, I'd suggest leaving blank the initial conditions for L and C and, instead, use "skip initial transient" in the simulation options, or "start from zero". \$\endgroup\$ Oct 21, 2016 at 6:30
  • \$\begingroup\$ Is the ground properly connected? The symbol is there, but a junction dot is not visible. I'd move the ground down and ensure it is properly connected. \$\endgroup\$
    – rdtsc
    Oct 21, 2016 at 10:11
  • \$\begingroup\$ @rdtsc Yeah, the ground is there. LTspice doesn't mind if you slap the symbol right on top of a wire. It works. \$\endgroup\$
    – jonk
    Oct 21, 2016 at 10:25

1 Answer 1

8
\$\begingroup\$

One of your .ic spice commands probably isn't any good. That's one thing I noticed. Let me show you how to make it work. In the following image I tried to copy your schematic, add in my version of LTspice so that this detail is perfectly clear, and then show you the display I get for the current in \$L_1\$:

enter image description here

But the main thing I wanted to point out is that I don't think this syntax:

.ic V(vC1)=0

works in LTspice. It doesn't complain, either. So if I made that:

.ic V(QQQ)=0

LTspice also wouldn't even give me so much as a small note about it. It would just carry on and ignore it.

You don't actually have a node with that name. So LTspice just ignores it. What I did in the above schematic is to name a node so that it would work okay, giving that node the name you were trying to make work.

And it worked.

That said, I also commented out those .ic spice commands. You can see that they are blue in the schematic, now, which shows that they are comments and no longer spice commands. So LTspice is ignoring them, regardless. What I did, instead, is to add the UIC code to the end of the .tran command. You can see that in the image. This does the same thing, in effect. When you check off the "skip initial conditions" box, LTspice uses defaults for the initial conditions. Which just happen to be those values you were trying to use. So that's yet another way to do it, in this case of yours.


Bottom line is that you didn't have a node name set up correctly. So one of your initial conditions wasn't processed. That might have behaved differently in different versions of LTspice. I can't actually say, because I don't have the two version you mentioned and cannot try it out to prove my thoughts here. But you can try it out on your end and see. Label your node, as shown, and then see if both versions give you the same results. Hopefully, they do.

\$\endgroup\$
3
  • \$\begingroup\$ Nice info about initializing a circuit. My preferred solution is to apply a step voltage source (say: 0 V for the first microsecond, then step to whatever DC level is desired with a ramp of maybe another microsecond). That way, the circuit will have a source that really looks like a (somewhat sharp) turn-on event. \$\endgroup\$
    – zebonaut
    Oct 21, 2016 at 11:43
  • \$\begingroup\$ Yes both the solutions worked \$\endgroup\$ Oct 22, 2016 at 6:11
  • \$\begingroup\$ @AshokRanade Good to hear. \$\endgroup\$
    – jonk
    Oct 22, 2016 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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