Small hydropower station full-time-domain power generation prediction method and system based on heuristic deep learning

By applying the heuristic deep learning method of BiLSTM and PSO in small hydropower generation prediction, the problems of low prediction accuracy and complex parameter adjustment in the prior art are solved, and high-precision and robust power generation prediction are achieved.

CN119990400APending Publication Date: 2025-05-13GUIZHOU POWER GRID CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411960175.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art is difficult to effectively capture complex spatio-temporal nonlinear relationships in prediction of small hydropower generation, resulting in limited prediction accuracy and complex model parameter adjustment, which lacks robustness.

Method used

Using a heuristic deep learning method based on BiLSTM and particle swarm optimization (PSO), time series features are captured through BiLSTM model, and PSO is used to optimize the model architecture and train hyperparameters to improve prediction performance.

Benefits of technology

It significantly improves the accuracy of prediction of small hydropower generation and the generalization ability of the model, reduces the complexity of model parameter adjustment, and enhances the robustness and adaptability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119990400A_ABST
    Figure CN119990400A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence and power system optimization, in particular to a small hydropower station full-time-domain power generation prediction method and system based on heuristic deep learning, and the method comprises the steps: firstly collecting related data needed by small hydropower station power generation prediction, carrying out the preprocessing of the data, and carrying out the data enhancement and feature engineering; then constructing a small hydropower station power generation prediction model based on a BiLSTM framework, and capturing time sequence features in power generation data; secondly, optimizing the structure of the BiLSTM model and training hyper-parameters by using a particle swarm optimization algorithm to improve the prediction performance of the model; and finally, training the data by using the optimized BiLSTM model, and testing and verifying the small hydropower station full-time domain prediction performance of the model through a performance evaluation index. Through the method, the precision and reliability of small hydropower generating capacity prediction can be improved, and effective technical support is provided for intelligent hydropower dispatching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of artificial intelligence and power system optimization, and in particular to a method and system for predicting small hydropower full-time domain power generation based on heuristic deep learning. Background Art

[0002] With global climate change, increasing pollution and the gradual depletion of fossil fuel resources, countries are increasingly in need of sustainable energy. As an important part of distributed renewable energy, small hydropower plays a key role in achieving regional energy optimization due to its clean and flexible characteristics. However, since the power generation capacity of small hydropower is highly dependent on weather conditions (such as precipitation, temperature, wind speed) and basin characteristics, its power generation process exhibits significant nonlinearity and time-varying characteristics. This complexity poses a huge challenge to the accurate power generation prediction of small hydropower, but it also makes the research on prediction technology have important practical value.

[0003] Small hydropower generation forecast is of great significance to grid dispatch optimization, energy storage planning and electricity market transactions. Accurate power generation forecast can improve the flexibility of the power system, optimize resource allocation, and reduce economic losses caused by forecast bias. However, traditional forecasting methods have some limitations. For example, traditional linear regression, support vector machine and other models have significant deficiencies in dealing with the complex nonlinear relationship between power generation and weather conditions. The univariate method that relies only on historical power generation data is difficult to capture the correlation between weather conditions and power generation, and the accuracy of the forecast results is limited. At present, some advanced machine learning models have achieved advantages in forecasting tasks. For example, the long short-term memory network (LSTM) and its extended model bidirectional long short-term memory network (BiLSTM) have gradually become an effective tool for predicting complex nonlinear time series data due to their advantages in capturing the bidirectional dependencies of time series.

[0004] Although existing research has made progress in forecasting traditional hydropower stations and power loads, there are still some shortcomings in forecasting power generation for small hydropower. The power generation process of small hydropower is affected by weather conditions such as precipitation, temperature, and wind speed, and is closely related to topography and hydrological characteristics. Existing methods fail to fully capture these complex spatiotemporal nonlinear relationships, resulting in limited prediction accuracy. Most studies use manual trial and error methods to adjust model hyperparameters, which is inefficient and difficult to break through local optimality. Existing models show prediction bias in small hydropower scenarios in different time periods or regions, especially when dealing with seasonal and regional differences, and lack robustness. Summary of the invention

[0005] In view of the above problems existing in the prior art, the present invention is proposed.

[0006] Therefore, the technical problem to be solved by the present invention is to develop a small hydropower full-time domain power generation prediction method based on bidirectional long short-term memory network (BiLSTM) and particle swarm optimization (PSO) to solve the shortcomings of traditional power generation prediction models in time series feature extraction and parameter optimization. Through this method, the accuracy and reliability of small hydropower generation prediction can be improved, providing effective technical support for intelligent hydropower scheduling.

