Wind Farm Energy Storage System Based on Cat Swarm Optimization–Backpropagation Neural Network Wind Power Prediction

To solve the instability problem of wind turbine power output, the wind power was predicted, and a wind power prediction algorithm optimized by the backpropagation neural network based on the CSO (cat swarm optimization) algorithm was studied, and a wind farm energy storage system model was built on this basis. By collecting the wind power plant’s historical wind speed, power, and other parameters, the short-term wind farm output power was predicted, and the operation of the wind farm energy storage system was controlled to suppress the output power of the wind farm when the wind farm was connected to the grid so as to improve the stability of the output power of the wind farm. At the same time, typical wind farm data were taken as an example to verify the feasibility of the proposed method.


INTRODUCTION
With the continuous improvement of the wind power technology, wind energy has become the most important part of all kinds of new energy. Because wind power itself has strong randomness, the output power is unstable, which will affect the safety of the power grid. Therefore, research on wind power prediction is the key to ensure the safety of the power grid and improve the efficiency of wind farms Sun et al., 2021).
In the literature (Fan et al., 2020), the method of adding NWP (numerical weather prediction) data into historical power data and combining the BP neural network to predict the ultra-shortterm wind power can improve the accuracy of the predicted value. The literature (Wang, 2013) optimized the BP network with a genetic algorithm. Compared with the single BP neural network, the corresponding network weights and thresholds can be better found, and the optimized BP neural network is more accurate in prediction. However, the genetic algorithm itself has some shortcomings; the training speed of BP will be slow after optimization by the genetic algorithm. In the literature (Fang, 2011), the random time series method was used to predict the short-term wind power, and the autoregressive-integrated moving average model was constructed. On this basis, the accuracy of the model was improved through particle swarm optimization and genetic algorithm optimization. In reference (Zhang et al., 2020), the CSO algorithm was combined with the ant colony algorithm aiming at the problem of the slow fusion speed of the traditional ant colony algorithm. The problem of slow convergence of the single ant colony algorithm is solved successfully, and the possibility of the algorithm falling into local optima is avoided. In the literature (Yang et al., 2017), two search modes of the CSO algorithm are used to solve the TSP problem. When the SIZE of TSP is small, the CSO algorithm can converge to the optimal range. When the size of TSP is large, the solutions of the CSO algorithm are also convergent, and good results can be achieved. According to the literature (Zhang and Mao, 2019), the energy storage system has the characteristics of accurately tracking the system regulation command and quickly responding to the change of the system frequency. The energy storage system participates in the frequency regulation of the power system, which can effectively suppress the fluctuation of the power output.
In view of some problems existing in the BP neural network, this study proposes a method to optimize a single BP neural network by using the CSO algorithm. The BP neural network is optimized by the CSO algorithm's strong searching ability so that the optimized BP neural network converges faster; the prediction results are more accurate, and it is not easy to fall into local optimal problems.

CSO Optimization Algorithm
From a biological point of view, there are 32 kinds of animals that can be classified as felidae, including cats, tigers, lions, and other animals. Although they live in different conditions, the habits of each felidae are very similar. Cats are very vigilant, even when they are at rest; they will maintain a relatively high vigilance and can respond to their surroundings in a timely   manner. As long as a target is found, they will track and then quickly capture it. The CSO algorithm is based on the cat's instinct of tracking and searching. The cat is an optimal solution to the problem. It can be divided into two forms: one is the situation of the cat when tracking the prey. The CSO algorithm in this mode is called the tracking mode, and the other mode is that the cat keeps alert to the surrounding at rest, which is called the search mode (Gao et al., 2021;Zou et al., 2021;Zhang, 2019;Ma and Shi, 2014;Yang et al., 2019;Ao et al., 2015).
The steps of the search mode can be divided into rest, view, and search. These steps are used to simulate the current situation of the cat. Accordingly, several basic concepts are defined,  (1) j copies of the current location are added in the memory pool, j SMP, that is, the size of the memory pool is i; If the value of SPC is true, set j (SMP − 1), and the current position is reserved as the candidate solution.
(2) All individuals in the memory pool are randomly added or subtracted by SRD% by the CDC value. Then, the individual copy after calculation is used to replace the previous copy. (3) The fitness of each candidate solution in the memory pool is calculated separately. (4) The candidate solution with the highest fitness is used to replace the current location of the cat to complete the update.
The tracking mode is to simulate the situation of the cat tracking the prey. It is to change the eigenvalue of the cat's speed to complete the update of the cat's location, particularly by adding a random interference to complete the speed change.
(1) Speed update. The current optimal solution X best is recorded by the best place that the cats have passed. The speed of each cat is expressed by V i {V i1 , V i2 , . . . , V it }, and each cat updates its own speed according to Formula 1.
is the velocity of the ith cat in the d dimension after updating, and M is the dimension; X best,d (t) indicates the current position of the cat with the best fitness value in the cat group; x i,d (t) refers to the position of the current ith cat in the d dimension. c is a constant, and its value depends on different problems. r is a random value between [0,1].
(2) Analysis is conducted to confirm whether the characteristic values of the velocity change are all within SRD. Then, a limited area is added to every speed change to prevent the algorithm from being in a state of blind search. SRD should be determined before the implementation of the algorithm. If the speed changes beyond the SRD limit area, it will be defined as the boundary value. (3) Location update. According to Formula 2, the cat position is updated by using the updated speed.
Hence, x i (t + 1) is the updated position of the ith cat.

