# Prediction of Power Fluctuations of Gaussian Beams After Transmission Through Turbulent Atmosphere
## 3 Construction of the TSLSTMFCPN  
Predicting laser power fluctuation caused by turbulence is essentially a process of processing time-series data, which utilizes memory mechanisms and prior information to effectively process sequence data of arbitrary length. The most commonly used network architecture for time-series data prediction is the Recurrent Neural Network (RNN), as shown in Figure 5a. The chained structure of RNNs comprises repeating modules, which enables them to retain and utilize prior information. For instance, let \(x_{t}\) represent the input value at time \(t\), and \(h_{t-1}\) be the hidden state obtained after learning from the previous moment. The prediction of \(x_{t+1}\) at the next moment depends on the value of \(h_{t}\) at the current moment. The updating of the previous layer involves multiple arithmetic product operations, which usually leads to gradient vanishing (gradients approaching zero) or gradient explosion (gradients growing exponentially) in the learning process of the RNN. To address this issue, an LSTM (Long Short-Term Memory) architecture was adopted in this study, which is shown in Figure 5b. The fundamental structure of an LSTM unit comprises a forget gate, an input gate, and an output gate. By utilizing these gates to either remove information from or add information to the cell state, it can mitigate the issues of vanishing or exploding gradients that arise in RNNs. An LSTM unit updates six parameters during each iteration, with the specific algorithm detailed as follows:  
Figure 4: Sliding window algorithm diagram. Figure 5: (a) Schematic of RNN chain structure; (b) schematic of LSTM unit structure. Step 1: The forget gate decides what information should be discarded or forgotten by the cell state. This is decided based on the previous hidden state \(\vec{h_{t-1}}\), the current input \(\overrightarrow{x_{t}}\), the learnable weights \(W_{\textit{sf}}\), \(W_{\textit{bf}}\), and the biases \(\overrightarrow{b_{f}}\), as expressed by  
\[\overrightarrow{f_{t}}=\sigma(W_{\textit{x}}\overrightarrow{x_{t}}+W_{ \textit{bf}}\overrightarrow{h_{t-1}}+\overrightarrow{b_{f}}) \tag{2}\]  
The \(\sigma\) curve maps values between 0 and 1, in which 1 represents the prior information being completely retained, and 0 represents the prior information being completely forgotten. \[\sigma(x)=\frac{1}{1+\exp(-x)} \tag{3}\]  
Step 2: The input gate determines what information is to be stored in the cell unit, which involves two main components. The first one utilizes the \(\sigma\) function to decide which data need to be updated, and the second one employs the tanh function to create a temporary cell state \(\overline{C_{t}}\) for the new candidate values. \[\overrightarrow{i_{t}}=\sigma\bigg{(}W_{\textit{xi}}\overrightarrow{x_{t}}+ W_{\textit{ln}}\overrightarrow{h_{t-1}}+\overrightarrow{b_{i}}\bigg{)} \tag{4}\]  
\[\overline{C_{t}}=\tanh(W_{\textit{xc}}\overrightarrow{x_{t}}+W_{\textit{hc }}\overrightarrow{h_{t-1}}+\overrightarrow{b_{c}}) \tag{5}\]  
Once the memories that need to be forgotten and those that need to be added are determined, the old cell state \(\overline{C_{t-1}}\) can be updated to the new cell state \(\overline{C_{t}}\). Step 3: The updated cell state \(\overline{C_{t}}\) is combined with the output gate \(\overrightarrow{o_{t}}\) to calculate the new hidden state. \[\overrightarrow{o_{t}}=\sigma\bigg{(}W_{\textit{ox}}\overrightarrow{x_{t}}+ W_{\textit{ho}}\overrightarrow{h_{t-1}}+\overrightarrow{b_{o}}\bigg{)} \tag{6}\]  
\[\overrightarrow{h_{t}}=\overrightarrow{o_{t}}\otimes\tanh(\overline{C_{t}}) \tag{7}\]  
In Equations (6) and (7), the operator \(\otimes\) represents an element-wise product, \(W_{\textit{ox}}\) and \(W_{\textit{ho}}\) are the weight matrices, and \(\overrightarrow{b_{o}}\) is the bias vector. In order to improve the performance of the entire model, two LSTM layers are stacked and followed by a fully connected layer to output multiple predictions in chronological order.