Integer Algorithm: A Useful Tool for Fault Diagnosis of Analog Circuits

This paper presents an efficient numerical method to solve systems of nonlinear algebraic equations. The method uses a homotopy simplicial approach associated with an integer algorithm. The integer algorithm is discussed in detail and supplemented with original procedures that play an essential role during computation. The fundamental problem of initial simplex generation was solved using the bounded variable simplex optimization method. Efficient root finding of nonlinear equations has wide applications in numerical mathematics and various engineering problems. The proposed method was applied to solve nonlinear equations that arise during the diagnostics of multiple parametric faults in electronic circuits. Circuits made with surface mount technology were considered, as well as circuits designed in complementary metal-oxide-semiconductor and bipolar technology. A universal diagnostic procedure enables testing different circuit classes using standard measurement equipment. Laboratory and numerical experiments demonstrate that the proposed diagnostic procedure is effective.


Introduction
Most physical phenomena are modeled by nonlinear differential or algebraic equations. Solving these equations analytically or numerically causes many problems and is the subject of many studies [1, 2, 5-7, 11, 14-17, 19, 23, 24, 27, 29, 30, 33, 34]. An important place among the methods that find solutions to equations is occupied by different variants of homotopy methods [1,5,7,11,14,15,17,19,24,27,29,30,34]. Depending on the variant, these methods make it possible to determine the solution to a given problem numerically or analytically. The concept of homotopy was also used in the proposed method. Some concepts used in solving nonlinear differential and algebraic equations are discussed below.
Analytical methods are an important branch of scientific research methodology alongside numerical techniques. The primary advantage of analytical methods is that they provide much better insight into the solution of a problem, allow the identification of sensitive factors, and enable the faster design of systems. The homotopy analysis method (HAM) is an analytic approximation method for nonlinear ordinary and partial differential equations proposed by Liao [14]. Using the homotopy analysis approach, a continuous mapping of an initial guessed approximation can be constructed to the exact solution of the original equations. An auxiliary linear operator is chosen to construct such a continuous mapping, and an auxiliary parameter is used to ensure the convergence of the solution series. The basic ideas of the HAM and a dozen examples are described in [14]. [27] uses HAM to obtain convergent series solutions of strongly nonlinear problems. In [11], the homotopy analysis transformation method is used to solve various nonlinear differential equations and is a combination of HAM and the Laplace transform method that is a powerful and efficient technique when finding analytical solutions to a broad class of problems. In [7], the generalized plane Couette flow of couple stress fluids between two parallel plates was investigated using the optimal homotopy asymptotic method (OHAM) and new iterative method (NIM). OHAM does not require discretization, is free from an initial guess, and the auxiliary function controls the convergence of the method. NIM straightforwardly handles linear and nonlinear equations, and does not require the calculation of tedious Adomian polynomials but is an iterative method; thus, OHAM requires an initial condition to start, which is its primary disadvantage. The results obtained by these methods, which are in the form of infinite power series, are reported in [7]. The variational iteration method is widely used to solve linear and nonlinear differential equations of integer and fractional order. In [2], the convergence analysis of the modified variational iteration algorithm II (MVIA-II) is performed, and its application in physical and biological sciences is presented. In [33], the optimal auxiliary function method was applied for the first time to the approximate solution of partial differential equations arising in shallow water. Refinement schemes, or partition schemes, are valuable tools for modeling curves. A generalized class of binary interpolating refinement schemes and their properties are given in [6]. Unified algorithms based on refinement schemes for solving linear and nonlinear differential equations with constraints are also presented.
Efficiently finding the roots of algebraic nonlinear equations has wide applications in numerical mathematics and applied science. The Newton-Raphson method has an iterative form and is the most popular technique for solving nonlinear equations. The disadvantage of this method is that the initial approximation of the solution must be chosen close sufficient to the proper solution to guarantee quadratic order of convergence. Finding a criterion for selecting the initial guess is a complex problem. The Newton method also allows the determination of only one solution from a given initial guess. Determining multiple or all solutions to a given system of nonlinear equations, or even a single equation, requires a different approach. [16] proposes new numerical algorithms for finding the roots of one-dimensional nonlinear algebraic equations and uses the variational iteration technique and have sixth-order convergence. An efficient numerical algorithm for solving single nonlinear algebraic equations based on the Newton-Raphson and homotopy analysis methods is discussed in [1]. A comparison of several recent homotopy methods in terms of accuracy was performed in [17]. The methods were tested on systems of nonlinear algebraic equations, and Newton's homotopy method was shown to be the most favorable option. The necessity of solving systems of polynomial equations occurs often in different fields of science and engineering, such as pattern construction, inverse kinematics, robotics, vision, and calculation of equilibrium states of chemical reaction equations. In [5], the particular category of nonlinear systems is solved using the homotopy continuation method. In [19], a new homotopy combining fixed point and Newton homotopy is proposed to find all real roots of a system of nonlinear algebraic equations. First, the Levenberg-Marquardt method is used to search for the starting point. Then, a continuation method is used to trace paths from the obtained starting point to find the roots. [30] develops theoretical results on the global convergence of a specific class of homotopy methods for solving nonlinear circuits and systems. A set of sufficient conditions that guarantee the global convergence of homotopy methods is given. [15] discusses the application of so-called globally convergent probability-one homotopy methods to various systems of nonlinear equations that occur in circuit simulation. Efficient and reliable determination of one or more operating points of a nonlinear circuit is the first step during any circuit simulation process. In [29], a straightforward SPICE-oriented Newton homotopy method is proposed to find multiple DC solutions. The solution curve-tracing algorithm is based on the arc-length and Newton homotopy methods. An approach based on a mathematical concept called deflation to find multiple operating points is proposed in [23]. The primary idea of deflation is to deform nonlinear equations so that previously determined solutions are removed, and a method capable of finding a single solution is used to determine the next solution. This concept has been combined with the homotopy method and the discrete equivalent of Newton-Raphson nodal analysis.
In this study, the nonlinear equations arising in the fault diagnosis of different classes of analog electronic circuits are specifically considered. Such equations appear in methods using the simulation after test approach. In these methods, a system of nonlinear equations is obtained after measurement tests, the solutions of which are the fault parameters. We thus consider a system of nonlinear equations: . . .  (2) is a difficult task and often requires advanced mathematical tools. One of these tools, as described above, is the homotopy method [34], which operates with a homotopy equation: where α is a homotopy parameter and the solution of f h x, 0 = 0 is known or easy to find, while f h x, 1 =f x . In the simplest case, the parameter α is changed from 0 to 1, and the corresponding equation is solved each time while considering the previous result. This approach is conceptually simple but difficult to execute effectively in practical applications. In another homotopy approach α is considered as (n + 1)-st variable and the homotopy equation becomes: (4) represents a system of n individual equations in (n + 1) unknown variables. Vector x that meets (4) and has (n + 1)th element x n+1 = 1 is the solution of (2). The simplicial methods [24,34] are dedicated to solving equations such as (4). As a rule, only the standard simplicial method is applied in practice. Unfortunately, this method has the drawback of time-consuming and complex procedures when generating the sequence of simplices. Mathematical literature provides other simplicial methods leading to different algorithms. The method known by the name integer algorithm [34] is a promising method in this field, is described in detail in this paper and is supplemented by some procedures that play a critical role in the computation process. The developed method allows complex diagnostic equations to be solved. To confirm the effectiveness of the method in identifying parametric faults, a diagnostic process was performed for several linear and nonlinear circuits. Section 2 discusses the primary idea of simplicial methods. Section 3 presents a sketch of the integer algorithm. We describe procedures necessary to effectively implement the algorithm, including creating an initial simplex and an adjacent simplex in Sect. 4. Section 5 discusses the application of the numerical method in diagnosing electronic circuits. A sketch of the diagnostic method and examples of its application to practical circuits are provided. Conclusions and possible further research directions are discussed in Sect. 6. All numerical procedures were implemented in the DEL-PHI programming environment. Some electronic circuit simulations were performed using IsSPICE 4 software [28,32]. The third release of HP Agilent Keysight 34401A software [12] was used to control and record data from the 34401A multimeter.

