#### Abstract

We present a homotopy continuation method (HCM) for finding multiple operating points of nonlinear circuits composed of devices modelled by using piecewise linear (PWL) representations. We propose an adaptation of the modified spheres path tracking algorithm to trace the homotopy trajectories of PWL circuits. In order to assess the benefits of this proposal, four nonlinear circuits composed of piecewise linear modelled devices are analysed to determine their multiple operating points. The results show that HCM can find multiple solutions within a single homotopy trajectory. Furthermore, we take advantage of the fact that homotopy trajectories are PWL curves meant to replace the multidimensional interpolation and fine tuning stages of the path tracking algorithm with a simple and highly accurate procedure based on the parametric straight line equation.

#### 1. Introduction

The circuit simulation tools are constantly improved in order to cope with the challenges due to the new fabrication technologies. Among the circuit analysis methodologies, the direct current (DC) analysis is highlighted as one of the most important because it describes the static behaviour of the circuits. As a result of the DC analysis of nonlinear circuits, one obtains a nonlinear algebraic equations system (NAES). The most common method applied to solve such equations is the Newton-Raphson method (NRM). However, it is common that NRM fails due to its well-known problems of convergence: oscillation and divergence to infinity, among others. In fact, NRM has a local convergence only, which means that if the starting point is not close enough to the sought solution the method will probably diverge. What is more, if the circuit under analysis is multistable, then NRM will not be helpful because it can locate only one solution per simulation, ignoring the existence of more solutions. Therefore, the homotopy continuation method (HCM) [1–37] arises as an alternative to NRM due to its characteristics: to find multiple operating points and better convergence [38].

In recent years, the PWL modelling technique gained popularity as a tool for circuit simulation and other related areas [39, 40]. The basic idea is to replace traditional models by their piecewise linear (PWL) representations [41–44]. The main advantages are reduction of equations complexity, the straightforward inclusion of empirical models, and potential replacing of piecewise models by their unified PWL representation. Several methodologies have been proposed to find multiple solutions of PWL circuits [45–57].

However such methodologies exhibit some drawbacks like the requirement of several initial points to find multiple solutions [53, 54], the use of implicit PWL models [55, 56], and the need of expressing the circuit equations in terms of the linear complementary problem (LCP) that implies computing model state variables [57]. Therefore, in order to circumvent the aforementioned disadvantages, we explore the application of HCM methods in combination with an adaptation of the modified spheres algorithm (MSA) [37] for the DC analysis of PWL circuits.

This paper is organized as follows. A brief description of PWL modelling is presented in Section 2. In Section 3, we introduce the proposed HCM and its path following technique (MSA). In Section 4, four case studies of nonlinear circuits are presented and solved by using a HCM method. Numerical simulations and a discussion about the results are provided in Section 5. Finally, a concluding remark is given in Section 6.

#### 2. Brief Description of PWL Modelling

A mathematical model approach, widely used in nonlinear circuit analysis, is the so-called piecewise linear (PWL). The aim of this kind of modeling is to approximate the nonlinear behavior of a circuit element by using a set of linear mappings. This means transforming a single nonlinear equation into a finite number of linear equations. One of the first piecewise linear models was provided by Chua and Kang in [58]. Another proposal was presented by Van Bokhoven in [59]. Subsequent contributions were the extension of the Chua model reported by Guzelis and Goknar in [60] and the parametric proposal given by Vandenberghe et al. in [61], among others. While there are diverse proposals of PWL models, they can be classified into two classes. The first one contains explicit models. For this class of models, the output vector can be obtained by just substituting the input vector into the model. The second one contains models which are implicit. In such models the output vector cannot be obtained directly. In contrast, an algorithm has to be performed by which the output vector is computed [62]. The more representative examples of explicit and implicit PWL descriptions are the canonical model of Chua1 and the model of Bokhoven1, respectively.

The formal definition of the Chua1 model is expressed as follows.

Theorem 1. *Any one-dimensional piecewise linear curve with segments and break points can be represented by the expression
**
where the model parameters can be computed by
**
with denoting the slope of the th constitutive segment in the piecewise linear curve.*