[0007] To solve the above technical problems, the present invention provides the following technical solutions: a method for predicting small hydropower generation in the entire time domain based on heuristic deep learning, including: collecting relevant data for small hydropower generation prediction, preprocessing the data and performing data enhancement and feature engineering; constructing a small hydropower generation prediction model based on the BiLSTM framework to capture the time series characteristics in the power generation data; using a particle swarm optimization algorithm to optimize the structure and training hyperparameters of the BiLSTM model to improve the model prediction performance; using the optimized BiLSTM model to train the data, and testing and verifying the small hydropower full-time domain prediction performance of the model through performance evaluation indicators.

[0008] As a preferred solution of the small hydropower full-time domain power generation prediction method based on heuristic deep learning described in the present invention, the relevant data includes collecting hourly or daily power generation data of small hydropower stations, the time span covers the complete seasonal cycle, and weather factors affecting small hydropower generation, including temperature, solar radiation, relative humidity, wind speed and hydrological measurement data; using the longitude and latitude information of the small hydropower station and the meteorological station, the meteorological data source is selected for the hydropower station through geographical distance calculation.

[0009] As a preferred solution of the method for predicting small hydropower generation in the entire time domain based on heuristic deep learning described in the present invention, wherein: the preprocessing includes missing data processing, abnormal data processing, data standardization, time format consistency, and data enhancement and feature engineering;

[0010] The missing data processing, when a single item of data is missing, is supplemented by adjacent data to check for omissions, and the historical power generation is averaged, which is expressed as:

[0011]

[0012] Among them, d represents the date of value taking, t represents the time of value taking, and x represents the power generation value;

[0013] When dealing with multiple missing data problems, the weighted average method is used to fill in the data, expressed as:

[0014]

[0015] Among them, y is the weighted arithmetic mean, y iis the power generation value at different times (i=1,2…,n), n is the number of selected data, w i is the weight corresponding to each power generation value, 0≤w i ≤1;

[0016] The abnormal data processing, when the unit suddenly fails or the data collection platform has problems, the data abnormal value obtained by the platform; when analyzing the data abnormal value, a fixed threshold is established in the collected adjacent data as the allowable fluctuation space. When the distance between two points exceeds the given space, it is judged to be in an abnormal state. The judgment condition is expressed as:

[0017]

[0018] Among them, α represents the threshold for judging abnormal values. When the judgment condition is met, it is abnormal data. After the abnormal data is eliminated, the missing data method is used to process it according to the situation;

[0019] The data standardization is to standardize the data to ensure that different features have the same scale;

[0020] The time format consistency standardizes the timestamp format to make the time features in the data set consistent, and resamples the data as needed to adapt to the modeling frequency;

[0021] The data enhancement and feature engineering uses sine-cosine coding to encode time variables to capture the impact of seasonal changes on power generation; the processed power generation data and weather data are combined to generate the final time series data set.

[0022] As a preferred solution of the small hydropower full-time domain power generation prediction method based on heuristic deep learning described in the present invention, wherein: the small hydropower power generation prediction model based on the BiLSTM framework includes an input layer, a BiLSTM layer, an activation layer and an output layer;

[0023] The input layer receives processed time series data, including historical power generation and weather variables. The BiLSTM layer constructs a memory network consisting of a forward LSTM layer and a backward LSTM layer. The forward LSTM processes data from history to the future, and the backward LSTM processes data from the future to history. The activation layer uses an activation function to ensure that the model learns the nonlinear relationship of the input data. The output layer converts the hidden state of the network into a target prediction value to predict the power generation at a specified time in the future.

[0024] The BiLSTM includes combining the forward and backward LSTM layers so that the hidden state of the time step contains the forward and backward information; and the calculation of the BiLSTM includes the forward and backward calculations of two LSTM units, and finally the forward and backward hidden states are concatenated and averaged to form a final hidden state for output layer prediction.

[0025] As a preferred solution of the method for predicting small hydropower full-time domain power generation based on heuristic deep learning described in the present invention, wherein: the time series includes the structure of the LSTM model, and the long-distance information is stored by splitting into three gates and constructing a memory cell C; the LSTM unit includes an input gate i, a forget gate f, and an output gate o; in the LSTM network, the fully connected layer is applied to the output layer, and the input time series, the hidden layer and the output sequence are represented as X=(x1, x2, x3, ..., x t ), H=(h1,h2,h3,…,h t ), Y(y1,y2,y3,…,y t )The calculation process is expressed as:

[0026] y t =f(Wh t +b h )

[0027] h t =H(h t-1 ,c t-1 ,x t )

