POWER DESIGN SPICE Analog Behavioral Modeling of Variable Passives B y CChr hr ist ophe BBasso asso hrist istophe asso,, Application Manager, ON Semiconductor, Toulouse, France ery 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 1 1 current I develops I a voltage V. Yes, everyone knows R V Ohm’s Law, I= V(1,2) / R derived by Georg I= V(1,2) / V(CTRL) Simon Ohm (1789-1854), a 2 2 German physicist. However, the same Fig. 1. A resistor can be represented as a resistor R can be controlled source. 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-by10.0 5.00 zero over2 flows in case R1 of extremely 1 1.00 low control 1 3 + + values. If V1 V3 V(CTRL) 10 1 X5 equals 100 VARIRES kV, then the e qu i v a l e n t resistor will be 100 kΩ. Fig. 2 shows Fig. 2. Dropped in a simple resistive divider, a the results of controlled current source generates a 1-Ω resistor. 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. PETech V Rvari www.powerelectronics.com CIRCLE 236 on Reader Service Card or freeproductinfo.net/pet 57 Power Electronics Technology March 2005