# Out-of-Roundness Wheel Damage Identification in Railway Vehicles Using AutoEncoder Models
## 3 Methodology  
This work proposes an unsupervised learning approach based on three different AE models to investigate their ability to detect and isolate simulated vibration signals from different stages of railway wheel polygonization. These models are trained with a subset of the data to learn the most informative latent representation for each class. When confronted with new data, the models reconstruct a given signal and compare it with its original input. The magnitude of the difference between these two representations, known as reconstruction error, serves as a metric to quantify the dissimilarity between the analyzed signal and each reference class, e.g., \"undamaged wheel\", \"damaged wheel level 1\", etc. As with any unsupervised AutoEncoder model-based approach for SHM, it is essential to first establish a baseline behavior--whether normal or not--by assessing the structure's initial health condition. Once this baseline is defined, the monitoring procedure in our approach operates in an unsupervised manner. As new data are acquired, the Shewhart \(T^{2}\) statistic is evaluated. If its value exceeds a predefined threshold, the new data are considered significantly different from the baseline, indicating a potential change in the structure's behavior. To evaluate the effectiveness of the proposed methodology, the data are divided into three sets: training, validation, and monitoring. Specifically, 70% of the data representing the undamaged structural state are used for training, enabling the AE models to learn to accurately reconstruct the vibration signals associated with this condition. The remaining 30% of the undamaged state data form the validation set, which is used to fine-tune the model's hyperparameters and assess its generalization capability. Finally, the model performance is evaluated using a monitoring set composed of data from two damaged structural states. The \(T^{2}\) statistic is employed as a metric to quantify the distance between the latent representation new set of signals and the distribution learned during training. The model is expected to yield significantly higher \(T^{2}\) values for the monitoring data, indicating the presence of damage in the structure and demonstrating the AutoEncoder's capability to distinguish among different structural states. For all cases analyzed in this study, the simulated dynamic signals are directly used in the time domain as input for the AE models due to its simplicity and effectiveness. Preliminary tests showed that reconstruction errors in the time domain were similar to those in the frequency domain, indicating that both approaches perform equally well. Consequently, using time domain data was preferred, as it eliminates additional transformations, easing the data preprocessing without compromising signal compression and reconstruction accuracy. Furthermore, the time-domain vibration signals are standardized using the \(z\)-score normalization to ensure comparability between different samples and facilitate the mapping performed by AEs. The \(z\)-score transforms the original data into a common scale with zero mean and unit standard deviation, and it is applied before AEs process data. Equation (7) mathematically describes this transformation, where \(\mathbf{z}\) represents the standardized vector, \(\mathbf{x}\) the original vector, \(\mu\) the mean of the data, and \(\sigma\) the standard deviation. \[\mathbf{z}=\frac{\mathbf{x}-\mu}{\sigma} \tag{7}\]  
The hyperparameters for the AutoEncoders--such as the learning rate, the number of layers, and the latent representation dimensions--were optimized using Optuna, a Python library that applies Bayesian optimization [42]. Optuna explores the hyperparameter space through probabilistic methods, guiding its search based on previous results to identify the best configuration for minimizing the loss function. Optimizing hyperparameters in AE models is particularly challenging due to architectural complexity and the nonlinear interaction among parameters.