Photovoltaic power generation power prediction method based on Bi-LSTM

By using Bi-LSTM cyclic neural network model and genetic algorithm to optimize hyperparameters in photovoltaic power prediction, combined with LOF and Seq2Seq models, the shortcomings of the GRU algorithm under feature screening and complex meteorological conditions are solved, and more efficient and accurate photovoltaic power prediction is achieved.

CN120146096APending Publication Date: 2025-06-13SICHUAN UNIV

Patent Information

Application Number
CN202510215085.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The existing photovoltaic power prediction method based on GRU algorithm has problems such as insufficient data feature screening capability, decreased prediction accuracy under complex meteorological conditions, and the inability to effectively extract long sequence and bidirectional dependency characteristics.

Method used

The photovoltaic power prediction method based on Bi-LSTM is adopted, and the Bi-LSTM cyclic neural network model is constructed, and the hyperparameters are optimized in combination with genetic algorithms, and the LOF algorithm is introduced to eliminate outliers and the Seq2Seq model to enhance feature extraction capabilities.

Benefits of technology

It improves the accuracy of photovoltaic power prediction, can capture information in time series data more comprehensively, enhances adaptability to complex meteorological conditions, and improves prediction efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146096A_ABST
    Figure CN120146096A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic power generation power prediction method based on Bi-LSTM, and relates to the technical field of photovoltaic power generation power prediction methods. The method comprises the following steps: constructing a Bi-LSTM recurrent neural network model; historical data of photovoltaic power generation power and related meteorological data are obtained to serve as model data and are aligned into a time sequence; preprocessing the model data and training a Bi-LSTM recurrent neural network model; and optimizing hyper-parameters of the Bi-LSTM recurrent neural network model by using a genetic algorithm to obtain an optimal Bi-LSTM recurrent neural network model to predict photovoltaic power generation power. According to the method, the Bi-LSTM model is utilized, and past and future information in the time sequence data can be captured at the same time, so that the accuracy of photovoltaic power generation power prediction is improved; meanwhile, effective features can be screened and utilized more effectively, the defects that a traditional prediction model is poor in feature screening capacity and prone to noise interference are overcome, and then the prediction precision of the photovoltaic power generation power is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of photovoltaic power prediction methods, and particularly to a photovoltaic power prediction method based on Bi-LSTM. Background Art

[0002] Currently, the main technology for predicting photovoltaic power is data-driven methods, that is, combining historical power generation data and meteorological data to build a prediction model to achieve high-precision power prediction. Generally, a large amount of historical data needs to be collected, and the data is preprocessed, including cleaning, normalization, and feature engineering, to improve data quality, accelerate model training, enhance performance, and improve model prediction accuracy. By selecting a suitable prediction model, the model is trained and optimized using the training set, and finally the performance of the model is evaluated on the test set. When the model reaches the expected accuracy, it can be used for real-time prediction of photovoltaic power, thereby optimizing the operation of the power system.

[0003] In the selection of prediction models, a common method is to use the GRU algorithm (Gated Recurrent Unit). The GRU algorithm is a neural network architecture for processing sequential data, and its core lies in the effective transmission and update of information through the cooperation of update gates and reset gates. In a GRU cell, the update gate is responsible for determining how much information from the previous moment's hidden state is retained at the current moment, while the reset gate controls the influence degree of the previous moment's hidden state on the current moment.

[0004] Specifically, when implemented, first receive the input sequence, and combine it with the previous moment's hidden state, and calculate the current moment's hidden state through the update gate and the reset gate. The update gate fuses the input and the previous moment's state through an activation function to generate an update signal for determining how much historical information to retain; the reset gate generates a reset signal for controlling the contribution of the previous moment's state to the current state. Finally, based on the update signal and the reset signal, calculate the current moment's hidden state for subsequent output or further state update. In photovoltaic power prediction, GRU uses these mechanisms to learn the temporal dependence relationship between meteorological data and power generation power.