[0028] Among them, x t represents the input at time step t, h t-1 Indicates the hidden state at the previous moment, h t Indicates the current hidden state, c t-1 represents the state of the memory unit at the previous moment, c t Represents the current state of the memory unit, y t represents the output at time step t;

[0029] The structure of the LSTM model is represented as follows:

[0030] h t =o t ·tan(c t )

[0031] c t =f t ·c t-1 +i t ·c t

[0032]

[0033] Among them, f t represents the forget gate, i t represents the input gate, c t Indicates memory unit update, o t represents the output gate, W f , W i , W c , W o represents the weight parameter of the neural network, b f 、b i 、b c 、b o represents the bias parameter of the neural network; σ and tan h represent the activation function of the neural network; x t represents the input at time step t, c t-1 represents the state of the memory unit at the previous moment, c t Indicates the current state of the memory unit, h t-1 Represents the hidden state at the previous moment.

[0034] As a preferred solution of the method for predicting small hydropower full-time domain power generation based on heuristic deep learning described in the present invention, the particle swarm optimization algorithm includes iteratively updating the speed and position of particles, and the speed update formula determines the direction and size of particle movement:

[0035] v i (t+1)=ω·v i (t)+c1·r1·(pbest i (t)-x i (t)+c2·r2(gbest(t)-x i (t))

[0036] x i (t+1)=x i (t)+v i (t+1)

[0037] Among them, v i (t) represents the velocity of particle i at time i, ω represents the inertia weight, c1 and c2 represent the acceleration coefficients, r1 and r2 represent random values ​​from 0 to 1, and pbest i (t) represents the historical best position of particle i at time i, gbest(t) represents the global best position of the entire particle swarm at time i, and x i (t) the current position of particle i at time i;

[0038] The particle swarm optimization includes participating in the optimization process of BiLSTM and is divided into two stages. Stage one is model architecture optimization. The particle swarm optimization is used to find the optimal model architecture parameters, including the number of neurons in the hidden layer and the number of LSTM layers, to achieve the best performance on a given data set; the particle swarm optimization searches for different model architectures, trains the models in iterations, and selects the architecture that maximizes fitness; stage two is training hyperparameter optimization. After determining the optimal model architecture, the training hyperparameters of the model are optimized through the particle swarm optimization; in the optimization process, the model architecture parameters include the number of hidden layers and the number of neurons; the model training parameters include the learning rate, batch size, and optimizer.

[0039] As a preferred solution of the method for predicting small hydropower full-time domain power generation based on heuristic deep learning described in the present invention, wherein: the use of the optimized BiLSTM model to train the data includes inputting the training set into the BiLSTM model, using the optimized hyperparameters for gradient descent optimization, and minimizing the loss function; using the validation set to monitor the model performance during the training process to ensure that the performance of the model on the validation set is optimized, and the root mean square error is used to measure the standard deviation between the predicted value and the actual value, reflecting the overall level of the prediction error, which is expressed as:

[0040]

[0041] Among them, Y i Indicates the actual value, represents the predicted value, and N is the total number of samples.

[0042] Another purpose of the present invention is to provide a small hydropower full-time domain power generation prediction system based on heuristic deep learning, which can effectively collect and process the multi-dimensional data required for small hydropower power generation prediction, and realize high-precision power generation prediction through the BiLSTM model combined with the particle swarm optimization algorithm. The system has functional modules such as data preprocessing, model construction, training optimization and prediction evaluation, which can provide accurate full-time domain power generation prediction for small hydropower stations, optimize power generation scheduling, and improve energy utilization efficiency.

[0043] In order to solve the above technical problems, the present invention provides the following technical solutions: a small hydropower full-time domain power generation prediction system based on heuristic deep learning, comprising: a collection and processing module, a model building module, a training optimization module and an evaluation and prediction module;

[0044] The collection and processing module collects relevant data of small hydropower generation prediction, preprocesses the data and performs data enhancement and feature engineering;

[0045] The model building module builds a small hydropower generation prediction model based on the BiLSTM framework to capture the time series characteristics in the power generation data;

[0046] The training optimization module uses a particle swarm optimization algorithm to optimize the structure and training hyperparameters of the BiLSTM model to improve the model prediction performance;

[0047] The evaluation and prediction module uses the optimized BiLSTM model to train the data, and tests and verifies the small hydropower full-time domain prediction performance of the model through performance evaluation indicators.

[0048] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, the steps of the small hydropower full-time domain power generation prediction method based on heuristic deep learning as described above are implemented.

[0049] A computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the small hydropower full-time domain power generation prediction method based on heuristic deep learning as described above are implemented.

[0050] The beneficial effects of the present invention are as follows: improving prediction accuracy and generalization ability: by fully capturing the complex patterns in time series data through the BiLSTM model, and optimizing the model architecture and training parameters using PSO, the accuracy of power generation prediction and the generalization ability of the model are significantly improved.

[0051] Reduce the complexity of model parameter adjustment: PSO automatically searches for the best model architecture and hyperparameters, reducing the complexity of manual parameter adjustment and making the model optimization process more efficient and intelligent.

[0052] Enhance the robustness and adaptability of the system: The present invention combines the bidirectional feature extraction capability of BiLSTM and the global optimization capability of PSO, making the model more sensitive and adaptable to complex weather conditions and changes in the power generation environment, and enhancing the robustness of the system in different scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0054] Figure 1 An overall flow chart of a method for predicting small hydropower generation over the entire time domain based on heuristic deep learning provided for one embodiment of the present invention.