Meanwhile, the Bokhoven1 model is expressed by a state variable system defined in formulation of LCP. For further details about LCP, the reader is referred to [63].

The main factor that motivates the use of PWL models is the simplicity of their structure, which is linear in each region of the domain. However, in terms of circuit analysis the use of piecewise linear models means transforming a single nonlinear equation into several linear equations that could easily be solved by standard methods from linear algebra. The problem lies now in the extremely large number of linear regions to be discarded to determine the entire set of circuit solutions. Unfortunately, this task requires enormous computational resources. To overcome that problem several methodologies and algorithms have been proposed. For example, Chua and Ying [64] reported an efficient method where the number of linear simultaneous equations to be solved could be decreased by a sign test. The same idea is improved by Yamamura and Ochiai in [65] where linear programming techniques are applied and a more efficient sign test algorithm is also reported. Katzenelson presents an algorithm based on Newton’s homotopy in [53], and more recently Tadeusiewicz and Kuczyński offered a method that combines the homotopy concept and the theory known as a linear complementary problem [57].

#### 3. The Proposed Homotopy Scheme

The equilibrium equation to describe the DC behaviour is obtained using the Kirchhoff laws, resulting in where represents the electrical variables of the circuit and the number of variables.

Homotopy methods are based on the fact that solutions are connected by a curve denominated “solution curve” or “homotopy curve.” Such curve is induced by including an extra parameter in the original NAES, resulting in where is the homotopy parameter and the family of solutions that conforms the homotopy path.

An example of homotopy formulation is Newton’s homotopy where is the starting point of the trajectory.

This system has the following properties.(1)At the starting point , where the homotopy system admits at least the solution .(2)The deformation continues until crossing where that is, the homotopy is reduced to (3).

Thus, the original problem becomes a numerical continuation problem [4, 5, 12, 13, 21, 25–28], where the continuation variable is the homotopy parameter . The homotopy map creates a continuous line that crosses several times depending on the number of operating points. A drawback of the homotopy methods is that there is no generalized methodology to guarantee that a single homotopy path possesses all the operating points of any given nonlinear circuit. In contrast, HCM can locate multiple operating points in comparison to NRM that can fail to find even a single operating point.

##### 3.1. Modified Spheres Algorithm

Once the equilibrium equation and homotopy map are constructed, a new problem emerges: the homotopy trajectory should be traced in order to detect the roots. It is well known from the literature that if the path tracking algorithm is not correctly implemented, the simulation may fail to detect any root even though the roots are, in fact, along the curve [4, 5, 12, 13, 21, 25–28]. For the case of PWL circuits, the problem for the path tracking algorithm lies in the prediction stage, because most of the predictor mechanisms are based on the tangent of the homotopy curve. If we consider that the derivative of PWL functions is not defined at the break points, then the tangent of the homotopy curve can not be evaluated at such points. Therefore, we propose adapting the modified spheres algorithm (MSA) for the path following of the homotopy curves of PWL circuits, which is not based on the use of tangents of the trajectory.

The homotopy formulation contains equations and variables, where represent the variables of the system and is the homotopy parameter . Nevertheless, if we add the equation that describes a sphere [2, 3, 13, 37, 66] with center at (initial point of the trajectory) and radius expressed by then, it is possible to apply a regular NRM to solve the homotopy formulation.

Therefore, using (4) and (8), we formulate the augmented system as

The solution curve can be traced by solving (9) for each hypersphere and updating the center of the hypersphere in each iteration step. The hyperspheres () are allocated successively as shown in Figure 1(a); at each step the solution obtained is used as the center of the new sphere. In the same fashion, Figure 1(b) depicts the application of MSA algorithm for the path tracking of PWL curves.

**(a) General homotopy curve**

**(b) Piecewise linear homotopy curve**

