## 3 Deep Learning Architecture and Signal Reconstruction
### Generative Adversarial Network  
More complicated loss functions than discussed previously were utilized in the implementations of the GAN model. The proposed GAN architectures included two possible generator implementations, based on the U-net architectures with the ReLU activation functions. This architecture was chosen due to its better performance over the AE and U-net, with Sigmoid architectures during the tests of the initial models. The discriminator model was a convolutional neural network (CNN) [24] that functioned as a classifier classifying the training example as real or fake based on the provided x, y, and z vibrations, and the  
Figure 3: This diagram illustrates the architecture of a tested U-net model. The rectangles represent various layers, with different colours indicating distinct layer types such as convolutional and concatenation layers. The model processes an input vibration signal of shape (10,000; 3) and produces an output pressure signal of shape (10,000; 1). Figure 2: The diagram showing the idea behind the Autoencoder models used during the experiments, the network takes the (10,000; 3) vibration signal as an input, afterwards the encoder part compresses this signal to a latent representation, which is then passed on to the decoder, which tries to predict the expected output pressure signal. output of the generator model; the output of the discriminator then became a loss function for the generator, forcing the generator to adjust its output so that the discriminator cannot differentiate between real and generated pressure signals. The idea behind utilizing the GAN architecture was to allow the model to discover intricate dependencies to \"fool\" the discriminator, which might not be possible with relatively simplistic loss functions like MSE and MAE [23]. The diagram representing the idea behind the GAN architecture used in the experiments is presented in Figure 4.  
Furthermore, the discriminator model could also be utilized for the detection of anomalies and sensor damage, causing signal distortion. This implicit classification ability is granted by the unique architecture. However, to further enrich the information produced by the loss function in the GAN models, a weighted mean between MAE and the discriminator's output was utilized in one scenario, and the weighted mean between MSE and the discriminator's output was utilized in another version of the model. In such a case, the discriminator's output was multiplied by 0.6, and the MAE/MSE loss was multiplied by 0.4. It is important to note that the training of GAN models takes longer than for the previously mentioned models with a loss based only on the MSE. Additionally, GAN models tend to get stuck in local optima due to the discriminator having a much easier task than the generator. However, methods exist to combat this phenomenon, such as label smoothing [25] or the Wasserstein GAN models [26], though they are not the focus of this work. Table 3 shows the tested models used for the task of recreating the pressure signal of the engine based on the input x, y, z vibration signal. Each model was trained on min-max scaled and standardized data without the post-processing smoothing model. During the experiments, it was observed that the results produced by all the models tested thus far suffered from the problem of producing unexpected spikes in the output where none were expected. However, such produced values seemed to have values lower than the correctly identified spikes by the model. As such, this has led to the idea of creating an additional model that would work on the output of the originally trained model to smooth out and get rid of the noisy and unwanted spikes in the recreated signal. These models will be referred to as \"smoothing models\" (SmNs). A SmN was given as input, the output of an already trained model, which was meant to produce the pressure signal, and  
Figure 4: This diagram illustrates the idea behind the GAN architecture.