Dynamic increment calculation method for power flow Jacobian matrix and power unbalance

By optimizing the Jacobian matrix calculation process and using the triangular cyclic queue under the admittance matrix for dynamic incremental calculation, the problems of slow Jacobian matrix calculation and high storage resource consumption are solved, and more efficient power flow calculation is achieved.

CN120638357AActive Publication Date: 2025-09-12STATE GRID SHANGHAI ENERGY INTERCONNECTION RES INST CO LTD

Patent Information

Application Number
CN202511120879.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2025-09-12
Estimated Expiration
2045-08-12

AI Technical Summary

Technical Problem

When faced with the dynamic changes of massive power grid data, the existing power flow calculation method has slow Jacobian matrix calculation speed and high storage resource consumption, and lacks dynamic and refined optimization of the entire Jacobian matrix calculation process.

Method used

By redesigning the Jacobian matrix calculation process, the lower triangular admittance value of the current node to the target node is saved in the lower triangular circular queue of the admittance matrix, and the power accumulated value of the target node is dynamically updated to the power accumulated value register. The lower triangular circular queue of the admittance matrix is ​​used to shorten the calculation time of the Jacobian lower triangular matrix, and the parallel pipeline dynamic incremental calculation of the Jacobian matrix and the power imbalance is realized.

Benefits of technology

It greatly shortens the calculation time and storage resource consumption of the Jacobian matrix, reduces the calculation time and storage resource consumption of the Jacobian matrix of large-scale networks, and improves computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120638357A_ABST
    Figure CN120638357A_ABST
Patent Text Reader

Abstract

The invention relates to a dynamic increment calculation method for a power flow Jacobian matrix and power unbalance, which comprises the following steps of: redesigning a calculation process of the Jacobian matrix, storing a lower triangular admittance value of a target column into a circular queue, and dynamically updating a power accumulated value into a diagonal register at the same time; and the time for searching the admittance matrix during Jacobian lower triangular matrix calculation is greatly shortened. According to the method, the parallel pipeline dynamic increment calculation of the Jacobian matrix and the power unbalance is realized, and the calculation time and storage resource consumption of the Jacobian matrix of a large-scale network are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power flow calculation, and in particular to a method for dynamically calculating a power flow Jacobian matrix and a power imbalance. Background Art

[0002] Power flow calculation is a very important analytical calculation for power systems. It calculates the electrical quantities of the power system under steady-state operation, including active power, reactive power, and voltage distribution in the power grid, based on the power system's wiring method, parameters, and operating conditions. Power flow calculation is also the basis for system safety, stability, and reliability analysis, and is used to study various issues raised in system planning and operation. For planned power systems, power flow calculation can verify whether the proposed power system planning scheme can meet the requirements of various operating modes; for operating power systems, power flow calculation can predict whether various load changes and changes in network structure will endanger system safety, whether the voltage of all buses in the system is within the allowable range, whether various components in the system (lines, transformers, etc.) will be overloaded, and what preventive measures should be taken in advance when overload is likely to 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 a power flow calculation FPGA system based on the Newton-Raphson method by collecting data from real-time SCADA system network and telemetry transmission.

[0004] When faced with the scenario of dynamic changes in massive power grid data, this solution does not utilize the coordinate mapping relationship between the admittance matrix and the Jacobian matrix when calculating the Jacobian matrix. It also lacks dynamic and refined optimization of the entire Jacobian matrix calculation process, resulting in high storage resource consumption and slow calculation speed. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a dynamic incremental calculation method for the power flow Jacobian matrix and the power imbalance, which can shorten the matrix calculation time.

[0006] The technical solution adopted by the present invention to solve the technical problem is to provide a dynamic incremental calculation method for the power flow Jacobian matrix and the power imbalance, including the following steps:

[0007] Calculate the power partial derivatives between the current node from_bus and the target node to_bus by row element, save the calculation results to the power partial derivative queue and the voltage partial derivative queue, and store the related lower triangular admittance value of the current node from_bus to the target node to_bus in the lower triangular circular queue of the admittance matrix, and synchronously write the power accumulation value of the target node to_bus to the power accumulation value register, where the number of the current node from_bus is less than the number of the target node to_bus;

[0008] Take the first data from the lower triangular circular queue of the admittance matrix and compare whether the column number of the current data is the target node required by the current row; if it is the target node required by the current row, calculate the power partial derivative between the node pairs, write the calculation results into the power partial derivative queue and the voltage partial derivative queue first, and synchronously write the power accumulated value of the target node into the power accumulated value register; if it is not the target node required by the current row, rewrite the data from the end of the queue into the lower triangular circular queue of the admittance matrix; repeat this step until the data cycle in the lower triangular circular queue of the admittance matrix is ​​completed;

[0009] According to the reading order of the data in the admittance matrix, the Jacobian matrix data and the power imbalance are calculated;

[0010] When the admittance matrix data of the target node row is read, the calculation of the two rows of data in the Jacobian matrix is ​​completed, and the data in the power partial derivative queue and the voltage partial derivative queue are written into the memory.

[0011] The calculation of Jacobian matrix data and power imbalance according to the reading order of data in the admittance matrix specifically includes:

[0012] Determine whether the row node number i and the column node number j of the read admittance matrix data are equal;

[0013] If they are not equal, calculate the power partial derivative at position (i, j) in the Jacobian matrix and store it in the power partial derivative queue and the voltage partial derivative queue;

[0014] If they are equal, after reading all the data in the i-th row, the diagonal partial derivative elements and the power and voltage imbalance of the i-th node are calculated by reading the cumulative sum register, and the diagonal data is saved in the Jacobi diagonal register.

[0015] When calculating the diagonal partial derivative elements and the power and voltage imbalance of the i-th node by reading the cumulative sum register, if the node is a PQ node, the calculation process is as follows:

[0016] Calculate the weighted value of the voltage contribution value to the total power based on the value read in the accumulated sum register;

[0017] Calculating active power and reactive power according to the weighted value of the voltage contribution value to the total power, and calculating active power imbalance and reactive power imbalance according to the obtained active power and reactive power;

[0018] Calculate the contribution of the current node's self-admittance and voltage to the partial derivative;

[0019] Calculate the power contribution value based on the contribution value of the current node's self-admittance to the partial derivative;

[0020] The partial derivatives of active power and reactive power with respect to voltage are calculated based on the power contribution value and the value read from the accumulated sum register.

[0021] When calculating the diagonal partial derivative elements and the power and voltage imbalance of the i-th node by reading the cumulative sum register, if the node is a PU node, the calculation process is as follows:

[0022] Calculate the weighted value of the voltage contribution value to the total power based on the value read in the accumulated sum register;

[0023] Calculate the active power according to the weighted value of the voltage contribution to the total power, and calculate the active power imbalance according to the obtained active power;

[0024] Calculating the sum of the squares of the voltages of the current nodes, and calculating the voltage square imbalance based on the sum of the squares of the voltages of the current nodes;

[0025] Calculate the contribution of the current node's self-admittance and voltage to the partial derivative;

[0026] Calculate the power contribution value based on the contribution value of the current node's self-admittance to the partial derivative;

[0027] The partial derivative of active power with respect to voltage is calculated based on the power contribution value and the value read from the cumulative sum register, and the partial derivative of the square of voltage with respect to voltage is calculated based on the square of the voltage of the current node.

