Power grid low-voltage user prediction method based on XGBoost
Through the XGBoost-based low-voltage user prediction method, the use of historical data to learn and fit the characteristics of low-voltage users, and realize intelligent identification and judgment, solving the problem of lack of pre-warning and prevention in the existing technology, and significantly improving the operating efficiency and reliability of the power system.
Patent Information
- Application Number
- CN202311730199.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology lacks pre-warning, prevention and on-site control techniques and methods for low-voltage users of the power grid, resulting in the inability to resolve complaints about low-voltage events in users in the first time, resulting in a decrease in user satisfaction.
The low-voltage user prediction method of the power grid based on XGBoost is adopted to learn and fit historical data to identify the data characteristics of low-voltage users, and realize intelligent identification and judgment. The method includes data preprocessing, data modeling and result evaluation, and uses the LSTM neural network model to perform low voltage prediction in the table area.
Compared with traditional manual identification methods, the identification range and identification speed have been greatly improved, effectively improving the operating efficiency and reliability of the power system.
Smart Images

Figure CN119891141A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to power system safety technology, and in particular relates to a power grid low-voltage user prediction method based on XGBoost. Background Art
[0002] Based on the analysis of historical low voltage data, it is found that low voltage of users mainly occurs in suburban and rural areas. The general situation is as follows: First, the distribution of users in suburban and rural areas is relatively scattered, resulting in long low-voltage distribution lines. Limited by the capacity of transmission lines and transformers, during peak loads, the voltage at the end of the distribution network line may be reduced due to insufficient power, thus affecting the normal operation of electrical equipment. With the continuous extension of suburban and rural settlements and the continuous shift of load centers, the phenomenon of "low voltage" in the power grid will be further aggravated. Second, the seasonality of agricultural production leads to strong seasonality of rural power grid load. Summer is a dry season, and a large number of water pumps are required; in winter, especially during the Spring Festival, there will be a peak in electricity consumption when migrant workers return home. With the improvement of the living standards of rural residents, the proportion of strong seasonal loads such as air conditioners in the rural power grid load has increased year by year, exacerbating the seasonal variation of rural power grid load, seriously reducing the effective utilization rate of lines and distribution equipment, and affecting the power quality at the user end.
[0003] At present, low voltage problems are still in the traditional post-processing state, lacking the technology and methods of pre-warning, prevention and in-process control. At present, low voltage problems are still in the traditional post-processing state, lacking the technology and methods of pre-warning, prevention and in-process control, making it impossible to solve user complaints about low voltage events in the first place, resulting in problems such as decreased user satisfaction. Therefore, it is urgent to carry out user low voltage prediction and analysis work to improve the power supply quality of the power grid and customer power supply service satisfaction. Summary of the invention
[0004] The purpose of the present invention is to provide a low-voltage user prediction method for the power grid based on XGBoost to address the problems existing in the prior art. The method can learn historical data and fit the data characteristics of low-voltage users, so as to intelligently identify and judge users within the range. Compared with traditional manual identification methods, the method has great improvements in identification range, identification speed, etc., and effectively improves the operating efficiency and reliability of the power system.
[0005] The technical solution of the present invention is:
[0006] A method for predicting low-voltage users in a power grid based on XGBoost comprises the following steps:
[0007] Determine the target: define the area to be predicted and determine the data source;
[0008] Form a data mining library: collect different types of data from low-voltage users in multiple systems in the region, integrate the data from different systems, ensure the consistency of field types and formats during integration, and establish a data set mining library;
[0009] Data preprocessing: Clean, integrate, transform and reduce data from different systems to improve the quality of subsequent data mining, reduce the time required for actual mining, and build a feature system based on substation archive indicators, substation transformer measurement indicators, user indicators and other indicators;
[0010] Data modeling: Select the modeling method according to the characteristics of the variables and the purpose of analysis, combine the characteristic index weights, optimize the characteristic system of the index multiple times, and establish a low-voltage user voltage prediction model through continuous parameter adjustment and training;
[0011] Result evaluation: The root mean square of the relative error is used as the error evaluation standard, and the error calculation formula is as follows:
[0012]
[0013] where f t (i) is the actual value of voltage, f p (i) is the voltage prediction value, n is the number of samples. By setting the error threshold, the prediction result is optimized until the error is within the threshold range. It is evaluated by the above formula. The accuracy of the calculation result is used to see whether the model result is consistent with the initially set target.
[0014] Specifically, the data preprocessing method includes: missing value processing, outlier processing, data standardization
[0015] The low-voltage user voltage prediction model adopts an LSTM neural network model to predict low voltage in the substation area.
[0016] The process of parameter adjustment data modeling adopts a grid parameter adjustment method to adjust the parameters of the model.
[0017] The process of establishing a low-voltage user voltage prediction model comprises the following steps:
[0018] S1. Data processing: import the processed data set into the model.
[0019] Data shape transformation: convert the data set format into a matrix form that can be read by the model;
[0020] Dataset division: The data set is divided into a training set and a test set. The training set is used to determine the parameters of the model, and the test set is used to judge the effect of the model. The training set accounts for 80% and the test set accounts for 20%.
[0021] Data normalization: Normalize each eigenvalue of the feature system and scale it to between 0 and 1, so that the contribution of the variable to the prediction result is directly reflected by its weight;
[0022] S2, model training, setting and continuously adjusting the weight parameters between each layer of the input, and continuously training and optimizing the input and output through iteration until the training is completed;
[0023] S3, model testing, import the test data into the trained model, denormalize the predicted value, and then put the result into the error formula to calculate whether the accuracy meets the requirements.
[0024] Specifically, the LSTM neural network model includes an input layer, a hidden layer and an output layer. The input layer is combined with the correlation analysis of influencing factors to set input nodes; the hidden layer has several layers, the number of nodes in the hidden layer is set corresponding to the input layer, and each node is an LSTM unit.
[0025] The distribution network is an important part of the power system and is a power network that directly supplies power to users. The safe, reliable and stable operation of the distribution network is related to whether the power system can provide users with high-quality power supply and service quality. The low voltage phenomenon in the distribution network is a manifestation of the insufficient power supply capacity of the distribution network, which is prone to occur in rural areas. With the increasing number of household appliances and agricultural machinery in rural areas, low voltage is more likely to occur during peak power consumption periods. Carrying out the prediction of low voltage problems in the distribution network is of great significance to improving and optimizing the grid structure of the distribution network, improving the power supply capacity and quality of the distribution network, and solving the low voltage problem of the distribution network.
[0026] The main causes of low voltage in distribution networks are large power load, large power supply radius, weak voltage regulation capability, unbalanced three-phase load and insufficient reactive power compensation. At present, a few distribution network low voltage prediction methods based on support vector machine or DS evidence theory mainly summarize and extract influencing indicators or factors from the above causes. However, in addition to power load, other influencing indicators such as power supply radius are difficult to predict effectively. Power load is mainly predicted by forecasting meteorological factors such as temperature and rainfall. Therefore, the existing methods are indirect predictions based on partial feature quantities.
[0027] As the direct power supply area for users, the voltage prediction of the distribution network area is of great significance to improving the reliability of power supply, but the voltage stability of users in the area is affected by many factors such as transformer outlet voltage, weather, season, temperature, load, location coordinates, user type, etc. Therefore, the present invention uses machine learning methods for mathematical modeling, takes the factors affecting the voltage as input, and finds the mapping relationship between the final prediction value and these unstable factors, so as to achieve the purpose of predicting low voltage of users in the area.
[0028] The beneficial effect of the present invention is as follows: the present invention provides a method for predicting and identifying low-voltage users based on the machine learning algorithm XGBoost, which can learn historical data and fit the data characteristics of low-voltage users, thereby intelligently identifying and judging users within the range, which has greatly improved the recognition range and recognition speed compared to the traditional manual recognition method, and effectively improves the operation efficiency and reliability of the power system. Based on a full investigation of the low-voltage prediction situation and research methods of existing users, the present invention summarizes the focus and characteristics of existing research, introduces association rules, fully analyzes the support and confidence of voltage with multiple factors such as transformer outlet voltage, weather, season, temperature, load, location coordinates, user type, etc., determines the correlation with user voltage, extracts characteristic values as the input of the model, and the low-voltage user list is the output of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a schematic diagram of the prediction process of the method provided by the present invention;
[0030] Figure 2 It is the process of building a voltage prediction model for users in low-voltage areas;
[0031] Figure 3 It is a structural diagram of the established LSTM neural network model. DETAILED DESCRIPTION
[0032] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0033] Example 1
[0034] like Figure 1 The figure shows a flow chart of a method for predicting low-voltage users in a power grid based on XGBoost according to the present invention, which comprises the following steps:
[0035] Determine the target: define the area to be predicted and determine the data source;
[0036] Form a data mining library: collect different types of data from low-voltage users in multiple systems in the region, integrate the data from different systems, ensure the consistency of field types and formats during integration, and establish a data set mining library;
[0037] Data preprocessing: Clean, integrate, transform and reduce data from different systems to improve the quality of subsequent data mining, reduce the time required for actual mining, and build a feature system based on substation archive indicators, substation transformer measurement indicators, user indicators and other indicators. The low-voltage related data in the substation is complex. How to accurately extract the key feature indicator system from the massive data is a major difficulty of the present invention. The present invention conducts in-depth research and analysis on the substation equipment measurement data, equipment archives, geographic coordinates, weather, holidays and other massive data, and builds a feature system with more than 240 items including substation archive indicators, substation transformer measurement indicators, user indicators and other indicators (such as weather, holidays, etc.);
[0038] Data modeling: Select the modeling method according to the characteristics of the variables and the purpose of analysis, combine the characteristic index weights, optimize the characteristic system of the index multiple times, and adjust the parameters of the model through continuous parameter adjustment training. The parameter adjustment data modeling process adopts the grid parameter adjustment method to adjust the parameters of the model and establish a low-voltage user voltage prediction model. This embodiment adopts the LSTM neural network model to predict low voltage in the substation area;
[0039] Result evaluation: The root mean square of the relative error is used as the error evaluation standard, and the error calculation formula is as follows:
[0040]
[0041] where f t (i) is the actual value of voltage, f p (i) is the voltage prediction value, n is the number of samples. By setting the error threshold, the prediction result is optimized until the error is within the threshold range. It is evaluated by the above formula. The accuracy of the calculation result is used to see whether the model result is consistent with the initially set target.
[0042] The data preprocessing method described in this embodiment includes:
[0043] 1. Missing value processing: During the data entry and storage process, some data may be missing, so appropriate methods must be used to retrieve these missing data. The principle of missing value processing is to maximize the similarity and correlation between the missing values after filling and other data. Methods include empirical value substitution and global variable replacement.
[0044] 2. Outlier processing: In the original data, there may be a situation where some data is very different from other data. The existence of such data will interfere with the overall data analysis, so it needs to be processed. The method for judging outliers is the 3σ principle and box plot analysis. The method for processing outliers is model comprehensive analysis method and the use of existing statistical methods.
[0045] 3. Data standardization. The purpose of standardization is to convert dimensional data into dimensionless values within a small interval to facilitate the integration and correlation analysis of data. Commonly used methods include: MIN-MAX standardization, proportional transformation method, average method, exponential conversion method, etc.
[0046] Since the grid voltage data has accumulated a large amount of historical data after years of recording, and the prediction effect of the neural network needs to rely on a large amount of data training and optimization, a neural network model is selected. There are many models of neural networks, such as CNN, DNN, RNN, LSTM, etc., among which LSTM is an improved one based on RNN, which has most of the advantages of RNN and also solves the problem of gradient disappearance in the back propagation process. In the low-voltage user field area described in the present invention, the voltage data itself has a certain dependence in the time dimension, and the voltage situation in the future period is derived from the continuous change of the past and current voltage values. Although the LSTM network is not as good as CNN in the classification problem, it is very effective in the problem of dependence between the various observations. The LSTM network has a better fitting effect for data with irregular changes in fixed components. The general ARIMA time series prediction will only have a more accurate prediction result in the scenario where the sequence trend is obvious, and LSTM does better in unstable time series with fixed components, and it has rapid adaptability to the sharp changes in the trend. Based on the above description, the sharp change, fixed components, and high correlation with the time series are the characteristics of the voltage prediction of the user in the station area, so the present invention chooses to use LSTM to predict the low voltage in the station area.
[0047] Example 2
[0048] This embodiment provides a process for establishing a low-voltage user voltage prediction model, including the following steps:
[0049] S1. Data processing: import the processed data set into the model.
[0050] Data shape transformation: convert the data set format into a matrix form that can be read by the model;
[0051] Dataset division: The data set is divided into a training set and a test set. The training set is used to determine the parameters of the model, and the test set is used to judge the effect of the model. The training set accounts for 80% and the test set accounts for 20%.
[0052] Data normalization: Normalize each eigenvalue of the feature system and scale it to between 0 and 1, so that the contribution of the variable to the prediction result is directly reflected by its weight;
[0053] S2, model training, setting and continuously adjusting the weight parameters between each layer of the input, continuously training and optimizing the input and output through iteration until the end of training. There is a big difficulty in low voltage model training, that is, the difference between positive and negative samples is too large, and the number of negative samples accounts for more than 99%, which seriously affects the training results. During the training, the sample balance processing technology is collected to optimize the training results, and combined with the feature index weight, the index system is optimized multiple times to improve the model performance;
[0054] S3, model testing, import the test data into the trained model, denormalize the predicted value, and then put the result into the error formula to calculate whether the accuracy meets the requirements.
[0055] The training process of the LSTM model is essentially to set and continuously adjust the weight parameters between each layer of the input. The activation probabilities of neurons in each layer of the network are:
[0056] i_{t}=σ(Uixt+Wiht-1+bi)
[0057] f_{t}=σ(Ufxt+Wfht-1+bf)
[0058] o_{t}=σ(Uoxt+Woht-1+bo)
[0059] c_{t}=f_{t}*c_{t-1}+i_{t}*tanh(Uuxt+Wuht-1+bu)h_{t}=o_{t}*tanh(c_{t})
[0060] Among them, σ represents the sigmoid activation function, tanh represents the hyperbolic tangent function, U and W represent weight matrices, and b represents the bias term. The input and output quantities are continuously trained and parameter optimized through iterative methods until the training is completed.
[0061] The LSTM neural network model includes an input layer, a hidden layer and an output layer, wherein the input layer and the output layer are each one layer, and the number of hidden layers varies according to actual needs. A large number of layers can improve the model effect to a certain extent, but if there are too many layers, it may lead to increased model complexity, longer training time, and poor results; if there are fewer layers, the training speed will be relatively fast, but the prediction accuracy of the trained model will be greatly reduced. Figure 3 The structural diagram of the model provided in this embodiment. The input layer combines the correlation analysis of influencing factors to set the input nodes; the number of nodes in the hidden layer corresponds to the input layer, and each node is an LSTM unit, which includes input gates, forget gates, output gates and other structures; the output layer outputs whether there is a low voltage risk.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present invention, which should be included in the scope of the technical solution for protection of the present invention.
Claims
1. A method for predicting low-voltage users in a power grid based on XGBoost, characterized in that: The steps include: Determine the target: define the area to be predicted and determine the data source; Form a data mining library: collect different types of data from low-voltage users in multiple systems in the region, integrate the data from different systems, ensure the consistency of field types and formats during integration, and establish a data set mining library; Data preprocessing: Clean, integrate, transform and reduce data from different systems to improve the quality of subsequent data mining, reduce the time required for actual mining, and build a feature system based on substation archive indicators, substation transformer measurement indicators, user indicators and other indicators; Data modeling: Select the modeling method according to the characteristics of the variables and the purpose of analysis, combine the characteristic index weights, optimize the characteristic system of the index multiple times, and establish a low-voltage user voltage prediction model through continuous parameter adjustment and training; Result evaluation: The root mean square of the relative error is used as the error evaluation standard, and the error calculation formula is as follows: where f t (i) is the actual value of voltage, f p (i) is the voltage prediction value, n is the number of samples. By setting the error threshold, the prediction result is optimized until the error is within the threshold range. It is evaluated by the above formula. The accuracy of the calculation result is used to see whether the model result is consistent with the initially set target.
2. The method for predicting low-voltage users in a power grid based on XGBoost according to claim 1 is characterized in that: The data preprocessing method includes: missing value processing, outlier processing, and data standardization.
3. The method for predicting low-voltage users in a power grid based on XGBoost according to claim 1 is characterized in that: The low-voltage user voltage prediction model adopts the LSTM neural network model to predict the low voltage in the substation area.
4. The method for predicting low-voltage users in a power grid based on XGBoost according to claim 1 is characterized in that: The process of parameter adjustment data modeling adopts a grid parameter adjustment method to adjust the parameters of the model.
5. The method for predicting low-voltage users in a power grid based on XGBoost according to claim 1 is characterized in that: The process of establishing a low-voltage user voltage prediction model comprises the following steps: S1. Data processing: import the processed data set into the model. Data shape transformation: convert the data set format into a matrix form that can be read by the model; Dataset division: The data set is divided into a training set and a test set. The training set is used to determine the parameters of the model, and the test set is used to judge the effect of the model. The training set accounts for 80% and the test set accounts for 20%. Data normalization: Normalize each eigenvalue of the feature system and scale it to between 0 and 1, so that the contribution of the variable to the prediction result is directly reflected by its weight; S2, model training, setting and continuously adjusting the weight parameters between each layer of the input, and continuously training and optimizing the input and output through iteration until the training is completed; S3, model testing, import the test data into the trained model, denormalize the predicted value, and then put the result into the error formula to calculate whether the accuracy meets the requirements.
6. The method for predicting low-voltage users in a power grid based on XGBoost according to claim 1, characterized in that: The LSTM neural network model includes an input layer, a hidden layer and an output layer. The input layer is combined with the correlation analysis of influencing factors to set input nodes; the hidden layer has several layers, the number of nodes in the hidden layer is set corresponding to the input layer, and each node is an LSTM unit.