## 2 Methods
### Supervised Learning  
To simulate the instrumental and post-process accuracy in real measurements, a white noise was applied to the data recorded in the simulations. It is supposed that the accuracy related to the frequency estimation differs from the accuracy in the measured rotations. In detail, \(a_{freq}\) is the half amplitude of the accuracy applied to each frequency and \(a_{rot}\) is the half amplitude of the accuracy applied to each measured rotation. The modified frequencies and rotations are, respectively,  
\[\begin{array}{lcl}f_{i}\ ^{n}=f_{i}+\text{m}\text{d}(-a_{freq};+a_{freq})&&i=1,2,3 \\ \varphi\ ^{n}=\varphi+\text{m}\text{d}(-a_{rot};+a_{rot})&&i=1,2,3\end{array} \tag{2}\]  
where \(f_{i}\) is a vibration frequency and \(\varphi\)a rotation, \(\text{m}\text{d}(l;u)\) is a random number generator in the range [\(l\); \(u\)].  
The obtained datasets served for the supervised learning of the neural networks (NN). The current investigation involved the training of three different neural networks to solve different problems in damage identification. The number of hidden neurons reflects the size of the input and output dataset [26], avoiding an excessive number of hidden units. The three considered networks were:  
* Step 1: understanding whether the system is damaged or not. To this aim, a two-layers feed forward neural network-based classifier with 10 sigmoid hidden neurons and a softmax output neuron was built. Subset A and Subset B were used to train the neural network. In detail, the datasets were merged and shuffled. A two-variables state vector with values \(\{-1;+1\}\) identifies if the system is undamaged (\(-1\)) or damaged (\(+1\)). The supervised learning consisted in splitting the entire dataset (20k entries) into three groups: 14k served for training, 3k for validation, and 3k for testing. The Levenberg-Marquardt with Bayesian regularization algorithm was adopted to train the neural network [27].  
Figure 1: Sketch of the reference beam structure. The bottom scheme illustrates the discretization. Red nodes refer to the location of the inclinometers; green nodes refer to the location of the load \(P\) in the third simulations subset (Subset C).  
* Step 2: identifying the location of the damage. To this aim, a two-layers feed forward neural network with 16 sigmoid hidden neurons and a linear output network was built. Subset C, only, was used to train the network. In detail, the subset was offset in such a way that the contribution of the imposed strains (due, for example, to thermal effects) was compensated for: The measured rotations when load \(P\) acts are subtracted from the rotations in the unloaded case. The input training dataset consisted of 7k entries, while the output consisted of a vector containing the location of the midpoint of the damaged element. The supervised training was validated and tested with the remaining 3k entries (1.5k for validation and 1.5k for testing). The Levenberg-Marquardt with Bayesian regularization algorithm was adopted to train the neural network.
* Step 3: identifying the magnitude of the damage. To this aim, a neural network similar to the one adopted for Step 2 was built and trained. The offset Subset C was split into three groups and the training consisted of fitting the output, i.e., the magnitude of the damage, with the measured inputs (frequencies and rotations).  
Figure 2 summarizes the subsets and the performed analyses. The shallow neural networks were built and trained in a MATLAB environment adopting the built-in functions. To highlight the effects of the accuracy of the inputs, various half amplitudes, i.e., \(a_{freq}\) and \(a_{rot}\), were tested. In detail, the term related to the vibration frequencies ranged between 0.001 Hz and 1 Hz, while the term related to the measured inclination ranged between 0.001\({}^{\circ}\) and 1\({}^{\circ}\).