[0028] The calculation of two rows of data in the Jacobian matrix is ​​completed as follows: all nodes whose column number values ​​are less than the row number are read from the lower triangular circular queue of the admittance matrix, and the power accumulation amount is calculated. When the power accumulation amount of all nodes whose column number values ​​are less than the row number is calculated, the data of the admittance matrix is ​​read again to calculate the upper triangular part.

[0029] The method of reading out all nodes whose column number value is less than the row number from the lower triangular circular queue of the admittance matrix and calculating the power accumulation amount, and when the power accumulation amount of all nodes whose column number value is less than the row number is calculated, reading the data of the admittance matrix and calculating the upper triangular part specifically includes:

[0030] When the row number read from the lower triangular cyclic queue of the admittance matrix is ​​less than the row number of the current admittance matrix, and the column number read from the lower triangular cyclic queue of the admittance matrix is ​​equal to the row number of the current admittance matrix, the current value read from the lower triangular cyclic queue of the admittance matrix is ​​assigned to the conductance register and the admittance register, and the node voltage corresponding to the column number of the lower triangular admittance value is taken out from the voltage register; the contribution value of the mutual admittance and the node voltage corresponding to the row and column number of the current admittance matrix to the partial derivative is calculated, and the total power accumulation amount is calculated according to the contribution value;

[0031] When the column number read from the lower triangular circular queue of the admittance matrix is ​​not equal to the row number of the current admittance matrix, the read signal of the lower triangular circular queue of the admittance matrix is ​​pulled high, the next data is continued to be read, and the currently read data is rewritten to the end of the lower triangular circular queue of the admittance matrix; when the row number of the lower triangular circular queue of the admittance matrix has searched all rows, the calculation of the lower triangular part is completed; according to the value of the current remaining data number register of the lower triangular circular queue, the data in the lower triangular circular queue is rewritten in a circular manner; when the value of the data number register is greater than zero, the following steps are repeated until all remaining data are written in a circular manner, the read signal of the lower triangular circular queue of the admittance matrix is ​​pulled high, the first data in the queue is read out and saved to the first data register, the write signal of the lower triangular circular queue of the admittance matrix is ​​pulled high, the value of the first data register is written to the end of the lower triangular circular queue of the admittance matrix, and the data number register in the queue is updated.

[0032] The data in the power partial derivative queue and the voltage partial derivative queue are written into the memory, including writing the active power queue value and the column label value, specifically:

[0033] Pull high the signal indicating that the current admittance matrix row data calculation is complete, initialize the counter of the active power partial derivative queue data that has been read, and pull high the data split signal;

[0034] When the value of the read active power partial derivative queue data counter is less than or equal to the number of data written into the active power partial derivative queue in the current row, the following process is repeated:

[0035] Pull high the active power partial derivative queue read signal, read the active power value in the current active power partial derivative queue, and save it to the register P_data, take out the data in the register P_data twice, and save it to the write data bus of the memory, and then write the data on the write data bus to the Jacobian first address cell in the memory;

[0036] Pull high the active power column label queue read signal, take out the active power column label value in the current active power column label queue, save the active power column label value to the write data bus of the memory, and then write the data on the write data bus to the Jacobian first address cell in the memory;

[0037] Update the active power partial derivative queue data counter currently read and clear the active power partial derivative queue reading signal.

[0038] The data in the power partial derivative queue and the voltage partial derivative queue are written into the memory, including writing the reactive power queue value and the column label value, specifically:

[0039] Pull up the reactive power and voltage data segmentation signal to initialize the read reactive power and voltage partial derivative queue data counter;

[0040] When the value of the reactive power and voltage partial derivative queue data counter that has been read is less than or equal to the number of data that have been written to the reactive power and voltage partial derivative queue in the current row, the following process is repeated:

[0041] Pull high the reactive power voltage partial derivative queue read signal, read the reactive power voltage value in the current reactive power voltage partial derivative queue, and save it to the register UQ_data, take out the data in the register UQ_data twice, and save it to the write data bus of the memory, and then write the data on the write data bus to the Jacobian first address cell in the memory;

[0042] Pull up the reactive power voltage column label queue read signal, take out the reactive power voltage column label value in the current reactive power voltage column label queue, save the reactive power voltage column label value to the write data bus of the memory, and write the data on the write data bus into the Jacobian first address cell in the memory;

[0043] Update the reactive power and voltage partial derivative queue data counter currently read, and clear the reactive power and voltage partial derivative queue reading signal.

[0044] 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 capable of running on the processor, and when the processor executes the computer program, the steps of the above-mentioned method for dynamically calculating the power flow Jacobian matrix and the power imbalance amount are implemented.

[0045] The technical solution adopted by the present invention to solve its technical problem is: providing a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method for dynamically calculating the power flow Jacobian matrix and the power imbalance amount are implemented.

[0046] Beneficial effects

[0047] Due to the adoption of the above-mentioned technical solution, the present invention has the following advantages and positive effects compared with the prior art: the present invention redesigns the calculation process of the Jacobian matrix, saves the relevant lower triangular admittance value of the current node to the target node in the lower triangular circular queue of the admittance matrix, and dynamically updates the power accumulated value of the target node to the power accumulated value register. The use of the lower triangular circular queue of the admittance matrix can greatly shorten the time for searching the admittance matrix when calculating the Jacobian lower triangular matrix. By designing the read-write control logic, the parallel pipeline dynamic incremental calculation of the Jacobian matrix and the power imbalance amount is realized, thereby reducing the calculation time and storage resource consumption of the Jacobian matrix of large-scale networks. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a logic flow chart of a method for dynamically calculating a power flow Jacobian matrix and a power imbalance amount according to a first embodiment of the present invention;

[0049] Figure 2 2. It is a schematic diagram of the coordinate transformation and storage structure of the admittance and Jacobian matrices in the first embodiment of the present invention;

[0050] Figure 3 This is a logic flow chart of Jacobian matrix data calculation and memory writing in the first embodiment of the present invention. DETAILED DESCRIPTION

[0051] Below in conjunction with specific embodiment, further set forth the present invention.Should be understood that these embodiments are only used to illustrate the present invention and are not used in limiting the scope of the present invention.In addition, should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall equally within the scope limited by the appended claims of the application.

[0052] The first embodiment of the present invention relates to a dynamic incremental calculation method of the power flow Jacobian matrix and the power imbalance. Figure 1 As shown, this method does not require the completion of the admittance matrix calculation before incrementally calculating the Jacobian matrix. In the interval between receiving two sets of branch data from the serial port, the upper triangular form of the admittance matrix is ​​first calculated step by step through streaming calculation and saved to synchronous dynamic random access memory (SDRAM); then, the row data in the admittance matrix is ​​synchronously read from the SDRAM to perform dynamic incremental calculation of the Jacobian matrix. The calculation process includes the following steps:

