Multi-target heuristic load flow equation matrix optimal block calculation method and device
Through the optimal blocking calculation method of multi-objective heuristic flow equation matrix, the multi-objective genetic annealing algorithm is used to optimize the blocking structure of the Jacqueline matrix, which solves the problem of high resource consumption in the Jacqueline matrix decomposition process, and improves the efficiency and calculation ability of the trend calculation.
Patent Information
- Application Number
- CN202511096171.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-08-06
AI Technical Summary
In the current technology In the trend of large-scale power system computing, the decomposition process of the Jacques matrix consumes a large amount of computing resources and storage resources, resulting in challenges in computing power and storage resources.
The optimal blocking calculation method of multi-objective heuristic flow equation matrix is adopted. By constructing the optimal blocking model of Jacqueline matrix, and using the multi-objective genetic annealing algorithm to perform the optimal blocking calculation of Jacqueline matrix, the blocking division structure of Jacqueline matrix is optimized, with the goal of load balancing and the minimum total cost of sub-matrix calculation, reducing the number of non-zero element padding.
It improves the efficiency of trend computing, reduces storage resource consumption, speeds up matrix decomposition time, and improves computing power.
Smart Images

Figure CN120596776A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power flow calculation, and in particular to a multi-objective heuristic power flow equation matrix optimal block calculation method and device. 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] The Newton-Raphson (NR) method is a fundamental approach for solving linear algebraic equations and is also used in power flow calculations. With the advancement of computer technology, the NR power flow algorithm has become a classic in power system power flow calculations and remains the foundation of various power flow algorithms. Based on the operating characteristics of the distribution network, the NR method constructs a power flow calculation model for each node in the network, generates a Jacobian matrix, and uses the NR method to solve the power flow equation, thereby determining the power flow distribution of the distribution network.
[0004] 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 the real-time SCADA system network and telemetry transmission. The solution strategy for the linear equations is the matrix LU decomposition method, which adopts the PCI pipeline bus architecture and uses FPGA hardware to reduce the pivot search time and accelerate the LU decomposition.
[0005] This solution uses the NR method to solve power flow. When calculating the matrix decomposition of the sparse power flow equations, it uses the traditional LU decomposition method. Because the structure of the Jacobian matrix is not optimally partitioned, direct LU decomposition will produce a large number of non-zero elements. When the network node scale n is large, the dimension of the Jacobian matrix is 2(n-1) × 2(n-1). Since each iterative solution of the equation system requires a large number of matrix operations, it consumes a large amount of FPGA chip storage and computing resources, posing a significant challenge to both computing power and storage resources. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to provide a multi-objective heuristic power flow equation matrix optimal block calculation method and device, which can reduce resource consumption during matrix decomposition and speed up the efficiency of power flow equation matrix decomposition.
[0007] The technical solution adopted by the present invention to solve the technical problem is to provide a multi-objective heuristic power flow equation matrix optimal block calculation method, comprising the following steps:
[0008] With the goal of load balancing and minimizing the total cost of sub-matrix calculation, an optimal block model of the Jacobian matrix is constructed;
[0009] The objective function of the Jacobian matrix optimal block model is used as the fitness function of the multi-objective genetic annealing algorithm, and the Jacobian matrix optimal block calculation is performed to obtain the optimal block partitioning structure of the Jacobian matrix.
[0010] The objective function of the Jacobian matrix optimal block model includes a load balancing objective function and a sub-matrix calculation total cost objective function. The load balancing objective function minimizes the block weight of the maximum cost weight after the matrix is partitioned, and the sub-matrix calculation total cost objective function minimizes the total cost after the matrix is partitioned. The constraint conditions of the Jacobian matrix optimal block model include a weight balance constraint condition. The weight balance constraint condition means that the calculation weight of each sub-matrix after the matrix is partitioned does not exceed the preset maximum calculation imbalance.
[0011] The calculation process of the load balancing objective function includes:
[0012] Initialize the register that records the maximum value of the node weight in K blocks and the cumulative value register of all node weights, and repeat the following process for each block:
[0013] Take out the row storage first address of the k-th block and save it to the current address register, calculate the number of nodes in the k-th block, and save it to the node number register; initialize the block node number counter and the block node weight accumulation register;
[0014] When the value of the node number counter is less than or equal to the value in the node number register, the following process is repeated: the weight of the current node is taken from the node weight register at the address saved in the current address register, and is accumulated into the block node weight accumulation register, and the current address register and the node number counter are updated;
[0015] Save the value in the block node weight accumulation register to the weight register of the kth node, and add the weight of the current node to the accumulated value register of all node weights; if the weight of the current node is greater than the current maximum node weight, then use the weight of the current node as the current maximum node weight;
[0016] After executing the above process, calculate the average weight of the node;
[0017] Where k=1,2,...,K.
[0018] The calculation process of the sub-matrix total cost objective function includes:
[0019] Set the Jacobian matrix row number counter from 1 to 2(n-1) and repeat the following process to calculate the total cost of the Jacobian matrix:
[0020] Get the starting row address of the current row number from the Jacobi matrix row address pointer register and save it to the Jacobi address register;
[0021] Pull up the read signal of the synchronous dynamic random access memory, synchronously set the counter to count from 1 to 2 in a loop, read out data from the storage unit whose address is the Jacobi address register in the synchronous dynamic random access memory, and save it to the data bus. When the counter is 1 and 2, save the data on the data bus to the data value register and column number value register of the Jacobi matrix respectively; take out the block number to which the row number and column number at both ends of the current edge belong, and save them to two registers respectively; then compare and determine whether the values in the two registers are the same. If the values in the two registers are different, the current edge is a cut edge, and the cost of the current edge is accumulated to the matrix total cost accumulation register.
[0022] The judgment process of the weight balance constraint condition is as follows:
[0023] The maximum allowable weight imbalance is calculated based on the preset maximum allowable imbalance ratio, and the following process is repeated for each block:
[0024] Save the weight of the current k-th block to the current weight register, and determine whether the value in the current weight register satisfies the maximum allowable weight imbalance. If the value in the current weight register is greater than the maximum allowable weight imbalance, clear the weight balance constraint satisfaction indication register; where k = 1, 2, ..., K, where K is the number of blocks;
[0025] When performing the optimal block calculation of the Jacobian matrix, the block division generated by each iteration needs to check the value of the weight balance constraint satisfaction indication register. If the value of the weight balance constraint satisfaction indication register is 1, it means that the current partition meets the constraint. If the value of the weight balance constraint satisfaction indication register is zero, it means that the current partition does not meet the weight balance constraint and a new partition needs to be regenerated.
[0026] The objective function of the Jacobian matrix optimal block model is used as the fitness function of the multi-objective genetic annealing algorithm, and the Jacobian matrix optimal block calculation is performed to obtain the optimal block partition structure of the Jacobian matrix, specifically including:
[0027] Generate using a random number generator indivual Random numbers in the range, for chromosomes Use all The single chromosome encoding mode of dimensional variable dimensional splicing is expressed as ,in, represents the dimension of the problem to be solved, is the integer part of the solution to the problem to be solved, is the fractional part of the solution to the problem to be solved, represents the algebra of iterations;
[0028] Calculate the function value of each chromosome on the objective function of the Jacobian matrix optimal block model and obtain objective function vector;
[0029] Regarding the The objective function vectors are used to calculate the Pareto frontier of each layer respectively to obtain the front The set of individuals on the Pareto frontier;
[0030] Based on the The offspring chromosomes are selected by using a tournament method of pairwise comparison of the objective function vectors;
[0031] The selected offspring chromosomes are crossed in pairs, and the gene positions to be crossed are randomly generated at the integer and decimal positions according to each dimension. The chromosomes are recombined using a two-point crossover strategy to obtain the crossover chromosomes;
[0032] Perform an XOR operation on the crossover chromosome and the random number generated by the random number module to obtain the candidate mutant chromosome;
[0033] The candidate variant chromosome is compared with the Each individual in the set of individuals on the Pareto frontier is compared. If the candidate mutant chromosome is better than the previous For any individual in the set of individuals on the Pareto frontier, the candidate mutant chromosome is accepted according to the Metropolis criterion, otherwise the front is directly accepted. The set of individuals on the Pareto frontier;
[0034] Determine whether the simulated annealing inner loop is completed. If the preset number of iterations has not been reached, proceed to the step of performing pairwise crossover on the selected offspring chromosomes. Otherwise, determine whether the termination condition of the objective function of the optimal matrix partitioning is met. If so, output the calculation result. Otherwise, perform the simulated annealing cooling process and proceed to the step of calculating the function value of each chromosome on the objective function of the Jacobian matrix optimal partitioning model.
[0035] The candidate variant chromosomes accepted according to the Metropolis criteria specifically include:
[0036] Before calculation The average individual position of the set of individuals in the Pareto front surface, and calculate the Manhattan distance between the candidate variant chromosome and the average individual position;
[0037] Calculate the relationship between all individuals in the next Pareto front adjacent to the candidate mutation chromosome and the previous one. The average Manhattan distance of all corresponding individuals in the set of individuals in the Pareto front surface;
[0038] The value of the energy function of the candidate mutant chromosome is calculated, and a probability of accepting the mutant chromosome and a random number are generated. When the random number is less than the probability of accepting the mutant chromosome, an enable signal for controlling the acceptance of the mutant chromosome is generated.
[0039] The technical solution adopted by the present invention to solve the technical problem is to provide a multi-objective heuristic power flow equation matrix optimal block calculation device, comprising:
[0040] Jacobian matrix topology calculation module, used to build the Jacobian matrix optimal block model with the goal of load balancing and minimizing the total cost of sub-matrix calculation;
[0041] The multi-objective genetic annealing matrix optimal block calculation module is used to use the objective function of the Jacobian matrix optimal block model as the fitness function of the multi-objective genetic annealing algorithm, and perform the Jacobian matrix optimal block calculation to obtain the optimal block division structure of the Jacobian matrix.
[0042] 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 multi-objective heuristic power flow equation matrix optimal block calculation method are implemented.
[0043] The technical solution adopted by the present invention to solve its technical problem is: to provide an FPGA-based power flow parallel computing system, including the above-mentioned multi-objective heuristic power flow equation matrix optimal block computing device.
[0044] Beneficial effects
[0045] 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 takes load balancing and minimizing the total cost of sub-matrix calculation as the goals, constructs an optimal block model of the Jacobian matrix, and adopts a multi-objective genetic annealing algorithm to solve the optimal block model of the Jacobian matrix to obtain the optimal block partitioning result of the Jacobian matrix. According to the optimization objectives and constraints set by the optimal block model of the Jacobian matrix, the optimal block partitioning structure of the Jacobian matrix is iteratively calculated. Through this method, the number of non-zero element fillings generated when solving large-scale network sparse equations can be minimized, an optimal parallel matrix partitioning strategy is provided, storage resource consumption is reduced, the matrix decomposition time of the power flow equation is accelerated, and the power flow calculation efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 2. It is a schematic diagram of a multi-objective heuristic power flow equation matrix optimal block calculation device according to a first embodiment of the present invention;
[0047] Figure 2 Schematic diagram of the Jacobian submatrix block storage format in the first embodiment of the present invention;
[0048] Figure 3 This is a flowchart of the optimal block calculation of the multi-objective genetic annealing matrix in the first embodiment of the present invention;
[0049] Figure 4 is a schematic diagram of chromosome coding in the first embodiment of the present invention;
[0050] Figure 5 This is a framework diagram of the parallel implementation calculation process of MOGAOA in the first embodiment of the present invention;
[0051] Figure 6This is a flowchart of the MOFFM module implementation in the first embodiment of the present invention;
[0052] Figure 7 This is a flow chart of the population Pareto front calculation in the first embodiment of the present invention;
[0053] Figure 8 This is a calculation flow chart of the SM module in the first embodiment of the present invention;
[0054] Figure 9 This is a calculation flow chart of the CM module in the first embodiment of the present invention;
[0055] Figure 10 is a calculation flow chart of the Cross submodule in the first embodiment of the present invention;
[0056] Figure 11 This is a calculation flow chart of the MM module in the first embodiment of the present invention;
[0057] Figure 12 This is a calculation flow chart of the MAM module in the first embodiment of the present invention;
[0058] Figure 13 This is a calculation flow chart of the MASM module in the first embodiment of the present invention;
[0059] Figure 14 This is a calculation flow chart of the Avg F1 submodule in the first embodiment of the present invention;
[0060] Figure 15 This is a calculation flow chart of the Dist F1 submodule in the first embodiment of the present invention;
[0061] Figure 16 1 is a flowchart of the calculation of the Phi M submodule in the first embodiment of the present invention;
[0062] Figure 17 It is a schematic diagram of a fourth real-time FPGA-based power flow parallel computing system of the present invention. DETAILED DESCRIPTION
[0063] 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.
[0064] The first embodiment of the present invention relates to a multi-objective heuristic power flow equation matrix optimal block calculation device, such as Figure 1As shown, it includes a Jacobi matrix topology structure calculation module and a multi-objective genetic annealing matrix optimal block calculation module. The Jacobi matrix topology structure calculation module is used to construct a Jacobi matrix optimal block model with the load balance and the minimum total cost of sub-matrix calculation as the goals. It provides the calculation process of the sub-matrix calculation total cost objective function and the load balance objective, as well as the constraint conditions of the maximum imbalance of load calculation; the multi-objective genetic annealing matrix optimal block calculation module is used to use the objective function of the Jacobi matrix optimal block model as the fitness function of the multi-objective genetic annealing algorithm, and perform Jacobi matrix optimal block calculation to obtain the optimal block division structure of the Jacobi matrix.
[0065] This embodiment designs a graph storage structure for the Jacobian matrix in power flow calculation. For a system with n nodes, the Jacobian matrix is an asymmetric matrix of 2×(n-1) dimensions and an undirected graph consisting of 2×(n-1) nodes. Each node in the graph is It consists of PQ nodes and PV nodes. , the undirected graph generated by Jacobi is express, is the vertex set, , is and The set of edges consisting of the connecting edges between .
[0066] If the partial derivative between nodes i and j in the Jacobian matrix is non-zero, then and There is an edge between ,side The weight is ,set up .vertex Weight Set to the degree of node i, the degree of the node represents the connectivity between the current node and other nodes. In the Jacobian matrix optimal block method based on multi-objective genetic annealing proposed in this embodiment, the degree of Jacobian matrix node i is Equal to the number of edges connected to node i, defined as ,in, Represents all edges adjacent to node i A collection of , If the vertex and If there is an edge between ,on the contrary, .
[0067] The problem of optimal block partition of the Jacobian matrix for power flow calculation is defined as: finding a matrix block partition that satisfies the following conditions, such that each partition part , k = 1, 2, …, K, is a non - empty subset of the vertex set V of the original Jacobian matrix, that is . Any two partition subsets are disjoint, that is , for all 1 ≤ k < l ≤ K, and the union of all K parts is the vertex set V of the original Jacobian matrix, that is .
[0068] For the K - block partition problem of the Jacobian matrix, the optimal partition criterion is defined as follows:
[0069] (1) Balance criterion: that is .
[0070] For all k = 1, 2, …, K, where represents the sum of the weights of all vertices in the k - th partitioned sub - matrix, , represents the average weight of the nodes, , represents the average value of the weights of all K parts, reflecting the load balance of the calculations of each sub - matrix in the block partition. The computational task volume of the decomposition of each sub - matrix is kept as close as possible to improve the utilization rate of the system's computing resources. is the pre - set maximum allowable imbalance ratio, .
[0071] (2) Minimum total calculation cost criterion: If the two endpoints of an edge are located in two different partition parts, it is called a "cut - edge", otherwise it is called a "non - cut - edge".
[0072] Graph partition 's set of all cut - edges is , graph partition 's total calculation cost is expressed as the total size of the weights of the cut - edges, , where the set of cut - edges is .
[0073] For the above two criteria, the optimal block model of the Jacobian matrix constructed by the Jacobian matrix topology calculation module of this embodiment can be expressed as:
[0074] Objective function 1: ;
[0075] Objective function 2: ;
[0076] Constraint condition 1: .
[0077] Objective function 1 makes the matrix block The total cost is minimized, the data dependency between sub-matrices after matrix partitioning and the number of non-zero elements filled in the Jacobi matrix decomposition process are reduced, and resource consumption is reduced. Objective function 2 makes the matrix partitioning After that, minimizing the weight of the block with the maximum cost weight can minimize the cost of each sub-matrix and ensure that the computational workload of each sub-matrix is as balanced as possible. The constraint condition is that the matrix block After that, the calculation weight of each sub-matrix cannot exceed the preset maximum calculation imbalance.
[0078] This embodiment sets a Jacobian matrix partition number register partition[31:0][2(n-1)-1:0] to indicate the block number to which each node in the matrix belongs after the Jacobian matrix is partitioned, where n represents the number of nodes. The block number of the i-th node in the Jacobian matrix is partition[i]={k|k=1,2,…,K}, where K represents the number of blocks.
[0079] The calculation process of objective function 1 is: initial matrix block Divide the Jacobian matrix into K sub-matrices, and the block of the k-th sub-matrix It is a subset of node V. The submatrix number of node i is partition[i]={k|k=1,2,…,K}. Read the Jacobian matrix data from SDRAM in sequence and add them up to get the total cost. .set up The cumulative sum counter representing the total cost of cutting edges, reads each row of the matrix from SDRAM in turn according to the process of reading and writing the Jacobian matrix in SDRAM, determines the block sub-matrix number to which the neighbor node number belongs, and saves the cost of the current node cutting edge to the cumulative sum register The specific implementation process is as follows:
[0080] Set the Jacobian matrix row number counter row_i from 1 to 2(n-1) and repeat the following process to calculate the total cost of the Jacobian matrix.
[0081] The starting row address of the current row number row_i is retrieved from the Jacobian matrix row address pointer register jacoby_row_ptr and saved to the Jacobian address register jacoby_addr: jacoby_addr←jacoby_row_ptr[row_i]. The SDRAM read signal R_SDRAM_sig is pulled high to 1, and the cnt_t counter is simultaneously set to count from 1 to 2. Data is read from the memory cell at the Jacobian address register jacoby_addr in the SDRAM and saved to the data bus RW_SDRAM_data. When the cnt_t counter is 1 or 2, the bus data is saved to the Jacobian matrix data value register jacoby_data and the column number value register jacoby_col, respectively: RW_SDRAM_data←read_SDRAM[jacoby_addr]. That is, when cnt_t = 1, jacoby_data←RW_SDRAM_data; when cnt_t = 2, jacoby_col←RW_SDRAM_data. Take out the block numbers of the row number row_i and column number jacoby_col at both ends of the current edge and save them to registers respectively and ,Right now , . Then compare the registers and The value of , determines whether it belongs to different partitions, if ≠ , then the current edge is a cut edge, and the cost of the current edge is accumulated into the matrix total cost accumulation register ,Right now .
[0082] like Figure 2 As shown, it is the Jacobian sub-matrix block storage format. , a row compression linear storage structure is designed to represent the number and weight of the nodes in each sub-block, and the block row address pointer register p_row_ptr[31:0][K-1:0] stores each partition sub-block The starting storage address of the weight register p_weight[31:0][n-1:0] stores the weight of each node, and the number register p_data[31:0][n-1:0] stores the block number to which each node belongs, where n is the number of nodes.
[0083] The calculation process of objective function 2 is as follows:
[0084] Initialize the settings to record the maximum value of the node weight in K blocks, max_w_p, and the cumulative value of all node weights, w_sum_node, that is, max_w_p←0, w_sum_node←0. For blocks with partition number k=1,2,…,K, repeat the following process in sequence:
[0085] Take the row storage start address of the k-th block and save it to the current address register current_p_addr, that is, current_p_addr←p_row_ptr[k]. Calculate the number of nodes in the k-th block and save it to the p_num_node register, p_num_node←p_row_ptr[k+1]-p_row_ptr[k]. Initialize the block node number counter cnt_p and the block node weight accumulation register w_sum_p, that is, cnt_p←0, w_sum_p←0.
[0086] When the node number counter cnt_p is less than or equal to the number of nodes in the kth block, that is, the value of the node number counter is less than or equal to the value of the node number register, the following process is repeated: the weight of the current node is taken out from the node weight register p_weigth at the current address register curren_p_addr, and added to the block node weight accumulation register w_sum_p, that is, w_sum_p←w_sum_p+p_weight[curren_p_addr], and the current address register curren_p_addr and the node number counter cnt_p are updated, that is, curren_p_addr←curren_p_addr+1, cnt_p←cnt_p+1.
[0087] Then, the value in the block node weight accumulation register w_sum_p is saved to the weight register weight_p of the kth node, that is, weight_p[k]←w_sum_p. Then, the weight of the current node w_sum_p is accumulated to the accumulated value register w_sum_node of all node weights, that is, w_sum_node←w_sum_node+w_sum_p. If the value in the block node weight accumulation register w_sum_p is greater than the value in the current node weight maximum register max_w_p, the value in the current block node weight accumulation register w_sum_p is saved to the node weight maximum register max_w_p, that is, max_w_p←w_sum_p.
[0088] When all blocks have completed the above process, the average weight of the node is calculated ,Right now .
[0089] The above two processes calculate objective function 1 and objective function 2 respectively. In the calculation of the optimal block of the Jacobian matrix, it is necessary to maintain the validity of constraint condition 1. The judgment process of constraint condition 1 is as follows:
[0090] Set the maximum allowable imbalance ratio is 1.5;
[0091] Set the weight balance constraint satisfaction indication register satisfy_w_balance to 1;
[0092] Calculate the maximum allowable weight imbalance max_w← , for blocks k=1,2,…,K, repeat the following process in sequence:
[0093] Save the weight of the current k-th block to the current weight register current_weight_p, that is, current_weight_p←weight[k], and judge whether the current block weight current_weight_p satisfies the maximum allowable weight imbalance max_w. If the value in the current weight register current_weight_p is greater than the maximum allowable weight imbalance max_w, then clear the weight balance constraint satisfaction indication register, that is, satisfy_w_balance←0.
[0094] When performing the optimal block calculation of the Jacobian matrix, the block division generated by each iteration is It is necessary to check the value in the satisfying indicator register satisfy_w_balance of the weight balance constraint. If the value in the satisfying indicator register satisfy_w_balance is 1, it means that the current partition satisfies the constraint and the iterative calculation can continue. If the value in the satisfying indicator register satisfy_w_balance is 0, it means that the current partition does not meet the weight balance constraint and a new partition needs to be generated.
[0095] The multi-objective genetic annealing matrix optimal block calculation module in this embodiment adopts a heuristic method to make the Jacobian matrix from the initial random block At the beginning, after algorithm optimization iteration, the optimal block structure of the Jacobian matrix is finally given .
[0096] The heuristic method is a multi-objective genetic annealing algorithm, and its implementation process is as follows: Figure 3 The specific steps are as follows:
[0097] Step 1: Encode chromosomes. Considering the feasibility and efficiency of FPGA hardware implementation, a fixed-point decimal representation method is used, such as Figure 4 As shown in the figure, the specific approach is to solve the problem Dimensional variables are encoded continuously, and each dimension contains an H-bit integer part and an L-bit decimal part. Dimension variables have a total Bit by bit.
[0098] Step 2: Initialize the population ,individual Expressed as , initial temperature , the number of inner loops , the maximum number of iterations of the inner loop , mutation probability , cooling rate , population iteration algebra .
[0099] Step 3: For each individual , , calculate individual Function values on each target , forming a set of mapping values of the population on the objective function .
[0100] Step 4: Generally, the closer the solution is to the Pareto frontier, the greater the effect on population evolution. Considering the efficiency of calculation and the complexity of hardware circuit implementation, only the frontier is calculated. Pareto frontier, calculate the population objective function value set The Pareto frontier sequence of each layer , .
[0101] Step 5: Use the tournament method of pairwise comparison to calculate the chromosomes of offspring in the population For individuals and , the objective function value is and ,like ,but Entering the offspring population, if and If they are not mutually dominant, the winner is randomly selected.
[0102] Step 6: Enter the inner loop of the simulated annealing method, first perform the crossover and mutation operations of the individuals in the genetic algorithm, the crossover operator will and of The dimensional data is decomposed according to each dimension, and the gene position to be mutated is selected from the H-bit integer part and L-bit decimal part gene positions in each dimension, and then a two-point crossover operation is performed to form a new individual and ; Mutation operation according to mutation probability Select individuals to be mutated , then generate Random binary number of bits ,Will With the individual after cross Perform XOR operation to generate new individuals after mutation .
[0103] Then accept the Metropolis guidelines ,like Better than Pareto optimal frontier All individuals in , then accept Otherwise, with probability accept The Metropolis guidelines are as follows:
[0104] ;
[0105] in, The multi-objective Pareto frontier energy function is defined, which represents the generation of a new solution The change in energy after Calculate according to the following formula:
[0106] ;
[0107] here express and the optimal frontier Central location Manhattan distance. , express Middle The average position in the dimension, . The calculation is as follows:
[0108] ;
[0109] Indicates that the individual After Frontier With the first frontier The distance metric function between . , for All solutions in and The corresponding nearest solution The average Manhattan distance of Calculated according to the following formula:
[0110] .
[0111] Step 7: Determine whether the simulated annealing inner loop is completed. If , then go to step 8, otherwise , go to step 6.
[0112] Step 8: Determine whether the outer loop termination condition is met. If the iteration termination condition is met, output the calculation result; otherwise, perform simulated annealing cooling process. , and go to step 3.
[0113] like Figure 5 As shown, the multi-objective genetic annealing matrix optimal partitioning calculation module in this embodiment includes a population initialization module PIM, a multi-objective fitness function calculation module MOFFM, a Pareto frontier calculation module PFM, a selection module SM, a crossover module CM, a mutation module MM, a Metropolis acceptance module MAM, and a loop control module CCM. In the FPGA hardware circuit implementation, under the logical strategy control of the loop control module CCM, each module concurrently performs the numerical calculation operations executed by each chromosome. The specific process is as follows:
[0114] First, according to the solution accuracy of the multi-objective optimization problem to be solved, determine the integer and decimal places of the fixed-point decimal, respectively. represents the integer part, Indicates the decimal part. The population initialization unit PIM uses a random number generator to generate indivual A random number in the range. Figure 4 As shown, for chromosome Use all The single chromosome encoding mode of dimensional variable dimensional splicing is expressed as ,in, represents the dimension of the problem to be solved, is the integer part of the solution to the problem to be solved, is the fractional part of the solution to the problem to be solved, Represents an algebra of iterations.
[0115] Next, all chromosomes arrive At the same time, they are sent to the multi-objective fitness function calculation unit MOFFM respectively, and the function value of each chromosome on the objective function of the Jacobian matrix optimal block model is calculated by the multi-objective fitness function calculation unit MOFFM, that is, the function values of objective function 1 and objective function 2 are calculated, and then the function values of objective function 1 and objective function 2 are combined to obtain indivual dimensional objective function vector.
[0116] like Figure 6 As shown in the figure, the solution process of the multi-objective fitness function calculation unit MOFFM is as follows: the Split MOFFM module According to the dimension of problem variables Decompose into , and sent to the OFMK LUT unit for lookup table operation to calculate the function value on each target arrive , and then the concatenation module Concat MOFFM is used to perform bitwise combination of multiple objective function values to generate .
[0117] Then, indivual dimensional objective function vector arrive , and sent to the Pareto frontier calculation unit PFM at the same time. The Pareto frontier calculation unit PFM performs Pareto frontier calculations on the objective function vector at each layer. Considering the efficiency of FPGA hardware implementation, the frontier is calculated. The set of individuals on the Pareto frontier, ,here express The selection vector of individuals is 1, which means that the chromosome with the number is in the set of the i-th Pareto frontier. The set of individuals in the Pareto frontier is sent to the Metropolis criterion acceptance unit MAM to prepare for the calculation of acceptance probability in the subsequent simulated annealing process.
[0118] like Figure 7 As shown in the figure, the calculation process of the Pareto frontier calculation unit PFM is as follows: The multi-objective Pareto frontier calculation modules PFCM receive the remaining individual selection vector signals required to calculate the i-th frontier according to the process , calculate the optimal frontier hour, The initial signal is , indicating that all chromosomes are Pareto frontier surfaces Candidate solution, when the i-th frontier is calculated After that, it is necessary to remove the individuals that have been included in the frontier from the candidate solution set and calculate the Frontier When all the frontier solutions calculated before are needed 、 、…、 At the same time, it is sent to the AND gate to obtain the selection signal And send it to PFCM modules port, and finally find The individual number vector of the Pareto frontier. The P_ID port of the PFCM module indicates the number position of the candidate chromosome number sent to the module in the original population, and the candidate solution set signal of the i-th PFCM module Through the P_ID module, it is calculated And send it to the P_ID port.
[0119] Afterwards, the selection unit SM receives input from the population initialization unit PIM and the multi-objective fitness function unit MOFFM, and selects the offspring chromosomes using a pairwise comparison tournament method. arrive The calculation process of the selection unit SM is as follows Figure 8 As shown, the individual fitness value vector arrive First send them to two multiplexers respectively, and then and The random number generated is selected, and the number of random digits is And take the maximum value as N, select two individuals to be compared and , for the minimization optimization goal, generate the chip select signal of the winning individual And send it to the two-way selector to select the winning random number chip select signal , and then sent to the N-way individual selector to finally select the winning individual .
[0120] Then, the offspring chromosomes calculated by the selection unit SM are crossed in pairs through the crossover unit CM. The gene positions to be crossed are randomly generated at the integer and decimal positions according to each dimension, and the chromosome recombination is performed using the two-point crossover strategy. Figure 9 As shown, first and Perform splitting operations according to variable dimensions respectively, with a total of Cross-modules, Submodule calculation Cross-operation on dimensions forms and ,Will All chromosomes after crossover in the dimension are then sent to the splicing module and , and finally get the chromosome after crossover and , and then sent to the mutation unit MM block for mutation operation.
[0121] The submodule performs a two-point crossover operation in each dimension, such as Figure 10 As shown, a vector with both H and L bits set to 1 is generated, and then the integer part is shifted right by 1 to H, and the decimal part is shifted left by 1 to L. The shifted vectors are sent to two multiplexers at the same time, and the random number module and The number of bits generated is and The random number, and take the maximum value of H and L, select the random cross vector and , and then sent to the Concat HL module for bit splicing operation to form a chromosome cross vector , the other one is sent to the NOT gate to form , and The vector and Cross the integer and decimal parts respectively, and finally form the The vector after the cross in the dimension and .
[0122] In this embodiment, each mutation unit module MM is generated by a random number module. Generate random numbers ,and Perform an XOR operation, , is a candidate mutation chromosome. Random number module Generate random numbers and mutation probability Compare and generate chromosome variation enabling signals If the mutation condition is met, the chromosome is randomly mutated, otherwise the original chromosome remains unchanged, and the output is finally generated. ,like Figure 11 shown.
[0123] Afterwards, the Metropolis criterion acceptance unit MAM is responsible for judging the energy function increment of each chromosome generated by the inner loop crossover and mutation operations, such as Figure 12 As shown, the candidate solutions generated by comparison Is it better than the Pareto optimal frontier? Other solutions in and Each solution in the algorithm is judged to be dominant and the corresponding enable signal is output. . If For all If none of them hold true, then accept it directly. Otherwise, accept according to Metropolis guidelines .Will The enable signals are sent to the N OR module for OR operation at the same time, and the output is the enable signal , and sent to the two-way selector module, where D0 is the crossover mutation candidate solution and D1 is the solution calculated by the Metropolis criterion acceptance unit MASM This step finally outputs the optimal solution selected by the inner loop in a probabilistic manner at temperature T .
[0124] The calculation process of the Metropolis criterion acceptance unit MASM is as follows Figure 13 As shown, this module contains a total of frontier surfaces Average position Avg F1, distance from the average position of the frontier surface Dist F1, candidate solution The adjacent frontier and There are five sub-modules including distance Phi M, energy function Delta E, exponential function Exp, etc.
[0125] First, the Pareto frontier is calculated by the Avg F1 module (i.e. the first calculation subunit) The average position of individuals in , and then calculate the candidate solution through the Dist F1 module (i.e. the second computing subunit) and The Manhattan distance of The Phi M module (i.e., the third computing subunit) calculates the candidate solution The next Pareto front All solutions and The corresponding nearest solution The average Manhattan distance of , and then calculate the value of the candidate solution energy function through the Delta E module (that is, the fourth calculation knows) , and then generate the probability of accepting the candidate solution through the Exp module , the random number generation module generates random numbers , compare the probabilities and random numbers , when the random number Less than probability When the enable signal is generated Used to control the acceptance of candidate solutions .
[0126] Avg F1 submodule such as Figure 14 As shown, the front surface All individuals in arrive Decompose according to each dimension to produce arrive The sub-dimension vector of The sub-dimensional vectors are sent to the addition module Add and the division module Divd in each dimension in turn to obtain the average position vector in each dimension , and finally through Module to obtain the frontier The average position vector .
[0127] Figure 15 The Dist F1 submodule is shown, which converts the candidate solutions into and The average position Decompose according to each dimension, and then calculate the and Manhattan distance , and finally calculated by Man Dist .
[0128] Figure 16 The Phi M submodule is shown, which calculates the individual To the front The closest Manhattan distance Then find the average distance The energy function Delta E and exponential function Exp submodules are lookup table functions respectively.
[0129] Finally, the loop control unit CCM is responsible for the clock control, logic control, and termination conditions of the inner and outer loops of the entire matrix optimal block hardware circuit. First, it determines whether the inner loop of the simulated annealing is completed. If ,but , and transfer to the cross unit CM; otherwise, enter the outer loop termination condition judgment. If the termination condition of the objective function of the optimal matrix block is met, the calculation result is output. Otherwise, the simulated annealing cooling process is performed. , and transferred to the multi-objective fitness function calculation unit MOFFM.
[0130] It is not difficult to find that the present invention adopts a two-layer computing framework. The upper layer designs a graph storage structure of the Jacobian matrix, which is responsible for the calculation process of the sub-matrix calculation total cost target, load balancing target and maximum imbalance constraint. The lower layer designs a multi-objective genetic annealing Jacobian matrix optimal block partitioning calculation process. According to the optimization goals and constraints set by the upper layer, the optimal block partitioning structure of the Jacobian matrix is iteratively calculated. Through this method, the number of non-zero element fillings generated when solving large-scale network sparse equations can be minimized, providing an optimal parallel matrix partitioning strategy, reducing storage resource consumption, speeding up the matrix decomposition time of the tidal equation, and improving the efficiency of tidal calculation.
[0131] A second embodiment of the present invention relates to a multi-objective heuristic power flow equation matrix optimal block calculation method, comprising the following steps:
[0132] With the goal of load balancing and minimizing the total cost of sub-matrix calculation, an optimal block model of the Jacobian matrix is constructed;
[0133] The objective function of the Jacobian matrix optimal block model is used as the fitness function of the multi-objective genetic annealing algorithm, and the Jacobian matrix optimal block calculation is performed to obtain the optimal block partitioning structure of the Jacobian matrix.
[0134] The objective function of the Jacobian matrix optimal block model includes a load balancing objective function and a sub-matrix calculation total cost objective function. The load balancing objective function minimizes the block weight of the maximum cost weight after the matrix is partitioned, and the sub-matrix calculation total cost objective function minimizes the total cost after the matrix is partitioned. The constraint conditions of the Jacobian matrix optimal block model include a weight balance constraint condition. The weight balance constraint condition means that the calculation weight of each sub-matrix after the matrix is partitioned does not exceed the preset maximum calculation imbalance.
[0135] The calculation process of the load balancing objective function includes:
[0136] Initialize the register that records the maximum value of the node weight in K blocks and the cumulative value register of all node weights, and repeat the following process for each block:
[0137] Take out the row storage first address of the k-th block and save it to the current address register, calculate the number of nodes in the k-th block, and save it to the node number register; initialize the block node number counter and the block node weight accumulation register;
[0138] When the value of the node number counter is less than or equal to the value in the node number register, the following process is repeated: the weight of the current node is taken from the node weight register at the address saved in the current address register, and is accumulated into the block node weight accumulation register, and the current address register and the node number counter are updated;
[0139] Save the value in the block node weight accumulation register to the weight register of the kth node, and add the weight of the current node to the accumulated value register of all node weights; if the weight of the current node is greater than the current maximum node weight, then use the weight of the current node as the current maximum node weight;
[0140] After executing the above process, calculate the average weight of the node;
[0141] Where k=1,2,...,K.
[0142] The calculation process of the sub-matrix total cost objective function includes:
[0143] Set the Jacobian matrix row number counter from 1 to 2(n-1) and repeat the following process to calculate the total cost of the Jacobian matrix:
[0144] Get the starting row address of the current row number from the Jacobi matrix row address pointer register and save it to the Jacobi address register;
[0145] Pull up the read signal of the synchronous dynamic random access memory, synchronously set the counter to count from 1 to 2 in a loop, read out data from the storage unit whose address is the Jacobi address register in the synchronous dynamic random access memory, and save it to the data bus. When the counter is 1 and 2, save the data on the data bus to the data value register and column number value register of the Jacobi matrix respectively; take out the block number to which the row number and column number at both ends of the current edge belong, and save them to two registers respectively; then compare and determine whether the values in the two registers are the same. If the values in the two registers are different, the current edge is a cut edge, and the cost of the current edge is accumulated to the matrix total cost accumulation register.
[0146] The judgment process of the weight balance constraint condition is as follows:
[0147] The maximum allowable weight imbalance is calculated based on the preset maximum allowable imbalance ratio, and the following process is repeated for each block:
[0148] Save the weight of the current k-th block to the current weight register, and determine whether the value in the current weight register satisfies the maximum allowable weight imbalance. If the value in the current weight register is greater than the maximum allowable weight imbalance, clear the weight balance constraint satisfaction indication register; where k = 1, 2, ..., K, where K is the number of blocks;
[0149] When performing the optimal block calculation of the Jacobian matrix, the block division generated by each iteration needs to check the value of the weight balance constraint satisfaction indication register. If the value of the weight balance constraint satisfaction indication register is 1, it means that the current partition meets the constraint. If the value of the weight balance constraint satisfaction indication register is zero, it means that the current partition does not meet the weight balance constraint and a new partition needs to be regenerated.
[0150] The objective function of the Jacobian matrix optimal block model is used as the fitness function of the multi-objective genetic annealing algorithm, and the Jacobian matrix optimal block calculation is performed to obtain the optimal block partition structure of the Jacobian matrix, specifically including:
[0151] Generate using a random number generator indivual Random numbers in the range, for chromosomes Use all The single chromosome encoding mode of dimensional variable dimensional splicing is expressed as ,in, represents the dimension of the problem to be solved, is the integer part of the solution to the problem to be solved, is the fractional part of the solution to the problem to be solved, represents the algebra of iterations;
[0152] Calculate the function value of each chromosome on the objective function of the Jacobian matrix optimal block model and obtain objective function vector;
[0153] Regarding the The objective function vectors are used to calculate the Pareto frontier of each layer respectively to obtain the front The set of individuals on the Pareto frontier;
[0154] Based on the The offspring chromosomes are selected by using a tournament method of pairwise comparison of the objective function vectors;
[0155] The selected offspring chromosomes are crossed in pairs, and the gene positions to be crossed are randomly generated at the integer and decimal positions according to each dimension. The chromosomes are recombined using a two-point crossover strategy to obtain the crossover chromosomes;
[0156] Perform an XOR operation on the crossover chromosome and the random number generated by the random number module to obtain the candidate mutant chromosome;
[0157] The candidate variant chromosome is compared with the Each individual in the set of individuals on the Pareto frontier is compared. If the candidate mutant chromosome is better than the previous For any individual in the set of individuals on the Pareto frontier, the candidate mutant chromosome is accepted according to the Metropolis criterion, otherwise the front is directly accepted. The set of individuals on the Pareto frontier;
[0158] Determine whether the simulated annealing inner loop is completed. If the preset number of iterations has not been reached, proceed to the step of performing pairwise crossover on the selected offspring chromosomes. Otherwise, determine whether the termination condition of the objective function of the optimal matrix partitioning is met. If so, output the calculation result. Otherwise, perform the simulated annealing cooling process and proceed to the step of calculating the function value of each chromosome on the objective function of the Jacobian matrix optimal partitioning model.
[0159] The candidate variant chromosomes accepted according to the Metropolis criteria specifically include:
[0160] Before calculation The average individual position of the set of individuals in the Pareto front surface, and calculate the Manhattan distance between the candidate variant chromosome and the average individual position;
[0161] Calculate the relationship between all individuals in the next Pareto front adjacent to the candidate mutation chromosome and the previous one. The average Manhattan distance of all corresponding individuals in the set of individuals in the Pareto front surface;
[0162] The value of the energy function of the candidate mutant chromosome is calculated, and a probability of accepting the mutant chromosome and a random number are generated. When the random number is less than the probability of accepting the mutant chromosome, an enable signal for controlling the acceptance of the mutant chromosome is generated.
[0163] A third embodiment of the present invention relates to a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the multi-objective heuristic power flow equation matrix optimal block calculation method of the second embodiment are implemented.
[0164] The fourth embodiment of the present invention relates to a power flow parallel computing system based on FPGA, such as Figure 17 As shown, it includes a multi-objective heuristic power flow equation matrix optimal block calculation device according to the first embodiment.
[0165] 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.
[0166] 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.
[0167] 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.
[0168] 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 The steps for the function specified in one or more boxes.
[0169] 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 in 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 multi-objective heuristic power flow equation matrix optimal block calculation method, characterized by: The following steps are involved: With the goal of load balancing and minimizing the total cost of sub-matrix calculation, an optimal block model of the Jacobian matrix is constructed; The objective function of the Jacobian matrix optimal block model is used as the fitness function of the multi-objective genetic annealing algorithm, and the Jacobian matrix optimal block calculation is performed to obtain the optimal block partitioning structure of the Jacobian matrix.
2. The multi-objective heuristic power flow equation matrix optimal block calculation method according to claim 1 is characterized in that: The objective function of the Jacobian matrix optimal block model includes a load balancing objective function and a sub-matrix calculation total cost objective function. The load balancing objective function minimizes the block weight of the maximum cost weight after the matrix is partitioned, and the sub-matrix calculation total cost objective function minimizes the total cost after the matrix is partitioned. The constraint conditions of the Jacobian matrix optimal block model include a weight balance constraint condition. The weight balance constraint condition means that the calculation weight of each sub-matrix after the matrix is partitioned does not exceed the preset maximum calculation imbalance.
3. The multi-objective heuristic power flow equation matrix optimal block calculation method according to claim 2 is characterized in that: The calculation process of the load balancing objective function includes: Initialize the register that records the maximum value of the node weight in K blocks and the cumulative value register of all node weights, and repeat the following process for each block: Take out the row storage first address of the k-th block and save it to the current address register, calculate the number of nodes in the k-th block, and save it to the node number register; initialize the block node number counter and the block node weight accumulation register; When the value of the node number counter is less than or equal to the value in the node number register, the following process is repeated: the weight of the current node is taken from the node weight register at the address saved in the current address register, and is accumulated into the block node weight accumulation register, and the current address register and the node number counter are updated; Save the value in the block node weight accumulation register to the weight register of the kth node, and add the weight of the current node to the accumulated value register of all node weights; if the weight of the current node is greater than the current maximum node weight, then use the weight of the current node as the current maximum node weight; After executing the above process, calculate the average weight of the node; Where k=1,2,...,K.
4. The multi-objective heuristic power flow equation matrix optimal block calculation method according to claim 2 is characterized in that: The calculation process of the sub-matrix total cost objective function includes: Set the Jacobian matrix row number counter from 1 to 2(n-1) and repeat the following process to calculate the total cost of the Jacobian matrix: Get the starting row address of the current row number from the Jacobi matrix row address pointer register and save it to the Jacobi address register; Pull up the read signal of the synchronous dynamic random access memory, synchronously set the counter to count from 1 to 2 in a loop, read out data from the storage unit whose address is the Jacobi address register in the synchronous dynamic random access memory, and save it to the data bus. When the counter is 1 and 2, save the data on the data bus to the data value register and column number value register of the Jacobi matrix respectively; take out the block number to which the row number and column number at both ends of the current edge belong, and save them to two registers respectively; then compare and determine whether the values in the two registers are the same. If the values in the two registers are different, the current edge is a cut edge, and the cost of the current edge is accumulated to the matrix total cost accumulation register.
5. The multi-objective heuristic power flow equation matrix optimal block calculation method according to claim 2 is characterized in that: The judgment process of the weight balance constraint condition is as follows: The maximum allowable weight imbalance is calculated based on the preset maximum allowable imbalance ratio, and the following process is repeated for each block: Save the weight of the current k-th block to the current weight register, and determine whether the value in the current weight register satisfies the maximum allowable weight imbalance. If the value in the current weight register is greater than the maximum allowable weight imbalance, clear the weight balance constraint satisfaction indication register; where k = 1, 2, ..., K, where K is the number of blocks; When performing the optimal block calculation of the Jacobian matrix, the block division generated by each iteration needs to check the value of the weight balance constraint satisfaction indication register. If the value of the weight balance constraint satisfaction indication register is 1, it means that the current partition meets the constraint. If the value of the weight balance constraint satisfaction indication register is zero, it means that the current partition does not meet the weight balance constraint and a new partition needs to be regenerated.
6. The multi-objective heuristic power flow equation matrix optimal block calculation method according to claim 1 is characterized in that: The objective function of the Jacobian matrix optimal block model is used as the fitness function of the multi-objective genetic annealing algorithm, and the Jacobian matrix optimal block calculation is performed to obtain the optimal block partition structure of the Jacobian matrix, specifically including: Generate using a random number generator indivual Random numbers in the range, for chromosomes Use all The single chromosome encoding mode of dimensional variable dimensional splicing is expressed as ,in, represents the dimension of the problem to be solved, is the integer part of the solution to the problem to be solved, is the fractional part of the solution to the problem to be solved, represents the algebra of iterations; Calculate the function value of each chromosome on the objective function of the Jacobian matrix optimal block model and obtain objective function vector; Regarding the The objective function vectors are used to calculate the Pareto frontier of each layer respectively to obtain the front The set of individuals on the Pareto frontier; Based on the The offspring chromosomes are selected by using a tournament method of pairwise comparison of the objective function vectors; The selected offspring chromosomes are crossed in pairs, and the gene positions to be crossed are randomly generated at the integer and decimal positions according to each dimension. The chromosomes are recombined using a two-point crossover strategy to obtain the crossover chromosomes; Perform an XOR operation on the crossover chromosome and the random number generated by the random number module to obtain the candidate mutant chromosome; The candidate variant chromosome is compared with the Each individual in the set of individuals on the Pareto frontier is compared. If the candidate mutant chromosome is better than the previous For any individual in the set of individuals on the Pareto frontier, the candidate mutant chromosome is accepted according to the Metropolis criterion, otherwise the front is directly accepted. The set of individuals on the Pareto frontier; Determine whether the simulated annealing inner loop is completed. If the preset number of iterations has not been reached, proceed to the step of performing pairwise crossover on the selected offspring chromosomes. Otherwise, determine whether the termination condition of the objective function of the optimal matrix partitioning is met. If so, output the calculation result. Otherwise, perform the simulated annealing cooling process and proceed to the step of calculating the function value of each chromosome on the objective function of the Jacobian matrix optimal partitioning model.
7. The multi-objective heuristic power flow equation matrix optimal block calculation method according to claim 6 is characterized in that: The candidate variant chromosomes accepted according to the Metropolis criteria specifically include: Before calculation The average individual position of the set of individuals in the Pareto front surface, and calculate the Manhattan distance between the candidate variant chromosome and the average individual position; Calculate the relationship between all individuals in the next Pareto front adjacent to the candidate mutation chromosome and the previous one. The average Manhattan distance of all corresponding individuals in the set of individuals in the Pareto front surface; The value of the energy function of the candidate mutant chromosome is calculated, and a probability of accepting the mutant chromosome and a random number are generated. When the random number is less than the probability of accepting the mutant chromosome, an enable signal for controlling the acceptance of the mutant chromosome is generated.
8. A multi-objective heuristic power flow equation matrix optimal block calculation device, characterized in that: include: Jacobian matrix topology calculation module, used to build the Jacobian matrix optimal block model with the goal of load balancing and minimizing the total cost of sub-matrix calculation; The multi-objective genetic annealing matrix optimal block calculation module is used to use the objective function of the Jacobian matrix optimal block model as the fitness function of the multi-objective genetic annealing algorithm, and perform the Jacobian matrix optimal block calculation to obtain the optimal block division structure of the Jacobian matrix.
9. The multi-objective heuristic power flow equation matrix optimal block calculation device according to claim 8, characterized in that: The objective function of the Jacobi matrix optimal block model constructed by the Jacobi matrix topology structure calculation module includes a load balancing objective function and a sub-matrix calculation total cost objective function. The load balancing objective function minimizes the block weight of the maximum cost weight after the matrix is partitioned, and the sub-matrix calculation total cost objective function minimizes the total cost after the matrix is partitioned; the constraint conditions of the Jacobi matrix optimal block model constructed by the Jacobi matrix topology structure calculation module include a weight balance constraint condition. The weight balance constraint condition means that the calculation weight of each sub-matrix after the matrix is partitioned does not exceed the preset maximum calculation imbalance.
10. The multi-objective heuristic power flow equation matrix optimal block calculation device according to claim 9, characterized in that: The calculation process of the load balancing objective function includes: Initialize the register that records the maximum value of the node weight in K blocks and the cumulative value register of all node weights. Repeat the following process for each block: Take out the row storage first address of the k-th block and save it to the current address register, calculate the number of nodes in the k-th block, and save it to the node number register; initialize the block node number counter and the block node weight accumulation register; When the value of the node number counter is less than or equal to the value in the node number register, the following process is repeated: the weight of the current node is taken from the node weight register at the address saved in the current address register, and is accumulated into the block node weight accumulation register, and the current address register and the node number counter are updated; Save the value in the block node weight accumulation register to the weight register of the kth node, and add the weight of the current node to the accumulated value register of all node weights; if the weight of the current node is greater than the current maximum node weight, then use the weight of the current node as the current maximum node weight; After executing the above process, calculate the average weight of the node; Where k=1,2,...,K.
11. The multi-objective heuristic power flow equation matrix optimal block calculation device according to claim 9, characterized in that: The calculation process of the sub-matrix total cost objective function includes: Set the Jacobian matrix row number counter from 1 to 2(n-1) and repeat the following process to calculate the total cost of the Jacobian matrix: Get the starting row address of the current row number from the Jacobi matrix row address pointer register and save it to the Jacobi address register; Pull up the read signal of the synchronous dynamic random access memory, synchronously set the counter to count from 1 to 2 in a loop, read out data from the storage unit whose address is the Jacobi address register in the synchronous dynamic random access memory, and save it to the data bus. When the counter is 1 and 2, save the data on the data bus to the data value register and column number value register of the Jacobi matrix respectively; take out the block number to which the row number and column number at both ends of the current edge belong, and save them to two registers respectively; then compare and determine whether the values in the two registers are the same. If the values in the two registers are different, the current edge is a cut edge, and the cost of the current edge is accumulated to the matrix total cost accumulation register.
12. The multi-objective heuristic power flow equation matrix optimal block calculation device according to claim 9, characterized in that: The judgment process of the weight balance constraint condition is as follows: The maximum allowable weight imbalance is calculated based on the preset maximum allowable imbalance ratio, and the following process is repeated for each block: Save the weight of the current k-th block to the current weight register, and determine whether the value in the current weight register satisfies the maximum allowable weight imbalance. If the value in the current weight register is greater than the maximum allowable weight imbalance, clear the weight balance constraint satisfaction indication register; where k = 1, 2, ..., K, where K is the number of blocks; When performing the optimal block calculation of the Jacobian matrix, the block division generated by each iteration needs to check the value of the weight balance constraint satisfaction indication register. If the value of the weight balance constraint satisfaction indication register is 1, it means that the current partition meets the constraint. If the value of the weight balance constraint satisfaction indication register is zero, it means that the current partition does not meet the weight balance constraint and a new partition needs to be regenerated.
13. The multi-objective heuristic power flow equation matrix optimal block calculation device according to claim 8, characterized in that: The multi-objective genetic annealing matrix optimal block calculation module includes: Population initialization unit, used to generate random number generators indivual Random numbers in the range, for chromosomes Use all The single chromosome encoding mode of dimensional variable dimensional splicing is expressed as ,in, represents the dimension of the problem to be solved, is the integer part of the solution to the problem to be solved, is the fractional part of the solution to the problem to be solved, represents the algebra of iterations; The multi-objective fitness function calculation unit is used to calculate the function value of each chromosome on the objective function of the Jacobian matrix optimal block model, and obtain objective function vector; Pareto frontier calculation unit, used for the The objective function vectors are used to calculate the Pareto frontier of each layer respectively to obtain the front The set of individuals on the Pareto frontier; Select a unit for The offspring chromosomes are selected by using a tournament method of pairwise comparison of the objective function vectors; The crossover unit is used to cross over the selected offspring chromosomes in pairs, randomly generate the gene positions to be crossed at the integer and decimal positions according to each dimension, and use the two-point crossover strategy to perform chromosome recombination to obtain the chromosomes after crossover; The mutation unit is used to perform an XOR operation on the crossover chromosome and the random number generated by the random number module to obtain a candidate mutation chromosome; Metropolis criterion acceptance unit is used to compare the candidate variant chromosome with the previous Each individual in the set of individuals on the Pareto frontier is compared. If the candidate mutant chromosome is better than the previous For any individual in the set of individuals on the Pareto frontier, the candidate mutant chromosome is accepted according to the Metropolis criterion, otherwise the front is directly accepted. The set of individuals on the Pareto frontier; The loop control is the same, which is used to determine whether the simulated annealing inner loop is completed. If the preset number of iterations has not been reached, the process enters the crossover unit; otherwise, it determines whether the termination condition of the objective function of the optimal matrix partitioning is met. If so, the calculation result is output. Otherwise, the simulated annealing cooling process is performed and the process enters the multi-objective fitness function calculation unit.
14. The multi-objective heuristic power flow equation matrix optimal block calculation device according to claim 13, characterized in that: The Metropolis Criteria accepted units include: The first calculation subunit is used to calculate the front The average position of individuals in a set of individuals on the Pareto front surface; a second calculation subunit is used to calculate the Manhattan distance between the candidate variant chromosome and the average position of the individuals; The third calculation subunit is used to calculate the relationship between all individuals in the next Pareto front adjacent to the candidate mutation chromosome and the previous one. The average Manhattan distance of all corresponding individuals in the set of individuals in the Pareto front surface; The fourth computing subunit is used to calculate the value of the energy function of the candidate mutant chromosome, and generate a probability of accepting the mutant chromosome and a random number, and when the random number is less than the probability of accepting the mutant chromosome, generate an enable signal for controlling the acceptance of the mutant chromosome.
15. 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 multi-objective heuristic power flow equation matrix optimal block calculation method according to any one of claims 1 to 7 are implemented.
16. A FPGA-based power flow parallel computing system, characterized in that: It comprises a multi-objective heuristic power flow equation matrix optimal block calculation device as described in any one of claims 8-14.
Citation Information
Patent Citations
Mechanical arm path planning method based on simulated annealing genetic algorithm
CN108858198A
Krylov subspace dimensionality reduction power flow calculation solving system
CN119719586A
Matrix decomposition device and matrix decomposition method
US20190042543A1
Cited By
Method for generating optimal wide-interval frequency hopping sequence based on genetic algorithm
CN120880489A
Dynamic increment calculation method for power flow Jacobian matrix of FPGA (Field Programmable Gate Array) symmetric structure
CN121682002A