[0055] Figure 2 An LSTM principle framework diagram of a small hydropower full-time domain power generation prediction method based on heuristic deep learning provided for an embodiment of the present invention.

[0056] Figure 3 A training optimization workflow diagram based on PSO and BiLSTM models for a small hydropower full-time domain power generation prediction method based on heuristic deep learning provided in one embodiment of the present invention.

[0057] Figure 4 A model architecture training convergence diagram of a small hydropower full-time domain power generation prediction method based on heuristic deep learning provided in one embodiment of the present invention.

[0058] Figure 5 A model hyperparameter training convergence diagram of a small hydropower full-time domain power generation prediction method based on heuristic deep learning provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0060] Example 1, reference Figure 1-Figure 3 , is an embodiment of the present invention, which provides a method for predicting small hydropower generation in all time domains based on heuristic deep learning, including:

[0061] S1: Collect relevant data for small hydropower generation prediction, preprocess the data and perform data enhancement and feature engineering.

[0062] It should be noted that if Figure 1 As shown in S1, collect hourly or daily power generation data of small hydropower stations, covering a complete seasonal cycle (e.g., from January 1, 2022 to June 30, 2023) to ensure that the data includes the impact of various climate conditions. Collect weather factors that affect small hydropower generation, including temperature, solar radiation, relative humidity, wind speed, and hydrological measurement data. Weather data comes from multiple meteorological stations in the area where the hydropower station is located and is collected hourly. Use the latitude and longitude information of the small hydropower station and the meteorological station to determine the closest meteorological station through geographic distance calculation, so as to select the appropriate meteorological data source for each hydropower station.

[0063] Furthermore, preprocessing includes missing data processing, abnormal data processing, data standardization, time format consistency, and data enhancement and feature engineering.

[0064] Furthermore, missing data processing: When a single item of data is missing, the method used is relatively simple and the processing is relatively easy. The missing data is filled in by the upper and lower adjacent data, and the historical power generation is averaged according to the following formula:

[0065]

[0066] Among them, d represents the date of value taking, t represents the time of value taking, and x represents the power generation value;

[0067] When dealing with multiple missing data problems, the weighted average method is used to fill in the data. The missing data is obtained by using the data at multiple times before the missing data. This is a basic method in time series prediction, as shown in the following formula:

[0068]

[0069] Among them, y represents the weighted arithmetic mean, y i represents the power generation value at different times (i=1,2…,n), n represents the number of selected data, w i Indicates the weight corresponding to each power generation value, 0≤w i ≤1;

[0070] Processing of abnormal data: When there is a sudden equipment failure in the unit or a problem with the data collection platform, the data obtained through the platform may contain certain abnormal values. According to the principle of power generation viscosity, that is, within the same time range, the data will not change dramatically. When analyzing whether the data has abnormal values, a fixed threshold can be established in the collected adjacent data as the allowable fluctuation space between the two numbers. When the distance between the two points exceeds the given space, it can be determined that this point is in an abnormal state. The judgment condition is as follows:

[0071]

[0072] Among them, α represents the threshold for judging abnormal values. When the above formula is established, it is abnormal data. After eliminating the abnormal data, the missing data method can be used to process it according to different situations;

[0073] Data standardization: Standardize the data to ensure that different features have the same scale so that parameter updates can be more efficient during model training;

[0074] Time format consistency: Standardize the timestamp format to ensure the consistency of time features in the dataset, and resample the data as needed to adapt to different modeling frequencies;

[0075] Data enhancement and feature engineering: Use sine-cosine coding to encode time variables (such as month and date) to capture the impact of seasonal changes on power generation. Combine the processed power generation data with weather data to generate the final multivariate time series dataset, ensuring that the dataset contains all the main factors affecting small hydropower generation.

