# A Fiber Vibration Signal Recognition Method Based on CNN-CBAM-LSTM
## 5 Experiment and Analysis
### CNN-CBAM-LSTM Model Introduction  
The OFVS recognition flow chart based on CNN-CBAM-LSTM network is shown in Figure 7. The OFVS recognition network model created that utilizes the PyTorch platform is primarily made up of an input layer, a convolutional layer, a CBAM layer, an LSTM layer, and a classification and recognition layer. The details are shown in Figure 8.  
Figure 6: Four kinds of fiber vibration signals after pretreatment: (**a**) flap signal, (**b**) knock signal, (**c**) run signal; (**d**) walk signal.  
Figure 7: CNN-CBAM-LSTM network flow chart.  
The basic process of the network can be described as follows:  
1. The preprocessed one-dimensional OFVS is the input to the convolution layer (k = 1, s = 1), and the signal can be adaptively filtered [25].
2. The signal is inputted into the CBAM module to analyze the weight of the filtered signal, the importance of the network from the two dimensions of channel and space is weighed, and adaptive feature refinement on the input features is performed.
3. The refined features are processed by multiple convolution pooling layers to continue feature extraction and data dimensionality reduction.
4. Then, the features obtained after dimensionality reduction are sent into the LSTM layer, which automatically learns the vibration signal's characteristics.
5. Using the BP algorithm to backpropagate the training error, the model parameters are updated layer by layer;
6. Finally, the identification of OFVSs is completed by classification using the multilayer perceptron (MLP).  
After reviewing the data and optimizing the model after the repeated experimental testing, the parameters of the CNN-CBAM-LSTM model are acquired, as displayed in Table 1.  
After experiments, it is evident that the optimal learning rate of the model is \(10^{-4}\) and it is better when the mini-batch size is 32. Among them, the value of the mini-batch affects the accuracy of the model. If it is too small, the computing resources cannot be used reasonably, and it uses a significant amount of memory if it is too large. The learning rate will affect the parameter update speed of the model. If it is too small, it will slow down the  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Layers** & \multicolumn{4}{c}{**Parameter Settings**} \\ \hline Conv1 & 80,000 \(\times\) 1 & k = 1/s = 1 & 80,000 \(\times\) 80 & ReLU \\ CBAM & & \(\big{\backslash}\) & & \\ Conv2 & 80,000 \(\times\) 80 & k = 80/s = 80 & 1000 \(\times\) 128 & ReLU \\ Maxpool1 & 1000 \(\times\) 128 & k = 2/s = 2 & 500 \(\times\) 128 & \\ Conv3 & 500 \(\times\) 128 & k = 4/s = 2 & 249 \(\times\) 80 & ReLU \\ Maxpool2 & 249 \(\times\) 80 & k = 3/s = 2 & 124 \(\times\) 80 & \\ Conv4 & 124 \(\times\) 80 & k = 4/s = 2 & 61 \(\times\) 80 & ReLU \\ Maxpool3 & 61 \(\times\) 80 & k = 3/s = 2 & 30 \(\times\) 80 & \\ LSTM1 & & (400, 800, num\_layer = 2) & & \\ LSTM2 & & (800, 256, num\_layer = 2) & & \\ FC1 & & (256, 128) & & \\ FC2 & & (128, 4) & & \\ \hline \hline \end{tabular}
\end{table}
Table 1: Network parameter setting.  
Figure 8: One-dimensional CNN-CBAM-LSTM network structure.  
training speed of the model. If it is too large, it will easily cause constant oscillation and affect the accuracy rate.