## 2 Wind Speed Prediction Research Methodology
### Bidirectional Long Short-Term Memory Neural Network  
The classical LSTM neural network transmits information in one direction and skillfully uses historical load data for the prediction; however, the prediction does not consider future information [37]. The BiLSTM model introduces a reverse LSTM layer on top of this, considering both past and future information. Specifically, a BiLSTM neural network is a network model with both forward and reverse LSTM. The forward LSTM layer captures the sequential information from the beginning to the end of the sequence, while the reverse LSTM layer captures the reverse-order information from the end to the beginning of the sequence [38]. This training process builds a prediction model that realizes the double training of the time series and improves the prediction performance. The LSTM neural network structure is shown in Figure 2.  
Figure 2: Structure of LSTM network.  
The LSTM structure includes the input data (\(x_{t}\)), storage cell state (\(C_{t}\)), hidden state (\(h_{t}\)), forgetting gate (\(f_{t}\)), input gate (\(i_{t}\)), and output gate (\(O_{t}\)). The forgetting gate selectively discards weakly relevant information in the timing data, the input gate updates the state of the storage cell, and the output information is determined by the output gate [39]. The execution of the LSTM updating of the internal cell is as follows:  
\[f_{t}=\sigma\Big{(}\omega_{fl}h_{t-1}+\omega_{fx}x_{t}+b_{f}\Big{)} \tag{6}\]  
\[i_{t}=\sigma(\omega_{lh}h_{t-1}+w_{ix}x_{t}+b_{i}) \tag{7}\]  
\[o_{t}=\sigma(\omega_{oh}h_{t-1}+\omega_{ox}x_{t}+b_{o}) \tag{8}\]  
\[s_{t}=tanh(\omega_{ch}h_{t-1}+\omega_{cx}x_{t}+b_{c}) \tag{9}\]  
\[sigmoid(x)=\frac{1}{1+e^{-x}} \tag{10}\]  
\[tanh(x)=\frac{e^{x}-e^{-x}}{e^{x}+e^{-x}} \tag{11}\]  
where \(\omega\) is the weight matrix of the three gates, b is the bias value, \(\sigma\) is the sigmoid activation function, and tanh is used to update the internal cell and the cell output. The associated formula (\(C_{t}\)) for updating the state of the storage cell as well as that for the output (\(h_{t}\)) of the LSTM cell are as follows:  
\[C_{t}=f_{t}C_{t-1}+i_{t}s_{t} \tag{12}\]  
\[h_{t}=o_{t}tanh(C_{t}) \tag{13}\]  
In BiLSTM for wind speed series, the forward LSTM encodes the captured information into hidden states for the subsequent prediction and classification tasks while the backward LSTM learns from the opposite direction and can capture the reverse timing information of the sequence data [40]. In this study, BiLSTM was used to predict wind speeds on wind farms, integrating past and future information to fully capture the time series features in the wind speed series. The model was flexibly adjusted and optimized according to the actual situation to adapt it to the different prediction tasks and data characteristics to ensure the accuracy and reliability of the prediction results. The network structure of the BiLSTM is shown in Figure 3.  
The input data comprise the most relevant extracted feature, while the output is the predicted value. The forward- and backward-propagation processes of the hidden-layer neurons are represented by the following equations:  
\[h_{t}=LSTM(x_{t},h_{t-1}) \tag{14}\]  
\[j_{t}=LSTM(x_{t},j_{t+1}) \tag{15}\]  
Figure 3: Structure of BiLSTM network.  
\[Y_{t}=\omega_{0}h_{f}+b_{0} \tag{16}\]  
where \(h_{t}\) is the neuron node for the forward propagation of the model; \(j_{t}\) is the neuron node for the backward propagation of the model; \(Y_{t}\) is the predicted value of the wind speed; \(h_{f}\) is the output of the fully connected layer; \(\omega_{0}\) is the weight matrix; and \(b_{0}\) is the deviation.