[0076] S2: Build a small hydropower generation prediction model based on the BiLSTM framework to capture the time series characteristics in the power generation data.

[0077] It should be noted that if Figure 1 As shown in Figure S2, the typical structure of the LSTM model: long-distance information can be stored by splitting it into three gates and constructing a memory cell C; a typical LSTM unit is mainly composed of four gates: input gate i, forget gate f, and output gate o; in the LSTM network, the fully connected layer is applied to the output layer; the input time series, hidden layer and output sequence are represented as X = (x1, x2, x3, ..., x t ), H=(h1,h2,h3,…,h t ), Y(y1,y2,y3,…,y t )The calculation process is as follows:

[0078] y t =f(Wh t +b h )

[0079] h t =H(h t-1 ,c t-1 ,x t )

[0080] Among them, x t represents the input at time step t, representing the feature data at the current moment; h t-1 Indicates the hidden state of the previous moment, including the memory information of the previous moment; h t Represents the hidden state at the current moment, which contains the memory information at the current moment and will be passed to the next time step; c t-1 represents the state of the memory unit at the previous moment, c t Indicates the current state of the memory unit, which stores information for future use; y t Represents the output at time step t, which is the predicted result for the given input.

[0081] Furthermore, the structure of LSTM is as follows:

[0082] h t =o t ·tan(c t )

[0083] ct =f t ·c t-1 +i t ·c t

[0084]

[0085] Among them, f t represents the forget gate, i t represents the input gate, c t Indicates memory unit update, o t represents the output gate, W f , W i , W c , W o represents the weight parameter of the neural network, b f 、b i 、b c 、b o represents the bias parameter of the neural network; σ and tan h represent the activation function of the neural network; x t represents the input at time step t, c t-1 represents the state of the memory unit at the previous moment, c t Indicates the current state of the memory unit, h t-1 Represents the hidden state at the previous moment.

[0086] Furthermore, BiLSTM combines the standard LSTM layer with forward and backward layers, so that the hidden state at each time step contains the previous and next information. This bidirectionality is particularly beneficial for capturing complex time series features. For example, in small hydropower forecasting, weather changes will not only affect future power generation, but may also reversely affect current scheduling decisions.

[0087] Specifically, the calculation of BiLSTM includes the forward and backward calculations of two LSTM units, and finally the hidden states in the two directions are concatenated or averaged to form the final hidden state for output layer prediction;

[0088] The small hydropower prediction architecture based on the BiLSTM model is as follows:

[0089] Input layer: This layer receives processed multivariate time series data, including historical power generation and various weather variables (such as temperature, humidity, wind speed, etc.);

[0090] BiLSTM layer: constructs a bidirectional long short-term memory network consisting of a forward LSTM layer and a backward LSTM layer to capture the bidirectional dependency of the time series; the forward LSTM processes data from history to the future, while the backward LSTM processes data from the future to the history. This design enables the model to learn the data features of the previous and next order at the same time;

[0091] Activation layer: Use appropriate activation functions to ensure that the model can learn the nonlinear relationship of the input data and improve the model's expressiveness;

[0092] Output layer: The output layer converts the hidden state of the network into a target prediction value, predicting the power generation at a specified time in the future (for example, predicting the power generation in the next 24 hours).

[0093] S3: Use the particle swarm optimization algorithm to optimize the structure and training hyperparameters of the BiLSTM model to improve the model prediction performance.

[0094] It should be noted that if Figure 1 As shown in S3, particle swarm optimization (PSO) is a heuristic algorithm inspired by the behavior of bird flocks or fish schools foraging. PSO seeks the optimal solution to a problem by simulating the collective movement of these groups in search of food; in PSO, each individual (called a particle) represents a possible solution, and particles move in the search space, influenced by their own historical best position (pbest) and the best position of the entire group (gbest).

[0095] Furthermore, the particle swarm algorithm iteratively updates the speed and position of each particle. The speed update formula determines the direction and size of the particle movement:

