## 3 Machine Learns to Recognize Signals
This layer employs the softmax activation function, which is well-suited for addressing multi-class classification tasks by generating class probabilities that sum to 1. Overall, this DNN model has multiple dense layers with dropout and batch normalization layers in between to increase training stability and decrease overfitting. The model is designed for a classification task, as indicated by the softmax output layer. Every component is essential to achieving both efficient learning from the input data and maintaining generalization to new data. The model is trained using labeled data, where each input signal is associated with a known class. During training, the model fine-tunes its weights through backpropagation to minimize the variance between its predictions and the actual labels. The accuracy of the model can then be verified by evaluating its performance on unseen data (20% of the total data). Based on the learned features, the model can predict the signal's class when new vibration signals are fed in. Figure 6 shows the training and validation results of using the DNN sequential model to recognize different vibration frequencies under various ambient temperatures. The training and validation results are based on the data results presented in Figures 2 and 4. Figure 6a-d shows the training accuracy, training loss, validation accuracy, and validation loss, respectively. It can be found that the results of 0.1 Hz, 0.5 Hz, 1 Hz, 1.5 Hz, and 20 Hz after 2000 epochs are significantly better than the results of 40 Hz, 60 Hz, and 80 Hz after 2000 epochs at four temperatures, namely, 30 \({}^{\circ}\)C, 40 \({}^{\circ}\)C, 50 \({}^{\circ}\)C, and 60 \({}^{\circ}\)C. The validation accuracy of the 0.1 Hz, 0.5 Hz, 1 Hz, 1.5 Hz, and 20 Hz frequencies at different temperatures is 100%, while the validation accuracy of the 40 Hz, 60 Hz, and 80 Hz frequencies at different temperatures is about 92.2%, 87.6%, and 81.7%. This difference is because the 0.1 Hz, 0.5 Hz, 1 Hz, 1.5 Hz, and 20 Hz signals are closer to a sinusoidal waveform, and the 0.1 Hz, 0.5 Hz, 1 Hz, and 1.5 Hz signals have relatively fewer sampling points. Regular and consistent signals tend to be easier for the model to learn and recognize because the regular pattern provides clear features that can be recognized by the model. On the other hand, more complex and irregular signals may introduce a large amount of variability, making it more challenging for the model to accurately recognize and classify them. Furthermore, there are 32 scenarios within eight vibration frequencies and four different ambient temperatures, and the validation accuracy is 89.1%. Figure 7a,b shows the results for 0.1 Hz and 80 Hz vibration frequencies, respectively. Following 1000 epochs, the validation accuracy can reach 95%, respectively. In this scheme, the smallest vibration frequency of 0.1 Hz and the largest vibration frequency of 80 Hz can be recognized under dynamic temperature, which implies that other vibration frequencies can also be recognized successfully. In particular, the validation accuracy of the 80 Hz case is 95.2%, which is higher than the 81.7% validation accuracy result at static temperature. This is due to the fact that the sampling time at dynamic temperatures is longer, and the data points are sufficiently large so that the model can be better trained to have better accuracy.