A reliable data-driven solution method for optimal power flow with strong generalization ability
By establishing a fixed and gradient relationship model of the optimal flow output and input, and combining the adaptive judgment mechanism, the generalization ability and computing efficiency of the optimal flow data-driven method are improved, and the concerns of system operators about the credibility of their solution results are solved, and its application in the power industry is promoted.
Patent Information
- Application Number
- CN202310570200.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-19
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2043-05-19
AI Technical Summary
The existing optimal trend data-driven methods are rarely used in the power industry, mainly because system operators do not trust the reliability of their solution results, including insufficient generalization performance of neural networks and lack of adaptive judgment methods.
By establishing a fixed relationship model and gradient relationship model between the optimal flow output and the input, a loss function considering the gradient relationship is constructed, and the neural network is trained using this loss function to obtain the optimal flow calculation neural network. At the same time, an adaptability judgment mechanism is introduced to judge the adaptability of the neural network to the input data through hidden layer feature decoding and reconstruction errors.
The ability of the optimal trend data-driven calculation method to adapt to changes in the penetration rate of new energy has been enhanced, the computing efficiency has been improved, and the credibility of the application of the optimal trend data-driven method in the power industry has been improved.
Smart Images

Figure CN116629110B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power systems and automation thereof, and in particular to a trusted data driven solution method for optimal power flow with strong generalization capability. Background Art
[0002] Optimal Power Flow (OPF) is an important tool for power system planning, economic dispatch, market clearing, etc. It optimizes the operation mode of flexible resources such as conventional generators, energy storage or grid topology to achieve predetermined goals, such as minimizing the operating cost of the power system and maximizing the consumption of clean energy. With the increasing penetration of renewable energy, the calculation of optimal power flow is becoming more and more frequent. In addition, in applications such as probabilistic analysis of power systems, a large number of optimal power flow calculations are required to cope with the uncertainty of renewable energy. Therefore, new methods for efficiently calculating optimal power flow have become a difficult problem of common concern in academia and industry.
[0003] The optimal power flow data-driven method has been a research hotspot in recent years. The optimal power flow data-driven method uses the powerful approximation ability of neural networks to directly map the optimal solution from the input of the optimal power flow. It has a fast calculation speed and is a breakthrough in improving the efficiency of optimal power flow calculations. The latest research results of scholars show that the optimal power flow data-driven method can transfer the computational burden to offline training, achieve the purpose of online rapid calculation of the optimal power flow results, and the results are very close to the calculation results of the traditional optimal power flow algorithm. However, so far, the optimal power flow data-driven method has been rarely used in the power industry. The main reason is that system operators do not trust the results of the optimal power flow data-driven method. There are two reasons why the results of the optimal power flow data-driven method are unreliable. One is that the generalization performance of the trained neural network is insufficient, and it is difficult to cover all scenarios of power system operation. The second is that there is a lack of methods to judge the adaptability of neural networks, and it is difficult to accurately judge the scenarios for which the optimal power flow data-driven method is not suitable. Summary of the invention
[0004] The purpose of the present invention is to provide a reliable data-driven solution method for optimal power flow with strong generalization capability, comprising the following steps:
[0005] 1) Establish a fixed relationship model between optimal power flow output and input;
[0006] 2) Optimizing the fixed relationship model between the optimal power flow output and input to obtain the gradient relationship model between the optimal power flow output and input;
[0007] 3) Establish a loss function that considers the gradient relationship between the optimal power flow output and input;
[0008] 4) Based on the loss function that considers the gradient relationship between the optimal power flow output and input, the optimal power flow output and input training set are used to train the neural network to obtain the optimal power flow calculation neural network;
[0009] 5) The input layer of the optimal power flow calculation neural network obtains input data and transmits the input data to the hidden layer of the optimal power flow calculation neural network;
[0010] 6) The hidden layer encodes the input data to obtain the optimal power flow hidden layer features, and then makes an adaptability judgment on the optimal power flow hidden layer features. If the optimal power flow calculation neural network is adapted to the optimal power flow hidden layer features, then proceed to step 7), otherwise, proceed to step 8);
[0011] 7) The hidden layer transmits the optimal power flow hidden layer features to the output layer, and solves to obtain the optimal power flow output;
[0012] 8) Use numerical calculation methods to solve the optimal power flow input characteristics to obtain the optimal power flow output, and write the optimal power flow input characteristics and output into the optimal power flow output and input training set, and return to step 4).
[0013] Furthermore, the fixed relationship model between the optimal power flow output and input is as follows:
[0014]
[0015] ste G P G =e D P D (2)
[0016]
[0017]
[0018] P L =M G P G -M D P D (5)
[0019] Where P G ,P D and P L represents the active power output of the unit, load and line active power flow; H1, H2 and H3 represent the cost coefficient matrix of the unit output; e G and e D A vector with 1 elements representing the dimension, number of units and number of loads; and * Indicates the upper and lower limits of *; M D and M GIndicates that P G and P D The relevant correlation matrix.
[0020] Furthermore, the gradient relationship model of the optimal power flow output and input is as follows:
[0021]
[0022] P G,i =g (7)
[0023]
[0024]
[0025]
[0026] Where M G,j and M D,j Represents the matrix M D and the matrix M G The jth row of the genset; g represents the upper or lower limit of the unit output; P G,i is the active output of the ith unit; Indicates the maximum or minimum transmission power reached by the jth line.
[0027] Furthermore, the loss function considering the gradient relationship between the optimal power flow output and input is as follows:
[0028] L=κ0L0+κ1L1+κ2L2+κ3L3+κ4L4+κ5L5 (11)
[0029] Among them, κ0, κ1, κ2, κ3, κ4, κ5 represent the weight coefficients of different loss function terms; L is the loss function considering the gradient relationship between the optimal power flow output and input;
[0030] Among them, the loss function term L0, the loss function term L1, the loss function term L2, the loss function term L3, the loss function term L4, and the loss function term L5 are as follows:
[0031] L0=E[(P G -P G ′) 2 ] (12)
[0032]
[0033]
[0034]
[0035]
[0036]
[0037] In the formula, Represents the input feature perturbation; represents the new input features of the neural network after adding disturbance; P G ″ represents the neural network output corresponding to the new input feature; P G ′ represents the unit output of the neural network. E[*] represents the expectation of *.
[0038] Furthermore, the step of making an adaptability judgment on the optimal power flow input characteristics includes:
[0039] 1) According to the optimal power flow hidden layer feature h hidden , use the mean square error loss function to train the optimal power flow hidden layer feature map to the input feature P D The decoding neural network ψ(·) of
[0040] 2) Calculate the decoding error error of the optimal power flow input feature, as shown in the following formula;
[0041]
[0042] Where P D,i represents the i-th element of the input eigenvector loading. ψ(h hidden ) represents the decoding neural network parameters; n is the number of elements;
[0043] 3) Determine the decoding error Is it true? If so, the optimal power flow calculation neural network is adaptable to the optimal power flow input characteristics; is the preset error threshold.
[0044] Furthermore, methods for training a neural network using the optimal power flow output and input training sets include SGD optimization algorithm and Adam optimization algorithm.
[0045] Furthermore, the numerical calculation method includes interior point method and Newton method.
[0046] Furthermore, the input data includes load size and new energy output size.
[0047] The technical effect of the present invention is unquestionable. The present invention enhances the adaptability of the optimal power flow data-driven calculation method to changes in the penetration rate of new energy sources, can accurately identify the adaptability of the data-driven neural network to samples, thereby improving the calculation efficiency of the optimal power flow, and can further promote the application of the optimal power flow data-driven method in the power industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a flowchart of neural network adaptability judgment based on hidden layer feature decoding and reconstruction;
[0049] Figure 2 A trusted data-driven solution framework for optimal power flow. DETAILED DESCRIPTION
[0050] The present invention is further described below in conjunction with the embodiments, but it should not be understood that the above subject matter of the present invention is limited to the following embodiments. Without departing from the above technical ideas of the present invention, various substitutions and changes are made according to the common technical knowledge and customary means in the art, which should all be included in the protection scope of the present invention.
[0051] Embodiment 1:
[0052] See also Figure 1 to Figure 2 , a reliable data-driven solution method for optimal power flow with strong generalization ability, including the following steps:
[0053] 1) Establish a fixed relationship model between optimal power flow output and input;
[0054] 2) Optimizing the fixed relationship model between the optimal power flow output and input to obtain the gradient relationship model between the optimal power flow output and input;
[0055] 3) Establish a loss function that considers the gradient relationship between the optimal power flow output and input;
[0056] 4) Based on the loss function that considers the gradient relationship between the optimal power flow output and input, the optimal power flow output and input training set are used to train the neural network to obtain the optimal power flow calculation neural network;
[0057] 5) The input layer of the optimal power flow calculation neural network obtains input data and transmits the input data to the hidden layer of the optimal power flow calculation neural network;
[0058] 6) The hidden layer encodes the input data to obtain the optimal power flow hidden layer features, and then makes an adaptability judgment on the optimal power flow hidden layer features. If the optimal power flow calculation neural network is adapted to the optimal power flow hidden layer features, then proceed to step 7), otherwise, proceed to step 8);
[0059] 7) The hidden layer transmits the optimal power flow hidden layer features to the output layer, and solves to obtain the optimal power flow output;
[0060] 8) Use numerical calculation methods to solve the optimal power flow input characteristics to obtain the optimal power flow output, and write the optimal power flow input characteristics and output into the optimal power flow output and input training set, and return to step 4).
[0061] Embodiment 2:
[0062] A reliable data-driven solution method for optimal power flow with strong generalization capability, the technical content is the same as that of Example 1, and further, the fixed relationship model between the optimal power flow output and input is as follows:
[0063]
[0064] ste G P G =e D P D (2)
[0065]
[0066]
[0067] P L =M G P G -M D P D (5)
[0068] Where P G ,P D and P L represents the active power output of the unit, load and line active power flow; H1, H2 and H3 represent the cost coefficient matrix of the unit output; e G and e D A vector with 1 elements representing the dimension, number of units and number of loads; and * Indicates the upper and lower limits of *; M D and M G Indicates that P G and P D The relevant correlation matrix.
[0069] Embodiment 3:
[0070] A reliable data-driven solution method for optimal power flow with strong generalization capability, the technical content is the same as any one of Embodiments 1-2, and further, the gradient relationship model between the optimal power flow output and input is as follows:
[0071]
[0072] P G,i =g (7)
[0073]
[0074]
[0075]
[0076] Where MG,j and M D,j Represents the matrix M D and the matrix M G The jth row of the genset; g represents the upper or lower limit of the unit output; P G,i is the active output of the ith unit; Indicates the maximum or minimum transmission power reached by the jth line.
[0077] Embodiment 4:
[0078] A trusted data-driven solution method for optimal power flow with strong generalization ability, the technical content is the same as any one of embodiments 1-3, and further, the loss function considering the gradient relationship between the optimal power flow output and input is as follows:
[0079] L=κ0L0+κ1L1+κ2L2+κ3L3+κ4L4+κ5L5 (11)
[0080] Among them, κ0, κ1, κ2, κ3, κ4, κ5 represent the weight coefficients of different loss function terms; L is the loss function considering the gradient relationship between the optimal power flow output and input;
[0081] Among them, the loss function term L0, the loss function term L1, the loss function term L2, the loss function term L3, the loss function term L4, and the loss function term L5 are as follows:
[0082] L0=E[(P G -P G ′) 2 ] (12)
[0083]
[0084]
[0085]
[0086]
[0087]
[0088] In the formula, Represents the input feature perturbation; represents the new input features of the neural network after adding disturbance; P G ″ represents the neural network output corresponding to the new input feature; P G ′ represents the unit output of the neural network. E[*] represents the expectation of *.
[0089] Embodiment 5:
[0090] A reliable data-driven solution method for optimal power flow with strong generalization capability, the technical content of which is the same as any one of Embodiments 1-4, and further, the step of adaptively judging the optimal power flow input feature comprises:
[0091] 1) According to the optimal power flow hidden layer feature h hidden , use the mean square error loss function to train the optimal power flow hidden layer feature map to the input feature P D The decoding neural network ψ(·) of
[0092] 2) Calculate the decoding error error of the optimal power flow input feature, as shown in the following formula;
[0093]
[0094] Where P D,i represents the i-th element of the input eigenvector loading. ψ(h hidden ) represents the decoding neural network parameters; n is the number of elements;
[0095] 3) Determine the decoding error Is it true? If so, the optimal power flow calculation neural network is adaptable to the optimal power flow input characteristics; is the preset error threshold.
[0096] Embodiment 6:
[0097] A method for solving an optimal power flow with strong generalization ability and credible data-driven solution, the technical content of which is the same as any one of Examples 1-5. Furthermore, a method for training a neural network using an optimal power flow output and an input training set includes an SGD optimization algorithm and an Adam optimization algorithm.
[0098] Embodiment 7:
[0099] A trusted data-driven solution method for optimal power flow with strong generalization capability, the technical content of which is the same as any one of Examples 1-6, and further, the numerical calculation method includes an interior point method and a Newton method.
[0100] Embodiment 8:
[0101] A trusted data-driven solution method for optimal power flow with strong generalization capability, the technical content of which is the same as any one of Examples 1-7, and further, the input data includes load size and new energy output size.
[0102] Embodiment 9:
[0103] An optimal power flow trusted data driven solution system with strong generalization capability, including a model building unit, a neural network training unit, and a power flow calculation unit;
[0104] The model building unit builds a fixed relationship model between the optimal power flow output and input, then optimizes the fixed relationship model between the optimal power flow output and input to obtain a gradient relationship model between the optimal power flow output and input, and transmits the model to the neural network training unit;
[0105] The neural network training unit establishes a loss function that considers the gradient relationship between the optimal power flow output and input;
[0106] Based on the loss function considering the gradient relationship between the optimal power flow output and input, the neural network training unit trains the neural network using the optimal power flow output and input training set to obtain the optimal power flow calculation neural network, and transmits it to the power flow calculation unit;
[0107] The power flow calculation unit inputs the input data into the input layer of the optimal power flow calculation neural network, and then transmits the input data to the hidden layer of the optimal power flow calculation neural network through the input layer;
[0108] The hidden layer encodes the input data to obtain the optimal power flow hidden layer characteristics, and then makes an adaptability judgment on the optimal power flow hidden layer characteristics. If the optimal power flow calculation neural network is adaptable to the optimal power flow hidden layer characteristics, the hidden layer transmits the optimal power flow hidden layer characteristics to the output layer, and solves to obtain the optimal power flow output. Otherwise, the optimal power flow input characteristics are solved by a numerical calculation method to obtain the optimal power flow output, and the optimal power flow input characteristics and output are written into the optimal power flow output and input training set.
[0109] When the optimal power flow trusted data-driven solution system with strong generalization capability is working, the steps of the method described in any one of Examples 1-8 are executed.
[0110] Embodiment 10:
[0111] A reliable data-driven solution method for optimal power flow with strong generalization capability, comprising the following steps:
[0112] First, according to the different constraints in the KKT conditions of the optimal power flow, three types of fixed modes of optimal power flow output and input are derived, such as the sum of the columns of the sensitivity matrix of the unit output and load is always equal to 1; then, based on the derived three types of fixed modes, the loss function of the neural network learning the three types of modes is established, and according to the characteristics of the mode, the loss function term of the input feature perturbation learning generalization performance is increased; then, the neural network is trained according to the proposed loss function to obtain an optimal power flow calculation neural network with strong generalization ability. Finally, based on the characteristics of the autoencoder that the reconstruction error of the same distribution data is small and the reconstruction error of the different distribution data is large, a neural network adaptability judgment method based on the reconstruction error of the hidden layer feature decoding is proposed to ensure the accuracy of the optimal power flow neural network solution. Finally, the proposed method is verified in the IEEE 30-node system, 57-node system, 118-node system, 300-node system and PEGASE test system. The specific method steps are as follows:
[0113] (1) Fixed mode of optimal power flow output and input
[0114] The present invention derives the fixed mode of optimal power flow output and input according to the type of constraints in the optimal power flow KKT condition. The present invention is mainly aimed at DC optimal power flow calculation, and its general physical model is shown in formula (2) to formula (6).
[0115]
[0116] ste G P G =e D P D (2)
[0117]
[0118]
[0119] P L =M G P G -M D P D (5)
[0120] Among them, P G ,P D and P L represents the active power output of the unit, load and line active power flow; H1, H2 and H3 represent the cost coefficient matrix of the unit output; e G and e D A vector with 1 elements representing the dimension, number of units and number of loads; and * Indicates the upper and lower limits of *; M D and MG Indicates that P G and P D The relevant correlation matrix.
[0121] The optimal power flow calculation is to add slack variables to the inequality constraints, establish the KKT equations, and then solve the KKT equations to obtain the optimal solution of the optimal power flow. In fact, even if there are a large number of constraints in the optimal power flow model, only a few constraints are effective. Usually, these effective constraints couple the outputs of different variables. The existing methods mainly use the effective constraints to construct the loss function to guide the neural network learning, but such loss functions only focus on the direct coupling relationship between the output variables. Therefore, some scholars further proposed a method to guide the neural network learning with the sensitivity between the optimal power flow output and input features. However, the high dimension of the sensitivity matrix with different values in different samples cannot effectively improve the generalization ability. Moreover, in large power systems, the sensitivity matrix calculation is very difficult, and there is a problem that the sensitivity matrix of the optimal power flow sample cannot be calculated. Therefore, the present invention derives the inherent gradient mode between the optimal power flow output and input by the type of effective constraints, and constructs the corresponding learning loss function to improve the generalization ability of the neural network. In the following content, three types of fixed modes are derived.
[0122] a. Fixed mode based on power balance constraints
[0123] For the power balance equation constraint, as shown in equation (2), P is D By taking partial derivatives, we can get formula (6). In formula (6), is the sensitivity matrix of unit output and load, then the sum of the columns of the sensitivity matrix is always equal to 1. Since equation (2) is valid for all samples, the first fixed mode of the optimal power flow output and input characteristics can be obtained, as shown in equation (6).
[0124]
[0125] b. Fixed mode based on upper and lower limit constraints of the unit
[0126] For the upper and lower limits of the unit output, when the output of the i-th unit reaches the upper or lower limit, equation (3) can be expressed as equation (7). D When partial derivatives are obtained, equation (8) can be obtained. From equation (8), it can be seen that when the unit output reaches the upper and lower limits, the row in the sensitivity matrix corresponding to the unit is always equal to 0, which is also the second fixed mode of the optimal power flow output and input characteristics.
[0127] P G,i =g (7)
[0128]
[0129] Wherein, g represents the upper or lower limit of the unit output.
[0130] c. Fixed mode based on the upper and lower limit constraints of the line flow
[0131] For the upper and lower limit constraints of the line flow, when the flow of the jth line reaches the upper or lower limit, we can get equation (9). D When partial derivatives are obtained, equation (10) can be obtained, which is the third fixed mode of the optimal power flow output and input characteristics.
[0132]
[0133]
[0134] Among them, M G,j and M D,j It is M D Matrix and M G The j-th row of the matrix.
[0135] (2) Learning method based on the optimal power flow fixed mode
[0136] The present invention constructs a learning method based on the optimal power flow fixed mode according to the derived optimal power flow fixed mode. Firstly, a loss function term based on sample labels and a sensitivity matrix is constructed, as shown in formula (11)-formula (12).
[0137] L0=E[(P G -P G ′) 2 ] (11)
[0138]
[0139] Among them, P G ′ represents the unit output of the neural network.
[0140] Then, according to the derived optimal power flow fixed mode, the penalty term of the guided loss function is constructed, as shown in equations (13) to (15).
[0141]
[0142]
[0143]
[0144] In addition, in the derived optimal power flow fixed mode, the first fixed mode is valid for all samples and does not require labels. Then the input features can be perturbed to enhance the neural network to learn the local neighborhood of the sample input feature space, and the following loss function term can be constructed.
[0145]
[0146] in, Represents the input feature perturbation; represents the new input features of the neural network after adding disturbance; P G ″ represents the neural network output corresponding to the new input feature.
[0147] Finally, the weighted sum of different loss function terms is performed to obtain the loss function considering the fixed mode of the optimal power flow, as shown in formula (17). The neural network is trained through optimization algorithms such as SGD and Adam to obtain an optimal power flow calculation neural network with strong generalization ability.
[0148] L=κ0L0+κ1L1+κ2L2+κ3L3+κ4L4+κ5L5 (17)
[0149] Among them, κ0~κ5 represent the weight coefficients of different loss function terms.
[0150] (3) Optimal power flow trusted data driven solution method
[0151] The present invention constructs a neural network adaptability judgment method and an optimal power flow trusted data driven solution framework based on a neural network trained by the proposed method.
[0152] The neural network adaptability judgment method is mainly based on the characteristics that the autoencoder has a small reconstruction error for the same distribution data and a large reconstruction error for the different distribution data. By judging the size of the reconstruction error of the hidden layer feature decoding, the adaptability of the neural network to the data is determined. The flowchart of the method is as follows Figure 1 As shown in the figure, when the decoding error is less than the given threshold, the neural network is judged to be suitable for the sample, and its solution is accurate and reliable. When the decoding error is greater than the given threshold, the neural network is judged to be unsuitable for the sample, and the solution is unreliable, and a numerical calculation method is needed to replace it. And expand the unsuitable samples to the sample training set to further improve the generalization ability of the neural network. Therefore, the optimal power flow trusted data driven solution framework is as follows Figure 2 shown.
[0153] Embodiment 11:
[0154] The verification experiment of a trusted data-driven solution method for optimal power flow with strong generalization ability is as follows:
[0155] The basic data of the system in this embodiment refers to the IEEE 30-node system. Wind farms and photovoltaic power plants are added to the system to take into account the uncertainty of renewable energy. Assume that the wind speed follows the Weibull distribution with a scale parameter of 2.016 and a shape parameter of 5.089. The solar irradiance follows the Beta distribution with α=2.06 and β=2.5. The change in the penetration rate of new energy is simulated by changing the maximum output of wind turbines and photovoltaic units. Assume that the load follows a normal distribution with a standard deviation of 0.2 and a mean of the system default load.
[0156] In this embodiment, the comparison method is shown in Table 1. All methods use the same neural network architecture, that is, a fully connected neural network with three hidden layers, each hidden layer containing 200 neurons. The Adam optimizer is used to train the neural network under the Tensorflow deep learning framework. The probability accuracy is the probability that the neural network prediction error is less than the threshold. In this embodiment, the threshold of the unit output size is 1MW.
[0157] Table 1 Description of different methods
[0158]
[0159] Table 2 Test accuracy of different methods in IEEE 30-bus system
[0160]
[0161] Through random sampling, 10,000 training samples were collected at a new energy penetration rate of 35.58% and 2,000 test samples were collected at new energy penetration rates of 35.58%, 40.71%, and 47.24%. The test results are shown in Table 2. It can be observed from Table 2 that the proposed learning method considering fixed mode guidance can improve the accuracy of optimal power flow calculation to 92.66%, and by adding the loss function term of perturbation learning, it can be further improved to 97.94%. Therefore, the neural network trained by the proposed method can have higher calculation accuracy at different penetration rates, which verifies the effectiveness of the proposed method in improving the generalization ability of neural networks.
[0162] Embodiment 12:
[0163] The verification experiment of a trusted data-driven solution method for optimal power flow with strong generalization ability is as follows:
[0164] This embodiment is further tested on the IEEE 57-node system, the IEEE 118-node system, the IEEE 300-node system, and the PEGASE 1354-node system to verify the effectiveness of the proposed learning method in improving the generalization ability of the neural network. The setting of the embodiment is the same as that of embodiment 1, mainly in that the number of neurons in the hidden layer is modified. The neural network is trained by using 10,000 samples at a lower new energy penetration rate and tested using 2,000 samples at two higher new energy penetration rates. The test results are shown in Table 3.
[0165] Table 3 Test accuracy of different methods in different systems
[0166]
[0167] It can be observed from Table 3 that in complex power systems, when the penetration rate of renewable energy in the IEEE 118-node system increases by 1.8%, the traditional methods and even sensitivity learning cannot guarantee the accuracy of the test. The adaptation range of the penetration rate is very narrow and cannot cope with the high uncertainty in the new power system. On the contrary, the inherent mode learning with the addition of random disturbances can increase the adaptation range of the penetration rate and significantly enhance the adaptability of practical applications in new power systems. However, in the PEGASE1354-node system, the accuracy of all compared methods exceeds 90%. This is because there are many generators with small capacities and they are always at maximum and minimum power generation. In this case, the proposed method still has the highest accuracy than other methods. Overall, compared with M2 and M3, M5 can improve the calculation accuracy of different distribution data by an average of 30.19%, verifying the effectiveness of the proposed method in improving the generalization ability of neural networks.
[0168] Embodiment 13:
[0169] The verification experiment of a trusted data-driven solution method for optimal power flow with strong generalization ability is as follows:
[0170] This embodiment judges the adaptability of the neural network on top of the neural network trained in Embodiment 10. It mainly trains the neural network whose hidden layer maps the optimal power flow input features by taking the features of the penultimate hidden layer of the trained neural network as the input features of the decoding neural network, and judges the adaptability of the optimal power flow calculation neural network by judging the decoding error of the decoding neural network during operation. Table 4 shows the test accuracy of M5 before and after adding the neural network adaptability judgment.
[0171] Table 4 Test accuracy of M5 before and after adding neural network adaptability judgment
[0172]
[0173] In Table 4, except for the renewable energy penetration rate of 44.26% in the IEEE 118-node system, the accuracy of M5's adaptive judgment for different distribution data can be improved to 98%. But in this case, adaptive judgment improves the prediction accuracy from 59.47% to 95.37%, and the accuracy is improved by 35.9%. Compared with other state-of-the-art methods, their accuracy is only between 34.08% and 94.50% on the same set of test data, see Table 3. In addition, in Table 4, as the penetration rate of renewable energy increases, the number of discarded samples also increases. However, as the number of unsuitable data in the training samples increases, the distribution of training data will be similar to the working conditions, and the discarded samples will become fewer. For example, the number of discarded samples in the same distribution data of the test 4 power systems is 0. In summary, with the joint efforts of inherent pattern learning and adaptive judgment, when the penetration rate of renewable energy changes, the accuracy of the data-driven method can be effectively guaranteed, and the credibility of the optimal power flow data-driven solution results is improved, which verifies the effectiveness of the method proposed in this invention.
Claims
1. A reliable data-driven solution method for optimal power flow with strong generalization ability, characterized by: The following steps are involved: 1) Establish a fixed relationship model between optimal power flow output and input; 2) Optimizing the fixed relationship model between the optimal power flow output and input to obtain the gradient relationship model between the optimal power flow output and input; 3) Establish a loss function that considers the gradient relationship between the optimal power flow output and input; 4) Based on the loss function that considers the gradient relationship between the optimal power flow output and input, the optimal power flow output and input training set are used to train the neural network to obtain the optimal power flow calculation neural network; 5) The input layer of the optimal power flow calculation neural network obtains input data and transmits the input data to the hidden layer of the optimal power flow calculation neural network; 6) The hidden layer encodes the input data to obtain the optimal power flow hidden layer features, and then makes an adaptability judgment on the optimal power flow hidden layer features. If the optimal power flow calculation neural network is adapted to the optimal power flow hidden layer features, then proceed to step 7), otherwise, proceed to step 8); 7) The hidden layer transmits the optimal power flow hidden layer features to the output layer, and solves to obtain the optimal power flow output; 8) Using numerical calculation method to solve the optimal power flow input characteristics, obtain the optimal power flow output, and write the optimal power flow input characteristics and output into the optimal power flow output and input training set, and return to step 4); The fixed relationship model between the optimal power flow output and input is as follows: s.t.e G P G =e D P D (2) P L =M G P G -M D P D (5) Where P G ,P D and P L represents the active power output of the unit, load and line active power flow; H1, H2 and H3 represent the cost coefficient matrix of the unit output; e G and e D A vector with 1 elements representing the dimension, number of units and number of loads; and * Indicates the upper and lower limits of *; M D and M G Indicates that P G and P D Related correlation matrix; The gradient relationship model of the optimal power flow output and input is as follows: Where M G,j and M D,j Represents the matrix M D and the matrix M G The jth row of the genset; g represents the upper or lower limit of the unit output; P G,i is the active output of the ith unit; Indicates the maximum or minimum transmission power achieved by the jth line; The loss function considering the gradient relationship between the optimal power flow output and input is as follows: L=κ0L0+κ1L1+κ2L2+κ3L3+κ4L4+κ5L5 (11) Among them, κ0, κ1, κ2, κ3, κ4, κ5 represent the weight coefficients of different loss function terms; L is the loss function considering the gradient relationship between the optimal power flow output and input; Among them, the loss function term L0, the loss function term L1, the loss function term L2, the loss function term L3, the loss function term L4, and the loss function term L5 are as follows: L0=E[(P G -P′ G ) 2 ] (12) In the formula, Represents the input feature perturbation; Represents the new input features of the neural network after adding disturbance; P″ G Represents the neural network output corresponding to the new input feature; P′ G It represents the unit output of the neural network; E[*] represents the expectation of *; The steps for adapting the optimal power flow input characteristics include: 6.1) According to the optimal power flow hidden layer feature h hidden , use the mean square error loss function to train the optimal power flow hidden layer feature map to the input feature P D The decoding neural network ψ(·) of 6.2) Calculate the decoding error error of the optimal power flow input feature, as shown in the following formula; Where P D,i represents the i-th element of the input eigenvector load; ψ(h hidden ) represents the decoding neural network parameters; n is the number of elements; 6.3) Determine decoding error Is it true? If so, the optimal power flow calculation neural network is adaptable to the optimal power flow input characteristics; is the preset error threshold.
2. According to the method for solving optimal power flow with strong generalization capability driven by trusted data in claim 1, it is characterized in that: Methods for training neural networks using optimal power flow output and input training sets include SGD optimization algorithm and Adam optimization algorithm.
3. The optimal power flow trusted data driven solution method with strong generalization capability according to claim 1 is characterized in that: The numerical calculation methods include interior point method and Newton method.
4. The optimal power flow trusted data driven solution method with strong generalization capability according to claim 1 is characterized in that: The input data includes load size and new energy output size.