2
\$\begingroup\$

I was trying to simulate a transformer without a load, and setting an initial condition to observe how the energy will flow from the primary to the secondary circuit.

I realized that the energy will decay and the waveforms I would get I was not able to interpret, thus I simplified my question to a simple LC circuit which I simulate with LTspice by setting an initial condition. Plotting the voltage of the circuit will correctly give me an oscillation of 18MHz but increasing the simulation time will show that the voltage will decay.

My question is why do I get this response? Since I have no resistive components the oscillation should not dampen. The only assumption I can make is that simulation has a finite time for numerical integration and this might affects the results (?). If so, what parameters could I change to see an ongoing oscillation? I also tried to change Gmin and Abstol but I did not see much of a difference.

enter image description here enter image description here

\$\endgroup\$
  • 3
    \$\begingroup\$ Sometimes LTspice will add a small resistance in series with an inductor to improve convergence. Check the properties of your inductor and look for something like 'Rser'. \$\endgroup\$ – Elliot Alderson Apr 17 at 11:59
  • \$\begingroup\$ Thanks, this is a good catch I just noticed that inductor uses a 1mΩ series resistance by default. Now I am looking into ways of how to reduce it. I tried using a negative resistance instead but it seems that this is not working. Any ideas of how can I do that? \$\endgroup\$ – Christts Apr 17 at 12:34
  • \$\begingroup\$ Take a look at the "settings" or "preferences" or whatever they are called. As I recall this is an option you can disable, or at least set the value to zero. \$\endgroup\$ – Elliot Alderson Apr 17 at 12:39
  • \$\begingroup\$ Thanks for your help, I realized from the answer below that setting Rser is not enough, and inductor will work ideally if I define Rpar to zero as well. \$\endgroup\$ – Christts Apr 17 at 12:59
1
\$\begingroup\$

You need to set both Series and Parallel resistance to 0.
It makes no sense, but it works. Setting only the Series resistance will not solve OP's problem.

EDIT

For general component values LTspice will accept numbers that range in magnitude from as large as ± 1.798 x 10+308 down to as small as ± 2.225 x 10−308.  Values exceeding this range are interpreted as ± infinity or as zero.
Source

If you set a voltage source to a voltage of {1.8*10^308}, it will plot zero volts.

It seems it also works the other way around (setting Parallel resistance to 0), but setting Parallel resistance to {2*10^308} also works. The latter makes more sense.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Thanks! I realized I while ago that changing Rpar to 1T will give me a very slow decay. However, what you suggest works ideally. \$\endgroup\$ – Christts Apr 17 at 12:58
0
\$\begingroup\$

Here's a good discussion of the issue: http://ltwiki.org/LTspiceHelp/LTspiceHelp/L_Inductor.htm In essence, LTspice includes a small series resistance by default with every inductor. This allows LTspice to use a simpler technique for modeling the inductance. If you don't want the series resistance, you have to manually change the value of Rser to zero.

\$\endgroup\$

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.