Introduction

Analog circuits have always been the un-avoidable part of the electronics. Even if most of the systems are now digitalized, still analog circuits depict the real case scenario because before we discretize the system we should have an idea of their transients and their analog variation. Every analog circuits usually consists of voltage or current sources, some resistors, transistors etc. Coming to the transistor, they constitute non-linear part of the circuits. They behave differently with AC and DC sources. The value of voltages and currents determined with DC sources, are known as DC operating points. The DC operating points determination needs the solution of system of non-linear algebraic equation.

DC operating points are usually calculated by the Newton-Raphson algorithm. The newton-raphson algorithm fails some times because of the unavailability of initial conditions very close to the solution. Providing a starting point very close to the unknown solution is a difficulty in itself. Therefore alternative methods to solve nonlinear system of equations, such as homotopies, are often applied to find the DC operating points of various circuits. Various homotopies can be implemented. Now modified variable stimulus homotopy has been also implemented and tested. The project is composed of two programs: a parser, developed by Edward Chan improved by Andrea Dyess, and then recently further improved by Joao Eric Melo and Jatin Vikram Singh. It generates a system of equations derived from a circuit description file. A Matlab script written by Heath Hoffman and also new matlab homotopy implements the homotopy method to solve the system of equations. The parser had some problem in nodal analysis of the circuit. The main goal of the project is to identify and correct the problems in parser and test more complicated as well as simple circuits on homotopy and analyze the behaviour of homotopy curves.

This page gives brief outline of the project.Every topic is introduced and it's overview has been provided on this page. The details of subtopics, challenges, work done and conclusions have been elaborated completely in the reports attached in the Downloads section. 

 

[Top] DC Operating Points

The algorithm to find the DC operating points in this project is described by the scheme shown in Figure 1:

  Fig. 1. Algorithmic flow to find the DC operating points.

Input circuit is described by the netlist written in the SPICE format. Exact SPICE format has been discussed in the report (Parser_improved) in the Download section. This file is then used as the input to the Parser program that in turn produces the system of nodal or modified nodal equations in a symbolic format. These non-linear equations are used by the Fixed point homotopy algorithm or modified variable stimulus algorithm that solves the system of equations and calculates the DC operating points of the specified circuit. The following sections give a quick explanation about the parser used in this project. 

[Top] Parser

The homotopy method requires the circuit equations and jacobians in two of its functions for finding the solutions. The parser created by Edward Chan, improved by Andrea Dyess and then recently further improved by Jao Eric Melo and Jatin Vikram Singh;receives a netlist file as the input and generates equations. A netlist file is a text file that describes a circuit, that is, its components and their connections to each other in the circuit. The netlist file can be written or genrated by any simulator available. The Exact netlist format has been discussed report(Parser improved).As an example, shown are the schematics and netlist representation of the two-transistors circuit.

             Fig. 2. Schematic representation of the two-transistors circuit.

                  Fig. 3. Netlist representation of the two-transistors circuit.

From the netlist file, the Parser generates as output the system of equations based on a nodal or modified nodal analysis. This equations describe the circuit behavior in terms of voltage and currents of each node as well as its Jacobian. A Jacobian is a square matrix of whose elements are derivatives of each function with respect to each variable. This system of equations and its Jaconbian are used as input to the MATLAB code developed by Heath Hofmann, which uses homotopy method to solve the system of equations and then find DC operating points of the circuit.

[Top] Fixed point homotopy (Transistor circuit analysis)

Fixed point homotopy is the simplest homotopy to find solutions of non-linear circuits. This homotopy gives the results perfectly with the schmitt circuit and chua's circuit. Voltage Latch-up circuits consisting of two transistors and two resistors give unrealistic results with the circuit simulators like Ltspice. Voltages reach upto Mega-volts just with the application of some mA currents. We tested the circuits shown below in the figure:

  Fig. 4. Circuits analyzed.

According to the convergent ball concept, even with the globally convergent homotopies with probability 1, to have a solution, the intial condition must be inside the ball. This theory has been elaborated more in the Report (homotopy:Analysis & Implementation).one simulation result very close to λ = 1 has been shown below. But since it doesn't cross λ = 1; so no solution could be found. Please refer to Report (homotopy:Analysis & Implementation) for more details.

  Fig. 5. Homotopy Result.