Preliminaries
This section provides a brief review of simplicial methods.

The Main Idea of the Simplicial Methods
A j-simplex is the figure formed by j + 1 independent points x 0 , x 1 , . . . , x j , where each of the points is a vector called a vertex. The simplex can be written in terms of its j + 1 vertices as s = x 0 , x 1 , . . . , x j . A j-simplex is the convex hull of the j + 1 independent points x i , i = 0, 1, . . . , j, and can be described as: The convex hull of some but not all of the vertices x i is termed a face of s. If the face has j vertices, it is called a facet. We assume that we have a nonlinear function f (w) : R n+1 → R n , and let s = x i n+1 0 be an (n + 1) simplex in R n+1 . We consider the facet x i n+1 1 of the simplex s. The point: is

Standard Simplicial Algorithm
The standard simplicial algorithm operates as follows. We evaluate f on the vertices . . , n + 1 define the linear function: where we substitute G x i = f x i and solve the equation G (w) = 0 for w. This equation on the simplex s is defined by: Because (8) (7) where G x i = f x i ensures that if G (w) = 0 and the simplex is sufficiently small, then w is an approximate solution of f (w) = 0, [34]. The property is essential and termed the c-property. A disadvantage of the standard simplicial algorithm is that it is quite difficult and time-consuming to solve equation G (w) = 0 (defined by (8)) for w ∈ s.

