Prediction Method for Static Voltage Stability Critical Point of Power System Based on Random Forest Method
The static voltage stability margin prediction method of the power system is generated by the random forest method, and the problem of rapid analysis of the static voltage stability margin of the power system is solved, and efficient and accurate calculations are achieved in complex operating states.
Patent Information
- Application Number
- CN202211485910.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-24
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2042-11-24
AI Technical Summary
It is difficult for the prior art to quickly and accurately analyze the static voltage stability margin of the power system. Especially after intermittent renewable energy such as wind power is connected to the grid, the operating status of the power system is complex and changeable, and the risk of static voltage instability increases.
The random forest method is used to generate random numbers through the Monte Carlo method to calculate the power growth method of the generator and load nodes, and the continuous flow method is combined to generate characteristic data, and linear normalization is performed. The static voltage stability margin of the power system is calculated using the random forest model training and testing.
It realizes fast and accurate calculations under a given operating mode and future power growth mode, with high calculation accuracy and reliability, and is suitable for quickly finding the critical point of static voltage stability in power systems.
Smart Images

Figure CN115864530B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power system analysis, and relates to a method for predicting the critical point of static voltage stability, in particular to a method for predicting the critical point of static voltage stability of a power system based on the random forest method. Background Art
[0002] The power system is one of the most important infrastructure in today's society. Its safe and stable operation is closely related to people's daily production and life, and has great significance. According to the different physical mechanisms of the stability characteristics of the power system, the stability of the power system can be divided into voltage stability, power angle stability and frequency stability. Among them, voltage stability mainly focuses on the ability of the power system to maintain the node voltage amplitude within the required range after experiencing disturbances. Static voltage stability starts from the steady-state power flow equation, evaluates the voltage stability of the system by judging whether the power flow equation has a feasible solution, and takes the maximum transmission power of the system as the critical point of static voltage stable operation.
[0003] With the continuous expansion of the power grid scale and the large-scale grid connection of intermittent renewable energy power generation such as wind power, the operating state of the power system becomes more complex and changeable, which significantly increases the risk of static voltage instability of the power system. Therefore, how to quickly analyze the static voltage stability margin of the power system is of great significance for ensuring the safe and stable operation of the power grid. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for predicting the critical point of static voltage stability of a power system based on the random forest method. By inputting the active power generation and active load nodes at the current operating point of the power system, and the power growth directions of the generator nodes and load nodes into the model trained by the random forest method, the static voltage stability margin of the system can be quickly calculated.
[0005] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0006] A method for predicting the critical point of static voltage stability of a power system based on the random forest method, comprising the following steps:
[0007] S1. For the generator nodes and load nodes of the power system, random numbers are generated respectively based on the Monte Carlo method, and the power growth modes of the generator nodes and load nodes are calculated; along the power growth directions of the generator nodes and load nodes, characteristic data of different prediction points are generated by the continuous power flow method;
[0008] S2. Taking the active power generation and active load nodes at the current operating point of the power system, and the power growth directions of the generator nodes and load nodes as sample characteristic data, linear normalization processing is performed on the generator nodes and load nodes at the initial operating point in the sample characteristic data to obtain the processed characteristic data;
[0009] S3. Extract the training set from the processed feature data and input it into the random forest for training. Use the remaining processed feature data as the test set for testing. Determine the maximum prediction error and the sample corresponding to the maximum prediction error. Obtain new samples through the fine-tuning training method on the sample corresponding to the maximum prediction error, update the training set, and re-enter it into the random forest. Repeat continuously until the maximum prediction error stabilizes and no longer changes, and obtain the trained model.
[0010] S4. Input the active power generation and the power growth directions of the active power load nodes, generator nodes, and load nodes at the current operating point of the power system into the trained model, and calculate the static voltage stability margin of the system.
[0011] As a limitation, the specific process of step S1 is as follows:
[0012] S11. For the generator nodes of the power system, randomly sample within their active power output ranges to obtain the initial power generation of the generator nodes and get the vector composed of the initial power generation of all generator nodes
[0013] For the load nodes of the power system, randomly sample within their active power output ranges to obtain the initial load node power of the load nodes and get the vector composed of the power of all load nodes
[0014] S12. For the generator nodes of the power system, randomly generate n G random numbers ε j , j = 1, 2, … k1 …, n G , n G being the total number of generator nodes in the power system, and calculate the power growth pattern of the generator nodes;
[0015] For the load nodes of the power system, randomly generate n L random numbers δ j , j = 1, 2, … k2 …, n L , n L being the total number of load nodes, and calculate the power growth pattern of the load nodes;
[0016] S13. Using and as the initial operating point, along the power growth directions of the generator nodes and load nodes, generate the feature data of different prediction points through the continuous power flow method.
[0017] As a further limitation, in step S12, the calculation formula for the power growth mode of the generator node is:
[0018]
[0019] where is the random number generated by the k1-th generator node;
[0020] The calculation formula for the power growth mode of the load node is:
[0021]
[0022] where δ k2 is the random number generated by the k2-th load node.
[0023] As the second limitation, in step S2, the calculation formula for linearly normalizing the generator node and the load node of the initial operating point in the sample feature data is:
[0024]
[0025]
[0026] where is the active power of the i-th generator node at the initial operating point, is the minimum active power of the i-th generator node at the initial operating point, is the maximum active power of the i-th generator node at the initial operating point, is the active power of the i-th load node at the initial operating point, is the minimum active power of the i-th load node at the initial operating point, is the maximum active power of the i-th load node at the initial operating point.
[0027] As the third limitation, in step S3, the ratio of the training set to the test set is 8:2 respectively.
[0028] As a further limitation, in step S3, the process of extracting the training set from the processed feature data, inputting it into the random forest for training, using the remaining processed feature data as the test set for testing, determining the maximum prediction error and the sample corresponding to the maximum prediction error, and obtaining a new sample through the fine-tuning training method on the sample corresponding to the maximum prediction error includes:
[0029] S31. Model training and parameter tuning. Select the random forest model in the machine learning algorithm. Use the vectors in the training set as the features X = {x1, x2,..., x N}, and use the system static voltage stability margin as the predicted value Y = {y1, y2,..., y N} where x N is the feature of the Nth sample, and y N is the predicted value of the Nth sample, and N is the number of samples.
[0030] S32. Model evaluation: Evaluate the preliminary model by performing five-fold cross-validation on the extracted training set D = {(x1, y1), (x2, y2), … (x N , y N )} and outputting the predicted values on the test set.
[0031] S33. Model output: If the result meets the preset standard, that is, the error change between the predicted value output by the model and the true value is stable, then use this preliminary model as the prediction model, export and store it. If the result does not meet the preset standard, return to S31 to retrain and adjust the parameters of the preliminary model.
[0032] As the fourth limitation, in step S4, the calculation formula for the static voltage stability margin is:
[0033]
[0034]
[0035]
[0036] where λ c is the static voltage stability margin of the power system, is the active power of the ith load node at the voltage collapse point, and d L,i is the power increment of the ith generator node; is the active power of the ith generator node at the voltage collapse point, and d G,i is the power increment of the ith load node.
[0037] Due to the adoption of the above technical solution, the technical progress achieved by the present invention compared with the prior art is as follows:
[0038] (1) Compared with the prior art, the present invention applies the random forest method to the prediction of the static voltage stability margin of the power system, and realizes the rapid calculation of the static voltage stability margin of the system under the conditions of the given current operation mode and the future power growth pattern;
[0039] (2) The present invention has the advantages of short calculation time, high accuracy and reliability.
[0040] In summary, the present invention has obvious advantages in calculation time and can obtain high calculation accuracy, and is applicable to quickly finding the static voltage stability critical point of the power system. Description of the Drawings
[0041] Figure 1 The following is a flowchart of the method according to an embodiment of the present invention;
[0042] Figure 2 The following is a power grid wiring diagram according to an embodiment of the present invention;
[0043] Figure 3 The following is the percentage of the maximum prediction error according to an embodiment of the present invention;
[0044] Figure 4 The following is a line graph of the static voltage stability margin between the predicted value and the actual value according to an embodiment of the present invention. Detailed implementation manners
[0045] To better explain the present invention for easy understanding, the present invention will be described in detail below with reference to the accompanying drawings through specific implementation manners.
[0046] Embodiment A method for predicting the static voltage stability critical point of a power system based on the random forest method
[0047] As Figure 1 shown, this embodiment includes the following steps:
[0048] S1. For the generator nodes and load nodes of the power system, random numbers are generated respectively based on the Monte Carlo method, and the power growth modes of the generator nodes and load nodes are calculated; along the power growth directions of the generator nodes and load nodes, characteristic data of different prediction points are generated through the continuous power flow method;
[0049] The specific process of this step is as follows:
[0050] S11. For the generator nodes of the power system, random sampling is performed within the range of their active power outputs to obtain the initial power generation of the generator nodes A vector composed of the initial power generations of all generator nodes is obtained
[0051] For the load nodes of the power system, random sampling is performed within the range of their active power outputs to obtain the initial load power of the load nodes A vector composed of the powers of all load nodes is obtained
[0052] S12. For the generator nodes of the power system, n random numbers ε are randomly generated between [0, 1] through the Monte Carlo method G , j = 1, 2,..., k1,..., n j , where n G is the total number of generator nodes in the power system, and the power growth mode of the generator nodes is calculated; G
[0053] For the load nodes of the power system, n random numbers δ are randomly generated between [0, 1] by the Monte Carlo method L , j = 1, 2, … k2…, n j , where n L is the total number of load nodes, and calculate the power growth pattern of the load nodes; L
[0054] The calculation formula for the power growth pattern of the generator nodes is:
[0055]
[0056] where is the random number generated for the k1-th generator node;
[0057] The calculation formula for the power growth pattern of the load nodes is:
[0058]
[0059] where δ k2 is the random number generated for the k2-th load node;
[0060] S13. Taking and as the initial operating points, along the power growth directions of the generator nodes and the load nodes, generate the characteristic data of different prediction points through the continuation power flow method.
[0061] S2. Taking the active power generation and the active load nodes at the current operating point of the power system, and the power growth directions of the generator nodes and the load nodes as the sample characteristic data, perform linear normalization processing on the generator nodes and the load nodes at the initial operating point in the sample characteristic data to obtain the processed characteristic data;
[0062] The calculation formula for the linear normalization processing of the generator nodes and the load nodes at the initial operating point in the sample characteristic data in this step is:
[0063]
[0064]
[0065] where is the active power of the i-th generator node at the initial operating point, is the minimum active power of the i-th generator node at the initial operating point, is the maximum active power of the i-th generator node at the initial operating point, is the active power of the i-th load node at the initial operating point, The minimum active power of the i-th load node at the initial operating point, is the maximum active power of the i-th load node at the initial operating point.
[0066] S3. Extract the training set from the processed feature data and input it into the random forest for training. Use the remaining processed feature data as the test set for testing. Determine the maximum prediction error and the sample corresponding to the maximum prediction error. Obtain new samples through the fine-tuning training method on the sample corresponding to the maximum prediction error, update the training set, and re-enter it into the random forest. Repeat continuously until the maximum prediction error stabilizes and does not change, obtaining a trained model. Among them, the ratio of the training set to the test set is 8:2 respectively;
[0067] In this step, the process of extracting the training set from the processed feature data, inputting it into the random forest for training, using the remaining processed feature data as the test set for testing, determining the maximum prediction error and the sample corresponding to the maximum prediction error, and obtaining new samples through the fine-tuning training method on the sample corresponding to the maximum prediction error includes:
[0068] S31. Model training and parameter tuning. Select the random forest model in machine learning algorithms. Use the vectors in the training set as features X = {x1, x2, …, x N}, and use the system static voltage stability margin as the predicted value Y = {y1, y2,..., y N}, where x N is the feature of the N-th sample, y N is the predicted value of the N-th sample, and N is the number of samples.
[0069] S32. Model evaluation. Evaluate the preliminary model by performing five-fold cross-validation on the extracted training set D = {(x1, y1), (x2, y2), … (x N , y N )} and outputting the predicted values on the test set.
[0070] S33. Model output. If the result meets the preset standard, that is, the error change between the predicted value output by the model and the true value is stable, then use this preliminary model as the prediction model, export and store it. If the result does not meet the preset standard, return to S31 to retrain and tune the parameters of the preliminary model.
[0071] S4. Input the active power generation, active power load nodes, power growth directions of generator nodes and load nodes at the current operating point of the power system into the trained model, and calculate the system static voltage stability margin;
[0072] The calculation formula for the static voltage stability margin is:
[0073]
[0074]
[0075]
[0076] where λ c is the static voltage stability margin of the power system, is the active power of the i-th load node at the voltage collapse point, d L,i is the power increment of the i-th generator node; is the active power of the i-th generator node at the voltage collapse point, d G,i is the power increment of the i-th load node.
[0077] The following is an example analysis of this embodiment:
[0078] This embodiment uses the IEEE 39-node distribution system as shown in Figure 2 to verify the effectiveness and correctness of the method proposed by the present invention. The example system includes: 21 load nodes and 10 generator nodes. Considering the large amount of calculation for the static voltage collapse point of the system under different current operating modes and future power growth patterns, samples are generated through matpower based on matlab. In this example, for the generator nodes, random sampling is performed within their active power output range to obtain the initial power generation of the generator nodes Similarly, for the load nodes, random sampling is performed within their active power output range to obtain the initial load node power of the load nodes By changing the outputs of the load nodes and generator nodes, a total of 7,694 samples are obtained through simulation. 80% (6,155) of the obtained samples are used as the training set, and the remaining 20% (1,538) are used as the test set.
[0079] As shown in Table 1, the static voltage stability margins of four samples under different states are given. Each two columns in the table represent a sample. The first column represents the current operating state, and the second column represents the power growth direction. Among them, Bus1 - Bus21 are load nodes, Bus30 - Bus39 are generator nodes, and the last row is the static voltage stability margin of the current operating point along this direction. The margin given in the calculation result is a per-unit value, and the reference value is 500 MVA.
[0080] Table 1 Calculation Results of IEEE - 39 Node System
[0081]
[0082]
[0083] As Figure 3 shown, it is the percentage of the maximum prediction error obtained after re - inputting the updated training set of this embodiment into the random forest.
[0084] To verify the prediction effect of this embodiment, 100 samples are randomly selected, and a line chart of the predicted value and the actual value of the static voltage stability margin of the samples is drawn. From Figure 4 it can be seen that at the beginning of iteration, the error between the predicted value and the actual value is very large, reaching 15.9%. As the number of iterations increases, the maximum error gradually becomes smaller and tends to be stable, reaching 3.03%. It can be seen from this that the error between the margin value predicted by the random forest method and the actual value is very small, indicating the accuracy of the prediction method of this embodiment.
Claims
1. A method for predicting the static voltage stability critical point of a power system based on the random forest method, characterized in that It includes the following steps: S1. For the generator nodes and load nodes of the power system, generate random numbers respectively based on the Monte Carlo method, and calculate the power growth modes of the generator nodes and load nodes; along the power growth directions of the generator nodes and load nodes, generate the characteristic data of different prediction points through the continuation power flow method; The specific process of step S1 is as follows: S11. For the generator nodes of the power system, within its active power output range Randomly sample to obtain the initial power generation of the generator nodes Obtain a vector composed of the initial power generation of all generator nodes For the load nodes of the power system, within its active power output range Random sampling is carried out to obtain the initial load node power of the load nodes A vector composed of the powers of all load nodes is obtained S12. For the generator node of the power system, randomly generate n between [0, 1] by Monte Carlo method. G A random number ε j ,j=1,2,…k1…,n G , n G For the total number of generator nodes in the power system, calculate the power growth pattern of the generator nodes; For the load nodes of the power system, n random numbers δ are randomly generated between [0, 1] by the Monte Carlo method L , j = 1, 2, … k2…, n j , where n L is the total number of load nodes, and calculate the power growth mode of the load nodes; L In step S12, the calculation formula for the power growth mode of the generator node is: Among them, is the random number generated for the k1-th generator node; The calculation formula for the power growth mode of the load node is: Among them, a random number generated for the k2-th load node; S13. Using and as the initial operating points, along the power growth directions of the generator nodes and load nodes, generate the characteristic data of different prediction points through the continuation power flow method; S2. Take the active power generation and active load nodes at the current operating point of the power system, and the power growth directions of the generator nodes and load nodes as sample characteristic data, and perform linear normalization processing on the generator nodes and load nodes at the initial operating point in the sample characteristic data to obtain the processed characteristic data; S3. Extract the training set from the processed characteristic data and input it into the random forest for training, use the remaining processed characteristic data as the test set for testing, determine the maximum prediction error and the sample corresponding to the maximum prediction error, obtain new samples through the fine-tuning training method on the sample corresponding to the maximum prediction error, update the training set, and re-enter it into the random forest, and repeat continuously until the maximum prediction error is stable and no longer changes, to obtain a trained model; S4. Input the active power generation and active load nodes at the current operating point of the power system, and the power growth directions of the generator nodes and load nodes into the trained model, and calculate the static voltage stability margin of the system; In step S4, the calculation formula for the static voltage stability margin is: Among them, λ c is the static voltage stability margin of the power system, is the active power of the i-th load node at the voltage collapse point, d L,i is the power increment of the i-th generator node; is the active power of the i-th generator node at the voltage collapse point, d G,i is the power increment of the i-th load node.
2. The method for predicting the static voltage stability critical point of a power system based on the random forest method according to claim 1, wherein In step S2, the calculation formula for the linear normalization processing of the generator nodes and load nodes at the initial operating point in the sample characteristic data is: wherein, is the active power of the i-th generator node at the initial operating point, is the minimum active power of the i-th generator node at the initial operating point, is the maximum active power of the i-th generator node at the initial operating point, is the active power of the i-th load node at the initial operating point, is the minimum active power of the i-th load node at the initial operating point, is the maximum active power of the i-th load node at the initial operating point.
3. The method for predicting the static voltage stability critical point of a power system based on the random forest method according to claim 1, characterized in that, In step S3, the ratio of the training set to the test set is 8:2 respectively.
4. The method for predicting the static voltage stability critical point of a power system based on the random forest method according to claim 3, characterized in that, In step S3, the process of extracting the training set from the processed characteristic data and inputting it into the random forest for training, using the remaining processed characteristic data as the test set for testing, determining the maximum prediction error and the sample corresponding to the maximum prediction error, and obtaining new samples through the fine-tuning training method on the sample corresponding to the maximum prediction error includes: S31. Model training and parameter tuning. Select the random forest model in machine learning algorithms. Use the vectors in the training set as features X = {x1, x2,..., x N}, and use the system static voltage stability margin as the predicted value Y = {y1, y2,..., y N}, where x N is the feature of the Nth sample, y N is the predicted value of the Nth sample, and N is the number of samples; S32. Model evaluation. The preliminary model is evaluated by performing five-fold cross-validation on the extracted training set D = {(x1, y1), (x2, y2), … (x N , y N )} and outputting the predicted values on the test set; S33. Model output. If the result meets the preset standard, that is, the error change between the predicted value and the true value output by the model is stable, then use this preliminary model as the prediction model, export and store it. If the result does not meet the preset standard, return to S31 to retrain and adjust the parameters of the preliminary model.
Citation Information
Patent Citations
Method for static electric voltage stability analysis
CN101404412A
Power distribution method and power distribution device in wind power plant
CN104810860A