Wind power generation prediction based on the SSA-CNN-BiLSTM neural network model

This research utilized a series of historical wind speed observations and corresponding wind power generation data as training data. Based on the SSA-CNN-BiLSTM neural network model, the paper first preprocessed the historical data to extract relevant features related to wind power generation. Subsequently, a deep learning model based on the integration of Sparrow Search Algorithm, Convolutional Neural Network, and Bidirectional Long Short-Term Memory Network was constructed. This model leveraged the global search optimization capability of SSA and the advantages of CNN-BiLSTM in sequence and image processing. Through experimentation, predictive results were obtained and compared with real data to validate the rationality and accuracy of the algorithm. The experimental outcomes demonstrated a significant improvement in wind power generation prediction using the SSA-CNN-BiLSTM model. This confirmed the superiority of the model in addressing wind power generation prediction tasks and provided valuable references and applications for enhancing the reliability and efficiency of the wind power industry.


Introduction
Wind power generation is a renewable energy source characterized by intermittency, fluctuation, and high randomness.As current technology lacks the capability for large-scale energy storage, it can have an impact on load balancing and power generation in the electricity system.In order to avoid wastage of a significant amount of electricity and to enhance the efficiency of wind power generation, various prediction methods and technologies have emerged in recent years.
Currently, wind power prediction methods can be broadly classified into physical methods and statistical methods.Physical methods involve studying meteorological processes by establishing physical models and combining them with wind power conversion models for prediction.The advantage of physical modeling is that it does not require a large amount of historical data support, but its drawbacks include complexity, computational difficulty, and sensitivity to initial errors caused by initial information [1].
On the other hand, statistical methods rely on complete data and involve the use of appropriate electrical technology, artificial intelligence, and sensor input data, algorithms, and parameters to predict wind power output with relatively high accuracy.Common algorithms include traditional linear or nonlinear regression, time series models, regression analysis models, support vector machines, and artificial neural network models.Among these, the recurrent neural network (RNN) model has a significant advantage in power prediction as it can utilize stored historical information.