Integer Algorithm
Now, we consider another function G with the c-property. This function is defined by (7), where: In definition (10), e j is the n-vector of zeros except for a one in the jth position, and e is the n-vector of all ones. The set G x i n+1 i=1 , which is obtained by evaluating G at all n + 1 vertices of a facet, is called complete if: Thus, if the facet is complete, G x i must be different at each vertex of the facet. If facet 1 n+1 x i is the centroid of the facet. In this case, the problem of solving G (w) = 0 is trivial. It can be proven [34] that G defined by (7), where G x i are defined by (10) satisfies the c-property. Thus, if G (w) = 0 and the simplex is sufficiently small, then w is an approximate solution of f (w) = 0.
To simplify the algorithm, the vectors e j and e in (11) can be coded by integers as follows. We now consider a vector e j = [0 . . . 0 1 0 . . . 0] T where one is located at the jth position, which means that the jth element of f x i is positive. The vector will be coded by integer j called a label. Vector e = [1 . . . 1] T , which corresponds to f x i having all nonpositive elements, will be coded by label − (n + 1). For example, if n = 3 then e 1 = [1 0 0] T is coded by label 1, e 2 = [0 1 0] T by label 2, e 3 = [0 0 1] T by label 3, and e = [1 1 1] T by label (-4).
Based on the definition (10) of vectors e j , j = 1, . . . , n, and e, we can formally define the labels as follows. If at vertex x i of the facet x i n+1 1 , jth element f j x i of the vector f x i is positive we assign label j to this vertex. If f j x i ≤ 0 for all j = 1, . . . , n, we assign label − (n + 1) to the vertex x i . The labels enable the identification of a complete facet. If facet x i n+1 1 contains vertices possessing all the labels 1, 2, . . . , n, − (n + 1), the facet is complete because in such a case, (11) holds. Thus, this process follows the integer algorithm [34]. We also let s be a simplex that has a complete facet B. Then, s can be presented as s = B ∪ {x}, wherex is a vertex of s that does not belong to B. We let the label ofx be l, where l = {1, 2, . . . , n, − (n + 1)}. Because B is complete, one of its vertices, say x l , its label is also l. We thus consider the facetB consisting ofx and all vertices of B except x l ; this facet is also complete. B andB are the only complete facets of s. Thus, the centroids of B andB meet the equation G (w) = 0, and because G (w) is a linear function, the linear segment in simplex s connecting these centroids represents the solution of G (w) = 0 in the simplex. Next,B is considered a completely labeled facet of a new simplexs =B ∪ x , wherex is a vertex ofs that does not belong toB, and the step is then applied tos as before. The process continues from simplex to simplex in the same way, as shown in Fig. 1. In the case shown in Fig. 1 Thus, f can be positive or nonpositive, and there exist only two labels: 1 and (−2).
The integer algorithm generally requires more simplices than the standard simplicial algorithm, but the effort per simplex is significantly reduced [34].