[0053] Step 1: Calculate the power partial derivatives between the current node from_bus and the target node to_bus, row by row. These power partial derivatives refer to the partial derivatives of the active power between nodes with respect to the voltage amplitude of each node, and the partial derivatives of the reactive power between nodes with respect to the voltage amplitude of each node. Save the calculated power partial derivatives in the power partial derivative queue derivative_P_FIFO and the voltage partial derivative queue derivative_QU_FIFO. Store the lower triangular admittance value of the current node from_bus with respect to the target node to_bus in the lower triangular circular queue low_tri_jacoby_FIFO of the admittance matrix. Synchronously write the accumulated power value of the target node to_bus into the accumulated power value registers acc_M and acc_N. The number of the current node from_bus is lower than that of the target node to_bus.

[0054] Step 2. Take out the first data from the lower triangular circular queue low_tri_jacoby_FIFO of the admittance matrix, and compare whether the column label of the current data is the target node required by the current row; if it is the target node required by the current row, calculate the power partial derivative between the node pairs, and write the calculation results into the power partial derivative queue derivative_P_FIFO and the voltage partial derivative queue derivative_QU_FIFO first, and synchronously write the power accumulated value of the target node into the power accumulated value registers acc_M and acc_N; if it is not the target node required by the current row, rewrite the data from the end of the queue into the lower triangular circular queue low_tri_jacoby_FIFO of the admittance matrix; repeat this step until the data circulation in the lower triangular circular queue low_tri_jacoby_FIFO of the admittance matrix is ​​completed.

[0055] Step 3, calculate the Jacobian matrix data and power imbalance according to the reading order of the data in the admittance matrix; this step specifically includes: judging whether the row node number i and the column node number j of the read admittance matrix data are equal; if they are not equal, calculate the power partial derivative at the (i, j) position in the Jacobian matrix, and store them in the power partial derivative queue and the voltage partial derivative queue; if they are equal, after reading all the data in the i-th row, calculate the diagonal partial derivative elements and the power and voltage imbalance of the i-th node by reading the cumulative sum register, and save the diagonal data to the Jacobian diagonal register.

[0056] This implementation designs a compressed storage format for the Jacobian matrix (see Figure 2 ), the diagonal elements in the Jacobian matrix represent the partial derivatives of the power accumulation value of the node with respect to other nodes in the row, which are stored separately in the register diag_jacoby[63:0][2(n-1)-1:0], where n represents the number of nodes.

[0057] If (i, j) represents the coordinate in the GB admittance matrix, then the corresponding coordinate in the Jacobian matrix is , set register delta_PQU[63:0][2(n-1):0] to represent the power imbalance and voltage imbalance of all nodes.

[0058] A dynamic incremental calculation mode is designed for the cumulative sum of the Jacobian matrix and the power imbalance in the power flow calculation. The cumulative value of the voltage of the i-th node to the power imbalance is recorded as and , which is expressed as follows:

[0059] ;

[0060] in, and denote the real and imaginary parts of the node voltage, respectively. and Represents the real and imaginary parts of the elements in the admittance matrix. and Stored in the power accumulation register acc_M[63:0][n-2:0] and acc_N[63:0][n-2:0], that is, acc_M[i]← ,acc_N[i]← .

[0061] For the i-th PQ node, the active power imbalance and reactive power unbalance The incremental calculation formula can be expressed as:

[0062] ;

[0063] in, and They are the node active power setting value and reactive power setting value respectively.

[0064] When the node number i=j, the power partial derivative increment calculation formula of the diagonal elements in the Jacobian matrix is ​​expressed as follows:

[0065] .

[0066] The calculation process of the Jacobian matrix and power imbalance in this step is as follows:

[0067] When the Jacobian matrix calculation signal compute_jacoby_sig=1 is valid, the admittance matrix queue read signal Rd_GB_FIFO←1 is pulled high, 3 data are read continuously from the admittance matrix queue GB_FIFO, the admittance matrix element number counter num_data_GB←0, and the admittance matrix row number register GB_row_num←1 are read.

[0068] When Rd_GB_FIFO=1 and num_data_GB<3, data are taken from the admittance matrix queue GB_FIFO and assigned to the conductance register , susceptance register , column number register GB_col_num, that is, execution ←read_FIFO[GB_FIFO], ←read_FIFO[GB_FIFO], GB_col_num←read_FIFO[GB_FIFO]. Each time a queue read is executed, the admittance matrix element counter num_data_GB←num_data_GB+1 is read. When num_data_GB=3, the admittance matrix queue read signal Rd_GB_FIFO←0.

[0069] Take the voltage value corresponding to node j from the voltage value register voltage_ef[63:0][n-1:0] and , the number of node j is GB_col_num, the high 32 bits ←voltage_ef[GB_col_num][63:32], lower 32 bits ←voltage_ef[GB_col_num][31:0]. At the same time, take out the voltage value of node i and store it in register and ,Right now ←voltage_ef[GB_row_num][63:32], ←voltage_ef[GB_row_num][31:0], then calculate the node power accumulation and term and , and store it in the power accumulation register acc_M[i] and acc_N[i]. If GB_row_num=GB_col_num, record , .

[0070] Set intermediate variable registers 、 、 、 , respectively calculated , , , , , , .

[0071] Finally, and Store and accumulate in the accumulators acc_M and acc_N with GB_row_num as the address, that is, acc_M[GB_row_num]←acc_M[GB_row_num]+ ,acc_N[GB_row_num]←acc_N[GB_row_num]+ .

[0072] Then, pull up the GB_FIFO read signal Rd_GB_FIFO←1 to read the next admittance matrix data. When the i-th row data is read, the current node can be calculated. 、 、 At the same time, the accumulated power of other nodes numbered j is dynamically accumulated into registers acc_M and acc_N.

[0073] This embodiment also sets a node type register, node_type[n-1:0]. For the i-th node, node_type[i] = 1, it indicates that the node is a PQ node. A PQ node is a node with given active power P and reactive power Q, and desired voltage magnitude and voltage phase. For the i-th node, node_type[i] = 0, it indicates that the node is a PV node. A PV node is a node with given active power P and voltage magnitude, and desired reactive power Q and voltage phase. The node type of the current node numbered GB_row_num is retrieved, i.e., current_node_type ← node_type[GB_row_num]. Set_value_P, set_value_Q, and set_value_U represent the set values ​​for active power, reactive power, and voltage, respectively. Read the data number current_row_num of the current row from the admittance matrix row element number queue GB_row_num_FIFO, that is, current_row_num←read_FIFO[GB_row_num_FIFO]. When the data reading number counter num_data_GB=3, update the value of the read admittance element number register GB_row_num, GB_row_num←GB_row_num+1. When the counter value GB_row_num=the data number current_row_num of the current row, it means that the data of this row has been read.

[0074] Set up three queues. The derivative_P_FIFO queue stores the partial derivatives of the active power P of each row of the Jacobian matrix with respect to voltage. The derivative_QU_FIFO queue represents the partial derivatives of the reactive power Q and voltage U of each row of the Jacobian matrix with respect to voltage. The lower_tri_GB queue is a circular queue that stores the recorded values ​​of the power partial derivatives between the nodes of the upper triangular elements in the GB matrix. The recorded values ​​represent the admittance values ​​of the current row nodes to other nodes in the lower triangular matrix. After the calculation of each row of Jacobian matrix data is completed, the lower triangular part of the GB admittance matrix to be calculated in the next row is taken out, and then the remaining elements are written to the end of the queue in sequence for use in the next round of calculation.

