Short-term power load prediction method and device and computer equipment

Through SSA-VMD and WOA-GA-CNN-LSTM model optimization, the problem of inaccurate hyperparameter optimization in power load forecasting was solved, the prediction accuracy and efficiency were improved, and the accuracy and efficiency of power load forecasting were ensured.

CN120657724APending Publication Date: 2025-09-16WEIYUAN ENERGY TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510649527.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The existing WOA-based algorithm cannot quickly and accurately locate the optimal solution when optimizing the hyperparameters of the CNN-LSTM model, resulting in unreliable power load forecasting results.

Method used

The SSA-VMD algorithm is used to decompose the power load data and optimized in combination with the WOA-GA-CNN-LSTM model. The VMD algorithm parameters are optimized by SSA. The fast convergence characteristics of GA and the global search capability of WOA are utilized to optimize the hyperparameters of the CNN-LSTM model. The modal component is processed by improved wavelet threshold denoising to construct a short-term power load forecasting model.

Benefits of technology

The prediction accuracy and generalization ability of the CNN-LSTM model are improved, data redundancy is reduced, memory management efficiency and computing speed are improved, and the accuracy and efficiency of power load forecasting are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120657724A_ABST
    Figure CN120657724A_ABST
Patent Text Reader

Abstract

The invention relates to a short-term power load prediction method and device and computer equipment, and the method and device enable the optimization process of a CNN-LSTM model to be more efficient through the global search capability of a WOA and the rapid convergence characteristic of a GA, thereby improving the prediction precision and generalization capability of the CNN-LSTM model, and guaranteeing the accuracy of a power load prediction result. Meanwhile, the SSA is adopted to optimize the parameters of the VMD, so that the data flow is clearer, the data redundancy is effectively reduced, the memory management efficiency and the calculation speed are improved, and the power load prediction efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of power load forecasting, and in particular to a short-term power load forecasting method, apparatus, and computer equipment. Background Art

[0002] In recent years, the rapid growth of renewable energy devices has posed challenges to the stability of the power system. The stable operation of the power system is crucial to national economic development. However, as the proportion of renewable energy in modern power systems continues to increase, the volatility and nonlinearity of load sequences far exceed those of traditional power systems, significantly increasing the difficulty of load forecasting.

[0003] Traditional load forecasting methods, such as time series methods, fuzzy regression methods, and support vector regression, are no longer able to meet the ever-increasing load forecasting requirements of smart grids. Long short-term memory (LSTM) networks have been widely used in the field of power load forecasting due to their excellent forecasting performance. For example, patent application publication number CN115549082A proposes a power load forecasting method based on load mining and LSTM neural networks. By constructing a periodically enhanced LSTM neural network, it leverages information from the previous day to accurately predict the next day's load. However, STM training proceeds from forward to backward along a time series, resulting in a large number of model parameters and prone to overfitting. To address this issue, patent application publication number CN117039843A proposes a new power load forecasting method. This method uses a CNN network layer to mine and extract features from a large-dimensional covariance matrix. An LSTM then memorizes and learns the extracted features, interconnects them, and outputs a power load forecast value. This CNN-LSTM model not only reduces the number of model parameters and the computing resources required for model training, but also can process local and global features at the same time, making the model more adaptable to complex changes that may occur in load data.

[0004] However, when optimizing hyperparameters for CNN-LSTM models, the WOA algorithm is often used. While the WOA algorithm excels in global search and can extensively explore the solution space, it converges more slowly during the local search phase. This characteristic can prevent the model from quickly and accurately locating the optimal solution during optimization, negatively impacting the accuracy of power load forecasting results. Summary of the Invention

[0005] Based on this, it is necessary to provide a short-term power load forecasting method, device and computer equipment to address the problem that when the CNN-LSTM model is optimized for hyperparameters based on the WOA algorithm, the optimal solution cannot be quickly and accurately located, resulting in unreliable power load forecasting results.

[0006] In a first aspect, the present application provides a short-term power load forecasting method. The method comprises:

[0007] Step S1, obtaining power load data;