Developing and Supplementing the Integer Algorithm
Section 3 shows a sketch of the integer algorithm. To apply this algorithm and ensure its effectiveness, various problems must be solved and are discussed in more detail, along with propositions to solve them.

Creation of the Initial Simplex
The initial simplex must include a complete facet whose vertices contain all the labels 1, 2, . . . , n, − (n + 1). Thus, we require n+1 vectors x i such that f x 1 has positive element f 1 x 1 , ..., f (x n ) has a positive element f n (x n ), and all elements of f x n+1 are nonpositive. To find these vertices (vectors n+1), we force their last elements x i n+1 to zero. The element x n+1 corresponds . .x n , as explained in Sect. 5, and neglect the higher order terms: where D = d i j n×n , d i j = ∂f i ∂ x j (x nom ) , i, j = 1, ..., n. We create a vector h = h 1 . . . h n T whose elements are negative and write: which can be rewritten as: where We want to find a positive vectorx ∈ {(1 − k)x nom , (1 + k)x nom } where k is a positive number smaller than one, say 0.005, such that Dx ≤ u. For this purpose, we apply the bounded variable simplex optimization method [3] as follows: minimize a (a − an arbitrary constant) The solutionx satisfies the relation: However, because the left-hand side of (16)  Otherwise, we create vertex x = x 0 T having the label − (n + 1).

Procedure for Findingx, which Makes the ith Element off x Positive
We now consider the functionf (x), select its ith component, and write it similarly: Depending on the sign of d i j we choosex j , j = 1, . . . , n, as follows.   Fig. 2). We arrange the lengths of these distances in increasing order. Next, we select the smallest one (in Fig. 2, d 1 ) and consider its terminal on B, x m (in Fig. 2, x 1 ). If it is possible, we assign the label of x m to vertex x n+1 . Otherwise, we select the next smallest distance. In this manner, we obtain the other complete facetB defined by vertices x i , i = {0, . . . , n} , i = m and x n+1 (see Fig. 3). The segment connecting the centroids of B andB is a solution path inside s. To create an adjacent simplex, we useB and the vertex obtained by reflecting vertex x m relative to the centroid ofB (see Fig. 4). We continue the process that leads to a sequence of simplices.

Sketch of the Method for Fault Diagnosis and Examples
Fault diagnosis in analog circuits is an essential issue in the field of electronic circuit design [4,8,10,13,20,22]. The most commonly considered types of faults are soft and hard faults. Soft faults are caused by deviations of circuit element values from their nominal values, and hard faults refer to catastrophic changes to a circuit or component. As mentioned in the introduction, solving nonlinear algebraic equations is often required to diagnose analog circuits. Nonlinear equations occur when trying to find the parameter values of faulty elements in so-called multiple soft fault diagnosis [24][25][26]. The procedures used in this area exploit a diagnostic test performed adequately to the type of circuit under test (linear, nonlinear, dc, ac), and a diagnostic equation is formulated that relates the measured quantities to the sought parameters. Such an equation, even for linear systems, is nonlinear, and its solution requires the application of appropriate numerical procedures. This problem does not exist in the approaches devoted to detecting or classifying defects belonging to predefined classes [9,18,21,31,35]. A sketch of the diagnostic procedure, which proposes using the integer algorithm concept described in the previous sections, is presented below.