[0096] v i (t+1)=ω·v i (t)+c1·r1·(pbest i (t)-x i (t)+c2·r2(gbest(t)-x i (t))

[0097] x i (t+1)=x i (t)+v i (t+1)

[0098] Among them, v i (t) represents the velocity of particle i at time i, ω represents the inertia weight, balancing global exploration and local development, c1 and c2 represent acceleration coefficients, representing cognitive component and social component respectively, r1 and r2 represent random values ​​from 0 to 1, pbest i(t) represents the historical best position of particle i at time i, gbest(t) represents the global best position of the entire particle swarm at time i, and x i (t) The current position of particle i at time i.

[0099] Furthermore, the optimization process of BiLSTM with PSO is divided into two stages. Stage one is model architecture optimization. The goal is to find the optimal model architecture parameters through PSO, such as the number of neurons in the hidden layer and the number of LSTM layers, to achieve the best performance on a given data set. In this stage, PSO searches for different model architectures and trains the model in each iteration to select the architecture that maximizes fitness (such as the lowest loss). Stage two is training hyperparameter optimization. After determining the optimal model architecture, PSO is used to optimize the model's training hyperparameters, such as learning rate, optimizer type, and batch size. The selection of these hyperparameters has a great impact on the final performance of the model. Therefore, in this stage, PSO is used to fine-tune these hyperparameters to further improve the model performance. The model training optimization process is as follows: Figure 2 As shown; in this optimization process, Figure 3 As shown, the model architecture parameters include: the model architecture that needs to be optimized, such as the number of hidden layers, the number of neurons in each layer, etc. The model training parameters include: the hyperparameters involved in model training, such as learning rate, batch size, optimizer, etc.

[0100] S4: Use the optimized BiLSTM model to train the data, and test and verify the full-time domain prediction performance of the model for small hydropower through performance evaluation indicators.

[0101] It should be noted that if Figure 1 As shown in S4, the BiLSTM model is trained using the optimal architecture and training parameters obtained by particle swarm optimization (PSO) in S3; during the training process, the training set is input into the BiLSTM model, and the optimized hyperparameters (such as learning rate and batch size) are used to perform gradient descent optimization to minimize the loss function; during the training process, the validation set is used to monitor the model performance to ensure that the performance of the model on the validation set is gradually optimized to prevent overfitting.

[0102] Furthermore, in order to evaluate the prediction effect of the BiLSTM model, the commonly used root mean square error (RMSE) was used: it is used to measure the standard deviation between the predicted value and the actual value, reflecting the overall level of prediction error, and the calculation formula is:

[0103]

[0104] Among them, Y i Indicates the actual value, represents the predicted value, and N is the total number of samples.

[0105] The above is a schematic scheme of a method for predicting small hydropower full-time power generation based on heuristic deep learning in this embodiment. It should be noted that the technical solution of the system of the method for predicting small hydropower full-time power generation based on heuristic deep learning belongs to the same concept as the technical solution of the method for predicting small hydropower full-time power generation based on heuristic deep learning mentioned above. The details of the technical solution of the system for predicting small hydropower full-time power generation based on heuristic deep learning in this embodiment that are not described in detail can all be referred to the description of the technical solution of the method for predicting small hydropower full-time power generation based on heuristic deep learning mentioned above.

[0106] The small hydropower full-time domain power generation prediction system based on heuristic deep learning in this embodiment is characterized by comprising: a collection and processing module, a model building module, a training optimization module and an evaluation and prediction module;

[0107] The collection and processing module collects relevant data of small hydropower generation prediction, preprocesses the data and performs data enhancement and feature engineering;

[0108] The model building module builds a small hydropower generation prediction model based on the BiLSTM framework to capture the time series characteristics in the power generation data;

[0109] The training optimization module uses a particle swarm optimization algorithm to optimize the structure and training hyperparameters of the BiLSTM model to improve the model prediction performance;

[0110] The evaluation and prediction module uses the optimized BiLSTM model to train the data, and tests and verifies the small hydropower full-time domain prediction performance of the model through performance evaluation indicators.

[0111] This embodiment also provides a computing device, which is applicable to the case of a small hydropower full-time domain power generation prediction method based on heuristic deep learning, including:

[0112] Memory and processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the small hydropower full-time domain power generation prediction method based on heuristic deep learning as proposed in the above embodiment.

[0113] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for predicting the full-time generation of small hydropower based on heuristic deep learning as proposed in the above embodiment is implemented.

[0114] The storage medium proposed in this embodiment and the small hydropower full-time domain power generation prediction method based on heuristic deep learning proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0115] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. 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 methods 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., which can store program codes.

[0116] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0117] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0118] Example 2, reference Figure 4-Figure 5, which is an embodiment of the present invention, provides a small hydropower full-time domain power generation prediction method based on heuristic deep learning. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0119] A BiLSTM model with two bidirectional LSTM layers was used, with the first layer containing 128 hidden units and the second layer containing 64 hidden units to fully capture the time series characteristics in the power generation data. The model achieved optimal performance after 100 iterations, proving that it can effectively learn the potential patterns in time series data.