[0008] Step S2, decomposing the power load data using an SSA-VMD algorithm to obtain multiple modal components after decomposition;

[0009] Step S3: Obtain a power load forecast result based on the short-term power load forecasting model based on WOA-GA-CNN-LSTM and the decomposed multiple modal components.

[0010] Furthermore, after step S1 and before step S2, the following steps are further included:

[0011] Step S11 , analyzing abnormal points in the power load data using a box plot, and correcting the abnormal points based on the average values ​​of the upper and lower neighboring points of the abnormal points.

[0012] Furthermore, the step S2 includes:

[0013] Step S21, using the minimum envelope entropy as the fitness function, and optimizing the VMD algorithm using SSA;

[0014] Step S22, using the optimized VMD algorithm to decompose the power load data to obtain multiple modal components after decomposition;

[0015] Step S23: performing improved wavelet threshold denoising on each modal component.

[0016] Furthermore, when using SSA to optimize the VMD algorithm, the maximum number of iterations is set to 20 and the population number is set to 30.

[0017] Furthermore, the steps of constructing the short-term power load forecasting model include:

[0018] Step S30, establishing a CNN-LSTM model;

[0019] Step S31, using the WOA algorithm to perform a global search on the hyperparameters of the CNN-LSTM model to obtain a preliminarily optimized population;

[0020] Step S32, using the GA algorithm to perform a local search on the hyperparameters of the CNN-LSTM model to generate a new population;

[0021] Step S33: Merge the new population generated by the GA algorithm with the population optimized by the WOA algorithm to form a new generation population, retain the individuals with the highest fitness, and replace the individuals with the lowest fitness;

[0022] Step S34, repeating steps S31 and S32 until the fitness meets the requirements, and obtaining the optimized CNN-LSTM model;

[0023] Step S35: Training and predicting the optimized CNN-LSTM model to obtain K short-term power load forecasting models based on WOA-GA-CNN-LSTM; where K is the number of modal components.

[0024] Furthermore, the CNN layer of the CNN-LSTM model is convolved and then subjected to a maximum pooling operation, with a pooling size of 2 and a sliding step size of 2.

[0025] Furthermore, the method further comprises:

[0026] Step S4: using relative root mean square error, mean absolute error and mean absolute percentage error as evaluation indicators of the power load forecast result, and performing error analysis on the power load forecast result.

[0027] Furthermore, the power load data includes active power, reactive power, power factor, voltage and current.

[0028] In a second aspect, the present application also provides a short-term power load forecasting device. The device comprises:

[0029] Data acquisition module, used to obtain power load data;

[0030] A data decomposition module is used to decompose the power load data using an SSA-VMD algorithm to obtain multiple modal components after decomposition;

[0031] The load forecasting module is used to obtain the power load forecasting results based on the short-term power load forecasting model based on WOA-GA-CNN-LSTM and the decomposed multiple modal components.

[0032] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the following steps when executing the computer program:

[0033] Step S1, obtaining power load data;

[0034] Step S2, decomposing the power load data using an SSA-VMD algorithm to obtain multiple modal components after decomposition;

[0035] Step S3: Obtain a power load forecast result based on the short-term power load forecasting model based on WOA-GA-CNN-LSTM and the decomposed multiple modal components.

[0036] The above-described short-term power load forecasting method, apparatus, and computer equipment utilize the global search capabilities of WOA and the rapid convergence characteristics of GA to make the optimization process of the CNN-LSTM model more efficient, thereby improving the prediction accuracy and generalization ability of the CNN-LSTM model and ensuring the accuracy of power load forecast results. Furthermore, by optimizing the VMD parameters using SSA, the data flow is made clearer, effectively reducing data redundancy, thereby improving memory management efficiency and computation speed, and enhancing the efficiency of power load forecasting. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic flow chart of a short-term power load forecasting method according to an embodiment;

[0038] Figure 2 A schematic diagram of power load data in one embodiment;

[0039] Figure 3 Schematic diagram of the SSA-VMD optimization process in one embodiment;

[0040] Figure 4 is a waveform diagram of a modal component in one embodiment;