The proposed adaptation of the MSA scheme [37] for the Newton homotopy applied to PWL circuits is described as follows.(i)Predictor: we use points and to predict the point . The next predictor point and successive points are obtained as depicted in Figure 2(a).(ii)Corrector: after calculating the point predictor (), a corrected point () is calculated by solving (9). This procedure is detailed in [37]. Nonetheless, if we consider that—for this work—the homotopy trajectory is described as a PWL curve, then the corrector step will require most of the time one iteration to correct the prediction over straight lines, except at the break points, where it will require more steps to correct the curve (see Figure 2(b)).(iii)There is a potential issue called reversion phenomenon that provokes a backward tracing. In [37] a strategy based on gradients and angles of the intersection of the sphere along the trajectory is proposed.(iv)Find zero strategy [12, 22]: the finding zero strategy should start after the trajectory crosses . This procedure requires detecting the two points (*A* and* B*) before and after as depicted in Figure 3.(v)Interpolation of operating points [12, 22]: traditional schemes of path tracking algorithms require the application of complicated multidimensional interpolation algorithms as those reported in [37]. Nonetheless, as we will show in the cases study section, the homotopy trajectory of PWL circuits is also a PWL curve. Therefore, we propose using the formula of a parametric straight line to interpolate the solution at . Using the points and , we create two vectors and , respectively, resulting in the following equation:
where is the parameter that describes the -dimensional straight line. To perform the interpolation, we obtain the value of that induces and update the rest of the equations to obtain the sought solution (see Figure 3). This process can be repeated each time the homotopy trajectory crosses .(vi)Improving accuracy for final solutions also known as fine tuning [22]: traditional path following schemes including the ones reported for the MSA scheme [13, 37] require extra steps of NRM to improve the accuracy of the interpolated solutions. However, the aforementioned interpolation step can theoretically obtain a highly accurate solution. The reason relies on the fact that the homotopy curve crosses exactly over the roots of the equilibrium equation; then, the straight line (10) also crosses over the exact solution.

**(a) General homotopy trajectory**

**(b) Piecewise linear homotopy trajectory**

#### 4. Cases Study

In the present section, we will solve four case studies [64] to show the usefulness of the proposed method to perform the DC analysis of nonlinear circuits composed of devices modelled using the explicit PWL model (1). For all the cases’ study, we use a constant radius for the hyperspheres.

##### 4.1. Circuit with Two Nonlinear Resistors

The following case study shows a simple circuit composed of two nonlinear resistors as depicted in Figure 4. The models of the resistors and are described by 7 and 11 PWL segments, respectively.

Using Kirchhoff laws, we obtain Applying the Newton homotopy to (12) combined with MSA yields where and are the initial point of the homotopy at and is the equation of the hypersphere whose center will be updated at each iteration of the method.

For the first hypersphere the center is located at , , and . The centers of the successive hyperspheres are obtained using the aforementioned procedure in Section 3.1. As a result of MSA algorithm, the three operating points of the circuit have been located (see Figure 5). In addition, Table 1 shows the computed solutions, iterations, and the mean square error (MSE).

(a) Projection - |

(b) Projection - |

##### 4.2. Circuit with Three Nonlinear Resistors

The following case study shows a circuit composed of three nonlinear resistors as depicted in Figure 6. The models of , , and resistors are described by 3, 3, and 4 PWL segments, respectively.

Using Kirchhoff laws [64], we obtain

Next, we apply the Newton homotopy to (15) as done for the first case study, using , , and as the initial point of the homotopy. As a result of tracing the homotopy path, the three operating points of the circuit have been located (see Figure 7). In addition, Table 2 shows the found solutions, iterations, and the mean square error (MSE).

##### 4.3. Schmitt Trigger Circuit

Consider the Schmitt trigger circuit of Figure 8(a), where the bipolar transistors are modelled using the simplified Ebers-Moll (see Figure 8(b)) model of NPN transistors as depicted in Figure 8(c). The PWL model of five segments of the diodes of all transistors is

**(a) Original circuit**

**(b) Simplified Embers-Moll model**

**(c) Schmitt trigger circuit using Embers-Moll model**

Using Kirchhoff laws, we obtain

Then, Newton homotopy is applied in the same fashion as in the first example, using as starting point and at . The results show that the homotopy trajectory crosses for the three operating points of the Schmitt trigger circuit as depicted in Figure 9 and Table 3.

**(a) Homotopy path**

**(b) Zoom to the solutions region**

##### 4.4. Chua’s Circuit with Nine Solutions

Consider Chua’s circuit of Figure 10, where the bipolar transistors are modelled using the simplified Ebers-Moll (see Figure 8(b)) model of NPN transistors. The PWL model for the diodes of all transistors is (16).