[0120] In order to further improve the prediction accuracy, the PSO algorithm was used to optimize the model architecture and hyperparameters. Through the PSO optimization process, the model not only adjusted the architecture, but also optimized key training hyperparameters such as learning rate and batch size.

[0121] The experimental results show that the PSO algorithm exhibits good convergence in the optimization process of model architecture and hyperparameters. The root mean square error (RMSE) decreases rapidly during the optimization process. Figure 4 As shown in , RMSE tends to stabilize around the third iteration, and the final stable value is about 0.0494. In the hyperparameter optimization graph, as shown in Figure 5 As shown in the figure, RMSE tends to stabilize at the 5th iteration, and the final stable value is about 0.0452. These results show that PSO plays a significant role in improving the prediction accuracy of the model.

[0122] 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 preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A small hydropower full-time domain power generation prediction method based on heuristic deep learning, characterized by: include: Collect relevant data on small hydropower generation forecast, preprocess the data and perform data enhancement and feature engineering; Build a small hydropower generation prediction model based on the BiLSTM framework to capture the time series characteristics of power generation data; Use particle swarm optimization algorithm to optimize the structure and training hyperparameters of the BiLSTM model to improve the model prediction performance; The optimized BiLSTM model is used to train the data, and the full-time domain prediction performance of the model for small hydropower is tested and verified through performance evaluation indicators.

2. The method for predicting small hydropower generation over the entire time domain based on heuristic deep learning according to claim 1, characterized in that: The relevant data include collecting hourly or daily power generation data of small hydropower stations, with a time span covering a complete seasonal cycle, and weather factors affecting small hydropower generation, including temperature, solar radiation, relative humidity, wind speed and hydrological measurement data; using the longitude and latitude information of the small hydropower station and the meteorological station, and determining through geographic distance calculation, to select the meteorological data source for the hydropower station.

3. The method for predicting small hydropower generation over the entire time domain based on heuristic deep learning as claimed in claim 2, characterized in that: The preprocessing includes missing data processing, abnormal data processing, data standardization, time format consistency, and data enhancement and feature engineering; The missing data processing, when a single item of data is missing, is supplemented by adjacent data to check for omissions, and the historical power generation is averaged, which is expressed as: Among them, d represents the date of value taking, t represents the time of value taking, and x represents the power generation value; When dealing with multiple missing data problems, the weighted average method is used to fill in the data, expressed as: Among them, y represents the weighted arithmetic mean, y i represents the power generation value at different times (i=1,2…,n), n represents the number of selected data, w i Indicates the weight corresponding to each power generation value, 0≤w i ≤1; The abnormal data processing, when the unit suddenly fails or the data collection platform has problems, the data abnormal value obtained by the platform; when analyzing the data abnormal value, a fixed threshold is established in the collected adjacent data as the allowable fluctuation space. When the distance between two points exceeds the given space, it is judged to be in an abnormal state. The judgment condition is expressed as: Among them, α represents the threshold for judging abnormal values. When the judgment condition is met, it is abnormal data. After the abnormal data is eliminated, the missing data method is used to process it according to the situation; The data standardization is to standardize the data to ensure that different features have the same scale; The time format consistency standardizes the timestamp format to make the time features in the data set consistent, and resamples the data as needed to adapt to the modeling frequency; The data enhancement and feature engineering uses sine-cosine coding to encode time variables to capture the impact of seasonal changes on power generation; the processed power generation data and weather data are combined to generate the final time series data set.

4. The method for predicting small hydropower generation over the entire time domain based on heuristic deep learning as claimed in claim 3 is characterized by: The small hydropower generation prediction model based on the BiLSTM framework includes an input layer, a BiLSTM layer, an activation layer and an output layer; The input layer receives processed time series data, including historical power generation and weather variables. The BiLSTM layer constructs a memory network consisting of a forward LSTM layer and a backward LSTM layer. The forward LSTM processes data from history to the future, and the backward LSTM processes data from the future to history. The activation layer uses an activation function to ensure that the model learns the nonlinear relationship of the input data. The output layer converts the hidden state of the network into a target prediction value to predict the power generation at a specified time in the future. The BiLSTM includes combining the forward and backward LSTM layers so that the hidden state of the time step contains the forward and backward information; and the calculation of the BiLSTM includes the forward and backward calculations of two LSTM units, and finally the forward and backward hidden states are concatenated and averaged to form a final hidden state for output layer prediction.

