Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
A HYBRID ANALOG/DIGITAL CIRCUIT FOR SOLVING NONLINEAR PROGRAMMING PROBLEMS
Document Type and Number:
WIPO Patent Application WO/2022/165287
Kind Code:
A1
Abstract:
A hybrid analog- digital electronic circuit for solving nonlinear programming problems includes an analog circuit and a digital microcontroller interconnected to each other by an analog-to- digital converter (ADC) and a digital-to-analog converter (DAC). The analog circuit physically realizes a nonlinear programming problem (NLP) where voltages in the analog circuit represent variables in the NLP, and the interconnection of the analog circuit components enforce Karush-Kuhn-Tucker (KKT) conditions on the variables, such that the voltages in the analog circuit that represent the variables of the NLP naturally converge to an optimal and feasible solution of the NLP. The digital microcontroller sets the voltages in the analog circuit at particular nodes in the analog circuit through the DAC, where the voltages set at the particular nodes determine a precise cost function to be minimized by the analog circuit, where the voltages set at the particular nodes are computed by the digital microcontroller based on measurements obtained from the analog circuit through the ADC.

Inventors:
POON JASON (US)
Application Number:
PCT/US2022/014463
Publication Date:
August 04, 2022
Filing Date:
January 29, 2022
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
THE BOARD OF TRUSTEES OF THE LELANDSTANFORD JUNIOR UNIV (US)
International Classes:
G06F17/11; G06F17/12; G06F17/13; G06F17/15; G06F17/16
Foreign References:
US20080174460A12008-07-24
US20150242360A12015-08-27
US20110301723A12011-12-08
US20110244790A12011-10-06
US20030130899A12003-07-10
Attorney, Agent or Firm:
JACOBS, Ron et al. (US)
Download PDF:
Claims:
CLAIMS 1. An electronic circuit comprising: (a) an analog circuit that physically realizes a nonlinear programming prob- lem (NLP) wherein voltages in the analog circuit represent variables in the NLP, and the interconnection of the analog circuit components en- force Karush-Kuhn-Tucker (KKT) conditions on the variables, such that the voltages in the analog circuit that represent the variables of the NLP naturally converge to an optimal and feasible solution of the NLP; (b) a digital microcontroller connected to nodes of the analog circuit; (c) an analog-to-digital converter (ADC) and a digital-to-analog converter (DAC) that interconnect the analog circuit with the digital microcontroller; wherein the digital microcontroller sets the voltages in the analog circuit at particular nodes in the analog circuit through the DAC, wherein the voltages set at the particular nodes determine a precise cost function to be minimized by the analog circuit, wherein the voltages set at the particular nodes are computed by the digital microcontroller based on measurements obtained from the analog circuit through the ADC. 2. The method of claim 1 wherein the analog circuit comprises an integrator block implemented by a transimpedance amplifier with the dynamics of a capacitor. 3. The method of claim 1 wherein the analog circuit comprises a nonlinear resistor block implemented by a transimpedance amplifier with a voltage-current rela- tionship of 0 voltage for input current of 0 or less, and voltage proportional to input current when the input current is positive.
Description:
A HYBRID ANALOG/DIGITAL CIRCUIT FOR SOLVING NONLINEAR PROGRAMMING PROBLEMS FIELD OF THE INVENTION The invention relates generally to electronic circuits for analog computation. More specifically, it relates to analog circuits for solving nonlinear programming problems. BACKGROUND OF THE INVENTION Nonlinear programming (NLP) is an important method used in a variety of power and energy systems to solve optimization problems in which the objective function or constraints are nonlinear. Some examples of NLP-based control problems include model predictive control, optimal power flow, state and parameter estimation, and motor control. Existing implementations of these control problems are typically implemented us- ing digital microcontrollers, FPGAs, GPUs, or CPUs. These digital implementations suffer from two key drawbacks: 1) they are too computationally complex to run in real-time, and 2) their high computational complexity necessitates digital microcon- trollers/computers that can draw substantial amounts of power. These drawbacks limit the applicability and widespread adoption of such techniques, particularly in power and energy applications, where cost and energy efficiency are important con- siderations. In other application domains, analog computing techniques have shown promise in enabling lower power and faster computing systems. However, many of these techniques are not tailored to the types of problems that are relevant to power conversion systems, and others lack the programmability and flexibility needed to be used effectively in practical applications. BRIEF SUMMARY OF THE INVENTION Herein is disclosed a hybrid analog/digital computing circuit that is capable of solving online optimization and optimal control techniques, and more specifically non- linear programming problems, in a fast and energy efficient manner (e.g., for power and energy applications). The circuit combines a purely analog computing circuit with a low power digital microcontroller. The addition of the digital microcontroller endows the circuit with flexibility and scalability in programming the desired opti- mization or control technique, while adding minimal overhead in terms of cost and power. General NLPs with arbitrary cost functions can be programmed and solved by the circuit. Problems of this form from the power and energy application area include the optimal power flow problem, model predictive control (e.g., model predictive direct torque control), maximum power point tracking for energy harvesting (e.g. solar and wind energy systems), and optimal control of motor drive systems. The circuit is a physical realization of the desired NLP such that voltages in the circuit represent variables in the NLP, and the interconnection of the circuit components enforce the Karush-Kuhn-Tucker (KKT) conditions on these variables. The KKT conditions provide the first order necessary conditions for the optimal solutions to the NLP given a set of constraints on the variables. Thus, in steady state, the voltages in the circuit that represent the variables of the NLP naturally converge to an optimal and feasible solution of the NLP. Particular nodes in the electronic circuit are driven by (have their voltages set by) a digital microcontroller. These voltages dictate the cost function that is minimized by the electronic circuit. In this way, the digital microcontroller can be programmed to implement arbitrary cost functions that will subsequently be minimized by the electronic circuit. The precise voltages are computed by the digital microcontroller based on voltage measurements of particular nodes from the electronic circuit. In one example implementation, an embodiment of the circuit is used for a spe- cific online optimization problem called selective harmonic minimization, in which the pulse-width modulation (PWM) of a power converter — typically a two-level or multilevel inverter — is optimally calculated to precisely control or minimize the out- put harmonic content. Due to the complexity of the selective harmonic minimization problem, conventional implementations are based on offline programmed PWM tech- niques that rely on pre- computed solutions stored either as a lookup table or as a pre-trained artificial neural network. The hybrid analog/digital computing circuit yields a solution to the selective harmonic minimization problem in near-to-real-time and generates the associated quarter-wave symmetric PWM for a two-level, single-phase inverter. The computing circuit solves for eight independent switching angles, which enables the elimination of seven undesired harmonics while maintaining dynamic control of the modulation index. The experimental results demonstrate that the circuit can converge to the optimal solution in 3.8 ms, which is substantially faster than existing methods and facilitates real-time implementation. Moreover, the steady state power consumption of the computing circuit is approximately 700 mW, which is significantly lower than published methods for comparable applications. The approach leverages favorable attributes of digital and analog controllers to yield a fast and scalable optimization solver. A digital microcontroller programs the cost function and other user-defined inputs to the optimization. Voltages in the circuit represent switching angles in the optimization problem. In steady state, the voltages converge to Karush-Kuhn-Tucker (KKT) points of the problem. As an illustrative example, a specific realization of the computing circuit is dis- closed that solves for eight independent switching angles for a quarter-wave sym- metric PWM driven two-level single-phase inverter. Seven undesired harmonics are minimized while retaining control over the modulation index. The computing circuit is verified with simulations and a PCB hardware implementation. The experimental results demonstrate that the circuit can converge to the optimal solution in less than 5.0 ms, which is substantially faster than existing methods and facilitates real-time implementation. Moreover, the steady-state power consumption of the PCB imple- mentation is approximately 750 mW, which is also significantly lower than published methods for comparable applications. The computing circuit is utilized to generate the PWM for a 2 kW single-phase inverter, which validates its feasibility in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a graph of amplitude vs time that illustrates an example quarter-wave symmetric PWM waveform with two switching angles. Fig. 2 is a plot of a cost function ϕ(α) projected on a two-dimensional plane spanned by two switching angles. Fig. 3 is a schematic diagram of a circuit implementation of an analog computing circuit that computes optimal switching angles and that minimize a third harmonic in a two-level inverter. Fig. 4A is a schematic diagram showing details of each integrator block used in the circuits of Fig. 3 and Fig. 8. Fig. 4B is a schematic diagram showing details of each nonlinear resistor block used in the circuits of Fig. 3 and Fig. 8. Fig. 5A is a graph of switching angle vs time, illustrating results of a simulation of the circuit of Fig. 3 minimizing a single odd harmonic. Fig. 5B is a graph of KKT multiplier voltage vs time, illustrating results of a simulation of the circuit of Fig. 3 minimizing a single odd harmonic. Fig. 5C is a graph of waveform amplitude vs time, illustrating results of a simu- lation of the circuit of Fig. 3 minimizing a single odd harmonic. Fig. 5D is a graph of harmonic magnitude vs harmonic number of the waveform of Fig. 5C, illustrating results of a simulation of the circuit of Fig. 3 minimizing a single odd harmonic. Fig. 6A is a graph of voltage of switching angle α 2 vs time, illustrating tran- sient analysis of a simulation of the circuit of Fig. 3 with variations in the nominal resistance. Fig. 6B is a graph of voltage of KKT multiplier vs time, illustrating transient analysis of a simulation of the circuit of Fig. 3 with variations in the nominal resis- tance. Fig. 7A is a graph of voltage of switching angle α 2 vs time, illustrating transient analysis of a simulation of the circuit of Fig. 3 with variations in the integrator capacitance. Fig. 7B is a graph of voltage of KKT multiplier vs time, illustrating transient analysis of a simulation of the circuit of Fig. 3 with variations in the integrator capacitance. Fig. 8 is a schematic diagram showing a hybrid analog-digital circuit used to solve a NLP. Fig. 9 is a photograph of a hardware implementation of the computing circuit of Fig. 8. Fig. 10A is a graph of switching angle vs time, illustrating the results of a simulation of the circuit of Fig. 8 minimizing the first seven odd harmonics. Fig. 10B is a graph of waveform amplitude vs time, illustrating the results of a simulation of the circuit of Fig. 8 minimizing the first seven odd harmonics. Fig. 10C is a graph of harmonic magnitude vs harmonic number of the waveform of Fig. 10B, illustrating the results of a simulation of the circuit of Fig. 8 minimizing the first seven odd harmonics. Fig. 11A is a graph of voltage measurements of switching angle voltage variables vs time, illustrating the results of experimental measurements of the circuit of Fig. 8 minimizing the first seven odd harmonics. Fig. 11B shows graphs of single-phase inverter waveform in time and frequency domain, illustrating the results of experimental measurements of the circuit of Fig. 8 minimizing the first seven odd harmonics. Fig. 12A is a graph of switching angle vs time, illustrating the results of a sim- ulation of the circuit of Fig. 8 minimizing the first seven odd nontriplen harmonics. Fig. 12B is a graph of waveform amplitude vs time, illustrating the results of a simulation of the circuit of Fig. 8 minimizing the first seven odd nontriplen harmon- ics. Fig. 12C is a graph of harmonic magnitude vs harmonic number of the waveform of Fig. 12B, illustrating the results of a simulation of the circuit of Fig. 8 minimizing the first seven odd nontriplen harmonics. Fig. 13A is a graph of voltage measurements of switching angle voltage variables vs time, illustrating the results of experimental measurements of the circuit of Fig. 8 minimizing the first seven odd nontriplen harmonics. Fig. 13B shows graphs of single-phase inverter waveform in time and frequency domain, illustrating the results of experimental measurements of the circuit of Fig. 8 minimizing the first seven odd nontriplen harmonics. Fig. 14A is a graph of modulation index vs time, illustrating the control param- eter of a simulation of the circuit of Fig. 8 minimizing the first seven odd nontriplen harmonics while varying the modulation index. Fig. 14B is a graph of optimal switching angle vs time, illustrating results of a simulation of the circuit of Fig. 8 minimizing the first seven odd nontriplen harmonics while varying the modulation index. Fig. 14C is a waterfall plot that analyzes the time-varying frequency content of a resulting two-level inverter waveform, illustrating results of a simulation of the circuit of Fig. 8 minimizing the first seven odd nontriplen harmonics while varying the modulation index. DETAILED DESCRIPTION OF THE INVENTION The techniques disclosed herein provide an electronic circuit for solving nonlinear programming problems (NLPs). The circuit is a physical realization of the desired NLP such that voltages in the circuit represent variables in the NLP, and the intercon- nection of the circuit components enforce the Karush-Kuhn-Tucker (KKT) conditions on these variables. The KKT conditions provide the first order necessary conditions for the optimal solutions to the NLP given a set of constraints on the variables. Thus, in steady state, the voltages in the circuit that represent the variables of the NLP naturally converge to an optimal solution of the NLP. Particular nodes in the electronic circuit are driven by (have their voltages set by) a digital microcontroller. These voltages dictate the cost function that is minimized by the electronic circuit. In this way, the digital microcontroller can be programmed to implement arbitrary cost functions that will subsequently be minimized by the electronic circuit. The precise voltages are computed by the digital microcontroller based on voltage measurements of particular nodes from the electronic circuit. General System Architecture Consider a general nonlinear programming (NLP) problem, that is, we wish to minimize an arbitrary scalar cost function: subject to the constraints: where N is the number of variables in the NLP, and M is the number of constraints. In one embodiment, the circuit in Fig. 8 may be used to solve this NLP. In this circuit, the voltages α ` are equivalent to the variables α 1 , ... , α N in the NLP. We will show that, in steady state, these voltages will converge to the optimal solution min The circuit in Fig. 8 has an analog circuit 800 that physically realizes a non- linear programming problem (NLP), where voltages in the analog circuit represent variables in the NLP. The interconnection of the analog circuit components enforce Karush-Kuhn-Tucker (KKT) conditions on the variables, such that the voltages in the analogy circuit that represent the variables of the NLP naturally converge to an optimal and feasible solution of the NLP. The circuit in Fig. 8 also has a digital microcontroller 802 connected to nodes of the analog circuit. An analog-to-digital converter (ADC) 804 and a digital-to-analog converter (DAC) 806 interconnect the analog circuit 800 with the digital microcontroller 802. These connections allow the digital microcontroller to set the voltages in the analog circuit at particular nodes in the analog circuit. The voltages set at the particular nodes determine a precise cost function to be minimized by the analog circuit. Voltage measurements obtained from the analog circuit through the ADC are provided to the digital microcontroller, which uses these measurements to compute the voltages set at the particular nodes. Fundamentally, the circuit is a physical realization of the Karush-Kuhn-Tucker (KKT) conditions that provide the first-order necessary conditions for the optimal solution The four KKT conditions for the NLP in (1) and (2) can be formulated as follows: where ` = [1, ... , N ], j = [1, ... ,M ], Λ j are KKT multipliers, and f j (α) are con- straints. When the voltages α ` , the currents f j , and the voltages Λ j in the electronic circuit satisfy (8a)—(12b), the voltages given by α ` optimally solve the problem. Arbitrary cost functions can be minimized by the electronic circuit through the programming and control of the digital microcontroller. The digital microcontroller controls the voltages at particular nodes in the electronic circuit. Specifically, the microcontroller computes [∂ϕ(α)/∂α 1 , ... , ∂ϕ(α)/∂α N ] based on measurements of α 1 , ... , α N , and applies these voltages to the nodes connected to the DAC. This al- lows arbitrary cost functions ϕ(α) to be programmed by the digital microcontroller, which will subsequently be automatically minimized by the electronic circuit. Such a hybrid analog/digital circuit can be used to solve the selective harmonic minimization problem in real-time. A Special Case: Minimizing One Harmonic In order to build intuition for the hybrid analog/digital computing method, first we discuss as an illustrative example a special case involving the minimization of a single harmonic for a two-level single-phase inverter subject to a quarter-wave symmetric PWM scheme. The cost function and desired modulation index is determined by the digital stage of the circuit, and these can be updated in real-time. The voltages in the circuit correspond to the PWM switching angles, and in steady-state, they are feasible solutions to the optimization problem (precisely, they are Karush-Kuhn- Tucker (KKT) points). This example computing circuit was verified with a PCB hardware implementa- tion that optimizes eight independent switching angles to eliminate seven undesired harmonics while maintaining control of the modulation index. The hardware im- plementation demonstrates convergence to the optimal solution in less than 5.0 ms, which is substantially faster than existing methods and facilitates real-time implemen- tation. Moreover, the steady-state power consumption of the PCB implementation is approximately 750 mW, which is also significantly lower than published methods. The computing circuit is utilized to generate PWM signals for a 2 kW single-phase inverter, which validates its performance and feasibility in practical applications. Problem Formulation Fig. 1 is a graph of amplitude vs time that illustrates an example quarter-wave symmetric PWM waveform with a fundamental modulation frequency f M with two switching angles α = [α 1 , α 2 ]. In this example, we will focus on the goal of eliminating the third harmonic. The selective harmonic minimization problem takes the form: , + (1 + 2(− cos 3α 1 + cos 3α 2 )) 2 (7a) s.t. f 1 (α) = α 1 ≥ 0, (λ 1 ) (7b) f 2 (α) = α 2 − α 1 ≥ 0, (λ 2 ) (7c) f 3 (α) = −α 2 + pi/2 ≥ 0, (λ 3 ). (7d) The constraints f 1 (α), f 2 (α), f 3 (α) ensure the correct ordering and bounds on the switching angles and corresponding Lagrange multipliers are denoted by λ 1 , λ 2 , λ 3 , respectively. In what follows, we will leverage the notation f(α) = [f 1 (α), f 2 (α), f 3 (α)] T and λ = [λ 1 , λ 2 , λ 3 ] T . For a modulation index, m = 0.9, Fig. 2 depicts the cost function ϕ(α) from (7a) projected on a two-dimensional plane with the constraints in (7b)–(7d) shown as dashed lines. The cost function is plotted as a function of α 1 and α 2 . The constraints in (7b)–(7d) bound the feasible solution space of ϕ(α). The cost function has a minimum at α = [0.016, 0.349]. The function is non-convex, but we can clearly visualize a global minimum. Indeed, obtaining solutions from such visualizations is impossible when scaling the selective harmonic minimization problem to higher dimensions (i.e., when there are more than two switching variables). In general, however, multiple minima may exist. The computing circuit physically realizes the Karush-Kuhn-Tucker (KKT) con- ditions for the optimization problem in (7). The KKT conditions are first-order necessary conditions to guarantee a local minimum solution; such solutions are called KKT points. We denote these KKT points by The KKT conditions for (7) take the form: In particular, (8a) are the so-called stationarity conditions. Furthermore, in (8b), are primal feasibility conditions, are dual feasibility conditions, and λ j j ( ) are complementary-slackness conditions. Given the constraints in (7b)–(7d), it follows that: It is relevant to note that the KKT conditions in (8a) and (8b) have been shown to be continuous or Lipschitz continuous for parametric optimization (the modulation index m being the exogenous parameter in this case) under a set of mild assumptions. This is unlike the selective harmonic elimination (SHE) problem, which involves solv- ing harmonic transcendental equations, and admit a discontinuous solution space for higher-order multilevel converters. Circuit Realization Fig. 3 shows the circuit implementation of the analog computing circuit that yields the optimal switching angles and that minimize the third harmonic in a two-level inverter. In particular, the circuit minimizes the cost function (7a) subject to constraints (7b)–(7d). We show next that, with an appropriate mapping and interpretation of the vari- ables α and λ, the circuit in Fig. 3 yields solutions of the KKT conditions (8a)–(8b). In this circuit, the primal variables, α 1 , α 2 , and dual variables, λ 1 , λ 2 , λ 3 , are volt- ages at specific nodes; and constraints f 1 , f 2 , f 3 are currents on specific branches. Moreover, note that resistors are labeled with conductances normalized to a 10 kΩ resistor (R nom ), and negative resistors are realized by connecting one terminal of the resistor to an inverted output of the equivalent voltage (e.g., the terminal in Fig. 4A). The implementation of these inverted voltage rails is straightforward and simply involves an inverting op-amp network. Notice that the resistive network 300 encodes the sensitivities of the constraints with respect to the optimization variables (9). Likewise, the resistive network 302 yields currents that capture the functional form of the constraints in (7b)–(7d). The cost function dynamics of ϕ(α) are introduced to the circuit by time-varying con- trolled voltage sources with values precisely equal to ∂ϕ(α)/∂α ` . The implemen- tation of these controlled voltage sources is elaborated on below. As we will show through forthcoming developments, the circuit is constructed in a manner such that the steady state values of these voltages and currents precisely satisfy the KKT con- ditions in (8a)–(8b). The integrator blocks (e.g., 306) and nonlinear resistor blocks (e.g., 304) depicted in Fig. 3 are shown in more detail in Fig. 4A-B. Integrator Block The integrator block shown in Fig. 4A is a transimpedance amplifier with the dynamics of a capacitor, that is, its output is a voltage that is proportional to the integral of the current at its input. The currents flowing into the integrators, i ` , orig- inate from two sources. The first source is the term ∂ϕ(α)/∂α ` (from the controlled voltage sources), while the second source is from the sum of terms λ j ∂f j (α)/∂α ` . Nonlinear Resistor Block The nonlinear resistor shown in Fig. 4B is a transimpedance amplifier with a voltage-current relationship shown in the inset graph, specifically: for some R and where I is the input current to the nonlinear resistor. A resistor net- work connects the input of the nonlinear resistors to voltages α 1 , α 2 , α 3 such that the currents flowing into the inputs of the nonlinear resistors are −f 1 (α),−f 2 (α),−f 3 (α). Having overviewed the subsystems of the circuit realization, we now examine its steady state operation. First, consider that in steady state, the currents i ` are zero. Given the composition of the currents, we see that this precisely maps to the KKT stationarity condition (8a). Assume that in steady state, α j satisfy the constraints in (7b)–(7d), equivalently, the currents f j (α) satisfy the primal-feasibility constraints in (8b). With negative (or zero) input currents to the nonlinear resistors, the output voltages of the nonlinear resistors are λ j = 0. With this, we see that the voltages α j , λ j correspond to the KKT points, i.e., they satisfy all the KKT condi- tions in (8a), (8b). It is relevant to note that while these KKT points represent local minima of (7), they are not necessarily the global minimum, as finding the global minimum of a non-convex function such as (7a) is generally an NP-hard problem. Many conventional meta-heuristic optimization techniques (e.g., genetic algorithms, particle swarm optimization, among others) introduce noise based on a Gaussian or Boltzmann distribution to the dynamics of the optimization variable to mitigate the likelihood of falling into undesirable local minima. In the simulation and experimen- tal results that follow, we will evaluate the effectiveness of the solution obtained at the KKT points, which will depend on the initial starting condition of the circuit and the presence of noise. We will see that the approach does not fall into undesired local minima and that the targeted harmonics are effectively minimized in the various tested scenarios. The analog realization of the circuit may provide a natural noise mechanism, similar to the artificial noise introduced in conventional meta-heuristic optimization techniques. Moreover, artificial noise or perturbations could be intro- duced to dynamics of the optimization variables by the digital microcontroller. Alternatively, consider the scenario where, e.g., the constraint f 1 (α) is not satis- fied, i.e., the voltage, α 1 is such that f 1 (α) < 0. In this case, the output of the first nonlinear resistor will be a negative voltage λ 1 = −f 1 (α)R. This produces a nonzero current i 1 at the input of the first integrator, thereby perturbing the α 1 voltage. In all, the passive nonlinearity in (10) penalizes errors in the constraints f j (α) and per- turbs the voltages α j in a direction to satisfy the constraints f j (α) ≥ 0. The value of the resistance R in the nonlinear resistor block determines the magnitude of the perturbation and, thus, affects the rate of convergence to a steady state solution that satisfies the constraints. Simulation Results The computing circuit depicted in Fig. 3 minimizing a single odd harmonic was simulated using a SPICE-based simulation software. Results are shown in Fig. 5A- D. Fig. 5A depicts the evolution of voltages (equivalently, switching angles), α 1 , α 2 . They converge to the stead-state solution = 0.000099 and = 0.349, in approxi- mately 38 µs. The simulated exactly matches the predicted minimum of the cost function ϕ(α) from Fig. 2, while the simulated value of is approximately the same, albeit with a 1.0% error within the [0, pi/2] variable range. As will be shown, this er- ror imposes no practical consequences on the effectiveness of the solution. The KKT multiplier voltages, λ j , are plotted in Fig. 5B. They are driven to zero at around the same instance as the α j convergence, indicating that the switching angle voltages satisfy the constraints in (7b)–(7d). The combination of these results indicates that all KKT conditions in (8a)–(8b) are satisfied in steady state. Fig. 5C shows the optimal quarter-wave symmetric two-level waveform obtained by using the computed switching angles and This resulting PWM time domain waveform is shown with the associated switching instances obtained from and appropriately la- beled. An analysis of this waveform confirms that the modulation index is 0.90 as desired. Note that for this example, there are two switching instances per quarter period, resulting in eight switching instances per period (Fig. 1). However, because the value of = 0.000099 is below the minimum on-time of the control logic, two of the switching transitions per period are suppressed. A frequency domain analysis of the two-level waveform is shown in Fig. 5D, showing the minimization of the third harmonic. The third harmonic is eliminated as desired, while all other odd harmonics remain. Transient Analysis Next, we present a transient analysis of the switching angle and KKT multiplier voltages as a function of the nominal resistance value (R nom ) and the integrator capacitance (C int ). The results of the simulation are illustrated in Fig. 6A-B and Fig. 7A-B. Transient simulation of the computing circuit with variations in the nominal re- sistance value R nom is shown in Fig. 6A-B. In particular, Fig. 6A shows variations in the convergence of the switching angle voltage α 2 due to varying R nom . Fig. 6B shows variations in the convergence of the KKT multiplier voltage Λ 3 due to varying R nom . Fig. 7A-B illustrate transient simulation of the computing circuit with variations in the integrator capacitance C int . Variations in the convergence of the switching angle voltage α 2 due to varying C int are shown in Fig. 7A. Variations in the convergence of the KKT multiplier voltage Λ 3 due to varying C int are shown in Fig. 7B. Importantly, as shown, we see that while the values of R nom and C int affect the rate of convergence of the switching angles and KKT multiplier voltages in the circuit, they do not affect the final steady state value. Therefore, the steady state operation of the circuit will remain exactly the same. The simulation results illustrate that a larger R nom and a larger C int slow the convergence rate of the circuit, while the converse has the opposite affect. Thus, the desired rate of convergence can be tuned by selecting R nom and C int . For example, a larger realization of the circuit may have more parasitics, and will require a slower transient in order to minimize ringing and to maintain the accuracy and stability. Conversely, if a design requires fast convergence, one would attempt to select the smallest possible R nom and C int while ensuring that layout parasitics are minimized as well. Such design considerations can be simulated a priori if the parasitics are modeled appropriately in the simulation model. Generalized Hybrid Analog/Digital Computing Circuit for Selective Harmonic Minimization In this section, we consider the generalized version of the selective harmonic min- imization problem leveraging intuition gleaned from the special case of eliminating one harmonic considered earlier. Problem Formulation The generalized version of the problem involves solving for the optimal values of N switching angles to minimize N − 1 arbitrary harmonics while maintaining an arbitrary modulation index m. As before, we consider a quarter-wave symmetric PWM scheme for a two-level inverter. The precise formulation is given by: where α = [α 1 , ... , α N ] T are theN switching angles to be determined, λ = [λ 1 , ... , λ N+1 ]T are the Lagrange multipliers corresponding to the constraints f(α) = [f 1 (α), ... , f N+1 (α)] T , which enforce 0 ≤ α 1 ≤ · · · ≤ α N p 2 i , m is the modulation index, and h 1 , ... , h N−1 are the orders of the undesired harmonics to be minimized. Depending on the ap- plication, h 1 , ... , h N−1 are typically chosen to be the lowest odd harmonics (i.e., 3, 5, 7, ... ) or, for three-phase applications, the lowest odd nontriplen harmonics (i.e., 5, 7, 13, ... ). The KKT conditions for problem (7) take the form: where ∇ α ϕ(·) captures sensitivities of the cost function with respect to the optimiza- tion variables: and ∇ α f(·) is the Jacobian matrix corresponding to the constraints, given by: Circuit Realization Fig. 8 illustrates the circuit implementation of the generalized computing circuit to solve the optimization problem (11) that yields N optimal switching angles that minimize N − 1 arbitrary harmonics for a two-level inverter. In particular, the steady-state values of voltages α 1 , ... , α N and λ 1 , ... , λ N+1 converge to N and respectively, which satisfy the KKT conditions (12a)–(12b). The circuit minimizes the cost function of (11a) with the constraints of (11b). The re- sistors are labeled with conductances normalized to a 10 kΩ resistor, and negative resistors are realized by connecting one terminal of the resistor to an inverted output of the equivalent voltage. The computing circuit merges an analog system 800 composed of a resistor net- work, integrators (Fig. 4A), and nonlinear resistors (Fig. 4B), with a digital system 802 composed of a digital microcontroller. Analog-to-digital converter (ADC) 804 and digital-to-analog converter (DAC) 806 connect the analog and digital systems. The resistive network on the bottom left of the analog system encodes the sensitivi- ties of the constraints with respect to the optimization variables as described by the Jacobian in (14). The resistive network on the top left of the analog system yields currents that capture the functional form of the constraints in (11b). The digital microcontroller interfaces with particular nodes in the resistive network through the ADCs and DACs. The microcontroller computes ∂ϕ/∂α ` based on measurements of α ` . The programmed cost function includes the harmonics h 1 , ... , h N−1 that are to be minimized, along with the modulation index m of the two-level waveform. Notably, these parameters can be changed in real-time and the circuit will then dynamically converge to a new solution. The operation of this circuit is largely similar to that of the circuit of Fig. 3 discussed above. In particular, steady-state values of the currents, i ` , ` = 1, ... , N are all zero, and the constitution of these currents implies that this steady-state operating condition satisfies the stationarity condition (12a). Furthermore, the non- linear resistors operate in concert with the integrators to ensure that voltages, Experimental Validation In this section, we present a printed circuit board (PCB) prototype implementa- tion of the computing circuit that solves the selective harmonic minimization problem with eight independent switching angles, that is, N = 8, for an effective switching frequency of 8×4×60 Hz= 1920 Hz. The PCB implementation, moreover, generates the associated PWM signals to control a 2 kW single-phase inverter, from which we measure the output voltage to verify the minimization of the seven (N − 1) desired harmonics. Fig. 9 is a photo of the hardware implementation of the computing circuit with a US 1 cent coin shown for scale. The central rectangular area of the circuit with integrated circuits measures 3.925 × 0.535 inches. The remaining area of the PCB is used for power connectors, voltage measurement test points, signal connectors to the single-phase inverter, and a physical switch for starting the computation or resetting the voltages to a predefined initial condition. The analog system is implemented with 14 LM324 general purpose quad op amps, 111 SMD 0603 resistors, 26 SMD 0603 capacitors, and 9 SOT-23 diodes connected as to realize the circuit diagram in Fig. 8. The analog components used in the circuit are generally robust to temperature variations up to 125 C and other operating varia- tions, and, moreover, can be implemented using robust automotive grade components if high precision or operation in harsh conditions are required. The analog system of the circuit is ‘fixed’ (i.e., unchanged between different experiments) for N = 8 and for the constraints f j ≥ 0 from (11b). The digital system is implemented with a TI Delphino F28379D microcontroller, its internal ADCs, and an LTC2666 8-channel 16-bit DAC. The microcontroller samples α 1 , ... , α 8 through the ADC, computes ∂ϕ/∂α 1 , ... , ∂ϕ/∂α 8 , and feeds the result back to the analog system through the DAC. The function ϕ(α) is programmed according to the harmonics to be minimized and the desired modulation index, and can be updated in real-time. The microcon- troller also contains logic to generate the quarter-wave symmetric PWM based on its measurements of α 1 , ... , α 8 . The PWM output is connected to a custom-designed single-phase inverter with a dc link voltage of 400 V whose output is connected to a 100 Ω resistive load. In steady state, the overall power consumption of the computing circuit, including the analog and digital systems, is approximately 750 mW. While many previous works on selective harmonic minimization do not provide data with respect to power consumption, most meta-heuristic optimizers (which many prior techniques utilize) are typically solved on a desktop computer using MATLAB or a similar software, which would consume on the order of 10’s or 100’s watts. There- fore, the power consumption of the computing circuit is substantially lower than such techniques. Further study is required to precisely benchmark the power consumption of existing methods used for selective harmonic minimization with the circuit. Verification of Hardware Implementation We now present simulation and experimental verification of the hardware im- plementation discussed above. We conduct three verification tests that involve the minimization of 1. the first seven odd harmonics, 2. the first seven odd nontriplen harmonics, and 3. the first seven odd nontriplen harmonics while the modulation index command, m, is time varying. These verification tests demonstrate the speed of the computing circuit in obtain- ing the optimal solution, as well as the programmability and generalizability of the implementation to minimize any set of harmonics that are specified by the user. Moreover, the test in which the modulation command is varied intentionally with time demonstrates the ability of the circuit to dynamically respond to inputs and op- erating conditions that change the optimal solution. This is unique in the literature to the best of the authors’ knowledge. Minimization of first seven odd harmonics In the first verification test, the digital system is programmed to minimize the first seven odd harmonics (h = 3, 5, 7, 9, 11, 13, 15) while maintaining a constant modula- tion index m = 0.9. Fig. 10A-C presents results from a SPICE-based simulation of this scenario. As shown in Fig. 10A, the eight switching angle voltage variables , , , from the computing circuit converge in steady state to KKT points, in approximately 5 ms. Fig. 10B illustrates one period of the optimal quarter-wave symmetric two-level waveform obtained by using the computed switching angles α ` ? . A frequency domain analysis of this two-level waveform is shown in Fig. 10C and confirms that the first seven odd harmonics are minimized via these KKT points obtained in steady state, Fig. 11A-B illustrates experimental measurements from the hardware implemen- tation of this circuit minimizing the first seven odd harmonics (h = 3, 5, 7, 9, 11, 13, 15). As shown in Fig. 11A, voltage measurements of switching angle voltage variables α , = 1, ... , 8 from the analog system illustrate that the circuit converges to a steady state optimal value in 5.0 ms. The transient dynamics and steady-state values of α , = 1, ... , 8 closely match the simulation seen in Fig. 10A. The re- sulting single-phase inverter waveform is shown in the time and frequency-domain analysis of Fig. 11B. As shown, the harmonics below h = 17 are indeed minimized, while odd harmonics remain in the region h > 17. Minimization of first seven odd nontriplen harmonics In this verification test, the digital system is reprogrammed to minimize the first seven odd nontriplen harmonics (h = 5, 7, 11, 13, 17, 19, 23). Note that there are no modifications to the analog system of the computing circuit. A SPICE-based simu- lation of this scenario is shown in Fig. 12A-C. Fig. 12A shows that the switching angle voltage variables α ` converge to a KKT point in steady state that is the op- timal value in approximately 3.8 ms. Fig. 12B shows the optimal quarter-wave symmetric two-level waveform obtained by using the computed switching angles Fig. 12C shows a frequency-domain analysis of the two-level waveform confirms the minimization of the first seven odd nontriplen harmonics. The frequency domain analysis again confirms that the specified harmonics are indeed minimized. The experimental measurements from the hardware implementation of the com- puting circuit minimizing the first seven odd nontriplen harmonics (h = 5, 7, 11, 13, 17, 19, 23) are shown in Fig. 13A-B. In this case, we observe that the switching angle voltage variables α converge to steady state optimal value in 3.7 ms as shown in Fig. 13A. The time and frequency-domain analysis of the resulting two-level inverter waveform is shown in Fig. 13B and confirms that the first seven odd nontriplen harmonics are minimized. Minimization of first seven odd nontriplen harmonics with time varying modulation index command In the third verification test, the digital system is programmed to minimize the first seven odd nontriplen harmonics while varying the modulation index. More specif- ically, Fig. 14A-C illustrates the SPICE-based simulation results of the computing circuit minimizing the first seven odd nontriplen harmonics (h = 5, 7, 11, 13, 17, 19, 23) while dynamically controlling the modulation index, m. As shown in Fig. 14A, m is varied from 0 to 1 over 1 s from t = 0.2 to t = 1.2. Over this time period, as shown in Fig. 14B, the switching angle voltage variables α ` ? continuously evolve in response to the changing modulation index as the KKT points α ` ? change as a function of m. Fig. 14C shows a waterfall plot that analyzes the time-varying frequency content of the resulting two-level inverter waveform. As shown, the first seven odd nontriplen harmonics are indeed continually minimized over the entire simulation period, while the fundamental frequency (h = 1) increases in magnitude due to the control of the modulation index. This test validates the dynamic tracking capability of the ap- proach. As the commanded modulation index changes, the corresponding optimal switching angles will also change. Thus, conventional methods that rely on LUTs or ANNs are unable to address these scenarios unless the response is preprogrammed into the system. On the contrary, the computing circuit accepts the commanded mod- ulation index as an input, and the switching angle voltage variables automatically converge to the new optimal solution. Conclusion We have disclosed herein a hybrid analog/digital computing circuit capable of solv- ing NLP problems, and in particular the selective harmonic minimization problem in a fast and power-efficient manner. The experimentally verified convergence speed (< 5.0 ms) and power consumption (750 mW) of the computing circuit are substan- tially lower than previously published works where data is available. Moreover, the circuit is capable of dynamically updating the optimization in real-time based on inputs and feedback—illustrated specifically by dynamic control of the modulation index—which is unique in the selective harmonic minimization literature. Those skilled in the art will appreciate that the principles described herein are not limited to the specific examples used for purposes of illustration. Many details could be adapted and varied based on the teachings contained herein. Other variations have also been envisioned by the inventors. For example, grid codes or uneven weighting function across the harmonics to be minimized could be incorporated by modifying the objective function. Second, while the experimental results shown here were targeted for a lower power single-phase inverter application, the circuit could be generalized for other converter configurations that have been explored in the context of selective harmonic minimization techniques, such as three-phase, multi-level, or unbalanced converters.