Using Kirchhoff laws, we obtain

The Newton homotopy is applied to (18) in the same way as in the first case study. We trace two trajectories with the following starting points: and . After using the adapted MSA algorithm, the nine solutions of the circuit were found (see Figure 11). In addition, Table 4 shows the found solutions, iterations, and the mean square error (MSE).

(a) Homotopy path for initial point |

**(b) Zoom for (a)**

(c) Homotopy path for initial point |

**(d) Zoom for (c)**

#### 5. Numerical Simulation and Discussion

All case studies were successfully solved using the proposed methodology. For the first three case studies, it was possible to find within a single trajectory the three operating points of each problem, and for the last case study, we find the nine solutions of Chua’s circuit using two starting points. The high accuracy of the located operating points shows that the simple interpolation algorithm based on straight lines is a powerful tool and is simple to implement (see Tables 1–4). Besides, the accuracy of the interpolate solutions allows us to discard the stage of applying NRM extra steps to increase accuracy usually required by path tracking algorithms [4, 5, 12, 13, 21, 25–28]. It is important to remark that the variety of solved circuits exhibits the high potential of HCM combined with MSA to solve multistable nonlinear circuits integrated by devices modelled with explicit PWL representations.

In [53, 54] methods based on the Newton homotopy are reported, which are capable of locating only one solution per simulation. Therefore if user requires to find more solutions, it is necessary to propose some random initial points to perform more simulations. Instead, the proposed methodology is capable of locating multiple operating points within a single path or simulation.

Methods reported in [55, 56] use implicit PWL models. This implies that the number of linear regions explodes due to the diode synthesis. Besides, compared to the explicit models, implicit PWL models require a more complex algorithm to compute the model state variables. The proposed methodology uses an explicit model representation easy to implement.

In [57] a methodology that depends on the specific circuit topology description of multiport with extracted ideal diodes is reported. In such methodology, circuit equations are expressed in terms of the LCP which implies computing model state variables. The proposed methodology is based on a straightforward methodology based on the traditional circuit analysis tools used to build commercial circuit simulators and a simple path tracking algorithm easy to implement.

Further research should be addressed in the following topics.(i)Implement a strategy to use the fact that the homotopy curves are straight lines to accelerate the homotopy simulation.(ii)Implement a circuit simulator to solve high density transistor circuits modelled by the PWL technique.(iii)Replace the Newton homotopy by other methods as the fixed point homotopy [14], double bounded homotopy [12, 37], double bounded polynomial homotopy [11, 36], Newton fixed-point homotopy [67], -homotopy [68], and multiparameter homotopy [13, 17], among others. This research can lead to proposal of better homotopy schemes with better results in aspects like number of found solutions, CPU time, and global convergence, among others.(iv)Theoretically obtain the position of the break points of the PWL homotopy curve, significantly decreasing the number of steps. Such research can conduct to a very fast path tracking scheme.(v)Propose a methodology to obtain an optimal initial point for the homotopy simulation. This golden starting point will possess the characteristic of producing a minimum number of iterations and a maximum number of found solutions or all solutions.

#### 6. Conclusions

In this work, we presented a homotopy scheme based on the Newton homotopy and a modified MSA path tracking algorithm, applied to the DC simulation of nonlinear circuits composed of devices modelled by PWL techniques. The effectiveness and power of the proposed scheme were exhibited by the successful solution of all the operating points of several circuits including devices as nonlinear resistors, diodes, transistors, and transactors, among others. In addition, the high accuracy of the solutions was reached by applying a simple interpolation technique that discards the use of Newton-Raphson extra steps to increase the accuracy of the interpolated solutions. Finally, further research should be performed to extend the application of the proposed scheme to very large integrated circuits (VLSI).

#### Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

#### Acknowledgments

The authors would like to acknowledge Alejandra Diaz-Armendariz, Roberto Ruiz-Gomez, and Rogelio-Alejandro Callejas-Molina for their contribution to this project. H. Vazquez-Leal gratefully acknowledges the financial support provided by the National Council for Science and Technology of Mexico (CONACyT) through Grant CB-2010-01 #157024.