[0005] However, for the current photovoltaic power prediction method based on the GRU algorithm, the inventor believes that there are at least the following technical problems:

[0006] (1) GRU has weak ability to screen data features and cannot distinguish effective features from invalid features, which may cause the model to be interfered by noise during training;

[0007] (2) When dealing with complex meteorological conditions or sudden weather changes, the prediction accuracy of GRU may decrease because photovoltaic power is affected by multiple factors coupled, and GRU can only capture the dependence relationship of time series unidirectionally;

[0008] (3) If the data sequence is long or there are complex bidirectional dependencies, GRU may not be able to effectively extract all features, resulting in insufficient prediction accuracy.

[0009] Therefore, how to solve the above technical problems is an urgent technical problem for those skilled in the art at present.

[0010] The information disclosed in this background section is only intended to enhance the overall understanding of the present invention and should not be regarded as an admission or any form of suggestion that this information constitutes prior art already known to those of ordinary skill in the art. Summary of the Invention

[0011] In view of the above technical problems, an embodiment of the present invention provides a photovoltaic power prediction method based on Bi-LSTM to solve the problems raised in the above background art.

[0012] The present invention provides the following technical solutions:

[0013] A photovoltaic power prediction method based on Bi-LSTM includes the following steps:

[0014] Construct a Bi-LSTM recurrent neural network model;

[0015] Obtain historical data of photovoltaic power generation and related meteorological data as model data, and align the model data into a time series;

[0016] Preprocess the model data, and input the preprocessed model data into the Bi-LSTM recurrent neural network model for training;

[0017] Optimize the hyperparameters of the Bi-LSTM recurrent neural network model using a genetic algorithm;

[0018] Predict the photovoltaic power using the optimized Bi-LSTM recurrent neural network model.

[0019] Preferably, the Bi-LSTM recurrent neural network model includes: a bidirectional LSTM layer, a Dropout layer, and a fully connected layer; the Dropout layer is located between the bidirectional LSTM layers, and the fully connected layer is located at the output layer.

[0020] Preferably, in the step of obtaining historical data of photovoltaic power generation and related meteorological data as model data, the meteorological data includes light intensity, temperature, humidity, and wind speed.

[0021] Preferably, in the step of preprocessing the model data, the preprocessing method includes: removing outliers using the Local Outlier Factor algorithm; normalizing the model data; and dividing the preprocessed model data into a training set, a validation set, and a test set.

[0022] Preferably, in the step of inputting the preprocessed model data into the Bi-LSTM recurrent neural network model for training, during the training process, a cross-validation method is used to evaluate the performance of the model, and an early stopping method is used to prevent overfitting.

[0023] Preferably, the steps of optimizing the hyperparameters of the Bi-LSTM recurrent neural network model using a genetic algorithm include:

[0024] Creating an initial population: Randomly generating a set of hyperparameter configurations of the Bi-LSTM recurrent neural network model as the initial population;

[0025] Calculating the fitness of each individual in the population: Using the historical dataset of photovoltaic power generation, training each Bi-LSTM recurrent neural network model hyperparameter configuration, and calculating the fitness of its prediction results;

[0026] Selection: Selecting the better-performing model hyperparameter configurations from the current population according to the fitness scores;

[0027] Crossover: "Crossing" the selected model hyperparameter configurations, that is, exchanging some hyperparameters with each other to generate new hyperparameter configurations;

[0028] Mutation: "Mutating" the newly generated model hyperparameter configurations, that is, randomly changing some hyperparameter values to introduce new genetic diversity and avoid falling into local optima;

[0029] Calculating the fitness of each individual in the population: Retraining the Bi-LSTM recurrent neural network model and calculating the new fitness scores;

[0030] Satisfying the termination condition: Checking whether the termination condition is satisfied, such as reaching the maximum number of iterations, the fitness scores no longer improving significantly, or finding a satisfactory prediction accuracy;

[0031] No: If the termination condition is not satisfied, return to the selection step and continue with the selection, crossover, and mutation operations;

[0032] Yes: If the termination condition is satisfied, continue to the next step;

