# Chaotic Vibration Prediction of a Laminated Composite Cantilever Beam
## 3 RNN Data-Driven Model Establishment  
### Architecture of RNN  
RNN is a cyclic structure with excellent learning capabilities [31]. The structure of the RNN model is shown in Figure 2. RNN consists of three components: the input layer, hidden layer, and output layer. Figure 3 shows a schematic of the cyclic and unfolded structures of an RNN: \(X\) is the input; \(U\) is the weight matrix from the input layer to the hidden layer; \(S\) is the hidden state; \(V\) is the weight matrix from the hidden layer to the output layer; \(W\) is the weight matrix from hidden state to hidden state; \(O\) is the output; \(L_{loss}\) is the loss function; and \(y^{real}\) is the real value of data. Unlike DNN and CNN, RNN not only considers the input at the current time step but also considers the hidden state from the previous time step. In traditional neural network models, data flow sequentially from the input layer to the hidden layer and then to the output layer, with no connections between nodes within the same layer. Such structure limits the ability of DNN and CNN to process sequential data effectively. In contrast, the nodes within each layer are interconnected in an RNN, and each hidden layer node passes information to the corresponding node in the same hidden layer in the next time step. This structure enables an RNN to capture temporal dependencies in sequential data. The forward propagation process of an RNN can be seen as calculating the input of each time step in a sequence while passing the hidden state of the previous time step as input to the current time step. Therefore, the current output can be influenced by memorizing the previous information. At each time step, the current input and the state of the previous time step are weighted and summed, and a non-linear transformation is performed through an activation function. The activation function can help the network capture information from the previous time step and pass it to the current time step, thereby helping the network remember the previous state to generate the output for the current time step and a new hidden state for subsequent computations. Figure 3: Schematic of cyclic and unfolded structures of RNN. Figure 2: Structure of RNN. The forward propagation formulas of an RNN are as follows [36], with the grid structure for forward propagation shown in Figure 4:  
\[S_{t}=\tanh\left(W_{X}X_{t}+W_{S}S_{t-1}+b_{t1}^{*}\right), \tag{19}\]  
\[\hat{y}_{t}=softmax\left(W_{V}S_{t}+b_{t2}^{*}\right), \tag{20}\]  
where \(X_{t}\), \(S_{t}\), and \(\hat{y}_{t}\) represent the input, the hidden state that contains recurrent information from the previous time step, and the output at the time step \(t\). \(W_{X}\) represents the weight matrix from input to hidden state, \(W_{S}\) represents the weight matrix from hidden state to hidden state, \(W_{V}\) represents the weight matrix from hidden state to output layer, \(b_{t1}^{*}\) is the bias of the hidden state, \(b_{t2}^{*}\) is the bias of the output layer, and \(softmax\) is the normalized exponential function. To optimize the parameters of an RNN data-driven model, backpropagation through time (BPTT) is applied to update the model parameters using gradient descent based on the difference between the model output and the real label. The gradient descents [43] of the loss function \(L_{loss}^{t}\) related to \(W_{S}\), \(W_{X}\), and \(W_{V}\) are given as follows:  
\[ \begin{array}{c}\frac{\partial L_{loss}^{t}}{\partial W_{S}}=\frac{\partial L _{loss}^{t}}{\partial W_{S}^{(t)}}+\ldots+\frac{\partial L_{loss}^{t}}{ \partial W_{S}^{(t)}}+\frac{\partial L_{loss}^{t}}{\partial W_{S}^{(t)}}+\frac {\partial L_{loss}^{t}}{\partial W_{S}^{(t)}}+\frac{\partial L_{loss}^{t}}{ \partial W_{S}^{(t)}}\frac{\partial L_{loss}^{t}}{\partial W_{S}^{(t)}}\\ \hskip 28.452756 pt+\sum_{k=1}^{t-1}\frac{\partial L_{loss}^{t}}{\partial W_{k} }\frac{\partial Q_{l}}{\partial S_{t}}\left(\prod_{j=k+1}^{t}\frac{\partial S _{j}}{\partial S_{j-1}}\right)\frac{\partial S_{k}}{\partial W_{S}^{(t)}}, \end{array}  \tag{21}\]  
\[