5. The method for predicting small hydropower generation over the entire time domain based on heuristic deep learning as claimed in claim 4, characterized in that: The time series includes a structure using an LSTM model, where long-distance information is stored by splitting into three gates and constructing a memory cell C; the LSTM unit includes an input gate i, a forget gate f, and an output gate o; in the LSTM network, a fully connected layer is applied to the output layer, and the input time series, hidden layer, and output sequence are represented as X=(x1, x2, x3, ..., x t ), H=(h1,h2,h3,…,h t ), Y(y1,y2,y3,…,y t )The calculation process is expressed as: y t =f(Wh t +b h ) h t =H(h t-1 ,c t-1 ,x t ) Among them, x t represents the input at time step t, h t-1 Indicates the hidden state at the previous moment, h t Indicates the current hidden state, c t-1 represents the state of the memory unit at the previous moment, c t Represents the current state of the memory unit, y t represents the output at time step t; The structure of the LSTM model is represented as follows: h t =o t ·tan(c t ) c t =f t ·c t-1 +i t ·c t Among them, f t represents the forget gate, i t represents the input gate, c t Indicates memory unit update, o t represents the output gate, W f , W i , W c , W o represents the weight parameter of the neural network, b f , b i , b c , b o represents the bias parameter of the neural network; σ and tan h represent the activation function of the neural network; x t represents the input at time step t, c t-1 represents the state of the memory unit at the previous moment, c t Indicates the current state of the memory unit, h t-1 Represents the hidden state at the previous moment.

6. The method for predicting small hydropower generation over the entire time domain based on heuristic deep learning as claimed in claim 5, characterized in that: The particle swarm optimization algorithm includes iteratively updating the speed and position of particles. The speed update formula determines the direction and size of particle movement: v i (t+1)=ω·v i (t)+c1·r1·(pbest i (t)-x i (t)+c2·r2(gbest(t)-x i (t)) x i (t+1)=x i (t)+v i (t+1) Among them, v i (t) represents the velocity of particle i at time i, ω represents the inertia weight, c1 and c2 represent the acceleration coefficients, r1 and r2 represent random values ​​from 0 to 1, and pbest i (t) represents the historical best position of particle i at time i, gbest(t) represents the global best position of the entire particle swarm at time i, and x i (t) the current position of particle i at time i; The particle swarm optimization includes participating in the optimization process of BiLSTM and is divided into two stages. Stage one is model architecture optimization. The particle swarm optimization is used to find the optimal model architecture parameters, including the number of neurons in the hidden layer and the number of LSTM layers, to achieve the best performance on a given data set; the particle swarm optimization searches for different model architectures, trains the models in iterations, and selects the architecture that maximizes fitness; stage two is training hyperparameter optimization. After determining the optimal model architecture, the training hyperparameters of the model are optimized through the particle swarm optimization; in the optimization process, the model architecture parameters include the number of hidden layers and the number of neurons; the model training parameters include the learning rate, batch size, and optimizer.

7. The method for predicting small hydropower generation over the entire time domain based on heuristic deep learning according to claim 6, characterized in that: The use of the optimized BiLSTM model to train the data includes inputting the training set into the BiLSTM model, using the optimized hyperparameters to perform gradient descent optimization, and minimizing the loss function; using the validation set to monitor the model performance during the training process to ensure that the performance of the model on the validation set is optimized, and using the root mean square error to measure the standard deviation between the predicted value and the actual value, reflecting the overall level of the prediction error, which is expressed as: Among them, Y i Indicates the actual value, Represents the predicted value, and N is the total number of samples.

8. A system for predicting small hydropower generation over the entire time domain based on heuristic deep learning according to any one of claims 1 to 7, characterized in that: include: Collection and processing module, model building module, training and optimization module, and evaluation and prediction module; The collection and processing module collects relevant data of small hydropower generation prediction, preprocesses the data and performs data enhancement and feature engineering; The model building module builds a small hydropower generation prediction model based on the BiLSTM framework to capture the time series characteristics in the power generation data; The training optimization module uses a particle swarm optimization algorithm to optimize the structure and training hyperparameters of the BiLSTM model to improve the model prediction performance; The evaluation and prediction module uses the optimized BiLSTM model to train the data, and tests and verifies the small hydropower full-time domain prediction performance of the model through performance evaluation indicators.

9. 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 for predicting small hydropower full-time domain power generation based on heuristic deep learning described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for predicting small hydropower full-time domain power generation based on heuristic deep learning described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Short-term wind power prediction method based on PSO-CNN-BILSTM

    CN116646929A

  • Photovoltaic power generation short-term prediction method and system based on neural network

    CN117556958A

  • BiLSTM network meteorological equipment health degree prediction method based on PSO algorithm

    CN118095554A

  • Bi-LSTM-based short-term power load prediction method

    CN119070276A

  • Power system load data prediction method and system based on deep learning

    CN119182131A