[Top] Modified variable stimulus homotopy (Implementation)

An another class of homotopy functions that can be used to solve non-linear circuits has been implemented.Modified variable stimulus homotopy is different from fixed point homotopy in terms of the parameter multiplication.In fixed point homotopy λ is multiplied to the whole equation while in modified variable stimulus λ is multiplied only to all the nodes:

This homotopy implimentation is compatible with the output equations and jacobians generated by Parser.

  Fig. 6. Homotopy path followed by the Chua's circuit.

This homotopy was tested on schmitt trigger and chua's circuit and we got 3 and 9 solutions respectively. The solutions we got are very close to the spice simulators. Implementation and results have been explained in details in the Report (homotopy:Analysis & Implementation). Matlab code can be found in the Download section. 

[Top] Conclusion

The parser has been improved in terms of quality of output. Now it can generate the nodal and modified nodal equations for all the circuits. However more work is needed to determine the equations of circuits having floating sources. The equations are in the format required by the Matlab code. Now the circuit equations can be tested on two homotopies: fixed point homotopy and modified variable stimulus homotopy. Exact proecedures to implement homotopy have been explained in the report (homotopy:Analysis & Implementation) attached in download section. Further improvements can be made to incorporate more devices like current sources, MOSFET and some work is required to incorporate and detect floating sources efficiently. An insight for this has been suggested in the report (Parser_improved) in download section. Also steady-state analysis can be done now.

[Top] Downloads

The updated codes of parser, matlab implementations of both homotopies , netlist files and both the reports can be found seperately in the following links:


 1) Parser (Visual studio c++ version)

 2) MATLAB Code (Fixed point homotopy) (Modified Nodal Analysis)

 3) MATLAB Code (Modified variable stimulus homotopy)

 4) PSPICE Netlist

 5) Project report : Parser Improved

 6) Project report : homotopy:Analysis & Implementation

 7) Republic of India

[Top] References

[1] Lj. Trajkovic, "DC Operating points of transistor circuits," Nonlinear Theory and Its Applications, IEICE, vol. 3, no. 3, pp. 287-300, July 2012.

[2] L. T. Watson, S. C. Billups, and A. P. Morgan, Algorithm 652, Hompack: A Suite of Codes for Globally Convergent Homotopy Algorithms.

[3] E. Fung, Homotopy Methods for DC operating point and Periodic Steady-State Analysis: Spice3 Implementation, M.Sc. Thesis, University of California Berkeley, 1997.

[4] A. Dyess, Finding DC Operating Points of Chua's Circuit using Homotopy Methods, Technical Report, University of Alabama, 1997.

[5] A. Dyess, E. Chan, H. Hofmann, W. Horia, and Lj. Trajkovic, "Simple implementations of homotopy algorithms for finding dc solutions of nonlinear circuits," in Proc. IEEE Int. Symp. Circuits and Systems, Orlando, FL, May 1999, vol. VI, pp. 290-293.

[6] Lj. Trajkovic and A. N. Willson, Jr., "A two-transistor circuit having no resistors cannot model an SCR," in Proc. IEEE Int. Symp. Circuits and Systems, Philadelphia, PA, May 1987, pp. 888-891.

[7] Lj. Trajkovic and A. N. Willson, Jr., "Behavior of nonlinear transistor one-ports: things are not always as simple as might be expected," in Proc. 30th Midwest Symposium on Circuits and Systems, Syracuse, NY, Aug. 1987, pp. 1210-1213.

[8] E. Chan, Documentation on the Parser Program, Technical Report, University of California Berkeley, 1996.

[9] J. E. Melo, Improving an Electronic Circuit Simulator Based on Homotopy Methods, Technical Report, Simon Fraser University, 2014.

[Top] About Sudhir

Sudhir Kumar is a 4th  year Dual Degree student of Electrical Engineering (M. Tech. in Communications and Signal Processing)   (2013-2018) at Indian Institute of Technology, Bombay, India.
This work was done as part of his summer internship (May 2016-July 2016) funded by MITACS Globalink program under supervision of Professor Ljiljana Trajkovic at Simon Fraser University.
Please email questions related to this work to 13D070036@iitb.ac.in or contact him via LinkedIn