Hom 3
Hom 3
Hom 3
k d dx
ious numerical problems may occur depending on the be-
havior of this curve. One problem occurs if the curve folds (0) = 0; x(0) = a; and ;
ds ds 2
k = 1: (9)
back. At the turning point the values of decrease as the
path progresses. Increasing from 0 to 1 results in “losing”
Differential equation (8) can be written as
the curve. The difficulty is resolved by making a function @H @H
d dx :
P(y)y_ := ds ds (10)
of a new parameter: the arc length s. This method is known @ @x
as the arc length continuation [2], [5]. We wish to solve
P(y)y_ = 0 (11)
3. DC OPERATING POINT ANALYSIS for y_ . The solution is unique if the extended Jacobian matrix
(8) is of full rank. Conditions (9) define the starting point
We used homotopy methods to find the dc operating points for x, the starting value of , and ensure that the sign and
of nonlinear circuits. This method of solving equations was the magnitude of y_ are fixed in the implementation. The
implemented through the use of two software programs. First, solution y_ is found by solving linear differential equation
a parser generates the mathematical equations from a de- (11) using standard linear solvers via the QR factorization
scription of the circuit in the commonly used SPICE for- algorithm [18].
mat [14], [15]. These equations are then solved by a MAT- Once the derivatives are determined, we used the variable-
LAB tool [13]. We tested the method by solving Chua’s step predictor-corrector method to find y(s) from its deriva-
four-transistor benchmark circuit [16]. As expected, nine tive that were found in the previous step. The method proved
distinct solutions were found. superior to the Runge-Kutta methods that we initially used.
Finally, the “end game” was used to determine the step
size so that the solution to y(s) for = 1 can be reached. A
cubic spline interpolation of (s) and a solution to (s) = 1
3.1. Parser
Implementation of the homotopy method requires that the (the smallest root that is greater than the current value of s)
set of equations that describe the circuit be specified. Only were used to predict the next step size. Once is within the
for very simple circuits, these equations can be written by preselected tolerance, the value of x was assumed to be the
hand. The parser is a C++ program that accepts a SPICE sought solution.
input file [14], [15], and produces either nodal analysis or
modified nodal analysis [17] circuit equations, as well as 3.3. Example
their Jacobian matrices.
Nine dc operating points of the four-transistor circuit [16]
We used simple models of nonlinear circuits compo-
shown in Figure 1 were found by using our MATLAB im-
nents (diodes and bipolar junction transistors) to demon-
plementation of the homotopy algorithm. Parser was used to
strate the parser correctness. More realistic models could
generate modified nodal analysis equations, and the simple
be implemented by specifying the nonlinear equations that
homotopy function An example of a homotopy is
govern the components’ behavior.
H(x; ) = (1 ; )G(x ; a) + F (x); (12)
3.2. Solver where G is a diagonal scaling matrix, and a is a starting
vector.
There are several approaches to implement homotopy meth- MATLAB can also generate plots of the homotopy paths
ods [2]. We opted for algorithms based on the ordinary dif- for the unknown node voltages and for the currents flowing
ferential equations. through each voltage source. They are shown in Figure 2
The solution of the equation and Figure 4, respectively. By zooming in on the path for
H(x(s); (s)) = 0; (6)
an individual node voltage and current, we can see that each
path crosses the vertical line = 1 nine times. These paths
are shown in Figures 3 and 5.
where s is the arc length parameter, is a trajectory
The results from MATLAB can be compared with so-
(s)
lutions from other homotopy methods [11]. Even though
y(s) = x(s) : (7) Newton-Raphson method solvers like PSPICE and SPICE
3F5 will calculate only one dc operating point, it is possi-
This trajectory is found by solving the differential equation ble to give PSPICE an initial guess that is close to a desired
solution by using the .NODESET option. In this manner,
d by using the MATLAB results as a starting point, we have
ds
H(x(s); (s)) = 0; (8) found all nine dc operating points.
13 Vcc
20
15
R2 10 R11 10
R1 R5 6 T2 5
Node Voltages
4
0
2 8
R13 −5
T1
V1 3
R4 R6 R9 −10
1 0
V2 −15
T3 R7 R10 11 −20
14 Vcc 12
4. CONCLUDING REMARKS
4
plementations of homotopy algorithms need not necessarily 0.98 0.99 1 1.01 1.02 1.03 1.04 1.05
Lambda
rely on large numerical solvers or proprietary circuit simula-
tion tools. Furthermore, simple homotopy functions proved
adequate for solving some difficult benchmark circuits. We Figure 3: Closer view of the homotopy path for the voltage
successfully used the current implementation to find nine at node 10.
dc operating points of a benchmark four-transistor circuit.
The accuracy of the results was verified by comparison with 5. REFERENCES
PSPICE solutions and results of other homotopy implemen-
tations. [1] E. L. Allgower and K. Georg, Numerical Continua-
Our implementation could be made more efficient. It tion Methods: An Introduction. New York: Springer-
takes several minutes to calculate the nine solutions and pro- Verlag Series in Computational Mathematics, 1990,
duce the resulting plot for our example circuit. The speed pp. 1–15.
of the algorithm and the number of solutions found depend
on the starting point of the homotopy path. One possible
[2] L. T. Watson, “Globally convergent homotopy algo-
improvement is to use an algorithm to determine a better
rithms for nonlinear systems of equations,” Nonlinear
starting point, rather than choosing a random value. The al-
Dynamics, vol. 1, pp. 143–191, Feb. 1990.
gorithm could also be improved to eliminate numerical in-
stability for values of very close to 1 (the so called “end
[3] W. Rheinboldt and J. V. Burkardt, “A locally parame-
game” [19]). Other homotopy mappings could also be im-
terized continuation process,” ACM Transactions on
plemented.
Mathematical Software, vol. 9, no. 2, pp. 215–235,
June 1983.
−3
x 10
0.01 −2
i(VCC1)
0.008 i(VCC2)
i(V1)
0.006 i(V2)
0.004
−2.5
0.002
Currents
i(VCC2)
0
−0.002
−3
−0.004
−0.006
−0.008
−0.01 −3.5
0 0.2 0.4 0.6 0.8 1 0.98 0.99 1 1.01 1.02 1.03 1.04 1.05
Lambda Lambda
Figure 4: Homotopy paths for the four currents flowing Figure 5: Closer view of the homotopy path for the current
through the voltage sources of the four-transistor circuit. flowing through the voltage source connected to node 14.
[4] S. Chow, J. Mallet-Paret, and J. A. Yorke, “Finding ze- [11] K. Yamamura, T. Sekiguchi, and Y. Inoue, “A globally
roes of maps: homotopy methods that are constructive convergent algorithm using the fixed-point homotopy
with probability one,” Mathematics of Computation, for solving modified nodal equations,” Proc. NOLTA
vol. 32, no. 143, pp. 887–899, July 1978. ’96, Kochi, Japan, pp. 463–466, Oct. 1996.
[5] L. T. Watson, S. C. Billups and A. P. Morgan, “Algo- [12] R. Kielkowski, Inside SPICE, Second edition. New
rithm 652: HOMPACK: A suite of codes for globally York, NY: McGraw-Hill, 1998.
convergent homotopy algorithms,” ACM Trans. Math- [13] D. Hanselman and B. Littlefield, Mastering MATLAB:
ematical Software, vol. 13, no. 3, pp. 281–310, Sept. A comprehensive tutorial and reference. Upper Saddle
1987. River, NJ: Prentice Hall, 1996.
[6] L. Goldgeisser and M. M. Green, “A novel algorithm [14] T. L. Quarles, A. R. Newton, D. O. Pederson, and
that finds multiple operating points of nonlinear cir- A. Sangiovanni-Vincentelli, “SPICE 3 Version 3F5
cuits automatically, Proc. ISCAS ’98, Monterey, CA, User’s Manual,” Department of EECS, University of
June 1998, TPA 12-3. California, Berkeley, March 1994.
[7] R. C. Melville, Lj. Trajković, S. C. Fang and L. T. [15] A. Vladimirescu, The SPICE Book. New York: John
Watson, “Artificial parameter homotopy methods for Wiley & Sons, Inc., 1994.
the dc operating point problem,” IEEE Trans. on CAD,
vol. 12, no. 6, pp. 861–877, June 1993. [16] L. O. Chua and A. Ushida, “A switching-parameter al-
gorithm for finding multiple solutions of nonlinear re-
[8] Lj. Trajković and W. Mathis, “Parameter embedding sistive circuits,” Int. J. Circuit Theory Appl., vol. 4, pp.
methods for finding dc operating points: Formulation 215–239, 1976.
and implementation,” Proc. NOLTA ’95, Las Vegas,
[17] C. W. Ho, A. E. Ruehli, and P. A. Brennan, “The modi-
NV, Dec. 1995, pp. 1159–1164.
fied nodal approach to network analysis,” IEEE Trans.
[9] Lj. Trajković, E. Fung, and S. Sanders, “HomSPICE: Circuits Syst., vol. CAS-22, pp. 504–509, Jan. 1975.
Simulator with homotopy algorithms for finding Pa- [18] J. D. Lambert, Numerical methods for ordinary differ-
rameter embedding methods for finding dc and steady- ential equations: The initial value problem. New York,
state solutions of nonlinear circuits,” Proc. ISCAS ’98, NY: John Wiley, 1991.
Monterey, CA, June 1998, TPA 10-2.
[19] M. Sosokina, L. T. Watson, and D. E. Stewart, “Note
[10] D. Wolf and S. Sanders, “Multiparameter homotopy on the end game in homotopy zero curve tracking,”
methods for finding DC operating points of nonlinear ACM Trans. Mathematical Software, vol. 22, no. 3, pp.
circuits,” IEEE Trans. Circuits Syst., vol. 43, pp. 824– 281–287, Sept., 1996.
838, Oct. 1996.