Short-term power load interval prediction method considering interval structure
By constructing the TCN-EAD network model and using the proportional coefficient method to construct the prediction interval, and combining PISI and WOA optimization algorithms for optimization, the problem of difficult control of interval width and complex principles in short-term power load interval prediction is solved, and high-precision and adaptive power load interval prediction is achieved.
Patent Information
- Application Number
- CN202411368659.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-02-28
AI Technical Summary
Short-term power load interval prediction has problems such as difficult interval width to control, complex principles, and high calculation costs.
The TCN-EAD network model is used to predict the power load point, and the prediction interval is constructed by the proportional coefficient method. The hyperparameters and proportional coefficients are optimized by combining the prediction interval satisfaction index PISI and WOA optimization algorithm to optimize the prediction interval.
It improves the accuracy and adaptability of short-term power load interval prediction, controls the prediction interval width, simplifies the principle and reduces the calculation cost, and ensures the stable operation of the power system.
Smart Images

Figure CN119539139A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of short-term power load interval prediction, and in particular to a short-term power load interval prediction method considering interval structure. Background Art
[0002] Building a new power system with new energy as the main body is an important prerequisite and inevitable trend to promote the low-carbon transformation and development of modern power systems. In the process of building new power systems, power load forecasting technology plays an important role. Accurate short-term power load point forecasting results can provide decision makers with reliable load change information for the next day or the next few days, which is an effective guarantee for the optimal dispatching strategy of the new power system.
[0003] With the development of new power systems, the types of loads are increasing, and the energy consumption behaviors of users are becoming more complex and changeable, which leads to the rapid growth of uncertainty on both the supply and demand sides, thus affecting the accuracy of the short-term power load point forecasting method. Based on the short-term power load point forecast, interval forecasting can quantify the uncertainty in the forecast, reflect the volatility of power load to a certain extent, and provide the upper and lower limits of probability for the prediction of the true value of power load, thereby ensuring the stable dispatch of power system.
[0004] In view of the problems of interval prediction, such as difficult to control interval width, complex principles, and high calculation cost, it is necessary to improve load interval prediction technology, improve prediction accuracy and adaptability, and ensure the stable operation of the power system.
[0005] The patent document with the document number CN115564123A discloses a short-term power load interval prediction based on multi-objective and Bayesian optimization. The multi-objective and Bayesian optimization theory is introduced through the solution to construct a deep learning interval prediction model based on MOBO. The experimental results show that the proposed model can more accurately describe the fluctuation range of power load, but it also has the following problems: the interval width of interval prediction is difficult to control and the principle is complicated.
[0006] Patent document No. CN113850443A discloses a short-term power load interval forecasting method based on non-parametric Bootstrap error sampling. The solution adopts the non-parametric Bootstrap method to sample the error in each interval. The model reduces the uncertainty of load forecasting and its forecast error, and has certain applicability. However, the solution also has problems such as the interval width of interval forecasting is difficult to control and the principle is complicated. Summary of the invention
[0007] The purpose of the present invention is to provide a short-term power load interval prediction method taking interval structure into consideration, so as to solve the problems existing in short-term power load interval prediction, such as difficult to control interval width, complex principle and high calculation cost.
[0008] An embodiment of the present invention provides a short-term power load interval prediction method considering interval structure, including:
[0009] S1. Build and train the TCN-EAD network model for power load prediction, and use the trained TCN-EAD network model to obtain power load point prediction;
[0010] S2, using the point prediction as the basis and using the proportional coefficient method to construct the prediction interval;
[0011] S3, construct the prediction interval satisfaction index PISI;
[0012] S4. Use the WOA optimization algorithm to optimize the hyperparameters of the TCN-EAD network model and obtain the optimal hyperparameter TCN-EAD network model; at the same time, use the WOA optimization algorithm in combination with the PISI index to optimize the prediction interval proportional coefficient and calculate the optimal proportional coefficient;
[0013] S5. Use the optimal hyperparameter TCN-EAD network model to obtain point predictions, and construct the optimal prediction interval of power load based on the point prediction according to the optimal proportional coefficient.
[0014] Optionally, the TCN-EAD network model includes a TCN model;
[0015] Among them, the TCN model consists of an input layer, an output layer, and a stack of multiple TCN residual modules, and the formula is expressed as:
[0016]
[0017] Among them, x is the input layer input, F is the transformation operation, h is the number of residual modules, is the output layer output, ReLU is the activation function;
[0018] Optionally, the TCN-EAD network model also includes an EAD model;
[0019] Among them, the EAD model consists of an input layer, an encoding layer, an attention layer, a decoding layer, and an output layer, including the following steps:
[0020] S11, the encoding layer encodes the input vector to obtain the output vector, the formula is:
[0021]
[0022] h=[h1,h2,...,h j ,...,h i ] T
[0023]
[0024] Among them, the encoding layer includes multiple layers of GRU units. is the input vector, h is the output vector, h i represents the output vector of the coding layer at time i; f(·) represents the coding function of the multi-layer GRU unit.
[0025] S12, the output vector of the encoding layer is input into the attention layer to obtain the encoding vector, which is expressed as:
[0026] e j =utanh(w0h j +b0)
[0027]
[0028] Among them, e j represents the output vector h from the encoding layer at time t j The attention probability distribution value determined by ; u and w0 are weight coefficients; b0 is the bias coefficient; α j is the attention weight; s i represents the encoding vector at the i-th moment;
[0029] S13, the encoding vector is input into the decoding layer for decoding. The decoding layer includes multiple layers of GRU units. In the gth GRU unit, v i The calculation formula is:
[0030]
[0031] Among them, v i-1 is the state of GRU unit i-1; v i is the output or state of the GRU unit at time i; s gi is the input of GRU unit i at time; w is the weight coefficient; σ is the sigmoid function;
[0032] S14, decoding vector v i Input the output layer to obtain the final predicted point value. The formula is:
[0033]
[0034] Among them, W1 is the weight coefficient of the output layer; b1 is the bias coefficient of the output layer.
[0035] Optionally, in S2, the prediction interval is constructed by using the proportional coefficient method based on the point prediction, and the formula is:
[0036]
[0037] Among them, x i and They are the input value and point prediction value of the TCN-EAD network model at time i; U(x i ) and L(x i ) are the upper and lower limits of the prediction interval of the TCN-EAD network model at time i; a i and b i is the proportional coefficient at time i.
[0038] Optionally, the prediction interval satisfaction index PISI includes interval coverage ratio PICP, interval average width percentage PIMWP and interval average center deviation percentage PIMCDP, where:
[0039] The interval coverage rate PICP is expressed as follows:
[0040]
[0041] Among them, c i The expression is:
[0042]
[0043] The average interval width percentage PIMWP is expressed as:
[0044]
[0045] The interval mean center deviation percentage PIMCDP is expressed as:
[0046]
[0047] Where N is the total number of prediction points; x i and i are the input value and true value of the neural network in the i-th sampling interval; U(x i ) and L(x i ) are the upper and lower bounds of the prediction interval respectively;
[0048] Optionally, the prediction interval satisfaction index PISI is constructed using the formula:
[0049] PISI=1-PIMWP(1+λPIMCDP)(1+e -η(PICP-μ) )
[0050] Among them, λ and η are the penalty coefficients of PIMCDP and PICP evaluation indicators respectively; μ is the confidence level (1-α); if the PISI calculation result is less than 0, then PISI is set to 0.
[0051] Optionally, in the WOA optimization algorithm:
[0052] The prey position is the optimization hyperparameter or optimization ratio coefficient, the whale is the hyperparameter to be optimized or the ratio coefficient to be optimized, and the whale group is a set of hyperparameters to be optimized or a set of ratio coefficients to be optimized in the TCN-EAD network model;
[0053] The position of the i-th whale individual is expressed as:
[0054] X i =[x i,1 ,x i,2 ,L,x i,m+2n ]
[0055] Among them, x i,j is the coordinate of the individual whale position, and its corresponding relationship with the set of hyperparameters to be optimized or the set of proportional coefficients to be optimized is as follows:
[0056]
[0057] Among them, the hyperparameter set of the TCN-EAD network model is s, the number of hyperparameters is m, the proportional coefficient set is a, b, and the number of proportional coefficients is n.
[0058] Furthermore, the WOA optimization algorithm is used to optimize the hyperparameters of the TCN-EAD network model to obtain the optimal hyperparameter TCN-EAD network model; at the same time, the WOA optimization algorithm is used to optimize the prediction interval proportional coefficient in combination with the PISI index to calculate the optimal proportional coefficient. The process function is:
[0059]
[0060] in, and is the optimal ratio coefficient of the validation set, PISI Valid is the PISI of the validation set; RMSE Valid is the RMSE of the validation set; y i,Valid and are the true value and predicted point value of the validation set respectively.
[0061] Optionally, the optimal prediction interval in S6 is expressed as:
[0062]
[0063] Among them, U * (x i ) and L * (x i ) are respectively the optimal upper bound and the optimal lower bound of the optimal prediction interval at time i. Beneficial effects of the present invention:
[0064] The present invention constructs a TCN-EAD neural network model as a base model of a power load point prediction method, makes full use of the sequence feature extraction capability of a temporal convolutional network TCN and the nonlinear fitting capability of an encoder-decoder network EAD fused with an attention mechanism, constructs an interval satisfaction index PISI as a measure of interval prediction, and transforms the optimization of the interval prediction model into a two-layer programming problem, wherein the lower-layer programming obtains the optimal model hyperparameters by optimizing the power load point prediction results, obtains the output point prediction reference position, and the upper-layer programming adaptively adjusts the interval proportional coefficient with the goal of maximizing PISI, uses a whale optimization algorithm WOA to solve, obtains the optimal proportional coefficient and the optimal TCN-EAD network model hyperparameter, and finally expands and scales the power load point prediction results based on the optimal proportional coefficient, thereby obtaining the power load interval prediction results. The present invention has good adaptability and accuracy, provides reliable load change information for power grid operation and dispatching, is suitable for complex and changeable user power consumption scenarios, and quantifies the uncertainty in power load prediction on the basis of a short-term power load point prediction method, so as to achieve the purposes of controlling the prediction interval width, simplifying the principle, and reducing the calculation cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A schematic flow chart of a method for predicting short-term power load intervals taking interval structure into consideration according to the present invention;
[0066] Figure 2 It is a schematic diagram of the principle of a short-term power load interval prediction method considering interval structure of the present invention;
[0067] Figure 3 This is a schematic diagram of the TCN model structure of the present invention;
[0068] Figure 4 It is a schematic diagram of the EAD model structure of the present invention;
[0069] Figure 5 This is a result diagram of using the method of the present invention to predict short-term power load intervals;
[0070] Figure 6 It is a schematic diagram of the structure of the electronic device of the present invention. DETAILED DESCRIPTION
[0071] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar symbols throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0072] In view of the problems that the width of the power load interval prediction interval is difficult to control, the principle is complex, and the calculation cost is high, the present invention provides a short-term power load interval prediction method considering the interval structure. Figure 1 A flow chart of a method for predicting short-term power load intervals considering interval construction provided by an embodiment of the present invention, the method comprising the steps of:
[0073] S1. Build and train the TCN-EAD network model for power load prediction, and use the trained TCN-EAD network model to obtain power load point prediction.
[0074] Based on the historical data of power load, training sets, test sets and validation sets are constructed to train and improve the TCN-EAD network model. The influencing factors of historical power load data include week type, maximum temperature, minimum temperature, average temperature, relative humidity, rainfall and other aspects.
[0075] like Figure 2 As shown, the TCN-EAD network model includes a TCN model and an EAD model.
[0076] like Figure 3 As shown in the figure, the TCN model consists of an input layer, an output layer, and a stack of multiple TCN residual modules. One branch of the TCN model residual module performs a transformation operation F on the input x, and the other branch performs a simple 1×1 conversion to maintain the consistency of the number of feature maps in parallel with the existing branches. The formula is expressed as:
[0077]
[0078] Among them, x is the input layer input, is the output of h-1 residual module, F is the transformation operation, h is the number of residual modules, It is the output of the h residual module and also the final output of the output layer. ReLU is the activation function.
[0079] The ReLU activation function formula is:
[0080]
[0081] like Figure 3As shown in the figure, a residual module of the TCN model contains two convolution units and one 1×1 convolution module. The dilated causal convolution operation is first performed in the convolution unit. By adjusting the dilated causal convolution factor d (the value of d increases with an integer power of 2) and changing the sampling interval, a larger receptive field is obtained with fewer convolution layers, that is, the area range to which the features on the convolution layer can be mapped, so that longer historical data can be received, ensuring the integrity of historical data, and only performing convolution operations on the input data before time t to obtain the output at time t, ensuring that the output is not affected by future information; weight normalization processing can be performed to map the weights of the neural network to a certain range to eliminate the influence of bad data.
[0082] ReLU is used as the activation function to enhance the nonlinear fitting ability of the neural network. Finally, a regularization (Dropout) operation is performed to stop the activation of neurons according to a certain probability, which can ensure the training speed of the TCN model neural network and prevent overfitting.
[0083] During the training process, the parallel 1×1 convolution module not only enables the neural network to have the function of transmitting information across layers, but also ensures the consistency of input and output, which can effectively alleviate the gradient explosion or disappearance phenomenon caused by too many training layers in the neural network.
[0084] like Figure 4 As shown in the figure, the EAD model consists of an input layer, an encoding layer, an attention layer, a decoding layer, and an output layer.
[0085] The encoding layer in EAD adopts the GRU structure, which is responsible for encoding the power load data. The attention layer is responsible for calculating the attention weight coefficient. The decoding layer adopts a multi-layer GRU structure, which is responsible for decoding the encoding vector. The data processing process includes the following steps:
[0086] The encoding layer includes multiple layers of GRU units. The encoding layer encodes the input vector to obtain the output vector. The formula is:
[0087]
[0088] h=[h1,h2,...,h j ,...,h i ] T
[0089]
[0090] Among them, the encoding layer includes multiple layers of GRU units. is the input vector, h is the output vector, h irepresents the output vector of the coding layer at time i; f(·) represents the coding function of the multi-layer GRU unit.
[0091] The input of the attention layer is the output vector h of the encoding layer. According to the weight distribution principle, the probabilities corresponding to different feature vectors are calculated, and the optimal weight parameter matrix is continuously updated and iterated to obtain the encoding vector. The formula is expressed as:
[0092] e j =utanh(w0h j +b0)
[0093]
[0094] Among them, e j represents the output vector h from the encoding layer at time t j The attention probability distribution value determined by ; u and w0 are weight coefficients; b0 is the bias coefficient; α j is the attention weight; s i Represents the encoding vector at the i-th moment and is transmitted to the decoding layer.
[0095] The encoded vector is input into the decoding layer for decoding. The decoding layer includes multiple layers of GRU units. The v i The calculation formula is:
[0096]
[0097]
[0098]
[0099] Among them, v i-1 is the state of GRU unit i-1; v i is the output or state of the GRU unit at time i; s gi is the input of GRU unit i at time; w is the weight coefficient; σ is the sigmoid function.
[0100] After multiple decoding processes by the GRU unit of the decoding layer, the decoding layer outputs the decoding vector v i ; Decoding vector v i The input and output layers change linearly to obtain the final prediction point value. The formula is:
[0101]
[0102] Among them, W1 is the weight coefficient of the output layer; b1 is the bias coefficient of the output layer.
[0103] In the EAD model, the encoding layer compresses the characteristic information of historical power load data into a fixed-dimensional encoding vector. The attention layer assigns different attention weights to the data characteristic information, emphasizing the influence of important input information, thereby improving the accuracy of the network model. The decoding layer parses the encoding vector and recursively feeds the prediction results back to the neural network, thereby slowing down the rapid accumulation of errors associated with prediction compensation and achieving more accurate predictions.
[0104] The TCN model part of the TCN-EAD network model, with its special dilated causal convolution structure, can fully explore the relationship between power load and user power consumption behavior for the input historical load data and extract important time series features; the EAD model part converts the time series feature sequence obtained by TCN processing into a state probability distribution sequence, which can better handle the nonlinear characteristics of the time series.
[0105] S2, using the point prediction as the basis and using the proportional coefficient method to construct the prediction interval;
[0106] After the TCN-EAD network model is established, the training set is used to train the TCN-EAD network model, the test set is used to test the effect of the TCN-EAD network model, and the validation set is used to further optimize the hyperparameters of the TCN-EAD network model and the proportional coefficient of the prediction interval.
[0107] After the TCN-EAD network model is trained, the TCN-EAD network model can be tested using the test set to obtain the power load point prediction value of the test set, and the prediction interval can be constructed using the proportional coefficient method based on the point prediction;
[0108] The formula is:
[0109]
[0110] Among them, x i and They are the input value and point prediction value of the TCN-EAD network model at time i; U(x i ) and L(x i ) are the upper and lower limits of the prediction interval of the TCN-EAD network model at time i; a i and b i is the proportional coefficient at time i.
[0111] S3, combining the TCN-EAD network model point prediction point value, and the proportional coefficient method to construct the prediction interval, and construct the prediction interval satisfaction index (PISI), including:
[0112] Prediction interval coverage probability (PICP);
[0113] Prediction interval meanwidthpercentage (PIMWP);
[0114] Prediction interval mean centre deviation percentage (PIMCDP), where:
[0115] The interval coverage ratio PICP is evaluated by measuring the number of load forecast intervals covering the true value [L(x i ),U(x i )], the larger the PICP is, the higher the reliability of the load forecast interval is.
[0116] The formula is:
[0117]
[0118] Among them, c i The expression is:
[0119]
[0120] The interval average width percentage PIMWP, the interval width is too large, although it can cover all the real values and meet the ideal interval coverage rate of PICP = 100%, but it is impossible to analyze the impact of uncertain information on the trend of power load changes, making the practical value of the interval prediction results low, so it is necessary to evaluate the interval width.
[0121] PIMWP is used to evaluate the quality of uncertainty information contained in the load forecast interval. The smaller the PIMWP is, the narrower the forecast interval width is and the lower the uncertainty level is. The formula is expressed as:
[0122]
[0123] In general, the prediction interval is required to be as centrally symmetric as possible with respect to the true value. If only PICP and PIMWP are used as evaluation indicators in the prediction, the degree of central deviation of the prediction interval cannot be determined, and the interval quality evaluation is not comprehensive enough.
[0124] Therefore, the present invention proposes the PIMCDP index, which is defined as the percentage of deviation between the midline value of the prediction interval and the true value when the prediction interval covers the true value. The smaller the PIMCDP, the closer the midline value of the prediction interval is to the true value, and the better its quality. The formula is expressed as:
[0125]
[0126] Where N is the total number of prediction results; x i and i are the input value and true value of the neural network in the i-th sampling interval; U(x i ) and L(x i ) are the upper and lower bounds of the prediction interval, respectively.
[0127] According to the interval coverage rate PICP, the interval average width percentage PIMWP and the interval average center deviation percentage PIMCDP, the prediction interval satisfaction index PISI is constructed.
[0128] PICP, PIMWP and PIMCDP are three conflicting indicators, that is, the higher the PICP of the load interval, the higher the corresponding PIMWP will be, and the value of PIMCDP will also fluctuate due to the changes in the upper and lower limits of the load interval. All three only consider the properties of one aspect of the load forecast interval and cannot comprehensively evaluate the quality of the forecast interval. Therefore, the forecast interval should have a smaller width and center deviation as possible while meeting the PICP requirements. The present invention uses linear weighting and other methods to construct a PISI containing multiple evaluation indicators, so that it takes into account the three aspects of interval width, interval coverage and interval center position. The formula is:
[0129] PISI=1-PIMWP(1+λPIMCDP)(1+e -η(PICP-μ) )
[0130] Among them, λ and η are the penalty coefficients of PIMCDP and PICP evaluation indicators respectively; μ is the confidence level (1-α); if the PISI calculation result is less than 0, then PISI is set to 0.
[0131] The analysis shows that PISI comprehensively considers the characteristics of the three evaluation indicators. When the interval coverage is less than or equal to the confidence level, that is, PICP≤μ, PICP will play a major role in determining PISI. On the contrary, when PICP≥μ, PIMWP and PIMCDP will become the determining factors of PISI. PISI distinguishes the importance of each indicator, emphasizes the important position of PICP for power load interval prediction, and plays a reasonable comprehensive evaluation role.
[0132] S4. Use the WOA optimization algorithm to optimize the hyperparameters of the TCN-EAD network model and obtain the optimal hyperparameter TCN-EAD network model; at the same time, combine the PISI index to use the WOA optimization algorithm to optimize the prediction interval proportional coefficient and calculate the optimal proportional coefficient.
[0133] The optimization of the TCN-EAD network model for power load forecasting is carried out in a two-level planning to obtain the optimal hyperparameters and the optimal proportional coefficient. The lower-level planning obtains the interval prediction benchmark position by optimizing the power load point prediction results, and further optimizes the hyperparameters using the WOA optimization algorithm to obtain the optimal hyperparameters; the upper-level planning adaptively adjusts the prediction interval proportional coefficient with the goal of maximizing the interval evaluation index PISI, determines the appropriate upper and lower bounds of the prediction interval, and optimizes to obtain the optimal proportional coefficient. Specifically:
[0134] The WOA optimization algorithm can be used to optimize the hyperparameters of TCN-EAD, such as the convolution kernel size, dilation factor, learning rate, and the number of neurons in the encoding and decoding layers.
[0135] The WOA optimization algorithm can also be used to predict the interval ratio coefficient a i and b i To optimize, solve the proportional coefficient a i and b i During the process, in order to ensure the optimal prediction interval and avoid the impact of data leakage, the validation set constructed using historical power load data can be used for optimization.
[0136] The prediction interval is evaluated based on the prediction interval satisfaction index PISI of the validation set. At the same time, the prediction interval optimization also involves the problem of power load point prediction. It is necessary to optimize the hyperparameters of the TCN-EAD network model based on the validation set data to ensure the relatively optimal power load point prediction result.
[0137] Assuming that the proportional coefficient changes smoothly over a continuous period of time, the optimal proportional coefficient obtained using the test set is and Approximately the optimal scaling factor of the validation set and (The corresponding test set post-forecast interval is optimal.) At the same time, the root mean square error (RMSE) is introduced in the process of optimizing the hyperparameters of the TCN-EAD network model to evaluate the prediction results of power load points.
[0138] The optimization can be performed by constructing a two-level programming model process function, the formula is:
[0139]
[0140] Among them, PISIValid is the PISI of the validation set; RMSE Valid is the RMSE of the validation set; y i,Valid and are the true value and predicted value of the validation set respectively.
[0141] The principle of the WOA optimization algorithm is to simulate the hunting behavior of humpback whales, introduce a bubble net hunting strategy, and optimize parameters through the process of whale groups searching, surrounding, chasing and attacking prey locations.
[0142] In the WOA optimization algorithm of the present invention, the prey position can be an optimization hyperparameter or an optimization proportional coefficient, the whale is a hyperparameter to be optimized or a proportional coefficient to be optimized, and the whale group is a set of hyperparameters to be optimized or a set of proportional coefficients to be optimized in the TCN-EAD network model;
[0143] The position of the i-th whale individual is expressed as:
[0144] X i =[x i,1 ,x i,2 ,L,x i,m+2n ]
[0145] Where x i,j is the coordinate of the individual whale position, and its corresponding relationship with the set of hyperparameters to be optimized or the set of proportional coefficients to be optimized is as follows:
[0146]
[0147] Among them, s is the hyperparameter set of the TCN-EAD network model, the number of hyperparameters is m, a, b are the proportional coefficient sets, and the number of proportional coefficients is n.
[0148] The optimization process using the WOA optimization algorithm includes:
[0149] The whales shrink the prey and use the prey's position as the optimization parameter. Other whales use this to update their own positions. The formula is:
[0150] D=|C·X * (txt)
[0151] X(t+1)=X * (t)-A·D
[0152] Where D is the distance between the individual whales in other populations and the prey position; X*(t) is the optimal whale position at the tth iteration; X(t) is the current whale position; t is the number of iterations;
[0153] A and C are random coefficient variables, and the random coefficient variables A and C are determined by the formula:
[0154] A=2ar-a
[0155] C=2r
[0156] Where a is a decreasing variable with a value from 2 to 0; r is a random number with a value range of [0,1];
[0157] From the process of surrounding the prey, we know that the range of A is [-a, a]. When -1≤|A|≤1, after the position is updated, the whale will shrink and surround the prey, and may approach the prey in the form of spiral steps. The probability of the whale executing the shrinking and surrounding strategy and the spiral update position strategy is 50%, and its mathematical model is determined by the following formula:
[0158] D'=|X * (txt)
[0159]
[0160] Among them, D' is the distance between the current position of the whale and the current optimal individual; b is a constant that controls the shape of the spiral; l is a random number in the range of [-1,1]; p is a probability variable.
[0161] In addition, when |A|>1, whales hunt in a random search form, and its mathematical model can be expressed by the following formula:
[0162] D rand =|C·X rand -X
[0163] X(t+1)=X rand -A.D rand
[0164] Among them, X rand is the position of a random individual in the whale group; D rand is the distance between the current position of a random individual of the whale and the current optimal individual.
[0165] The individual spatial dimensions in the whales correspond to the number of parameters to be optimized.
[0166] Through the above method, the optimization of various parameters can be converted into the optimization of the individual position of the whale. For a known spatial coordinate position X of a whale individual, i According to the above formula, the corresponding model parameters can be obtained, and the interval prediction TCN-EAD network model is imported to calculate the upper and lower limits of the prediction interval and the values of various evaluation indicators. Finally, PISI is used as the upper optimization target and RMSE is used as the lower optimization target, that is, the process function of the WOA optimization algorithm is:
[0167]
[0168] Where a i,j , b i,j are the elements in a and b; f is the activation function of the TCN-EAD neural network; y is the true value.
[0169] Based on the WOA optimization algorithm, the hyperparameter and proportional coefficient optimization are performed simultaneously. In the WOA hyperparameter optimization, first, the whale population representing each hyperparameter to be optimized is randomly initialized to ensure the rationality of the optimization result; then the fitness value of the whale, that is, RMSE, is calculated; and then the current position of the whale is updated according to the optimal fitness value of the individual whale and the whale population, which is used as the reference position in the proportional coefficient optimization.
[0170] In the process of optimizing the proportional coefficient of the WOA optimization algorithm, the objective function PISI is solved, and the whale position is updated and used as the reference position for hyperparameter optimization.
[0171] WOA performs interactive optimization in an iterative manner until the optimal hyperparameters and optimal proportional coefficients are solved.
[0172] S5. Use the optimal hyperparameter TCN-EAD network model to obtain point predictions, and construct the optimal prediction interval of power load based on the point prediction according to the optimal proportional coefficient.
[0173] After multiple iterations of the WOA optimization algorithm, the optimal proportional coefficient of the verification set is obtained. With appropriate TCN-EAD neural network model hyperparameters, the optimal prediction interval construction formula for the test set is as follows:
[0174]
[0175] Where y i,Valid and They are the optimal upper bound and optimal lower bound of the prediction interval of the test set at time i.
[0176] The power load data of a certain region is taken as an example to verify the effectiveness of the short-term power load interval prediction method of the present invention.
[0177] (1) Collect the power load data of the area from January 1, 2012 to January 10, 2015, with 96 points collected per day and an interval of 15 minutes. The data for one day includes the day of the week, maximum temperature, minimum temperature, average temperature, relative humidity, rainfall, and power load at 96 times, a total of 102 features.
[0178] The prediction method takes the 102 features of the n-1th day and the week type, maximum temperature, minimum temperature, average temperature, relative humidity and rainfall of the nth day as input, and the power load data of the nth day as output.
[0179] The power load data of the region on January 10, 2015 is used as the test set, and the data of the previous 1104 days is used as the training set, and a point prediction of the power load on January 10, 2015 is made.
[0180] The point prediction point value results and the evaluation index PISI are used to establish the optimization equation, and the optimal proportional coefficient is obtained based on the WOA optimization algorithm.
[0181] Based on the point prediction results and the optimal scale factor, the optimal prediction interval at 95% confidence level is calculated.
[0182] The final prediction result is as follows: Figure 5 As shown, at a confidence level of 95%, PICP = 100%, PIMWP = 5.637%, PIMCDP = 0.932%, and PISI = 92.763%, indicating that the prediction method used in the present invention is relatively reliable and has strong adaptability.
[0183] The present invention also provides a short-term power load interval prediction device considering interval structure, the device comprising:
[0184] TCN-EAD network model module, used to obtain power load point forecasts;
[0185] The PISI indicator module uses the point prediction as the benchmark and the PISI indicator to construct the prediction interval using the proportional coefficient method.
[0186] WOA optimization algorithm module, which uses the WOA optimization algorithm to optimize the hyperparameters of the TCN-EAD network model and the proportional coefficient of the prediction interval;
[0187] The prediction output module calculates the optimal prediction interval of power load based on the optimal proportional coefficient of point prediction and prediction interval obtained by the optimal hyperparameter TCN-EAD network model.
[0188] The present invention also provides an electronic device, such as Figure 6 As shown, the electronic device may include: a processor, a communications interface, a memory, and a communications bus, wherein the processor, the communications interface, and the memory communicate with each other via the communications bus. The processor may call the logic instructions in the memory, for example, the following method may be executed:
[0189] S1. Build and train the TCN-EAD network model for power load prediction, and use the trained TCN-EAD network model to obtain power load point prediction;
[0190] S2, using the point prediction as the basis and using the proportional coefficient method to construct the prediction interval;
[0191] S3, construct the prediction interval satisfaction index PISI;
[0192] S4. Use the WOA optimization algorithm to optimize the hyperparameters of the TCN-EAD network model and obtain the optimal hyperparameter TCN-EAD network model; at the same time, use the WOA optimization algorithm in combination with the PISI index to optimize the prediction interval proportional coefficient and calculate the optimal proportional coefficient;
[0193] S5. Use the optimal hyperparameter TCN-EAD network model to obtain point predictions, and construct the optimal prediction interval of power load based on the point prediction according to the optimal proportional coefficient.
[0194] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0195] An embodiment of the present invention further provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method provided in each of the above embodiments is implemented, for example, including:
[0196] S1. Build and train the TCN-EAD network model for power load prediction, and use the trained TCN-EAD network model to obtain power load point prediction;
[0197] S2, using the point prediction as the basis and using the proportional coefficient method to construct the prediction interval;
[0198] S3, construct the prediction interval satisfaction index PISI;
[0199] S4. Use the WOA optimization algorithm to optimize the hyperparameters of the TCN-EAD network model and obtain the optimal hyperparameter TCN-EAD network model; at the same time, use the WOA optimization algorithm in combination with the PISI index to optimize the prediction interval proportional coefficient and calculate the optimal proportional coefficient;
[0200] S5. Use the optimal hyperparameter TCN-EAD network model to obtain point predictions, and construct the optimal prediction interval of power load based on the point prediction according to the optimal proportional coefficient.
[0201] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0202] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0203] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A short-term power load interval forecasting method considering interval structure, characterized in that: Includes steps: S1. Build and train the TCN-EAD network model for power load prediction, and use the trained TCN-EAD network model to obtain power load point prediction; S2, using the point prediction as the basis and using the proportional coefficient method to construct the prediction interval; S3, construct the prediction interval satisfaction index PISI; S4. Use the WOA optimization algorithm to optimize the hyperparameters of the TCN-EAD network model and obtain the optimal hyperparameter TCN-EAD network model; at the same time, use the WOA optimization algorithm in combination with the PISI index to optimize the prediction interval proportional coefficient and calculate the optimal proportional coefficient; S5. Use the optimal hyperparameter TCN-EAD network model to obtain point predictions, and construct the optimal prediction interval of power load based on the point prediction according to the optimal proportional coefficient.
2. A short-term power load interval prediction method considering interval structure according to claim 1, characterized in that: The TCN-EAD network model includes a TCN model; Among them, the TCN model consists of an input layer, an output layer, and a stack of multiple TCN residual modules, and the formula is expressed as: in, is the output of h-1 residual module, F is the transformation operation, h is the number of residual modules, is the output layer output, and ReLU is the activation function.
3. A short-term power load interval prediction method considering interval structure according to claim 2, characterized in that: The TCN-EAD network model also includes an EAD model; The EAD model consists of an input layer, an encoding layer, an attention layer, a decoding layer, and an output layer, including: S11, the encoding layer encodes the input vector to obtain the output vector, the formula is: h=[h1,h2,...,h j ,...,h i ] T Among them, the encoding layer includes multiple layers of GRU units. is the input vector, h is the output vector, h i represents the output vector of the coding layer at time i; f(·) represents the coding function of the multi-layer GRU unit; S12, the output vector of the encoding layer is input into the attention layer to obtain the encoding vector, which is expressed as: e j =utanh(w0h j +b0) Among them, e j represents the output vector h from the encoding layer at time t j The attention probability distribution value determined by ; u and w0 are weight coefficients; b0 is the bias coefficient; α j is the attention weight; s i Represents the encoding vector of the attention layer output at the i-th moment; S13, the encoding vector is input into the decoding layer for decoding. The decoding layer includes multiple layers of GRU units. In the gth GRU unit, v i The calculation formula is: Among them, v i-1 is the state of GRU unit i-1; v i is the decoding vector of GRU unit i; s gi is the input of the g-th GRU unit at time i, w is the weight coefficient; σ is the sigmoid function; S14, decoding vector v i Input the output layer to obtain the final predicted point value. The formula is: Among them, W1 is the weight coefficient of the output layer; b1 is the bias coefficient of the output layer.
4. A method for predicting short-term power load intervals considering interval structure according to claim 3, characterized in that: In S2, the prediction interval is constructed by using the proportional coefficient method based on the point prediction, and the formula is: Among them, x i and They are the input value and point prediction value of the TCN-EAD network model at time i; U(x i ) and L(x i ) are the upper and lower limits of the prediction interval of the TCN-EAD network model at time i; a i and b i is the proportional coefficient at time i.
5. A short-term power load interval prediction method considering interval structure according to claim 4, characterized in that: The prediction interval satisfaction index PISI includes the interval coverage rate PICP, the interval average width percentage PIMWP and the interval average center deviation percentage PIMCDP, where: The interval coverage rate PICP is expressed as follows: Among them, c i The expression is: The average interval width percentage PIMWP is expressed as: The interval mean center deviation percentage PIMCDP is expressed as: Where N is the total number of prediction points; x i and i are the input value and true value of the neural network in the i-th sampling interval; U(x i ) and L(x i ) are the upper and lower bounds of the prediction interval, respectively.
6. A method for predicting short-term power load intervals considering interval structure according to claim 5, characterized in that: Construct the prediction interval satisfaction index PISI, the formula is: PISI=1-PIMWP(1+λPIMCDP)(1+e -η(PICP-μ) ) Among them, λ and η are the penalty coefficients of PIMCDP and PICP evaluation indicators respectively; μ is the confidence level (1-α).
7. A method for predicting short-term power load intervals considering interval structure according to claim 1, characterized in that: In the WOA optimization algorithm: The prey position is the optimization hyperparameter or optimization ratio coefficient, the whale is the hyperparameter to be optimized or the ratio coefficient to be optimized, and the whale group is a set of hyperparameters to be optimized or a set of ratio coefficients to be optimized in the TCN-EAD network model; The position of the i-th whale individual is expressed as: X i =[x i,1 ,x i,2 ,L,x i,m+2n ] Among them, x i,j is the coordinate of the individual whale position, and its corresponding relationship with the set of hyperparameters to be optimized or the set of proportional coefficients to be optimized is as follows: Among them, the hyperparameter set of the TCN-EAD network model is s, the number of hyperparameters is m, the proportional coefficient set is a, b, and the number of proportional coefficients is n.
8. A method for predicting short-term power load intervals considering interval structure according to claim 7, characterized in that: The WOA optimization algorithm is used to optimize the hyperparameters of the TCN-EAD network model to obtain the optimal hyperparameter TCN-EAD network model; at the same time, the WOA optimization algorithm is used to optimize the prediction interval proportional coefficient in combination with the PISI index to calculate the optimal proportional coefficient. The process function is: in, and is the optimal ratio coefficient of the validation set, PISI Valid is the PISI of the validation set; RMSE Valid is the RMSE of the validation set; y i,Valid and are the true value and predicted point value of the validation set respectively.
9. A method for short-term power load interval prediction considering interval structure according to claim 8, characterized in that: The optimal prediction interval is expressed as: Among them, U * (x i ) and L * (x i ) are the optimal upper bound and optimal lower bound of the optimal prediction interval at time i.
Citation Information
Patent Citations
Short-term power load interval prediction method based on nonparametric Bootstrap error sampling
CN113850443A
Short-term power load interval prediction based on multiple objectives and Bayesian optimization
CN115564123A
Cited By
Interval prediction method based on self-adaptive cooperative mucus algorithm and parallel prediction
CN120524458A