[0075] The following describes two cases, each based on the current node type value, to calculate the upper triangular and diagonal elements of the Jacobian matrix. Initially, the row number register GB_row_num is set to ← 1. When the Jacobian matrix calculation signal compute_jacoby = 1, the upper triangular portion of the GB matrix is ​​calculated row by row for GB_row_numcong values ​​from 1 to n-1.

[0076] If current_node_type=1, it means the node is a PQ node. The calculation process is as follows:

[0077] Set the active power curren_set_value_P and reactive power curren_set_value_Q registers of the current node, i.e. curren_set_value_P←set_value_P[GB_row_num], curren_set_value_Q←set_value_Q[GB_row_num]. Record the power accumulation value registers curren_acc_M and current_acc_N of the current GB_row_num row number, i.e. curren_acc_M←acc_M[GB_row_num], curren_acc_N←acc_N[GB_row_num]. Then calculate the active power of the current node respectively. and reactive power .

[0078] First, calculate the off-diagonal part of the upper triangle of the Jacobian matrix.

[0079] Calculate the power accumulation sum curren_acc_M and curren_acc_N versus voltage and The weighted value of the contribution value to the total power is stored in registers acc_Me, acc_Mf, acc_Ne and acc_Nf, that is, acc_Me← ·curren_acc_M、acc_Mf← ·curren_acc_M、acc_Ne← ·curren_acc_N、acc_Nf← After the above operation, the values ​​in registers acc_Me, acc_Mf, acc_Ne, and acc_Nf are the weighted values ​​of the total power.

[0080] Then, the active power is calculated based on the weighted value of the voltage contribution to the total power. and reactive power ,Right now ←acc_Me+acc_Nf, ←acc_Mf-acc_Ne. Then according to the obtained active power and reactive power Calculate active power imbalance and reactive power unbalance , , Finally, the active power imbalance and reactive power unbalance Write to the delta_PQU[63:0][2(n-1)-1:0] register, that is, delta_PQU[2·GB_row_num-1]← ,delta_PQU[2·GB_row_num]← .

[0081] Next, we calculate the diagonal part of the Jacobian matrix:

[0082] Calculate the self-admittance of the current node 、 and voltage 、 The contribution value of the partial derivative is saved in the temporary register Ge, temporary register Gf, temporary register Be, and temporary register Bf, where Ge← ,Gf← ,Be← ,Bf← After the above operation, the values ​​in the temporary registers Ge, Gf, Be, and Bf are the self-admittance of the current node. 、 and voltage 、 Contribution to the partial derivative.

[0083] Then, the power contribution value is calculated according to the contribution value of the current node's self-admittance to the partial derivative, and stored in the power contribution value register contri_Pe, the power contribution value register contri_Pf, the power contribution value register contri_Qe, and the power contribution value register contri_Qf, that is, contri_Pe←-Ge-Bf, contri_Pf←Be-Gf, contri_Qe←Be-Gf, contri_Qf←Ge+Bf. After the above operations, the values ​​in the power contribution value register contri_Pe, the power contribution value register contri_Pf, the power contribution value register contri_Qe, and the power contribution value register contri_Qf are the power contribution values.

[0084] Finally, the power contribution value and the value read in the cumulative sum register are used to calculate the partial derivatives of active power and reactive power with respect to voltage, and are saved in the partial derivative register of active power P with respect to the real part of voltage e, derivative_Pe, the partial derivative register of active power P with respect to the imaginary part of voltage f, derivative_Pf, the partial derivative register of reactive power P with respect to the real part of voltage e, derivative_Qe, and the partial derivative register of reactive power P with respect to the imaginary part of voltage f, respectively, that is, derivative_Pe←-current_acc_M+contri_Pe, derivative_Pf←- current_acc_N+contri_Pf, derivative_Qe←current_acc_N+contri_Qe, and derivative_Qf←- current_acc_M+contri_Qf.

[0085] The following process is to store the diagonal value into the Jacobian diagonal register dig_jacoby[63:0][8(n-1)-1:0].

[0086] Figure 2 The coordinate transformation and storage structure of the admittance matrix and Jacobian matrix are shown. The Jacobian element at the coordinate (i, j) of the admittance matrix is ​​a 2×2 square matrix. The PQ node is based on [ ] are stored consecutively in the four cells with addresses [4i-3,4i-2,4i-1,4i] in the dig_jacoby register.

[0087] Write the value of the power-to-voltage partial derivative register calculated above into the dig_jacoby register address with row node number GB_row_num, dig_jacoby[4·GB_row_num-3]←derivative_Pe, dig_jacoby[4·GB_row_num-2]←derivative_Pf, dig_jacoby[4·GB_row_num-1]←derivative_Qe, dig_jacoby[4·GB_row_num]←derivative_Qf.

[0088] The following is the read and write control flow of the admittance value and Jacobian matrix element queues.

[0089] Whenever the GB admittance value at the (i, j) position is taken out, the admittance value is synchronously stored in the lower_tri_GB_FIFO circular queue. When the node voltage partial derivative is calculated, the corresponding partial derivative register is synchronously written into the Jacobian matrix element queue.

[0090] If the currently read admittance matrix row number value GB_row_num ≠ column number value GB_col_num, execute the following process to write the calculated partial derivatives into the queue.

[0091] Calculate the mutual admittance at the node (i, j) of the current admittance matrix respectively 、 and voltage and The contribution value of the partial derivative is saved in the temporary registers contri_Ge, contri_Gf, contri_Be, and contri_Bf, i.e. contri_Ge← ,contri_Gf← ,contri_Be← ,contri_Bf← .

[0092] Then calculate the partial derivatives of active power P and reactive power Q with respect to voltage and save them to registers derivative_Pe, derivative_Pf, derivative_Qe, and derivative_Qf, respectively, that is, derivative_Pe←-contri_Ge-contri_Bf, derivative_Pf←contri_Be-contri_Gf, derivative_Qe←derivative_Pf, derivative_Qf←-derivative_Pe.

[0093] The partial derivative data written to the queue needs to record the column number GB_col_num of the current admittance value, assemble the power partial derivative and column number value, and save them to the power partial derivative register derivative_Pe_data, power partial derivative register derivative_Pf_data, power partial derivative register derivative_Qe_data, and power partial derivative register derivative_Qf_data of the queue to be written, that is, derivative_Pe_data←{derivative_Pe,2·GB_col_num-1}, derivative_Pf_data←{derivative_Pf,2·GB_col_num}, derivative_Qe_data←{derivative_Qe, 2·GB_col_num-1}, and derivative_Qf_data←{derivative_Qf,2·GB_col_num}.

[0094] The write enable signals for the active power partial derivative queue, reactive power partial derivative queue, and voltage partial derivative queue are simultaneously pulled high (w_derivative_P_FIFO←1, w_derivative_QU_FIFO←1). When these power partial derivatives are not zero, they are written to the queues, executing write_FIFO[derivative_P_FIFO, derivative_Pe_data], write_FIFO[derivative_P_FIFO, derivative_Pf_data], write_FIFO[derivative_P_FIFO,derivative_Qe_data], and write_FIFO[derivative_P_FIFO, derivative_Qf_data], respectively. The write queue signals are then cleared (w_derivative_P_FIFO←0, w_derivative_QU_FIFO←0).

