A method for transformer load prediction
Through improved clustering algorithm and wavelet threshold denoising processing, typical samples were selected and dimensionality reduction was reduced, and artificial neural network model was built, which solved the problem of insufficient targetedness and accuracy of traditional transformer load prediction methods, and achieved more efficient load prediction .
Patent Information
- Application Number
- CN202210718631.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-23
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2042-06-23
AI Technical Summary
The traditional transformer load prediction method lacks targetedness and insufficient prediction accuracy, and depends on high-quality training samples. The abnormal data and noise in the original samples have a large impact, resulting in large model prediction errors.
An improved clustering algorithm is used to identify and eliminate abnormal load curves, filter out typical daily load curve samples, reduce the training sample size, and build an artificial neural network model for training through wavelet threshold denoising and dimensionality reduction processing to achieve online real-time updates.
It improves the operation speed of neural network and the generalization performance of prediction models, improves the accuracy and stability of transformer load prediction, and realizes accurate prediction of transformer daily load.
Smart Images

Figure CN115049136B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a transformer load prediction method, belonging to the technical field of power load prediction methods. Background Art
[0002] Transformer daily load forecasting is a key link in the prediction of winding hot spot temperature and the formulation of daily load forecasting methods. Traditional load forecasting is generally based on similar days or simplified load models, but regional loads are closely related to local economy, climate, industrial composition, and electricity consumption habits. Different regions have different electricity consumption patterns, and there is no universally applicable load forecasting model. Traditional methods are not targeted enough and lack prediction accuracy. With the rapid development of computer science and technology, machine learning algorithms are used to learn and model historical load, meteorological and other data, and nonlinear mapping relationships between input and output quantities are established in a targeted manner, which greatly improves the accuracy of load forecasting in various occasions. Commonly used intelligent forecasting methods mainly include: gray system theory, expert system method, artificial neural network method, and optimal combination forecasting method. Among them, artificial neural network is the most basic method and its application is also the most extensive.
[0003] Artificial Neural Networks (ANN) is a multi-layer network structure composed of multiple artificial neurons, used to simulate the learning and processing process of information in the human brain. The neurons in each layer of ANN are connected to each other, and different neurons have different connection weights. Through learning various types of information, reliable approximation of information rules is achieved. ANN has the ability to remember, learn and adjust autonomously. For multi-layer artificial neural networks, it only needs to design a suitable network structure and use enough samples for training. In theory, it can approximate any complex nonlinear model and system.
[0004] Compared with traditional forecasting methods, short-term load forecasting based on ANN has higher prediction accuracy, but it depends on the quality of training samples. The influence of training samples on neural networks even exceeds the structure of neural networks themselves. Therefore, providing accurate samples is very important to improve prediction accuracy. For a large number of original samples, if all are selected, the training speed of the neural network will be too slow; if randomly selected, a small number of useful samples may be missed, resulting in poor stability of the prediction model. In addition, due to the influence of load shock, noise and abnormal data in the original samples, if they are not effectively processed, the prediction error of the trained model will be too large. Summary of the invention
[0005] The purpose of the present invention is to provide a transformer load prediction method, which takes the transformer historical daily load curve as the original sample, uses an improved clustering algorithm to identify and eliminate abnormal load curves, reduces the interference of abnormal curves on the neural network, and obtains several types of typical daily load curve samples by clustering and screening. From the screened several types of samples, an approximate number of samples are taken from each type to form a neural network training set, which can greatly reduce the scale of training samples and ensure that categories with a small number of samples are not omitted, so that more useful features can be included in a smaller training sample scale, thereby greatly improving the neural network operation speed, improving the generalization performance and prediction accuracy of the prediction model, so as to achieve the purpose of establishing an accurate transformer load prediction model and accurately predicting the transformer daily load, and effectively solve the above-mentioned problems existing in the background technology.
[0006] The technical solution of the present invention is: a transformer load prediction method, comprising the following steps:
[0007] a. Take the transformer load value at the hourly point on the day before the forecast, the maximum temperature on the day, the minimum temperature on the day, the weather and type on the day of forecast as input data, and the load value at the hourly point on the day of forecast as output data, determine the number of nodes in the input layer and the output layer, and build the ANN model;
[0008] b. Quantify the non-numerical quantity prediction of the weather and type of the day into data in the interval [0,1];
[0009] c. Use wavelet threshold denoising to smooth the instantaneous impact data in historical load data;
[0010] d. Normalize the input and output samples of the artificial neural network;
[0011] e. Use cluster analysis to screen samples, remove abnormal load data, and divide samples into several typical categories;
[0012] f. According to the number of samples in each category in the typical classification, select an approximate number of samples in each category as training samples for the ANN;
[0013] g. Perform dimension reduction processing on load sample data;
[0014] h. Train the ANN load forecasting model, adjust the number of hidden layers to statistically predict the effect, determine the optimal number of hidden layers of the neural network, and train to obtain the daily load forecasting model of the transformer;
[0015] i. The input of the transformer load prediction model is updated online in real time, and the load at the next hour in the next 24 hours is predicted online based on the historical load of the previous 24 hours and the weather and temperature forecast of the prediction period.
[0016] In the step a, the ANN model is constructed including 28 input nodes, including the load value at 24:00 on the day before the forecast, the maximum temperature on the forecast day, the minimum temperature on the forecast day, the weather and type on the forecast day, and 24 output nodes, including the load value at 24:00 on the forecast day.
[0017] In the step e, the samples are classified based on the effective index k-means clustering method, and a judgment process for the number of samples in each classification is introduced. When the number of samples is less than the set value, the sample is judged to be abnormal, and the samples are removed and reclassified. When the number of clusters is k, the effective index calculation formula is based on formula (1):
[0018]
[0019] Among them, S j and C j are the curves of the jth classification and the corresponding cluster centers; C k1 and C k2 are two different cluster centers when the number of categories is k; N s is the number of data in the dataset.
[0020] In the step f, from each type of typical samples obtained by cluster analysis, an approximate number of samples are randomly selected from each type and added to the neural network training set to ensure that samples of all typical categories are included.
[0021] In step g, in order to reduce the number of ANN nodes and improve the calculation speed, the load sample data is reduced in dimension to obtain 24-hour load data.
[0022] The beneficial effects of the present invention are as follows: taking the historical daily load curve of the transformer as the original sample, using the improved clustering algorithm to identify and eliminate the abnormal load curve therein, reducing the interference of the abnormal curve on the neural network, clustering and screening to obtain several types of typical daily load curve samples, and taking an approximate number of samples from each of the screened samples to form a neural network training set, which can greatly reduce the scale of training samples and ensure that categories with a small number of samples are not omitted, so as to include more useful features with a smaller training sample scale, thereby greatly improving the neural network operation speed, improving the generalization performance and prediction accuracy of the prediction model, so as to achieve the purpose of establishing an accurate transformer load prediction model and realizing accurate prediction of the transformer daily load. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a flow chart of the present invention;
[0024] Figure 2 It is a wavelet threshold denoising result diagram of the load curve of the present invention;
[0025] Figure 3It is a flow chart of the improved k-means clustering algorithm of the present invention;
[0026] Figure 4 This is the improved k-means load clustering result diagram of the present invention;
[0027] Figure 5 It is a structural diagram of the transformer neural network load prediction model of the present invention;
[0028] Figure 6 This is a comparison chart of load forecasting effects between the present invention and other methods. DETAILED DESCRIPTION
[0029] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments, which are preferred embodiments of the present invention. It should be understood that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments; it should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] A transformer load prediction method comprises the following steps:
[0031] a. Take the transformer load value at the hourly point on the day before the forecast, the maximum temperature on the day, the minimum temperature on the day, the weather and type on the day of forecast as input data, and the load value at the hourly point on the day of forecast as output data, determine the number of nodes in the input layer and the output layer, and build the ANN model;
[0032] b. Quantify the non-numerical quantity prediction of the weather and type of the day into data in the interval [0,1];
[0033] c. Use wavelet threshold denoising to smooth the instantaneous impact data in historical load data;
[0034] d. Normalize the input and output samples of the artificial neural network;
[0035] e. Use cluster analysis to screen samples, remove abnormal load data, and divide samples into several typical categories;
[0036] f. According to the number of samples in each category in the typical classification, select an approximate number of samples in each category as training samples for the ANN;
[0037] g. Perform dimension reduction processing on load sample data;
[0038] h. Train the ANN load forecasting model, adjust the number of hidden layers to statistically predict the effect, determine the optimal number of hidden layers of the neural network, and train to obtain the daily load forecasting model of the transformer;
[0039] i. The input of the transformer load prediction model is updated online in real time, and the load at the next hour in the next 24 hours is predicted online based on the historical load of the previous 24 hours and the weather and temperature forecast of the prediction period.
[0040] In the step a, the ANN model is constructed including 28 input nodes, including the load value at 24:00 on the day before the forecast, the maximum temperature on the forecast day, the minimum temperature on the forecast day, the weather and type on the forecast day, and 24 output nodes, including the load value at 24:00 on the forecast day.
[0041] In the step e, the samples are classified based on the effective index k-means clustering method, and a judgment process for the number of samples in each classification is introduced. When the number of samples is less than the set value, the sample is judged to be abnormal, and the samples are removed and reclassified. When the number of clusters is k, the effective index calculation formula is based on formula (1):
[0042]
[0043] Among them, S j and C j are the curves of the jth classification and the corresponding cluster centers; C k1 and C k2 are two different cluster centers when the number of categories is k; N s is the number of data in the dataset.
[0044] In the step f, from each type of typical samples obtained by cluster analysis, an approximate number of samples are randomly selected from each type and added to the neural network training set to ensure that samples of all typical categories are included.
[0045] In step g, in order to reduce the number of ANN nodes and improve the calculation speed, the load sample data is reduced in dimension to obtain 24-hour load data.
[0046] In practical applications, the ANN model constructed in step a includes 28 input nodes, including the load value at 24:00 on the day before the forecast, the maximum temperature on the forecast, the minimum temperature on the forecast, the weather and type on the forecast, and 24 output nodes, including the load value at 24:00 on the forecast day.
[0047] In the step b, holidays, weekends and working days are quantized to 0, 0.5 and 1 respectively, and the weather is quantized according to Table 1;
[0048] Table 1 Quantitative table of weather conditions
[0049]
[0050] In step c, the daily load curve is smoothed by wavelet threshold denoising to remove spike noise and impact data in the data. The threshold is set according to formula (1):
[0051]
[0052] Among them, M is the median of the absolute value of the first-layer wavelet decomposition coefficients; K G is the adjustment coefficient of the standard deviation of Gaussian noise; N is the signal scale.
[0053] In the step d, the transformer load value at the hour, the predicted daily maximum temperature and the predicted daily minimum temperature are normalized according to formula (2), and the sample data is transformed into the interval [0,1];
[0054]
[0055] Among them, x min and x max are the minimum and maximum values of the input samples respectively.
[0056] In step e, the samples are classified based on the effective index k-means clustering method, and a judgment process for the number of samples in each classification is introduced. When the number of samples is less than the set value, the samples of this type are judged to be abnormal, and the samples are removed and reclassified. When the number of clusters is k, the effective index calculation formula is based on formula (3):
[0057]
[0058] Among them, S j , C j are the curves of the jth classification and the corresponding cluster centers; C k1 , C k2 are two different cluster centers when the number of categories is k; N s is the number of data in the dataset.
[0059] In the step f, among the various types of samples obtained by clustering, an approximate number of samples of each type are randomly selected and added to the ANN training set to ensure that samples of each typical type are included;
[0060] In step g, in order to reduce the number of ANN nodes and improve the calculation speed, the load sample data is reduced in dimension to obtain the load data at 24 o'clock;
[0061] In the step h, the range of the ANN hidden layer is determined according to formula (4), and the number of hidden layers is adjusted within this range until the model prediction performance reaches the best, which is determined as the number of ANN hidden layers;
[0062]
[0063] Where n is the number of input nodes; l is the number of output nodes; α is an integer between 1 and 10.
[0064] Example:
[0065] like Figure 1 , the present invention is divided into the following steps:
[0066] ① Taking the transformer's historical load, ambient temperature, date and weather data as input data, and the transformer's predicted load value as output data, the original sample quantity is sorted out, and the 365 daily load curves of a transformer with a capacity of 50MW in a certain area in a certain year are the original samples;
[0067] ② Holidays, weekends and working days are quantified to 0, 0.5 and 1 respectively, and the weather is quantified according to the method in Table 1, so that all non-numerical quantities are quantified into ANN usable data;
[0068] Table 1 Quantitative table of weather conditions
[0069]
[0070] ③ All historical load data are smoothed using the wavelet threshold denoising method to filter out spikes and impact data in the data. The thresholds of each layer are set according to formula (1):
[0071]
[0072] Among them, M is the median of the absolute value of the first-layer wavelet decomposition coefficients; K G is the adjustment coefficient of the Gaussian noise standard deviation; N is the signal scale;
[0073] The result of load data denoising after wavelet threshold processing is shown in the figure below. Figure 2 As shown, after smoothing, the spikes in the original data are filtered out;
[0074] ④ Normalize the transformer load value at the hourly point and the predicted daily maximum and minimum temperatures according to formula (2), and transform the sample data into the interval [0,1];
[0075]
[0076] Among them, x min and x max are the minimum and maximum values of the input samples respectively.
[0077] ⑤ If Figure 3 , the improved effective index k-means clustering analysis process adds an abnormal data judgment process. The classification with less than the set value of clustered samples is considered invalid. After deleting the invalid classification, the remaining samples will be re-clustered;
[0078] When the number of clusters is k, the effective index calculation formula is based on formula (3):
[0079]
[0080] Among them, S j , C j are the curves of the jth classification and the corresponding cluster centers; C k1 , C k2 are two different cluster centers when the number of categories is k; N s is the number of data in the dataset.
[0081] After the load samples are clustered by effective index k-means, the load sample classification is as follows: Figure 4 , 11 abnormal samples were screened out, and a total of 354 available samples of 3 typical categories were obtained.
[0082] ⑥ Reduce the dimension of load sample data to obtain 24-hour load data, reduce the number of ANN nodes, and improve the calculation speed;
[0083] ⑦ Train the neural network with samples obtained by three different methods, and use the same samples to test its prediction performance;
[0084] The test set samples are composed of 10 samples selected from each of the three types of load samples after clustering;
[0085] The training set sample selection method is as follows: Method 1: In addition to the test set samples, the remaining 335 samples are included in the training set; Method 2: In addition to the test set samples, 60 samples are randomly selected from the remaining 335 samples; Method 3: In addition to the test set samples, 20 samples are randomly selected from each of the three types of samples (a total of 324) obtained by the present invention;
[0086] ⑧ Such as Figure 5 ,ANN contains 28 input nodes including the load value at 24:00 on the day before the forecast day, the maximum temperature on the forecast day, the minimum temperature on the forecast day, the weather and type on the forecast day;
[0087] ANN contains 24 output nodes for predicting the load value at 24 o'clock every day;
[0088] The range of hidden layers is determined according to formula (4). The number of hidden layers is adjusted within this range until the model prediction performance reaches the best, which is determined as the number of ANN hidden layers.
[0089]
[0090] Neural network input layer weight w ij and the output layer weight v jkThe update formula of is determined according to formula (5);
[0091]
[0092] Among them, x i is the i-th input of the neural network input layer; h j is the output of the jth node in the hidden layer; y k and d_k is the output and expected output of the kth node in the output layer; f′ is the derivative of the hidden layer activation function with respect to the hidden layer input; F′ is the derivative of the output layer activation function with respect to the output layer input; η∈(0,1) is the learning rate;
[0093] The hidden layer activation function uses the sigmoid function:
[0094]
[0095] The output layer activation function is:
[0096] F(x)=x (7)
[0097] ⑨The performance of the transformer load prediction model is evaluated from five dimensions: prediction absolute error, average error, average relative error, root mean square error, and correlation coefficient;
[0098] Predicted value y p (a) and the true value y r The absolute error of (a) is:
[0099] E p (a) = y p (a)-y r (a) (8)
[0100] The average error of multiple predictions is:
[0101]
[0102] Where N c is the number of error values.
[0103] The average relative error reflects the overall error of multiple prediction values:
[0104]
[0105] Root mean square error P RMSE It reflects the degree to which multiple predicted values deviate from the true value. The smaller the value, the more stable the prediction result. The root mean square error is:
[0106]
[0107] The correlation coefficient R is introduced to evaluate the overall prediction performance of the multi-day load of the neural network. The closer R is to 1, the better the performance of the model.
[0108]
[0109] The training set samples obtained by the three sample selection methods are used to train the neural network. Taking the load forecasting results of the three types of samples in the test set as an example, Figure 6 The following is a comparison of load forecasting effects for three days.
[0110] By comparison, it can be seen that the prediction accuracy of the three types of loads in method 1 is not high, but the gap between them is small; the prediction accuracy in method 2 is low, especially the prediction error of the categories with a small proportion is large. The reason is that the random selection leads to a low proportion of the categories with a small number of samples in the training samples, and the training is insufficient; the average relative error and mean square error of method 3 are smaller than those of the first two, and the prediction errors of each type are relatively close, indicating that after adopting the sample optimization method in the present invention, the prediction accuracy and stability of the load at each point are improved.
[0111] In order to further compare and analyze the overall prediction performance of the model, the absolute error, average error, root mean square error and correlation coefficient were statistically analyzed on a daily basis. The loads of 30 forecast days in the test set were predicted. The comparison of the performance indicators of the models built by the three methods is shown in Table 2.
[0112] Table 2. Comparison of overall prediction performance of different sample selection methods
[0113]
[0114] Absolute error E of method 3 M , average relative error P M , mean square error P RMSE and the correlation coefficient R are significantly smaller, and the model training time T train Therefore, a comprehensive analysis of the above example results shows that after the training samples are processed by wavelet threshold denoising and smoothing and improved k-means clustering screening, the load forecasting accuracy, stability and speed in different situations are improved significantly, and the overall forecasting performance has been greatly improved.
[0115] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A transformer load prediction method, characterized in that The following steps are involved: a. Take the transformer load value at the hourly point on the day before the forecast, the maximum temperature on the day, the minimum temperature on the day, the weather and type on the day of forecast as input data, and the load value at the hourly point on the day of forecast as output data, determine the number of nodes in the input layer and the output layer, and build the ANN model; b. Quantify the non-numerical quantity prediction of the weather and type of the day into data in the interval [0,1]; c. Use wavelet threshold denoising to smooth the instantaneous impact data in historical load data; d. Normalize the input and output samples of the artificial neural network; e. Use cluster analysis to screen samples, remove abnormal load data, and divide samples into several typical categories; f. According to the number of samples in each category in the typical classification, select samples in each category as training samples for ANN; g. Perform dimension reduction processing on load sample data; h. Train the ANN load forecasting model, adjust the number of hidden layers to statistically predict the effect, determine the optimal number of hidden layers of the neural network, and train to obtain the daily load forecasting model of the transformer; i. The input of the transformer load forecasting model is updated online in real time, and the load at the next 24 hours is predicted online based on the historical load of the previous 24 hours and the weather and temperature forecast of the forecast period; In step e, the samples are classified based on the effective index k-means clustering method, and a judgment process for the number of samples in each category is introduced. When the number of samples is less than the set value, the sample is judged to be abnormal, and the sample is removed and reclassified. k The calculation formula of the effective index is based on formula (1): in, S j and C j Respectively j Classification curves and corresponding cluster centers; C k1 and C k2 When the number of categories is k Two different cluster centers at each time point; N s is the number of data in the data set; In the step f, from each type of typical samples obtained by cluster analysis, samples of each type are randomly selected and added to the neural network training set to ensure that samples of all typical categories are included; In step g, in order to reduce the number of ANN nodes and improve the calculation speed, the load sample data is reduced in dimension to obtain 24-hour load data.
2. A transformer load prediction method according to claim 1, characterized in that: In the step a, the ANN model is constructed including 28 input nodes, including the load value at 24:00 on the day before the forecast, the maximum temperature on the forecast day, the minimum temperature on the forecast day, the weather and type on the forecast day, and 24 output nodes, including the load value at 24:00 on the forecast day.