[0041] Figure 5 Schematic diagram of the fitness curve change of the CNN-LSTM model during the optimization process in one embodiment;

[0042] Figure 6 A schematic diagram of a comparison between a prediction result and an actual value of a short-term power load forecasting model in one embodiment;

[0043] Figure 7 Schematic diagram of fitting curves for all samples in one embodiment. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0045] Example 1

[0046] like Figure 1 As shown, this embodiment provides a short-term power load forecasting method. The method is described by applying it to a terminal. It is understood that the method can also be applied to a server, or to a system including a terminal and a server, and implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0047] Step S1, obtaining power load data.

[0048] Power load data includes, but is not limited to, active power, reactive power, power factor, voltage, and current. Furthermore, after acquiring the power load data, a box plot can be used to analyze outliers within the data. These outliers can then be corrected based on the average values ​​of their upper and lower neighbors, thereby improving data validity and ensuring the accuracy of the forecast results.

[0049] Step S2: Decompose the power load data using the SSA-VMD algorithm to obtain multiple modal components after decomposition.

[0050] Among them, VMD (Variational Mode Decomposition) is an advanced signal processing technology that is particularly suitable for processing nonlinear and non-stationary signals. In power load data analysis, VMD can effectively decompose complex load data into multiple intrinsic mode functions (IMFs). By extracting the characteristic information of the IMF components, it can provide strong support for load forecasting. The mathematical model of VMD is shown in Equation (1):

[0051]

[0052] Where u k is the kth modal component; ω k is the center frequency of the kth modal component, K is the number of modal components, is the partial derivative operator, δ t is the unit pulse function, f(t) is the original load sequence, which is composed of the power load data obtained in step S1, t represents time, and j is an imaginary unit.

[0053] In order to improve the accuracy and efficiency of VMD in processing power load data, this embodiment further uses SSA (Sparrow Search Algorithm) to optimize two key parameters of VMD, the penalty factor α and the modal decomposition number K, to improve the decomposition accuracy of power load data and the accuracy of modal extraction. Specifically, step S2 may also include:

[0054] Step S21 , using the minimum envelope entropy as the fitness function, and optimizing the VMD algorithm using SSA.

[0055] Among them, envelope entropy is an indicator used to measure the complexity and distribution characteristics of a signal. It is achieved by decomposing the original signal into envelope signals, and further processing these envelope signals into a series of probability distribution sequences, and then calculating the entropy value on this basis. The entropy value obtained in this way can accurately reflect the distribution characteristics and complexity of the original signal. Its mathematical expression is shown in formula (2):

[0056]

[0057] Where N is the number of samples, a(j) is the envelope signal of the j-th IMF after Hilbert transform, pj is the probability distribution sequence after normalization of a(j), and Ep is the envelope entropy value calculated for p(j).

[0058] SSA is an optimization algorithm based on swarm intelligence that simulates the behavior and strategies of sparrows during their foraging. Applying SSA to the VMD optimization problem aims to find, through iterative search, the VMD parameter configuration that minimizes the envelope entropy of the decomposed signal, such as the penalty factor α and the modal decomposition number K. The specific optimization steps are as follows:

[0059] 1. Population initialization: Initialize the sparrow population, setting the population size N, the maximum number of iterations Q, and the parameters to be optimized, namely the VMD penalty factor and the search range for the modal decomposition number. Assign each individual sparrow an initial position, which corresponds to the candidate values ​​of the VMD parameters.

[0060] 2. The seeker's position is updated; the expression for its position update is:

[0061]

[0062] Where, represents the position of the x-th sparrow in the d-dimensional space when the sparrow group performs t iterations, t is the current iteration number, Q is the maximum number of iterations, β is a uniform random number in the interval (0,1], P is a random number that follows the N(0,1) distribution, J is a 1×d identity matrix, R2∈[0,1] is the warning value, and QZ∈[0.5,1] is the safety value.

[0063] 3. The position of the follower is updated; the expression of its position update is:

[0064]

