**3. Results**

The analyses showed a large variety of trends and dependencies on the accuracy of the estimated frequencies and measured rotations. The proposed parametric analysis only relates to the testing dataset of each neural network training process.

Referring to the identification of the presence of damage, the quality of the classification between damaged and undamaged was measured through the misclassification error. Figure 3 plots the confusion matrix for *afreq* = 0.01 Hz and *arot* = 0.1◦. The testing dataset was constituted by 1455 undamaged and 1545 damaged beams, for a total of 3000 structures. In the green cells, the number of true positives (the NN predicts damage on a structure that is really damaged) and true negatives (the NN predicts no damage on a structure that is really undamaged) are reported. The red cells highlight the false positives (the NN predicts damage on a structure that, on the contrary, is undamaged) and false negatives (the NN predicts no damage on a structure that, on the contrary, is damaged). The misclassification error, i.e., the percentage of false values (199) with the respect to the number of tested cases (3000), was 6.63% and is reported in red in the bottom-right cell. The misclassification error was adopted as an indicator of the performance of the capacity of the system to identify whether the beam is damaged.

**Figure 3.** Example of a confusion matrix for *afreq* = 0.01 Hz and *arot* = 0.1◦. Dam and Undam refer to the damaged and undamaged structure, respectively. The percentages in the grey cells can be interpreted as "precision", "specificity", and so forth (check [28] for each single term).

The misclassification error was evaluated for various accuracies of the vibration frequencies and rotations. Figure 4 depicts a contour plot of the error for the considered ranges of variables. Contour lines, which identify an equal amount of error, parallel to one axis denote that the variable represented in the axis does not influence the performance of the classification. That is, for precise rotation measurements or for definite vibration frequencies estimation, the influence of the accuracy of the other data is negligible, as the contour lines are parallel to the X and Y axes, respectively.

**Figure 4.** Misclassification error (in percentage) as a function of the accuracy in the estimation of the vibration frequency and in the measure of the rotation on log-log axes.

Referring to Step 2 and Step 3 simulations, the root-mean-squared error (RMSE) is the parameter that describes the precision in the location of the damage and its magnitude. The RMSE is defined as

$$\text{RMSE} = \frac{1}{N} \Sigma\_{i=1}^{N} \left( O\_i - T\_i \right)^2 \tag{3}$$

where *N* is the number of testing entries (3k for the present case), *T* is the target value, and *O* is the output value from the trained neural network. Figure 5 illustrates the regression plot related to *afreq* = 0.001 Hz

and *arot* = 0.001◦. Each circle corresponds to a couple *(T;O)i*. The dashed red line relates to the perfect fitting, i.e., the output equals the target. The squared error tends to reduce for damage located at the midspan (target).

**Figure 5.** Regression plot related to *afreq*= 0.001 Hz and *arot* = 0.001◦. RMSE: root-mean-squared error.

The same analysis was repeated, varying the accuracy variables in the aforementioned range. As can be seen from Equation (2), the root-mean-squared error for damage location is a quantity with a physical dimension. The parameter related to damage location is in meters, while the parameter related to damage magnitude has the same physical dimension as *d*, i.e., it is dimensionless. Figure 6 reports the values of the errors for damage location and damage magnitude. It can be noted that damage location largely depends on the accuracy in the measure of the rotation of the beam, while it is roughly unaffected by the accuracy in the frequency estimation. The opposite consideration can be drawn for damage magnitude.

**Figure 6.** Root-mean-squared errors for the accuracy of the frequency in the range 0.001 Hz to 1 Hz and the accuracy of the rotation in the range 0.001◦ to 1◦. In (**a**) the root-mean-squared error, in meters, related to damage location is proposed. In (**b**) the root-mean-squared error related to damage magnitude is reported.

It should be mentioned that considering datasets without any errors, i.e., *afreq* = 0 and *arot* = 0, the misclassification error drops to 2%, the root-mean-squared errors related to damage location and magnitude are 0.47 m and 0.001, respectively.

## **4. Discussions and Conclusions**

Tests on a simply supported beam subjected to damage provided interesting insights into the possibility of implementing a hybrid method consisting of numerical simulations and real measurements for monitoring the state of conservation of a structure. Real measures can be, for example, recorded during the motion of a vehicle over the beam.

Referring to the detection of damage, Figure 4 details the relative importance between precision in the estimation of the vibration frequencies and the accuracy in the measured inclinations. In this sense, the performed analyses highlight that the most relevant information is provided by the dynamic properties of the system, i.e., the vibration frequencies if the accuracy in their evaluation is smaller than 5 × 10−<sup>2</sup> Hz, otherwise both static (inclination) and dynamic information are needed.