[0095] Assemble the current GB data and save it to the lower triangle temporary register lower_GB[95:0] of the admittance value, where lower_GB←{GB_row_num[15:0],GB_col_num[15:0], [31:0], Pull up the lower triangular admittance matrix GB queue write signal w_lower_tri_GB_FIFO←1, write lower_GB into the circular queue lower_tri_GB_FIFO, write_FIFO[lower_tri_GB_FIFO,lower_GB], update the queue number counter register lower_GB_length←lower_GB_length+1, and finally clear the write queue signal w_lower_tri_GB_FIFO←0.

[0096] If current_node_type=0, it means that the node is a PU node.

[0097] Set the active power register curren_set_value_P and voltage register curren_set_value_U for the current node, i.e., curren_set_value_P ← set_value_P[GB_row_num], curren_set_value_U ← set_value_U[GB_row_num]. When the node value setting is complete, the read signal is cleared to Rd_GB_FIFO ← 0, and the counter value GB_row_num ← 0. Record the power accumulation value registers curren_acc_M and current_acc_N for the current row number GB_row_num, i.e., curren_acc_M ← acc_M[GB_row_num], curren_acc_N ← acc_N[GB_row_num].

[0098] First, calculate the off-diagonal part of the upper triangle of the Jacobian matrix.

[0099] The PU node only needs to calculate the contribution of active power P to the total power. First, calculate the power accumulation sum curren_acc_M and curren_acc_N to voltage and The contribution value of the total power is the weighted value register acc_Me and the weighted value register acc_Nf, that is, acc_Me← ·curren_acc_M、acc_Nf← ·curren_acc_N.

[0100] Then calculate the active power based on the weighted value of the voltage contribution to the total power , ←acc_Me+acc_Nf, then calculate the active power imbalance based on the obtained active power , .

[0101] Then calculate the square sum of the voltage of the current node and save it to the square sum register of voltage U, ef_square, that is, ef_square← , and calculate the voltage square imbalance based on the voltage square sum of the current node, and save it to the voltage square imbalance register delta_U_square, that is, delta_U_square← Finally, the power imbalance The voltage squared imbalance register delta_U_square is saved to the delta_PQU register, i.e. delta_PQU[2·GB_row_num-1]← , delta_PQU[2·GB_row_num]←delta_U_square.

[0102] Next, we calculate the diagonal part of the Jacobian matrix:

[0103] Calculate the self-admittance of the current node 、 and voltage and The contribution value of the partial derivative is saved in the temporary registers Ge, Gf, Be, and Bf, that is, Ge← ,Gf← ,Be← ,Bf← .

[0104] The power contribution value is then calculated based on the contribution value of the current node's self-admittance to the partial derivative and saved to the power contribution value registers contri_Pe, contri_Pf, contri_Qe, and contri_Qf, i.e., contri_Pe←-Ge-Bf, contri_Pf←Be-Gf, contri_Qe←Be-Gf, and contri_Qf←Ge+Bf.

[0105] Finally, the partial derivative of active power to voltage is calculated based on the power contribution value and the value in the accumulated sum register, and saved to the partial derivative register of active power P to the real part of voltage e derivative_Pe, the partial derivative register of active power P to the imaginary part of voltage f derivative_Pf, and the voltage squared value. Partial derivative register derivative_Ue of the real part of voltage e, voltage square The partial derivative register of the imaginary part of the voltage f is derivative_Uf, that is, derivative_Pe←-current_acc_M+contri_Pe, derivative_Pf←-current_acc_N+contri_Pf, derivative_Ue←-2· ,derivative_Uf←- -2· .

[0106] The following process stores the diagonal value in the Jacobian diagonal register dig_jacoby.

[0107] For PU nodes, according to [ ] are stored consecutively in the four cells with addresses [4i-3,4i-2,4i-1,4i] in the dig_jacoby register.

[0108] Write the value of the power-to-voltage partial derivative register calculated above into the dig_jacoby register address with row node number GB_row_num, i.e., dig_jacoby[4·GB_row_num-3]←derivative_Pe, dig_jacoby[4·GB_row_num-2]←derivative_Pf, dig_jacoby[4·GB_row_num-1]←derivative_Ue, dig_jacoby[4·GB_row_num]←derivative_Uf.

[0109] The following is the read and write control flow of the admittance value and Jacobian matrix element queues.

[0110] If the currently read admittance matrix row number value GB_row_num ≠ column number value GB_col_num, execute the following process to write the calculated partial derivatives into the queue.

[0111] Calculate the mutual admittance at the node (i, j) of the current admittance matrix respectively 、 and voltage and The contribution value of the partial derivative is saved in the temporary registers contri_Ge, contri_Gf, contri_Be, and contri_Bf, i.e. contri_Ge← ,contri_Gf← ,contri_Be← ,contri_Bf← .

[0112] Then calculate the partial derivatives of active power P and reactive power Q with respect to voltage and save them to registers derivative_Pe, derivative_Pf, derivative_Qe, and derivative_Qf respectively, that is, derivative_Pe←-contri_Ge-contri_Bf, derivative_Pf←contri_Be-contri_Gf, derivative_Ue←0, derivative_Uf←0.

[0113] The partial derivative data written to the queue needs to record the column number GB_col_num of the current admittance value, assemble the power partial derivatives and column label values, and save them to the power partial derivative registers derivative_Pe_data, derivative_Pf_data, derivative_Ue_data, and derivative_Uf_data in the queue to be written respectively. That is, derivative_Pe_data←{derivative_Pe,2·GB_col_num - 1}, derivative_Pf_data←{derivative_Pf,2·GB_col_num}, derivative_Ue_data←{derivative_Ue, 2·GB_col_num - 1}, derivative_Uf_data←{derivative_Uf,2·GB_col_num}.

[0114] Synchronously raise the write enable signal of the active power partial derivative queue, w_derivative_P_FIFO←1. When the above power partial derivatives are not 0, write them to the queue respectively, and execute write_FIFO[derivative_P_FIFO,derivative_Pe_data] and write_FIFO[derivative_P_FIFO, derivative_Pf_data] in sequence. Then clear the write queue signal, w_derivative_P_FIFO←0.

[0115] Step 4, after the admittance matrix data of the target node row is read, complete the calculation of two rows of data in the Jacobian matrix, and write the data in the power partial derivative queue and voltage partial derivative queue into the memory (SDRAM).

[0116] As Figure 3 thefigure shows, the overall calculation of the Jacobian matrix includes two layers. The order is to calculate the lower triangular part of each row element first, and then calculate the upper triangular part. When calculating the power partial derivative of node i with respect to node j in the Jacobian matrix, when j < i, since the data read from the GB admittance matrix is the upper triangular part, in order to solve the power cumulative amount of i with respect to all other nodes in this row, it is necessary to first read out all nodes with column label values less than i from the lower triangular admittance value circular queue lower_tri_GB_FIFO, and calculate the power cumulative amount. After the power cumulative amount of nodes less than i is calculated, then read the data of the GB matrix to calculate the upper triangular part. The specific control flow and calculation method are as follows:

[0117] When the row number of the admittance matrix GB_row_num ranges from 1 to n - 1, the admittance values of the upper triangular matrix are read sequentially. First, start the circular queue lower_tri_GB_FIFO. If the column label value of the read data corresponds to the lower triangular part of the row where GB_row_num is located, then take out this data element for accumulation calculation; otherwise, reinsert this element at the end of the queue to wait for calculation when the column label of subsequent rows matches.

[0118] Set the column label of the lower triangular admittance matrix of the current row current_lower_GB_col ← 1. When current_lower_GB_col < GB_row_num, raise the read valid signal of the circular queue of lower triangular admittance values R_low_tri_GB_FIFO ← 1, read the first admittance value data in the circular queue first_GB ← read_FIFO[lower_tri_GB_FIFO], obtain the row label first_GB_row and column label first_GB_col of the current admittance value, first_GB_row ← first_GB[95:80], first_GB_col ← first_GB[79:64]. Lower the read queue signal, R_low_tri_GB_FIFO ← 0. Assign a value to the column label of the current lower triangular matrix, current_lower_GB_col ← first_GB_col.

[0119] This process is divided into the following two cases:

[0120] If it satisfies that the row number first_GB_row read from the circular queue of the lower triangular part of the admittance matrix is less than the row number GB_row_num of the current admittance matrix, and the column number first_GB_col read from the circular queue of the lower triangular part of the admittance matrix is equal to the row number GB_row_num of the current admittance matrix, it means that the calculation condition of the lower triangular part of the Jacobian matrix of the current row is satisfied, and power accumulation calculation can start. Specifically: assign the current value first_GB read from the circular queue of the lower triangular part of the admittance matrix to the conductance register and the susceptance register , ← first_GB[63:32], ← first_GB[31:0]. [[ID=X]]

[0121] Then, take out the node voltages corresponding to the column numbers of the lower triangular admittance values from the voltage register voltage_ef and , that is ←voltage_ef[first_GB_col][63:32], ←voltage_ef[first_GB_col][31:0]. Then calculate the mutual admittance corresponding to the row and column number of the current admittance matrix and and node voltage and Contribution value to partial derivative, save the intermediate results to 、 、 、 Four registers, namely , , , , finally, calculate the total power accumulation and ,Right now , .

[0122] Then, and Stored in the accumulator registers acc_M and acc_N with the current admittance matrix row number GB_row_num as the address, that is, acc_M[GB_row_num]←acc_M[GB_row_num]+ ,acc_N[GB_row_num]←acc_N[GB_row_num]+ At this point, the data of the lower triangular part in the admittance matrix queue GB_FIFO is calculated, accumulated and updated.

[0123] Finally, the lower triangular circular queue read signal R_low_tri_GB_FIFO is pulled high to start reading the admittance value in the next queue. At the same time, the queue data count register lower_GB_length is updated ← lower_GB_length-1.

[0124] If the column number first_GB_col read from the lower triangular circular queue of the admittance matrix is ​​not equal to the row number GB_row_num of the current admittance matrix, pull up the lower triangular circular queue read signal R_low_tri_GB_FIFO←1, continue to read the next data, and rewrite the currently read data first_GB to the end of the circular queue, pull up the lower triangular circular queue write signal W_low_tri_GB_FIFO←1, execute write_FIFO[low_tri_GB_FIFO,first_GB], and update the data number register lower_GB_length←lower_GB_length-1 in the queue.

[0125] After searching all rows of the admittance matrix row number GB_row_num, node i completes the calculation process for the lower triangular portion of other nodes. Next, based on the value of the lower_GB_length register (currently the number of remaining data in the lower triangular matrix queue, low_tri_GB_FIFO), the data in the queue is rewritten in a circular manner. When the value of the data count register, lower_GB_length, exceeds 0, the following steps are repeated until all remaining data has been written in a circular manner. The lower triangular circular queue read signal, R_low_tri_GB_FIFO←1, is pulled high. The first data in the queue is read and saved to the first_GB register, i.e., first_GB←read[low_tri_GB_FIFO]. The lower triangular circular queue write signal, W_low_tri_GB_FIFO←1, is pulled high. Write_FIFO[low_tri_GB_FIFO,first_GB] is executed, updating the queue data count register, lower_GB_length←lower_GB_length-1.

[0126] Each time the admittance value is read from the GB_FIFO queue, if it is the lower triangular part of the Jacobian current row data, the partial derivative is calculated and written to the active power partial derivative queue derivative_P_FIFO and the reactive power voltage partial derivative queue derivative_QU_FIFO.

[0127] If the column number of the lower triangular admittance matrix of the current row is current_lower_GB_col < the row number of the current admittance matrix GB_row_num, the column number value of the partial derivative and the number of data to be written into the queue are written into the register. The data bit length of the power partial derivative is 64 bits, the column number bit length is 32 bits, and the derivative_P_FIFO register is as follows [ ] format, with one data unit consisting of 24 bytes.

[0128] Set the counter count_row_P to indicate the number of data items written into the derivative_P_FIFO for the current row GB_row_num. Set the counter count_row_QU to indicate the number of data items written into the derivative_QU_FIFO for the current row GB_row_num. When the row of data is written, the counters are cleared, i.e., count_row_P←0 and count_row_QU←0. Convert count_row_P and count_row_QU into the row address of the Jacobian matrix in SDRAM and write them into the Jacobian row address offset pointer register jacoby_row_ptr[31:0][2(n-1):0]. Set the SDRAM write start address jacoby_head_addr for the Jacobian matrix and the SDRAM write burst length RW_burst_lengh←(count_row_P+count_row_QU)×12.

[0129] Set the first address of the Jacobian matrix row address pointer register jacoby_row_ptr[31:0][2(n-1):0] to jacoby_head_addr, jacoby_row_ptr[0]←jacoby_head_addr, where n represents the number of nodes.

[0130] When the data in row i is written into the partial derivative queue and the signal current_GB_row_done = 1 is completed, the data is split into bytes and written into SDRAM. The writing process is divided into two parts: active power data and reactive power voltage data.

[0131] When writing active power queue values ​​and column number values, specifically including:

[0132] The current admittance matrix row data calculation completion signal is pulled high, that is, current_GB_row_done←1, the active power partial derivative queue data counter count_read_P that has been read is initialized, that is, count_read_P←1, and the data split signal is pulled high, that is, data_P_split←1.

[0133] When the value of the read active power partial derivative queue data counter count_read_P is less than or equal to the number of data count_row_P written into the active power partial derivative queue derivative_P_FIFO in the current row, the following process is repeated:

[0134] Pull up the active power partial derivative queue read signal, that is, R_derivative_P_FIFO←1, read the active power value in the current queue, and save it to the register P_data, that is, P_data←read_FIFO[derivative_P_FIFO], take out the data in the register P_data twice, and save it to the SDRAM write data bus Wdata, that is, Wdata←P_data[63:32], Wdata←P_data[31:0], and then write the data on the write data bus Wdata into the jacoby_head_addr address cell in the SDRAM, that is, execute write_SDRAM[jacoby_head_addr,Wdata].

[0135] Next, the data in the active power column index queue P_col_FIFO is written. The active power column index queue P_col_FIFO read signal is pulled high (R_P_col_FIFO←1). The active power column index value P_col_data in the current queue is retrieved (P_col_data←read_FIFO[P_col_FIFO]). The active power column index value P_col_data is saved to the SDRAM write data bus Wdata (Wdata←P_col_data). The data on the write data bus Wdata is then written to the SDRAM address cell jacoby_head_addr (write_SDRAM[jacoby_head_addr,Wdata]). The active power partial derivative queue data counter count_read_P, which has been read, is updated (count_read_P←count_read_P+1). Finally, the active power partial derivative queue read signal R_derivative_P_FIFO←0) is cleared.