[0065] Where: The sparrow group is in the worst position in dimension d when it performs t iterations. Conversely, is the best position in the d-dimensional space at the t+1th iteration, n is the number of sparrows, and M represents the dimension of the variable to be optimized. In this embodiment, two parameters of VMD, the penalty factor and the modal decomposition number, are optimized, and the value of M is 2; when When , it means that the fitness is low and the search range needs to be expanded; when When , it indicates that the fitness is high and it can forage randomly around the sc position.

[0066] 4. Iteration of the warning sparrow position; its expression is:

[0067]

[0068] Where: δ is a random number that obeys the standard normal distribution N(0,1); V is a random number between [-1,1], which indicates the direction of the sparrow's movement and controls the step size; e is the minimum value set to avoid the denominator being zero; h x is the fitness value of the sparrow at position x, h w is the worst fitness value of the current sparrow, h g It is the optimal fitness value of the current sparrow.

[0069] Typically, the number of sparrows alerted accounts for 15% of the total population. To balance accuracy and computational efficiency, this embodiment sets the population size and maximum number of iterations to [N, Q] = [30, 20]. This setting can be adjusted based on the complexity of the actual problem and the availability of computing resources. When the maximum number of iterations is reached, the iterations are terminated and the algorithm outputs the optimized VMD parameter configuration, thus completing the optimization of the VMD algorithm.

[0070] Step S22: Decompose the power load data using the optimized VMD algorithm to obtain multiple modal components after decomposition.

[0071] Step S23: performing improved wavelet threshold denoising on each modal component.

[0072] Because the decomposed modal components may contain noise, an improved wavelet threshold denoising method is used to denoise each modal component. This method leverages the multi-scale analysis capabilities of the wavelet transform to decompose the signal into different scales and screen and reconstruct the wavelet coefficients based on a set threshold. For example, wavelet coefficients exceeding the threshold are scaled to zero or approximately zero, thereby removing noise and retaining useful signal features. Denoising can further improve the quality and reliability of the decomposed modal components. Furthermore, by improving the wavelet threshold denoising transformation, the WOA-GA algorithm can focus on the different frequency components of the input data, which helps the CNN identify local features while allowing the LSTM to focus on key time steps when processing sequential data.

[0073] Step S3: Obtain a power load forecast result based on the short-term power load forecasting model based on WOA-GA-CNN-LSTM and the decomposed multiple modal components.

[0074] Among them, LSTM is a special type of recurrent neural network (RNN) that excels at capturing long-term dependencies in time series data. In power load forecasting, LSTM can learn the trends and periodicity of load data over time. CNN can extract temporal features and periodic patterns in load data, such as local features in time series data. WOA (Whale Optimization Algorithm) is an optimization algorithm inspired by the feeding behavior of humpback whales. It is used to find the optimal solution for model parameters. It can help adjust the weights and biases of CNN and LSTM networks to improve forecasting accuracy. GA (Genetic Algorithm) is a search algorithm that simulates natural selection and genetic mechanisms and is used to further optimize the parameter set found by WOA. Through GA's crossover, mutation, and selection operations, model parameters can be further fine-tuned to improve model performance. The number of short-term power load forecasting models is equal to the number of modal components. The prediction results of each short-term power load forecasting model are superimposed and reconstructed to obtain the final power load forecast result.

[0075] Specifically, the steps for constructing a short-term power load forecasting model may include:

[0076] Step S30: Establish a CNN-LSTM model.

[0077] The CNN-LSTM model consists of an input layer, a CNN layer, and an LSTM layer. The input layer specifies the format of the input data, specifically the batch size defaults to 1, the number of time steps is t, and the feature dimension is n. Thus, a sample can be represented as a signal sequence matrix R t×n The CNN layer has r convolution kernels, so r feature maps can be obtained. After convolution, the maximum pooling operation is performed with a pooling size of 2 and a sliding step of 2, resulting in r shapes. The specific calculation formula is shown in (6):

[0078] o=max×{o i ,o i+1}(i=1,3,5,...,tk) (6)

[0079] Where, f is a nonlinear activation function, b1∈R is a bias, W1 is the weight matrix of the convolution kernel, that is, the parameters of the convolution kernel; x i:i+k-1 represents the input sequence segment from the i-th position to the i+k-1-th position, and k represents the length of the segment.

