A method for reordering the structure of a FPGA Jacobian matrix
By optimizing the Jacobian matrix structure on FPGA, selecting the node with the smallest metric value as the principal element, and performing skip list updates and supervariable merging, the problem of non-zero element filling in Jacobian matrix decomposition is solved, improving computational efficiency and resource utilization, and enhancing the speed and effectiveness of power flow calculation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID SHANGHAI ENERGY INTERCONNECTION RES INST CO LTD
- Filing Date
- 2026-02-11
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, when performing Jacobian matrix decomposition on FPGAs, the filling of non-zero elements leads to slow computation speed, insufficient storage resources, and reduced parallel potential, thus affecting the efficiency of power flow calculation.
By selecting the node with the smallest metric value as the optimal principal component, and utilizing skip list update calculations and hypervariable detection and merging, the Jacobian matrix structure is optimized, non-zero element filling is reduced, and matrix decomposition efficiency is improved.
It significantly improves the computational efficiency and resource utilization of FPGA matrix decomposition, and enhances the response speed and effectiveness of power flow calculation.
Smart Images

Figure CN121681980B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power flow calculation technology, and in particular to a method for reordering the Jacobian matrix structure in FPGA. Background Technology
[0002] Power flow calculation is a crucial analytical calculation for power systems. Based on the power system's wiring configuration, parameters, and operating conditions, it calculates the electrical quantities under steady-state operation, including active power, reactive power, and voltage distribution within the grid. Power flow calculation is also fundamental for system safety, stability, and reliability analysis, used to study various issues arising during system planning and operation. For planned power systems, power flow calculation can verify whether the proposed power system plan meets the requirements of various operating modes. For operating power systems, it can predict whether various load changes and network structure alterations will jeopardize system safety, whether the voltage of all buses in the system is within permissible ranges, whether various components in the system (lines, transformers, etc.) will experience overload, and what preventative measures should be taken in advance if overloads occur.
[0003] Existing literature (Nwankpa C, Johnson J, Nagvajara P, et al. FPGA hardware results for power system computation[C] / / 2009 IEEE / PES Power Systems Conference and Exposition.0[2023-09-26].DOI:10.1109 / PSCE.2009.4839953.) proposes an FPGA system for power flow calculation based on the Newton-Raphson method by collecting data from real-time SCADA system networks and telemetry transmissions. However, this scheme generates a large number of non-zero elements that are not present in the original matrix when performing LU decomposition on the Jacobian matrix, which slows down the matrix decomposition calculation and reduces the overall efficiency of power flow calculation. Furthermore, non-zero element padding in matrix decomposition triggers a series of chain reactions. First, padding significantly increases the number of non-zero elements, causing the storage resources required for the decomposed LU matrix to far exceed those of the original Jacobian matrix. On FPGA hardware chips with extremely limited storage resources, this may directly lead to the problem size exceeding the hardware storage capacity. Second, each padding element becomes a new non-zero element in subsequent elimination steps and participates in the computation, thus requiring more numerical multiplication and addition operations to complete the matrix decomposition process. The computational complexity is strongly correlated with the number of padding elements, greatly reducing the speed of Jacobian matrix decomposition and thus affecting the efficiency of power flow computation. Finally, the generation of non-zero element padding changes the sparse structure of the original Jacobian matrix, potentially introducing new data dependencies. Operations that could originally be executed synchronously must be computed according to the new data dependencies, reducing the parallel potential of power flow computation matrix decomposition. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide an FPGA Jacobi matrix structure reordering method that can improve the response speed and effectiveness of power flow calculation.
[0005] The technical solution adopted by this invention to solve its technical problem is: to provide an FPGA Jacobian matrix structure reordering method, comprising the following steps:
[0006] Select the node with the smallest metric value from the unprocessed nodes in the Jacobian matrix as the optimal principal element, and calculate the optimal principal element variable skip list;
[0007] For all variables in the current optimal principal variable skip list, perform the update calculation of the node variable skip list, the update calculation of the node element skip list, and the update calculation of the node metric value in sequence.
[0008] Detect and update node supervariables based on all variables in the current optimal principal variable skip list;
[0009] Remove the current optimal principal element from the unprocessed nodes, and select the node with the smallest metric value from the unprocessed nodes in the Jacobian matrix as the optimal principal element, until all nodes in the Jacobian matrix are covered.
[0010] The calculation of the optimal pivot variable skip list specifically includes:
[0011] Retrieve the corresponding node variable skip list from the head and tail addresses of the node variable skip list pointed to by the number of the optimal principal element;
[0012] Retrieve the corresponding node element skip list from the header and tail addresses of the skip list pointed to by the number of the optimal principal element;
[0013] By performing a bidirectional search, the union of the main variable skip lists pointed to by all elements in the node element skip lists is calculated to obtain the first merging result;
[0014] Calculate the union of the node variable skip list and the first merge result to obtain the second merge result;
[0015] The data in the skip list of the dominant variable set is deleted from the second merge result to obtain the optimal dominant variable skip list;
[0016] The dominant variable set skip list is used to record the initial dominant relationship of each node.
[0017] The update calculation of the node variable skip list specifically includes:
[0018] Retrieve the corresponding node variable skip list from the head address and tail address of the node variable skip list pointed to by the node variable in the optimal principal variable skip list;
[0019] Remove the data from the optimal pivot variable skip list from the node variable skip list to obtain the pivot variable set skip list;
[0020] Retrieve the corresponding dominant variable skip list from the header and tail addresses of the dominant variable skip list pointed to by the optimal principal variable;
[0021] The data in the primary variable skip list is deleted from the primary variable set skip list to complete the update of the node variable skip list.
[0022] The update calculation of the skip list of node elements specifically includes:
[0023] Retrieve the corresponding node element skip list from the head and tail addresses of the element skip list pointed to by the node variables in the optimal principal variable skip list;
[0024] Retrieve the skip list of the pivot element from the header and tail addresses of the skip list of the node element pointed to by the optimal pivot variable;
[0025] Delete the data from the main element skip list from the node element skip list to obtain a new node element skip list;
[0026] The optimal principal variable is added to the new node element skip list to complete the update of the node element skip list.
[0027] The update of the node metric value is specifically as follows: calculate the remaining number of nodes, the corrected node metric value, and the approximate node metric value respectively, and take the minimum value among the remaining number of nodes, the corrected node metric value, and the approximate node metric value as the updated node metric value.
[0028] The node correction metric is calculated in the following way:
[0029] Retrieve the corresponding dominant variable skip list from the head and tail addresses of the dominant variable skip list pointed to by the node variables in the optimal dominant variable skip list;
[0030] Delete the data from the optimal principal variable skip list to obtain a new optimal principal variable skip list;
[0031] Calculate the number of data in the new optimal principal variable skip list;
[0032] The node correction metric is obtained by adding the number of data in the new optimal principal variable skip list to the metric value of the optimal principal.
[0033] The approximate metric value of the node is calculated in the following way:
[0034] Retrieve the corresponding node variable skip list from the head address and tail address of the node variable skip list pointed to by the node variable in the optimal principal variable skip list;
[0035] Delete the data from the dominant variable skip list from the node variable skip list to obtain a new node variable skip list, and calculate the number of data in the new node variable skip list;
[0036] Delete the data from the dominant variable skip list to obtain a new optimal pivot variable skip list, and calculate the number of data in the new optimal pivot variable skip list;
[0037] Retrieve the corresponding node element skip list from the head and tail addresses of the node element skip list pointed to by the node variables in the optimal principal variable skip list;
[0038] The optimal principal element number value is deleted from the node element skip list to obtain a new node element skip list;
[0039] Calculate the node metric correction accumulation value based on the new node element skip list;
[0040] The number of data in the new node variable skip list, the number of data in the new optimal principal variable skip list, and the cumulative value of the node metric correction are summed to obtain the node approximate metric value.
[0041] The step of calculating the node metric correction accumulation value based on the new node element skip list specifically includes:
[0042] A bidirectional search is used to find the metric correction value of the current node variable number from the new node element skip list;
[0043] If the measurement correction value of the current node variable number is less than zero, the corresponding node variable skip table is retrieved from the head address and tail address of the node variable skip table pointed to by the current node variable number, and the number of data in the skip table pointed to by the current node variable number is taken as the new measurement correction value from the data count register of the node variable skip table.
[0044] If the measurement correction value of the current node variable number is not less than zero, the measurement correction value of the current node variable number is added to the number of data in the dominant variable skip list to obtain a new measurement correction value;
[0045] All new metric correction values are summed to obtain the node metric correction cumulative value.
[0046] The process of detecting and updating node hypervariables based on all variables in the current optimal principal variable skip list specifically includes:
[0047] The hash value is calculated by performing a node hash function on the variables in the current optimal main variable skip list, and the current variable is added to the hash chain list pointed to by the variable.
[0048] The length of the hash list corresponding to the variable is retrieved from the data count register of the hash list. When multiple variables with the same hash value in the hash list conflict, all variables in the single linked list formed by the hash value are judged. When there are indistinguishable variables, super variables are merged.
[0049] The step of calculating the hash value by performing a node hash function on the variables in the current optimal main variable skip list specifically includes:
[0050] Retrieve the corresponding node variable skip list from the head address and tail address of the node variable skip list pointed to by the node variable in the optimal principal variable skip list;
[0051] Retrieve the corresponding node element skip list from the head and tail addresses of the node element skip list pointed to by the node variables in the optimal principal variable skip list;
[0052] A bidirectional search is used to retrieve the header and tail node variable values of the underlying data field of the node variable skip list, as well as the header and tail node element values of the underlying data field of the node element skip list, from the node variable skip list and the node element skip list, respectively.
[0053] The first accumulated value is obtained by summing all the variable values of the header node and the variable values of the tail node; the second accumulated value is obtained by summing all the element values of the header node and the element values of the tail node.
[0054] The first and second accumulated values are added together, and then a modulo operation is performed to obtain the hash value.
[0055] The determination of all variables in the singly linked list formed by the hash value specifically includes:
[0056] Retrieve the corresponding first node variable skip list and second node variable skip list from the head address and tail address of the skip list pointed to by the first variable and second variable in the singly linked list, respectively.
[0057] Retrieve the corresponding first node element skip list and second node element skip list from the head address and tail address of the skip list pointed to by the first variable and the second variable in the singly linked list, respectively.
[0058] Calculate the union of the first node variable skip list and the first node element skip list to obtain the first union skip list;
[0059] Calculate the union of the second node variable skip list and the second node element skip list to obtain the second union skip list;
[0060] Add the first variable to the first union skip list, and add the second variable to the second union skip list. If the first union skip list after adding the first variable is exactly the same as the second union skip list after adding the second variable, then it means that the first variable and the second variable are indistinguishable.
[0061] The process of merging supervariables when indistinguishable variables exist specifically includes:
[0062] When the first variable and the second variable in the singly linked list are indistinguishable variables, the first dominant variable skip list is retrieved from the head address and tail address of the dominant variable skip list pointed to by the first variable, and the second dominant variable skip list is retrieved from the head address and tail address of the dominant variable skip list pointed to by the second variable.
[0063] The first dominant variable skip list is merged with the second dominant variable skip list to obtain a new first dominant variable skip list;
[0064] Retrieve the number of data items in the skip list pointed to by the second dominant variable from the data count register of the second dominant variable skip list;
[0065] Subtract the number of data items in the skip list pointed to by the second variable from the measure value of the first variable to obtain the new measure value of the first variable;
[0066] Delete the second variable number from the unprocessed node, and set the skip list of the node variable and the skip list of the node element pointed to by the second variable to an empty set.
[0067] The technical solution adopted by the present invention to solve its technical problem is: to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-mentioned FPGA Jacobi matrix structure reordering method.
[0068] The technical solution adopted by the present invention to solve its technical problem is: to provide a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the above-mentioned FPGA Jacobi matrix structure reordering method.
[0069] Beneficial effects
[0070] By adopting the above-mentioned technical solution, this invention has the following advantages and positive effects compared with the prior art: By prioritizing the selection of the variable with the smallest metric value as the optimal principal component and utilizing the update calculation of the skip list, combined with the detection and merging of hypervariables, this invention can quickly calculate the optimal column sorting vector of the Jacobian matrix, so that the number of non-zero element fillings generated during the decomposition of the Jacobian matrix after optimal column sorting is minimized, which significantly improves the computational efficiency and resource utilization of FPGA matrix decomposition and accelerates the effectiveness of power flow calculation. Attached Figure Description
[0071] Figure 1 This is a flowchart of the FPGA Jacobian matrix structure reordering method according to the first embodiment of the present invention;
[0072] Figure 2 This is a flowchart of the calculation of the optimal principal variable skip list in the first embodiment of the present invention;
[0073] Figure 3 This is a flowchart of the node variable skip list update process in the first embodiment of the present invention;
[0074] Figure 4 This is a flowchart of the node element skip list update process in the first embodiment of the present invention;
[0075] Figure 5 This is a flowchart of the node metric update process in the first embodiment of the present invention;
[0076] Figure 6 This is a flowchart illustrating the calculation of the node metric correction accumulation value in the first embodiment of the present invention;
[0077] Figure 7 This is a flowchart of node supervariable detection and updating in the first embodiment of the present invention;
[0078] Figure 8 This is a flowchart of the node hash function calculation in the first embodiment of the present invention;
[0079] Figure 9 This is a flowchart of the indistinguishable variable detection process in the first embodiment of the present invention;
[0080] Figure 10 This is a flowchart of supervariable merging and node updating in the first embodiment of the present invention;
[0081] Figure 11 This is a flowchart of the principal variable update in the first embodiment of the present invention. Detailed Implementation
[0082] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.
[0083] The first embodiment of the present invention relates to an FPGA Jacobi matrix structure reordering method. This method can quickly calculate the optimal column sorting vector of the Jacobi matrix, so that the number of non-zero element fillings generated during the decomposition of the Jacobi matrix after the optimal column sorting is minimized, which significantly improves the computational efficiency and resource utilization of FPGA matrix decomposition and accelerates the effectiveness of power flow calculation.
[0084] Before executing this method, the skip list and node variables need to be initialized, as follows:
[0085] In this implementation, the Jacobian matrix pivot elimination process categorizes nodes into variable nodes and element nodes based on their elimination order. Variable nodes represent nodes that have not yet been eliminated, while element nodes represent nodes that have been eliminated after selecting the current pivot. Three types of skip lists are set up, where all data is an ordered doubly linked list structure. The Jacobian matrix variable set skip list, variable_set_A, is denoted as A. i Let represent the set of all variables adjacent to variable i. The element set is a skip list element_set_E, denoted as E. iLet represent the set of all elements adjacent to variable i. The skip list of the sets of variables adjacent to each element is denoted as L. e , represents the set of all variables adjacent to element e.
[0086] Set the register for the set of unsearched variable nodes in the Jacobian matrix to set_V=[0:2(n-1)-1], where n is the number of system nodes, initially set to the node numbers of all nodes, set_V←{1:2(n-1)}. The skip list for the set of pivot elements found each time a pivot is selected is set_element_V, initially empty, set_element_V←Φ. Set metric_min to the minimum value of the Jacobian matrix node metric, initially metric_min←MIN. 16 MIN 16 The minimum value for a 16-bit data length. The current Jacobian matrix node number counter is count_node_id ← 0. When count_node_id ≤ 2(n-1)-1, the following loop process is executed.
[0087] First, the skip list A of the variable set pointed to by count_node_id is... count_node_id The start and end addresses are saved to variable_head_addr and variabl_rear_addr, respectively, i.e., variabl_head_addr ← variabl_set_head[count_node_id], variabl_rear_addr ← variabl_set_rear[count_node_id]. All non-zero column node numbers col_data in the count_node_id row of the symmetric Jacobian matrix sym_jacoby are added to A. count_node_id In the skip list, the process of adding data to the skip list is executed using `insert_skip_list[variable_head_addr,variable_rear_addr,col_data]`, where `variable_head_addr` and `variable_rear_addr` are A... count_node_id The skip list's head and tail addresses. Initially set the element set, skip list E. count_node_id It is an empty set, i.e., E count_node_id ←Φ.
[0088] Next, the node metric register metric_d[0:2(n-1)-1] is set, and the current skip list set A is retrieved from the node variable set count register variable_set_num[0:2(n-1)-1]. count_node_idThe number of data in it, current_metric, that is, current_metric ← variable_set_num[count_node_id], and save current_metric to the node metric register metric_d, that is, metric_d[count_node_id] ← current_metric. Update the minimum value of the node metric, metric_min, and the corresponding node number metric_min_id. If the current node metric current_metric < metric_min, record the current node metric current_metric and the node number count_node_id, that is, metric_min ← current_metirc, metric_min_id ← count_node_id.
[0089] Then, initialize the skip list principle_I of the dominant variable set of the current node number count_node_id count_node_id , if the variable numbers i and j of two nodes are indistinguishable, that is, Adj(i) ∪ {i} = Adj(j) ∪ {j}, where Adj(·) represents the set of all variables and elements adjacent to the node, then i and j can be merged into a super variable i, that is, i ← i ∪ j, and use the number of node i to represent the merged super variable. Save the head address and tail address of the skip list principle_I count_node_id to principle_head_addr and principle_rear_addr, that is, principle_head_addr ← principle_head[count_node_id], principle_rear_addr ← principle_rear[count_node_id]. Add the current node number count_node_id to the skip list principle_I of the dominant variable set count_node_id , and execute the skip list data addition process insert_skip_list[principle_head_addr, principle_rear_addr, count_node_id].
[0090] Finally, update the current node number counter count_node_id ← count_node_id + 1.
[0091] As Figure 1 shown, the FPGA Jacobi matrix structure reordering method of this embodiment includes the following steps:
[0092] Step 1: Select the node with the smallest metric value from the unprocessed nodes in the Jacobian matrix as the optimal principal element, and calculate the optimal principal element variable skip list.
[0093] This step selects the variable with the smallest metric value from the current Jacobian matrix elimination graph as the optimal principal component and calculates the skip list for the optimal principal component variable. Simultaneously, it updates the skip lists for node variables, element skip lists, and metric values associated with the optimal principal component.
[0094] First, find the variable node with the smallest metric value from the set_V register of variable nodes in the Jacobian matrix that have not yet been searched. Save the variable node number metric_min_id with the smallest metric value as the current optimal principal component number optimal_p, i.e., optimal_p ← metric_min_id. At the same time, set the metric value of the current node number to the maximum value, metric_d[optimal_p] ← MAX. 16 MAX 16 The maximum value for a 16-bit data set.
[0095] Let the skip list of the variable node set adjacent to the current optimal pivot number optimal_p be pivot_variable_set_L, denoted as L. optimal_p The calculation is performed according to the following formula:
[0096] .
[0097] Figure 2 For the optimal principal variable skip list L optimal_p The calculation flowchart is as follows. First, the node variable skip list A is retrieved from the skip list head address variable_set_head and tail address variable_set_rear pointed to by the current optimal principal element number optimal_p. optimal_p The start and end addresses are stored in variable_head_addr and variable_rear_addr respectively, i.e., variable_head_addr ← variable_set_head[optimal_p], variable_rear_addr ← variable_set_rear[optimal_p]. Simultaneously, the node element skip list E is retrieved from the node element skip list head address element_set_head and tail address element_set_rear pointed to by the current optimal pivot number optimal_p. optimal_pThe start and end addresses are stored in element_head_addr and element_rear_addr respectively, i.e., element_head_addr ← element_set_head[optimal_p], element_rear_addr ← element_set_rear[optimal_p].
[0098] Then, calculate the skip list E of the node elements. optimal_p All elements 'e' in the main variable skip list L point to. e The union of the elements yields the first merge result, denoted as union_Le. The total number of elements in the skip list pointed to by optimal_p is retrieved from the element_set_num register and stored in element_num, i.e., element_num ← element_set_num [optimal_p]. The element counter count_element ← 1 is set. When this happens, the following loop process is executed.
[0099] Design a bidirectional search and calculation process from the head and tail of the table, starting from the node element and skipping to table E. optimal_p The header and tail data addresses are extracted from the underlying data field and saved to before_addr and later_addr respectively. The header and tail data element values are saved from the data register of the element skip list to before_e and later_e, that is, before_e ← element_set_data[before_addr], later_e ← element_set_data[latter_addr].
[0100] Then, before_e and later_e are fed into the variable union calculation module 1 to perform the union operation of the skip list sets, and the main variable skip list L pointed to by before_e and later_e is calculated. before_e and L latter_e Union of L before_e ∪L latter_e Save the union result to union_Le, that is, execute union_Le ← union_list[L before_e ,L latter_e ].
[0101] Finally, the head and tail data addresses are updated from the next and prior address pointer registers of the element skip list, respectively: before_next_addr ← element_set_next[before_addr], and later_prior_addr ← element_set_prior[latter_addr]. Simultaneously, the head and tail data element values are updated from the data register of the element skip list: before_e ← element_set_data[before_next_addr], and later_e ← element_set_data[latter_prior_addr].
[0102] If element_num%2=1, then % is the modulo operation, and the node element skip list E is set up separately. optimal_p The intermediate data before_e is fed into the variable union calculation module 1 to calculate the union once, and then execute union_Le ← union_list[L before_e ,Φ].
[0103] Next, the node variable skip list A optimal_p and the main variable skip list L e The union_Le is fed into union calculation module 2 to calculate A. optimal_p ∪union_Le obtains the second merge result, saves the second merge result to pivot_variable_set, that is, execute pivot_variable_set←union_list[A optimal_p ,union_Le].
[0104] Finally, the pivot_variable_set and the optimal principal variable optimal_p are fed into the skip list difference calculation module, and the current dominant principal variable set skip list principle_I is deleted from the pivot_variable_set. optimal_p Calculate pivot_variable_set\principle_I optimal_p Remove the principal variable skip list `principle_I` from the pivot_variable_set. optimal_p The data in the table will be stored in the optimal pivot variable skip list L. optimal_p In the middle, that is, executing L optimal_p ←difference_skip_list[pivot_variable_set,principle_I optimal_p ].
[0105] At this point, the optimal pivot table L has been calculated. optimal_p .
[0106] Step 2: For all variables in the current optimal principal variable skip list, perform the update calculations for the node variable skip list, the node element skip list, and the node metric value in sequence.
[0107] The node variable skip list update calculation in this step is as follows: Figure 3 As shown. First, the node variable skip list A is retrieved from the node variable skip list head address variable_set_head and tail address variable_set_rear pointed to by the current node variable variable variable_i. variable_i The start and end addresses are stored in variable_head_addr and variable_rear_addr respectively, i.e., variable_head_addr ← variable_set_head[variable_i], variable_rear_addr ← variable_set_rear[variable_i].
[0108] Next, the optimal pivot variable skip list L is used. optimal_p and node variable skip list A variable_i The data is sent to the skip list difference calculation module 1 to calculate A. variable_i \L optimal_p Skip list A from node variable variable_i Deleting the optimal principal variable skip list L optimal_p The data in the table will be stored in the main variable set skip list variable_set_pivot, i.e., variable_set_pivot ← difference_skip_list[A] will be executed. variable_i ,L optimal_p ].
[0109] Then, the dominant variable skip list `principle_I` is retrieved from the header address `principle_head` and tail address `principle_rear` of the dominant variable skip list pointed to by the current optimal principal variable `optimal_p`. optimal_pThe starting and ending addresses are saved to `principle_head_addr` and `principle_rear_addr` respectively, i.e., `principle_head_addr ← principal_head[optimal_p]`, `principle_rear_addr ← principal_rear[optimal_p]`. The pivot variable set jump list `variable_set_pivot` and the main pivot variable jump list `principle_I` are then linked. optimal_p The variable is fed into the skip list difference calculation module 2 to calculate variable_set_pivot\principle_I. optimal_p Remove the principal variable skip list `principle_I` from the principal variable set skip list `variable_set_pivot`. optimal_p The data in the table will be saved to the node variable skip list A. variable_i That is, execute A variable_i ←difference_skip_list[variable_set_pivot,principle_I optimal_p ].
[0110] The node element skip list update calculation in this step is as follows: Figure 4 As shown. First, the node element skip list E is retrieved from the node element skip list head address element_set_head and tail address element_set_rear pointed to by the current node variable variable_i. variable_i The start and end addresses are stored in `element_head_addr` and `element_rear_addr` respectively, i.e., `element_head_addr ← element_set_head[variable_i]`, `element_rear_addr ← element_set_rear[variable_i]`. Simultaneously, the pivot element skip list `E` is retrieved from the head address `element_set_head` and tail address `element_set_rear` of the node element skip list pointed to by the current optimal pivot variable `optimal_p`. optimal_p The starting and ending addresses are saved to pivot_head_addr and pivot_rear_addr respectively, i.e., pivot_head_addr ← element_set_head[optimal_p], pivot_rear_addr ← element_set_rear[optimal_p].
[0111] Next, the skip list E of the node elements is... variable_i and the skip list of pivot elements E optimal_p The data is sent to the jump list difference calculation module to calculate E. variable_i \E optimal_p Skip list E from node elements variable_i Deleting the main element from the skip list E optimal_p The data in the table will be used to calculate the results and save them to the skip list E containing the node elements. variable_i That is, execute E variable_i ←difference_skip_list[E variable_i E optimal_p ].
[0112] Then, the node element skip list E variable_i The current optimal principal variable, `optimal_p`, is fed into the skip list data insertion calculation module to calculate E. variable_i ∪{optimal_p}, add the optimal principal variable `optimal_p` to the node element skip list `E`. variable_i In the middle, the calculation results are saved to the skip list E of the node elements. variable_i That is, execute E variable_i ←insert_skip_list[E variable_i ,optimal_p].
[0113] The node metric update calculation in this step is as follows: Figure 5 As shown, it calculates the remaining node count d1, the node correction metric d2, and the node approximate metric d3 respectively, and takes the minimum value among the remaining node count d1, node correction metric d2, and node approximate metric d3 as the updated node metric d. variable_i d variable_i ←min{d1,d2,d3}.
[0114] Calculate the remaining number of nodes d1: Input the total number of nodes N=2(n-1) and the current node number counter count_node_id into the summation module 1, calculate the difference between the total number of nodes N and the current node number counter count_node_id, d1←N-count_node_id.
[0115] Compute node correction metric d2:
[0116] First, retrieve the dominant variable skip list `principle_I` from the header address `principle_head` and tail address `principle_rear` of the dominant variable skip list pointed to by the current node variable `variable_i`. variable_iThe start and end addresses are stored in principle_head_addr and principle_rear_addr respectively, i.e., principle_head_addr ← principle_head[variable_i], principle_rear_addr ← principle_rear[variable_i].
[0117] Next, the optimal pivot variable skip list L is used. optimal_p and the dominant variable skip list principle_I variable_i The data is sent to the jump list difference calculation module to calculate L. optimal_p \principle_I variable_i From the optimal principal variable skip list L optimal_p Remove the dominant variable from the skip list principle_I variable_i The data in the file will be saved to L. optimal_p That is, execute L optimal_p ←difference_skip_list[L optimal_p ,principle_I variable_i ].
[0118] Then, calculate the updated skip list L. optimal_p The number of data points in the middle, i.e., |L optimal_p \principle_I variable_i |,|·| represents the number of data items in the set. The skip list L pointed to by the optimal pivot number optimal_p is retrieved from the element_set_num register, which contains the number of skip list data items in the node element skip list. optimal_p The number of data items is saved to `element_num`, i.e., `element_num ← element_set_num[optimal_p]`. Simultaneously, the uncorrected metric value of the current node variable `variable_i` is saved from the node metric register `metric_d`. ,Right now ←metric_d[variable_i].
[0119] Finally, the uncorrected metric value of the current node is... and L optimal_p The number of data points, element_num, is fed into the summation module 2 to calculate the node correction metric d2, where d2 ← .
[0120] Calculate the approximate metric d3 for each node:
[0121] First, compute the node variable skip list A. variable_iAnd the optimal principal variable skip list L optimal_p Delete the skip list of the current dominant variable, principle_I variable_i Count the number of skip list data items after | A variable_i \principle_I variable_i | and |L optimal_p \principle_I variable_i |
[0122] |A variable_i \principle_I variable_i The calculation is as follows: First, retrieve the node variable skip list A from the node variable skip list head address variable_set_head and tail address variable_set_rear pointed to by the current node variable variable variable_i. variable_i The start and end addresses are stored in variable_head_addr and variable_rear_addr respectively, i.e., variable_head_addr ← variable_set_head[variable_i], variable_rear_addr ← variable_set_rear[variable_i]. Next, the node variable skip list A... variable_i and the dominant variable skip list principle_I variable_i The data is sent to the skip list difference calculation module 2 to calculate A. variable_i \principle_I variable_i Save the result to new_A variable_i That is, execute new_A variable_i ←difference_skip_list[A variable_i ,principle_I variable_i The skip list new_A pointed to by the current node number variable_i is retrieved from the node variable skip list data count register variable_set_num. variable_i The number of data items is stored in V_num, i.e., V_num←variable_set_num[variable_i].
[0123] |L optimal_p \principle_I variable_i The calculation is as follows: The optimal principal variable skip list L... optimal_p and the dominant variable skip list principle_I variable_i The data is sent to the skip list difference calculation module 3 to calculate |L optimal_p \principle_I variable_i| Save the result to new_L optimal_p That is, execute new_L optimal_p ←difference_skip_list[L optimal_p ,principle_I variable_i The skip list new_L pointed to by the current optimal principal element number optimal_p is retrieved from the element_set_num register. optimal_p The number of data items is stored in E_num, where E_num ← element_set_num[optimal_p].
[0124] Next, we calculate the sum of the skip list values of the node elements pointed to by the current node variable variable_i. .
[0125] First, retrieve the node element skip list E from the node element skip list head address element_set_head and tail address element_set_rear pointed to by the current node variable variable_i. variable_i The start and end addresses of the node are stored in `element_head_addr` and `element_rear_addr` respectively, i.e., `element_head_addr ← element_set_head[variable_i]`, `element_rear_addr ← element_set_rear[variable_i]`. Then, the node element skip list E is... variable_i The current optimal principal element number value, `optimal_p`, is sent to the skip list data deletion module to calculate E. variable_i \{optimal_p}, from the node element skip list E variable_i Delete the optimal pivot element value `optimal_p`, save the result to the node element, and update the skip list `new_E`. variable_i That is, execute new_E variable_i ←delete_skip_list[E variable_i ,optimal_p].
[0126] Set up a metric correction register `correct_w[0:2(n-1)-1]` for each node in the Jacobian matrix, initially `correct_w` ← {-1, -1, ..., -1}. Next, design a skip list `new_E` to update node elements. variable_iThe bidirectional search calculation process for the table header and footer simultaneously sends the header element value before_e and the footer element value later_e to the metric correction calculation module to calculate and update the metric correction value correct_w[·] of the corresponding node, and saves the cumulative metric correction value of the node to sum_Le_Lp.
[0127] Then, the skip list new_A variable_i Number of data items V_num, skip list new_L optimal_p The number of data points E_num and the cumulative value of node metric correction sum_Le_Lp are sent to the summation module 3 to calculate the approximate node metric d3, i.e., d3←V_num+E_num+sum_Le_Lp.
[0128] Figure 6 The calculation process for correcting the metric value is as follows: The metric correction value `correct_w[node_e]` of the node variable `node_e` is retrieved, and the sign of `correct_w[node_e]` is determined, with two possible cases.
[0129] (1) If correct_w[node_e] < 0. First, retrieve the node variable skip list A from the header address variable_set_head and tail address variable_set_rear of the node variable skip list pointed to by the current node variable number node_e. node_e The start and end addresses are stored in variable_head_addr and variable_rear_addr respectively, i.e., variable_head_addr ← variable_set_head[node_e], variable_rear_addr ← variable_set_rear[node_e]. Then, the skip list A pointed to by the current node variable number node_e is retrieved from the node variable skip list data count register variable_set_num. node_e The number of data items is saved to the metric correction value register correct_w[node_e], that is, correct_w[node_e] ← variable_set_num[node_e].
[0130] (2) If correct_w[node_e]≥0, adjust the metric correction value correct_w[node_e] of the node variable number node_e and the skip list principal_I of the dominant variable. variable_iThe result is fed into the accumulator module 1 to calculate the metric correction value of the node variable node_e, and the result is saved to the metric correction value register correct_w, i.e., correct_w[node_e]←correct_w[node_e]+|principle_I variable_i |
[0131] Once the metric correction value correct_w[node_e] of node variable number node_e is updated, the correction value of the current node_e is synchronously sent to the summation calculation module 2 to calculate the node metric correction cumulative value sum_Le_Lp, where sum_Le_Lp ← sum_Le_Lp + correct_w[node_e].
[0132] Step 3: Detect and update node hypervariables based on all variables in the current optimal principal variable skip list. A node hypervariable refers to a set of multiple node variables that satisfy the indistinguishability condition during Jacobi matrix elimination. If the neighborhood sets of two node variables i and j are exactly equal to their own union, then nodes i and j are indistinguishable nodes and can be merged into a single node hypervariable. One of these node numbers is then designated as the unique identifier of the hypervariable.
[0133] This step is as follows: Figure 7 As shown, firstly, for the optimal principal variable skip list L... optimal_p Each node variable `variable_i` is fed into the node hash function calculation module to obtain its corresponding hash value `hash_key_i`, and the current node variable is added to the hash list `hash_list_i` pointed to by `variable_i`. Next, the length of the hash list corresponding to the current node variable `variable_i`, `hash_list_size`, is retrieved from the hash list data count register `hash_node_num`, i.e., `hash_list_size ← hash_node_num[variable_i]`. If multiple variables storing the same hash value in the hash list cause a collision (i.e., when the hash list length `hash_list_size` ≥ 2), the singly linked list `hash_list_i` formed by this hash value is sent to the indistinguishable variable detection module. This module checks all variables in `hash_list_i` to determine if there are any indistinguishable variables, and saves the result to the indistinguishable variable flag register `indistinguish_sig`. If `indistinguish_sig = 1`, it indicates the existence of indistinguishable variables. In this case, the supervariable merging and node update module is executed to merge supervariables and update the relevant skip lists.
[0134] Figure 8The process for calculating the node hash function is as follows: First, retrieve the node variable skip list A from the node variable skip list head address (variable_set_head) and tail address (variable_set_rear) pointed to by the current node variable variable (variable_i). variable_i The start and end addresses are stored in variable_head_addr and variable_rear_addr respectively, i.e., variable_head_addr ← variable_set_head[variable_i], variable_rear_addr ← variable_set_rear[variable_i]. Simultaneously, the node element skip list E is retrieved from the node element skip list head address element_set_head and tail address element_set_rear pointed to by the current node variable variable_i. variable_i The start and end addresses are stored in element_head_addr and element_rear_addr respectively, i.e., element_head_addr ← element_set_head[variable_i], element_rear_addr ← element_set_rear[variable_i].
[0135] Next, starting from the node variable jump list A... variable_i and node element skip list E variable_i The search begins bidirectionally through the header and footer data of the table, retrieving skip list A from each. variable_i The header and tail node variable values before_v and later_v of the underlying data field, and the skip list E variable_i The header and footer node element values of the underlying data field are before_e and later_e.
[0136] Then, the node variable values before_v and later_v, and the node element values before_e and later_e are respectively fed into variable value accumulator 1 and variable value accumulator 2 to obtain the accumulated value sum_A of the node variable and the accumulated value sum_E of the node element. The accumulated values of the node variable and the node element are summed to obtain sum_AE←sum_A+sum_E.
[0137] Variable value accumulator 1 is responsible for adding node variable jump list A variable_i The values of all node variables v are accumulated, and the result is saved to sum_A, i.e., sum_A ← sum_A + v. Variable value accumulator 2 is responsible for storing the node element skip list E. variable_iThe values of all node elements e are summed, and the result is saved to sum_E, i.e., sum_E←sum_E+e.
[0138] Finally, the node variable and the sum of elements, sum_AE, are fed into the modulo operation module to obtain the hash value hash_key_i of the current node variable variable_i, i.e., hash_key_i←[sum_AE%(N-1)]+1, where N is the dimension of the Jacobian matrix 2(n-1).
[0139] Figure 9 This is the indistinguishable variable detection process. This module is responsible for checking each pair of node variables (node_i and node_j) in the current hash list (hash_list_i) to see if they are indistinguishable. If two node variable numbers (node_i and node_j) are indistinguishable, i.e., A... node_i ∪E node_i ∪{node_i}= A node_j ∪E node_j ∪{node_j} represents the set of all variables and elements adjacent to node_i and node_j that are completely equal to the union of the node itself, and is an indistinguishable variable.
[0140] First, retrieve the node variable skip list A from the header address variable_set_head and tail address variable_set_rear of the skip list pointed to by the current node variables node_i and node_j, respectively. node_i and A node_j The starting and ending addresses are determined. Simultaneously, the node element skip list E is retrieved from the head address (element_set_head) and tail address (element_set_rear) of the skip list pointed to by the current node variables node_i and node_j, respectively. node_i and E node_j The first and last addresses.
[0141] Then, the node variable skip list A is respectively... node_i and node element skip list E node_i The node variable is sent to the skip list union calculation module 1, and the node variable skip list A is processed. node_j and node element skip list E node_j Input the data into the skip list union calculation module 2. Skip list union calculation module 1 calculates skip list A. node_i and skip list E node_i The union of nodes is calculated and the result is saved to union_AE_i, where union_AE_i is the number of all neighboring nodes of node_i. This is equivalent to executing union_AE_i ← union_list[A...]. node_i Enode_i Skip list union calculation module 2 calculates skip list A. node_j and skip list E node_j The union of nodes is calculated and the result is saved to union_AE_j, where union_AE_j is the number of all neighboring nodes of node_j. This is equivalent to executing union_AE_j ← union_list[A...]. node_j E node_j ].
[0142] Next, union_AE_i and node_i are fed into skip list data addition module 1, union_AE_i∪{node_i} is calculated, and the node variable number node_i is added to the skip list union_AE_i, i.e., union_AE_i←insert_skip_list[union_AE_i,node_i]. Simultaneously, union_AE_j and node_j are fed into skip list data addition module 2, union_AE_j∪{node_j} is calculated, and the node variable number node_j is added to the skip list union_AE_j, i.e., union_AE_j←insert_skip_list[union_AE_j,node_j].
[0143] Finally, compare whether the data in the skip list set union_AE_i and the skip list set union_AE_j are completely equal. If union_AE_i = union_AE_j, it means that the node variables node_i and node_j are indistinguishable, and the indistinguish variable flag register indistinguish_sig is set to ←1.
[0144] Figure 10 This describes the process of merging supervariables and updating nodes. If node variables node_i and node_j are indistinguishable, then node_i and node_j can be merged into a single supervariable node_i, i.e., node_i←node_i∪node_j.
[0145] First, retrieve the dominant variable skip list `principle_I` from the header address `principle_head` and tail address `principle_rear` of the dominant variable skip list pointed to by the current node variable `node_i`. node_i The starting and ending addresses of the jump table. Simultaneously, the starting and ending addresses of the jump table are retrieved from the starting address `principle_head` and ending address `principle_rear` of the jump table pointed to by the current node variable `node_j`. node_j The first and last addresses.
[0146] Then, the dominant variable skip list set principle_I node_i and principle_I node_j The result is fed into the skip list union calculation module to calculate principle_I. node_i ∪principle_I node_j Merge node variable node_j into node_i, and save the calculation result to the skip list set principal_i. node_i That is, execute principle_I node_i ←union_skip_list[principle_I node_i ,principle_I node_j ].
[0147] Next, update the node metric register metric_d[node_i] pointed to by the node variable node_i.
[0148] First, from the dominant variable skip list principle_I node_j The data count register `principle_set_num` stores the number of data items in the skip list pointed to by the current node variable `node_j`, which is equal to the number of data items in `principle_I`. node_j | Save to principle_num_j, i.e., principle_num_j ← principle_set_num[node_j].
[0149] Then, the metric_d[node_i] of node_i and the skip list set of the dominant variable principle_I are combined. node_j The number of data points, principle_num_j, is sent to the metric update module, and the calculation result is saved to metric_d[node_i], i.e., metric_d[node_i] ← metric_d[node_i] - principle_num_j.
[0150] Next, update the set_V register of variable nodes that have not yet been searched, and mark the current node variable number node_j as deleted in set_V, that is, set_V[node_j]←-1.
[0151] Finally, the skip list A of the node variable pointed to by the current node variable node_j is... node_j and node element skip list E node_j Let A be an empty set. node_j ←Φ, E node_j ←Φ.
[0152] Step 4: Remove the current best principal element from the unprocessed nodes and return to Step 1 until all nodes of the Jacobian matrix are covered.
[0153] This step, when removing the current best principal from the unprocessed nodes, also requires updating the principal variable, such as... Figure 11 As shown, firstly, the pivot element set skip list set_element_V, which is found each time the pivot element is selected, is updated. The first and last addresses of the pivot element skip list set_element_V are retrieved from the pivot_element_head and pivot_element_rear addresses of the pivot element set skip list.
[0154] Next, the skip list set_element_V and the current optimal pivot number optimal_p are sent to the skip list data addition module. The optimal pivot number value optimal_p is added to the skip list set_element_V. The calculation set_element_V∪{optimal_p} is performed, that is, set_element_V←insert_skip_list[set_element_V,optimal_p].
[0155] Next, the pivot element skip list E is retrieved from the head address (element_set_head) and tail address (element_set_rear) of the node element skip list pointed to by the current optimal pivot variable (optimal_p). optimal_p The first and last addresses of the pivot element. Simultaneously, update the pivot element skip list set_element_V and pivot element skip list E. optimal_p The data is sent to the skip list difference calculation module to calculate set_element_V\E. optimal_p The pivot element skip list E optimal_p Remove from set_element_V, and save the calculation result to set_element_V, that is, execute set_element_V←difference_skip_list[set_element_V,E optimal_p ].
[0156] Next, update the set register set_V of variable nodes that have not yet been searched, and mark the current optimal principal number optimal_p as deleted in set_V, that is, set_V[optimal_p]←-1.
[0157] Then, the skip list A of the node variable pointed to by the current optimal principal variable optimal_p is... optimal_p and node element skip list E optimal_pLet A be an empty set. optimal_p ←Φ, E optimal_p ←Φ.
[0158] Finally, update the current Jacobian matrix node number counter `count_node_id`. This is done by starting the dominant variable skip list `principle_I` pointed to by the current optimal principal number `optimal_p`. optimal_p The data count register `principle_set_num` will contain the number of data items in the skip list pointed to by the current optimal pivot number `optimal_p` | `principle_I`. optimal_p Save the data to `principle_num_p`, where `principle_num_p` ← `principle_set_num[optimal_p]`. Next, update `count_node_id`, which is `count_node_id` ← `count_node_id` + `principle_num_p`.
[0159] It is easy to see that by prioritizing the selection of the variable with the smallest metric value as the optimal principal component and utilizing the update calculation of the skip list, combined with the detection and merging of hypervariables, this invention can quickly calculate the optimal column sorting vector of the Jacobian matrix, so that the number of non-zero element fillings generated during the decomposition of the Jacobian matrix after the optimal column sorting is minimized, which significantly improves the computational efficiency and resource utilization of FPGA matrix decomposition and accelerates the effectiveness of power flow calculation.
[0160] The second embodiment of the present invention relates to an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the FPGA Jacobi matrix structure reordering method of the first embodiment.
[0161] The third embodiment of the present invention relates to a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the FPGA Jacobi matrix structure reordering method of the first embodiment.
[0162] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0163] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0164] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction methods implemented in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0165] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0166] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for reordering Jacobian matrix structures in FPGAs, characterized in that, Includes the following steps: Select the node with the smallest metric value from the unprocessed nodes in the Jacobian matrix used for power flow calculation as the optimal principal element, and calculate the optimal principal element variable skip list; For all variables in the current optimal pivot variable skip list, the node variable skip list update calculation, the node element skip list update calculation, and the node metric value update calculation are performed sequentially. The pivot elimination process of the Jacobian matrix used in the power flow calculation classifies node types into variable nodes and element nodes according to the node elimination order. Variable nodes represent nodes that have not yet been eliminated, and element nodes represent nodes that have been eliminated after selecting the current pivot. The node variable skip list represents the set of all variables adjacent to variable i, and the node element skip list represents the set of all elements adjacent to variable i. The detection and updating of node hypervariables are performed based on all variables in the current optimal principal variable skip list; where node hypervariables refer to the set of multiple node variables that satisfy the indistinguishability condition during the Jacobian matrix elimination process. The current optimal principal element is removed from the unprocessed nodes, and the node with the smallest metric value is selected from the unprocessed nodes in the Jacobian matrix used for power flow calculation as the optimal principal element. This process is repeated until all nodes in the Jacobian matrix used for power flow calculation are covered, thus completing the structural reordering of the Jacobian matrix used for power flow calculation.
2. The FPGA Jacobian matrix structure reordering method according to claim 1, characterized in that, The calculation of the optimal pivot variable skip list specifically includes: Retrieve the corresponding node variable skip list from the head and tail addresses of the node variable skip list pointed to by the number of the optimal principal element; Retrieve the corresponding node element skip list from the header and tail addresses of the skip list pointed to by the number of the optimal principal element; By performing a bidirectional search, the union of the main variable skip lists pointed to by all elements in the node element skip lists is calculated to obtain the first merging result; Calculate the union of the node variable skip list and the first merge result to obtain the second merge result; The data in the skip list of the dominant variable set is deleted from the second merge result to obtain the optimal dominant variable skip list; The dominant variable set skip list is used to record the initial dominant relationship of each node.
3. The FPGA Jacobian matrix structure reordering method according to claim 1, characterized in that, The update calculation of the node variable skip list specifically includes: Retrieve the corresponding node variable skip list from the head address and tail address of the node variable skip list pointed to by the node variable in the optimal principal variable skip list; Remove the data from the optimal pivot variable skip list from the node variable skip list to obtain the pivot variable set skip list; Retrieve the corresponding dominant variable skip list from the header and tail addresses of the dominant variable skip list pointed to by the optimal principal variable; The data in the primary variable skip list is deleted from the primary variable set skip list to complete the update of the node variable skip list.
4. The FPGA Jacobian matrix structure reordering method according to claim 1, characterized in that, The update calculation of the skip list of node elements specifically includes: Retrieve the corresponding node element skip list from the head and tail addresses of the element skip list pointed to by the node variables in the optimal principal variable skip list; Retrieve the skip list of the pivot element from the header and tail addresses of the skip list of the node element pointed to by the optimal pivot variable; Delete the data from the main element skip list from the node element skip list to obtain a new node element skip list; The optimal principal variable is added to the new node element skip list to complete the update of the node element skip list.
5. The FPGA Jacobian matrix structure reordering method according to claim 1, characterized in that, The update of the node metric value is specifically as follows: calculate the remaining number of nodes, the corrected node metric value, and the approximate node metric value respectively, and take the minimum value among the remaining number of nodes, the corrected node metric value, and the approximate node metric value as the updated node metric value. The node correction metric is calculated in the following way: Retrieve the corresponding dominant variable skip list from the head and tail addresses of the dominant variable skip list pointed to by the node variables in the optimal dominant variable skip list; Delete the data from the optimal principal variable skip list to obtain a new optimal principal variable skip list; Calculate the number of data in the new optimal principal variable skip list; Add the number of data in the new optimal principal variable skip list to the metric value of the optimal principal to obtain the node correction metric value; The approximate metric value of the node is calculated in the following way: Retrieve the corresponding node variable skip list from the head address and tail address of the node variable skip list pointed to by the node variable in the optimal principal variable skip list; Delete the data from the dominant variable skip list to obtain a new node variable skip list, and calculate the number of data in the new node variable skip list; Delete the data from the dominant variable skip list to obtain a new optimal pivot variable skip list, and calculate the number of data in the new optimal pivot variable skip list; Retrieve the corresponding node element skip list from the head and tail addresses of the node element skip list pointed to by the node variables in the optimal principal variable skip list; The optimal principal element number value is deleted from the node element skip list to obtain a new node element skip list; Calculate the node metric correction accumulation value based on the new node element skip list; The number of data in the new node variable skip list, the number of data in the new optimal principal variable skip list, and the node metric correction accumulation value are summed to obtain the node approximate metric value; The step of calculating the node metric correction accumulation value based on the new node element skip list specifically includes: A bidirectional search is used to find the metric correction value of the current node variable number from the new node element skip list; If the measurement correction value of the current node variable number is less than zero, the corresponding node variable skip table is retrieved from the head address and tail address of the node variable skip table pointed to by the current node variable number, and the number of data in the skip table pointed to by the current node variable number is taken as the new measurement correction value from the data count register of the node variable skip table. If the measurement correction value of the current node variable number is not less than zero, the measurement correction value of the current node variable number is added to the number of data in the dominant variable skip list to obtain a new measurement correction value; All new metric correction values are summed to obtain the node metric correction cumulative value.
6. The FPGA Jacobian matrix structure reordering method according to claim 1, characterized in that, The process of detecting and updating node hypervariables based on all variables in the current optimal principal variable skip list specifically includes: The hash value is calculated by performing a node hash function on the variables in the current optimal main variable skip list, and the current variable is added to the hash chain list pointed to by the variable. The length of the hash list corresponding to the variable is retrieved from the data count register of the hash list. When multiple variables with the same hash value in the hash list conflict, all variables in the single linked list formed by the hash value are judged. When there are indistinguishable variables, super variables are merged.
7. The FPGA Jacobian matrix structure reordering method according to claim 6, characterized in that, The step of calculating the hash value by performing a node hash function on the variables in the current optimal main variable skip list specifically includes: Retrieve the corresponding node variable skip list from the head address and tail address of the node variable skip list pointed to by the node variable in the optimal principal variable skip list; Retrieve the corresponding node element skip list from the head and tail addresses of the node element skip list pointed to by the node variables in the optimal principal variable skip list; A bidirectional search is used to retrieve the header and tail node variable values of the underlying data field of the node variable skip list, as well as the header and tail node element values of the underlying data field of the node element skip list, from the node variable skip list and the node element skip list, respectively. The first accumulated value is obtained by summing all the variable values of the header node and the variable values of the tail node; the second accumulated value is obtained by summing all the element values of the header node and the element values of the tail node. The first and second accumulated values are added together, and then a modulo operation is performed to obtain the hash value.
8. The FPGA Jacobian matrix structure reordering method according to claim 6, characterized in that, The determination of all variables in the singly linked list formed by the hash value specifically includes: Retrieve the corresponding first node variable skip list and second node variable skip list from the head address and tail address of the skip list pointed to by the first variable and second variable in the singly linked list, respectively. Retrieve the corresponding first node element skip list and second node element skip list from the head address and tail address of the skip list pointed to by the first variable and the second variable in the singly linked list, respectively. Calculate the union of the first node variable skip list and the first node element skip list to obtain the first union skip list; Calculate the union of the second node variable skip list and the second node element skip list to obtain the second union skip list; Add the first variable to the first union skip list, and add the second variable to the second union skip list. If the first union skip list after adding the first variable is exactly the same as the second union skip list after adding the second variable, then it means that the first variable and the second variable are indistinguishable.
9. The FPGA Jacobian matrix structure reordering method according to claim 6, characterized in that, When indistinguishable variables exist, the process of merging supervariables specifically includes: When the first variable and the second variable in the singly linked list are indistinguishable variables, the first dominant variable skip list is retrieved from the head address and tail address of the dominant variable skip list pointed to by the first variable, and the second dominant variable skip list is retrieved from the head address and tail address of the dominant variable skip list pointed to by the second variable. The first dominant variable skip list is merged with the second dominant variable skip list to obtain a new first dominant variable skip list; Retrieve the number of data items in the skip list pointed to by the second dominant variable from the data count register of the second dominant variable skip list; Subtract the number of data items in the skip list pointed to by the second variable from the measure value of the first variable to obtain the new measure value of the first variable; Delete the second variable number from the unprocessed node, and set the skip list of the node variable and the skip list of the node element pointed to by the second variable to an empty set.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the FPGA Jacobian matrix structure reordering method as described in any one of claims 1-9.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the FPGA Jacobian matrix structure reordering method as described in any one of claims 1-9.