[0136] Finally, the number of nonzero elements in each row of the Jacobian matrix is ​​written. Based on the data read from the admittance matrix queue, the address offset of the nonzero data in each row during the Jacobian matrix calculation is recorded and written to the Jacobian matrix row address pointer register, jacoby_row_ptr. The active power, reactive power, and voltage data for node i are stored continuously in SDRAM at addresses [2i-1, 2i], respectively. Each unit of data is 12 bytes. The currently read admittance matrix row is numbered by the value in the GB_row_num register. The nonzero elements in the current Jacobian matrix row are stored at 2·GB_row_num-1. The current row address increment, count_row_P × 12, is written to the jacoby_row_ptr register: jacoby_row_ptr[2·GB_row_num-1]←jacoby_row_ptr[2·(GB_row_num-1)] + count_row_P × 12.

[0137] At this point, the data in the active power partial derivative queue derivative_P_FIFO and the active power column label queue P_col_FIFO have been written into the SDRAM.

[0138] When writing reactive power queue values ​​and column number values, specifically including:

[0139] Pull up the reactive power and voltage data split signal, that is, data_QU_split←1, and initialize the read reactive power and voltage partial derivative queue data counter, that is, count_read_QU←1.

[0140] When the value of the read reactive power and voltage partial derivative queue data counter count_read_QU is less than or equal to the number of data count_row_QU written into the reactive power and voltage partial derivative queue derivative_QU_FIFO in the current row, the following process is repeated:

