The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Simulators >> Circuit Simulators >> Negative valued inductors and capacitors in SPICE https://designers-guide.org/forum/YaBB.pl?num=1495654213 Message started by mhx on May 24th, 2017, 12:30pm |
Title: Negative valued inductors and capacitors in SPICE Post by mhx on May 24th, 2017, 12:30pm This is a question about history. Does anybody know *if/why* pre-3.0 SPICE could not handle negative inductors and/or capacitors? When I try the demo circuit from [1], a very popular SPICE cannot handle it and shows exponentially growing waveforms when asked for a .TRAN. Another SPICE (ngspice) has no problem at all. Both SPICE's calculate a .AC request without a hitch and produce the same result. Netlist: Code:
-marcel Ref: K. B. Kumar, "Negative inductors and capacitors for SPICE simulation," in IEEE Circuits and Devices Magazine, vol. 6, no. 6, pp. 11-, Nov. 1990. |
Title: Re: Negative valued inductors and capacitors in SPICE Post by Ken Kundert on May 24th, 2017, 1:14pm It was just a choice made by Larry. Negative resistors, capacitors and inductor cause problem and never come up in real circuits, so he chose to make specifying them an error. -Ken |
Title: Re: Negative valued inductors and capacitors in SPICE Post by mhx on May 24th, 2017, 10:54pm Given the Kumar paper I assumed there was an algorithmic reason that no negative element values were allowed. Your answer prompted me to find ERL-M520, Larry Nagel's SPICE2 description. It specifies that resistors can be negative, capacitors can not be negative, and inductors can not be 0. The coefficient of coupling can be negative. I agree negative valued components are not physical, but (as in Kumar's paper) they are sometimes convenient when working with equivalent circuits of transformers (e.g. the T-model when the turns ratio is not 1), or for HF circuitry. -marcel |
Title: Re: Negative valued inductors and capacitors in SPICE Post by Ken Kundert on May 24th, 2017, 11:45pm Those restrictions are not in Spectre. Resistors, capacitors, and inductors can all be positive, negative, or zero. In addition, resistors can be infinite (just don't give a resistance, it defaults to ∞. I don't remember what if any restrictions were placed on the mutual inductor coupling factors. Perhaps they must fall in the range -1 < k < 1. But it would make no sense to restrict k to being positive. I have not seen the paper you references, so I cannot comment on it. -Ken |
Title: Re: Negative valued inductors and capacitors in SPICE Post by mhx on May 25th, 2017, 1:52am Putting a few things together, I have an hypothesis of what is the problem. Some SPICEs have the option of automatically putting resistors in series or in parallel with inductors to help convergence. This reasonable looking hack will not work when the inductance is negative -- in that case the resistance(s) should be negative also. I tested this hypothesis with the troublesome SPICE and indeed, when I turn off the GUI option to damp inductors and add negative resistors by hand instead, the simulation converges fine. The same type of effect is expected for negative capacitors. -marcel |
Title: Re: Negative valued inductors and capacitors in SPICE Post by Andrew Beckett on May 28th, 2017, 9:47am More likely was just that they cause negative time constants which then tend to blow up and cause convergence failure. Anyway, as Ken said, modern simulators such as spectre do support negative resistors, capacitors and inductors. Andrew. |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |