The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 20th, 2024, 12:45am
Pages: 1
Send Topic Print
Negative valued inductors and capacitors in SPICE (Read 107 times)
mhx
New Member
*
Offline



Posts: 8

Negative valued inductors and capacitors in SPICE
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:
.TITLE negindcap
V2 in 0 PULSE(0 1 0 1u 1u 5u 10u) AC=1
L2 N001 N002  1nH
R2 out  0     100
C1 out  0    -1pF
L1 N001 out   1nH
L3 in   N001 -1nH
C2 N002 0 1pF
* ac dec 100 1G 100G
.options method=gear reltol=1m
.tran 0 {1m+30u} 1m uic
.end
 



-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.
Back to top
 
« Last Edit: May 24th, 2017, 10:55pm by mhx »  
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Negative valued inductors and capacitors in SPICE
Reply #1 - 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
Back to top
 
 
View Profile WWW   IP Logged
mhx
New Member
*
Offline



Posts: 8

Re: Negative valued inductors and capacitors in SPICE
Reply #2 - 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


Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Negative valued inductors and capacitors in SPICE
Reply #3 - 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
Back to top
 
 
View Profile WWW   IP Logged
mhx
New Member
*
Offline



Posts: 8

Re: Negative valued inductors and capacitors in SPICE
Reply #4 - 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

Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: Negative valued inductors and capacitors in SPICE
Reply #5 - 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.
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.