Power system load prediction method, equipment, medium and product
By combining CNN and GRU models in power system load forecasting, and using the Northern Goshawk optimization algorithm to automatically optimize hyperparameters, the problems of poor forecasting results and difficulty in hyperparameter tuning in traditional methods are solved, achieving higher forecast accuracy. degree and model robustness.
Patent Information
- Application Number
- CN202410725061.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-10-01
AI Technical Summary
Traditional power system load forecasting methods have problems such as poor prediction results and difficulty in hyperparameter tuning, and cannot effectively cope with the complexity and uncertainty of power load fluctuations.
A convolutional neural network (CNN) and gated recurrent unit (GRU) combined model are used, and hyperparameters are automatically optimized through the Northern Goshawk Optimization Algorithm (NGO) to build a power system load forecasting model.
It improves the accuracy of power system load forecasting and the generalization ability of the model, reduces the tedious process of manual parameter adjustment, and significantly improves the forecasting effect.
Smart Images

Figure CN118735293A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system load forecasting, and in particular to a power system load forecasting method, equipment, medium and product. Background Art
[0002] Electric load refers to the sum of the electric power consumed by various types of electrical equipment in a power plant or power system at a certain moment. Power system load forecasting analyzes the inherent connection between electric load and historical data of electric load, social, economic, meteorological and other related factors, explores the law of electric load changes, and makes accurate and scientific forecasts of electric load usage in the future under the premise of ensuring a certain degree of accuracy. Its main purpose is to improve the accuracy and management efficiency of power dispatching, reduce the gap between power generation and demand, reduce power losses, and improve the economy, safety and stability of the power grid system.
[0003] In recent years, with the incorporation of a large number of electric vehicles and distributed power sources into the power grid, the complexity and uncertainty of the load have increased significantly, posing challenges to the safe and stable operation of the power system. Accurate power system load forecasting is one of the key technologies to address the above issues. It can also provide power generation companies with the necessary basis for power generation, helping to reduce the costs of power generation companies. Existing power system load forecasting methods are mainly divided into two categories: one is the classic type; the other is the artificial intelligence type.
[0004] The power system load forecasting method based on the classic type is mainly proposed on the basis of mathematics and statistics. The time series method is one of the classic methods. It mainly relies on historical data and existing data to find the relationship between historical data and existing data, and then infer the results in the future. The power system load forecasting problem is a typical time series problem. Therefore, the time series method was often used to deal with load forecasting problems in the early days. It has a small amount of calculation and is a relatively mature method. However, it cannot consider the uncertain factors that affect load fluctuations, resulting in low accuracy when facing drastic temperature changes and major holidays, and is not suitable for medium and long-term load forecasting.
[0005] Regression analysis is a data analysis method based on statistics. By observing whether two or more variables are related and the strength of the correlation, a mathematical model is established to predict the variables that the researcher is concerned about. In the early stage of power load forecasting, regression analysis is also often used for load forecasting. The characteristics of regression analysis are that the principle is relatively simple, the mathematical modeling is relatively complex, and the historical data requirements are high. In addition, the traditional regression analysis method has been improved, such as the fuzzy regression load forecasting method. The specific method is to pre-process the historical data, then fuzzify the data, use the appropriate fuzzy reasoning mechanism and train it, and then establish a matching fuzzy set, and finally fuzzy set clarification output results. Experimental verification shows that this method works well in medium and long-term load forecasting. The prediction method based on the combination of wavelet analysis and regression prediction method is to decompose the load sequence into basic load components and variable load components of different frequencies using wavelet transform, the basic load component uses multivariate regression prediction method, and the variable load component uses periodic extrapolation prediction. Then the predicted values of each are superimposed to obtain the final prediction result. This method has achieved good results. However, the above method only regards the factors affecting load fluctuation as simple data, and does not consider the objective laws of the data itself. Therefore, the prediction results are prone to large errors, and the promotion of regression analysis is also greatly limited.
[0006] The main feature of the grey prediction method is that it takes into account the uncertain factors in the prediction problem, and it has been widely used in the field of power load prediction. This method mainly adds or subtracts historical sequence data to obtain a new series, fits the differential equation on the new data series, and finally predicts with the solution of the differential equation. The grey prediction method has the advantages of simple modeling, low requirements for historical data, and simple calculations. However, when the load data is relatively discrete, the prediction accuracy is low, especially when making holiday predictions, the defects are very large, so the grey prediction method also has great limitations.
[0007] The power system prediction method based on artificial intelligence mainly includes the use of various machine learning and deep learning technologies to process the data of the power system, so as to predict the load, power generation and other aspects. Among them, the artificial neural network method (ANN) is a method designed to imitate the way biological neurons process information. It is a mathematical model that simulates the connection and information transmission process between human neurons. ANN has also been applied to the field of load forecasting due to its good performance and self-learning ability. It has been paid attention to and improved by a large number of researchers and has been widely used. The emergence of artificial neural networks has greatly promoted the development of load forecasting. The load forecasting method based on the back propagation neural network (BP) of principal component analysis uses the particle swarm optimization (PSO) to optimize the parameters of the BP neural network and establish the PCA-PSO-BP model, which effectively improves the accuracy of load forecasting, but there is a problem of sequence loss. The method based on the combination of the Attention mechanism and the LSTM neural network eliminates the problem of sequence loss, but the convergence effect is poor.
[0008] The combined model load forecasting method is a method that combines multiple load forecasting models to form an integrated forecasting model. The combined model improves the accuracy and reliability of load forecasting by integrating the advantages of multiple models or improving the shortcomings of a single model. For example, the FA-SVR-LSTM combined model method combines the Firefly Algorithm (FA) with the optimized Support Vector Regression (SVR), and uses FA to optimize the penalty factor, kernel function of SVR, and the number of neurons and learning rate of LSTM. The FA-SVR-LSTM combined model is established, and the prediction accuracy is greatly improved, but the computational complexity is high. Based on the CNN-LSTM hybrid prediction model, CNN is used to extract feature vectors, and the feature vectors are constructed in a time series manner and used as LSTM network input data. Then, the LSTM network is used for short-term load forecasting, which well combines the advantages of the combined model and achieves good prediction results, but the hyperparameter tuning is difficult and sensitive to the initial parameters. Summary of the invention
[0009] The purpose of the present invention is to provide a method, device, medium and product for power system load forecasting, so as to realize automatic optimization of hyperparameters and greatly improve the accuracy of forecasting.
[0010] To achieve the above object, the present invention provides the following solutions:
[0011] A method for predicting load in a power system, comprising:
[0012] Acquire a historical load data sequence of the power system; the historical load data sequence includes load values corresponding to a number of historical time sampling points;
[0013] constructing a sample data set according to the historical load data sequence;
[0014] Construct an initial load forecasting model based on convolutional neural networks and gated recurrent units;
[0015] The Northern Goshawk optimization algorithm is used to optimize the hyperparameters of the initial load forecasting model to obtain a load forecasting optimization model;
[0016] Using the sample data set to train the load forecasting optimization model to obtain a power system load forecasting model;
[0017] The power system load forecasting model is used to forecast future load data of the power system.
[0018] Optionally, constructing a sample data set according to the historical load data sequence specifically includes:
[0019] Supplementing the missing parts in the historical load data sequence to obtain a supplemented historical load data sequence;
[0020] Normalizing the supplemented historical load data sequence to obtain a normalized historical load data sequence;
[0021] A sample data set is constructed according to the normalized historical load data sequence.
[0022] Optionally, the Northern Goshawk optimization algorithm is used to optimize the hyperparameters of the initial load forecasting model to obtain a load forecasting optimization model, which specifically includes:
[0023] Initializing the parameters of the northern goshawk algorithm and randomly generating the position of each northern goshawk; the parameters of the northern goshawk algorithm include: population size, maximum number of iterations, problem dimension and parameter optimization limit; the position of the northern goshawk is used to characterize the hyperparameters of the initial model of load forecasting;
[0024] In the exploration phase, each northern goshawk randomly selects prey to attack, and updates the position of each northern goshawk according to the fitness function to obtain the new position of each northern goshawk in the exploration phase;
[0025] In the development stage, each northern goshawk is required to capture prey within the hunting radius, and the position of each northern goshawk is updated according to the fitness function to obtain the new position of each northern goshawk in the development stage;
[0026] The steps of the exploration phase and the development phase are repeatedly performed until the maximum number of iterations is reached, and then the optimal hyperparameters of the initial load forecasting model are determined according to the position and fitness function of each northern goshawk to obtain a load forecasting optimization model.
[0027] Optionally, the hyperparameters of the initial load forecasting model include: learning rate, number of hidden nodes, regularization coefficient and batch size; and the fitness function is a mean square error function.
[0028] Optionally, in the exploration phase, each northern goshawk is allowed to randomly select prey to attack, and the position of each northern goshawk is updated according to the fitness function to obtain the new position of each northern goshawk in the exploration phase. The specific formula is:
[0029]
[0030] Among them, L i is the global position of the i-th northern goshawk; l i,j is the position of the i-th northern goshawk in the j-dimensional space; F i For L i The corresponding fitness function value; P i The location of the prey selected by the i-th northern goshawk; p i,j The position of the prey selected for the i-th northern goshawk in the j-dimensional space; P i The corresponding fitness function value; is the new position of the i-th northern goshawk during the exploration phase; is the new position of the i-th northern goshawk in the j-dimensional space during the exploration phase; for The corresponding fitness function value; r and Y are both random numbers, and r∈[0,1], Y=1,2.
[0031] Optionally, in the development stage, each northern goshawk is required to capture prey within the hunting radius, and the position of each northern goshawk is updated according to the fitness function to obtain the new position of each northern goshawk in the development stage. The specific formula is:
[0032] R = 0.02 (1-a / A);
[0033]
[0034] Among them, L i is the global position of the i-th northern goshawk; l i,j is the position of the i-th northern goshawk in the j-dimensional space; F i For L iThe corresponding fitness function value; R is the hunting radius; a is the current number of iterations; A is the maximum number of iterations; r is a random number, and r∈[0,1]; is the new position of the i-th northern goshawk in the development stage; is the new position of the i-th northern goshawk in the j-dimensional space during the development phase; for The corresponding fitness function value.
[0035] Optionally, the missing part in the historical load data sequence is supplemented to obtain a supplemented historical load data sequence, and the specific formula is:
[0036] L(d,x)=ω1L(d,x+1)+ω2L(d,x-1)+ω3L(d+1,x)+ω4L(d-1,x);
[0037] Among them, L(d,x) is the load value corresponding to the xth time sampling point on the dth day; L(d,x+1) is the load value corresponding to the x+1th time sampling point on the dth day; L(d,x-1) is the load value corresponding to the x-1th time sampling point on the dth day; L(d+1,x) is the load value corresponding to the xth time sampling point on the d+1th day; L(d-1,x) is the load value corresponding to the xth time sampling point on the d-1th day; ω1, ω2, ω3 and ω4 all represent weights.
[0038] A computer device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the power system load forecasting method.
[0039] A computer-readable storage medium stores a computer program, which implements the power system load forecasting method when executed by a processor.
[0040] A computer program product comprises a computer program, which implements the power system load forecasting method when executed by a processor.
[0041] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0042] The present invention aims at the problems of poor prediction effect and great difficulty in hyperparameter tuning in the traditional power system load forecasting method. A combined model is adopted to integrate two different types of neural networks, namely, convolutional neural network (CNN) and gated recurrent unit (GRU). By establishing a connection between CNN and GRU, their advantages in feature extraction and sequence modeling are fully utilized to better capture the complex relationship in time series data and improve the effectiveness of prediction. At the same time, by introducing the Northern Goshawk Optimization algorithm (NGO) for hyperparameter optimization, the automatic optimization of the CNN-GRU neural network structure and parameters is realized, the tedious process of manual parameter adjustment is avoided, and the generalization ability and robustness of the model are improved. Therefore, the present invention can realize automatic optimization of hyperparameters and greatly improve the accuracy of prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 The present invention provides a flow chart of a method for predicting load in a power system.
[0045] Figure 2 A detailed flow chart of the power system load forecasting method provided by the present invention.
[0046] Figure 3 The present invention provides a flowchart of the optimization algorithm for the northern goshawk. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] In view of the problems of poor prediction effect and difficulty in hyperparameter tuning in traditional power system load forecasting methods, the present invention proposes a power system load forecasting method, equipment, medium and product based on the NGO-CNN-GRU neural network combination model on the basis of the CNN-LSTM model, which can automatically optimize hyperparameters and greatly improve the accuracy of prediction.
[0049] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0050] like Figure 1 and Figure 2 As shown, the power system load forecasting method provided by the present invention includes:
[0051] S1: Obtain a historical load data sequence of the power system, which includes load values corresponding to several historical time sampling points.
[0052] For example, the load value of the power system is sampled once every 15 minutes, 96 times a day, and continuously sampled for one year, obtaining a total of 35,040 load data as a historical load data sequence.
[0053] S2: Construct a sample data set based on the historical load data series.
[0054] Specifically, first, the missing parts in the historical load data sequence are supplemented to obtain the supplemented historical load data sequence; secondly, the supplemented historical load data sequence is normalized to obtain the normalized historical load data sequence; finally, a sample data set is constructed according to the normalized historical load data sequence.
[0055] The specific process of supplementing the missing parts in the historical load data series is as follows:
[0056] Assume that the input data is L(d,x), where d represents the date, x represents the time sampling point, and the value range is 1 to 96. L(d,x) represents the load value corresponding to the i-th time sampling point on the d-th day. The present invention uses the weighted average of the data of several similar days to fill in the missing values. Specifically, weights are assigned to the same moments of several similar days with missing load data. The closer the relationship, the greater the weight value, otherwise the smaller the weight value, which is expressed by the following formula:
[0057] L(d,x)=ω1L(d,x+1)+ω2L(d,x-1)+ω3L(d+1,x)+ω4L(d-1,x);
[0058] Where: urepresents the weight, and u generally ranges from 1 to 4, that is, ω1, ω2, ω3 and ω4 all represent weights; L(d,x+1), L(d,x-1), L(d+1,x), and L(d-1,x) represent the load values corresponding to the x+1th time sampling point on the dth day, the x-1th time sampling point on the dth day, the xth time sampling point on the d+1th day, and the xth time sampling point on the d-1th day, respectively.
[0059] The specific process of normalizing the supplemented historical load data series is as follows:
[0060] When training a model, since there are multiple input variables, the differences between the input variables must also be considered. These differences are very likely to cause the training time to be longer or even lead to non-convergence. If the input variable value is too large, the weight value will be too large, resulting in instability. At this time, the model is very susceptible to data fluctuations and is more sensitive to input, which ultimately leads to a decrease in the accuracy and generalization ability of the model. Normalizing the data can effectively avoid the above problems. The data normalization formula is as follows:
[0061]
[0062] Where: L n represents the load data after normalization, and L represents the load data without normalization; L max , L min They respectively represent the maximum and minimum values of the supplemented load data.
[0063] S3: Construct an initial load forecasting model based on convolutional neural networks and gated recurrent units.
[0064] S4: Using the Northern Goshawk optimization algorithm to optimize the hyperparameters of the load forecasting initial model, and obtain the load forecasting optimization model. Preferably, the hyperparameters of the load forecasting initial model include: learning rate, number of hidden nodes, regularization coefficient and batch size.
[0065] Specifically, firstly, the parameters of the northern goshawk algorithm are initialized and the position of each northern goshawk is randomly generated; the parameters of the northern goshawk algorithm include: population size, maximum number of iterations, dimension of the problem to be solved and parameter optimization limit; the position of the northern goshawk is used to characterize the hyperparameters of the initial model of load forecasting; then the position of each northern goshawk is iteratively optimized, which specifically includes an exploration stage and a development stage; in the exploration stage, each northern goshawk is ordered to randomly select prey to attack, and the position of each northern goshawk is updated according to the fitness function to obtain the new position of each northern goshawk in the exploration stage; in the development stage, each northern goshawk is ordered to capture prey within the hunting radius, and the position of each northern goshawk is updated according to the fitness function to obtain the new position of each northern goshawk in the development stage; the steps of the exploration stage and the development stage are repeated until the maximum number of iterations is reached, and the optimal hyperparameters of the initial model of load forecasting are determined according to the position of each northern goshawk and the fitness function to obtain the load forecasting optimization model.
[0066] The NGO algorithm mainly includes the prey escape phase (i.e., the exploration phase, hereinafter referred to as the first phase) and the pursuit escape phase (i.e., the development phase, hereinafter referred to as the second phase). After identifying the prey in the first phase, the northern goshawk moves towards the prey at high speed, and in the second phase, it chases the prey with a short tail. The NGO algorithm is as follows Figure 3 As shown in Figure 2, the specific parameter optimization process is as follows:
[0067] First, NGO initialization is performed to generate an initial population, and a fitness function is defined and prey is randomly selected. The present invention uses the mean square error function as the fitness function, and the calculation formula is shown as follows:
[0068]
[0069] Where: L i represents the actual value of the power system load at the i-th time sampling point; represents the predicted value of the power system load at the i-th time sampling point; m represents the total number of time sampling points; R MSE is the root mean square error.
[0070] Then the position of the goshawk in the first stage is updated: a global search is performed on the search space to determine the optimal area, and the selection of prey is random. The mathematical model of the exploration stage is:
[0071] P i =L k ,i=1,2,L,N,k=1,2,L,i-1,i+1,L,N;
[0072]
[0073] Where: L iis the global position of the i-th northern goshawk; l i,j is the position of the i-th northern goshawk in the j-dimensional space; F i For L i The corresponding fitness function value; P i The location of the prey selected by the i-th northern goshawk; p i,j The position of the prey selected for the i-th northern goshawk in the j-dimensional space; P i The corresponding fitness function value; is the new position of the i-th northern goshawk during the exploration phase; is the new position of the i-th northern goshawk in the j-dimensional space during the exploration phase; for The corresponding fitness function value; k is a random natural number in the interval [1,N] and not equal to i; N is the population size; r and Y are both random numbers, and r∈[0,1], Y=1,2, which are used to generate random NGO behavior during the search and update process.
[0074] Then update the position of the goshawk in the second stage: the prey will try to escape after being attacked by the northern goshawk, so the northern goshawk continues to chase the prey. Due to the high speed of the northern goshawk, they can chase the prey and eventually hunt in almost any situation. The simulation of this behavior improves the algorithm's local search ability in the search space. Assuming that this hunting is close to the attack position with a radius of R, the mathematical model of the development stage is:
[0075] R = 0.02 (1-a / A);
[0076]
[0077] Where: L i is the global position of the i-th northern goshawk; l i,j is the position of the i-th northern goshawk in the j-dimensional space; F i For L i The corresponding fitness function value; R is the hunting radius; a is the current number of iterations; A is the maximum number of iterations; r is a random number, and r∈[0,1]; is the new position of the i-th northern goshawk in the development stage; is the new position of the i-th northern goshawk in the j-dimensional space during the development phase; for The corresponding fitness function value.
[0078] Finally, determine whether the maximum number of iterations has been reached. If so, output the optimal parameters and end the algorithm. Otherwise, repeat the above steps until the maximum number of iterations has been reached.
[0079] S5: Use the sample data set to train the load forecasting optimization model to obtain the power system load forecasting model.
[0080] S6: Use the power system load forecasting model to predict future load data of the power system.
[0081] Specifically, the power system load forecasting model includes a CNN module and a GRU module. The main working principles of these two modules are as follows:
[0082] First, the preprocessed (i.e. supplemented and normalized) data is input into the CNN module (i.e. one-dimensional convolution module) for feature extraction, and the following is obtained:
[0083] L n =f(∑L n-1 *k n +b n );
[0084] Where: L n L is the feature map output by the n-th level one-dimensional convolution module; n-1 It is the feature map output by the n-1th level one-dimensional convolution module; n=1,2,3 represents three convolution layers, where the number of convolution kernels in each layer is 16 / 32 / 64 respectively, the convolution kernel size of each convolution layer is 3×3, the padding size is 1, and the step size is 2; * represents convolution operation; k n is the convolution kernel of the n-th level one-dimensional convolution module, b n is the bias parameter of the nth level one-dimensional convolution module, and f is the ReLU activation function.
[0085] Secondly, the features extracted by the CNN module are sent to the GRU module for further processing, and we can get:
[0086]
[0087]
[0088] Where: Represents the input of the GRU module at the current moment, that is, the feature map output by the third-level one-dimensional convolution module; r t Represents the output of the reset gate at the current moment, z t Indicates the output of the update gate at the current moment, represents the candidate hidden state of the hidden layer at the current moment, h t represents the output of the hidden layer at the current moment, h t-1 represents the output of the hidden layer at the previous moment, σ is the sigmoid activation function, tanh is the hyperbolic tangent activation function, W r , W z and W hThey are the weight matrices of the reset gate, update gate and hidden layer respectively, t represents the current moment, and t-1 represents the previous moment.
[0089] Finally, the extracted feature information is sent to the fully connected layer to generate the final prediction result.
[0090] In a specific embodiment, a real data set of 1 year (365 days in total) from March 1, 2018 to March 1, 2019 in a certain area of Hunan is used. The data set is sampled once every 15 minutes, 96 times a day, and a total of 35040 load data are obtained. The data for the whole year is divided into 8:2, 80% as a training set, and 20% as a test set, that is, the data from March 1, 2018 to December 18, 2018 is used as a training set, and the rest of the data is used as a test set. At the same time, in order to verify the effectiveness of the model provided by the present invention, a comparative experiment is performed using a CNN-LSTM model, an LSTM model, an SVM model, and an ELM model. The prediction error indicators of each model are shown in Table 1.
[0091] Table 1 Prediction error indicators of each model
[0092] Prediction Model MAPE(%) RMSE(MV) NGO-CNN-GRU 0.54 56.65 CNN-LSTM 1.97 134.68 LSTM 2.73 215.97 SVM 3.67 278.69 ELM 3.31 271.56
[0093] As shown in Table 1, the average absolute percentage error of the NGO-CNN-GRU model is 0.54%, and the root mean square error is 56.65MW; the average absolute percentage error of the CNN-LSTM model is 1.97%, and the root mean square error is 134.68MW; the average absolute percentage error of the LSTM model is 2.73%, and the root mean square error is 215.97MW; the average absolute percentage error of the SVM model is 3.67%, and the root mean square error is 278.69MW; the average absolute percentage error of the ELM model is 3.31%, and the root mean square error is 271.56MW. It can be seen that the present invention significantly reduces the prediction error when performing daily load forecasting, and has a higher prediction accuracy.
[0094] In summary, the present invention first pre-processes the sample data to obtain processed training data. Secondly, the NGO algorithm is used to optimize the hyperparameters of the CNN-GRU model, such as the learning rate, number of hidden nodes, and regularization coefficient, and input them into the network model; then, in the feature extraction layer, the training data is input into the CNN convolutional neural network for feature extraction, and the extracted information is further processed through the GRU gated recurrent unit. Finally, the feature information extracted by the feature extraction layer is repeatedly trained after passing through the fully connected layer to obtain the final power system load forecasting model, which can realize automatic optimization of hyperparameters and greatly improve the accuracy of prediction.
[0095] In one embodiment, a computer program product is also provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0096] In one embodiment, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0097] In one embodiment, a computer device is also provided, including a memory and a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0098] Furthermore, the computer device also includes an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store pending transactions. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in the above-mentioned method embodiments are implemented.
[0099] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.
[0100] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.
[0101] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above 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.
[0102] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for predicting load in a power system, It is characterized in that include: Acquire a historical load data sequence of the power system; the historical load data sequence includes load values corresponding to a number of historical time sampling points; constructing a sample data set according to the historical load data sequence; Construct an initial load forecasting model based on convolutional neural networks and gated recurrent units; The Northern Goshawk optimization algorithm is used to optimize the hyperparameters of the initial load forecasting model to obtain a load forecasting optimization model; Using the sample data set to train the load forecasting optimization model to obtain a power system load forecasting model; The power system load forecasting model is used to forecast future load data of the power system.
2. The power system load forecasting method according to claim 1, It is characterized in that Constructing a sample data set according to the historical load data sequence specifically includes: Supplementing the missing parts in the historical load data sequence to obtain a supplemented historical load data sequence; Normalizing the supplemented historical load data sequence to obtain a normalized historical load data sequence; A sample data set is constructed according to the normalized historical load data sequence.
3. The power system load forecasting method according to claim 1, It is characterized in that The Northern Goshawk optimization algorithm is used to optimize the hyperparameters of the initial load forecasting model to obtain a load forecasting optimization model, which specifically includes: Initializing the parameters of the northern goshawk algorithm and randomly generating the position of each northern goshawk; the parameters of the northern goshawk algorithm include: population size, maximum number of iterations, problem dimension and parameter optimization limit; the position of the northern goshawk is used to characterize the hyperparameters of the initial model of load forecasting; In the exploration phase, each northern goshawk randomly selects prey to attack, and updates the position of each northern goshawk according to the fitness function to obtain the new position of each northern goshawk in the exploration phase; In the development stage, each northern goshawk is required to capture prey within the hunting radius, and the position of each northern goshawk is updated according to the fitness function to obtain the new position of each northern goshawk in the development stage; The steps of the exploration phase and the development phase are repeatedly performed until the maximum number of iterations is reached, and then the optimal hyperparameters of the initial load forecasting model are determined according to the position and fitness function of each northern goshawk to obtain a load forecasting optimization model.
4. The power system load forecasting method according to claim 3, It is characterized in that The hyper parameters of the load forecasting initial model include: learning rate, number of hidden nodes, regularization coefficient and batch size; the fitness function is a mean square error function.
5. The power system load forecasting method according to claim 3, It is characterized in that In the exploration phase, each northern goshawk randomly selects prey to attack, and updates the position of each northern goshawk according to the fitness function to obtain the new position of each northern goshawk in the exploration phase. The specific formula is: Among them, L i is the global position of the i-th northern goshawk; l i,j is the position of the i-th northern goshawk in the j-dimensional space; F i For L i The corresponding fitness function value; P i The location of the prey selected by the i-th northern goshawk; p i,j The position of the prey selected by the i-th northern goshawk in the j-dimensional space; F pi P i The corresponding fitness function value; is the new position of the i-th northern goshawk during the exploration phase; is the new position of the i-th northern goshawk in the j-dimensional space during the exploration phase; for The corresponding fitness function value; r and Y are both random numbers, and r∈[0,1], Y=1,2.
6. The power system load forecasting method according to claim 3, It is characterized in that In the development stage, each northern goshawk is required to capture prey within the hunting radius, and the position of each northern goshawk is updated according to the fitness function to obtain the new position of each northern goshawk in the development stage. The specific formula is: R=0.02(1-a / A); Among them, L i is the global position of the i-th northern goshawk; l i,j is the position of the i-th northern goshawk in the j-dimensional space; F i For L i The corresponding fitness function value; R is the hunting radius; a is the current number of iterations; A is the maximum number of iterations; r is a random number, and r∈[0,1]; is the new position of the i-th northern goshawk in the development stage; is the new position of the i-th northern goshawk in the j-dimensional space during the development phase; for The corresponding fitness function value.
7. The power system load forecasting method according to claim 2, It is characterized in that The missing parts in the historical load data sequence are supplemented to obtain the supplemented historical load data sequence. The specific formula is: L(d,x)=ω 1 L(d,x+1)+ω 2 L(d,x-1)+ω 3 L(d+1,x)+ω 4 L(d-1,x); Among them, L(d,x) is the load value corresponding to the xth time sampling point on the dth day; L(d,x+1) is the load value corresponding to the x+1th time sampling point on the dth day; L(d,x-1) is the load value corresponding to the x-1th time sampling point on the dth day; L(d+1,x) is the load value corresponding to the xth time sampling point on the d+1th day; L(d-1,x) is the load value corresponding to the xth time sampling point on the d-1th day; ω 1 ,ω 2 ,ω 3 and ω 4 Both represent weights.
8. A computer device, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the power system load forecasting method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the power system load forecasting method as described in any one of claims 1 to 7 is implemented.
10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the power system load forecasting method as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Building air conditioning system load prediction method and device, medium and equipment
CN119149963A
Load prediction method and system based on data decomposition
CN119891152A
Power grid load prediction method and device and electronic equipment
CN120049430A
Power transaction risk monitoring method and system based on multi-source signal mechanism and sparse hybrid expert model
CN122089090A
Power transaction risk monitoring method and system based on multi-source signal mechanism and sparse mixed expert model
CN122089090B
