Insulator leakage current prediction method and system based on random forest
Through the random forest algorithm and the calculation of the dust pollution impact index, combined with Latin hypercube sampling and hyperparameter optimization, the problem of environmental factors in the prediction of insulator leakage current is solved, and the prediction accuracy and stability are improved.
Patent Information
- Application Number
- CN202411176268.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-12-13
AI Technical Summary
The existing insulator leakage current prediction methods cannot effectively consider environmental and weather factors, resulting in low prediction accuracy, especially the impact of dust pollution and other environmental factors is difficult to dig, affecting the prediction accuracy.
A prediction method based on random forest is adopted to obtain real-time leakage current timing data and environmental data, calculate the dust pollution impact index, and combine Latin hypercube sampling and hyperparameter optimization to build an insulator leakage current prediction model to improve prediction accuracy.
It improves the accuracy and accuracy of insulator leakage current prediction, can more effectively consider the influence of environmental factors, and enhances the stability and calculation efficiency of the model.
Smart Images

Figure CN119128700A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to a method and system for predicting insulator leakage current based on random forest. Background Art
[0002] Insulators are indispensable parts of power transmission lines. They are installed at higher positions on transmission line towers to support conductors and provide electrical insulation. They bear the power load and mechanical load brought by the operation of the transmission line and play an important role in the normal and safe operation of the transmission line. However, due to long-term exposure to the natural environment, various contaminants adhere to the surface of the insulators, which reduces the insulation performance but increases the conductivity, thus seriously threatening the safe operation of the entire power system.
[0003] In the current insulator monitoring technology, leakage current is a more effective dynamic online monitoring parameter. It can be continuously measured without damaging the insulator. It can also comprehensively reflect the degree of contamination, moisture, withstand voltage and related performance parameters of the insulator surface, which is directly related to the insulation performance of the insulator and the system reliability.
[0004] Real-time monitoring of transmission line insulators can be achieved through leakage current. By installing a leakage current collection device on the top of the insulator string of the transmission line, the leakage current caused by pollution, moisture and other factors of the insulator can be monitored in real time, and a fixed threshold can be set. When the monitoring value exceeds the threshold, it is judged as an abnormal state.
[0005] However, there are still deficiencies in the prediction of insulator leakage current, especially because leakage current has a great deal of randomness and is greatly affected by other weather and environmental factors such as humidity and temperature, which can easily cause large fluctuations in leakage current values. At the same time, the current prediction method usually uses expert evaluation methods or traditional neural networks, which cannot explore more variable parameter characteristics, affecting the prediction accuracy. Summary of the invention
[0006] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides an insulator leakage current prediction method and system based on random forest, which comprehensively considers the influence of various factors such as environment and weather, calculates the dust pollution impact index, and takes the influence of dust pollution and environmental factors as common variable parameter characteristics to solve the influence of environmental factors on prediction accuracy. Then, leakage current prediction is performed through an improved random forest algorithm. Through Latin hypercube sampling, higher sampling accuracy is obtained with a smaller sampling scale, hyperparameter optimization is increased, and the accuracy of model prediction is improved.
[0007] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: A first aspect of the present invention provides an insulator leakage current prediction method based on random forest.
[0008] A method for predicting insulator leakage current based on random forest, comprising: Acquire real-time leakage current time series data of the insulator to be tested, and perform signal enhancement and processing of missing values on the real-time leakage current time series data of the insulator; Obtain real-time environmental data based on time series of the insulator to be tested; Calculate the influence of dust pollution data on leakage current in the acquired real-time environmental data of the insulator to be tested based on time series, and obtain the dust pollution influence index; The dust pollution impact index is combined with the real-time environmental data of the insulator to be tested based on the time series and the processed leakage current time series data of the insulator to be tested to construct an insulator leakage current characteristic data set, and a standardization process is performed; For the insulator leakage current characteristic data set, Latin hypercube sampling is used to generate an insulator leakage current characteristic data sample set; Inputting the insulator leakage current characteristic data sample set into a leakage current prediction model constructed based on a random forest algorithm to predict the insulator leakage current; The predicted insulator leakage current data is recorded in real time, table data with time values are generated, and appropriate time intervals are set for storage and uploading.
[0009] A second aspect of the present invention provides an insulator leakage current prediction system based on random forest.
[0010] An insulator leakage current prediction system based on random forest, comprising: The leakage current time series data acquisition module is configured to: acquire the real-time leakage current time series data of the insulator to be tested, perform signal enhancement and process missing values on the real-time leakage current time series data of the insulator; The environmental data acquisition module is configured to: acquire real-time environmental data of the insulator to be tested based on a time series; The dust pollution impact index calculation module is configured to: calculate the influence of dust pollution data in the acquired real-time environmental data of the insulator to be tested based on the time series on the leakage current, and obtain the dust pollution impact index; The feature data set construction module is configured to: construct an insulator leakage current feature data set by combining the dust pollution impact index with the real-time environmental data of the insulator to be tested based on the time series and the processed leakage current time series data of the insulator to be tested, and perform standardization processing; The insulator leakage current prediction module is configured to: use Latin hypercube sampling to generate an insulator leakage current characteristic data sample set for the insulator leakage current characteristic data set; Inputting the insulator leakage current characteristic data sample set into a leakage current prediction model constructed based on a random forest algorithm to predict the insulator leakage current; The recording module is configured to: record the predicted insulator leakage current data in real time, generate table data with time values, and set appropriate time intervals for storage and uploading.
[0011] The third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in the random forest-based insulator leakage current prediction method as described in the first aspect of the present invention.
[0012] The fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the insulator leakage current prediction method based on random forest as described in the first aspect of the present invention are implemented.
[0013] One or more of the above technical solutions have the following beneficial effects: The present invention provides an insulator leakage current prediction method and system based on random forest. In the present invention, the influence of various factors such as environment and weather can be comprehensively considered. By calculating the dust pollution impact index, the dust pollution and environmental factors are used as common variable parameter features to solve the influence of environmental factors on prediction accuracy.
[0014] An insulator leakage current prediction model based on random forest is constructed to predict leakage current. Latin hypercube sampling is used to obtain higher sampling accuracy with a smaller sampling scale. Hyperparameter optimization is added during the model construction process to improve the accuracy of model prediction.
[0015] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0017] Figure 1 This is a flow chart of a method for predicting insulator leakage current based on random forest in Embodiment 1 of the present invention. DETAILED DESCRIPTION
[0018] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0019] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.
[0020] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0021] Embodiment 1 like Figure 1 As shown, this embodiment discloses a method for predicting insulator leakage current based on random forest, comprising the following steps: Step S1, obtaining real-time leakage current time series data of an insulator to be tested, performing signal enhancement and processing of missing values on the real-time leakage current time series data of the insulator.
[0022] In step S1, real-time leakage current time series data of the insulator to be tested is obtained through a leakage current sensor installed on the top of the insulator string.
[0023] The signal amplification rate of the corresponding specification is set according to the insulator specification, the real-time leakage current time series data of the insulator to be tested is enhanced, and the missing values of the enhanced data are processed.
[0024] Among them, missing values in the data can be processed by filling, deleting or interpolating, including: using statistical quantities such as mean, median, mode, etc. to calculate reasonable values to fill missing values, or inferring missing data based on linear interpolation, polynomial interpolation, spline interpolation, etc.
[0025] By enhancing the data and processing missing values, the validity and completeness of the data set can be guaranteed.
[0026] Step S2: Acquire real-time environmental data of the insulator to be tested based on time series.
[0027] In step S2, relevant environmental data is acquired in real time by using a meteorological station near the transmission line or by deploying specific environmental data monitoring sensors.
[0028] The real-time environmental data may include humidity, atmospheric pressure, wind direction, wind speed, dust, rainfall, temperature, etc. By synchronously acquiring the real-time environmental data, the influence of humidity, temperature, etc. on the insulator leakage current can be comprehensively considered.
[0029] Step S3: Calculate the influence of dust pollution data on leakage current in the acquired real-time environmental data of the insulator to be tested based on time series, and obtain a dust pollution influence index.
[0030] In step S3, calculating the influence index of environmental data on leakage current refers to comprehensively calculating the dust pollution influence index according to wind direction, wind speed, dust and rainfall data.
[0031] Step S3-1: First, calculate the pollution impact coefficient ρ according to the dust, wind direction and wind speed data. The coefficient formula is as follows:
[0032] Wherein, i represents different dust collection devices, Hc represents the dust conductivity obtained by different dust collection devices, and the unit is μS / cm; represents the average wind speed, in m / s; Wq represents the wind flow; j=1,2,...; t is the time interval for obtaining data; Through the above formula, the pollution impact coefficient of different wind directions such as east, south, west and north can be calculated.
[0033] Step S3-2, calculating the dust increase after time t, and performing an overall dust pollution estimation; After a period of time, the amount of dust will change according to the changes in the environment. The increase in the amount of dust over the time interval t at a given data acquisition time i is The calculation formula is as follows:
[0034] Through the above formula, the increase in dust in different wind directions such as east, south, west and north can also be calculated, and the average value can be calculated based on the increase in different directions to obtain an estimate of the overall dust pollution index.
[0035] Step S3-3, considering the scouring effect of rainfall, calculating the dust pollution degree after rainfall scouring; Since rainfall has a flushing effect on dust, the amount of rainfall also needs to be taken into account within the scope of dust impact.
[0036] The degree of dust pollution after rainfall flushing can be expressed by the exponential equation as follows:
[0037] Among them, M n It indicates the mass of washed pollutants per unit surface area, in mg / cm 2 ;M n-1It means when n=0, it is the initial mass on the surface; k is the scour constant; F is the average rainfall intensity, in mm / min; t is the duration of rainfall, in min.
[0038] Step S3-4: Finally, the dust pollution impact coefficient is added to the dust increase amount, and multiplied by the rainfall scouring degree to obtain the dust pollution impact index.
[0039] Step S4: construct an insulator leakage current characteristic data set by combining the dust pollution impact index with the real-time environmental data of the insulator to be tested based on time series and the processed leakage current time series data of the insulator to be tested, and perform standardization processing.
[0040] Among them, the standardization processing is mainly performed according to the feature columns, converting samples of different scales into the same value range, making the distribution of data closer to the normal distribution, so as to improve the performance and training effect of the model.
[0041] Step S5: using Latin hypercube sampling on the insulator leakage current characteristic data set to generate an insulator leakage current characteristic data sample set.
[0042] In step S5, Latin hypercube sampling (LHS) is a method of approximating random sampling from a multivariate parameter distribution, which belongs to the stratified sampling technique. It is also a type of Monte Carlo simulation method. It improves the sampling strategy to achieve higher sampling accuracy with a smaller sampling scale, and is highly efficient in practical applications.
[0043] The specific steps of generating an insulator leakage current characteristic data sample set through Latin hypercube sampling include: Step S5-1: Set to extract m samples from the n-dimensional vector space of the insulator leakage current characteristic data set.
[0044] Step S5-2: Divide each dimension into m non-overlapping intervals, so that each interval has the same probability, generally a uniform distribution, so that the interval lengths are the same.
[0045] Step S5-3: randomly select a point in each interval in each dimension.
[0046] Step S5-4: randomly extract points extracted from different intervals in step S5-3 from each dimension and form them into a data set vector.
[0047] Latin hypercube sampling can maintain the independence of samples and accurately reconstruct the input distribution through sampling with fewer iterations.
[0048] Step S6: input the insulator leakage current characteristic data sample set into a leakage current prediction model constructed based on a random forest algorithm to predict the insulator leakage current.
[0049] The random forest algorithm is a machine learning algorithm used to solve classification and regression problems. It constructs multiple unrelated decision trees by randomly extracting the generated training set, and forms a decision tree forest to predict the final result. It has a fast training speed and is easy to implement parallel computing. The influence between features can be detected during the training process.
[0050] In step S6, the specific steps of constructing a leakage current prediction model based on the random forest algorithm include: Step S6-1, obtain the insulator leakage current characteristic data sample set generated by Latin hypercube sampling in step S5, perform k bootstrap resampling (bootstrap) to generate k data sub-training, wherein the samples of each data sub-training set are called in-bag samples, and the samples not selected are called out-of-bag (OOB) data. The random forest model can estimate the internal error through OOB data to improve the generalization ability of the model.
[0051] Step S6-2: For each sample, select m features from t features.
[0052] Step S6-3: For each sub-training set, a decision tree model is constructed using a decision tree algorithm. For each node, the optimal segmentation feature is selected from the m randomly selected features.
[0053] Step S6-4: Repeat the above steps to construct k decision tree models.
[0054] Step S6-5, generate the optimal decision tree based on 10-fold cross validation, combine each sub-training set to generate a random forest regression model, and take the average value of the terminal node as the final prediction result.
[0055] Step S6-6: Based on the optimal hyperparameters, train the insulator leakage current prediction model, evaluate the model error, and output the insulator leakage current prediction result.
[0056] The insulator leakage current prediction model constructed in this embodiment is composed of k decision tree models formed by each sub-training set generated by sampling the insulator leakage current feature data sample set. The decision tree model is a tree structure composed of a series of nodes, each of which represents a feature and a corresponding decision rule. It is a process of classifying or regressing instances based on features, that is, dividing the data into several sub-areas (sub-trees) according to a certain feature, and then recursively dividing the sub-areas until a certain condition is met, then the division is stopped and used as a leaf node, and the recursive division continues if the condition is not met.
[0057] Since the representation ability of a single decision tree is limited, many decision tree models are combined to form a random forest, and the final prediction is formed by voting and weighted averaging the prediction results of all decision trees. This can reduce the variance of a single decision tree and improve the overall data prediction ability of the model.
[0058] Hyperparameter optimization can be used to find the best parameter configuration for the model and further improve the accuracy of model prediction and computational efficiency. 10-fold cross validation is a common method for selecting model hyperparameters and verifying model effectiveness. It can determine the optimal hyperparameters and evaluate the generalization ability of the model.
[0059] Among them, the calculation method of out-of-bag data (OOB) error is as follows: For the random forest that has been generated, use the out-of-bag data to test its performance. Assuming that the total number of out-of-bag data is O, use these O out-of-bag data as input and bring them into the previously generated random forest classifier. The classifier will give the corresponding classification of the O data.
[0060] Because the types of these O data are known, the correct classification is compared with the results of the random forest classifier, and the number of classification errors of the random forest classifier is counted, set as X, then the error size of the out-of-bag data = X / O.
[0061] Step S7: Record the predicted insulator leakage current data in real time, generate table data with time values, and set a suitable time interval for storage and uploading.
[0062] Embodiment 2 This embodiment discloses an insulator leakage current prediction system based on random forest, including: The leakage current time series data acquisition module is configured to: acquire the real-time leakage current time series data of the insulator to be tested, perform signal enhancement and process missing values on the real-time leakage current time series data of the insulator; The environmental data acquisition module is configured to: acquire real-time environmental data of the insulator to be tested based on a time series; The dust pollution impact index calculation module is configured to: calculate the influence of dust pollution data in the acquired real-time environmental data of the insulator to be tested based on the time series on the leakage current, and obtain the dust pollution impact index; The feature data set construction module is configured to: construct an insulator leakage current feature data set by combining the dust pollution impact index with the real-time environmental data of the insulator to be tested based on the time series and the processed leakage current time series data of the insulator to be tested, and perform standardization processing; The insulator leakage current prediction module is configured to: use Latin hypercube sampling to generate an insulator leakage current characteristic data sample set for the insulator leakage current characteristic data set; Inputting the insulator leakage current characteristic data sample set into a leakage current prediction model constructed based on a random forest algorithm to predict the insulator leakage current; The recording module is configured to: record the predicted insulator leakage current data in real time, generate table data with time values, and set appropriate time intervals for storage and uploading.
[0063] Embodiment 3 The purpose of this embodiment is to provide a computer-readable storage medium.
[0064] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in a method for predicting insulator leakage current based on random forest as described in Example 1 of the present disclosure.
[0065] Embodiment 4 The purpose of this embodiment is to provide an electronic device.
[0066] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in a method for predicting insulator leakage current based on random forest as described in Example 1 of the present disclosure are implemented.
[0067] The steps involved in the apparatuses of the above embodiments 2, 3 and 4 correspond to the method embodiment 1, and the specific implementation methods can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0068] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.
[0069] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A method for predicting insulator leakage current based on random forest, It is characterized in that include: Acquire real-time leakage current time series data of the insulator to be tested, and perform signal enhancement and processing of missing values on the real-time leakage current time series data of the insulator; Obtain real-time environmental data based on time series of the insulator to be tested; Calculate the influence of dust pollution data on leakage current in the acquired real-time environmental data of the insulator to be tested based on time series, and obtain the dust pollution influence index; The dust pollution impact index is combined with the real-time environmental data of the insulator to be tested based on the time series and the processed leakage current time series data of the insulator to be tested to construct an insulator leakage current characteristic data set, and a standardization process is performed; For the insulator leakage current characteristic data set, Latin hypercube sampling is used to generate an insulator leakage current characteristic data sample set; Inputting the insulator leakage current characteristic data sample set into a leakage current prediction model constructed based on a random forest algorithm to predict the insulator leakage current; The predicted insulator leakage current data is recorded in real time, table data with time values are generated, and appropriate time intervals are set for storage and uploading.
2. The insulator leakage current prediction method based on random forest as claimed in claim 1, It is characterized in that The dust pollution impact index is obtained by calculating the influence of dust pollution data on leakage current in the real-time environmental data of the insulator to be tested based on time series, specifically: the dust pollution impact index is comprehensively calculated according to wind direction, wind speed, dust and rainfall data.
3. The insulator leakage current prediction method based on random forest as claimed in claim 2, It is characterized in that The calculation of the influence of dust pollution data on leakage current in the real-time environmental data of the insulator to be tested based on time series is performed to obtain a dust pollution influence index, and the specific steps include: Calculate the pollution impact coefficient based on dust, wind direction and wind speed data; Calculate the dust increase after time t and make an overall dust pollution estimate; Calculate the dust pollution level after rainfall flushing; Add the dust pollution impact coefficient to the dust increase and multiply it by the rainfall erosion degree to obtain the dust pollution impact index.
4. The insulator leakage current prediction method based on random forest as claimed in claim 1, It is characterized in that The specific steps of using Latin hypercube sampling to generate an insulator leakage current characteristic data sample set include: Extract m samples from the n-dimensional vector space of the insulator leakage current characteristic data set; Divide each dimension into m non-overlapping intervals, so that each interval has the same probability, generally a uniform distribution, so that the interval length is the same; Randomly select a point in each interval in each dimension; Then randomly select points from different intervals in each dimension and form them into a data set vector.
5. The insulator leakage current prediction method based on random forest as claimed in claim 1, It is characterized in that The specific steps of constructing the leakage current prediction model based on the random forest algorithm include: Obtain an insulator leakage current characteristic data sample set generated by Latin hypercube sampling, and perform k bootstrap resampling to generate k data sub-trainings; For each sample, select m features from t features; For each sub-training set, a decision tree model is constructed using the decision tree algorithm. For each node, the optimal segmentation feature is selected from the m randomly selected features. Repeat the above steps to build k decision tree models; Generate the optimal decision tree, combine each sub-training set to generate a random forest regression model, and use the average value of the terminal node as the final prediction result; Based on the optimal hyperparameters, the insulator leakage current prediction model is trained, the model error is evaluated, and the insulator leakage current prediction results are output.
6. The insulator leakage current prediction method based on random forest as claimed in claim 5, It is characterized in that The generating of the optimal decision tree specifically comprises generating the optimal decision tree through a 10-fold cross validation method and determining the optimal hyperparameters.
7. The insulator leakage current prediction method based on random forest as claimed in claim 5, It is characterized in that The evaluating model error is specifically to evaluate the model error through out-of-bag data error.
8. An insulator leakage current prediction system based on random forest, It is characterized in that include: The leakage current time series data acquisition module is configured to: acquire the real-time leakage current time series data of the insulator to be tested, perform signal enhancement and process missing values on the real-time leakage current time series data of the insulator; The environmental data acquisition module is configured to: acquire real-time environmental data of the insulator to be tested based on a time series; The dust pollution impact index calculation module is configured to: calculate the influence of dust pollution data in the acquired real-time environmental data of the insulator to be tested based on the time series on the leakage current, and obtain the dust pollution impact index; The feature data set construction module is configured to: construct an insulator leakage current feature data set by combining the dust pollution impact index with the real-time environmental data of the insulator to be tested based on the time series and the processed leakage current time series data of the insulator to be tested, and perform standardization processing; The insulator leakage current prediction module is configured to: use Latin hypercube sampling to generate an insulator leakage current characteristic data sample set for the insulator leakage current characteristic data set; Inputting the insulator leakage current characteristic data sample set into a leakage current prediction model constructed based on a random forest algorithm to predict the insulator leakage current; The recording module is configured to: record the predicted insulator leakage current data in real time, generate table data with time values, and set appropriate time intervals for storage and uploading.
9. A computer-readable storage medium having a program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Insulator pollution flashover identification and pollution degree prediction method based on multi-feature fusion
CN121903096A