[0033] Selecting the individual with the highest fitness: Selecting the model hyperparameter configuration with the highest fitness from the current population as the optimal solution;

[0034] End: Output the optimal hyperparameter configuration of the Bi-LSTM recurrent neural network model for photovoltaic power prediction.

[0035] Preferably, in the step of using the historical dataset of photovoltaic power generation to train each hyperparameter configuration of the Bi-LSTM recurrent neural network model and calculate the fitness of its prediction result, the fitness is measured by the mean square error and the mean absolute error.

[0036] Preferably, in the step of outputting the optimal hyperparameter configuration of the Bi-LSTM recurrent neural network model, the optimal hyperparameter configuration of the Bi-LSTM recurrent neural network model includes: the number of hidden units in the first layer is 128, the number of hidden units in the second layer is 128, and the number of hidden units in the decoder is 256; there are two layers of bidirectional LSTM in the encoder part. There is one layer of LSTM in the decoder part; the Dropout ratio is 0.15; the learning rate is 0.001; the batch size is 32; the number of training epochs is 100.

[0037] Preferably, a Seq2Seq model is integrated in the Bi-LSTM recurrent neural network model, and the Seq2Seq model is used to process the input and output sequences; on the basis of the Seq2Seq model, an attention mechanism is introduced to enhance the model's learning ability for key time steps.

[0038] The photovoltaic power prediction method based on Bi-LSTM provided by the embodiment of the present invention has the following beneficial effects: The present invention designs a photovoltaic power prediction method based on the Bi-LSTM algorithm, which can capture both past and future information in time series data, which is more comprehensive than the traditional GRU model that can only capture one-way information, thereby improving the accuracy of photovoltaic power prediction; at the same time, the LOF algorithm is introduced to effectively remove outliers, and the CEEMDAN method is combined for feature extraction, which is more efficient than the traditional feature engineering method; in the photovoltaic power prediction method of the present invention, deep learning and genetic algorithm are also combined for the first time to optimize the model parameter configuration, improving the accuracy and efficiency of the prediction. Description of the Drawings

[0039] Figure 1 It is a flowchart of a photovoltaic power prediction method based on Bi-LSTM in the present invention;

[0040] Figure 2 It is a structure diagram of bidirectional Bi-LSTM in the present invention;

[0041] Figure 3 It is an internal structure diagram of the LSTM unit in the present invention;

[0042] Figure 4 It is a flowchart of the genetic algorithm in the present invention;

[0043] Figure 5 This is the result of predicting the photovoltaic power generation using the Bi-LSTM model combined with the seq2seq model during model training in the present invention;

[0044] Figure 6 This is the relationship diagram between the true value and the predicted value of the test data during model training in the present invention;

[0045] Figure 7 This is the change situation of the training set loss and the validation set loss during model training in the present invention;

[0046] Figure 8 This is the actual prediction result of the photovoltaic power generation in the present invention. Detailed implementation manners

[0047] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of the present invention.

[0048] In response to the problems mentioned in the above background technology, the embodiments of the present invention provide a photovoltaic power generation prediction method based on Bi-LSTM to solve the above technical problems. The technical solutions are as follows:

[0049] Embodiment 1

[0050] Refer to Figures 1-7 ; As an embodiment of the present invention, a photovoltaic power generation prediction method based on Bi-LSTM is provided; the specific steps include:

[0051] 1. Data collection and preprocessing

[0052] (1.1) Data collection: Collect historical data of photovoltaic power generation from photovoltaic power stations and meteorological stations, including light intensity, temperature, humidity, and wind speed, as well as the actual power generation data of photovoltaic power stations. These data are the basis for model training and prediction.

[0053] (1.2) Data preprocessing: Preprocess the collected data to improve the data quality and the training effect of the model. The data preprocessing specifically includes:

[0054] Local Outlier Factor (LOF) algorithm for outlier removal: The LOF algorithm is used to identify and remove outliers in the data. The LOF algorithm identifies outliers by calculating the density difference between data points and their neighboring points, and can effectively identify outlier points that do not conform to the overall pattern of the data set. Outliers can be processed by removal or smoothing and filling.

