Power grid load flow calculation method based on intelligent optimization algorithm
By constructing a current prediction model and a load impact coefficient prediction model, combining a multi-objective optimization function model and a particle swarm algorithm, the problems of low efficiency and insufficient accuracy of power grid current calculation in the existing technology are solved, and more efficient and accurate power grid current calculation is achieved.
Patent Information
- Application Number
- CN202510013501.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-05-06
AI Technical Summary
The prior art has low calculation efficiency in power grid current calculation and fails to effectively consider instantaneous load changes, resulting in inaccurate calculation results.
The method based on intelligent optimization algorithm is adopted to construct a current prediction model and a load impact coefficient prediction model, and combine a multi-objective optimization function model and a particle swarm algorithm to perform grid current calculation. This method uses the predicted load data and weight factors to optimize the flow calculation results.
It improves the overall efficiency and accuracy of power grid current calculation, can better deal with instantaneous load changes, and improves the safety and stability of power grid operation.
Smart Images

Figure CN119940111A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power grid, and in particular to a grid power flow calculation method based on an intelligent optimization algorithm. Background Art
[0002] Power system flow calculation is a basic electrical calculation method used to study the steady-state operation of the power system. Its main task is to determine the operating status of the entire system according to specific operating conditions and network structure, including the voltage (amplitude and phase angle) of each bus, power distribution in the network, and power loss.
[0003] Power system flow calculation is a key tool in power system analysis and design, providing important support for the safe, stable and economical operation of power systems. With the continuous expansion of power grid scale and the increasing complexity of grid structure, the importance of power flow calculation in power system analysis and operation is also increasing.
[0004] However, the existing technology still has obvious deficiencies in the power grid flow calculation method. On the one hand, in the face of huge power grid data, the existing technology uses traditional algorithms for power flow calculation, which has low calculation efficiency and is time-consuming and labor-intensive, which will reduce the overall efficiency of the power grid flow calculation method; on the other hand, the existing technology does not take into account the impact of instantaneous load changes during the power flow calculation process, which will reduce the accuracy of the power grid flow calculation method.
[0005] Therefore, a power grid flow calculation method based on intelligent optimization algorithm is proposed. Summary of the invention
[0006] The purpose of the present invention is to provide a method for calculating power flow based on an intelligent optimization algorithm. First, the load data, useful power data and voltage amplitude data of the node are obtained; then, the useful power data is input into a pre-trained power flow prediction model to obtain predicted voltage amplitude data; then, the load impact prediction coefficient and the load data are input into a pre-trained load impact coefficient prediction model to obtain a final load impact coefficient; the load prediction value and load weight factor of each node are calculated based on the load impact information and the final load impact coefficient; finally, the useful power data, the voltage amplitude data and the predicted voltage amplitude data are input into a power flow calculation model, and a multi-objective optimization function model based on the load prediction value and the load weight factor and a particle swarm algorithm are used to perform power flow calculation to obtain a power flow calculation result.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A power grid flow calculation method based on an intelligent optimization algorithm, comprising:
[0009] Obtain load data, useful power data and voltage amplitude data of power grid nodes;
[0010] Constructing a power flow prediction model, inputting historical node power flow data into the power flow prediction model for training, and obtaining a final power flow prediction model;
[0011] Inputting the useful power data into the final power flow prediction model to obtain predicted voltage amplitude data;
[0012] Constructing a load impact coefficient prediction model, inputting the historical node load data into the load impact coefficient prediction model for training, and obtaining a load impact prediction coefficient;
[0013] Input the load data and the load impact prediction coefficient into the load impact coefficient prediction model, update the parameters, and obtain the final load impact coefficient; calculate the load prediction value and load weight factor of each node according to the load impact information and the final load impact coefficient;
[0014] The useful power data, the voltage amplitude data and the predicted voltage amplitude data are input into a power flow calculation model, and a power grid power flow calculation is performed using a multi-objective optimization function model based on the load prediction value and the load weight factor and a particle swarm algorithm to obtain a power grid power flow calculation result.
[0015] Furthermore, the load data includes: load status data and load impact data; the historical node flow data includes: historical power data and historical voltage data; the historical node load data includes: historical load status data and historical load impact data.
[0016] Furthermore, a power flow prediction model is constructed, and the historical node power flow data is input into the power flow prediction model for training. The specific implementation process of obtaining the final power flow prediction model includes:
[0017] Get historical node flow data;
[0018] Further, the historical power data in the historical node flow data is marked as a training sample; the historical voltage data in the historical node flow data is marked as a training label;
[0019] Further, the training samples are input into the power flow prediction model for training, and the parameters of the power flow prediction model are optimized with the goal of minimizing the training loss function to obtain a final power flow prediction model;
[0020] The training loss function is constructed based on the minimum absolute error between the voltage amplitude prediction value and the voltage amplitude in the training label, and the minimum absolute error between the voltage phase angle prediction value and the voltage phase angle in the training label.
[0021] Further, a load influence coefficient prediction model is constructed, the historical node load data is input into the load influence coefficient prediction model for training, and a load influence prediction coefficient is obtained; the load data and the load influence prediction coefficient are input into the load influence coefficient prediction model, and parameters are updated to obtain a specific implementation process of the final load influence coefficient.
[0022] Obtain historical node load data and current load data;
[0023] Further, the historical node load data is divided into a long-term training set and a short-term test set according to the length of the interval time;
[0024] Furthermore, the long-term training set is input into the load influence coefficient prediction model for training, the model parameters are optimized, and a pre-training model is obtained;
[0025] Further, the short-time test set is input into the pre-training model, and a load impact prediction coefficient is output;
[0026] Furthermore, the load data and the load impact prediction coefficient are input into the load impact coefficient prediction model, and the parameters are updated to obtain the final load impact coefficient.
[0027] Furthermore, the load impact information includes: meteorological information, population density information and sub-node load information; the final load impact coefficient includes: meteorological impact coefficient, population impact coefficient and sub-node impact coefficient.
[0028] Furthermore, the specific implementation process of calculating the load prediction value and the load weight factor of each node according to the load impact information and the final load impact coefficient includes:
[0029] Obtain the load impact information and final load impact coefficient of each node;
[0030] Further, the meteorological information, population density information and sub-node load information in the load impact information are respectively weighted and summed with the meteorological impact coefficient, population impact coefficient and sub-node impact coefficient in the final load impact coefficient to obtain the load forecast value of each node;
[0031] Furthermore, the difference between the load prediction value of each node and the load prediction threshold is compared with the allowable load deviation value to calculate the load weight factor.
[0032] Furthermore, the calculation formula of the load weight factor is:
[0033]
[0034] Wherein, LWF is the load weight factor; arctan() is the inverse tangent function; Δlb is the allowable load deviation value; lp th It represents the load prediction threshold; lp represents the load prediction value of each node.
[0035] Furthermore, the useful power data in the power data, the voltage amplitude data in the voltage data, and the predicted voltage amplitude data in the predicted voltage data are input into a power flow calculation model, and a multi-objective optimization function model based on the load prediction value and the load weight factor and a particle swarm algorithm are used to perform power grid power flow calculation, and the specific implementation process of obtaining the power grid power flow calculation result includes:
[0036] Obtaining useful power data, voltage amplitude data and predicted voltage amplitude data;
[0037] Inputting the useful power data, the voltage amplitude data and the predicted voltage amplitude data into a power flow calculation model for processing to obtain a power grid power flow calculation result;
[0038] The processing of the power flow calculation model includes:
[0039] The minimization of useful power loss and minimum voltage deviation of nodes are modeled using a multi-objective optimization function model based on load forecast values and load weight factors.
[0040] The multi-objective optimization function model after modeling is applied and combined with the particle swarm algorithm to optimize and adjust the solution result, and the power grid flow calculation result is output.
[0041] Furthermore, the objective function F(X) of the multi-objective optimization function model based on the load prediction value and the load weight factor satisfies the following formula:
[0042]
[0043] Where min represents the minimization function; f1 represents the useful power loss function; k represents the number of branch nodes in the power grid; LWF i It is represented as the load weight factor of node i; set(i) is represented as the sub-node set of node i; LWF j Expressed as the load weight factor of node j; V i represents the voltage amplitude of node i; G ij represents the conductance between nodes i and j; V j represents the voltage amplitude of node j; cos represents the cosine function; θ ij represents the voltage phase angle difference between nodes i and j; B ijrepresents the susceptance between nodes i and j; sin represents the sine function; f2 represents the voltage deviation function; l represents the number of nodes; V i * Indicates the voltage standard value of node i; lp i represents the load forecast value of node i; lp th Represents the load prediction threshold; V i p represents the predicted voltage amplitude of node i.
[0044] Furthermore, the specific implementation process of optimizing and adjusting by using the particle swarm algorithm combined with the multi-objective optimization function model includes:
[0045] Set the optimization goal of the particle swarm algorithm;
[0046] Furthermore, a group of particles are randomly generated, and each particle is assigned an initial position and velocity. The collection of these particles constitutes the initial particle swarm; at the same time, the global optimal position and optimal fitness are set;
[0047] Further, according to the current position and speed of the particle as well as the historical optimal position and the global optimal position, a particle swarm algorithm is used to update the position and speed of the particle;
[0048] Further, according to the updated particle position, the corresponding fitness value is calculated; at the same time, the local optimal position and the global optimal position are updated by comparing the fitness value;
[0049] Furthermore, when it is determined that the updated number of iterations is greater than the set maximum number of iterations, the optimization process is terminated; at the same time, the adjustment variable value corresponding to the global optimal position is output, that is, the power grid flow calculation result.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] 1. The present invention proposes a power flow prediction model for providing predicted voltage amplitude data for power flow calculation model input; the model is trained by using sampled historical node power flow data as training data, and learns the correlation between node power data and node voltage data from the historical data; then, the collected useful power data is input into the optimized power flow prediction model to obtain the predicted voltage amplitude data; the model combines historical power flow data and deep models, which can effectively improve the overall efficiency of the power grid power flow calculation method.
[0052] 2. The present invention proposes a load influence coefficient prediction function for providing load prediction data for the input of the flow calculation model; wherein, the load prediction data includes: load prediction value and load weight factor; the model inputs node load data and load influence prediction coefficient, and outputs the final load influence coefficient; wherein, the load influence prediction coefficient is obtained during model training; then, the load prediction data of each node is calculated based on the load influence information and the final load influence coefficient; the load prediction data reflects the predicted load state of the node and the predicted degree of influence on the load data; the model uses the load prediction data to make adjustments to the load change conditions during the flow calculation process, thereby improving the accuracy of the power grid flow calculation method.
[0053] 3. The present invention proposes a power flow calculation model for obtaining power grid power flow calculation results; the model first uses a multi-objective optimization function model based on load forecast data to minimize the active network loss and voltage deviation of the power grid node, and then uses a particle swarm algorithm combined with the multi-objective optimization function model to perform power grid power flow calculation and obtain calculation results; the model processes the input useful power, voltage amplitude and predicted voltage amplitude data to output the power flow calculation results; the power flow calculation model combines the predicted load state and information to flexibly respond to instantaneous load changes, which can improve the accuracy of the power grid power flow calculation method. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 A schematic diagram of a flow chart of a power grid flow calculation method based on an intelligent optimization algorithm of the present invention;
[0055] Figure 2 It is a structural schematic diagram of the power flow prediction model of the present invention;
[0056] Figure 3 It is a structural schematic diagram of the load influence coefficient prediction model of the present invention. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] Power system flow calculation is a basic electrical calculation method used to study the steady-state operation of the power system. Its main task is to determine the operating status of the entire system according to specific operating conditions and network structure, including the voltage (amplitude and phase angle) of each bus, power distribution in the network, and power loss.
[0059] Power system flow calculation is a key tool in power system analysis and design, providing important support for the safe, stable and economical operation of power systems. With the continuous expansion of power grid scale and the increasing complexity of power grid structure, the importance of power flow calculation in power system analysis and operation is also increasing.
[0060] However, the existing technology still has obvious deficiencies in the power grid flow calculation method. On the one hand, in the face of huge power grid data, the existing technology uses traditional algorithms for power flow calculation, which has low calculation efficiency and is time-consuming and labor-intensive, which will reduce the overall efficiency of the power grid flow calculation method; on the other hand, the existing technology does not take into account the impact of instantaneous load changes during the power flow calculation process, which will reduce the accuracy of the power grid flow calculation method.
[0061] Embodiment 1
[0062] The specific implementation process in the embodiment of the present application will be implemented by a power grid flow calculation method based on an intelligent optimization algorithm of the present invention, see Figure 1 A method for calculating power flow based on an intelligent optimization algorithm includes:
[0063] S10. Obtain node load data, useful power data and voltage amplitude data; at the same time, obtain historical node flow data and historical node load data from the historical database;
[0064] S20. Inputting the historical node flow data into the flow prediction model to obtain a final flow prediction model;
[0065] S30. Inputting the useful power data into the final power flow prediction model, and outputting the predicted voltage amplitude data;
[0066] S40. Input the historical node load data into the load influence coefficient prediction model for training to obtain the load influence prediction coefficient; then, input the load data and the load influence prediction coefficient into the load influence coefficient prediction model to obtain the final load influence coefficient;
[0067] S50. Calculate the load prediction value and load weight factor of each node according to the load impact information and the final load impact coefficient;
[0068] S60. Input the useful power data, the voltage amplitude data and the predicted voltage amplitude data into a power flow calculation model to obtain a power grid power flow calculation result.
[0069] Furthermore, a specific implementation process of a power grid flow calculation method based on an intelligent optimization algorithm is as follows:
[0070] Obtain load data, useful power data and voltage amplitude data of power grid nodes;
[0071] Constructing a power flow prediction model, inputting historical node power flow data into the power flow prediction model for training, and obtaining a final power flow prediction model;
[0072] Inputting the useful power data into the final power flow prediction model to obtain predicted voltage amplitude data;
[0073] Constructing a load impact coefficient prediction model, inputting the historical node load data into the load impact coefficient prediction model for training, and obtaining a load impact prediction coefficient;
[0074] Input the load data and the load impact prediction coefficient into the load impact coefficient prediction model, update the parameters, and obtain the final load impact coefficient; calculate the load prediction value and load weight factor of each node according to the load impact information and the final load impact coefficient;
[0075] The useful power data, the voltage amplitude data and the predicted voltage amplitude data are input into a power flow calculation model, and a power grid power flow calculation is performed using a multi-objective optimization function model based on the load prediction value and the load weight factor and a particle swarm algorithm to obtain a power grid power flow calculation result.
[0076] In this embodiment, a method for calculating power flow based on an intelligent optimization algorithm is proposed. First, the load data, useful power data and voltage amplitude data of the node are obtained; then, the useful power data is input into a pre-trained power flow prediction model to obtain predicted voltage amplitude data; then, the load impact prediction coefficient and the load data are input into a pre-trained load impact coefficient prediction model to obtain a final load impact coefficient; the load prediction value and load weight factor of each node are calculated based on the load impact information and the final load impact coefficient; finally, the useful power data, the voltage amplitude data and the predicted voltage amplitude data are input into a power flow calculation model, and a multi-objective optimization function model based on the load prediction value and the load weight factor and a particle swarm algorithm are used to perform power flow calculation to obtain a power flow calculation result; the present invention can improve the overall efficiency and accuracy of the power flow calculation method.
[0077] For the purpose of specific explanation, the following embodiments are described as follows:
[0078] Obtain load data, useful power data and voltage amplitude data of power grid nodes;
[0079] In this embodiment, the load data includes: load status data and load impact data; the load status data is used to reflect the state information, change status and type information of the load; the load impact data is used to measure the impact of factors such as meteorology, population and sub-nodes on the load.
[0080] Furthermore, a power flow prediction model is constructed, and the historical node power flow data is input into the power flow prediction model for training. The specific implementation process of obtaining the final power flow prediction model includes:
[0081] Acquire historical node flow data; wherein the historical node flow data includes: historical power data and historical voltage data;
[0082] Marking the historical power data in the historical node flow data as training samples; marking the historical voltage data in the historical node flow data as training labels;
[0083] Inputting the training samples into the power flow prediction model for training, optimizing the parameters of the power flow prediction model with the goal of minimizing the training loss function, and obtaining a final power flow prediction model;
[0084] The training loss function is constructed based on the minimum absolute error between the voltage amplitude prediction value and the voltage amplitude in the training label, and the minimum absolute error between the voltage phase angle prediction value and the voltage phase angle in the training label; the calculation formula of the training loss function is:
[0085]
[0086] Wherein, TLF represents the training loss function; n represents the number of training samples; V p It is represented as the predicted value of the voltage amplitude; V0 is represented as the voltage amplitude in the label; A p It is represented as the predicted value of the voltage phase angle; A0 is represented as the voltage phase angle in the label.
[0087] The structural diagram of the power flow prediction model in this embodiment is as follows Figure 2 As shown, it includes: an input layer, a multi-scale feature extraction layer, an LSTM layer, a fully connected fusion layer and an output layer; the input layer is used to convert data into a feature space to facilitate subsequent feature processing; the multi-scale feature extraction layer uses convolution kernels of 3×3, 5×5 and 7×7 sizes to extract multi-scale features; the LSTM layer is used to output multi-scale prediction features; the fully connected fusion layer performs channel fusion on the multi-scale prediction features, and then uses the fully connected layer to output the fusion features; the output layer is used to output the prediction results.
[0088] In this embodiment, a power flow prediction model is proposed to provide predicted voltage amplitude data for the input of the power flow calculation model; the model is trained by using the sampled historical node power flow data as training data, and learns the correlation between the node power data and the node voltage data from the historical data; then, the collected useful power data is input into the optimized power flow prediction model to obtain the predicted voltage amplitude data; the model combines the historical power flow data and the deep model, which can effectively improve the overall efficiency of the power grid power flow calculation method.
[0089] Further, a load influence coefficient prediction model is constructed, the historical node load data is input into the load influence coefficient prediction model for training, and a load influence prediction coefficient is obtained; the load data and the load influence prediction coefficient are input into the load influence coefficient prediction model, and parameters are updated to obtain a specific implementation process of the final load influence coefficient.
[0090] Obtain historical node load data and current load data;
[0091] Wherein, the historical node load data includes: historical load status data and historical load impact data; the load data includes: load status data and load impact data;
[0092] Further, the historical node load data is divided into a long-term training set and a short-term test set according to the length of the interval time;
[0093] Furthermore, the long-term training set is input into the load influence coefficient prediction model for training, the model parameters are optimized, and a pre-training model is obtained;
[0094] Further, the short-time test set is input into the pre-training model, and a load impact prediction coefficient is output;
[0095] Furthermore, the load data and the load impact prediction coefficient are input into the load impact coefficient prediction model, and the parameters are updated to obtain the final load impact coefficient.
[0096] The load influence coefficient prediction model in this embodiment is a dual-branch hybrid model; the structure of the hybrid model is as follows: Figure 3 As shown, it includes: an input layer, three convolutional layers, three Transformer layers and a fusion output layer; wherein the convolutional layer and the Transformer layer are in different branches, and output convolutional features and Transformer features respectively.
[0097] In this embodiment, a load influence coefficient prediction model is proposed to provide load prediction data for the input of the power flow calculation model; wherein, the load prediction data includes: load prediction value and load weight factor; the model inputs node load data and load influence prediction coefficient, and outputs a final load influence coefficient; wherein, the load influence prediction coefficient is obtained during model training; then, the load prediction data of each node is calculated based on the load influence information and the final load influence coefficient; the load prediction data reflects the predicted load state of the node and the predicted degree of influence on the load data; the model uses the load prediction data to make adjustments to the load change conditions during the power flow calculation process, thereby improving the accuracy of the power grid power flow calculation method.
[0098] Furthermore, the specific implementation process of calculating the load prediction value and the load weight factor of each node according to the load impact information and the final load impact coefficient includes:
[0099] Obtain the load impact information and final load impact coefficient of each node;
[0100] The load impact information in this embodiment includes: meteorological information, population density information and sub-node load information; the final load impact coefficient includes: meteorological impact coefficient, population impact coefficient and sub-node impact coefficient; the final load impact coefficient reflects the degree of influence of meteorology, population and sub-nodes on load information.
[0101] Further, the meteorological information, population density information and sub-node load information in the load impact information are respectively weighted and summed with the meteorological impact coefficient, population impact coefficient and sub-node impact coefficient in the final load impact coefficient to obtain the load forecast value of each node;
[0102] The calculation formula of the load prediction value is:
[0103] lp=ω qx *INF qx +ω rk *INF rk +ω fj *INF fj ;
[0104] Wherein, lp represents the load prediction value; ω qx Expressed as the meteorological influence coefficient; INF qx Represented as the meteorological information; ω rk Expressed as the population impact coefficient; INF rk Represented as the population density information; ω fj It is expressed as the influence coefficient of the sub-node; INF fjIt is represented as the load information of the sub-node; the influence coefficients are all obtained by outputting the load influence coefficient prediction model.
[0105] Further, the difference between the load prediction value of each node and the load prediction threshold is compared with the allowable load deviation value to calculate the load weight factor;
[0106] The calculation formula of the load weight factor is:
[0107]
[0108] Wherein, LWF is the load weight factor; arctan() is the inverse tangent function; Δlb is the allowable load deviation value; lp th It represents the load prediction threshold; lp represents the load prediction value of each node.
[0109] In this embodiment, the load prediction value and load weight factor of each node are obtained by weighting the collected load impact information and the load impact coefficient output by the load impact coefficient prediction model; the load prediction value and the load weight factor are used to provide adaptive weighted data to help the flow calculation model reduce the impact of instantaneous load changes.
[0110] In this embodiment, the load weight factor adopts the inverse tangent function, which can ensure that the value range is always maintained between (-1,1); the load weight factor uses the relationship between the difference between the load prediction value and the load prediction threshold and the load deviation value to correspond to different load conditions, which can effectively improve the accuracy of the power grid flow calculation method.
[0111] Furthermore, the useful power data in the power data, the voltage amplitude data in the voltage data, and the predicted voltage amplitude data in the predicted voltage data are input into a power flow calculation model, and a multi-objective optimization function model based on the load prediction value and the load weight factor and a particle swarm algorithm are used to perform power grid power flow calculation, and the specific implementation process of obtaining the power grid power flow calculation result includes:
[0112] Obtaining useful power data, voltage amplitude data and predicted voltage amplitude data;
[0113] Inputting the useful power data, the voltage amplitude data and the predicted voltage amplitude data into a power flow calculation model for processing to obtain a power grid power flow calculation result;
[0114] The processing of the power flow calculation model includes:
[0115] The minimization of useful power loss and minimum voltage deviation of nodes are modeled using a multi-objective optimization function model based on load forecast values and load weight factors.
[0116] The multi-objective optimization function model after modeling is applied and combined with the particle swarm algorithm to optimize and adjust the solution result, and the power grid flow calculation result is output.
[0117] In this embodiment, a power flow calculation model is proposed for obtaining power grid power flow calculation results; the model first uses a multi-objective optimization function model based on load forecast data to minimize the active network loss and voltage deviation of the power grid node, and then uses a particle swarm algorithm combined with the multi-objective optimization function model to perform power grid power flow calculation and obtain calculation results; the model processes the input useful power, voltage amplitude and predicted voltage amplitude data to output the power flow calculation results; the power flow calculation model combines the predicted load state and information to flexibly respond to instantaneous load changes, which can improve the accuracy of the power grid power flow calculation method.
[0118] Furthermore, the objective function F(X) of the multi-objective optimization function model based on the load prediction value and the load weight factor satisfies the following formula:
[0119]
[0120] Where min represents the minimization function; f1 represents the useful power loss function; k represents the number of branch nodes in the power grid; LWF i It is represented as the load weight factor of node i; set(i) is represented as the sub-node set of node i; LWF j Expressed as the load weight factor of node j; V i represents the voltage amplitude of node i; G ij represents the conductance between nodes i and j; V j represents the voltage amplitude of node j; cos represents the cosine function; θ ij represents the voltage phase angle difference between nodes i and j; B ij represents the susceptance between nodes i and j; sin represents the sine function; f2 represents the voltage deviation function; l represents the number of nodes; V i * Indicates the voltage standard value of node i; lp i represents the load forecast value of node i; lp th Represents the load prediction threshold; V i p represents the predicted voltage amplitude of node i.
[0121] The objective function of the multi-objective optimization function model in this embodiment models the useful power loss and voltage deviation of the node; in order to avoid instantaneous load changes interfering with the optimization process of the model, the useful power loss function and the voltage deviation function both additionally introduce load weight factors; at the same time, the objective function is combined with restrictions based on load prediction values to achieve better optimization effects, which can improve the accuracy of the power grid flow calculation method.
[0122] Furthermore, the specific implementation process of optimizing and adjusting by using the particle swarm algorithm combined with the multi-objective optimization function model includes:
[0123] Set the optimization goal of the particle swarm algorithm;
[0124] A group of particles are randomly generated, and an initial position and velocity are assigned to each particle. The collection of these particles constitutes the initial particle swarm; at the same time, the global optimal position and optimal fitness are set;
[0125] Using a particle swarm algorithm to update the position and velocity of the particle according to the current position and velocity of the particle as well as the historical optimal position and the global optimal position;
[0126] According to the updated particle position, the corresponding fitness value is calculated; at the same time, the local optimal position and the global optimal position are updated by comparing the fitness values;
[0127] When it is determined that the updated number of iterations is greater than the set maximum number of iterations, the optimization process ends; at the same time, the adjustment variable value corresponding to the global optimal position is output, that is, the power grid flow calculation result.
[0128] In this embodiment, the particle swarm algorithm is combined with a multi-objective optimization function model to compare and calculate fitness; at the same time, the advantages of the particle swarm algorithm such as group collaboration and fast convergence are used to improve the efficiency of obtaining the optimal position result, further improving the overall efficiency of the power grid flow calculation method.
[0129] Embodiment 2
[0130] The present invention proposes a power grid flow calculation method based on an intelligent optimization algorithm. In order to further verify the accuracy and effectiveness of the power grid flow calculation method, the present invention conducts two sets of accuracy tests on the traditional algorithm (Newton-Raphson method) and the algorithm of the present invention. The present invention selects two industrial parks A and B to conduct accuracy tests on flow calculation.
[0131] The present invention collects 6 years of tidal flow data and load data of Industrial Park A, takes the data of the 1st to 4th years as the long-term training set for model training, takes the data of the 5th year as the short-term verification set, and takes the data of the 6th year as the comparative test set; the sampling of training samples refers to the following rules: taking quarters as units, randomly extracting 50 days of data from each quarter; wherein, 2 groups of data are extracted every day in the morning, noon and evening; 5 groups of data are selected from the comparative test set table as test data, and two groups of data have instantaneous load mutations.
[0132] The present invention inputs the collected 1st to 5th year flow data of Industrial Park A into a flow prediction model for training and verification to obtain a final flow prediction model; inputs the useful power data in the 6th year data into the final flow prediction model to obtain predicted voltage amplitude data; then, inputs the 1st to 5th year load data into a load influence coefficient prediction model for training and verification to obtain a load influence prediction coefficient; inputs the load data in the 6th year data and the load influence prediction coefficient into the load influence coefficient prediction model, updates the parameters, and obtains a final load influence coefficient; then, calculates a load prediction value and a load weight factor based on the load influence information in the 6th year data and the final load influence coefficient; finally, inputs the useful power data, voltage amplitude data, and predicted voltage amplitude data in the 6th year data into a flow calculation model for flow calculation to obtain a flow calculation result.
[0133] The present invention compares the power flow calculation result with the actual power flow calculation result to obtain the power flow calculation accuracy of the algorithm of the present invention; then, the corresponding calculation result is obtained by using the traditional algorithm, and the calculated accuracy is compared with the power flow calculation accuracy of the algorithm of the present invention; Table 1 is the power flow calculation accuracy comparison result of Industrial Park A:
[0134] Table 1 Comparison results of power flow calculation accuracy of industrial park A
[0135]
[0136] From the results in Table 1, it can be seen that the accuracy of the flow calculation of the algorithm of the present invention is above 90% when there is no instantaneous load change, and the calculation result is better than that of the traditional algorithm. At the same time, compared with the traditional algorithm, the algorithm proposed by the present invention also has a strong adaptability to the instantaneous load mutation data, and the accuracy of the flow calculation is also about 90%, which can show that the present invention can effectively improve the accuracy of the power grid flow calculation method.
[0137] In order to further test the accuracy of the calculation results of the model, this embodiment also collected two years of data from another industrial park B. According to the same preprocessing method and division method, 4 groups of data were selected for testing, of which 2 groups of data had instantaneous load mutations. The comparison results of the power flow calculation accuracy are shown in Table 2.
[0138] Table 2 Comparison results of power flow calculation accuracy of industrial park B
[0139]
[0140] From the results in Table 2, it can be seen that although the data recognition accuracy has decreased because they are not in the same industrial park, this is due to insufficient model training caused by fewer training samples. The accuracy and calculation results of the flow calculation of the algorithm of the present invention with or without instantaneous load changes are better than those of the traditional algorithm.
[0141] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for calculating power flow based on intelligent optimization algorithm, characterized in that: include: Obtain load data, useful power data and voltage amplitude data of power grid nodes; Constructing a power flow prediction model, inputting historical node power flow data into the power flow prediction model for training, and obtaining a final power flow prediction model; Inputting the useful power data into the final power flow prediction model to obtain predicted voltage amplitude data; Constructing a load impact coefficient prediction model, inputting the historical node load data into the load impact coefficient prediction model for training, and obtaining a load impact prediction coefficient; Input the load data and the load impact prediction coefficient into the load impact coefficient prediction model, update the parameters, and obtain the final load impact coefficient; calculate the load prediction value and load weight factor of each node according to the load impact information and the final load impact coefficient; The useful power data, the voltage amplitude data and the predicted voltage amplitude data are input into a power flow calculation model, and a power grid power flow calculation is performed using a multi-objective optimization function model based on the load prediction value and the load weight factor and a particle swarm algorithm to obtain a power grid power flow calculation result.
2. The method for calculating power flow of a power grid based on an intelligent optimization algorithm according to claim 1, characterized in that: The load data includes: load status data and load impact data; the historical node flow data includes: historical power data and historical voltage data; the historical node load data includes: historical load status data and historical load impact data.
3. The method for calculating power flow based on intelligent optimization algorithm according to claim 1, characterized in that: The specific implementation process of constructing a power flow prediction model, inputting historical node power flow data into the power flow prediction model for training, and obtaining the final power flow prediction model includes: Get historical node flow data; Marking the historical power data in the historical node flow data as training samples; marking the historical voltage data in the historical node flow data as training labels; Inputting the training samples into the power flow prediction model for training, optimizing the parameters of the power flow prediction model with the goal of minimizing the training loss function, and obtaining a final power flow prediction model; The training loss function is constructed based on the minimum absolute error between the voltage amplitude prediction value and the voltage amplitude in the training label, and the minimum absolute error between the voltage phase angle prediction value and the voltage phase angle in the training label.
4. The method for calculating power flow based on intelligent optimization algorithm according to claim 1, characterized in that: The specific implementation process of constructing a load influence coefficient prediction model, inputting the historical node load data into the load influence coefficient prediction model for training to obtain a load influence prediction coefficient; inputting the load data and the load influence prediction coefficient into the load influence coefficient prediction model, updating parameters, and obtaining a final load influence coefficient includes: Obtain historical node load data and current load data; Dividing the historical node load data into a long-term training set and a short-term test set according to the length of the interval time; Inputting the long-term training set into the load influence coefficient prediction model for training, optimizing the model parameters, and obtaining a pre-trained model; Inputting the short-time test set into the pre-trained model, and outputting a load impact prediction coefficient; The current load data and the load impact prediction coefficient are input into the load impact coefficient prediction model, and the parameters are updated to obtain the final load impact coefficient.
5. The method for calculating power flow of a power grid based on an intelligent optimization algorithm according to claim 1, characterized in that: The load impact information includes: meteorological information, population density information and sub-node load information; the final load impact coefficient includes: meteorological impact coefficient, population impact coefficient and sub-node impact coefficient.
6. A method for calculating power flow based on intelligent optimization algorithm according to claim 1, characterized in that: The specific implementation process of calculating the load prediction value and the load weight factor of each node according to the load impact information and the final load impact coefficient includes: Obtain the load impact information and final load impact coefficient of each node; Performing a weighted sum operation on the meteorological information, population density information and sub-node load information in the load impact information and the meteorological impact coefficient, population impact coefficient and sub-node impact coefficient in the final load impact coefficient, respectively, to obtain a load forecast value for each node; The difference between the load prediction value of each node and the load prediction threshold is compared with the allowable load deviation value to calculate the load weight factor.
7. The method for calculating power flow based on intelligent optimization algorithm according to claim 6, characterized in that: The calculation formula of the load weight factor is: Wherein, LWF is the load weight factor; arctan() is the inverse tangent function; Δlb is the allowable load deviation value; lp th It represents the load prediction threshold; lp represents the load prediction value of each node.
8. The method for calculating power flow based on intelligent optimization algorithm according to claim 1, characterized in that: The useful power data in the power data, the voltage amplitude data in the voltage data, and the predicted voltage amplitude data in the predicted voltage data are input into the power flow calculation model, and the power grid power flow calculation is performed using the multi-objective optimization function model based on the load prediction value and the load weight factor and the particle swarm algorithm. The specific implementation process of obtaining the power grid power flow calculation result includes: Obtaining useful power data, voltage amplitude data and predicted voltage amplitude data; Inputting the useful power data, the voltage amplitude data and the predicted voltage amplitude data into a power flow calculation model for processing to obtain a power grid power flow calculation result; The processing of the power flow calculation model includes: The minimization of useful power loss and minimum voltage deviation of nodes are modeled using a multi-objective optimization function model based on load forecast values and load weight factors. The multi-objective optimization function model after modeling is applied and combined with the particle swarm algorithm to optimize and adjust the solution result, and the power grid flow calculation result is output.
9. The method for calculating power flow of a power grid based on an intelligent optimization algorithm according to claim 8, characterized in that: The objective function F(X) of the multi-objective optimization function model based on load prediction value and load weight factor satisfies the following formula: Where min represents the minimization function; f1 represents the useful power loss function; LWF i Expressed as the load weight factor of node i; LWF j Expressed as the load weight factor of node j; V i represents the voltage amplitude of node i; G ij represents the conductance between nodes i and j; V j represents the voltage amplitude of node j; θ ij represents the voltage phase angle difference between nodes i and j; B ij represents the susceptance between nodes i and j; f2 represents the voltage deviation function; V i * Indicates the voltage standard value of node i; lp i represents the load forecast value of node i; lp th Represents the load prediction threshold; V i p represents the predicted voltage amplitude of node i.
10. The method for calculating power flow based on intelligent optimization algorithm according to claim 1, characterized in that: The specific implementation process of optimizing and adjusting by using particle swarm algorithm combined with multi-objective optimization function model includes: Set the optimization goal of the particle swarm algorithm; A group of particles are randomly generated, and an initial position and velocity are assigned to each particle. The collection of these particles constitutes the initial particle swarm; at the same time, the global optimal position and optimal fitness are set; Using a particle swarm algorithm to update the position and velocity of the particle according to the current position and velocity of the particle as well as the historical optimal position and the global optimal position; According to the updated particle position, the corresponding fitness value is calculated; at the same time, the local optimal position and the global optimal position are updated by comparing the fitness values; When it is determined that the updated number of iterations is greater than the set maximum number of iterations, the optimization process ends; at the same time, the adjustment variable value corresponding to the global optimal position is output, that is, the power grid flow calculation result.