With reference to the localization of the damage, the precision in the measurements of the inclination of the beam represents the key aspect for the determination of the position of the damage. For accurate measurements (around 1 × 10−<sup>3</sup> degrees), it is expected that the accuracy of the localization is around 6 m, independent from the precision in the evaluation of the vibration frequencies. The accuracy is more or less 30% of the beam length. For more rough measurements, i.e., an accuracy of about 1 × 10−<sup>2</sup> degrees or larger, the expected precision is around 40% of the beam length. This appears to be su fficient for a rough localization of the damage and a good input for other traditional techniques, say material sampling.

Referring to the extent of the damage, the finer the evaluation of the frequencies, the more precise the amount of damage. The accuracy of inclination measurements does not undermine the estimation of the extent of the damage.

Interesting comparisons can be drawn between the results of the present investigation with those of other studies found in the literature. The obtained results are in agreemen<sup>t</sup> with the studies performed by Neves and colleagues [24] on a numerical model of a railway bridge subjected to damage. In their case, they found that the accuracy of the trained classification neural network is very high if the damage extends along the beam for 3.5% of the beam length, roughly similar to the case herein analyzed (5%). The results, although applied to di fferent structures, are similar. The dependency of the results on the dynamic properties is in accordance with Rageh et al. [29], who trained a neural network using a dataset of numerical time series solutions of a damaged bridge structure.

The importance of training the artificial intelligence system with processed data is a key aspect in damaged/undamaged classification. Cury et al. [30] determined an increase of the quality of the classification process by adopting modal data, i.e., processed information rather than raw accelerations. The same results were found in the present analysis: The classification error depicted in Figure 4 shows that the accuracy of the system was sensitive to the precision of the estimated frequencies, which are processed data, rather than to the measured inclinations, which are raw measures. The importance of a full analysis of the influence of sensors precision on the accuracy of the system improved the results of Yan et al. [31], who limited their analysis to 1% and 3% noise relative amplitude.

The possibility of using computational mechanics methods for building datasets for training the artificial intelligence system aims at overcoming the problem of having sets of measures on damaged structures. This point was precisely pointed out by Cheung et al. [21], who showed that the autoregressive algorithm provides precise indication, provided that the system previously experienced damage. In civil engineering structures, this is not possible, since there is no possibility of damaging a structure without causing its destruction. An example of modelling the damage on a recoverable structural element is proposed by Shahsavari et al. [32]. Although interesting and a harbinger of suggestions, their experimental campaign is tailored for the single tested steel element, rather than to

a complete frame structure. Hence, the present approach is a tentative implementation of existing techniques for wider use of artificial intelligence for structural health monitoring.

As highlighted by Salehi and Burgueno [20], the majority of the studies focusing on the use of pattern recognition for SHM serve to detect damage. The localization of the damage and its extent are not possible since information on the evolution of the damage is not known a priori on the structure. This is the result of the fact that the structural behavior is directly dependent on damage location. In this sense, artificial intelligence can play an integrated role with structural numerical modeling.

The novelty of the proposed approach consists in the fact that the dataset that servers for training the learning algorithm comes from numerical analyses, rather than from observations on the structure. A set of damage configurations (location and extent) are modelled and the resulting structural displacements and dynamical properties are used for supervised training, in the present case, of a shallow neural network. In this sense, the use of machine learning can be enlarged to damage location and damage extent. The proposed approach was aimed at overcoming the limitations that emerged in the previous studies. Although theoretical, the approach can be applied for studying structures that are very similar (in construction engineering two structures cannot be identical since there is always human intervention in the construction process). This is the case, for example, of the overpasses of Highway A21 "Torino-Piacenza-Brescia" in the Northwest of Italy. Here, there are several overpasses that are coeval and have the same structural scheme, details, and techniques (Figure 7). The design of such infrastructures was performed by Dott. Ing. Gervaso [33]. The hybrid approach herein proposed fits well with monitoring such types of structures, for which an in-depth preliminary study and a detailed numerical modeling can be performed. The simulated structural dataset can be considered for a large number of similar real structures. Future studies on a real monitored structure are planned, as well as tests on more complex structural types, for example, portal frames.

**Figure 7.** Street view of one of the overpasses of the Italian Highway A21 (source Google Maps).

**Author Contributions:** Conceptualization, B.C. and V.D.B.; methodology, software, validation, formal analysis, writing—original draft preparation, V.D.B.; writing—review and editing, B.C. and V.D.B. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Conflicts of Interest:** The authors declare no conflict of interest.