[0055] Normalization: All the collected data is normalized to make the data have a unified scale. The z-score normalization method is adopted to scale the data into the interval [0,1], improving the stability and convergence speed of model training.

[0056] Data partitioning: The preprocessed data is partitioned into a training set, a validation set, and a test set, usually in the ratio of 70% training set, 15% validation set, and 15% test set. The sliding window method is used to generate sequence samples, and the window length and step size are set to fully capture the temporal dependence of photovoltaic power generation.

[0057] 2. Model construction and training

[0058] (2.1) Model initialization: Initialize the Bi-LSTM network structure, including bidirectional LSTM layers, Dropout layers, and fully connected layers; and set the hyperparameters of the model.

[0059] (2.2) Data input and feature extraction: Input the preprocessed data into the Bi-LSTM network. The Bi-LSTM layer processes the forward and backward information of the time series simultaneously through a bidirectional structure, enhancing the adaptability of the model to complex meteorological conditions and sudden weather changes.

[0060] (2.3) Dropout layer: During training, randomly discard some neurons through the Dropout layer to prevent the model from overfitting and enhance the generalization ability of the model.

[0061] (2.4) Fully connected layer: Map the features output by the Bi-LSTM layer to a high-dimensional space and output the final predicted value of photovoltaic power generation.

[0062] 3. Model construction and training

[0063] (3.1) Construction of the Bi-LSTM model: Bi-LSTM (Bidirectional Long Short-Term Memory Network) is a special type of recurrent neural network (RNN) that processes sequential data by introducing forward and backward LSTM layers. This structure enables Bi-LSTM to capture both past and future information in time series data, thus better understanding and predicting the changing trends of photovoltaic power generation.

[0064] Specifically design a multi-layer Bi-LSTM network structure, where each Bi-LSTM layer consists of multiple LSTM units, and each LSTM unit includes an input gate, a forget gate, and an output gate. These gates control the flow and forgetting of information to solve the problem of gradient disappearance. At the same time, a Dropout layer is added between the Bi-LSTM layers to reduce the overfitting phenomenon.

[0065] Figure 2 As shown, the structure of the bidirectional Bi-LSTM is as follows:

[0066] Input layer (Input layer): X1, X2, ……, Xt at the bottom of the figure represent the data points of the input sequence.

[0067] Forward hidden layer (Forward hidden layer): The input data is first processed through the forward LSTM layer. The input Xt at each time step passes through the forward LSTM unit to generate a forward hidden state.

[0068] Backward hidden layer (Backward hidden layer): The input data is also processed through the backward LSTM layer at the same time. The input sequence of the backward LSTM unit is reversed, that is, from Xt to X1. The input Xt at each time step passes through the backward LSTM unit to generate a backward hidden state.

[0069] Output layer (Output layer): The forward and backward hidden states are merged (usually concatenated) at each time step, and then the final outputs y1, y2, y3, ……, yt are generated through the output layer.

[0070] The advantage of this bidirectional structure is that it can consider the context information of the input sequence at the same time, so as to better capture the dependencies in the sequence.

[0071] Figure 3 As shown, the internal structure of the LSTM unit is as follows:

[0072] Input Gate (InputGate): The input gate determines which information in the current input Xt and the previous hidden state ht-1 needs to be updated to the cell state Ct.

[0073] Forget Gate (ForgetGate): The forget gate determines which information in the cell state Ct-1 needs to be forgotten.

[0074] Cell State Update (CellStateUpdate): The cell state Ct is updated through the combination of the forget gate and the input gate.

[0075] Output Gate (OutputGate): The output gate determines which information in the cell state Ct needs to be output to the hidden state ht.

[0076] Hidden State Update: The hidden state \(h_t\) is updated through a combination of the output gate and the cell state. Tanh is the hyperbolic tangent activation function.