Development trends of wind power generation in domestic and international markets
Wind power load forecasting refers to predicting the generation of wind power for a future period, and it is crucial for the planning, operation, and dispatch of wind power generation.Due to the volatility and uncertainty of wind resources, accurate wind power load forecasting is of great significance in ensuring the stable operation of the power grid and maximizing the utilization of renewable energy.
Currently, research on wind power load forecasting encompasses various methods, with datadriven approaches playing an important role, similar to general load forecasting research.These methods utilize historical wind power generation data and data related to external factors such as wind speed, wind direction, and meteorological conditions to train models for predicting future wind power load.[2] Physical model methods, on the other hand, are based on the physical characteristics of wind power fields and the working principles of wind turbines.These methods establish mathematical models to predict wind power load.Although they require more operational parameters of wind power fields and meteorological data [3], they can provide more accurate forecasting results.
Time series methods are widely used in wind power load forecasting.Traditional time series models such as ARIMA (Auto Regressive Integrated Moving Average) and SARIMA (Seasonal ARIMA) are used to capture the seasonal and periodic characteristics of wind power generation.
Machine learning methods are also employed in wind power load forecasting.Algorithms such as Support Vector Machines (SVM), Random Forest, Artificial Neural Networks (ANN), Recurrent Neural Networks (RNN), and Long Short-Term Memory Networks (LSTM) are used to handle the nonlinearity and complexity of wind power generation.
Hafeez Ghulam et [4] al. combined the improved Firefly Algorithm with Support Vector Regression (SVR) to create the FE-SVR-mFFO load forecasting framework.The algorithm improved the accuracy of the SVR model from three aspects: precision enhancement, stability improvement, and increased convergence speed.Wu Jinran et [5] al. discovered that the optimization objective of the power load regression problem is symmetric, leading to overfitting or underfitting issues.They proposed an improved algorithm that includes a linear loss function and insensitive parameters.Tran Thanh Ngoc et [6] al. improved the performance of Support Vector Regression by optimizing the parameter tuning algorithm.Jinxing Che et [7] al. used the Lasso algorithm for feature selection and introduced an adaptive mixed algorithm based on the standard Particle Swarm Optimization.Dai Yeming et [8] al. used the Weighted Grey Relational Projection Algorithm for load forecasting and applied second-order oscillation and Repulsive Particle Swarm Optimization for parameter optimization.
This paper proposes an SSA-optimized CNN-BILSTM recurrent neural network for wind power generation forecasting.LSTM resolves the issues of long-term dependencies, vanishing gradients, and exploding gradients in RNN neural networks, while the bidirectional LSTM allows the prediction results to incorporate both past and future data.Finally, the BILSTM's relevant parameters are optimized using the SSA optimization algorithm, which eliminates the difficulty of manually tuning parameters to find the optimal solution, reduces the randomness and prediction cost of BILSTM, and enhances the accuracy of the network model.
LSTM (Long Short-Term Memory) is a type of recurrent neural network technology that can capture and analyze complex spatio-temporal relationships, thereby better identifying and predicting complex models.Compared to traditional RNN, LSTM has stronger memory capacity and can better handle long-term dependencies.LSTM is designed to overcome issues like gradient vanishing and exploding that occur in traditional RNN, especially when dealing with large amounts of long sequence data.To address these challenges, LSTM incorporates special memory cells and gate mechanisms to effectively control memory and information retention, thereby effectively solving the problem of long-term dependencies.In LSTM, the memory cell plays a crucial role and consists of three parts: the input gate, forget gate, and output gate.[9] Specifically, the memory cell is responsible for storing and updating information, while the gate mechanisms determine the flow of information.The input values are mapped to a range between 0 and 1, which controls the degree of gate opening and closing.Element-wise multiplication is used to multiply the gate's output with relevant information, achieving information filtering.
The forget gate is a special neural network that can effectively control the cell state ct-1 to facilitate information forgetting.Its output ranges from 0 to 1, reflecting the degree of retention of elements in each cell state.Additionally, through the sigmoid function, the forget gate can adjust the weights of each element for effective forgetting.The forget gate formula is: The input gate helps determine which information needs to be stored and how to efficiently add that information, allowing the cell state to change effectively.The output values of the input gate can range from 0 to 1, reflecting the extent to which each piece of information is added to the cell state.The input gate can determine the weights of each element.The input gate formula is: A candidate cell state t is constructed, which preserves the information from xt and ht-1, and then is multiplied by the value of it to determine which memories are useful.The formula for the candidate cell state ct is: The generated new cell state partly comes from the unused old cell state and partly from the useful information selected by the input gate.The formula is: The output gate determines which information should be output and remembered.The formula is: Convolutional Neural Networks (CNN) are deep learning models used for image recognition and computer vision tasks.Their core principles involve convolutional and pooling operations, where multiple layers of convolution and pooling are used to extract image features and perform classification or prediction.The main components of CNN include: Convolutional Layer: Convolution is the core operation in CNNs.In the convolutional layer, a small matrix called a convolutional kernelis slid over the input image, and local regions of the input image are weighted and summed to extract features.Convolution effectively captures local patterns in images, such as edges and textures.The output of the convolutional operation is called a feature map.
Activation Function: After the convolutional layer, an activation function is often applied to the feature map to introduce nonlinearity and enhance the network's expressive power.Common activation functions include Rectified Linear Unit, Sigmoid, and tanh.
Pooling Layer: The pooling operation is used to reduce the spatial size of the feature map, reducing computation and increasing feature invariance.The most common pooling operation is Max Pooling, where the maximum value within a specific region is taken as the output.[10] Pooling helps reduce image details while retaining important features.
Fully Connected Layer: After several convolutional and pooling layers, the feature maps are typically flattened and connected to a fully connected layer, used to map the image features to specific classes or make predictions.
By stacking multiple convolutional layers, activation functions, pooling layers, and fully connected layers, CNNs create a deep neural network that can automatically extract high-level features from images and be used for tasks such as classification, object detection, and image segmentation.
During training, CNNs use the backpropagation algorithm to update weights, minimizing the loss function to optimize the network for better image classification or prediction.Due to CNNs'position and scale invariance properties, they have achieved significant results in image processing, making them a powerful tool in computer vision.

Sparrow search algorithm neural network
The Sparrow Search Algorithm is a heuristic optimization algorithm inspired by the behavior of sparrow populations.It is a population-based intelligence optimization method used to solve complex optimization problems, especially continuous optimization problems.
SSA simulates the foraging behavior of sparrow populations.When sparrows search for food, they find the best food location through observation and communication.These observation and communication processes involve information transmission and feedback, where sparrows exchange experiences and information with nearby sparrows, gradually finding the best food location.
The main steps of the Sparrow Search Algorithm are as follows: [11] (1) Initialization: Randomly generate a group of sparrow individuals and assign each individual a random set of initial solutions.
(2) Evaluation: Evaluate the solutions of each individual based on the optimization objective of the problem and calculate the fitness function value.
(3) Observation and Communication: Sparrow individuals communicate and exchange information to transfer better solutions and experiences.
(4) Update: Update the solutions of each individual based on the observation and communication process, gradually approaching the optimal solution.
(5) Termination Condition: Iterate the observation, communication, and update steps until the preset termination condition is met (e.g., maximum iteration times or meeting accuracy requirements).
The advantages of SSA are its simplicity and ease of implementation, making it suitable for various optimization problems.It does not require excessive parameter settings, has good global search capabilities, and converges quickly.However, SSA also has some limitations, such as the possibility of getting trapped in local optimal solutions, and it may require more iterations to achieve better solutions for high-dimensional complex problems.Therefore, when applying the Sparrow Search Algorithm, parameter adjustment and optimization should be based on the specific characteristics of the problem.

