A random forest-based method for identifying different voltage levels of live working of power grid equipment
The random forest algorithm combines multiple factors to identify different voltage levels of power grid equipment, solving the problem that early warning equipment in the existing technology is difficult to adapt, and improving the accuracy and effectiveness of power grid operation early warning.
Patent Information
- Application Number
- CN202210561004.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-23
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2042-05-23
AI Technical Summary
It is difficult for existing power grid equipment to adjust adaptively for different voltage levels, resulting in insufficient warning levels.
The random forest algorithm is used, combined with factors such as electric field signal, air pressure data, altitude, temperature and humidity, and is constructed to identify different voltage levels of live operations of power grid equipment to realize active identification of different voltage levels, and to adaptively adjust the early warning threshold for early warning equipment.
The warning level of power grid operation early warning equipment has been improved to ensure that more accurate and effective early warning is provided under different voltage levels.
Smart Images

Figure CN114971264B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power systems, and in particular relates to a random forest method for identifying different voltage levels of live working of power grid equipment. Background Art
[0002] Live working of power grid equipment is an important part of power work. Due to the large number of mixed access of equipment of different voltage levels in the power grid, workers mainly rely on existing anti-electric shock warning equipment for warning during live working. However, it is difficult for existing anti-electric shock warning equipment to actively adjust the warning level for power grid equipment of different voltage levels. "Mao Kai, Research on group-type high-voltage electric field measurement and safety distance alarm system, Chongqing University, 2014" proposed to develop a group-type high-voltage electric field measurement safety distance warning instrument based on wireless transmission, but did not consider the influence of different electric field strengths of different voltage levels. "Ding Yueming, New technology and prototype development of high-voltage on-site construction safety distance alarm, Huazhong University of Science and Technology, 2011" proposed a high-voltage on-site construction safety distance alarm technology and prototype development. This paper mainly focuses on a solution for construction machinery to get too close to high-voltage equipment and cause failures, and does not involve adaptive warning of different voltage levels of power grid equipment. Therefore, it is necessary to realize active identification of different voltage levels, and then lay the foundation for adaptive adjustment of warning thresholds and levels of power grid warning equipment.
[0003] In response to this, this patent proposes a method for identifying different voltage levels of live working of power grid equipment considering the random forest algorithm, aiming at the actual needs of safety warning for live working of power grid equipment with different voltage levels, so as to realize active identification of power grid equipment with different voltage levels, and then adaptively adjust the warning for the power grid warning equipment, thereby improving the warning level of the live working warning equipment. Summary of the invention
[0004] In view of the above defects or improvement needs of the prior art, and in view of the background of power grid equipment operating across voltage levels, the present invention provides a method for identifying different voltage levels of live operations of power grid equipment considering random forests. The method aims to comprehensively consider the influence of factors such as electric field strength, height above the ground, temperature and humidity, solve the problem that equipment operating across voltage levels is difficult to adaptively warn, and improve the warning level of power grid operation warning equipment.
[0005] To achieve the above object, according to one aspect of the present invention, a method for identifying different voltage levels of live working of power grid equipment based on random forest is provided, characterized in that it comprises the following steps:
[0006] Step 1: Introduce sample data of multiple historical moments of each type to build a sample data set of each type, and build a total training set X through multiple types of sample data sets S . Where S represents the total number of samples;
[0007] Step 2: For the total training set X S Perform the Kth random sampling, collect once and put it back, then continue to collect, collect K times in total, and get the sampling set X containing K samples K , generate a sample training set {X1,X2,...X K},X K Represents the sample tree K. At the same time, K corresponding out-of-bag data are generated.
[0008] Step 3: Based on historical data, traverse to obtain variable V = (V1, V2, ..., V M ) is the maximum value of each variable V jmax With minimum value V jmin , j belongs to (1, M); where the number of variables is M=5.
[0009] Step 4: Set the variable V j Maximum V jmax With minimum value V jmin The difference is divided into e parts, and the Gini value GN (V j ) is the voltage level category target V* corresponding to the minimum value, and then the optimal segmentation is determined to determine the set of lower-level branch trees;
[0010] Step 5: Based on the obtained branch tree, select the target variable V j+1 Repeat step 4 to set V j+1 Variable minimum value V j+1 min to max V j+1 The max interval is evenly divided into multiple segments, and the variable V is searched for. j+1 The minimum Gini value GN(V j+1 ), divide the voltage level V* until it cannot be divided or the GN value is less than the preset threshold or the total decision tree reaches the preset value K, and obtain the decision tree set (T(X1), T(X2), ..., T(X K ));
[0011] Step 6: Based on the out-of-bag data obtained in step 2 Calculate the sample tree X i The area under the operating characteristic curve (AUC i value);
[0012] Step 7: Substitute the AUC obtained in step 6 i The value is used as the sample tree X i The weight of i The value and the decision tree set obtained in step 5 (T(X1), T(X2), ..., T(X K)) , calculate the model F(X) of the random forest tree ensemble strategy;
[0013] Step 8: Obtain electric field signals and air pressure data, as well as other related data, from the electric field sensor and air pressure sensor to construct a real-time random forest input sample X0. The classification result output by the random forest is determined by weighted voting based on the output results of each decision tree, and the category with the highest number of votes is the final classification decision.
[0014] The step 1 is specifically as follows:
[0015] Based on different variable historical data V (electric field signal, air pressure data, voltage level, ..., other data), a random forest input vector V = (V1, V2, ... Vm) is constructed to form a sample set X S . Where m is the total number of different variables, and S is the total number of samples;
[0016] The step 2 is specifically as follows:
[0017] Based on the total training set X S , use bagging idea to generate sample training sets {X1,X2,...X K}, and generate K corresponding out-of-bag data at the same time, Specifically, the total training set is randomly sampled for the Kth time, and the sample is put back after sampling once, and then the sample is collected again, and a total of K samples are collected, and a sampling set X containing K samples is obtained. K ;but, It is the set of samples that have not been collected after K collections in the K-th random sampling.
[0018] The step 3 is specifically as follows:
[0019] According to historical data, calculate the maximum value V of each variable in variable V=(V1,V2,...,VM) jmax With minimum value V jmin ; Among them, the maximum value of the variable is M, V1 is the electric field strength filter value, V2 is the air pressure sensor height filter value, V3 is the altitude, V4 is the temperature, V5 is the humidity, and in this case M=5.
[0020] The step 4 is specifically as follows:
[0021] The maximum value Vj for each variable Vj max With the minimum value Vj min The difference is divided into e parts, and the voltage level category target V*(V1 * , V2 * ) variable Gini value GN(Vj) minimum value GN min(Vj), and then determine the optimal segmentation and the set of lower-level branch trees;
[0022]
[0023] Among them, GN(V j ) represents the GN value of V* after being differentiated by Vj. n1 and n2 represent the binary values of variable Vj (V1 * ,V2 * ) The number of data points contained in the two categories, P1 and P2 indicate that Vj belongs to the first category V1 of V* in the first category * and the second category V2 * The probability that Vj belongs to the first category V1 of V* in the second category is q1 and q2. * and the second category V2 * probability.
[0024] According to the lower-level branch tree set, each variable is traversed and calculated to obtain the minimum value GN min (Vj), and then determine the optimal segmentation of V* and the set of lower-level branch trees.
[0025] The step 5 is specifically as follows:
[0026] Based on the branch tree obtained in step 4, select variable V j+1 Repeat step 4 to continue the voltage level V* division until no division is possible or the GN value is less than the preset threshold or the total decision tree reaches the preset value K, and obtain the decision tree set (T(X1), T(X2), ..., T(X K ));
[0027] The step 6 is specifically as follows:
[0028] According to the out-of-bag data Calculate the sample tree X i The area under the operating characteristic curve (AUCi value);
[0029]
[0030] Among them, AUC (V * ) indicates the model's ability to measure components. TP indicates that the model correctly classifies V1 when classifying Vj. * The number of correct samples can be obtained by comparing step 5 with the actual type of samples; FP means that the model mistakenly classifies it as a positive sample V1 * The number of negative samples can be obtained by comparing the classification result in step 5 with the actual type of the sample; P is the number of positive samples, and N is the number of negative samples.
[0031]
[0032] Among them, |M| is the number of categories, AUC(V1 * ,V2 * ) is category V1 * and V2 * AUC value for binary classification.
[0033] The step 7 is specifically as follows:
[0034] The AUC obtained i The value is used as the weight of the sample tree Xi, and the model F(X) of the random forest tree ensemble strategy is calculated;
[0035]
[0036] The present invention comprehensively considers the influence of electric field signals, air pressure data, altitude, temperature, humidity and other factors, can automatically identify different voltage levels of electrical equipment, can provide a reference for adaptive adjustment of warnings of power grid early warning equipment, and improves the warning level of power operation early warning equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 : It is a flow chart of the method of the present invention.
[0038] Figure 2 : It is a schematic diagram of the random forest model for identifying different voltage levels of live working of power grid equipment.
[0039] Figure 3 : This is a comparison chart of the actual voltage level classification values of 15 data samples and the predicted values calculated by different voltage level identification methods based on this scheme. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0041] The following is a detailed description of the method for identifying different voltage levels of live working of power grid equipment considering random forests provided by the present invention in combination with an embodiment; the embodiment comprehensively considers the influence of factors such as altitude, electric field strength, temperature, humidity, etc., and its process is as follows Figure 1 As shown, the specific steps include:
[0042] Step (1): Based on different variable historical data V (electric field signal, air pressure data, voltage level, ..., other data), construct a random forest input vector V = (V1, V2, ... VM + 1) to form a sample set X S In this embodiment, M is the total number of different variables, M=5, and S represents the total number of samples, 500;
[0043] Step (2): Based on the total training set X 500 , using the bagging idea, the sample training sets corresponding to 4 trees, 10 trees, 20 trees, 30 trees, 40 trees, 50 trees, and 60 trees are {X1,X2,...X4}, {X1,X2,...X10}, ..., {X1,X2,...X60}, and the corresponding 4, 10, 20, 30, 40, 50, 60 out-of-bag data are generated at the same time. For example, the total training set is randomly sampled for the 60th time, collected once and put back, and then continued to collect, a total of 500 times, and a sampling set X containing 500 samples is obtained. 60 ; Assume that in the 60th random sampling, the samples that were not selected are X100~X199, then It is the set of samples that were not collected after 500 collections in the 60th random sampling.
[0044] Step (3): Set the variable Vj = (electric field signal, air pressure data, ..., other data) for each training set and set the minimum Gini threshold, GN min =0.01. At the same time, based on historical data, calculate the variable V = (V1, V2, ..., V M+1 ) is the maximum value of each variable V jmax With minimum value V jmin ; Among them, the maximum value of the variable is M, V1 is the electric field strength filter value, V2 is the air pressure sensor height filter value, V3 is the altitude, V4 is the temperature, V5 is the humidity, and in this case M=5.
[0045] Step (4): Select the target variable V* as the voltage level in Vj, and process each Vj variable as a binary attribute variable. The maximum value of each variable Vj is Vj max With the minimum value Vj min The difference is divided into e parts, and the voltage level category target V*(V1 * , V2 * ) The minimum value GNmin(Vj) of the Gini value GN(Vj) of the variable is obtained, and then the optimal segmentation is determined, and the set of lower-level branch trees is determined;
[0046]
[0047] Among them, GN(Vj ) represents the GN value of V* after being differentiated by Vj. n1 and n2 represent the binary values of variable Vj (V1 * ,V2 * ) The number of data points contained in the two categories, P1 and P2 indicate that Vj belongs to the first category V1 of V* in the first category * and the second category V2 * The probability that Vj belongs to the first category V1 of V* in the second category is q1 and q2. * and the second category V2 * probability.
[0048] According to formula (1), each variable is traversed and calculated to obtain the minimum value GN min (Vj), and then determine the optimal segmentation of V* and the set of lower-level branch trees.
[0049] Step (5): Based on the branch tree obtained in step (4), select variable V j+1 Repeat step (4) to continue the voltage level V* division until no division is possible or the GN value is less than the preset threshold or the total decision tree reaches the preset value K, and obtain the decision tree set (T(X1), T(X2), ..., T(X K ));
[0050] Step (6): Based on out-of-bag data Calculate the receiver operating characteristic curve area value (AUCi value) of the sample tree Xi;
[0051]
[0052] Among them, AUC(V*) represents the ability of the model to measure the component. TP represents the * ,V2 * ) is correctly classified as V1 by the model * The number of correct samples, FP means that the model is incorrectly classified as a positive sample V1 * P is the number of positive samples, and N is the number of negative samples.
[0053]
[0054] Among them, |M| is the number of categories, AUC(V1 * ,V2 * ) is category V1 * and V2 * AUC value for binary classification.
[0055] Step (7): The obtained AUC iThe value is used as the weight of the sample tree Xi, and the model F(X) of the random forest tree ensemble strategy is calculated;
[0056]
[0057] Step (8): Based on the electric field sensor and air pressure sensor, the electric field signal and air pressure data, as well as other relevant data, are obtained to construct a real-time random forest input sample X0. The classification result output by the random forest is determined by weighted voting on the output results of each decision tree, and the category with the highest number of votes is the final classification decision.
[0058] The embodiment of the present invention proposes a method for identifying different voltage levels for live operations of power grid equipment taking into account random forests, which takes into account the influence of factors such as altitude, electric field strength, temperature, humidity, etc., to achieve active identification of different voltage levels of the power grid. It can provide a reference for the adaptive adjustment of warnings by power grid early warning equipment, thereby improving the early warning level of power operation early warning equipment.
[0059] Figure 1 As shown, it is a flow chart of a method for identifying different voltage levels of live working of power grid equipment considering random forest. Figure 2 Schematic diagram of the random forest model constructed to identify different voltage levels. Figure 3 This is a comparison chart of the actual voltage classification values of 500 data samples using this solution and the prediction accuracy of different voltage level identification methods based on this solution. Figure 3 It can be seen that the method for identifying different voltage levels of live operations of power grid equipment considering random forests proposed in the present invention can realize active identification of different voltage levels of equipment, thereby improving the warning level of power operation warning equipment.
[0060] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A random forest method for identifying different voltage levels of live working of power grid equipment. It is characterized in that The following steps are involved: Step 1: Introduce sample data of multiple historical moments of each type to build a sample data set of each type, and build a total training set X through multiple types of sample data sets S ; Where S represents the total number of samples; Step 2: For the total training set X S Perform the Kth random sampling, collect once and put it back, then continue to collect, collect K times in total, and get the sampling set X containing K samples K , generate the sample training set {X 1 ,X 2 ,...X K },X K Represents the sample tree K; at the same time, it generates K corresponding out-of-bag data, Step 3: Based on historical data, traverse to obtain variable V = (V 1 ,V 2 ,...,V M ) is the maximum value of each variable V jmax With minimum value V jmin , j belongs to (1, M); where the number of variables is M = 5; Step 4: Set the variable V j Maximum V jmax With minimum value V jmin The difference is divided into e parts, and the Gini value GN (V j ) is the voltage level category target V* corresponding to the minimum value, and then the optimal segmentation is determined to determine the set of lower-level branch trees; Step 5: Based on the obtained branch tree, select the target variable V j+1 Repeat step 4 to set V j+1 Variable minimum value V j+1 min to max V j+1 The max interval is evenly divided into multiple segments, and the variable V is searched for. j+1 The minimum Gini value GN(V j+1 ), divide the voltage level V* until it cannot be divided or the GN value is less than the preset threshold or the total decision tree reaches the preset value K, and obtain the decision tree set (T(X 1 ), T(X 2 ), ..., T(X K )); Step 6: Based on the out-of-bag data obtained in step 2 Calculate the sample tree X i Area under the operating characteristic curve, AUC i value; Step 7: Substitute the AUC obtained in step 6 i The value is used as the sample tree X i The weight of i Value and decision tree set (T(X 1 ), T(X 2 ), ..., T(X K )) , calculate the model F(X) of the random forest tree ensemble strategy; Step 8: Obtain electric field signals and air pressure data, as well as other relevant data, from the electric field sensor and air pressure sensor to construct a real-time random forest input sample X0. The classification result output by the random forest is determined by weighted voting based on the output results of each decision tree. The category with the highest number of votes is the final classification decision. The step 1 is specifically as follows: Based on different variable historical data V (electric field signal, air pressure data, voltage level, ..., other data), a random forest input vector V = (V1, V2, ... Vm) is constructed to form a sample set X S ; Where m is the total number of different variables, and S is the total number of samples; The step 2 is specifically as follows: Based on the total training set X S , use bagging idea to generate sample training set {X 1 ,X 2 ,...X K }, and generate K corresponding out-of-bag data at the same time, Specifically, the total training set is randomly sampled for the Kth time, and the sample is put back after sampling once, and then the sample is collected again, and a total of K samples are collected, and a sampling set X containing K samples is obtained. K ;but, is the set of samples that have not been collected after K collections in the K-th random sampling; The step 3 is specifically as follows: According to historical data, calculate the maximum value V of each variable in variable V=(V1,V2,...,VM) jmax With minimum value V jmin ; Among them, the maximum value of the variable is M, V1 is the electric field strength filter value, V2 is the air pressure sensor height filter value, V3 is the altitude, V4 is the temperature, V5 is the humidity, and in this case M=5; The step 4 is specifically as follows: The maximum value Vj for each variable Vj max With the minimum value Vj min The difference is divided into e parts, and the voltage level category target V*(V 1 * , V 2 * ) variable Gini value GN(Vj) minimum value GN min (Vj), and then determine the optimal segmentation and the set of lower-level branch trees; Among them, GN(V j ) represents the GN value of V* after being differentiated according to Vj; n1 and n2 represent the binary values of variable Vj (V 1 * ,V 2 * ) The number of data points contained in the two categories, P1 and P2 represent the first category V of Vj in the first category V* 1 * and the second category V 2 * The probability that Vj belongs to the first category V* in the second category is q1 and q2. 1 * and the second category V 2 * The probability of According to the lower-level branch tree set, each variable is traversed and calculated to obtain the minimum value GN min (Vj), and then determine the optimal segmentation of V* and the set of lower-level branch trees; The step 5 is specifically as follows: Based on the branch tree obtained in step 4, select variable V j+1 Repeat step 4 to continue the voltage level V* division until no division is possible or the GN value is less than the preset threshold or the total decision tree reaches the preset value K, and obtain the decision tree set (T(X1), T(X2), ..., T(X K )); The step 6 is specifically as follows: According to the out-of-bag data Calculate the sample tree X i The area under the operating characteristic curve, AUCi value; Among them, AUC (V * ) represents the model's ability to measure components; TP represents the model correctly classified as V when performing Vj classification. 1 * The number of correct samples can be obtained by comparing the actual sample type with step 5; FP means that the model mistakenly classifies the sample as a positive sample V 1 * The number of negative samples can be obtained by comparing the classification result in step 5 with the actual type of the sample; P is the number of positive samples, and N is the number of negative samples; Among them, |M| is the number of categories, AUC(V 1 * ,V 2 * ) is category V 1 * and V 2 * AUC value for binary classification; The step 7 is specifically as follows: The AUC obtained i The value is used as the weight of the sample tree Xi, and the model F(X) of the random forest tree ensemble strategy is calculated;