[0080] Reduce the dimension of r feature maps to a length of After the vector is generated, it is input into the LSTM layer.

[0081] The internal structure of LSTM consists of three parts: forget gate, input gate, and output gate. The calculation formula of forget gate is shown in formula (7), the calculation formula of input gate is shown in formula (8), and the calculation formula of output gate is shown in formula (9)-(10):

[0082] F t =σ(W f [h t-1 ,x t ]+b f )=σ(W fh h t-1 +W fx x t +b f ) (7)

[0083] i t =σ(W i [h t-1 ,x t ]+b i )=σ(W ih h t-1 +W ix x t +b i ) (8)

[0084] O t =σ(W o [h t-1 ,x t ]+b o )=σ(W oh h t-1 +W ox x t +b o ) (9)

[0085] h t =O t *tanh(C t ) (10)

[0086] In formulas (7)-(10), σ is the Sigmoid function, W f is the weight matrix of the forget gate, b f is the bias term of the forget gate, h t-1 is the output value of LSTM at the previous moment, x t is the input value of the network at the current moment, W i is the weight matrix of the input gate, b i is the bias term of the input gate, W o is the weight matrix of the output gate, b o is the bias term of the output gate, h t is the output value of LSTM at the current moment, C tis the unit state at the current moment.

[0087] In step S31, the WOA algorithm is used to perform a global search on the hyperparameters of the CNN-LSTM model to obtain a preliminarily optimized population.

[0088] The specific steps of the WOA algorithm include:

[0089] 1. Surrounding prey: When a humpback whale surrounds its prey, the individual whale will use the location of the prey target as the optimal point and choose the most appropriate position and direction to surround the point. The calculation formula is:

[0090] D=|C·X P (t)-X(t)|,X(t+1)=X P (t)-A·D (11)

[0091] Where: A, C are coefficient vectors, X(t) is the whale position vector, X P (t) is the prey position, and D is the distance vector between the whale and the prey. The expression of the coefficient vector A is shown in formula (12), and the expression of the coefficient vector C is shown in formula (13):

[0092] A=2a·r1-a (12)

[0093] C=2·r2 (13)

[0094] Where r1 and r2 are random numbers in the interval [0, 1], and a is the linear convergence factor, which is expressed as shown in formula (14):

[0095]

[0096] Where, T max is the maximum number of iterations, and t is the number of iterations.

[0097] 2. Attack prey; its expression is:

[0098]

[0099] Where: l is a random number in the range [0,1], p is a random value in the range [0,1], and the constant b represents the motion trajectory.

[0100] 3. Capture and eat; its expression is:

[0101] D=|C·X rand (t)-X(t)|,X(t+1)=X rand (t)-A·D (16)

[0102] Where, X rand is the position vector of a random whale individual.

[0103] Step S32: Use the GA algorithm to perform a local search on the hyperparameters of the CNN-LSTM model to generate a new population.

[0104] Among them, the specific steps of the GA algorithm include:

[0105] 1. Selection operation: Use the roulette wheel selection method to select the parent individual according to the individual's fitness, with a selection probability of P i , whose expression is:

[0106]

[0107] Where F i is the fitness of the i-th individual, and N is the population size. The fitness function can be defined as the prediction error of the model on the validation set. For example, this embodiment uses the mean absolute error E MAE The fitness function of the GA algorithm is used to calculate the fitness of the individual.

[0108] 2. Crossover operation: Perform a single-point crossover on the selected parent individuals. Specifically, as shown in equations (18)-(19), a crossover point c is randomly selected between the two selected parent individuals. The gene segments before and after the crossover point are then exchanged to generate two new offspring individuals. This method is simple and easy to implement, and it helps introduce new gene combinations into the population.

[0109] child1=parent1[1:c]+parent2[c+1:L] (18)

[0110] child2=parent2[1:c]+parent1[c+1:L] (19)