Optimization of the BP Neural Network Process by the CSO Algorithm
Due to some characteristics of the neural network, it is very important to set weights in the learning stage. Different weights will bring different results. At the same time, it is difficult to calculate the best solution under some interference. Therefore, the optimization BP neural network should be carried out from three aspects, that is, the threshold value of each layer of neurons and the weight value, the learning parameters set by the hidden layer, and the structure of the neural network. With the characteristics of the strong optimization ability of the CSO algorithm, the threshold and weight of the neural network are optimized to find the optimal solution in this study. Finally, the

CSO Optimization Algorithm
The structure of the BP neural network optimized by the CSO algorithm consists of three layers of input signal, one layer of output signal, and eight layers of hidden layer. Wind speed, temperature, and pressure are the input data of the network, and the wind power is the output data of the network. The input data of the network are transformed into output data after successively passing through the input layer, hidden layer, and output layer, as shown in Figure 3.

WIND POWER PREDICTION SIMULATION
To construct the BP neural network and set network parameters, it is necessary to determine the hidden layer function, the number of neurons, the learning rate, the output layer function, etc. In MATLAB, the newff function is used to construct the whole neural network. The puerlin function is used as the output layer function; Learngdm is used as a learning function; Trainlm function is used as the training function. The hidden layer function chooses the tansig function.
After data collection, the BP neural network model is established by Malta for prediction. The structure of the BP neural network has four inputs and one output. Temperature, atmospheric, air density, and wind speed are considered as the input, and the wind power is considered as the output The basic idea of the model is to collect samples every 5 min; 200 groups of data are taken as the input of the training set, and output 50 wind speed and wind power data are taken as the output of the training set to train the neural network so as to predict the future short term of wind power and carry out multiple simulations at the same time.
Wind speed data and wind power data of a wind farm in 2012 are sampled every 5 min, as shown in Table 1.
The BP neural network is used to train the data, and the number of iterations is set to 1,000. When the training error of an iteration is less than the threshold, the iteration stops. If the number of iteration reaches 1,000 but the training error is not less than the threshold, the iteration will also stop. The learning rate is set to 0.01, which reflects the learning efficiency of the whole program, and the target accuracy is set to 0.001; once the training accuracy is less than this value, the training will stop. The BP neural network simulation training diagram is shown in Figure 4, and the CSO algorithm BP neural network simulation training diagram is shown in Figure 5.
The comparison between Figures 5, 6 shows that the iteration times of the BP neural network after CSO are reduced from 9 times to 7 times.
In order to more intuitively reflect the difference between the actual wind power output value and the predicted power output value, the mean square deviation is introduced: ( 3 ) Here, N is the total number of all samples; obs t is the expected value of group t data; pre t is the predicted value of group t data. The smaller the mean square deviation, the higher is the accuracy of the whole prediction result. The comparison of BP neural network training is shown in Figure 6. The red line segment in the figure represents the training status of the network, and the training error of the network is 0.040409. Figure 7. It can be seen from Figure 7 that the training error of the BP neural network after CSO is reduced from 0.040409 to 0.0035499. It is obviously concluded that the training effect of the BP neural network after CSO is better.

Comparison of CSO optimized BP neural network training is shown in
The comparison diagram of BP neural network prediction is shown in Figure 8. The figure shows the actual output value of   wind power and the predicted output value of the program. The star points on the red line segment represent the actual wind power output, and the circle points on the blue line segment represent the predicted output of the program.
According to Formula 3, the mean square error of the BP neural network is 0.085951. It can be seen that the prediction result of wind power without optimization basically corresponds to the actual output trend of the wind power, but the convergence speed is slow and the fluctuation range is high, and there is a large deviation from the actual wind power. Figure 9 is the comparison diagram of CSO BP neural network prediction. It can be seen from the figure that the prediction results after CSO are more accurate and more stable and reliable than the BP neural network prediction before optimization. The optimized mean square error is reduced from 0.085951 to 0.0063812, which greatly improves the prediction accuracy of the program.
By comparing Figures 8, 9, it can be seen that the BP neural network optimized by CSO can eliminate certain randomness, which not only improves the training effect of the network but also makes the prediction result more accurate. In the same environment, it can play a role in predicting the wind power and enhance the operation stability of the wind farm.
The CSO BP neural network error comparison is shown in Figures 10, 11. Figure 10 represents the error convergence of the BP neural network optimized by the CSO algorithm, and Figure 11 represents the error convergence of the BP neural network optimized by the CSO algorithm. It can be seen from Figure 10 that when the accuracy of the BP neural network algorithm without algorithm optimization reaches the set value, it iterates nine times. In the early stage, the error approximation speed is fast, but as the error value approaches the target value, the speed gradually slows down. It can be seen from Figure 11 that when the precision of the BP neural network algorithm optimized by the CSO algorithm reaches the set value, it iterates twice. The error approximation speed in the early stage is similar to that before the improvement, but the approximation speed is gradually accelerated as the error value approaches the target value.
Under the condition of setting the same precision, the BP neural network algorithm not optimized by the CSO algorithm needs nine iterations to reach the set accuracy, while the BP neural network error algorithm optimized by the CSO algorithm only needs seven iterations to reach the set accuracy. It can be concluded that CSO algorithm optimization can improve the convergence speed of the BP neural network.

