Worst-case analysis of electronic circuits based on an analytic forward solver approach

Purpose – The purpose of this paper is to evaluate the worst-case behavior of a given electronic circuit by varying the values of the components in a meaningful way in order not to exceed pre-defined currents or voltages limits during a transient operation. Design/methodology/approach – An analytic formulation is used to identify the time-dependent solution of voltages or currents using proper state equations in closed form. Circuits with linear elements can be described by a system of differential equations, while circuits composing nonlinear elements are described by piecewise-linear models. A sequential quadratic program (SQP) is used to find the worst-case scenario. Findings – It is found that the worst-case scenario can be obtained with as few solutions to the forward problem as possible by applying an SQPmethod. Originality/value – The SQP method in combination with the analytic forward solver approach shows that the worst-case limit converges in a few steps even if the worst-case limit is not on the boundary of the parameters.


Introduction
Electronic components always come along with certain tolerances; therefore, worst-case dimensioning of electronic circuits composed of such components has been gaining more and more importance. Some simulators [e.g. LTspice (Analog Devices, 2019) and PSpice (Orcad PSpice, 2019)] offer the possibility for a Monte Carlo (MC) analysis. This analysis provides statistical data on the impact of a device parameter's variance. A major disadvantage of stochastic methods is that they require a high number of simulation runs to reach the worst-case limits. This can be improved advantageously by solving currents and voltages analytically. The proposed approach allows conducting a full search over the parameter space. This, in turn, provides the possibility of worst-case analyses of the different parameters of interest. (In our example cases the maximum current that may occur was chosen.) Additionally, it allows full flexibility in modeling the individual components and their parameters. Furthermore, simulation results are extremely compact and can theoretically be stored with arbitrary precision. Finally, the objective function f(x) needed for any optimizer is available in analytic form. In this paper, the analytic forward solver approach (AFSA) and the sequential quadratic program (SQP) are implemented in Maple (Maplesoft, 2019), a computer algebra system (CAS). Section 2 explores the analytic forward solver approach and the SQP approach. Section 3 describes the chosen example case application, a closed-loop flyback converter and compares the performance of the SQP method with an MC analysis and evolution strategy. Examples for interesting references in the context of worst-case and sensitivity analyses are given by Chiariello et al. (2015), Khaligh et al. (2006); Lian (2012).

Method overview
2.1 Analytic forward solver approach Today, many circuit simulators for electronic circuits with different approaches are available. The proposed approach uses analytic solution techniques and has been developed especially for optimization and worst-case dimensioning of small-scale electronic circuits. The advantages are: the full flexibility in the modeling of the individual components and their parameters; simulation results are extremely compact and can theoretically be stored with arbitrary precision; even with a high number of simulation runs, the generated data remain easy to handle; and analytic methods show the potential of more efficient parameter studies.
While a comprehensive review of all existing circuit simulators is not within the scope of this paper, a short overview is nevertheless provided, for the sake of completion. The analytic forward solver approach supports analytic time-domain transient analysis for switched networks with piecewise-linear models and uses analytic methods for solving the systems of ordinary differential equations (ODEs). Symbolic simulators like ISAAC (Gielen et al., 1989), SAPWIN (Liberatore et al., 1995;Fontana et al., 2015) and Analog Insyde (Thomassian, 2007) exist. These simulators do not support fully analytic timedomain transient analysis for switched networks with piecewise-linear models. The simulator for integrated switched-mode power supplies circuits (SISMPSC) (Cliquennois and Trochut, 2007) is based on symbolic calculus tools and supports symbolic state-space equations (SSSE) but uses numerical methods for solving the systems of ordinary differential equations (ODEs). For the elemental circuit description the analytic forward solver approach uses a special Circuit-Model instead of the widely used netlist as, for example, used in the different implementations of the core SPICE algorithm SPICE2 (Nagel, 1975), LTspice and PSpice. A Circuit-Model describes the electronic circuit with symbolic ordinary differential equations, if state variables are present. In the case of no state variables, the electronic circuit is described by symbolic algebraic equations. The electronic circuit to be simulated may contain linear and nonlinear components. Linear parts are described directly with a SubCircuit-Model, an extended symbolic state-space model (ESSSM) and nonlinear ones with a Circuit-Model, comprising several SubCircuit-Models itself, the associated boundary conditions and a state table. The fulfilled boundary conditions of the active SubCircuit-Model are the reference (input for the state table) for the next SubCircuit-Models. An example of a SubCircuit-Model is shown in Figure 1. The associated ESSSM is described by (1)-(3). Equation (1) represents the system of differential (state) equations, (2) the signal of interest, and (3) the I/O interface. In this example, the input-cell y I (t) of the I/O interface is not defined: A collection of predefined SubCircuit-Models is provided for the individual circuit design. Connecting such simple predefined SubCircuit-Models results in a new SubCircuit-Model. This results in a large number of possible SubCircuit-Models. The advantage of this approach is that the electronic circuit to be simulated can be built from such SubCircuit-Models without transformation to a state-space model; only the I/O definitions must be substituted.
The ODE system solver module generally solves the ODE system from each SubCircuit-Model. The proposed approach uses the built-in ODE solver from Maple. Out of the different solver methods and options available, the proposed approach uses the Laplace method. When the ODE system from each SubCircuit-Model has been solved once, the solution is stored and, therefore, the ODE system does not need to be solved again. The analytic solution of the ODE System (1) for I L1 (t) from the SubCircuit-Model in Figure 1 is shown (5). The initial conditions I L1 (0), V C1 (0) and I out (t) were set to 0. Worst-case analysis of electronic circuits The time-domain transient analysis for a Circuit-Model starts at the first SubCircuit-Model, then, the boundary conditions for this SubCircuit-Model are verified. The fulfilled boundary condition determines the next SubCircuit-Model and the analytic solution for that time interval. This is repeated until the final circuit operating time to be simulated t Sim, is reached.