[0077] (3.2) Seq2Seq Model: Considering the time series characteristics of photovoltaic power generation data, the Seq2Seq model is adopted to process the input and output sequences. The Seq2Seq model consists of an encoder and a decoder. The encoder encodes the input sequence into a fixed-length vector, and the decoder then decodes this vector into the output sequence. Based on the Seq2Seq model, the attention mechanism is introduced to enhance the model's learning ability for key time steps. The attention mechanism allows the model to dynamically focus on specific parts of the input sequence during prediction, thereby improving the prediction accuracy.

[0078] (3.3) Model Training and Optimization: The Bi-LSTM model is trained using historical photovoltaic power generation data. During the training process, the cross-validation method is adopted to evaluate the model's performance, and the early stopping method is considered to prevent overfitting. The genetic algorithm is combined to optimize the model parameters to further improve the prediction accuracy. By comparing the performance of different models (such as ARIMA, SVR, RNN, LSTM, etc.) on the same dataset, the superiority of the Bi-LSTM model in the photovoltaic power generation prediction task is demonstrated.

[0079] Figure 4 As shown below, the specific steps of the genetic algorithm in the application of the Bi-LSTM model:

[0080] Start: Initiate the photovoltaic power generation prediction project.

[0081] Create the initial population: Randomly generate a set of parameter configurations of the Bi-LSTM model as the initial population. These parameters may include the learning rate, the number of hidden layer units, the number of layers, the Dropout ratio, etc.

[0082] Calculate the fitness of each individual in the population: Use the historical dataset of photovoltaic power generation to train each Bi-LSTM model parameter configuration and calculate the fitness of its prediction results. Fitness is usually measured by prediction accuracy metrics such as the mean squared error (MSE), the mean absolute error (MAE), etc.

[0083] Selection: According to the fitness scores, select the better-performing model parameter configurations from the current population. The higher the fitness, the greater the probability of being selected.

[0084] Crossover: "Cross" the selected model parameter configurations, that is, exchange some parameters with each other to generate new parameter configurations. This helps to explore new parameter combinations and may result in better model performance.

[0085] Mutation: "Mutate" the newly generated model parameter configurations, that is, randomly change some parameter values to introduce new genetic diversity and avoid getting stuck in local optima.

[0086] Calculate the fitness of each individual in the population: Retrain the Bi-LSTM model and calculate the new fitness scores.

[0087] Meet the termination condition: Check whether the termination condition is met, such as reaching the maximum number of iterations, the fitness score no longer improving significantly, or finding a satisfactory prediction accuracy.

[0088] No: If the termination condition is not met, return to the selection step and continue with the selection, crossover, and mutation operations.

[0089] Yes: If the termination condition is met, proceed to the next step.

[0090] Select the individual with the highest fitness: Select the model parameter configuration with the highest fitness from the current population as the optimal solution.

[0091] End: Output the optimal Bi-LSTM model parameter configuration for photovoltaic power prediction.

[0092] In this way, the genetic algorithm can help us automatically find the optimal parameter configuration when constructing the Bi-LSTM model, thereby improving the accuracy and efficiency of photovoltaic power prediction. This method is particularly suitable for cases where the parameter space is large and manual adjustment is inefficient.

[0093] It should be noted that the initial hyperparameters of the genetic algorithm are set as follows: the population size is 30, the number of generations is 20, the crossover rate is 0.8, and the mutation rate is 0.06; the above initial setting values are adjusted according to the subsequent training effects; at the same time, the fitness function selects the MAE function, and the selection strategy selects the tournament selection strategy.

[0094] The optimal Bi-LSTM model parameter configuration output after optimization using the genetic algorithm specifically includes: the number of hidden units in the first layer is 128, the number of hidden units in the second layer is 128, the number of hidden units in the decoder is 256; there are two layers of bidirectional LSTM in the encoder part. There is one layer of LSTM in the decoder part; the Dropout ratio is 0.15; the learning rate is 0.001; the batch size is 32; the number of training epochs is 100.

