# A Fiber Vibration Signal Recognition Method Based on CNN-CBAM-LSTM
## 5 Experiment and Analysis
### Experimental Results and Analysis  
The data set is partitioned using the above method, and the model learning rate is \(10^{-4}\), the mini-batch parameter is 32, and the iteration cycle is 64. The loss and accuracy of the model obtained by the experiment are shown in Figure 9.  
Figure 9a illustrates that when the number of zones increases, the training loss gradually decreases below 0.05, and the test loss function drops below 0.15. As the loss value decreases, the accuracy gradually increases. Combining the two figures, the model has no overfitting phenomenon. After the 35 th iteration, the network gradually converges and the accuracy tends to be stable, and the test accuracy reaches about 97.5%.  
Randomly chosen test samples made up 20% of the entire data set, and repeated experiments were conducted to verify the classification effect of the CNN-ABAM-LSTM model. Figure 10 shows the generated confusion matrix. As the image illustrates, the accuracy rate of flapping signal test sample recognition is 96.43%. The recognition accuracy of running signals was relatively low at 95.59%, and the probability of misidentifying the signals as flapping and knocking signals was 2.94% and 1.47%. In addition, the model has a high recognition accuracy rate for tapping and walking signals, which can reach more than 99%. It can be observed that this model can effectively classify four kinds of OFVS.  
Figure 9: Loss curve and accuracy curve: (**a**) loss curve, (**b**) accuracy curve.  
For a more intuitive understanding of the model's performance, three indicators of precision, recall and specificity were calculated, as shown in Table 2. Precision measures the likelihood that the positive samples are actually positive when anticipated to be positive, recall measures the likelihood of a prediction being accurate among all real positive samples, and specificity reflects the probability that the prediction is actually negative in all the samples that are actually negative. From the table, it is clear that the accuracy and specificity of flapping and knocking signals are low, and the model is prone to misjudging other signals as these two types of signals; the recall rate of running signals is low, and it is easily predicted as other signals; the prediction of walking signals is more accurate.  
To comprehend the model's performance, OFVS recognition was carried out by methods such as variational modal decomposition (VMD) [32], AF-CNN, CNN-LSTM, and CNN-CBAM-LSTM. The research process uses the same data set, the input is the original one-dimensional OFVS, the learning rate parameter adopted by the deep learning model is \(10^{-4}\), and the mini-batch parameter is 32, the iteration period is 64, and the average is calculated ten times. Among them, the recognition accuracy of OFVSs in each experiment can be calculated according to Equation (10).  
\[\text{P}_{\text{acc}}=\frac{\text{TP}}{\text{N}}\times 100\% \tag{10}\]  
In the formula, TP represents the number of samples whose predicted label is the same as the actual label. N is the total number of samples. The experimental results are shown in Table 3.  
\begin{table}
\begin{tabular}{c c c c} \hline  & **Precision** & **Recall** & **Specificity** \\ \hline Flap & 0.964 & 0.964 & 0.989 \\ knock & 0.951 & 1.0 & 0.984 \\ Walk & 1.0 & 1.0 & 1.0 \\ Run & 1.0 & 0.956 & 1.0 \\ \hline \end{tabular}
\end{table}
Table 2: Performance evaluation form.  
Figure 10: Confusion matrix.  
As may be observed, the average accuracy of the CNN-CBAM-LSTM model can reach 97.9%, which is superior than VMD and the other two models. Among them, the recognition rate of the tapping signal is higher than the other three methods, while the recognition rate of the running signal is lower than the other two deep learning models. The CNN-CBAM-LSTM approach of OFVS identification that is suggested in this research may successfully identify four signal kinds, according to the experiments.