# Application of Long-Short-Term-Memory Recurrent Neural Networks to Forecast Wind Speed
## 3 Results and Discussion  
In this study, the MATLAB software (R2019b) was used for the training process of the LSTM, which is an advanced architecture for RNN to predict the values of future time steps of a sequence. The sequence regression network was trained to the LSTM sequence, where responses are training sequences with changing values in one time step. That is, for each time step of the input sequence, the LSTM network learns to predict the value of the next time step. In this work, to evaluate the effectiveness and applicability of the proposed model in a comprehensive and systematic manner, two series of data were selected for wind speed for two different seasons due to their different climatic characteristics, which are, respectively, spring (March 2015) and summer (July 2015). Each data series was divided into 1-576 (24 days) as observations and 577-744 (7 days), respectively, as the training and test groups. Training data have been standardized to have zero mean and unit variance at prediction time to prevent training from divergence. The best training parameter to obtain the lowest RMSE is found using an initial learning rate of 0.005. Figures 4 and 5 show the comparison of observed values with predicted values of hourly wind speed series collected in the spring (1-31 March, 2015) and Summer (1-31 July 2015), respectively, for evaluation of the LSTM, which was trained once (the value of the previous prediction) and reused to make a prediction for each time step between predictions which is represented by the Equations (2)-(4). This meaning that no updates are made once the model first fits the training data, and the model in this case is called the fixed model be-cause there are no updates. LSTM network training options was selected for 200 hidden modules. The initial learning rate is 0.005, and the maximum number of iterations is fixed at 250. The gradient threshold is set to 1 to prevent the gradients from exploding. The learning rate is dropped after 125 epochs by multiplying by a factor 0.2.  
In both Figures 6 and 7, the LSTM has been updated with new data for the time series forecasting by using the predicted values and the updated state values from the test set and made available to the model for the forecast on the next time step Specially, the modified LSTM adopted \(\text{C}_{t-1}\) to the input, forget, and output gates. This is because every time the LSTM proceeds, \(\text{C}_{t-1}\) affects the input, forget, and output of the LSTM. All predictions are collected in the test data set and an error score is calculated to summarize the skill of the model. The root mean square error (RMSE) is used because it penalizes large errors  
Figure 3: Description of LSTM cell configuration.  
and results in a score in the same units as the forecasted data, which is wind speed per hour. Here, the predictions are more accurate when updating the network state with the observed values instead of the predicted values. From the results, it is observed that in both series Spring (March 2015) and Summer (July 2015) the value of RMSE dropped by 4.5845 and 4.9392, respectively, when using the LSTM update, and this is due to the different characteristics of each. In this work and based on various previous studies according to different models, it is noted that the accuracy of prediction models differs according to the different characteristics of the information, and therefore, until now, no model has been reached that works with the same accuracy with different information. Table 1 shows the errors for the two data series (July 2015) and (March 2015) in the proposed LSTM model using the RMSE error metrics.  
Figure 4: Wind speed prediction of existing LSTM for Spring (March 2015) data: (**a**) Comparison of observed values and forecast values; (**b**) Error and RMSE value values.  
Figure 5: Wind speed prediction of existing LSTM for Summer (July 2015) data: (**a**) Comparison of observed values and forecast values; (**b**) Error and RMSE value values.