[0141] Pull up the reactive power and voltage partial derivative queue read signal, that is, R_derivative_QU_FIFO←1, read the reactive power and voltage values ​​in the current queue, and save them to the register UQ_data, that is, QU_data←read_FIFO[derivative_QU_FIFO], take out the data in the register QU_data twice, and save them to the write data bus Wdata of SDRAM, that is, Wdata←QU_data[63:32], Wdata←QU_data[31:0], and then write the data on the write data bus Wdata into the jacoby_head_addr address cell in SDRAM, that is, execute write_SDRAM[jacoby_head_addr,Wdata].

[0142] Next, write the data in the reactive power and voltage column index queue QU_col_FIFO. Pull the reactive power and voltage column index queue QU_col_FIFO read signal high (R_QU_col_FIFO←1), retrieve the reactive power and voltage column index value QU_col_data from the current queue (QU_col_data←read_FIFO[QU_col_FIFO]), save the reactive power and voltage column index value QU_col_data to the SDRAM write data bus Wdata (Wdata←QU_col_data), and then write the data on the write data bus Wdata to the SDRAM address cell jacoby_head_addr (write_SDRAM[jacoby_head_addr,Wdata]). Update the currently read reactive power and voltage partial derivative queue data counter count_read_QU, that is, count_read_QU←count_read_QU+1, and finally clear the reactive power and voltage partial derivative queue read signal, that is, R_derivative_QU_FIFO←0.

[0143] Finally, the number of nonzero elements in each row of the Jacobian matrix is ​​written. Based on the current row data count, count_row_QU, the address offset of the nonzero data in each row during the Jacobian matrix calculation is recorded and written to the Jacobian matrix row address pointer register, jacoby_row_ptr. The currently read admittance matrix row number is the value in the GB_row_num register. The nonzero elements of the current Jacobian matrix row are stored at 2·GB_row_num. The current row address increment, count_row_QU × 12, is written to the jacoby_row_ptr register: jacoby_row_ptr[2·GB_row_num]←jacoby_row_ptr[2·GB_row_num-1]+count_row_QU × 12.

[0144] At this point, the data in the reactive power and voltage partial derivative queue derivative_QU_FIFO and the reactive power and voltage column number queue QU_col_FIFO have been written into the SDRAM.

[0145] It is not difficult to find that the present invention redesigns the calculation process of the Jacobian matrix, uses the coordinate mapping relationship between the admittance matrix and the Jacobian matrix to save the lower triangular admittance value of the target column to the circular queue, and dynamically updates the power accumulation value to the diagonal register, which greatly shortens the time of searching the admittance matrix when calculating the Jacobian lower triangular matrix. By designing the read-write control logic, the parallel pipeline dynamic incremental calculation of the Jacobian matrix and the power imbalance amount is realized, reducing the calculation time and storage resource consumption of the Jacobian matrix of large-scale networks.

[0146] A second embodiment of the present invention relates to an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned method for dynamically calculating the power flow Jacobian matrix and the power imbalance amount are implemented.

[0147] A third embodiment of the present invention relates to a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned method for dynamically calculating the power flow Jacobian matrix and the power imbalance amount.

[0148] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage) containing computer-usable program code.

[0149] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0150] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction method, which is implemented in the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0152] 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 modifications or substitutions that can be easily conceived by a person 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 based on the scope of protection of the claims.

Claims

1. A dynamic incremental calculation method for power flow Jacobian matrix and power imbalance, characterized in that: The following steps are involved: Calculate the power partial derivatives between the current node from_bus and the target node to_bus by row element, save the calculation results to the power partial derivative queue and the voltage partial derivative queue, and store the related lower triangular admittance value of the current node from_bus to the target node to_bus in the lower triangular circular queue of the admittance matrix, and synchronously write the power accumulation value of the target node to_bus to the power accumulation value register, where the number of the current node from_bus is less than the number of the target node to_bus; Take the first data from the lower triangular circular queue of the admittance matrix and compare whether the column number of the current data is the target node required by the current row; if it is the target node required by the current row, calculate the power partial derivative between the node pairs, write the calculation results into the power partial derivative queue and the voltage partial derivative queue first, and synchronously write the power accumulated value of the target node into the power accumulated value register; if it is not the target node required by the current row, rewrite the data from the end of the queue into the lower triangular circular queue of the admittance matrix; repeat this step until the data cycle in the lower triangular circular queue of the admittance matrix is ​​completed; According to the reading order of the data in the admittance matrix, the Jacobian matrix data and the power imbalance are calculated; When the admittance matrix data of the target node row is read, the calculation of the two rows of data in the Jacobian matrix is ​​completed, and the data in the power partial derivative queue and the voltage partial derivative queue are written into the memory.

2. The dynamic incremental calculation method for the power flow Jacobian matrix and the power imbalance according to claim 1 is characterized in that: The calculation of Jacobian matrix data and power imbalance according to the reading order of data in the admittance matrix specifically includes: Determine whether the row node number i and the column node number j of the read admittance matrix data are equal; If they are not equal, calculate the power partial derivative at position (i, j) in the Jacobian matrix and store it in the power partial derivative queue and the voltage partial derivative queue; If they are equal, after reading all the data in the i-th row, the diagonal partial derivative elements and the power and voltage imbalance of the i-th node are calculated by reading the cumulative sum register, and the diagonal data is saved in the Jacobi diagonal register.

