Method for realizing matrix eigenvalue solving circuit based on array of resistance change units
By using a hardware circuit based on a resistive switching unit array, and utilizing a clock-controlled switching circuit and a differential structure, automatic scanning of matrix eigenvalues was achieved. This solved the problem of high complexity in large-scale matrix calculations, improved calculation speed, and reduced energy consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTHEAST UNIV
- Filing Date
- 2023-12-27
- Publication Date
- 2026-07-07
AI Technical Summary
Existing technologies have high computational complexity when solving for eigenvalues of large-scale matrices in the fields of big data and artificial intelligence. They require external complex circuits to assist in resistance control, resulting in high cost and low efficiency.
A hardware circuit based on a resistive variable unit array is adopted. The switching circuit is controlled by a clock to switch between the resistance value adjustment circuit and the cross-shaped structure, so as to realize the change of the resistance value of the resistive variable unit and the calculation of the linear equation system. The differential structure of the resistive variable unit cross-shaped array simplifies the circuit design and improves the calculation speed.
It achieves automatic scanning of all eigenvalues of the matrix, increases the calculation speed to O(n²/Δ), reduces energy consumption, simplifies the circuit structure, and saves costs.
Smart Images

Figure CN117852597B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of integrated circuits, specifically relating to a hardware circuit implementation method for solving matrix eigenvalues based on resistive variable cell arrays. Background Technology
[0002] Finding eigenvalues and eigenvectors of a matrix is commonly used in machine learning algorithms. The algorithm for finding all eigenvalues of a matrix is as follows: within the interval [β...] where the eigenvalues of matrix A exist... - ,β + Perform a scan within a given step size Δβ, solve the linear system of equations (A-βI)x = b at each β point, and find the solution vector x. i The infinite norm value. When the solution vector x i When the infinite norm of a matrix reaches a local extremum, the corresponding β value is an approximation of one of the matrix's eigenvalues. Solving for all eigenvalues of a matrix using a computer has a high time complexity, O(n^2). 3 With the development of big data and artificial intelligence technologies, the scale of matrices that need to be processed is increasing day by day. When solving a large number of linear equations in the matrix eigenvalue scanning algorithm, the resistance control circuit design is complex and requires the assistance of external complex circuits for resistance control. Summary of the Invention
[0003] To address the aforementioned issues, this invention proposes a hardware circuit implementation method for solving matrix eigenvalues based on resistive variable cell arrays, enabling automatic solving of all eigenvalues of the matrix.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] The hardware circuit implementation method for solving the matrix eigenvalues based on resistive variable cell arrays includes the following steps:
[0006] Step 1: Set the node conductance values of the resistive switching unit array and write the initial values of each element of the matrix (A-βI) into the resistive switching unit array, where β is any value in the possible range of matrix eigenvalues and I is the identity matrix of the same order as matrix A.
[0007] Step 2: Input the current signal corresponding to the random column vector b through the bit line terminal of the resistive variable unit array. At the same time, the switching circuit connects the resistive variable unit corresponding to β to the diagonal node of the resistive variable unit array to complete the solution of the linear equation system (A-βI)x=b, and complete the solution of the infinite norm of the solution vector x and store it.
[0008] Step 3: The switching circuit connects the resistor unit corresponding to β to the resistance control circuit to update the resistance value, that is, change the value of β.
[0009] Step four: Repeat steps two and three until the traversal of β is completed. The β values corresponding to all extreme values of the infinite norm are all the eigenvalues of the matrix.
[0010] Furthermore, the voltage signal output by the resistive variable unit array obtained in step two is used to solve the infinite norm of the solution vector x through a norm solving circuit; the voltage value corresponding to each infinite norm is converted into a digital quantity by a digital-to-analog converter and stored.
[0011] Furthermore, the norm solving circuit includes an absolute value circuit and an extremum circuit. The absolute value circuit is used to take the absolute value of the output voltage values representing all elements of the solution vector x; the extremum circuit is used to extract the maximum value of the absolute values of all output voltages.
[0012] Furthermore, the absolute value circuit is implemented through multiple sets of voltage comparators and voltage inverters, and the maximum / minimum value circuit is implemented through multiple sets of voltage comparators and multiplexers.
[0013] Furthermore, when repeating steps two and three, the timing of clock control is used to switch the resistance transformer unit in the switching circuit.
[0014] Furthermore, the switching circuit includes a resistive switching unit characterizing the β value and a multiplexer, which switches periodically according to a given clock.
[0015] Furthermore, the resistive switching unit array adopts a resistive switching unit cross-shaped array with a differential structure.
[0016] Furthermore, the resistive switching unit adopts one of the following devices: resistive switching memory, phase-change memory, flash memory, memristor, voltage-controlled potentiometer.
[0017] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0018] 1. This invention uses a clock-controlled switching circuit to switch the resistive variable unit between a resistance adjustment circuit and a cross-shaped structure, thereby changing the resistance value of the resistive variable unit (characterizing β) and calculating the corresponding linear equation system. This enables the solution of all eigenvalues of a matrix through analog circuitry, automatically completing the eigenvalue scan and improving calculation speed, with a time complexity of O(n^2). 2 / Δ), where Δ represents the control precision.
[0019] 2. The cross-shaped array structure of the resistive variable unit with differential structure designed in this invention eliminates the need for the complex resistance value control peripheral circuits in the prior art, simplifying the structure, saving costs, and improving efficiency.
[0020] 3. This invention employs an in-memory computing method within the analog domain, which can improve computing speed while reducing energy consumption. Attached Figure Description
[0021] Figure 1 This diagram illustrates the process of calculating multiple eigenvalues of a matrix using the matrix eigenvalue scanning algorithm.
[0022] Figure 2 This is a schematic diagram of a cross-shaped array of resistive switching units.
[0023] Figure 3 This is a schematic diagram of a cross-shaped array of resistive switching units considering differential structure, provided in an embodiment of the present invention.
[0024] Figure 4 This is a schematic diagram illustrating the operation of solving a system of linear equations according to an embodiment of the present invention.
[0025] Figure 5 The complete circuit diagram of the switch and resistance control section provided in the embodiment of the present invention.
[0026] Figure 6 The circuit diagram for solving the infinite norm value of a vector is provided in an embodiment of the present invention.
[0027] Figure 7 The complete circuit schematic diagram for automatically calculating multiple eigenvalues of a matrix is provided in the embodiments of the present invention.
[0028] Figure 8 The circuit simulation results for automatically calculating multiple eigenvalues of a matrix are shown in the embodiment of the present invention. Detailed Implementation
[0029] The technical solutions provided by the present invention will be described in detail below with reference to specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention.
[0030] The hardware circuit implementation method for solving matrix eigenvalues based on resistive variable cell arrays provided by this invention is implemented through a resistance control circuit, a resistive variable cell calculation array, and a norm solving circuit. The process is as follows: Figure 1 As shown, it includes the following steps:
[0031] Step 1: Set the node conductance values of the resistive switching unit array. Write the initial values of each element of the matrix (A-βI) into the resistive switching unit array, where β: any value in the possible range of matrix eigenvalues, and I: the identity matrix of the same order as matrix A.
[0032] Resistive variable memory (RVB) units can be various devices, including resistive variable memory (RVM), phase-change memory (PCM), flash memory, memristors, and voltage-controlled potentiometers. As the characteristics of RVB units show, their resistance can be changed using an external resistance adjustment circuit. During this process, the resistance of the RVB unit changes from a high-resistance state (Roff) to a low-resistance state (Ron), exhibiting a continuous and monotonically decreasing change. When the RVB unit reaches the target resistance value, disconnecting the external resistance adjustment circuit completes the setting of the initial conductance value of the target node.
[0033] The resistive variable unit array adopts, for example Figure 2 The cross-shaped structure shown is integrated. Specifically, the invention is described below. Figure 3 The diagram shows a cross-shaped array structure of resistive switching units considering a differential structure. Solving the linear equation system (A-βI)x=b requires characterizing the real values of the (A-βI) array, including negative elements, using the conductance values of the resistive switching units. Since the conductance values cannot be negative, a differential A=A + -A - and β = β + -β - Solving the linear system of equations (A-βI)x=b is equivalent to solving the linear system of equations A + x+A - (-x)+β + (-x)+β - If x = b, then the array G of four resistive variable units + G - G β+ and G β- Store four parts of data A respectively + A - β + and β - By using a voltage inverter to take the negative value of the voltage, the circuit completes G. + v+G - (-v)+G β+ (-v)+G β- Simulation calculation of v = i1 + i2 + i3 + i4 = i.
[0034] Step 2: Input the current signal corresponding to the random column vector b through the bit line terminal of the resistive variable unit array. At the same time, the switching circuit connects the resistive variable unit corresponding to β to the diagonal node of the resistive variable unit array to complete the solution of the linear equation system (A-βI)x=b, and complete the solution and storage of the infinite norm of the solution vector x.
[0035] Taking the solution of the linear equation system (A-βI)x=b corresponding to a fourth-order square matrix as an example, this invention designs... Figure 4 The in-memory computing solution shown is an example of such a solution.
[0036] Each resistive unit in the resistive inverter array stores the corresponding element value of the matrix (A-βI). Then, each component of the input column vector b is written into the column line in the form of a small current. According to the "virtual ground" of the op-amp, Ohm's law, Kirchhoff's laws, and the rules of matrix multiplication, the output voltage values v1, v2, v3, and v4 can be obtained, which are proportional to the four components of the solution vector x. This completes the task of solving the linear equation system and finding the solution vector x.
[0037] Step 3: The switching circuit connects the corresponding β-type resistor unit to the resistance adjustment circuit to update the resistance value, i.e., change the β value.
[0038] The switching circuit includes a resistive switching unit characterizing the β value and a multiplexer. A clock control circuit is used to change the resistance value of the resistive switching unit characterizing the β value and to calculate the corresponding linear equations, respectively. This invention designs... Figure 5 The circuit structure shown involves a multiplexer that switches periodically according to a given clock cycle. During each cycle, the multiplexer is mostly open in loop ②, and the resistive variable unit enters the resistance control loop to change its resistance value. For short periods, it is open in loop ①, and the resistive variable unit is connected to the cross-shaped array node via the resistance control circuit to solve a linear equation system. By repeating this process, the resistive variable unit switches between the resistance control circuit and the cross-shaped structure, allowing the circuit to automatically change the resistance value of the resistive variable unit representing the β value and calculate the corresponding linear equation system.
[0039] Step four: Repeat steps two and three until the traversal of β is complete. The β values corresponding to all extrema of the infinite norm are the eigenvalues of the matrix. Timing is controlled by a clock, and multiple automatic switching operations between steps two and three are achieved through a switching circuit.
[0040] In this example, the voltage signal output from the resistive variable unit array obtained in step two is used to solve for the infinite norm of each solution vector using a norm solving circuit. The norm solving circuit includes an absolute value circuit and an extremum circuit. The absolute value circuit takes the absolute value of the output voltage values representing all elements of the solution vector x; the extremum circuit extracts the maximum value of the absolute values of all output voltages. The norm solving circuit consists of multiple voltage comparators, multiple operational amplifiers forming an inverter, and multiple multiplexers. For example... Figure 6 As shown, firstly, multiple sets of voltage comparators and voltage inverters are used to take the absolute value of each voltage component of the solution vector; then, multiple sets of voltage comparators and multiplexers are used to take the maximum value, and the voltage value corresponding to the infinite norm is converted into a digital signal by an analog-to-digital converter for storage.
[0041] A complete circuit diagram is as follows Figure 7As shown, the resistance control circuit and the resistive variable unit calculation array automatically complete the solution of multiple linear equations, and the norm solving circuit completes the output of the infinite norm corresponding to each solution vector.
[0042] Based on the above model, simulation was performed in Multisim, and the simulation results are as follows. Figure 8 As shown. The simulation results are compared with the theoretical calculation results, and the relative error is within 5%. Therefore, it can be considered that this circuit can correctly solve for the approximate values of all eigenvalues of the matrix.
[0043] The technical means disclosed in this invention are not limited to those disclosed in the above embodiments, but also include technical solutions composed of any combination of the above technical features. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications are also considered within the scope of protection of this invention.
Claims
1. A method for implementing a hardware circuit for solving eigenvalues of a matrix based on an array of resistive switching cells, characterized in that, The steps include the following: Step 1: Set the node conductance values of the resistive switching unit array and write the initial values of each element of the matrix (A-βI) into the resistive switching unit array, where β is any value in the possible range of matrix eigenvalues and I is the identity matrix of the same order as matrix A. Step 2: Input the current signal corresponding to the random column vector b through the bit line terminal of the resistive variable unit array. At the same time, the switching circuit connects the resistive variable unit corresponding to β to the diagonal node of the resistive variable unit array to complete the solution of the linear equation system (A-βI)x=b, and complete the solution of the infinite norm of the solution vector x and store it. Step 3: The switching circuit connects the resistor unit corresponding to β to the resistance control circuit to update the resistance value, that is, change the value of β. Step four: Repeat steps two and three until the traversal of β is completed. The β values corresponding to all extreme values of the infinite norm are all the eigenvalues of the matrix.
2. The hardware circuit implementation of matrix eigenvalue solution based on resistive switching unit array according to claim 1, characterized in that, The voltage signal output by the resistive variable unit array obtained in step two is used to solve the infinite norm of the solution vector x through a norm solving circuit; the voltage value corresponding to each infinite norm is converted into a digital quantity by a digital-to-analog converter and stored.
3. The hardware circuit implementation method for solving matrix eigenvalues based on resistive variable cell arrays according to claim 2, characterized in that, The norm solving circuit includes an absolute value circuit and an extremum circuit. The absolute value circuit is used to take the absolute value of the output voltage values representing all elements of the solution vector x; the extremum circuit is used to extract the maximum value of the absolute values of all output voltages.
4. The hardware circuit implementation method for solving matrix eigenvalues based on resistive variable cell arrays according to claim 3, characterized in that, The absolute value circuit is implemented by multiple sets of voltage comparators and voltage inverters, and the maximum / minimum value circuit is implemented by multiple sets of voltage comparators and multiplexers.
5. The hardware circuit implementation method for solving matrix eigenvalues based on resistive variable cell arrays according to claim 1, characterized in that, When repeating steps two and three, the timing of the clock is used to switch the connection of the resistive variable unit in the switching circuit.
6. The hardware circuit implementation method for solving matrix eigenvalues based on resistive variable cell arrays according to claim 1 or 5, characterized in that, The switching circuit includes a resistive switching unit that characterizes the β value and a multiplexer, which switches periodically according to a given clock.
7. The hardware circuit implementation method for solving matrix eigenvalues based on resistive variable cell arrays according to claim 1, characterized in that, The resistive switching unit array adopts a cross-shaped array of resistive switching units with a differential structure.
8. The hardware circuit implementation method for solving matrix eigenvalues based on resistive variable cell arrays according to claim 1 or 7, characterized in that, The resistive switching unit uses one of the following devices: resistive switching memory, phase-change memory, flash memory, memristor, or voltage-controlled potentiometer.