WIND FARM ENERGY STORAGE SYSTEM BASED ON WIND POWER PREDICTION Selection of Wind Farm Energy Storage Technology
Energy storage system (ESS) has the characteristics of dynamic energy absorption and timely release, which can effectively compensate for the intermittency and fluctuation of wind power, improve the controllability of the wind farm output power, and enhance the stability level. In the wind power grid connected system, various energy storage technologies are often needed to improve the stability and economy of the system power supply. At present, the commonly used energy storage technologies mainly include mechanical energy storage, chemical energy storage, and electromagnetic energy storage. Chemical energy storage is the battery energy storage, which has the advantage of the high energy storage density. It is most appropriate to use in wind farm energy storage. This design uses the lithium battery energy storage in chemical energy storage.
Since the wind power prediction system in this study gives the average power of 200 min, the prediction error increases with the increase of the predicted lead time. When the wind speed is high and the power output of the wind turbine is large, the energy storage system temporarily stores the excess power of the wind turbine in the energy storage system to reduce the peak voltage of the system. When the wind speed is low and there is no wind turbine failure and shutdown, the power output of wind turbines is insufficient or the grid load increases; the energy storage system releases the stored energy and converts it into electric energy to make up for the electricity needs of the grid and maintain the stability of the transmission power of the grid. (Tan, 2013;Wu and Jiang, 2014).

Simulation Modeling of the Wind Farm Energy Storage System
The wind farm is composed of 8 0.15 mV DFIG. The gridconnected voltage at the outlet is 575 V, and the dc side voltage is 1,380 V. The voltage increases to 25 KV through the booster transformer and then increases to the infinite power grid through the 30 km transmission line; see Figure 12. The gridconnected model was built based on the MATLAB/Simulink simulation tool, and the wind power generation model was built and packaged according to the aforementioned control strategy. The encapsulated double-fed wind turbine system model is at the far right of Figure 12.
The structure of the encapsulated lithium battery energy storage system model is shown in Figure 13. The battery pack consists of 400 single lithium batteries with a rated voltage of 1,280 V, an initial SOC of 80%, a rated capacity of 200 Am, a maximum output capacity of 1.5 MW converter, and a filter capacity of 10 K var. Based on the need for simulating and observing SOC changes, the battery pack capacity is small. In this model, the energy storage system can charge and discharge according to the given power deficiency value and suppress the power fluctuation of an ac bus.
According to the above model, the wind farm power deficit change curve and wind farm power output change curve can be simulated, as shown in Figures 14, 15. The graph shows the difference between the wind farm output power and rated power.
It can be seen from Figures 14, 15 that the energy storage system can quickly respond to wind speed changes so that the wind farm's missing power curve and the wind farm's output power curve are very smooth and controlled within a certain fluctuation range, which fully conforms to the expected results and can achieve the purpose of suppressing wind power fluctuations.

CONCLUDING REMARKS
Accurate wind power prediction is the key problem for the normal operation of the wind power generation system. Due to some characteristics of the BP neural network itself, the prediction accuracy is not high, and the CSO algorithm has the advantage of strong optimization ability, so the combination of the CSO algorithm and BP neural network finally obtained the improved BP neural network algorithm by CSO. Through a series of simulation experiments, the improved CSO-BP algorithm is more accurate than the single BP neural network algorithm and can effectively improve the accuracy of wind farm power prediction. The wind farm energy storage system designed on this basis can control the output of the energy storage system in advance and adjust the output power of the wind farm when it is connected to the grid through the predicted output power of the wind farm, providing a reliable solution to the problem of unstable power generation of wind farms.

DATA AVAILABILITY STATEMENT
The raw data supporting the conclusion of this article will be made available by the authors, without undue reservation.

AUTHOR CONTRIBUTIONS
Work concept or design, SL; data collection, LW; draft manuscript, HJ; make important modifications to the manuscript, YL; approve the final manuscript to be published, HY.