3. The dynamic incremental calculation method for the power flow Jacobian matrix and the power imbalance according to claim 2, characterized in that: When calculating the diagonal partial derivative elements and the power and voltage imbalance of the i-th node by reading the cumulative sum register, if the node is a PQ node, the calculation process is as follows: Calculate the weighted value of the voltage contribution value to the total power based on the value read in the accumulated sum register; Calculating active power and reactive power according to the weighted value of the voltage contribution value to the total power, and calculating active power imbalance and reactive power imbalance according to the obtained active power and reactive power; Calculate the contribution of the current node's self-admittance and voltage to the partial derivative; Calculate the power contribution value based on the contribution value of the current node's self-admittance to the partial derivative; The partial derivatives of active power and reactive power with respect to voltage are calculated based on the power contribution value and the value read from the accumulated sum register.

4. The dynamic incremental calculation method for the power flow Jacobian matrix and the power imbalance according to claim 2, characterized in that: When calculating the diagonal partial derivative elements and the power and voltage imbalance of the i-th node by reading the cumulative sum register, if the node is a PU node, the calculation process is as follows: Calculate the weighted value of the voltage contribution value to the total power based on the value read in the accumulated sum register; Calculate the active power according to the weighted value of the voltage contribution to the total power, and calculate the active power imbalance according to the obtained active power; Calculating the sum of the squares of the voltages of the current nodes, and calculating the voltage square imbalance based on the sum of the squares of the voltages of the current nodes; Calculate the contribution of the current node's self-admittance and voltage to the partial derivative; Calculate the power contribution value based on the contribution value of the current node's self-admittance to the partial derivative; The partial derivative of active power with respect to voltage is calculated based on the power contribution value and the value read from the cumulative sum register, and the partial derivative of the square of voltage with respect to voltage is calculated based on the square of the voltage of the current node.

5. The dynamic incremental calculation method for the power flow Jacobian matrix and the power imbalance according to claim 1 is characterized in that: The calculation of two rows of data in the Jacobian matrix is ​​completed as follows: all nodes whose column number values ​​are less than the row number are read from the lower triangular circular queue of the admittance matrix, and the power accumulation amount is calculated. When the power accumulation amount of all nodes whose column number values ​​are less than the row number is calculated, the data of the admittance matrix is ​​read again to calculate the upper triangular part.

6. The dynamic incremental calculation method for the power flow Jacobian matrix and the power imbalance according to claim 5, characterized in that: The method of reading out all nodes whose column number value is less than the row number from the lower triangular circular queue of the admittance matrix and calculating the power accumulation amount, and when the power accumulation amount of all nodes whose column number value is less than the row number is calculated, reading the data of the admittance matrix and calculating the upper triangular part specifically includes: When the row number read from the lower triangular cyclic queue of the admittance matrix is ​​less than the row number of the current admittance matrix, and the column number read from the lower triangular cyclic queue of the admittance matrix is ​​equal to the row number of the current admittance matrix, the current value read from the lower triangular cyclic queue of the admittance matrix is ​​assigned to the conductance register and the admittance register, and the node voltage corresponding to the column number of the lower triangular admittance value is taken out from the voltage register; the contribution value of the mutual admittance and the node voltage corresponding to the row and column number of the current admittance matrix to the partial derivative is calculated, and the total power accumulation amount is calculated according to the contribution value; When the column number read from the lower triangular circular queue of the admittance matrix is ​​not equal to the row number of the current admittance matrix, the read signal of the lower triangular circular queue of the admittance matrix is ​​pulled high, the next data is continued to be read, and the currently read data is rewritten to the end of the lower triangular circular queue of the admittance matrix; when the row number of the lower triangular circular queue of the admittance matrix has searched all rows, the calculation of the lower triangular part is completed; according to the value of the current remaining data number register of the lower triangular circular queue, the data in the lower triangular circular queue is rewritten in a circular manner; when the value of the data number register is greater than zero, the following steps are repeated until all remaining data are written in a circular manner, the read signal of the lower triangular circular queue of the admittance matrix is ​​pulled high, the first data in the queue is read out and saved to the first data register, the write signal of the lower triangular circular queue of the admittance matrix is ​​pulled high, the value of the first data register is written to the end of the lower triangular circular queue of the admittance matrix, and the data number register in the queue is updated.

7. The dynamic incremental calculation method for the power flow Jacobian matrix and the power imbalance according to claim 1 is characterized in that: The data in the power partial derivative queue and the voltage partial derivative queue are written into the memory, including writing the active power queue value and the column label value, specifically: Pull high the signal indicating that the current admittance matrix row data calculation is complete, initialize the counter of the active power partial derivative queue data that has been read, and pull high the data split signal; When the value of the read active power partial derivative queue data counter is less than or equal to the number of data written into the active power partial derivative queue in the current row, the following process is repeated: Pull high the active power partial derivative queue read signal, read the active power value in the current active power partial derivative queue, and save it to the register P_data, take out the data in the register P_data twice, and save it to the write data bus of the memory, and then write the data on the write data bus to the Jacobian first address cell in the memory; Pull high the active power column label queue read signal, take out the active power column label value in the current active power column label queue, save the active power column label value to the write data bus of the memory, and then write the data on the write data bus to the Jacobian first address cell in the memory; Update the currently read active power partial derivative queue data counter and clear the active power partial derivative queue reading signal.

8. The dynamic incremental calculation method for the power flow Jacobian matrix and the power imbalance according to claim 1, characterized in that: The data in the power partial derivative queue and the voltage partial derivative queue are written into the memory, including writing the reactive power queue value and the column label value, specifically: Pull up the reactive power and voltage data segmentation signal to initialize the read reactive power and voltage partial derivative queue data counter; When the value of the reactive power and voltage partial derivative queue data counter that has been read is less than or equal to the number of data that have been written to the reactive power and voltage partial derivative queue in the current row, the following process is repeated: Pull high the reactive power voltage partial derivative queue read signal, read the reactive power voltage value in the current reactive power voltage partial derivative queue, and save it to the register UQ_data, take out the data in the register UQ_data twice, and save it to the write data bus of the memory, and then write the data on the write data bus to the Jacobian first address cell in the memory; Pull up the reactive power voltage column label queue read signal, take out the reactive power voltage column label value in the current reactive power voltage column label queue, save the reactive power voltage column label value to the write data bus of the memory, and write the data on the write data bus into the Jacobian first address cell in the memory; Update the reactive power and voltage partial derivative queue data counter currently read, and clear the reactive power and voltage partial derivative queue reading signal.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the processor implements the steps of the method for dynamically increasing the calculation of the power flow Jacobian matrix and the power imbalance amount as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for dynamically calculating the power flow Jacobian matrix and the power imbalance amount as claimed in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Apparatus, methods and systems for parallel power flow calculation and power system simulation

    CA2677384A1

  • Method for processing sparsity of AC (alternating current) / DC (direct current) hybrid grid tide current meter

    CN104485694A

  • Field programmable gate array (FPGA) load flow calculation system in matrix compression storage format

    CN117828242A

  • Compression, storage and calculation device for matrix double linked list

    CN119691235A

  • System for controlling a robotic device during walking, in particular for rehabilitation purposes, and corresponding robotic device

    EP2497610A1

Cited By

  • Dynamic increment calculation method for power flow Jacobian matrix of FPGA (Field Programmable Gate Array) symmetric structure

    CN121682002A