[0111] In the formula, parent1[1:c] represents the gene segment of parent individual 1 from the beginning of the gene sequence to the intersection point c, parent2[c+1:L] represents the gene segment of parent individual 2 from the intersection point C to the end of the gene sequence, and child1 is the resulting offspring individual 1; parent2[1:c] represents the gene segment of parent individual 2 from the beginning of the gene sequence to the intersection point c, parent1[c+1:L] represents the gene segment of parent individual 1 from the intersection point C to the end of the gene sequence, and child2 is the resulting offspring individual 2. L is the individual's gene length, i.e., the coding length. The crossover probability is typically 0.4-0.99.

[0112] 3. Mutation operation: mutate the offspring individuals, randomly select mutation point m, and change the gene value of mutation point m. The mutation probability is usually low, 0.001-0.1, to avoid excessive destruction of existing good gene combinations. Specifically, as shown in formula (20):

[0113] gene m =1-gene m (20)

[0114] In the formula, gene m is the gene value of mutation point m.

[0115] In step S33, the new population generated by the GA algorithm is merged with the population optimized by the WOA algorithm to form a new generation population, and the individuals with the highest fitness are retained and the individuals with the lowest fitness are replaced.

[0116] In the new generation of population, the individuals with the highest fitness are retained and the individuals with the lowest fitness are replaced. This step ensures that the population always contains individuals with the optimal solution or those close to the optimal solution, which helps to accelerate the convergence process.

[0117] Step S34: repeat steps S31 and S32 until the fitness meets the requirements, and obtain the optimized CNN-LSTM model.

[0118] Specifically, the WOA and GA algorithms are repeatedly used to optimize the hyperparameters of the CNN-LSTM model until a stopping condition is met, such as when the fitness reaches a preset threshold or the number of iterations reaches a maximum. This process continues iteratively, gradually approaching the optimal solution. Ultimately, the optimized CNN-LSTM model is obtained through the combined optimization of the GA and WOA algorithms.

[0119] Step S35: Training and predicting the optimized CNN-LSTM model to obtain K short-term power load forecasting models based on WOA-GA-CNN-LSTM; where K is the number of modal components.

[0120] Specifically, before training the model, the dataset is first divided appropriately. Typically, the dataset is divided into a training set, a validation set, and a test set. For example, the first 80% of the data can be selected as the training set, the next 10% (i.e., the 80%-90% range) as the validation set, and the remaining 10% as the test set. This division helps evaluate the model's generalization ability. For each IMF component, a CNN-LSTM model optimized using the WOA and GA algorithms is trained. During training, the model is trained using the training set data and fine-tuned using the validation set data to prevent overfitting. During the prediction phase, each trained WOA-GA-CNN-LSTM model is used to predict the corresponding IMF component. The prediction results for all IMF components are combined to obtain the final power load forecast. The final prediction results are validated using the test set data to evaluate the model's predictive performance.

[0121] Furthermore, the short-term power load forecasting method may further include:

[0122] Step S4: using the relative root mean square error, mean absolute error and mean absolute percentage error as evaluation indicators of the power load forecast result, and performing error analysis on the power load forecast result.

[0123] In the process of short-term power load forecasting, it is crucial to evaluate the accuracy of the forecast results. This embodiment uses three error evaluation indicators to conduct a comprehensive error analysis of the power load forecast results. Among them, the relative root mean square error E RRMSE The calculation formula is shown in formula (21), the mean absolute error E MAE The calculation formula is shown in formula (22), the mean absolute percentage error E MAPE The calculation formula is shown in formula (23).

[0124]

[0125] Where, is the power load forecast result, yi is the actual power load value, and m is the total number of test samples. A comprehensive error analysis of the power load forecast results is performed using three error evaluation metrics: RRMSE, MAE, and MAPE. This not only helps evaluate the accuracy of the forecast results but also provides guidance for further optimization of the forecast model. For example, if the error of a particular metric is large, targeted optimization can be performed to improve forecast accuracy.