Sketch of the Method
4. For the test equation (19), the Newton homotopy equation is written as: where u nom is a vector of the voltages in the nominal circuit (i.e., the circuit with nominal values of all parameters x i ) and α is a homotopy parameter. 5. The homotopy equation (20) can be rewritten as f (p) = 0, where p = p 1 . . . p n , p n+1 T , p 1 =p 1 , . . . , p n =p n , p n+1 = α is solved for p using the integer algorithm.
As mentioned above, this study aims to develop an efficient method for solving nonlinear diagnostic equations to determine the real parameters of the elements satisfying these equations. This problem arises in any method that allows a complete diagnostic process, including verification methods. In these methods, the assumption of the fault of certain elements is verified by solving the diagnostic equation at a preselected test. The resulting parameter values are then compared with the ranges derived from the tolerances, and the fault of the elements associated with these parameters is concluded. The number of measured quantities must equal the number of identified parameters. Thus, the proposed method can be used to determine parameters for different classes of circuits with the preselected test. The test selection is an issue beyond the scope of the paper. The method's effectiveness was confirmed in the laboratory for two circuits (Example 1 and Example 3). In Example 1, a linear circuit in the frequency domain was considered. The fault of the elements belonging to the testable sets was verified by measuring the rms values of the voltages at different frequencies. In Example 3, the verification process was performed in a nonlinear circuit, and the DC voltages at selected circuit nodes were measured during the measurements. In Example 2, the testing of the method's effectivity was performed solely by simulation.

Examples
To describe the performance of the proposed method, we consider the three circuits shown in Figs. 5, 7 and 8, and in all cases, we perform triple soft fault diagnosis. We terminated the computational process if no solution was determined after generating 10,000 simplexes (i.e., the homotopy parameter α did not reach a value equal to 1). The calculations were performed for both variants of the initial simplex (see the end of Sect. 4.1.2). In the linear circuit of Fig. 5, the faulty parameters belong to the set {R 1 , R 2 , R 3 , R 4 , R 5 , R 6 , C 1 , and C 2 }. In the nonlinear circuit shown in Fig. 7 designed in CMOS technology transconductance parameters, K p of the MOS Computations were performed on a PC with an Intel (R) Core (TM) i7-6700 processor, and we implemented the diagnostic procedure in the DELPHI programming environment.

Example 1
We consider the filter [8,22,26] based on the three operational amplifiers shown in Fig. 5. The nominal values of the parameters are given in the figure. The testability of this circuit, with the selected test point V A , is three, and there are 16 testable 3-element sets of the circuit parameters (see the reference [22]): Thus, the method allows for diagnosing up to three faulty elements.
The circuit was built using a breadboard; three high-gain, internally compensated operational amplifiers of quad general-purpose op-amp LM 348-N connected to a ±15V supply; resistors; and capacitors with values for the fault-free circuit equal to R 1 = 29.97 k , R 2 = 20.04 k , R 3 = 10.04 k , R 4 = 10.02 k , R 5 = 20.03 k , R 6 = 15.02 k , C 1 = 100.7 nF, C 2 = 99.60 nF. The circuit was laboratory tested using a measurement system consisting of a 34401A digital multimeter and DF1410 DDS function generator. To arrange the test, the voltages having rms values equal to 3 V and frequencies equal to 60, 100, and 150, all in Hz, were applied to the input node, and the rms values of the voltage V A were read with an accuracy of 1 mV.
To investigate the method, 16 faulty cases corresponding to 16 testable 3-element sets, each including up to three faulty elements, were considered. The proposed diagnostic method uses the measurement data obtained in the real circuit, assuming that   Fig. 6c, consisting of an input resistor 100 k , an output resistor 100 , and a voltage-controlled current source with a gain coefficient equal to 1000 A/V. The model makes it possible to use the standard nodal method instead of the modified method and reduces the number of equations solved during each analysis. Because most circuits using operational amplifiers are strong negative feedback circuits, changing the model parameters within wide ranges does not affect the measurement results. With operational amplifier failure leading to operation in the saturation region, the linear model is inadequate, and this case is not considered in this study. In all cases, the method correctly estimated the values of faulty parameters. The results of ten of the cases are summarized in Table 1