[0095] Figure 5As shown, it is the result of predicting the photovoltaic power generation using the Bi-LSTM model combined with the seq2seq model during the model training process; among them, Figure 5 the blue line in represents the true training data; the orange line represents the prediction result of the training set; the green line represents the true test data; the red line represents the prediction result of the test set.

[0096] From Figure 5 it can be seen that the prediction results are very close to the true data at most time points, indicating that the model has a high prediction accuracy on both the training set and the test set.

[0097] Figure 6 As shown, it is the relationship between the true value and the predicted value of the test data; among them, Figure 6 the blue dots in represent the test data, and the red dashed line represents the situation where the true value and the predicted value are exactly the same under ideal conditions (y = x); from Figure 6 it can be seen that most of the points are concentrated near the red dashed line, indicating that the predicted value of the model is very close to the true value and the prediction accuracy is high.

[0098] Figure 7 As shown, it is the change of the training set loss and the validation set loss during the model training process; as the number of training epochs increases, both the training set loss and the validation set loss gradually decrease and tend to be stable, indicating that the model gradually converges during the training process and there is no obvious overfitting phenomenon.

[0099] At the same time, the MAE and RMSE of the model on the training set and the test set are both small; among them, the training set MAE: 0.02; the training set RMSE: 0.04; the test set MAE: 0.02; the test set RMSE: 0.04; these error indicators show that the performance of the model on the training set and the test set is consistent, the prediction error is small, and further verifies the stability and reliability of the model.

[0100] Example Two

[0101] The difference between this example and the first example is that this example provides a verification test for the photovoltaic power generation prediction method based on Bi-LSTM to verify and illustrate the technical effects adopted in this method.

[0102] Select the historical photovoltaic power generation data of a power plant in Sichuan, and use the photovoltaic power generation prediction method based on Bi-LSTM in Example 1 of the present invention for analysis and prediction. As Figure 8 shown, Figure 8 shows the prediction results of the photovoltaic power generation for a complete time period; Figure 8 the blue line in represents the true value, and the orange line represents the predicted value; from Figure 8It can be seen that the predicted values are very close to the true values at most time points, indicating that the model has a high prediction accuracy throughout the prediction period.

[0103] In summary, through the analysis of Embodiment 1 and Embodiment 2, it can be known that the Bi-LSTM model combined with the seq2seq model performs excellently in photovoltaic power prediction, has high prediction accuracy and stability, and can effectively support the power prediction and management of photovoltaic power generation systems.

[0104] Although the specific implementation manners of the present invention have been described above in conjunction with the accompanying drawings, it is not a limitation to the protection scope of the present invention. Those skilled in the art should understand that based on the technical solutions of the present invention, various modifications or deformations that can be made without creative efforts by those skilled in the art are still within the protection scope of the present invention.

Claims

1. A photovoltaic power generation prediction method based on Bi-LSTM, characterized in that: The following steps are involved: Build a Bi-LSTM recurrent neural network model; Obtain historical data of photovoltaic power generation and related meteorological data as model data, and align the model data into a time series; Preprocess the model data and input the preprocessed model data into the Bi-LSTM recurrent neural network model for training; Use genetic algorithm to optimize the hyperparameters of Bi-LSTM recurrent neural network model; The optimized Bi-LSTM recurrent neural network model is used to predict photovoltaic power generation.

2. The photovoltaic power generation prediction method based on Bi-LSTM according to claim 1 is characterized in that: The Bi-LSTM recurrent neural network model includes: a bidirectional LSTM layer, a Dropout layer, and a fully connected layer; the Dropout layer is located between the bidirectional LSTM layers, and the fully connected layer is located in the output layer.

3. The photovoltaic power generation prediction method based on Bi-LSTM according to claim 1 is characterized in that: In the step of obtaining historical data of photovoltaic power generation and related meteorological data as model data, the meteorological data includes light intensity, temperature, humidity and wind speed.

