An FPGA power flow Jacobian matrix bidirectional skip list incremental calculation method
By using the FPGA-based bidirectional jump table incremental calculation method for the Jacobi matrix power flow, the non-zero element structure of the Jacobi matrix is dynamically managed, solving the problem of low calculation efficiency of the Jacobi matrix and realizing fast response and efficient power flow calculation under power grid topology changes.
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-26
- Publication Date
- 2026-06-09
Smart Images

Figure CN121723010B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system power flow calculation technology, and in particular to an incremental calculation method for a bidirectional skip table of an FPGA power flow Jacobian matrix. 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. This scheme uses the Newton-Raphson method to solve power flow problems. When calculating the matrix decomposition of sparse power flow equations, it employs the traditional matrix LU decomposition method. Since the Jacobian matrix has not undergone structural optimization, direct LU decomposition is inefficient and slow, reducing the overall efficiency of power flow calculation. Furthermore, when the network node size n is large, the dimension of the Jacobian matrix is O(n^2). 2 Since the Jacobian matrix formed by solving the system of equations in each iteration involves a large number of matrix operations, it consumes a lot of storage and computing resources, posing a great challenge to both computing power and storage resources. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide an incremental calculation method for the bidirectional skip list of the Jacobian matrix in FPGA power flow, which can improve the calculation efficiency of the Jacobian matrix.
[0005] The technical solution adopted by this invention to solve its technical problem is: to provide an incremental calculation method for a bidirectional skip list of the FPGA power flow Jacobian matrix, comprising the following steps:
[0006] Design a skip list for the non-zero element structure of a Jacobian matrix, which is used to manage the non-zero element structure of a Jacobian matrix.
[0007] Read the binary power grid branch data sequence, and use a shift register to concatenate the read binary power grid branch data sequence to obtain the binary power grid branch data;
[0008] The non-zero element structure of the Jacobian matrix is dynamically incrementally calculated based on the binary power grid branch data and the skip list of the non-zero element structure of the Jacobian matrix.
[0009] The skip list of non-zero elements of the Jacobian matrix includes:
[0010] The original row pattern skip list is used to record the distribution of non-zero rows in the original Jacobian matrix;
[0011] The skip list for the upper limit of non-zero elements in the pivot row is used to record the upper limit of non-zero elements in the k-th pivot row;
[0012] The column pattern skip list is used to record the original row patterns and pivot row pattern indices contained in the matrix columns.
[0013] The process of using a shift register to concatenate the read binary power grid branch data sequence to obtain binary power grid branch data is as follows:
[0014] The received one-byte valid branch data sequence from the serial port is saved to the lower eight bits of the data register. Subsequently, whenever the serial port outputs a valid data signal, the data in the data register is first shifted one byte to the higher bit, and then the one-byte valid branch data sequence from the serial port is saved to the lower eight bits of the data register, until a complete binary power grid branch data is received. At the same time, the data is saved to the branch start point number register or the branch end point number register according to the type of the binary power grid branch data.
[0015] The step of dynamically incrementally calculating the non-zero element structure of the Jacobian matrix based on the binary power grid branch data and the skip list of the non-zero element structure of the Jacobian matrix specifically includes:
[0016] When there is no voltage control node in the system, for the original row-mode jump list and the pivot row non-zero element upper limit jump list, calculate the 2×2 sub-matrix block in the Jacobian matrix in the order of diagonal matrix block, upper triangular row, and lower triangular column, and add coordinate values to the original row-mode jump list and the pivot row non-zero element upper limit jump list; for the column-mode jump list, calculate the 2×2 sub-matrix block in the Jacobian matrix in the order of diagonal matrix block, lower triangular column, and upper triangular row, and add coordinate values to the column-mode jump list.
[0017] When there are voltage control nodes in the system, for the original row-mode skip list and the upper limit skip list of the non-zero element of the principal row, the 2×2 sub-matrix block in the Jacobian matrix is calculated in the order of diagonal matrix block, upper triangular row, and lower triangular column; for the column-mode skip list, the 2×2 sub-matrix block in the Jacobian matrix is calculated in the order of diagonal matrix block, lower triangular column, and upper triangular row; wherein, all column coordinates of the upper triangular row are added to the non-zero element structure skip list of the Jacobian matrix; if the current branch starting point number is less than or equal to the number of load nodes, all row coordinates of the lower triangular column are added to the non-zero element structure skip list of the Jacobian matrix; if the current branch starting point number is greater than the number of load nodes, only the row coordinates of the first row in the 2×2 sub-matrix block are added.
[0018] When there is no voltage control node in the system, adding data to the original row mode jump table or to the non-zero upper limit jump table of the main row specifically includes:
[0019] Save the tail address of the original row mode skip list or the non-zero element upper limit skip list corresponding to the Jacobian matrix row coordinate value 2from_bus-1 to the tail address register of the original row mode skip list or the tail address register of the non-zero element upper limit skip list of the main element. Add new non-zero element structure data to the tail of the current original row mode skip list or the non-zero element upper limit skip list of the main element. Add the Jacobian matrix column number value 2to_bus-1 to the position pointed to by the current data pointer in the original row mode skip list or the non-zero element upper limit skip list of the main element. Add the data to be inserted to the end of the original row mode skip list or the non-zero element upper limit skip list of the main element. At the bottom layer, complete the upper triangular part writing; save the tail address of the original row mode skip list or the non-zero element upper limit skip list of the pivot row corresponding to the Jacobian matrix column coordinate values 2to_bus-1 and 2to_bus to the tail address register of the original row mode skip list or the tail address register of the non-zero element upper limit skip list of the pivot row, add the corresponding Jacobian matrix row coordinate values 2from_bus-1 and 2from_bus to the original row mode skip list or the non-zero element upper limit skip list of the pivot row, and add the data to be inserted to the bottom layer of the original row mode skip list or the non-zero element upper limit skip list of the pivot row, thus completing the lower triangular part writing;
[0020] When a voltage control node in the system adds data to the original row mode jump table or the main row non-zero element upper limit jump table, the specific steps include:
[0021] When the branch start point number is less than or equal to the number of load nodes, the original row mode jump table or the tail address of the non-zero element upper limit jump table corresponding to the Jacobian matrix row coordinate values 2from_bus-1 and 2from_bus are saved to the tail address register of the original row mode jump table or the tail address register of the non-zero element upper limit jump table of the main element row. All node column numbers 2to_bus-1 and 2to_bus after the branch start point number are added to the original row mode jump table or the non-zero element upper limit jump table of the main element row. The data to be inserted is added to the bottom layer of the original row mode jump table or the non-zero element upper limit jump table of the main element row, thus completing the writing of the upper triangular part.
[0022] When the branch start point number is greater than the number of load nodes, save the tail address of the original row mode skip list or the main row non-zero element upper limit skip list corresponding to the Jacobian matrix row coordinate value 2from_bus-1 to the tail address register of the original row mode skip list or the tail address register of the main row non-zero element upper limit skip list. Add all node column number values 2to_bus-1 and 2to_bus after the branch start point number to the original row mode skip list or the main row non-zero element upper limit skip list. Add the data to be inserted to the bottom layer of the original row mode skip list or the main row non-zero element upper limit skip list, and complete the upper triangular part writing.
[0023] When the branch endpoint number is less than or equal to the number of load nodes, save the tail address of the original row mode jump table or the main row non-zero element upper limit jump table corresponding to the Jacobi matrix column coordinate values 2to_bus-1 and 2to_bus to the tail address register of the original row mode jump table or the tail address register of the main row non-zero element upper limit jump table, add the Jacobi row coordinate values 2from_bus-1 and 2from_bus to the original row mode jump table or the main row non-zero element upper limit jump table, and add the data to be inserted to the bottom layer of the original row mode jump table or the main row non-zero element upper limit jump table, thus completing the writing of the lower triangular part;
[0024] When the branch endpoint number is greater than the number of load nodes, the original row mode skip list or the tail address of the non-zero element upper limit skip list of the main element row corresponding to the Jacobi matrix column coordinate value 2to_bus-1 and 2to_bus is saved to the tail address register of the original row mode skip list or the tail address register of the non-zero element upper limit skip list of the main element row. The row coordinate value 2from_bus-1 of the first row of the Jacobi submatrix is added to the original row mode skip list or the non-zero element upper limit skip list of the main element row. The data to be inserted is added to the bottom layer of the original row mode skip list or the non-zero element upper limit skip list of the main element row, thus completing the writing of the lower triangular part.
[0025] Where, from_bus is the branch start point number, to_bus is the branch end point number, 2from_bus means twice the number of from_bus, and 2to_bus means twice the number of to_bus.
[0026] When adding the data to be inserted to the bottom layer of the original row-mode skip list or the non-zero upper bound skip list of the main element row, the following steps are executed synchronously:
[0027] Generate random numbers. If the generated random number is less than the probability of index creation, build a higher-level index for the current data. Continue building the higher-level index until the generated random number is greater than or equal to the probability of index creation, or exceeds the maximum index level. The maximum index level is determined by... The calculation yielded that, For the maximum index level, Establish probabilities for the index. This represents the total number of skip list data calculated from the non-zero element structure of the current Jacobian matrix.
[0028] When there is no voltage control node in the system, adding data to the column-mode skip list specifically includes:
[0029] Save the column mode skip list tail addresses corresponding to the Jacobian matrix column coordinate values 2to_bus-1 and 2to_bus to the column mode skip list tail address register. Set the attribute register of the column mode skip list data field to a preset value to indicate that the data type is all data in the original row mode skip list. Add the corresponding Jacobian matrix row coordinate values 2from_bus-1 and 2from_bus to the column mode skip list. Add the data to be inserted to the bottom layer of the column mode skip list to complete the lower triangular part writing. Save the column mode skip list tail addresses corresponding to the Jacobian matrix column coordinate values 2from_bus-1 and 2from_bus to the column mode skip list tail address register. Set the attribute register of the column mode skip list data field to a preset value to indicate that the data type is all data in the original row mode skip list. Add the corresponding Jacobian matrix column coordinate values 2to_bus-1 and 2to_bus to the column mode skip list. Add the data to be inserted to the bottom layer of the column mode skip list to complete the upper triangular part writing.
[0030] When a voltage control node is present in the system, adding data to the column-mode skip list specifically includes:
[0031] When the branch end number is less than or equal to the number of load nodes, the column mode jump table tail address corresponding to the Jacobi matrix column coordinate values 2to_bus-1 and 2to_bus is saved to the column mode jump table tail address register, the Jacobi row coordinate values 2from_bus-1 and 2from_bus are added to the column mode jump table, and the data to be inserted is added to the bottom layer of the column mode jump table, thus completing the writing of the lower triangular part.
[0032] When the branch endpoint number is greater than the number of load nodes, the column mode jump table tail address corresponding to the Jacobi matrix column coordinate value 2to_bus-1 and 2to_bus is saved to the column mode jump table tail address register, the row coordinate value 2from_bus-1 of the first row of the Jacobi submatrix is added to the column mode jump table, and the data to be inserted is added to the bottom layer of the original row mode jump table or the upper limit jump table of the non-zero element of the main element row, thus completing the writing of the lower triangular part;
[0033] When the branch start point number is less than or equal to the number of load nodes, the column mode jump table tail address corresponding to the Jacobian matrix row coordinate values 2from_bus-1 and 2from_bus is saved to the column mode jump table tail address register, all node column number values 2to_bus-1 and 2to_bus after the branch start point number are added to the column mode jump table, and the data to be inserted is added to the bottom layer of the column mode jump table, thus completing the writing of the upper triangular part;
[0034] When the branch starting point number is greater than the number of load nodes, the column mode jump table tail address corresponding to the row coordinate value 2from_bus-1 and 2from_bus of the Jacobi matrix is saved to the column mode jump table tail address register, the first column coordinate value 2to_bus-1 of the Jacobi submatrix is added to the column mode jump table, and the data to be inserted is added to the bottom layer of the column mode jump table, thus completing the writing of the upper triangular part.
[0035] Where, from_bus is the branch start point number, to_bus is the branch end point number, 2from_bus means twice the number of from_bus, and 2to_bus means twice the number of to_bus.
[0036] The technical solution adopted by this invention to solve its technical problem is: to provide an FPGA power flow Jacobian matrix bidirectional skip list incremental calculation device, comprising:
[0037] The design module is used to design a skip list for the non-zero element structure of the Jacobian matrix, which is used to manage the non-zero element structure of the Jacobian matrix.
[0038] The read splicing module is used to read the binary power grid branch data sequence and use a shift register to splice the read binary power grid branch data sequence to obtain the binary power grid branch data.
[0039] The calculation module is used to dynamically and incrementally calculate the non-zero element structure of the Jacobian matrix based on the binary power grid branch data and the skip list of the non-zero element structure of the Jacobian matrix.
[0040] 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 power flow Jacobi matrix bidirectional skip list incremental calculation method.
[0041] 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 when the computer program is executed by a processor, the steps of the above-mentioned FPGA power flow Jacobi matrix bidirectional skip list incremental calculation method are implemented.
[0042] Beneficial effects
[0043] By adopting the above-mentioned technical solution, this invention has the following advantages and positive effects compared with the prior art: This invention can rely on the dynamic management capability of the Jacobi matrix non-zero element structure jump table to perform incremental updates only on the non-zero element structure corresponding to the changed branch, while the remaining unchanged parts directly reuse the structural information stored in the original jump table. This solves the core problem of incremental calculation of the power flow Jacobi matrix, enabling the power grid to quickly respond to the Jacobi matrix update problem caused by topology changes during real-time operation, thereby improving the efficiency of power flow calculation. Attached Figure Description
[0044] Figure 1 This is a flowchart of the FPGA power flow Jacobian matrix bidirectional skip list incremental calculation method according to the first embodiment of the present invention;
[0045] Figure 2 This is a diagram showing the mapping relationship between branch node data and Jacobian matrix coordinates in the first embodiment of the present invention;
[0046] Figure 3 This is a schematic diagram of the correspondence between Jacobian coordinates and the order of writing in the skip list in the first embodiment of the present invention;
[0047] Figure 4 This is a schematic diagram showing the correspondence between the Jacobian coordinates of PQ nodes and the writing order in the skip list in the first embodiment of the present invention.
[0048] Figure 5This is a schematic diagram of the relationship between the Jacobian coordinates of PV nodes and the writing order in the skip list in the first embodiment of the present invention. Detailed Implementation
[0049] 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.
[0050] The first embodiment of the present invention relates to a method for incremental calculation of bidirectional skip lists of FPGA power flow Jacobian matrix, such as... Figure 1 As shown, it includes the following steps:
[0051] Step 1: Design a skip list for the non-zero element structure of the Jacobian matrix. The skip list is used to manage the non-zero element structure of the Jacobian matrix.
[0052] The Jacobian matrix non-zero element skip list designed in this step includes three types of non-zero element skip lists: the original row pattern skip list A. i The non-zero row distribution of the original Jacobian matrix is recorded, denoted as `original_row_pattern`; the upper bound skip list R for non-zero elements of the pivot row is... i This is used to record the upper limit of non-zero elements in the k-th pivot row, that is, to record the maximum range of non-zero element positions that may be generated in the k-th step of LU decomposition due to the padding effect, denoted as pivot_row_pattern; and the column pattern skip list C. i This is used to record the original row pattern and pivot row pattern indices contained in the matrix columns, denoted as `jacoby_col_pattern`. For these three skip lists of non-zero element structures in the Jacobian matrix, this implementation also sets up three skip list head and tail pointer registers: original_row_pattern_head[0:2(n-1)-1] and original_row_pattern_rear[0:2(n-1)-1] for the original row pattern skip list, pivot_row_pattern_head[0:2(n-1)-1] and pivot_row_pattern_rear[0:2(n-1)-1] for the pivot row non-zero element upper limit skip list, and pivot_row_pattern_rear[0:2(n-1)-1] for the column pattern skip list, where n is the total number of system nodes.
[0053] Step 2: Read the binary power grid branch data sequence, and use a shift register to concatenate the read binary power grid branch data sequence to obtain the binary power grid branch data.
[0054] In this step, the format of the binary power grid branch data sequence branch_data[7:0] output by the FPGA serial port is defined as branch={frombus[31:0]、tobus[31:0]、impedance_R[31:0]、impedance_X[31:0]、susceptance_B[31:0]、tranf_ratio[31:0]}, which respectively represent the branch start number, branch end number, branch resistance, branch reactance, branch susceptance to ground, and transformer ratio. The FPGA serial port baud rate is 115200Bps, the clock frequency is 50MHz, and every 434×8 clock cycles, the serial port output data signal data_valid_sig=1 is valid, outputting a byte of valid branch data sequence bus_data. This byte of valid branch data sequence is saved to the lower eight bits of the data[31:0] register, i.e., data[7:0]←branch_data. Subsequently, whenever the serial port output data signal data_valid_sig=1 is valid, the data is first shifted one byte to the high-order bits: data←{data[23:0],8`b0}. Then, the sequence of valid branch data bytes is saved to the lower eight bits of the data register: data[7:0]←branch_data. Every 434×8×4 clock cycles, upon receiving a complete valid branch data, branch_data_valid←1 is synchronously pulled high. data_type indicates the data type of the branch data read. When data_type=1 and 2, the valid branch data is saved to the branch start point number from_bus and the branch end point number to_bus registers, respectively. The data_type branch type counter is reset every 434×8×4×6 clock cycles.
[0055] Step 3: Calculate the non-zero element structure of the Jacobian matrix based on the binary power grid branch data and the dynamic incremental calculation of the Jacobian matrix non-zero element structure jump table.
[0056] Figure 2 To establish the mapping relationship between branch node data and Jacobian matrix coordinates, the non-zero row pattern of the Jacobian matrix is dynamically and incrementally calculated based on the branch node data. When the system has n nodes, the dimension of the Jacobian matrix is 2(n-1). The branch node pairs (from_bus, to_bus) read from the serial port are mapped to the row and column coordinates (jacoby_coordinate) of the submatrix S above the main diagonal of the Jacobian matrix. With a dimension of 2×2, it can be represented as:
[0057] ;
[0058] At the same time, transpose the branch node pairs (from_bus, to_bus). T Mapped to the submatrix below the main diagonal in the Jacobian matrix The row and column coordinates of the submatrix, jacoby_coordinate. With a dimension of 2×2, it can be represented as:
[0059] ;
[0060] Here, 2from_bus represents twice the number of from_bus, and 2to_bus represents twice the number of to_bus.
[0061] In the above branch data node pairs, the branch start number from_bus < the branch end number to_bus. Depending on whether the system includes voltage control nodes (i.e., PV nodes), there are two cases:
[0062] (1) If the number of PV nodes is zero, that is, when PV_num=0, all nodes are load nodes (i.e. PQ nodes). The Jacobian matrix has a symmetrical non-zero element structure. The 2×2 sub-matrix blocks in the Jacobian matrix are calculated in the order of diagonal matrix block → upper (lower) triangular row (column) → lower (upper) triangular column (row) and the coordinate values are added to the skip list, that is, {first pivot element of diagonal → first row (column) of upper (lower) triangular → first column (row) of lower (upper) triangular} → {second pivot element of diagonal → second row (column) of upper (lower) triangular → second column (row) of lower (upper) triangular} →… → {n-1th pivot element of diagonal → n-1th row (column) of upper (lower) triangular → n-1th column (row) of lower (upper) triangular}. The order in which the upper and lower triangles are added depends on the skip list type. For the pivot_row_pattern (a non-zero element upper bound skip list for pivot rows) and the original_row_pattern (a skip list for original row patterns), the upper triangle is added first, followed by the lower triangle. For the jacoby_col_pattern (a skip list for column patterns), the lower triangle is added first, followed by the upper triangle. For each starting node from_bus_i, the corresponding header addresses of the two pivot rows' non-zero element upper bound skip lists are 2from_bus-1 and 2from_bus, respectively. Simultaneously, the corresponding header addresses of the two Jacobian matrix's non-zero element column pattern skip lists are 2to_bus-1 and 2to_bus, respectively.
[0063] Figure 3To ensure the coordinate correspondence and writing order when saving the Jacobian matrix coordinates `jacoby_coordinate` to the header address unit of the corresponding skip list, for branch node pairs (from_bus_i, to_bus_j), the coordinates are written to the pivot_row_pattern_head (R) register, which is the upper limit of the non-zero element skip list header address register. i ) and the original row pattern skip list header address register original_row_pattern_head(A i When writing the header pointer address at the corresponding position [2from_bus-1, 2from_bus], it is also necessary to simultaneously write the address at the position [2to_bus-1, 2to_bus] to ensure that the lower triangular part of the corresponding row of the Jacobian matrix is valid. At the same time, when writing to the column mode skip list header address register col_pattern_head(C... i When writing the header pointer address at the corresponding position [2to_bus-1, 2to_bus], it is also necessary to write the address at the position [2from_bus-1, 2from_bus] simultaneously to ensure that the upper triangular part of the corresponding column of the Jacobian matrix is valid.
[0064] When adding the current non-zero element structure data of the Jacobian matrix to the corresponding skip list, according to the transpose correspondence of the coordinate values of the upper and lower triangular parts in the Jacobian matrix, the address of the first element stored in the corresponding skip list is first retrieved from the header address index register of the corresponding Jacobian coordinate address unit, and then the corresponding coordinate value is added to the end of the skip list. At the same time, an upper-level index is built for the added data according to probability.
[0065] Figure 4 This diagram illustrates the correspondence and writing order of saving Jacobian coordinates of only PQ nodes to skip lists. The process of adding the row and column coordinate values of a 2×2 Jacobian submatrix to a skip list consists of two parts: 1) adding the pivot_row_pattern (a skip list with non-zero elements in the pivot row) and the original row pattern skip list original_row_pattern, with the addition order being {diagonal pivot → upper triangular row → lower triangular column}; 2) adding the column pattern skip list yacoby_col_pattern, with the addition order being {diagonal pivot → lower triangular column → upper triangular row}.
[0066] The specific steps for this process are as follows:
[0067] For the Jacobian matrix 2from_bus-1 and 2from_bus rows, the corresponding pivot row non-zero element upper bound skip list pivot_row_pattern is R. 2from_bus-1 and R 2from_bus The original row pattern skip list `original_row_pattern` is A.2from_bus-1 and A 2from_bus First, add all column node numbers [2to_bus-1, 2to_bus] corresponding to the row [2from_bus-1, 2from_bus] to the skip list R of the main row pattern. 2from_bus-1 and R 2from_bus And the original row pattern skip list A 2from_bus-1 and A 2from_bus At the end. Also, whenever a pair of column coordinate values 2to_bus-1 and 2to_bus are added, the corresponding pivot row non-zero element upper bound skip list pivot_row_pattern is recorded as R. 2to_bus-1 and R 2to_bus The original row pattern skip list `original_row_pattern` is A. 2to_bus-1 and A 2to_bus Then, the row number [2from_bus-1, 2from_bus] corresponding to this coordinate is added separately to the non-zero upper bound skip list R of the main row. 2to_bus-1 and R 2to_bus And the original row pattern skip list A 2to_bus-1 and A 2to_bus The end of.
[0068] For the Jacobian matrix 2to_bus-1 and 2to_bus columns, the corresponding column pattern skip list yacoby_col_pattern is C. 2to_bus-1 and C 2to_bus First, add all row node numbers [2from_bus-1,2from_bus] corresponding to column [2to_bus-1,2to_bus] to the pattern skip list C for that column. 2to_bus-1 and C 2to_bus Simultaneously, each time a pair of row coordinate values 2from_bus-1 and 2from_bus are added, the corresponding column pattern skip list C is recorded. 2from_bus-1 and C 2from_bus Then, the column number [2to_bus-1, 2to_bus] corresponding to that coordinate is added separately to the column pattern skip list C. 2from_bus-1 and C 2from_bus The end of.
[0069] (2) If the number of PV nodes is not zero, i.e., PV_num≠0, let the number of PQ nodes be m, i.e., PQ_num=m, and the number of PV nodes be nm-1. The Jacobian matrix does not have a symmetric non-zero element structure. In this case, the 2×2 sub-matrix blocks in the Jacobian matrix are calculated in the order of {diagonal matrix block → upper (lower) triangular row (column) → lower (upper) triangular column (row)}, i.e., {first pivot element on the diagonal → first row (column) of the upper (lower) triangular → first column (row) of the lower (upper) triangular} → {second pivot element on the diagonal → second row (column) of the upper (lower) triangular → second column (row) of the lower (upper) triangular} →… → {n-1th pivot element on the diagonal → n-1th row (column) of the upper (lower) triangular → n-1th column (row) of the lower (upper) triangular}. The order of adding the upper and lower triangular elements is related to the skip list type. However, when adding the Jacobian matrix coordinate values to the corresponding skip list for branch node pairs (from_bus_i, to_bus_j), two cases need to be considered depending on the current node type. Figure 5 When PV nodes are included, the Jacobian matrix coordinates (jacoby_coordinate) are stored in the skip list, along with the coordinate correspondence and writing order.
[0070] The process of adding the row and column coordinates of a Jacobi 2×2 submatrix to a skip list consists of two parts: 1) Adding the pivot_row_pattern (a skip list with non-zero elements in the pivot row) and the original_row_pattern (a skip list with the original row pattern), in the order of {diagonal pivot → upper triangular row → lower triangular column}; 2) Adding the yacoby_col_pattern (a skip list with the original column pattern), in the order of {diagonal pivot → lower triangular column → upper triangular row}. In both cases, all column coordinates [2to_bus-1, 2to_bus] of the upper triangular row are added to the skip list. If the starting point from_bus number of the current branch is less than or equal to the number of PQ nodes, all row coordinates [2from_bus-1, 2from_bus] of the lower triangular column are added; otherwise, only the row coordinates of 2from_bus-1 are added.
[0071] In specific implementation, for rows 2from_bus-1 and 2from_bus of the Jacobian matrix, the corresponding pivot row non-zero element upper bound skip list pivot_row_pattern is R. 2from_bus-1 and R 2from_bus The original row pattern skip list `original_row_pattern` is A. 2from_bus-1 and A 2from_bus First, add all column node numbers [2to_bus-1, 2to_bus] of the row corresponding to [2from_bus-1, 2from_bus] to the non-zero upper bound skip list R of that main row. 2from_bus-1 and R2from_bus And the original row pattern skip list A 2from_bus-1 and A 2from_bus At the end. Also, whenever a pair of column coordinate values 2to_bus-1 and 2to_bus are added, the corresponding pivot row non-zero element upper bound skip list pivot_row_pattern is recorded as R. 2to_bus-1 and R 2to_bus The original row pattern skip list `original_row_pattern` is A. 2to_bus-1 and A 2to_bus There are two cases depending on the node type: 1) If the starting point of the current branch from_bus number is less than or equal to the number of nodes PQ_num, then the row number [2from_bus-1, 2from_bus] corresponding to that coordinate is added separately to the non-zero upper limit skip list R of the main row. 2to_bus-1 and R 2to_bus And the original row pattern skip list A 2to_bus-1 and A 2to_bus 1) At the end; 2) If the starting point of the current branch from_bus number > the number of PQ nodes PQ_num, add the row number 2from_bus-1 corresponding to this coordinate to the non-zero upper limit skip list R of the main row. 2to_bus-1 And the original row pattern skip list A 2to_bus-1 The end of.
[0072] For the Jacobian matrix 2to_bus-1 and 2to_bus columns, the corresponding column pattern skip list yacoby_col_pattern is C. 2to_bus-1 and C 2to_bus There are two cases depending on the node type: 1) If the starting point of the current branch from_bus number is less than or equal to the number of PQ nodes PQ_num, first add all row node numbers [2from_bus-1, 2from_bus] in the corresponding column of [2to_bus-1, 2to_bus] to the pattern skip list C of that column. 2to_bus-1 and C 2to_bus Simultaneously, each time a pair of row coordinate values 2from_bus-1 and 2from_bus are added, the corresponding column pattern skip list C is recorded. 2from_bus-1 and C 2from_bus Then, the column number [2to_bus-1, 2to_bus] corresponding to that coordinate is added separately to the column pattern skip list C. 2from_bus-1 and C 2from_bus 1) At the end; 2) If the starting point of the current branch from_bus number > the number of PQ nodes PQ_num, first add all the row node numbers 2from_bus-1 in the corresponding column of [2to_bus-1, 2to_bus] to the pattern skip list C of that column. 2to_bus-1 and C2to_bus Simultaneously, for each pair of row coordinate values 2from_bus-1 added, the corresponding column pattern skip list C is recorded. 2from_bus-1 Then, the column number 2to_bus-1 corresponding to that coordinate is added separately to the column pattern skip list C. 2from_bus- The end of.
[0073] In this implementation, the row-mode skip list calculation and column-mode skip list calculation can be divided into two sub-processes based on the number of PV nodes in the system.
[0074] During calculation, three pointers are set to the address indices of the skip lists currently containing data to be written: `current_original_row_ptr` for the original row mode skip list, `current_pivot_row_ptr` for the upper bound of the non-zero elements in the pivot row, and `current_col_ptr` for the column mode skip list. The definitions of the three types of skip lists for the Jacobian matrix are as follows:
[0075] The original row pattern skip list, denoted as A, is called `original_row_pattern`. i A is defined as the non-zero element structure in the original Jacobian matrix J. i =struct(J i* ) denotes the non-zero row structure of the Jacobian matrix, where struct(J) = {(i,j)|J ij ≠0} represents the non-zero element structure of the original Jacobian matrix. The upper bound skip list of non-zero elements in the pivot row, denoted as R, is called `pivot_row_pattern`. k , ,in, This represents the non-zero pattern in the i-th row after row pivoting. The column pattern skip list is jacoby_col_pattern, denoted as C. j C j This indicates that the j-th column of the matrix contains the original row pattern A. i and principal row pattern R i The index number, initially, C j =struct(J *j This represents the non-zero column structure of the original Jacobian matrix. The row number attribute is determined by the pivot attribute identifier register pivot_attr. When pivot_attr=1, it indicates that the current C... j The row number index i in the table points to the upper bound of the non-zero element skip list R of the pivot row. i When pivot_attr=2, it indicates that the current C j The row number index i in the table points to the original row pattern skip list A. i .
[0076] Subprocess 1: If the number of PQ nodes num_PQ=n-1, the number of PV nodes num_PV=0;
[0077] When the serial port output data signal data_valid_sig=1 is valid, the Jacobian matrix skip list initialization signal initial_skip_list_sig←1 is set to be valid, and the serial port received from_bus and to_bus are mapped to the Jacobian matrix coordinates jacoby_coordinate.
[0078] (1) Add data to the non-zero row pattern bidirectional skip list original_row_pattern of the original Jacobian matrix. This process adds the non-zero row structure corresponding to the coordinate node pair (2from_bus-1, 2from_bus) to the original row pattern skip list original_row_pattern.
[0079] 1) Write the upper triangle part of the Jacobian.
[0080] First, the tail address of the original row pattern skip list corresponding to row coordinate 2from_bus-1 is saved to the original row pattern skip list tail address register original_row_rear_addr, i.e., original_row_rear_addr←origina_row_pattern_rear[2from_bus-1]. New non-zero element data is added to the tail of the current original row pattern table, and the column number value 2to_bus-1 of the current Jacobian coordinate is added to the position pointed to by the current_original_row_ptr pointer of the original row pattern skip list. Then, the underlying data addition process of the skip list is executed.
[0081] Skip list bottom-level data addition process: This process is responsible for adding the data to be inserted to the bottom layer of the skip list. Next, the original row pattern skip list data field is updated, saving the column coordinate value 2to_bus-1 to the original row pattern data register pointed to by the pointer to the currently inserted data in the original row pattern skip list, current_original_row_ptr, i.e., original_row_pattern_data[current_original_row_ptr]←2to_bus-1. The position of the currently inserted new data, current_original_row_ptr, is set to the index address of the next index after the current skip list tail data, i.e., original_row_pattern_next[original_row_rear_addr]←current_original_row_ptr. The predecessor pointer index of the currently inserted data is set to the tail data of the current skip list, i.e., original_row_pattern_prior[current_original_row_ptr]←original_row_rear_addr. The current row level register and the next-level (down) pointer index are initialized to 0 and null respectively, i.e., original_row_pattern_level[current_original_row_ptr]←0, original_row_pattern_down[current_original_row_ptr]←null. The current column coordinate value 2to_bus-1 is saved to the original row pattern skip list maximum value register corresponding to the current row coordinate 2from_bus-1, i.e., original_row_pattern_max [2from_bus-1]←2to_bus-1.
[0082] Save the upper index data address of the current skiplist tail data to the row pattern upper address register, i.e., row_pattern_up_addr ← row_pattern_up[original_row_rear_addr]. At the same time, save the number of upper index levels of the current tail data to the tail data level number register, i.e., rear_data_level_num ← row_pattern_level_height[original_row_rear_addr]. Record the address of the current newly inserted data to the next level address register of the next level index, i.e., next_level_addr ← current_row_ptr. Update the tail pointer of the bottom layer data so that the current newly inserted data address current_row_ptr points to the tail data 2to_bus - 1, i.e., original_row_pattern_rear[2to_bus - 1] ← current_row_ptr. Then, update the current data address to be inserted, i.e., current_row_ptr ← current_row_ptr + 1. In this way, the addition of data to the bottom layer of the skiplist is completed. Finally, execute the upper layer data index establishment process.
[0083] Upper layer data index establishment process: This process is responsible for determining whether to establish an upper index for the bottom layer data according to the index establishment probability index_P. When the generated random number random < index_P, loop to establish an upper index for the current data until random ≥ index_P or exceed the maximum index level max_level, and then terminate the upper index establishment process, where , is the total number of skiplist data calculated from the non-zero element structure of the current Jacobian matrix. Set the current index level current_level_num ← 1. When the random number random < the index establishment probability index_P and the upper index level current_level_num of the current data ≤ the maximum index level max_level, execute the following loop process:
[0084] According to the relationship between the upper index level current_level_num of the current newly added data and the level rear_data_level_num of the previous skiplist tail data, there are two cases.
[0085] (a) If the current_level_num of the upper-level index of the newly added data is less than or equal to the rear_data_level_num of the previous skip list tail data, the upper-level index of the newly added data can be directly matched and connected to the index of the corresponding level of the previous skip list tail data. Update the current upper-level data index level current_level_num ← current_level_num + 1, and save the column coordinate value 2to_bus - 1 to the original row pattern data register pointed to by the address of the newly inserted data, i.e., original_row_pattern_data[current_row_ptr] ← 2to_bus - 1. Set the `next` and `prior` pointers of the upper-level data index to `null` and the address of the corresponding upper-level index level in the previous skip list, `row_pattern_up_addr`, respectively. That is, `original_row_pattern_next[current_row_ptr] ← null`, `original_row_pattern_prior[current_row_ptr] ← row_pattern_up_addr`. Set the `next` index of the previous skip list's corresponding upper-level index level to the currently newly inserted level index data, that is, `original_row_pattern_next[row_pattern_up_addr] ← current_row_ptr`. Set the `down` index of the currently newly inserted upper-level index data to the address of the next level, `next_level_addr`, that is, `original_row_pattern_down[current_row_ptr] ← next_level_addr`. Set the `up` index of the next level index of this data to the address of the currently newly inserted data, that is, `original_row_pattern_up[next_level_addr] ← current_row_ptr`. Simultaneously, update the level of the current upper-level data index, i.e., original_row_pattern_level[current_row_ptr] ← current_level_num. The above process has established a connection between the newly created upper-level index of the current data and the upper-level index corresponding to the previous table tail data. Finally, move the upper-level index row_pattern_up_addr of the previous table tail data to the next higher level, i.e., row_pattern_up_addr ← row_pattern_up[row_pattern_up_addr].Record the address of the newly inserted data into the next_level_addr register of the next level index, i.e., next_level_addr←current_row_ptr, and update the address of the next data to be inserted, current_row_ptr←current_row_ptr+1.
[0086] (b) If the current_level_num of the upper-level index of the newly added data is greater than the previous level_data_level_num of the rear data in the skip list, then continue searching for a level before the rear data in the skip list that matches the data at the current_level_num of the newly added index and connect it. If a matching data is found, connect it; otherwise, take the index level of the newly added data as the maximum level in the skip list, correct the index level of the skip list header, and increase the level of the skip list header. The number of newly added levels in the header = the level of the newly added data at the rear data current_level_num - the original level of the header data. Connect the newly added index at the upper level of the header with the data at the corresponding level in the rear data. Then, execute the preceding index level lookup process.
[0087] After the above loop process is completed, the Jacobian column coordinate 2to_bus-1 value is added to the original row pattern skip list original_row_pattern, and the upper-level index is built synchronously. Finally, the head and tail pointer index addresses of the skip list are updated so that the head and tail indexes of the original row pattern skip list corresponding to the current Jacobian row coordinate 2from_bus-1 point to the left boundary new_left_addr and right boundary current_row_ptr of the latest skip list top-level data calculated in the previous index level lookup process, respectively. That is, original_row_pattern_head[2from_bus-1]←new_left_addr, original_row_pattern_rear[2from_bus-1]←current_row_ptr.
[0088] The preceding index level lookup process is responsible for calculating the index level of the preceding data of the highest index level row_pattern_up_addr of the current tail data. If the index of the current data can match the current level, the index level matching flag index_match_sig←1 is recorded. If index_match_sig=0, the index level of the current skip list header is corrected, the skip list header level is increased, and the high-level index of the newly added data is connected to the matching header index level.
[0089] Save the address of the index level preceding the current row_pattern_up_addr to prior_level_addr, where prior_level_addr ← row_pattern_prior[row_pattern_up_addr]. When the current index level address prior_level_addr ≠ null, execute the following loop:
[0090] Save the upper-level data index of the preceding data prior_level_addr to the preceding upper-level address register prior_upper_level_addr, that is, prior_upper_level_addr ← row_pattern_up[prior_level_addr]. When the upper-level index prior_upper_level_addr ≠ null, execute the following sub-process:
[0091] This sub-process is responsible for connecting the upper-level indices of all preceding data to the corresponding index level of the newly added data. First, it connects the data fields, updates the current upper-level data index level current_level_num ← current_level_num + 1, and saves the column coordinate value 2to_bus - 1 to the original row pattern data register pointed to by the address of the newly inserted data, i.e., original_row_pattern_data[current_row_ptr] ← 2to_bus - 1. Set the `next` and `prior` pointers of the upper-level data index to `null` and the address of the upper-level index matching the previous data, `prior_upper_level_addr`, respectively. That is, `original_row_pattern_next[current_row_ptr]←null`, `original_row_pattern_prior[current_row_ptr]←prior_upper_level_addr`. Set the `next` index of the upper-level index `prior_upper_level_addr` of the previous data to the upper-level index of the newly inserted data, that is, `original_row_pattern_next[prior_upper_level_addr]←current_row_ptr`. Set the `down` index of the newly inserted upper-level index data to the address of the next level of that data, `next_level_addr`, that is, `original_row_pattern_down[current_row_ptr]←next_level_addr`. Set the `up` index of the next level of that data to the address of the newly inserted data, that is, `original_row_pattern_up[next_level_addr]←current_row_ptr`. Update the level of the current upper-level data index, i.e., original_row_pattern_level[current_row_ptr] ← current_level_num.
[0092] Next, the pointer index is updated. The address of the upper-level index of the current tail data, `prior_upper_level_addr`, is recorded into the `row_pattern_up_addr` register, i.e., `row_pattern_up_addr←prior_upper_level_addr`. The upper-level index of the current tail data, `prior_upper_level_addr`, is then moved up one level, i.e., `prior_upper_level_addr←row_pattern_up[prior_upper_level_addr]`. The address of the newly inserted data is recorded into the next-level index's `next_level_addr` register, i.e., `next_level_addr←current_row_ptr`. The address of the next data to be inserted, `current_row_ptr←current_row_ptr+1`, is then updated.
[0093] The subprocess completed the matching and connection of all index-level data in the preceding data.
[0094] Next, the index of the previous level of the current tail data's upper-level index row_patter_up_addr is saved to prior_level_addr, that is, prior_level_addr ← row_pattern_prior [row_pattern_up_addr].
[0095] When the current index level address is null, the loop ends, indicating that the left boundary of the skip list index level has been found. The index level matching flag `index_match_sig` is set to ← 0. The upper-level index level of the left boundary is updated so that `new_left_addr` is the highest level of the current boundary index. The upper-level index `current_row_ptr` of the currently inserted data is set to point to the next index address of the highest level of the left boundary, i.e., `row_pattern_next[new_left_addr]←current_row_ptr`. The upper-level index address `new_left_addr` of the left boundary is set to point to the previous pointer of the upper-level index of the currently inserted data, i.e., `new_pattern_prior[current_row_ptr]←new_left_addr`.
[0096] The above process is now complete, which means that the Jacobian matrix column coordinate values 2to_bus-1 have been added to the original row pattern skip list original_row_pattern(A iThe process of establishing the upper-level data index is then implemented. Finally, the head pointer new_left_addr and tail pointer current_row_ptr of the original row pattern skip list corresponding to the Jacobian matrix row coordinate value 2from_bus-1 are updated, i.e., original_row_pattern_head[2from_bus-1]←new_left_addr, original_row_pattern_rear[2from_bus-1]←current_row_ptr.
[0097] 2) Write the lower triangular part of the Jacobian matrix.
[0098] The original row pattern skip list tail addresses corresponding to the Jacobian matrix column coordinate values 2to_bus-1 and 2to_bus are saved to the original row pattern skip list tail address registers original_row_rear_addr1 and original_row_rear_addr2, respectively, i.e., original_row_rear_addr1←origina_row_pattern_rear[2to_bus-1], original_row_rear_addr2←origina_row_pattern_rear[2to_bus]. Then, the corresponding Jacobian matrix row coordinate values 2from_bus-1 and 2from_bus are added to the original row pattern skip list, and an upper-level data index is established. The data addition process is the same as writing to the upper triangular part of the Jacobian matrix, and will not be described in detail here.
[0099] (2) Add data to the column pattern skip list jacoby_col_pattern.
[0100] 1) Write the lower triangle part of the Jacobian.
[0101] The column pattern skip list tail addresses corresponding to the Jacobian matrix column coordinate values 2to_bus-1 and 2to_bus are saved to the column pattern skip list tail address registers jacoby_col_rear_addr1 and jacoby_col_rear_addr2, respectively, i.e., jacoby_col_rear_addr1 ← jacoby_col_pattern_rear[2to_bus-1], jacoby_col_rear_addr2 ← jacoby_col_pattern_rear[2to_bus]. Initially, the attribute register attr of the column pattern skip list data field is set to 2, indicating that the data type is all the original row pattern skip list A. iThe data is then added to the column-mode skip list, with the corresponding Jacobian matrix row coordinates 2from_bus-1 and 2from_bus added to the column-mode skip list. A higher-level data index is then created. The process of adding data is the same as adding data to the upper triangular portion of the Jacobian matrix in the non-zero row-mode bidirectional skip list original_row_pattern of the original Jacobian matrix.
[0102] 2) Write the upper triangle part of the Jacobian.
[0103] The column mode skip list tail addresses corresponding to the row coordinate values 2from_bus-1 and 2from_bus of the Jacobian matrix are saved to the column mode skip list tail address registers jacoby_col_rear_addr1 and jacoby_col_rear_addr2, respectively, i.e., jacoby_col_rear_addr1 ← jacoby_col_pattern_rear[2from_bus-1], jacoby_col_rear_addr2 ← jacoby_col_pattern_rear[2from_bus]. Initially, the attribute register attr of the column mode skip list data field is set to 2, indicating that the data type is all the original row mode skip list A. i The data is then added to the column-mode skip list, with the corresponding Jacobian matrix column coordinates 2to_bus-1 and 2to_bus added to the column-mode skip list. A higher-level data index is then created. The process of adding data is the same as adding data to the upper triangular part of the Jacobian matrix in the non-zero row-mode bidirectional skip list original_row_pattern of the original Jacobian matrix.
[0104] (3) Add data to the upper_pivot_row_pattern, a non-zero element skip list for the pivot row. The data addition process is the same as that for adding data to the original_row_pattern, a bidirectional skip list for the non-zero element row pattern of the original Jacobian matrix, and will not be described again here.
[0105] After the above calculations, a branch's data is completely added to its corresponding skip list. Then, the read branch data is updated: `read_branch ← read_branch + 1`. If `read_branch` equals the total number of branches `branch_num`, the skip list initialization signal is set to invalid: `initial_skip_list_sig ← 0`. This process concludes the initialization calculation for the Jacobian matrix skip list, which consists entirely of PQ nodes.
[0106] Subprocess 2: If the number of PQ nodes num_PQ=m, the number of PV nodes num_PV=nm-1.
[0107] In this sub-process, each time data is read in, the row and column coordinates of the Jacobian matrix, from_bus and to_bus, are compared with the number of PQ nodes, m, and different data is written to the skip list accordingly. When the serial port output data signal data_valid_sig=1 is valid, the Jacobian matrix skip list initialization signal initial_skip_list_sig←1 is set to valid. When initial_skip_list_sig=1 is valid, the following process is executed to initialize and calculate the Jacobian matrix skip list.
[0108] (1) Add data to the original row pattern skip list original_row_pattern.
[0109] 1) Write the upper triangle part of the Jacobian.
[0110] Determine the relationship between the branch starting point number from_bus and the number of load nodes m, and consider two cases.
[0111] If the branch starting node number is less than or equal to the number of load nodes, i.e., from_bus≤m, it is a PQ node, and the writing process is the same as the data addition process in subprocess 1. The original row pattern skip list tail addresses corresponding to the Jacobian matrix row coordinate values 2from_bus-1 and 2from_bus are saved to the original row pattern skip list tail address registers original_row_rear_addr1 and original_row_rear_addr2, respectively, i.e., original_row_rear_addr1←original_row_pattern_rear[2from_bus-1], original_row_rear_addr2←original_row_pattern_rear[2from_bus]. Then, all node column numbers 2to_bus-1 and 2to_bus after the branch starting node number from_bus are added to the original row pattern skip list.
[0112] If the branch start point number is greater than the number of load nodes (i.e., from_bus > m), it is a PV node. Only the data in the first row of the Jacobian submatrix is written. The original row pattern skip list tail address corresponding to the Jacobian matrix row coordinate value 2from_bus-1 is saved to the original row pattern skip list tail address register original_row_rear_addr1, i.e., original_row_rear_addr1 ← original_row_pattern_rear[2from_bus-1]. Then, all node column numbers 2to_bus-1 and 2to_bus after the branch start node number from_bus are added to the original row pattern skip list.
[0113] 2) Write the lower triangle part of the Jacobian.
[0114] Determine the relationship between the branch endpoint number to_bus and the number of load nodes m, and consider two cases.
[0115] If the branch endpoint number is less than or equal to the number of load nodes, i.e., to_bus≤m, then the transposed Jacobi submatrix consists entirely of PQ nodes, and the writing process is the same as the data addition process in subprocess 1. The original row pattern skip list tail addresses corresponding to the Jacobi matrix column coordinate values 2to_bus-1 and 2to_bus are saved to the original row pattern skip list tail address registers original_row_rear_addr1 and original_row_rear_addr2, respectively, i.e., original_row_rear_addr1←original_row_pattern_rear[2to_bus-1], original_row_rear_addr2←original_row_pattern_rear[2to_bus]. Then, the Jacobi row coordinate values 2from_bus-1 and 2from_bus are added to the original row pattern skip list.
[0116] If the branch endpoint number is greater than the number of load nodes (i.e., to_bus>m), then the transposed Jacobi submatrix contains only PV nodes, and only the first row of the Jacobi submatrix is added. The original row pattern skip list tail addresses corresponding to the Jacobi matrix column coordinate values 2to_bus-1 and 2to_bus are saved to the original row pattern skip list tail address registers original_row_rear_addr1 and original_row_rear_addr2, respectively, i.e., original_row_rear_addr1←original_row_pattern_rear[2from_bus-1], original_row_rear_addr2←original_row_pattern_rear[2from_bus]. Then, the row coordinate value 2from_bus-1 of the first row of the Jacobi submatrix is added to the original row pattern skip list.
[0117] (2) Add data to the column pattern skip list jacoby_col_pattern.
[0118] 1) Write the lower triangle part of the Jacobian.
[0119] Determine the relationship between the branch endpoint number to_bus and the number of load nodes m, and consider two cases.
[0120] If the branch endpoint number is less than or equal to the number of load nodes, i.e., to_bus≤m, then the transposed Jacobi submatrix contains only PQ nodes, and the writing process is the same as the data addition process in subprocess 1. The Jacobi column pattern skip list tail addresses corresponding to the Jacobi matrix column coordinate values 2to_bus-1 and 2to_bus are saved to the column pattern skip list tail address registers jacoby_col_rear_addr1 and jacoby_col_rear_addr2, respectively, i.e., jacoby_col_rear_addr1←jacoby_col_pattern_rear[2to_bus-1], jacoby_col_rear_addr2←jacoby_col_pattern_rear[2to_bus]. Then, the Jacobi row coordinate values 2from_bus-1 and 2from_bus are added to the Jacobi column pattern skip list.
[0121] If the branch endpoint number is greater than the number of load nodes (i.e., to_bus>m), then the transposed Jacobi submatrix contains only PV nodes, and only the first row of the Jacobi submatrix is added. The original row pattern skip list tail addresses corresponding to the Jacobi matrix column coordinate values 2to_bus-1 and 2to_bus are saved to the column pattern skip list tail address registers jacoby_col_rear_addr1 and jacoby_col_rear_addr2, respectively, i.e., jacoby_col_rear_addr1←jacoby_col_pattern_rear[2from_bus-1], jacoby_col_rear_addr2←jacoby_col_pattern_rear[2from_bus]. Then, the row coordinate value 2from_bus-1 of the first row of the Jacobi submatrix is added to the Jacobi column pattern skip list.
[0122] 2) Write the upper triangle part of the Jacobian.
[0123] Determine the relationship between the branch starting point number from_bus and the number of load nodes m, and consider two cases.
[0124] If the branch start point number is less than or equal to the number of load nodes, i.e., from_bus≤m, the Jacobi submatrix transposed becomes a PQ node, and the writing process is the same as the data addition process in subprocess 1. The Jacobi column pattern skip list tail addresses corresponding to the Jacobi matrix row coordinate values 2from_bus-1 and 2from_bus are saved to the column pattern skip list tail address registers jacoby_col_rear_addr1 and jacoby_col_rear_addr2, respectively, i.e., jacoby_col_rear_addr1←jacoby_col_pattern_rear[2from_bus-1], jacoby_col_rear_addr2←jacoby_col_pattern_rear[2from_bus]. Then, all node column numbers 2to_bus-1 and 2to_bus after the branch start point number from_bus are added to the Jacobi column pattern skip list.
[0125] If the branch start point number is greater than the number of load nodes (i.e., from_bus > m), then it is a PV node. Only the data in the first column of the Jacobi submatrix is written. The Jacobi column pattern skip list tail addresses corresponding to the Jacobi matrix row coordinates 2from_bus-1 and 2from_bus are saved to the column pattern skip list tail address registers jacoby_col_rear_addr1 and jacoby_col_rear_addr2, respectively. That is, jacoby_col_rear_addr1 ← jacoby_col_pattern_rear[2from_bus-1], jacoby_col_rear_addr2 ← jacoby_col_pattern_rear[2from_bus]. Then, the first column coordinate value 2to_bus-1 of the Jacobi submatrix is added to the Jacobi column pattern skip list.
[0126] (3) Add data to the upper_pivot_row_pattern, a non-zero upper bound skip list for the pivot row. The data addition process is the same as adding data to the original_row_pattern skip list, and will not be described again here.
[0127] After the above calculations, a branch's data is completely added to the corresponding skip list. Then, the read branch data `read_branch` is updated by incrementing `read_branch` by 1. If `read_branch` equals the total number of branches `branch_num`, the skip list initialization signal `initial_skip_list_sig` is set to invalid by 0. This process concludes the initialization calculation of the Jacobian matrix skip list containing PV nodes.
[0128] After completing the above steps, the upper limit of non-zero element filling in the Jacobian matrix decomposition can be calculated based on the non-zero element structure stored in the skip list of the non-zero element structure of the Jacobian matrix, generating the optimal column permutation vector, and reconstructing the matrix using the optimal column permutation vector to establish a sparse equation system. Specifically, the upper limit of non-zero element filling generated by the Jacobian matrix decomposition is calculated based on the non-zero element structure stored in the skip list of the non-zero element structure of the Jacobian matrix, obtaining the optimal column permutation vector of the original power flow Jacobian matrix, and then... Calculate the updated Jacobian matrix A new sparse set of power flow equations was established.
[0129] It is easy to see that this invention can rely on the dynamic management capability of the Jacobi matrix non-zero element structure skip list to perform incremental updates only on the non-zero element structure corresponding to the changed branch, while the remaining unchanged parts directly reuse the structural information stored in the original skip list. This solves the core problem of incremental calculation of the power flow Jacobi matrix, enabling the power grid to quickly respond to the Jacobi matrix update problem caused by topology changes during real-time operation, thereby improving the efficiency of power flow calculation.
[0130] The second embodiment of the present invention relates to an FPGA power flow Jacobian matrix bidirectional skip list incremental calculation device, comprising:
[0131] The design module is used to design a skip list for the non-zero element structure of the Jacobian matrix, which is used to manage the non-zero element structure of the Jacobian matrix.
[0132] The read splicing module is used to read the binary power grid branch data sequence and use a shift register to splice the read binary power grid branch data sequence to obtain the binary power grid branch data.
[0133] The calculation module is used to dynamically and incrementally calculate the non-zero element structure of the Jacobian matrix based on the binary power grid branch data and the skip list of the non-zero element structure of the Jacobian matrix.
[0134] The skip list of non-zero elements of the Jacobian matrix includes:
[0135] The original row pattern skip list is used to record the distribution of non-zero rows in the original Jacobian matrix;
[0136] The skip list for the upper limit of non-zero elements in the pivot row is used to record the upper limit of non-zero elements in the k-th pivot row;
[0137] The column pattern skip list is used to record the original row patterns and pivot row pattern indices contained in the matrix columns.
[0138] The read and splice module saves the received one-byte valid branch data sequence output from the serial port to the lower eight bits of the data register. Subsequently, whenever the serial port outputs a valid data signal, it first shifts the data in the data register one byte to the higher bit, and then saves the one-byte valid branch data sequence output from the serial port to the lower eight bits of the data register, until a complete binary power grid branch data is received. At the same time, it saves the binary power grid branch data to the branch start point number register or the branch end point number register according to the type of the binary power grid branch data.
[0139] When the calculation module dynamically increments the non-zero element structure of the Jacobian matrix based on the binary power grid branch data and the skip list of the non-zero element structure of the Jacobian matrix:
[0140] When there is no voltage control node in the system, for the original row-mode jump list and the pivot row non-zero element upper limit jump list, calculate the 2×2 sub-matrix block in the Jacobian matrix in the order of diagonal matrix block → upper triangular row → lower triangular column, and add coordinate values to the original row-mode jump list and the pivot row non-zero element upper limit jump list; for the column-mode jump list, calculate the 2×2 sub-matrix block in the Jacobian matrix in the order of diagonal matrix block → lower triangular column → upper triangular row, and add coordinate values to the column-mode jump list;
[0141] When there are voltage control nodes in the system, for the original row-mode skip list and the upper limit skip list of the non-zero element of the principal row, the 2×2 sub-matrix block in the Jacobian matrix is calculated in the order of diagonal matrix block → upper triangular row → lower triangular column; for the column-mode skip list, the 2×2 sub-matrix block in the Jacobian matrix is calculated in the order of diagonal matrix block → lower triangular column → upper triangular row; wherein, all column coordinates of the upper triangular row are added to the non-zero element structure skip list of the Jacobian matrix; if the current branch starting point number is less than or equal to the number of load nodes, all row coordinates of the lower triangular column are added to the non-zero element structure skip list of the Jacobian matrix; if the current branch starting point number is greater than the number of load nodes, only the row coordinates of the first row in the 2×2 sub-matrix block are added.
[0142] When there is no voltage control node in the system, adding data to the original row mode jump table or to the non-zero upper limit jump table of the main row specifically includes:
[0143] Save the tail address of the original row mode skip list or the non-zero element upper limit skip list corresponding to the Jacobian matrix row coordinate value 2from_bus-1 to the tail address register of the original row mode skip list or the tail address register of the non-zero element upper limit skip list of the main element. Add new non-zero element structure data to the tail of the current original row mode skip list or the non-zero element upper limit skip list of the main element. Add the Jacobian matrix column number value 2to_bus-1 to the position pointed to by the current data pointer in the original row mode skip list or the non-zero element upper limit skip list of the main element. Add the data to be inserted to the end of the original row mode skip list or the non-zero element upper limit skip list of the main element. At the bottom layer, complete the upper triangular part writing; save the tail address of the original row mode skip list or the non-zero element upper limit skip list of the pivot row corresponding to the Jacobian matrix column coordinate values 2to_bus-1 and 2to_bus to the tail address register of the original row mode skip list or the tail address register of the non-zero element upper limit skip list of the pivot row, add the corresponding Jacobian matrix row coordinate values 2from_bus-1 and 2from_bus to the original row mode skip list or the non-zero element upper limit skip list of the pivot row, and add the data to be inserted to the bottom layer of the original row mode skip list or the non-zero element upper limit skip list of the pivot row, thus completing the lower triangular part writing;
[0144] When a voltage control node in the system adds data to the original row mode jump table or the main row non-zero element upper limit jump table, the specific steps include:
[0145] When the branch start point number is less than or equal to the number of load nodes, the original row mode jump table or the tail address of the non-zero element upper limit jump table corresponding to the Jacobian matrix row coordinate values 2from_bus-1 and 2from_bus are saved to the tail address register of the original row mode jump table or the tail address register of the non-zero element upper limit jump table of the main element row. All node column numbers 2to_bus-1 and 2to_bus after the branch start point number are added to the original row mode jump table or the non-zero element upper limit jump table of the main element row. The data to be inserted is added to the bottom layer of the original row mode jump table or the non-zero element upper limit jump table of the main element row, thus completing the writing of the upper triangular part.
[0146] When the branch start point number is greater than the number of load nodes, save the tail address of the original row mode skip list or the main row non-zero element upper limit skip list corresponding to the Jacobian matrix row coordinate value 2from_bus-1 to the tail address register of the original row mode skip list or the tail address register of the main row non-zero element upper limit skip list. Add all node column number values 2to_bus-1 and 2to_bus after the branch start point number to the original row mode skip list or the main row non-zero element upper limit skip list. Add the data to be inserted to the bottom layer of the original row mode skip list or the main row non-zero element upper limit skip list, and complete the upper triangular part writing.
[0147] When the branch endpoint number is less than or equal to the number of load nodes, save the tail address of the original row mode jump table or the main row non-zero element upper limit jump table corresponding to the Jacobi matrix column coordinate values 2to_bus-1 and 2to_bus to the tail address register of the original row mode jump table or the tail address register of the main row non-zero element upper limit jump table, add the Jacobi row coordinate values 2from_bus-1 and 2from_bus to the original row mode jump table or the main row non-zero element upper limit jump table, and add the data to be inserted to the bottom layer of the original row mode jump table or the main row non-zero element upper limit jump table, thus completing the writing of the lower triangular part;
[0148] When the branch endpoint number is greater than the number of load nodes, the original row mode skip list or the tail address of the non-zero element upper limit skip list of the main element row corresponding to the Jacobi matrix column coordinate value 2to_bus-1 and 2to_bus is saved to the tail address register of the original row mode skip list or the tail address register of the non-zero element upper limit skip list of the main element row. The row coordinate value 2from_bus-1 of the first row of the Jacobi submatrix is added to the original row mode skip list or the non-zero element upper limit skip list of the main element row. The data to be inserted is added to the bottom layer of the original row mode skip list or the non-zero element upper limit skip list of the main element row, thus completing the writing of the lower triangular part.
[0149] Where, from_bus is the branch start point number, and to_bus is the branch end point number.
[0150] When adding the data to be inserted to the bottom layer of the original row-mode skip list or the non-zero upper bound skip list of the main element row, the following steps are executed synchronously:
[0151] Generate random numbers. If the generated random number is less than the probability of index creation, build a higher-level index for the current data. Continue building the higher-level index until the generated random number is greater than or equal to the probability of index creation, or exceeds the maximum index level. The maximum index level is determined by... The calculation yielded that, For the maximum index level, Establish probabilities for the index. This represents the total number of skip list data calculated from the non-zero element structure of the current Jacobian matrix.
[0152] When there is no voltage control node in the system, adding data to the column-mode skip list specifically includes:
[0153] Save the column mode skip list tail addresses corresponding to the Jacobian matrix column coordinate values 2to_bus-1 and 2to_bus to the column mode skip list tail address register. Set the attribute register of the column mode skip list data field to a preset value to indicate that the data type is all data in the original row mode skip list. Add the corresponding Jacobian matrix row coordinate values 2from_bus-1 and 2from_bus to the column mode skip list. Add the data to be inserted to the bottom layer of the column mode skip list to complete the lower triangular part writing. Save the column mode skip list tail addresses corresponding to the Jacobian matrix column coordinate values 2from_bus-1 and 2from_bus to the column mode skip list tail address register. Set the attribute register of the column mode skip list data field to a preset value to indicate that the data type is all data in the original row mode skip list. Add the corresponding Jacobian matrix column coordinate values 2to_bus-1 and 2to_bus to the column mode skip list. Add the data to be inserted to the bottom layer of the column mode skip list to complete the upper triangular part writing.
[0154] When a voltage control node is present in the system, adding data to the column-mode skip list specifically includes:
[0155] When the branch end number is less than or equal to the number of load nodes, the column mode jump table tail address corresponding to the Jacobi matrix column coordinate values 2to_bus-1 and 2to_bus is saved to the column mode jump table tail address register, the Jacobi row coordinate values 2from_bus-1 and 2from_bus are added to the column mode jump table, and the data to be inserted is added to the bottom layer of the column mode jump table, thus completing the writing of the lower triangular part.
[0156] When the branch endpoint number is greater than the number of load nodes, the column mode jump table tail address corresponding to the Jacobi matrix column coordinate value 2to_bus-1 and 2to_bus is saved to the column mode jump table tail address register, the row coordinate value 2from_bus-1 of the first row of the Jacobi submatrix is added to the column mode jump table, and the data to be inserted is added to the bottom layer of the original row mode jump table or the upper limit jump table of the non-zero element of the main element row, thus completing the writing of the lower triangular part;
[0157] When the branch start point number is less than or equal to the number of load nodes, the column mode jump table tail address corresponding to the Jacobian matrix row coordinate values 2from_bus-1 and 2from_bus is saved to the column mode jump table tail address register, all node column number values 2to_bus-1 and 2to_bus after the branch start point number are added to the column mode jump table, and the data to be inserted is added to the bottom layer of the column mode jump table, thus completing the writing of the upper triangular part;
[0158] When the branch starting point number is greater than the number of load nodes, the column mode jump table tail address corresponding to the row coordinate value 2from_bus-1 and 2from_bus of the Jacobi matrix is saved to the column mode jump table tail address register, the first column coordinate value 2to_bus-1 of the Jacobi submatrix is added to the column mode jump table, and the data to be inserted is added to the bottom layer of the column mode jump table, thus completing the writing of the upper triangular part.
[0159] Where, from_bus is the branch start point number, and to_bus is the branch end point number.
[0160] The third 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 power flow Jacobian matrix bidirectional skip list incremental calculation method of the first embodiment.
[0161] The fourth 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 power flow Jacobi matrix bidirectional skip list incremental calculation 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 incremental calculation of bidirectional skip list of FPGA power flow Jacobian matrix, characterized in that, Includes the following steps: Design a skip list for the non-zero element structure of a Jacobian matrix, which is used to manage the non-zero element structure of a Jacobian matrix. The skip list of non-zero elements of the Jacobian matrix includes: The original row pattern skip list is used to record the distribution of non-zero rows in the original Jacobian matrix; The skip list for the upper limit of non-zero elements in the pivot row is used to record the upper limit of non-zero elements in the k-th pivot row; where k is a natural number. Column pattern skip list, used to record the original row pattern and pivot row pattern index contained in the matrix columns; Read the binary power grid branch data sequence, and use a shift register to concatenate the read binary power grid branch data sequence to obtain the binary power grid branch data; The non-zero element structure of the Jacobian matrix is dynamically incrementally calculated based on the binary power grid branch data and the skip list of the non-zero element structure of the Jacobian matrix, specifically including: When there is no voltage control node in the system, for the original row-mode jump list and the pivot row non-zero element upper limit jump list, calculate the 2×2 sub-matrix block in the Jacobian matrix in the order of diagonal matrix block, upper triangular row, and lower triangular column, and add coordinate values to the original row-mode jump list and the pivot row non-zero element upper limit jump list; for the column-mode jump list, calculate the 2×2 sub-matrix block in the Jacobian matrix in the order of diagonal matrix block, lower triangular column, and upper triangular row, and add coordinate values to the column-mode jump list. When there are voltage control nodes in the system, for the original row-mode skip list and the upper limit skip list of the non-zero element of the principal row, the 2×2 sub-matrix block in the Jacobian matrix is calculated in the order of diagonal matrix block, upper triangular row, and lower triangular column; for the column-mode skip list, the 2×2 sub-matrix block in the Jacobian matrix is calculated in the order of diagonal matrix block, lower triangular column, and upper triangular row; wherein, all column coordinates of the upper triangular row are added to the non-zero element structure skip list of the Jacobian matrix; if the current branch starting point number is less than or equal to the number of load nodes, all row coordinates of the lower triangular column are added to the non-zero element structure skip list of the Jacobian matrix; if the current branch starting point number is greater than the number of load nodes, only the row coordinates of the first row in the 2×2 sub-matrix block are added.
2. The FPGA power flow Jacobian matrix bidirectional skip list incremental calculation method according to claim 1, characterized in that, The process of using a shift register to concatenate the read binary power grid branch data sequence to obtain binary power grid branch data is as follows: The received one-byte valid branch data sequence from the serial port is saved to the lower eight bits of the data register. Subsequently, whenever the serial port outputs a valid data signal, the data in the data register is first shifted one byte to the higher bit, and then the one-byte valid branch data sequence from the serial port is saved to the lower eight bits of the data register, until a complete binary power grid branch data is received. At the same time, the data is saved to the branch start point number register or the branch end point number register according to the type of the binary power grid branch data.
3. The FPGA power flow Jacobian matrix bidirectional skip list incremental calculation method according to claim 1, characterized in that, When there is no voltage control node in the system, adding data to the original row mode jump table or to the non-zero upper limit jump table of the main row specifically includes: Save the tail address of the original row mode skip list or the non-zero element upper limit skip list corresponding to the Jacobian matrix row coordinate value 2from_bus-1 to the tail address register of the original row mode skip list or the tail address register of the non-zero element upper limit skip list of the main element. Add new non-zero element structure data to the tail of the current original row mode skip list or the non-zero element upper limit skip list of the main element. Add the Jacobian matrix column number value 2to_bus-1 to the position pointed to by the current data pointer in the original row mode skip list or the non-zero element upper limit skip list of the main element. Add the data to be inserted to the end of the original row mode skip list or the non-zero element upper limit skip list of the main element. At the bottom layer, complete the upper triangular part writing; save the tail address of the original row mode skip list or the non-zero element upper limit skip list of the pivot row corresponding to the Jacobian matrix column coordinate values 2to_bus-1 and 2to_bus to the tail address register of the original row mode skip list or the tail address register of the non-zero element upper limit skip list of the pivot row, add the corresponding Jacobian matrix row coordinate values 2from_bus-1 and 2from_bus to the original row mode skip list or the non-zero element upper limit skip list of the pivot row, and add the data to be inserted to the bottom layer of the original row mode skip list or the non-zero element upper limit skip list of the pivot row, thus completing the lower triangular part writing; When a voltage control node in the system adds data to the original row mode jump table or the main row non-zero element upper limit jump table, the specific steps include: When the branch start point number is less than or equal to the number of load nodes, the original row mode jump table or the tail address of the non-zero element upper limit jump table corresponding to the Jacobian matrix row coordinate values 2from_bus-1 and 2from_bus are saved to the tail address register of the original row mode jump table or the tail address register of the non-zero element upper limit jump table of the main element row. All node column numbers 2to_bus-1 and 2to_bus after the branch start point number are added to the original row mode jump table or the non-zero element upper limit jump table of the main element row. The data to be inserted is added to the bottom layer of the original row mode jump table or the non-zero element upper limit jump table of the main element row, thus completing the writing of the upper triangular part. When the branch start point number is greater than the number of load nodes, save the tail address of the original row mode skip list or the main row non-zero element upper limit skip list corresponding to the Jacobian matrix row coordinate value 2from_bus-1 to the tail address register of the original row mode skip list or the tail address register of the main row non-zero element upper limit skip list. Add all node column number values 2to_bus-1 and 2to_bus after the branch start point number to the original row mode skip list or the main row non-zero element upper limit skip list. Add the data to be inserted to the bottom layer of the original row mode skip list or the main row non-zero element upper limit skip list, and complete the upper triangular part writing. When the branch endpoint number is less than or equal to the number of load nodes, save the tail address of the original row mode jump table or the main row non-zero element upper limit jump table corresponding to the Jacobi matrix column coordinate values 2to_bus-1 and 2to_bus to the tail address register of the original row mode jump table or the tail address register of the main row non-zero element upper limit jump table, add the Jacobi row coordinate values 2from_bus-1 and 2from_bus to the original row mode jump table or the main row non-zero element upper limit jump table, and add the data to be inserted to the bottom layer of the original row mode jump table or the main row non-zero element upper limit jump table, thus completing the writing of the lower triangular part; When the branch endpoint number is greater than the number of load nodes, the original row mode skip list or the tail address of the non-zero element upper limit skip list of the main element row corresponding to the Jacobi matrix column coordinate value 2to_bus-1 and 2to_bus is saved to the tail address register of the original row mode skip list or the tail address register of the non-zero element upper limit skip list of the main element row. The row coordinate value 2from_bus-1 of the first row of the Jacobi submatrix is added to the original row mode skip list or the non-zero element upper limit skip list of the main element row. The data to be inserted is added to the bottom layer of the original row mode skip list or the non-zero element upper limit skip list of the main element row, thus completing the writing of the lower triangular part. Where, from_bus is the branch start point number, to_bus is the branch end point number, 2from_bus means twice the number of from_bus, and 2to_bus means twice the number of to_bus.
4. The FPGA power flow Jacobian matrix bidirectional skip list incremental calculation method according to claim 3, characterized in that, When adding the data to be inserted to the bottom layer of the original row-mode skip list or the non-zero upper bound skip list of the main element row, the following steps are executed synchronously: Generate random numbers. If the generated random number is less than the probability of index creation, build a higher-level index for the current data. Continue building the higher-level index until the generated random number is greater than or equal to the probability of index creation, or exceeds the maximum index level. The maximum index level is determined by... The calculation yielded that, For the maximum index level, Establish probabilities for the index. This represents the total number of skip list data calculated from the non-zero element structure of the current Jacobian matrix.
5. The FPGA power flow Jacobian matrix bidirectional skip list incremental calculation method according to claim 1, characterized in that, When there is no voltage control node in the system, adding data to the column-mode skip list specifically includes: Save the column mode skip list tail addresses corresponding to the Jacobian matrix column coordinate values 2to_bus-1 and 2to_bus to the column mode skip list tail address register. Set the attribute register of the column mode skip list data field to a preset value to indicate that the data type is all data in the original row mode skip list. Add the corresponding Jacobian matrix row coordinate values 2from_bus-1 and 2from_bus to the column mode skip list. Add the data to be inserted to the bottom layer of the column mode skip list to complete the lower triangular part writing. Save the column mode skip list tail addresses corresponding to the Jacobian matrix column coordinate values 2from_bus-1 and 2from_bus to the column mode skip list tail address register. Set the attribute register of the column mode skip list data field to a preset value to indicate that the data type is all data in the original row mode skip list. Add the corresponding Jacobian matrix column coordinate values 2to_bus-1 and 2to_bus to the column mode skip list. Add the data to be inserted to the bottom layer of the column mode skip list to complete the upper triangular part writing. When a voltage control node is present in the system, adding data to the column-mode skip list specifically includes: When the branch end number is less than or equal to the number of load nodes, the column mode jump table tail address corresponding to the Jacobi matrix column coordinate values 2to_bus-1 and 2to_bus is saved to the column mode jump table tail address register, the Jacobi row coordinate values 2from_bus-1 and 2from_bus are added to the column mode jump table, and the data to be inserted is added to the bottom layer of the column mode jump table, thus completing the writing of the lower triangular part. When the branch endpoint number is greater than the number of load nodes, the column mode jump table tail address corresponding to the Jacobi matrix column coordinate value 2to_bus-1 and 2to_bus is saved to the column mode jump table tail address register, the row coordinate value 2from_bus-1 of the first row of the Jacobi submatrix is added to the column mode jump table, and the data to be inserted is added to the bottom layer of the original row mode jump table or the upper limit jump table of the non-zero element of the main element row, thus completing the writing of the lower triangular part; When the branch start point number is less than or equal to the number of load nodes, the column mode jump table tail address corresponding to the Jacobian matrix row coordinate values 2from_bus-1 and 2from_bus is saved to the column mode jump table tail address register, all node column number values 2to_bus-1 and 2to_bus after the branch start point number are added to the column mode jump table, and the data to be inserted is added to the bottom layer of the column mode jump table, thus completing the writing of the upper triangular part; When the branch starting point number is greater than the number of load nodes, the column mode jump table tail address corresponding to the row coordinate value 2from_bus-1 and 2from_bus of the Jacobi matrix is saved to the column mode jump table tail address register, the first column coordinate value 2to_bus-1 of the Jacobi submatrix is added to the column mode jump table, and the data to be inserted is added to the bottom layer of the column mode jump table, thus completing the writing of the upper triangular part. Where, from_bus is the branch start point number, to_bus is the branch end point number, 2from_bus means twice the number of from_bus, and 2to_bus means twice the number of to_bus.
6. A bidirectional skip list incremental calculation device for an FPGA power flow Jacobian matrix, characterized in that, include: The design module is used to design a skip list for the non-zero element structure of the Jacobian matrix, which is used to manage the non-zero element structure of the Jacobian matrix. The skip list of non-zero elements of the Jacobian matrix includes: The original row pattern skip list is used to record the distribution of non-zero rows in the original Jacobian matrix; The skip list for the upper limit of non-zero elements in the pivot row is used to record the upper limit of non-zero elements in the k-th pivot row; Column pattern skip list, used to record the original row pattern and pivot row pattern index contained in the matrix columns; The read splicing module is used to read the binary power grid branch data sequence and use a shift register to splice the read binary power grid branch data sequence to obtain the binary power grid branch data. The calculation module is used to dynamically increment the non-zero element structure of the Jacobian matrix based on the binary power grid branch data and the skip list of the non-zero element structure of the Jacobian matrix; when the calculation module dynamically increments the non-zero element structure of the Jacobian matrix based on the binary power grid branch data and the skip list of the non-zero element structure of the Jacobian matrix: When there is no voltage control node in the system, for the original row-mode jump list and the pivot row non-zero element upper limit jump list, calculate the 2×2 sub-matrix block in the Jacobian matrix in the order of diagonal matrix block, upper triangular row, and lower triangular column, and add coordinate values to the original row-mode jump list and the pivot row non-zero element upper limit jump list; for the column-mode jump list, calculate the 2×2 sub-matrix block in the Jacobian matrix in the order of diagonal matrix block, lower triangular column, and upper triangular row, and add coordinate values to the column-mode jump list. When there are voltage control nodes in the system, for the original row-mode skip list and the upper limit skip list of the non-zero element of the principal row, the 2×2 sub-matrix block in the Jacobian matrix is calculated in the order of diagonal matrix block, upper triangular row, and lower triangular column; for the column-mode skip list, the 2×2 sub-matrix block in the Jacobian matrix is calculated in the order of diagonal matrix block, lower triangular column, and upper triangular row; wherein, all column coordinates of the upper triangular row are added to the non-zero element structure skip list of the Jacobian matrix; if the current branch starting point number is less than or equal to the number of load nodes, all row coordinates of the lower triangular column are added to the non-zero element structure skip list of the Jacobian matrix; if the current branch starting point number is greater than the number of load nodes, only the row coordinates of the first row in the 2×2 sub-matrix block are added.
7. 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 power flow Jacobian matrix bidirectional skip list incremental calculation method as described in any one of claims 1-5.
8. 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 power flow Jacobian matrix bidirectional skip list incremental calculation method as described in any one of claims 1-5.