# Chaotic Vibration Prediction of a Laminated Composite Cantilever Beam
## 3 RNN Data-Driven Model Establishment
### Architecture of RNN
\begin{array}{c}\frac{\partial L_{loss}^{t}}{\partial W_{X}}=\frac{\partial L _{loss}^{t}}{\partial W_{X}^{(t)}}+\ldots+\frac{\partial L_{loss}^{t}}{ \partial W_{X}^{(t)}}+\frac{\partial L_{loss}^{t}}{\partial W_{X}^{(t)}}+\frac {\partial L_{loss}^{t}}{\partial W_{X}^{(t)}}+\frac{\partial L_{loss}^{t}}{ \partial W_{X}^{(t)}}\\ =\frac{\partial L_{loss}^{t}}{\partial Q_{l}}\frac{\partial Q_{l}}{\partial S _{l}}\frac{\partial S_{l}}{\partial W_{X}^{(t)}}+\sum_{k=1}^{t-1}\frac{ \partial L_{loss}^{t}}{\partial Q_{l}}\frac{\partial Q_{l}}{\partial S_{l}} \left(\prod_{j=k+1}^{t}\frac{\partial S_{j}}{\partial S_{j-1}}\right)\frac{ \partial S_{k}}{\partial W_{X}^{(t)}},\end{array}  \tag{22}\]  
\[ \begin{array}{c}\frac{\partial L_{loss}}{\partial W_{V}}=\sum_{k=1}^{n} \left(\frac{\partial L_{loss}^{t}}{\partial Q_{l}}\frac{\partial Q_{l}}{ \partial S_{l}}\frac{\partial S_{t}}{\partial W_{V}}\right),\end{array}  \tag{23}\]  
where \(\frac{\partial S_{j}}{\partial S_{j-1}}=tanh^{*}\left(W_{X}X_{t}+W_{s}S_{t-1}+ b_{t1}^{*}\right)W_{s}\). \(W_{S}^{(t)}\) represents the weight matrix from hidden state to hidden state at the \(t^{th}\) time step, \(W_{X}^{(t)}\) represents the weight matrix from input to hidden state at the \(t^{th}\) time step, and \(W_{V}^{(t)}\) represents the weight matrix from hidden state to output layer at the \(t^{th}\) time step. (a) Data preparation  
Figure 4: Grid structure for forward propagation of RNN. The data used for time series prediction consists of displacement and velocity data of the vibration at the specified point on the studied laminated composite cantilever beam. To address varying feature scales in the raw data, the raw data are normalized using MinMaxScaler to scale all feature values into the range \([0,\,1]\). A sliding window approach is employed to format the data for supervised learning, using the previous 10 time steps of displacement and velocity as input and the following time step as the prediction target. The data are transformed into a 3D array with dimensions (samples, time steps, features) to meet the input requirements of RNN. The data are then split into training and testing datasets, which account for 60% and 40% of the normalized temporal sequences, respectively. The training set is used to train the RNN model, while the testing set is used to evaluate the RNN model's prediction performance and generalization ability. During model training, the test set is also used to monitor the loss as validation data, but it is not involved in parameter updates. The strict time-based split ensures that the RNN model learns only from past data, thereby preventing overfitting and information leakage issues that may arise when the temporal order is disregarded. (b) Architectures and hyperparameters  
The RNN model architecture consists of an RNN layer with 50 hidden neurons, followed by a fully connected output layer. The RNN layer utilizes the ReLU activation function, and the network is compiled using the Adam optimizer and mean absolute error (MAE) as the loss function. The model is trained for 1000 epochs with a batch size of 128, and the total training time for 1000 epochs was approximately 300 s.  
(c) Model verification  
The trained model is evaluated based on the testing data. Predictions are performed and then inverse-transformed to restore the original data scale. Performance is assessed using root mean square error (RMSE) and MAE, which provide quantitative measures of the model's predictive accuracy.