4. The photovoltaic power generation prediction method based on Bi-LSTM according to claim 1 is characterized in that: In the step of preprocessing the model data, the preprocessing method includes: removing outliers using a local outlier factor algorithm; normalizing the model data; and dividing the preprocessed model data into a training set, a validation set, and a test set.

5. The photovoltaic power prediction method based on Bi-LSTM according to claim 1, characterized in that: In the step of inputting the preprocessed model data into the Bi-LSTM recurrent neural network model for training, during the training process, a cross-validation method is used to evaluate the performance of the model, and an early stopping method is used to prevent overfitting.

6. The photovoltaic power generation prediction method based on Bi-LSTM according to claim 1, characterized in that: The step of optimizing the hyperparameters of the Bi-LSTM recurrent neural network model using a genetic algorithm includes: Create an initial population: randomly generate a set of hyperparameter configurations of the Bi-LSTM recurrent neural network model as the initial population; Calculate the fitness of each individual in the population: Use the historical data set of photovoltaic power generation to train each Bi-LSTM recurrent neural network model hyperparameter configuration and calculate the fitness of its prediction results; Selection: Select the model hyperparameter configuration with better performance from the current population based on the fitness score; Crossover: "Cross" the selected model hyperparameter configurations, that is, exchange some hyperparameters with each other to generate new hyperparameter configurations; Mutation: "mutate" the newly generated model hyperparameter configuration, that is, randomly change some hyperparameter values ​​to introduce new genetic diversity and avoid falling into local optimality; Calculate the fitness of each individual in the population: train the Bi-LSTM recurrent neural network model again and calculate the new fitness score; Satisfy termination conditions: Check whether termination conditions are met, such as reaching the maximum number of iterations, the fitness score no longer significantly improving, or finding a satisfactory prediction accuracy; No: If the termination condition is not met, return to the selection step and continue the selection, crossover and mutation operations; Yes: If the termination condition is met, proceed to the next step; Select the individual with the highest fitness: Select the model hyperparameter configuration with the highest fitness from the current population as the optimal solution; End: Output the optimal Bi-LSTM recurrent neural network model hyperparameter configuration for photovoltaic power generation prediction.

7. The photovoltaic power generation prediction method based on Bi-LSTM according to claim 6 is characterized in that: In the step of using the historical data set of photovoltaic power generation to train the hyperparameter configuration of each Bi-LSTM recurrent neural network model and calculating the fitness of its prediction results, the fitness is measured by mean square error and mean absolute error.

8. The photovoltaic power prediction method based on Bi-LSTM according to claim 6 is characterized in that: In the step of outputting the optimal Bi-LSTM recurrent neural network model hyperparameter configuration, the optimal Bi-LSTM recurrent neural network model hyperparameter configuration includes: in the bidirectional LSTM, the number of hidden units in the first layer is 128, the number of hidden units in the second layer is 128, and the number of hidden units in the decoder is 256; the encoder part has two layers of bidirectional LSTM; the decoder part has one layer of LSTM; the Dropout ratio is 0.15; the learning rate is 0.001; the batch size is 32; and the number of training rounds is 100.

9. The photovoltaic power generation prediction method based on Bi-LSTM according to claim 1, characterized in that: The Bi-LSTM recurrent neural network model integrates a Seq2Seq model, which is used to process input and output sequences. Based on the Seq2Seq model, an attention mechanism is introduced to enhance the model's learning ability for key time steps.

Citation Information

Patent Citations

  • Network traffic prediction method, device and equipment based on neural network model

    CN112910690A

  • Comprehensive energy system multi-element load prediction method based on genetic algorithm

    CN118246581A

  • Short-term photovoltaic power generation power prediction method adapting to weather change

    CN119401402A

  • Traffic flow prediction method based on IGA-Bi-LSTM

    CN119479264A

Cited By

  • Time series data prediction system and method

    CN120611152A

  • Photovoltaic power generation prediction method and device based on physical constraint and LSTM network

    CN120822705A

  • Photovoltaic power dynamic prediction system and method based on multi-dimensional meteorological weighting

    CN121543001A