Example 2
We consider the differential amplifier shown in Fig. 7 with the load resistance R test = 6. To perform the diagnostic test, we choose the measurement nodes 1, 3, and 4 and apply input voltages V in1 = 2.6, V in2 = 2.5, V DD = 5.0, all in volts. Parameter faults were simulated using the SPICE program. The measurement accuracy was assumed to be 0.1 mV. The diagnosis was performed numerically.
Fifteen cases containing up to three faulty parameters were considered to study the method's effectiveness. The diagnostic process was performed assuming that the healthy parameters had nominal values. Results are summarized in Table 2. In 14 cases, the method correctly estimated the values of the faulty parameters. The total diagnostic time for each case does not exceed two seconds. In the study, K p parameter faults for all transistor combinations were considered. Faults corresponding to changes in the K p parameter up to approximately ±38% of the nominal value were considered. Only for combinations M2, M4, and M5 was no solution obtained in the assumed number of simplexes. To check whether this was due to the assumed parameter values (assumed failure), the diagnostic process was performed for several other parameter sets. Each time, the method failed. It is difficult to identify the reason for this behavior of the method. In nonlinear systems, multiple solutions of the test equations are more likely to occur (i.e., the test equations can be satisfied by different sets of values of the same parameters). Because the proposed method does not target such a problem, divergence or slow convergence can occur. In such cases, it is necessary to use a different diagnostic test.

Example 3
We now consider the preamplifier circuit, including seven resistors and two bipolar transistors, shown in  To describe the performance of this method, 40 faulty cases were considered, each including up to three faulty elements from the set R 1 , R 2 , R 3 , R 4 , R 5 , R 6 , R 7 . The diagnostic process was performed using the measurement data obtained in the laboratory and assuming that the unfaulty parameters have nominal values and the parameters of the Gummel-Poon model [28,32] Table 3. The measured voltages in the healthy circuit are 7.898, −5.756, and 1.940, all in volts. The measured voltages for the first fault in the table were 7.538, −5.822, and 3.369 volts. The total diagnostic time for each case does not exceed one second.
In circuits made in bipolar technology, due to strong exponential-type nonlinearities present in transistor models, the problem of ambiguity of solutions often arises. In addition, determining testability at a specified test for nonlinear circuits is a complex and open problem. Both problems mentioned above can lead to divergence or slow convergence of methods aimed at determining a single solution. In the cases where the method fails, this effect has been observed.

Conclusion
The primary goal of this study was to develop an efficient method for solving nonlinear equations with particular attention given to those occurring in fault diagnosis of analog circuits. The core point of the proposed method is the integer algorithm [34]. To date, this algorithm has not been used to solve nonlinear equations found in real-world problems but to obtain specific mathematical results (e.g., Sperner's lemma from combinatorial topology). This study adapted the algorithm to solve various fault diagnosis problems of linear and nonlinear electronic circuits. The examples presented in this paper show that the method is a valuable tool for multiple soft fault diagnoses in electronic circuits. The effectiveness of the proposed method has been confirmed by laboratory and numerical experiments.
Future research should attempt to generalize the proposed method to search for multiple algebraic solutions to nonlinear equations. The problem of interest occurs both when analyzing certain classes of nonlinear systems, such as flip-flops, neural networks, and line receivers, and when diagnosing electronic systems. A typical homotopy method leads to the solution path starting at the homotopy parameter equal to 0 and ending at a value equal to one, which corresponds to the determination of the solution. If we continue the homotopy procedure, the path can pass through points where the value of the homotopy parameter equals one many times. The remaining coordinates of these points are successive solutions to the original system of nonlinear equations.

Data Availability
We confirm that the proposed manuscript does not contain any additional data beyond what is already included. However, if any reader is interested in obtaining additional files that contain the results of the measurements obtained in the laboratory to verify the results, they can be obtained from the authors upon request.

Conflict of interest
The authors declare that they have no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.