A hybrid analog/digital circuit for solving nonlinear programming problems
20240056089 ยท 2024-02-15
Inventors
Cpc classification
G06F7/64
PHYSICS
International classification
Abstract
A hybrid analog-digital electronic circuit for solving non-linear 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-Tucke r (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.
Claims
1. An electronic circuit comprising: (a) an analog circuit that physically realizes a nonlinear programming problem (NLP) wherein 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; (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 relationship of 0 voltage for input current of 0 or less, and voltage proportional to input current when the input current is positive.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
DETAILED DESCRIPTION OF THE INVENTION
[0039] 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 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 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
[0040] Consider a general nonlinear programming (NLP) problem, that is, we wish to minimize an arbitrary scalar cost function:
(.sub.1, .sub.2, . . . , .sub.N), (1)
subject to the constraints:
where N is the number of variables in the NLP, and M is the number of constraints.
[0041] In one embodiment, the circuit in are equivalent to the variables .sub.1, . . . , .sub.N in the NLP. We will show that, in steady state, these voltages will converge to the optimal solution min ()=(*).
[0042] The circuit in
[0043] 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], are KKT multipliers, and f.sub.j() are constraints. When the voltages
, the currents f.sub.j, and the voltages .sub.j in the electronic circuit satisfy (8a) (12b), the voltages given by
optimally solve the problem.
[0044] 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 [()/.sub.1, . . , ()/.sub.N] based on measurements of .sub.1, . . . , .sub.N, and applies these voltages to the nodes connected to the DAC. This allows 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
[0045] 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-KuhnTucker (KKT) points).
[0046] This example computing circuit was verified with a PCB hardware implementation that optimizes eight independent switching angles to eliminate seven undesired harmonics while maintaining control of the modulation index. The hardware implementation demonstrates convergence 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 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
[0047]
The constraints f.sub.1(), f.sub.2(), f.sub.3() ensure the correct ordering and bounds on the switching angles
and corresponding Lagrange multipliers are denoted by .sub.1, .sub.2, .sub.3, respectively. In what follows, we will leverage the notation f()=[f.sub.1(), f.sub.2(), f.sub.3()].sup.T and =[.sub.1, .sub.2, .sub.3].sup.T.
[0048] For a modulation index, m=0.9,
[0049] The computing circuit physically realizes the Karush-Kuhn-Tucker (KKT) conditions 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 *=[*.sub.1, *.sub.2].sup.T, *=[*.sub.1, *.sub.2, *.sub.3].sup.T. The KKT conditions for (7) take the form:
In particular, (8a) are the so-called stationarity conditions. Furthermore, in (8b), f.sub.j(*)0 are primal feasibility conditions, *.sub.j0 are dual feasibility conditions, and *.sub.jf.sub.j(*)=0 are complementary-slackness conditions. Given the constraints in (7b)-(7d), it follows that:
[0050] 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 solving harmonic transcendental equations, and admit a discontinuous solution space for higher-order multilevel converters.
Circuit Realization
[0051]
[0052] We show next that, with an appropriate mapping and interpretation of the variables and , the circuit in terminal in
[0053] 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 controlled voltage sources with values precisely equal to ()/. The implementation 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 conditions in (8a)-(8b). The integrator blocks (e.g., 306) and nonlinear resistor blocks (e.g., 304) depicted in
Integrator Block
[0054] The integrator block shown in , originate from two sources. The first source is the term ()/
(from the controlled voltage sources), while the second source is from the sum of terms .sub.jf.sub.j()/
.
Nonlinear Resistor Block
[0055] The nonlinear resistor shown in
for some R and where is the input current to the nonlinear resistor. A resistor network connects the input of the nonlinear resistors to voltages .sub.1, .sub.2, .sub.3 such that the currents flowing into the inputs of the nonlinear resistors are f.sub.1(), f.sub.2(), f.sub.3().
[0056] Having overviewed the subsystems of the circuit realization, we now examine its steady state operation. First, consider that in steady state, the currents 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, .sub.j satisfy the constraints in (7b)-(7d), equivalently, the currents f.sub.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 .sub.j=0. With this, we see that the voltages .sub.j, .sub.j correspond to the KKT points, *.sub.j, *.sub.j, i.e., they satisfy all the KKT conditions 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 experimental 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 introduced to dynamics of the optimization variables by the digital microcontroller.
[0057] Alternatively, consider the scenario where, e.g., the constraint f.sub.1() is not satisfied, i.e., the voltage, .sub.1 is such that f.sub.1()<0. In this case, the output of the first nonlinear resistor will be a negative voltage .sub.1=f.sub.1()R. This produces a nonzero current i.sub.1 at the input of the first integrator, thereby perturbing the .sub.1 voltage. In all, the passive nonlinearity in (10) penalizes errors in the constraints f.sub.j() and perturbs the voltages .sub.j in a direction to satisfy the constraints f.sub.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
[0058] The computing circuit depicted in
Transient Analysis
[0059] Next, we present a transient analysis of the switching angle and KKT multiplier voltages as a function of the nominal resistance value (R.sub.nom) and the integrator capacitance (C.sub.int). The results of the simulation are illustrated in
[0060] Transient simulation of the computing circuit with variations in the nominal resistance value R.sub.nom is shown in
[0061]
Generalized Hybrid Analog/Digital Computing Circuit for Selective Harmonic Minimization
[0062] In this section, we consider the generalized version of the selective harmonic minimization problem leveraging intuition gleaned from the special case of eliminating one harmonic considered earlier.
Problem Formulation
[0063] The generalized version of the problem involves solving for the optimal values of N switching angles to minimize N1 arbitrary harmonics while maintaining an arbitrary modulation index n. As before, we consider a quarter-wave symmetric PWM scheme for a two-level inverter. The precise formulation is given by:
where =[.sub.1, . . . , .sub.N].sup.T are the N switching angles to be determined, =[.sub.1, . . . , .sub.N+1].sup.T are the Lagrange multipliers corresponding to the constraints f()=[f.sub.1(), . . . , f.sub.N+1()].sup.T, which enforce
m is modulation index, and h.sub.1, . . , h.sub.N1 are the orders of the undesired harmonics to be minimized. Depending on the application, h.sub.1, . . , h.sub.N1 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:
.sub.(*)+(*).sup.T.sub.f(*)=0,(12a)
f.sub.j(*)0, *.sub.j0, *.sub.jf.sub.j(*)=0, j=1, . . , N+1,(12b)
where .sub.(.Math.) captures sensitivities of the cost function with respect to the optimization variables:
and .sub.f(.Math.) is the Jacobian matrix corresponding to the constraints, given by:
Circuit Realization
[0064] that minimize N1 arbitrary harmonics for a two-level inverter. In particular, the steady-state values of voltages .sub.1, . . . , .sub.N and .sub.1, . . . , .sub.N+1 converge to *.sub.1, . . . , *.sub.N and *.sub.1, . . . , *.sub.N+1 respectively, which satisfy the KKT conditions (12a)-(12b). The circuit minimizes the cost function of (11a) with the constraints of (lib). The resistors 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.
[0065] The computing circuit merges an analog system 800 composed of a resistor network, integrators ( based on measurements of
. The programmed cost function includes the harmonics h.sub.1, . . . , h.sub.N1 that are to be minimized, along with the modulation index n 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.
[0066] The operation of this circuit is largely similar to that of the circuit of =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, *.sub.10, . . . , *.sub.N+10 and currents f.sub.1(*)0, . . . , f.sub.N+1(*)0.
Experimental Validation
[0067] In this section, we present a printed circuit board (PCB) prototype implementation 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 8460 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 (N1) desired harmonics.
[0068]
[0069] 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
Verification of Hardware Implementation
[0070] We now present simulation and experimental verification of the hardware implementation discussed above. We conduct three verification tests that involve the minimization of [0071] 1. the first seven odd harmonics, [0072] 2. the first seven odd nontriplen harmonics, and [0073] 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 obtaining 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 operating 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
[0074] 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 modulation index m=0.9.
[0075] As shown in =1, . . . , 8 from the computing circuit converge in steady state to KKT points,
=1, . . . , 8 in approximately 5 ms.
A frequency domain analysis of this two-level waveform is shown in
=1, . . . , 8.
[0076] =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
Minimization of First Seven Odd Nontriplen Harmonics
[0077] 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 simulation of this scenario is shown in converge to a KKT point in steady state that is the optimal value
in approximately 3.8 ms.
[0078] The experimental measurements from the hardware implementation of the computing circuit minimizing the first seven odd nontriplen harmonics (h=5, 7, 11, 13, 17, 19, 23) are shown in converge to steady state optimal value
in 3.7 ms as shown in
Minimization of First Seven Odd Nontriplen Harmonics With Time Varying Modulation Index Command
[0079] In the third verification test, the digital system is programmed to minimize the first seven odd nontriplen harmonics while varying the modulation index. More specifically, continuously evolve in response to the changing modulation index as the KKT points
change as a function of m.
Conclusion
[0080] We have disclosed herein a hybrid analog/digital computing circuit capable of solving 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 substantially 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 indexwhich is unique in the selective harmonic minimization literature.
[0081] 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.