SPICE Analog Behavioral Modeling of Variable Passives

March 1, 2005
Very often when simulating an electrical circuit in SPICE, there is a need for a variable passive element such as a resistor, a capacitor or an inductor.

For the pdf version of this article, click here. Click to read part II and part III of this article.

Very often when simulating an electrical circuit in SPICE, there is a need for a variable passive element such as a resistor, a capacitor or an inductor. If an electrical source could externally control the value of such devices, it would naturally open the door to analog behavioral modeling expressions for capacitors and inductors: nonlinear behaviors, inductance variations with current, etc. Unfortunately, few SPICE-based simulators accept in-line equations for passive elements. To work around this drawback, this column describes passive elements whose values can be adjusted via an external voltage source. In part one of this article, the variable resistor is examined.

A resistor R when crossed by a current I develops a voltage V. Yes, everyone knows Ohm's Law, derived by Georg Simon Ohm (1789-1854), a German physicist. However, the same resistor R can be represented by a current source I, where 1 and 2 are the resistor terminals:
I=V(1,2)/R (Eq. 1)

Fig. 1 shows this representation.

In light of this simple equation, it becomes possible in both Intusoft's IsSpice and Cadence's PSpice to construct a variable resistor subcircuit, where the R in equation 1 will be implemented directly by a control source via the CTRL node:

IsSpice

.subckt VARIRES 1 2 CTRL
R1 1 2 1E10
B1 1 2 I=V(1,2)/(V(CTRL)+1µ)
.ENDS

PSpice

.subckt VARIRES 1 2 CTRL
R1 1 2 1E10
G1 1 2 Value = {V(1,2)/(V(CTRL)+1µ)}
.ENDS

In the current source expression, the 1µ quantity avoids divide-by-zero overflows in case of extremely low control values. If V(CTRL) equals 100 kV, then the equivalent resistor will be 100 kΩ. Fig. 2 shows the results of a simple resistive divider built around our subcircuit, which generates a 1-Ω resistor. Now, a complex voltage source can be built for V3, and nonlinear relationships can be easily envisaged.

About the Author

Christophe Basso

Christophe Basso is a Technical Fellow at ON Semiconductor in Toulouse, France, where he leads an application team dedicated to developing new offline PWM controller specifications. He has originated numerous integrated circuits among which the NCP120X series has set new standards for low standby power converters.

Further to his 2008 book “Switch-Mode Power Supplies: SPICE Simulations and Practical Designs”, published by McGraw-Hill, he released in 2012 a new title with Artech House, “Designing Control Loops for Linear and Switching Power Supplies: a Tutorial Guide”. His new book is dedicated to Fast Analytical Techniques and was recently published by Wiley in the IEEE-press imprint under the title “Linear Circuit Transfer Function: An Introduction to Fast Analytical Techniques”.Christophe has over 20 years of power supply industry experience. He holds 17 patents on power conversion and often publishes papers in conferences and trade magazines including How2Power and PET. Prior to joining ON Semiconductor in 1999, Christophe was an application engineer at Motorola Semiconductor in Toulouse. Before 1997, he worked as a power supply designer at the European Synchrotron Radiation Facility in Grenoble, France, for 10 years. He holds a BSEE equivalent from the Montpellier University (France) and a MSEE from the Institut National Polytechnique of Toulouse (France). He is an IEEE Senior Member.

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!


Sponsored