Sequential quadratic program approach
The implemented SQP method (6) is based on an active set strategy with linear inequality constraints (7) (Fletcher, 2000): where: x = column vector of the device parameters; f(x) = objective function; H = Hessian matrix of the objective function; c = gradient of the objective function; ; n = number of parameters; and m = number of constraints. The Hessian matrix H is updated in each iteration step until the optimal solution is found. To apply an SQP strategy, the objective function f(x) must be defined; for example, the inductor current (2) shown in Figure 1. The SQP strategy generally finds the minimum of the objective function f(x), in case of the maximum -f(x) must be used instead. The inequality constraints (7) are constructed from the device parameter bounds. In case of n device parameters, it is m = 2n. The general form of (7) in matrix form is described in (8).

Worst-case analysis of a resistor inductor capacitor (RLC) series resonant circuit
The schematic of the RLC series resonant circuit is shown in Figure 1. Table I summarizes the values of the components and the SQP parameters. The maximum peak inductor current I L1 in steady-state should be determined as a function of two parameters, e.g. t and L 1 . The objective function f(x) for the minimum peak inductor current is obtained by the evaluation of the component values from Table I in (5). The objective function for the maximum is: To find the maximum peak inductor in steady-state, the lower bound for t was chosen to be 10 times larger than the period T = 1/f. The 3-D plot of the objective function I L1 max (t, L 1 ) (9) including the solution path of the SQP method is illustrated in Figure 2. The implemented SQP method converges to the maximum after 7 iterations (summarized in Table II) with jÎ L1 j ¼ 0:04 A and is also visualized in the contour plot in Figure 3. The solution of the SQP method is exactly the same as expected: at the resonant frequency, the capacitive and inductive reactances cancel each other and the current through the inductor L 1 is only limited by the resistor R 1 , henceÎ L1 ¼ V in =R 1 ¼ 0:04 A.

Example case
The performance of the proposed approach is demonstrated by a worst-case analysis of a flyback converter in continuous conduction mode (CCM). The goal is to determine the maximum magnetizing currentÎ LM from the transformer T 1 in steady-state. This is especially important for the transformer design. The schematic of the closed-loop flyback converter is shown in Figure 4 and is divided into three parts: (1) Power stage: includes a real transformer with the winding resistance R P, the magnetizing inductance L M, an ideal transformer T 1 , a power switch Q 1 , a current sense resistor R Sense, the secondary rectifier D 1 and the output filter C O. The power for the cut-off region.
(2) PWM controller: for the control method, peak current mode control with constant switching frequency F S is chosen and is implemented at the PWM controller block. A detailed structure of the PWM controller is shown in Figure 5.   (3) Compensator: a Type II compensator (Ridley, 2011;Basso, 2012) is used, containing the error amplifier EA 1 , a diode D EA, and a voltage reference V Ref to model an adjustable shunt regulator (such as TL431). The error amplifier EA 1 is modeled as an ideal amplifier with infinite gain. The diode D EA is used to add an additional offset to the output level of EA 1 and also ensures that the amplifier can only sink the current. The optocoupler IC 1 is modeled in the forward linear region by multiplying I F with a constant factor, the current transfer ratio (CTR) I C = CTR I F and in the saturation region by a constant voltage source V CE(sat).
In general, many switching cycles are necessary until the system has reached the steady-state behavior in the case of switching mode power supply. In steady-state, a PWM signal with constant duty-cycle d on is generated in the way that the average output voltage V O equals V O nom. The compensator and the PWM controller are responsible for tuning the duty-cycle.