[0126] The short-term power load forecasting method of this embodiment utilizes the global search capabilities of WOA and the rapid convergence characteristics of GA to make the optimization process of the CNN-LSTM model more efficient, thereby improving the prediction accuracy and generalization ability of the CNN-LSTM model and ensuring the accuracy of the power load forecast results. Furthermore, by optimizing the VMD parameters using SSA, the data flow is made clearer, effectively reducing data redundancy, thereby improving memory management efficiency and computation speed, and enhancing the efficiency of power load forecasting.

[0127] The following example uses the actual power load data provided by a factory to verify the effectiveness of the short-term power load forecasting method in this embodiment. The sampling data spans from December 23 to 24, 2024, with sampling every 5 minutes and 288 times a day, for a total of 288 load data points. Figure 2 When the SSA algorithm is used to optimize the VMD parameters, the settings of the important parameters are shown in Table 1. The penalty factor α ranges from 100 to 2500, the modal decomposition number K ranges from 2 to 10, the number of optimization variables is 2, including α and K, the maximum number of iterations Q = 20, and the population number N = 25.

[0128] Table 1

[0129] α K Optimization number of variables Maximum number of iterations Population [100,2500] [2,10] 2 20 25

[0130] The specific optimization process is as follows Figure 3 As shown in the figure, it can be seen that the optimal value is achieved when the number of iterations is 3. At this time, K = 7 and α = 1827. Afterwards, the optimized VMD is used to decompose the original power load data to obtain multiple modal components. As an example, Figure 4 The waveform diagrams of IMF1 to IMF12 are shown. Then, the CNN-LSTM model is optimized by combining the WOA algorithm and the GA genetic algorithm to construct a short-term power load forecasting model based on WOA-GA-CNN-LSTM. Figure 5 The fitness curve changes of the CNN-LSTM model during the optimization process are shown. Finally, the power load forecast results are obtained by combining each modal component with the short-term power load forecasting model. Figure 6 The comparison between the prediction results of the short-term power load forecasting model and the actual value is intuitively demonstrated. Figure 7 Fitting curves for all samples are also provided to more comprehensively demonstrate the model's predictive performance. Specifically, the number of short-term power load forecasting models can be the same as the number of modal components, and each modal component can be used as the input for a single short-term power load forecasting model. The prediction results output by each short-term power load forecasting model are then superimposed and reconstructed to produce the final power load forecast.

[0131] To further evaluate the model's forecasting accuracy, Table 2 lists the error analysis results for the short-term power load forecasting model. These results include the relative root mean square error (RRMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE) for the test and training sets. These metrics provide a comprehensive and in-depth assessment of the model's forecasting performance.

[0132] Table 2

[0133] MAE MAPE RRMSE Test set data 2.0817 0.045622 2.89036 Training set data 1.7991 0.043158 2.1009

[0134] Example 2

[0135] This embodiment provides a short-term power load forecasting device, including a data acquisition module, a data decomposition module, and a load forecasting module, wherein:

[0136] Data acquisition module, used to obtain power load data.

[0137] The data decomposition module is used to decompose the power load data through the SSA-VMD algorithm to obtain multiple modal components after decomposition.

[0138] The load forecasting module is used to obtain the power load forecasting results based on the short-term power load forecasting model based on WOA-GA-CNN-LSTM and the decomposed multiple modal components.

[0139] Furthermore, the data acquisition module is also used to analyze abnormal points in the power load data using a box plot, and to correct the abnormal points based on the average values ​​of the upper and lower neighboring points of the abnormal points.

[0140] Furthermore, the data decomposition module is also used to optimize the VMD algorithm using SSA with the minimum envelope entropy as the fitness function; the optimized VMD algorithm is used to decompose the power load data to obtain multiple modal components after decomposition; and each modal component is subjected to improved wavelet threshold denoising.

[0141] Furthermore, the load forecasting module also includes a model building unit, a parameter optimization unit and a model training unit, wherein:

[0142] Model building unit, used to build CNN-LSTM model.

