# A Comparison of Deep Learning Algorithms for Anomaly Detection in Discrete Mechanical Systems
## 6 Conclusions  
The accuracy in detecting structural damage is investigated for two different machine learning algorithms: a physics-informed convolutional autoencoder (PINN-CAE) and a purely data-driven convolutional autoencoder (DD-CAE). In particular, raw data from experiments on a four-storey building were fed to the autoencoder, whose structure was the same in both strategies. The MAE error of reconstruction is taken as an indicator to detect anomalous records. Both the PINN-CAE and the DD-CAE outperformed conventional vibration-based methods in the capability of detecting damage and finding its location. Indeed, they are able to detect all the anomalous time histories, showing good precision in the detection of structural change locations. The physics-informed network was more precise in the detection of the damage location compared to the data-driven one, with a significant increase in the accuracy for a lower damage extent. However, as shown in Table 5, it is possible to observe that the higher the damage percentage, the higher the possibility of correctly locating the damage. With the hybrid approach, it is possible to continuously monitor the structure and to identify accumulated damage, i.e., damage that increases over time, in advance and with a better accuracy with respect to traditional NNs. This confirms the high potential of combining a data-driven architecture and information about the physical characteristics of the system under study. Future developments of this work will include changes in the mass of the system and the use of the model together with NNs for detecting anomalies in more complex structures, such as bridges or viaducts. In particular, when dealing with these types of structures, an analytical representation of the system is difficult to construct, but a numerical model based on simulation methods  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Damage** & \multicolumn{2}{c}{**Accuracy \(\mathcal{A}\)**} \\
**Percentage** & **DD-CAE** & **PINN-CAE** \\ \hline \(-10\%\) & 33.19\% & 79.43\% \\ \(-20\%\) & 40.20\% & 82.81\% \\ \(-30\%\) & 52.24\% & 87.22\% \\ \(-40\%\) & 65.11\% & 92.03\% \\ \(-50\%\) & 84.61\% & 100\% \\ \(-60\%\) & 100\% & 100\% \\ \hline \hline \end{tabular}
\end{table}
Table 5: Anomaly detection rates as a function of the damage percentage for both PINN-CAE and DD-CAE.  
(such as finite element methods) can be adopted. The extension of this work by considering a numerical model of a more complex system will be developed in the future by the authors.  
Conceptualization, F.M.B., L.R., S.C. and G.B.; methodology, F.M.B. and L.R.; software, F.M.B. and G.B.; validation, F.M.B., L.R. and G.B.; formal analysis, L.R.; investigation, F.M.B. and G.B.; resources, F.M.B. and L.R.; data curation, G.B.; writing--original draft preparation, F.M.B., L.R. and G.B.; writing--review and editing, F.M.B., L.R., G.B. and S.C.; visualization, F.M.B. and G.B.; supervision, S.C.; project administration, S.C.; funding acquisition, S.C. All authors have read and agreed to the published version of the manuscript.  
This research received no external funding.  
Not applicable.  
Data Availability Statement: Data are unavailable due to privacy.  
The authors declare no conflict of interest.