Steady-state analysis
The major advantage of the analytic forward solver approach is that the unknown dutycycle in steady-state can be calculated based on the analytic solutions of the state variables  Worst-case analysis of electronic circuits and/or signal of interest, e.g.
(2). In addition, the closed-loop flyback converter can be simplified to an open-loop flyback converter or Power Stage. This means that no additional algorithms are needed for the steady-state analysis, e.g. as used in (Li and Tymerski, 2000;Wong et al., 2000;Setiawan et al., 2017;Moskovko and Vityaz, 2018). The flyback converter Power Stage operating in CCM has two SubCircuit-Models (states): Figure 6 shows steadystate waveforms of the state variables for one switching cycle T S = 1/F S . State 1: PWM high, MOSFET Q 1 is switched on (saturation) and D 1 switched off (reverse bias) with 0 < t # t on .
State 2: PWM low, MOSFET Q 1 is switched off (cut-off) and D 1 switched on (forward bias) with t on < t < T S .
The initial conditions of the state variables in state 1 can be expressed as: and for state 2 as: Equation (14) expresses that the average voltage V CO on the capacitor C O equals V O nom. Using (10) and (11) in (12) and (13) with (14) results in a system of equations with three unknowns I LM 20 , V CO 20 , and t on. For a better performance the system of equations in analytic form (generated by the analytic forward solver approach) are solved numerically.

Sequential quadratic program result
The solution for the initial condition I LM 20 of the system of equations (12)-(14) corresponds toÎ LM . The objective function for the maximum magnetizing current is  Table IV summarizes the values the SQP parameters. The implemented SQP method converges to the maximum after 6 iterations with jÎ LM j ¼ 2:583 A.

Transient simulation
To verify the results from the SQP method in steady-state, for each iteration k (summarized in Table V) a transient simulation of the closed-loop flyback converter has been performed with the same parameters in Table IV and III as shown in Figure 7. The transient simulation Table III. Component values and parameters for the closed-loop flyback converter of Figure 4 Power stage PWM controller Compensator    Figure 7 as horizontal lines, these are marked with jI k ð Þ LM max j. The peak currents of the transient simulations exactly matches the SQP results, having the same colors.

Performance comparison
To compare the performance of the SQP method, an MC analysis and evolution strategy (1 þ 1) ES (Beyer, 2001) has been implemented in Maple as well. The implemented MC analysis uses the continuous uniform distribution over the parameter ranges. All methods use the same objective function (15). Table VI summarizes the iterations for the methods and results. The (1 þ 1) ES method and the SQP methods provide the same result; however, the number of iterations for convergence varies greatly. The MC method could not find the exact worst-case value even at higher iterations runs k. The total CPU time of the SQP method is significantly shorter than that of the other two (e.g. %1/9, 1/95, 1/7), illustrating the advantage of the AFSA.

A more complex example case
The example of the worst-case tolerance analysis of a flyback converter in CCM was shown. The example can be extended by e.g. the discontinuous conduction mode (DCM), which arises when the inductor current is zero. Here, the analytic forward solver approach provides the additional needed state for DCM. The initial conditions of the state variables can be expressed as it was done in the CCM example. Both models of the flyback converter can also be combined to one model which also supports switching between CCM and DCM. The CCM model becomes invalid when I LM 10 is negative.

Conclusion
The SQP method in combination with the AFSA shows that the worst-case limit converges in a few steps even if the worst-case limit is not on the boundary of the parameters. Based on the AFSA, it is possible to reduce a flyback converter in steady-state from a closed-loop to an open-loop system. These results are well in line with the transient simulation results obtained by applying AFSA to the open loop flyback converter. With respect to accuracy, the SQP method shows similar performance to (1 þ 1) ES strategy. Superior performance in terms of total CPU time was shown.