Sparrow algorithm optimized convolutional bidirectional long short-term memory neural network SSA-CNN-BiLSTM combines the Sparrow Search Algorithm and Convolutional Bidirectional Long Short-Term Memory Neural Network. The optimization focuses on:
Global Search Optimization: As part of the optimization algorithm, the Sparrow Search Algorithm (SSA) enables global search to help CNN-BiLSTM find better model parameters and weights in complex optimization spaces.By simulating the foraging behavior of sparrow populations, SSA can find better solutions in the search space, helping CNN-BiLSTM avoid getting stuck in local optimal solutions.
Parameter Adjustment: SSA can adaptively adjust hyperparameters of CNN-BiLSTM, including learning rate, iteration times, and the number of hidden layer neurons, to maximize model performance and convergence speed.This avoids the tedious process of manually adjusting hyperparameters and improves the stability and accuracy of the model.
Feature Extraction Optimization: CNN-BiLSTM uses convolution and bidirectional LSTM layers for feature extraction and sequence modeling.SSA optimizes the parameters of these layers to better capture important features in images and sequence data.This helps improve the model's generalization ability and prediction accuracy.Overfitting Avoidance: SSA-CNN-BiLSTM can avoid overfitting by using the optimization algorithm.Overfitting is a common problem in deep learning, and using SSA optimization can better control the complexity of the model and avoid overfitting on training data.
Parameter Optimization and Computational Process of the Sparrow Search Algorithm (SSA) [12] (1) Set SSA algorithm parameters, including population parameters such as population size, number of iterations, and ratio of explorers.
(2) Initialization: Randomly assign values to the number of iterations, learning rate, number of output filters in the convolutional layer, and the number of hidden nodes in the bidirectional LSTM layer.
(3) Calculate the mean squared error of the corresponding CNN-BiLSTM model for each sparrow's position as the fitness function.
(4) Sort the sparrows based on the fitness function and select the sparrow with the best fitness value for this iteration.
(5) Compare the best fitness value of this iteration with the previously saved best fitness value.If there is an improvement, update the global optimal parameters.( 6) Check if the termination condition is met.If not, update the position of the sparrows using the position update formula and start the next optimization iteration.If yes, end the optimization process.The specific flow of the model calculation is shown in Figure 1.

Computational analysis
Starting from 2022, wind speed and wind power data from a wind farm in Huanggang City were selected for analysis.Specific values were extracted from a certain period at intervals of 15 minutes, and Matlab was used to model the short-term wind power generation.The experimental design involved using 80% of the data for training and the remaining data for simulation in Matlab.The values of three reference parameters, 50, 0.01, and 1000, were adjusted to their optimal states.Based on the performance of the SSA-CNN-LSTM neural network modeling, it is evident that its estimation accuracy is very high, as shown in Figure 4.The performance of the LSTM neural network modeling and the biLSTM neural network modeling can be seen in Figures 2 and 3, respectively.Through experiments, different algorithms were used to evaluate the efficiency of wind power generation.Our experiments showed that compared to LSTM and biLSTM algorithms, the accuracy of the SSA-CNN-LSTM algorithm was significantly improved and could more accurately estimate wind power output.From Figures 2, 3, and 4, it can be observed that the prediction results of the SSA-CNN-BiLSTM model are closer to the actual values during peaks and valleys, indicating that the model's fitting ability is stronger after optimization using the SSA algorithm.The SAA-CNN-LSTM neural network demonstrated excellent accuracy in Figure 2, much lower than the other two algorithms, confirming its superior performance in estimating wind power generation.According to the measurements of the three neural networks in Table 1, the accuracy of SSA-CNN-BiLSTM is significantly better than the other models, with low deviation in accuracy.

Conclusion
This chapter introduced the novel optimization algorithm, the Sparrow Search Algorithm (SSA), and combined it with the artificial intelligence algorithm CNN-BiLSTM, a convolutional neural network with bidirectional long short-term memory.The parameters of the CNN-BiLSTM model were optimized using the SSA.The optimized and non-optimized models were compared and analyzed using engineering data for practical verification.After optimization, the final evaluation index showed a certain improvement, with the SSA-CNN-BILSTM model performing the best, although some errors still exist.The final prediction results showed relatively small errors.Through multiple data validations, the results indicated that the model optimized with the Sparrow Search Algorithm had a high accuracy in load forecasting.
Training Acceleration: SSA-CNN-BiLSTM accelerates the model training process, reducing training time.By leveraging the global search and optimization capabilities of the Sparrow Search Algorithm, it can find better model parameters faster, speeding up model convergence.

Table 1 .
RMSE and MAE of Different Neural Networks.