Analog calculation circuit for solving linear programming problem
By designing an analog computing circuit based on a variable resistance array, using the closed-loop feedback structure of analog neurons and matrix computing modules, the problem of high computational complexity in solving linear programming problems is solved, and efficient solutions of low latency, low energy consumption and high area efficiency are achieved.
Patent Information
- Application Number
- CN202411688764.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-25
AI Technical Summary
Traditional digital computing is highly complex in solving linear programming problems, resulting in high time and space costs, making it difficult to meet the delay, energy consumption and area requirements of new application scenarios such as the Internet of Things and artificial intelligence.
A simulation computing circuit based on variable resistance array is designed, and simulated neurons are constructed using op-amp OPA. By connecting the simulated neurons to the simulation matrix calculation module to construct closed-loop feedback, the structure mapping of the neural network is realized, thereby efficiently solving linear programming problems.
This circuit can efficiently solve linear programming problems under conditions of low latency, low energy consumption and high area efficiency, and has significant advantages over traditional numerical iteration methods.
Smart Images

Figure CN119598086A_ABST
Abstract
Description
Technical Field
[0001] The present invention provides an analog computing circuit based on a variable resistor array for solving standard linear programming problems, and specifically relates to the design of an analog computing circuit based on a variable resistor device (such as a resistive memory, a phase change memory, a magnetic memory, a ferroelectric memory, etc.), including its working principle and parameter design method, and belongs to the fields of semiconductors, analog computing and integrated circuits. Background Art
[0002] Linear programming problems are widely used in various scientific and engineering fields, such as control theory, image processing, model control, etc. In traditional digital computing, the solution of linear programming problems often requires numerical iteration, which generally has a relatively high computational complexity, and the calculation process generates a lot of time and space costs. With the continuous development of the Internet of Things and artificial intelligence, new application scenarios such as edge computing and IoT devices have put forward higher latency, energy consumption, and area requirements for the solution of linear programming problems. Under the condition of limited computing resources, analog computing technology based on variable resistor arrays is expected to provide efficient and fast solutions for the solution of linear programming problems. The principle of projection neural network introduces neural network into the method of solving linear programming problems, and the analog matrix computing circuit based on variable resistor array can well map the structure of projection neural network. By using peripheral circuits such as operational amplifiers OPA to build analog neurons, functions such as nonlinear functions can be realized; by connecting analog neurons with analog matrix computing modules to build closed-loop feedback, the structural mapping of neural networks can be realized. Thanks to the high parallelism of variable resistor arrays, complex matrix calculations can be realized with extremely low time complexity using the basic physical laws in the array, further improving the speed of solving linear programming problems. On the other hand, the non-volatility of the variable resistor device enables the circuit to have the in-memory computing feature of completing the computing function in situ in the memory, overcoming the data handling bottleneck caused by the separation of memory and computing in traditional digital computers, and further improving the computing power and energy consumption of solving linear programming problems. Therefore, it is of great significance to study an analog computing circuit based on a variable resistor array for realizing efficient linear programming problem solving. Summary of the invention
[0003] In order to achieve efficient solution of standard linear programming problems, the present invention provides an analog computing circuit for solving standard linear programming problems. The analog matrix computing circuit is based on a variable resistor array. Analog neurons are constructed by utilizing peripheral circuits such as operational amplifiers (OPA) to realize functions such as nonlinear functions. Closed-loop feedback is constructed by connecting analog neurons with analog matrix computing modules to realize structural mapping of neural networks.
[0004] The technical solution of the present invention is as follows:
[0005] An analog computing circuit for solving linear programming problems, for a linear programming problem with an n×m (m>n) constraint matrix A, A is a non-negative matrix, an n×1 constraint vector b, and an m×1 objective function vector c, characterized in that the circuit comprises m analog neurons, a matrix-vector multiplication module, and a matrix right inversion module; the analog neurons comprise two analog subtractors and an analog buffer, the matrix-vector multiplication module is a variable resistor array with n rows and m columns composed of n×m variable resistor devices, the matrix right inversion module comprises an array composed of (2n+1)×m variable resistor devices and n operational amplifiers O PA; the m outputs of the matrix right inversion module are connected to the inputs of the m analog neurons in sequence through the m analog buffers, the outputs of the m analog neurons are connected to the m inputs of the matrix vector multiplication module in sequence, and the n outputs of the matrix vector multiplication module are connected to the n inputs of the matrix right inversion module in sequence; by mapping the constraint matrix A to the conductance value of the variable resistor array in the matrix vector multiplication module and the matrix right inversion module, mapping the constraint vector b to the input voltage vector of the matrix right inversion module, mapping the objective function vector c to the input voltage vector of the analog neuron, and reading the analog buffer output voltage vector y in the analog neuron + It is the optimal solution vector of the linear programming problem.
[0006] Furthermore, in the analog neuron, for the first analog subtractor, including the operational amplifier OPA1, the output voltage of the matrix right inverse module, the inverted target function voltage vector -c and the output voltage of the analog buffer are connected to the positive input of OPA1 through the input resistor, and a grounded unit resistor is connected at the same time; the negative input and output of OPA1 are connected to a unit resistor and a capacitor for feedback, and a grounded resistor with a conductivity value of 3 times is connected at the same time; for the analog buffer, including the operational amplifier OPA2, the output voltage of the first analog subtractor is connected to the positive input of OPA2, and the negative input is connected to the output of OPA2 to form feedback. At the same time, OPA2 of the analog buffer only provides positive power supply, and the negative power supply is grounded to realize the range constraint of the feasible solution of the linear programming problem, and OPA2 outputs the voltage vector y +That is, the optimal solution vector of the linear programming problem; for the second analog subtractor, including the operational amplifier OPA3, the voltage output of the analog buffer is connected to the positive input terminal of OPA3 through an input resistor with a conductance value of 2 times, and the inverted target function voltage vector -c is also connected to the positive input terminal of OPA3 through the input resistor, and a grounded unit resistor is connected at the same time; the output voltage of the first analog subtractor is connected to the negative input terminal of OPA3 through a unit resistor, and the negative input terminal of OPA3 is connected to a grounded resistor with a conductance value of 2 times; the negative input terminal and output terminal of OPA3 realize feedback through a unit resistor; at the same time, the optimal solution vector of the linear programming problem is obtained by the output voltage of the analog buffer of the analog neuron.
[0007] Furthermore, the variable resistance device is a resistive random access memory (RRAM), a phase change memory (PCM), a magnetic random access memory (MRAM) or a ferroelectric random access memory (FJT, FeFET).
[0008] Furthermore, in the matrix-vector multiplication module, the n×m constraint matrix A is mapped to the conductance values of n×m variable resistor devices in the variable resistor array, the inputs on the m column lines of the variable resistor array are connected in sequence to the outputs of m simulated neurons, forming the input vector of the matrix-vector multiplication module, and the current outputs on the n row lines are connected in sequence to the n input terminals of the matrix right inverse module.
[0009] Furthermore, in the matrix right inversion module, the n×m constraint matrix A is respectively mapped to two n×m variable resistor arrays with the same conductance value, the current output vector of the matrix-vector multiplication module is sequentially connected to the row lines of the first variable resistor array, and the inverted constraint voltage vector -b is also sequentially connected to the row lines of the first variable resistor array through the input resistor, and the row lines of the first variable resistor array are connected to the negative input terminals of the n OPAs; the output terminals of the n OPAs are sequentially fed back and connected to the row lines of the second variable resistor array to form a global negative feedback loop, the column lines of the two variable resistor arrays are sequentially connected, and the output voltage vector of the matrix right inversion module is obtained from the column lines; in addition to the 2nm variable resistor devices, there is an additional row of grounded variable resistor devices for conductance compensation, which makes the sum of the conductance values of all variable resistor devices connected to each column line equal; the compensated conductance can be obtained by pre-calculating the column sum of the constraint matrix A.
[0010] Furthermore, in the above-mentioned analog computing linear programming problem solving circuit based on variable resistor array, the connection between m analog neurons and the matrix-vector multiplication module and the matrix right inverse module is disconnected, and the voltage input of the constraint vector b is kept suspended, the voltage input vector is applied from the input port of the matrix-vector multiplication module, and the voltage output vector is read from the output port of the matrix right inverse module, thereby realizing the multiplication calculation of the projection matrix and the input vector.
[0011] The beneficial effects of the present invention are as follows:
[0012] The present invention provides an analog computing circuit for solving linear programming problems based on a variable resistor array. By using peripheral circuits such as an operational amplifier (OPA) to construct analog neurons, functions such as nonlinear functions are realized. Closed-loop feedback is constructed by connecting the analog neurons with an analog matrix computing module to realize structural mapping of a neural network. The present invention can efficiently utilize the principle of a projection neural network to obtain an optimal solution to a linear programming problem. Compared with other computing circuits or methods for linear programming problems, the circuit solves the problem in an analog computing domain without the need for numerical iteration, and has lower latency, higher area efficiency, and lower energy consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 This is the structure diagram of the ith simulated neuron of the simulated computing circuit for solving linear programming problems of the present invention;
[0014] Figure 2 It is a structural diagram of the matrix-vector multiplication module, the matrix right inverse module and the calculation projection matrix multiplication of the present invention;
[0015] Figure 3 It is a circuit structure diagram of a simulation calculation circuit for solving a linear programming problem of the present invention;
[0016] Figure 4 This is an example of linear programming problem calculation in the present invention. DETAILED DESCRIPTION
[0017] In order to more clearly illustrate the purpose, technical solutions and advantages of the present invention, the present invention is further clearly and completely described below through specific embodiments in conjunction with the accompanying drawings. The description here is only used to explain the present invention and is not used to limit the present invention.
[0018] The present invention provides a circuit for solving linear programming problems based on analog calculations of variable resistor arrays. The circuit is suitable for solving standard linear programming problems. It is based on the principle of projected neural networks, OPA to construct a global feedback loop, and conductance compensation to realize matrix right inversion. By mapping the constraint matrix A of the linear programming problem to the conductance value of the variable resistor array in the matrix vector multiplication module and the matrix right inversion module, mapping the constraint vector b to the input voltage vector of the matrix right inversion module, mapping the objective function vector c to the input voltage vector of the simulated neuron, and reading the output voltage vector y of the simulated neuron. + It is the optimal solution vector of the linear programming problem.
[0019] Figure 1 The structure diagram of the i-th analog neuron in the circuit for solving the analog computing linear programming problem based on the variable resistor array, where V in,iIt is the input voltage application port, used to connect the i-th column output of the matrix right inverse module. in,i It is connected to the positive input terminal of the first operational amplifier OPA1 through a unit resistor. In the present invention, the conductivity value of the input resistor is agreed to be unit conductivity, that is, g0=1, and the conductivity value of other resistor devices or the conductivity value of the variable resistor device is the ratio divided by the input conductivity. In addition, to ensure the correctness of the neuron calculation results, the i-th element c of the objective function vector i The voltage input is pre-inverted, that is, the input -c i , connected to the positive input of OPA1 through a unit resistor. The output voltage of the analog follower It is also connected to the positive input of OPA1 through a unit resistor and a unit resistor connected to ground. The negative input of OPA1 is connected to a ground resistor with a conductance value of 3g0 and is connected to the output through a parallel unit resistor and a capacitor. Figure 1 According to Kirchhoff’s current law, the positive and negative input potentials of OPA1 are and V 1,- =y i g0 / 4h0=y i / 4. Due to the "virtual short" nature of the OPA, the positive and negative input terminals have equal potentials, that is, This enables OPA1 to realize the function of an analog subtractor, and we get Figure 1 Formula (1) in , that is
[0020]
[0021] Figure 1 The second op amp OPA2 of the analog neuron adopts the analog follower connection method. The output terminal y of OPA1 i Connect to the positive input of OPA2, and the negative input of OPA2 is connected to the output to form a feedback loop to achieve y i However, the negative power supply of OPA2 is directly grounded, so when y i <0, the output The output voltage will remain at 0, and when y i ≥0, Can follow y normally i , thus realizing the nonlinear function of neurons, we get Figure 1 Formula (2) in , that is
[0022]
[0023] The output vector of OPA2 That is, the i-th element of the optimal solution vector for solving the linear programming problem of the present invention.
[0024] Figure 1Among them, the output voltage of OPA2 is also connected to the positive input terminal of OPA3 through an input resistor with a conductance value of 2g0, and the i-th element -c of the inverted objective function vector i is also connected to the positive input terminal of OPA3 through a unit resistor, and a unit resistor connected to the ground is also connected. The negative input terminal of OPA3 is connected to a grounded resistor with a conductance value of 2g0, and the output voltage y of OPA1 is connected through a unit resistor i , and a feedback loop is formed by connecting the output terminal through a unit resistor. Therefore, the electric potentials of the positive and negative input terminals satisfy Therefore, OPA3 is implemented Figure 1 the formula (3) in
[0025]
[0026] Figure 1 also shows different c i voltages, the output voltage V out,i and the input voltage V in,i simulation waveform diagram of
[0027] Figure 2 is the structural diagram of the matrix-vector multiplication module, matrix right inverse module and calculation of the projection matrix multiplication of the present invention. For the matrix-vector multiplication module, the n×m (n < m) matrix A in the standard linear programming problem is mapped to the device conductance values of the variable resistor array in the matrix-vector multiplication module. The m column lines of the variable resistor array are sequentially connected to the output voltages V out,i of m analog neurons, constituting the input vector V MVM of the matrix-vector multiplication module. According to Ohm's law, the current collected on the j-th row line of the variable resistor array is j = 1, 2,..., n. Combining n equations, the matrix form expression can be obtained
[0028] I MVM = A·V MVM . (4)
[0029] For the matrix right inverse module, the constraint matrix A is mapped to the conductance values of two identical variable resistor arrays. The column lines of the two variable resistor arrays are connected in one-to-one correspondence, and also serve as the output voltage vector V RINV of the matrix right inverse module. The output terminal of the matrix right inverse module is connected to m analog buffers. The n row lines of the lower variable resistor array are correspondingly connected to the output row line I MVM of the matrix-vector multiplication module. At the same time, the j-th element b jAfter inversion, it is connected to the jth row of the variable resistor array below through a unit input resistor to apply constraints. The n rows of the variable resistor array below are connected to the negative input terminals of the n OPAs, and the output terminals of the n OPAs are connected to the n rows of the array above in turn, forming a global negative feedback loop. In addition, a row of grounded variable resistor devices g is added to the top of the array. c,i Used for conductance compensation. According to Kirchhoff's current law and the "virtual short" characteristic of OPA, the potential of the jth row of the variable resistor array below can be expressed as Right now j=1,2,…,n. Combining n equations, we can get the expression in matrix form:
[0030] (I MVM -g0b)+AV RINV = 0. (5)
[0031] For the potential of the i-th column of the upper variable resistor array, that is, V RINV,i It can be expressed as Among them, V z,j is the potential of the jth row of the upper variable resistor array, The conductance of all variable resistors connected to the i-th column is summed. The value of s and the compensation conductance g are determined based on the maximum value of the row sum in the array. c,i , the sum of the variable resistance devices connected in each column can be equal, expressed as s. Therefore, V RINV,i That is Combining m equations, we can get the expression in matrix form:
[0032]
[0033] Among them, V z The row voltage vector of the upper variable resistor array. Combining formulas (5) and (6), we can get
[0034]
[0035] V z =s(AA T ) -1 (g0b-I MVM ), (8)
[0036] V RINV =A T (AA T ) -1 (g0b-I MVM ). (9)
[0037] If only the matrix-vector multiplication module and the matrix right inversion module are connected, the analog neuron is disconnected, the voltage input of the constraint vector is left floating, and the inverted voltage input vector V is applied from the m column lines of the matrix-vector multiplication module. in , read the voltage output vector V from the m column lines of the matrix right inverse module out , you can get
[0038] V out =A T (AA T ) -1 I MVM =A T (AA T ) -1 AV MVM =PV in (10)
[0039] Matrix P = A T (AA T ) -1 A is the projection matrix. At this time, the circuit calculates the projection matrix-vector multiplication.
[0040] Figure 3 This is a circuit diagram for simulating the calculation of linear programming problems in the present invention. For the first operational amplifier OPA1 simulating neurons, the m equations in formula (1) and the transient characteristics of the feedback capacitor can be obtained.
[0041]
[0042] Where, ∈ is the final output stabilization time constant, which is determined by the gain-bandwidth product of OPA1 in the simulated neuron and the feedback resistor-capacitor network, y is the voltage vector composed of the output voltages of OPA1 of m simulated neurons, y + is the voltage vector composed of the OPA2 output voltages of m simulated neurons, and is also the optimal solution vector of the linear programming problem. c is the objective function vector. Combining formulas (3), (4) and (9), we can get V in =V RINV =A T (AA T ) -1 (g0b-A·V MVM )=A T (AA T ) -1 [g0b-A(2y + -yc)] = q-2Py + +Py+Pc, where q=g0A T (AA T ) -1 b, combined with formula (11), is
[0043]
[0044] Wherein, u = -(IP)c + q. Formula (12) completes the network structure mapping of the projection neural network for solving linear programming problems.
[0045] Figure 4 The present invention shows an example of solving a circuit calculation standard linear programming problem by simulating a linear programming problem. The present invention efficiently uses the principle of projection neural network to obtain the optimal solution of the example linear programming problem. + , and the theoretical optimal solution Compared with circuits or methods that solve linear programming problems in the digital computing domain, this circuit solves the problem in the analog computing domain without the need for numerical iteration, and has lower latency, higher area efficiency, and lower energy consumption.
[0046] Finally, it should be noted that the purpose of publishing the embodiments is to help further understand the present invention, but those skilled in the art can understand that various substitutions and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the contents disclosed in the embodiments, and the scope of protection claimed by the present invention shall be subject to the scope defined in the claims.
Claims
1. A simulation computing circuit for solving a linear programming problem, for a linear programming problem of n×m (m>n) constraint matrix A, A is a non-negative matrix, n×1 constraint vector b, m×1 objective function vector c, characterized in that: The circuit comprises m analog neurons, a matrix vector multiplication module and a matrix right inversion module; the analog neuron comprises two analog subtractors and an analog buffer, the matrix vector multiplication module is a variable resistor array of n rows and m columns composed of n×m variable resistor devices, and the matrix right inversion module comprises an array composed of (2n+1)×m variable resistor devices and n operational amplifiers OPA; the m outputs of the matrix right inversion module are sequentially connected to the inputs of the m analog neurons through the m analog buffers, the outputs of the m analog neurons are sequentially connected to the m inputs of the matrix vector multiplication module, and the n outputs of the matrix vector multiplication module are sequentially connected to the n inputs of the matrix right inversion module; by mapping the constraint matrix A to the conductance value of the variable resistor array in the matrix vector multiplication module and the matrix right inversion module, mapping the constraint vector b to the input voltage vector of the matrix right inversion module, mapping the objective function vector c to the input voltage vector of the analog neuron, and reading the analog buffer output voltage vector y in the analog neuron + It is the optimal solution vector of the linear programming problem.
2. The analog computing circuit for solving linear programming problems according to claim 1, characterized in that: In the analog neuron, for the first analog subtractor, including an operational amplifier OPA1, the output voltage of the matrix right inverse module, the inverted target function voltage vector -c and the output voltage of the analog buffer are connected to the positive input terminal of OPA1 through an input resistor, and a unit resistor connected to ground is also connected; The negative input and output of OPA1 are connected to a unit resistor and a capacitor for feedback, and a grounding resistor with a conductance value of 3 times is connected at the same time; for the analog buffer, including the operational amplifier OPA2, the output voltage of the first analog subtractor is connected to the positive input of OPA2, and the negative input is connected to the output of OPA2 to form feedback. At the same time, the analog buffer OPA2 only provides positive power supply, and the negative power supply is grounded to realize the range constraint of the feasible solution of the linear programming problem. The output voltage vector y of OPA2 + That is, the optimal solution vector of the linear programming problem; for the second analog subtractor, including the operational amplifier OPA3, the voltage output of the analog buffer is connected to the positive input terminal of OPA3 through an input resistor with a conductance value of 2 times, and the inverted target function voltage vector -c is also connected to the positive input terminal of OPA3 through the input resistor, and a grounded unit resistor is connected at the same time; the output voltage of the first analog subtractor is connected to the negative input terminal of OPA3 through a unit resistor, and the negative input terminal of OPA3 is connected to a grounded resistor with a conductance value of 2 times; the negative input terminal and output terminal of OPA3 realize feedback through a unit resistor; at the same time, the optimal solution vector of the linear programming problem is obtained by the output voltage of the analog buffer of the analog neuron.
3. The analog computing circuit for solving linear programming problems according to claim 1, characterized in that: The variable resistance device is a resistive random access memory (RRAM), a phase change memory (PCM), a magnetic random access memory (MRAM) or a ferroelectric random access memory (FJT, FeFET).
4. The analog computing circuit for solving linear programming problems according to claim 1, characterized in that: In the matrix-vector multiplication module, the n×m constraint matrix A is mapped to the conductance values of n×m variable resistor devices in the variable resistor array, the inputs on the m column lines of the variable resistor array are connected in sequence to the outputs of m simulated neurons to form the input vector of the matrix-vector multiplication module, and the current outputs on the n row lines are connected in sequence to the n input terminals of the matrix right inverse module.
5. The analog computing circuit for solving linear programming problems according to claim 1, characterized in that: In the matrix right inversion module, the n×m constraint matrix A is mapped to two n×m variable resistor arrays with the same conductance value, respectively; the current output vector of the matrix-vector multiplication module is sequentially connected to the row lines of the first variable resistor array, and the inverted constraint voltage vector -b is also sequentially connected to the row lines of the first variable resistor array through the input resistor, and the row lines of the first variable resistor array are connected to the negative input terminals of n OPAs; the output terminals of the n OPAs are sequentially fed back and connected to the row lines of the second variable resistor array to form a global negative feedback loop, the column lines of the two variable resistor arrays are sequentially connected, and the output voltage vector of the matrix right inversion module is obtained from the column lines; in addition to the 2nm variable resistor devices, there is an additional row of grounded variable resistor devices for conductance compensation, which makes the sum of the conductance values of all variable resistor devices connected to each column line equal; the compensated conductance can be obtained by pre-calculating the column sum of the constraint matrix A.
6. The analog computing circuit for solving linear programming problems according to claim 1, characterized in that: Disconnect the m simulated neurons from the matrix-vector multiplication module and the matrix right inverse module, keep the voltage input of the constraint vector b floating, apply the voltage input vector from the input port of the matrix-vector multiplication module, and read the voltage output vector from the output port of the matrix right inverse module, thereby realizing the multiplication calculation of the projection matrix and the input vector.
Citation Information
Patent Citations
Analog calculation method for solving large-scale linear equation set based on variable resistor array
CN113901387A
Variable resistor array forming method and analog matrix calculation circuit realized based on variable resistor array forming method
CN114756814A
L1 norm minimization problem calculation circuit and image sensing device
CN117424601A
Analog hardware matrix computation
US20220197639A1