[0143] The parameter optimization unit is used to use the WOA algorithm to perform a global search on the hyperparameters of the CNN-LSTM model to obtain a preliminarily optimized population; use the GA algorithm to perform a local search on the hyperparameters of the CNN-LSTM model to generate a new population; merge the new population generated by the GA algorithm with the population optimized by the WOA algorithm to form a new generation population, retain the individuals with the highest fitness, and replace the individuals with the lowest fitness; and repeatedly execute the WOA algorithm and GA algorithm until the fitness meets the requirements to obtain the optimized CNN-LSTM model.

[0144] The model training unit is used to train and predict the optimized CNN-LSTM model to obtain K short-term power load forecasting models based on WOA-GA-CNN-LSTM, where K is the number of modal components.

[0145] Furthermore, the short-term power load forecasting device also includes an error analysis module, which is used to use relative root mean square error, mean absolute error and mean absolute percentage error as evaluation indicators of the power load forecasting results to perform error analysis on the power load forecasting results.

[0146] Each module in the above-mentioned short-term power load forecasting device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0147] Example 3

[0148] This embodiment provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in Embodiment 1 when executing the computer program.

[0149] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0150] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A short-term power load forecasting method, characterized in that: The method comprises: Step S1, obtaining power load data; Step S2, decomposing the power load data using an SSA-VMD algorithm to obtain multiple modal components after decomposition; Step S3: Obtain a power load forecast result based on the short-term power load forecasting model based on WOA-GA-CNN-LSTM and the decomposed multiple modal components.

2. The short-term power load forecasting method according to claim 1, characterized in that: After step S1 and before step S2, the following steps are further included: Step S11 , analyzing abnormal points in the power load data using a box plot, and correcting the abnormal points based on the average values ​​of the upper and lower neighboring points of the abnormal points.

3. The short-term power load forecasting method according to claim 1, characterized in that: The step S2 comprises: Step S21, using the minimum envelope entropy as the fitness function, and optimizing the VMD algorithm using SSA; Step S22, using the optimized VMD algorithm to decompose the power load data to obtain multiple modal components after decomposition; Step S23: performing improved wavelet threshold denoising on each modal component.

4. The short-term power load forecasting method according to claim 3, characterized in that: When using SSA to optimize the VMD algorithm, the maximum number of iterations is set to 20 and the population number is set to 30.

5. The short-term power load forecasting method according to claim 1, characterized in that: The steps of constructing the short-term power load forecasting model include: Step S30, establishing a CNN-LSTM model; Step S31, using the WOA algorithm to perform a global search on the hyperparameters of the CNN-LSTM model to obtain a preliminarily optimized population; Step S32, using the GA algorithm to perform a local search on the hyperparameters of the CNN-LSTM model to generate a new population; Step S33: Merge the new population generated by the GA algorithm with the population optimized by the WOA algorithm to form a new generation population, retain the individuals with the highest fitness, and replace the individuals with the lowest fitness; Step S34, repeating steps S31 and S32 until the fitness meets the requirements, and obtaining the optimized CNN-LSTM model; Step S35: Training and predicting the optimized CNN-LSTM model to obtain K short-term power load forecasting models based on WOA-GA-CNN-LSTM; where K is the number of modal components.

6. The short-term power load forecasting method according to claim 5, characterized in that: The CNN layer of the CNN-LSTM model is convolved and then subjected to a maximum pooling operation with a pooling size of 2 and a sliding step size of 2.

7. The short-term power load forecasting method according to claim 1, characterized in that: The method further comprises: Step S4: using relative root mean square error, mean absolute error and mean absolute percentage error as evaluation indicators of the power load forecast result, and performing error analysis on the power load forecast result.

8. The short-term power load forecasting method according to claim 1, characterized in that: The power load data includes active power, reactive power, power factor, voltage and current.

9. A short-term power load forecasting device, characterized in that: The device comprises: Data acquisition module, used to obtain power load data; A data decomposition module is used to decompose the power load data using an SSA-VMD algorithm to obtain multiple modal components after decomposition; The load forecasting module is used to obtain the power load forecasting results based on the short-term power load forecasting model based on WOA-GA-CNN-LSTM and the decomposed multiple modal components.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Power load prediction method based on load mining and LSTM neural network

    CN115549082A

  • Power load prediction method

    CN117039843A