# Improving Deep Learning Anomaly Diagnostics with a Physics-Based Simulation Model
## 2 Simulation-Enhanced Anomaly Diagnostics (SEAD) Method  
This section presents the proposed Simulation-Enhanced Anomaly Diagnostics (SEAD) method. Cases suiting the use of the explored method can be considered typical real-life applications in general, where unexpected machine anomaly symptoms are subsequently diagnosed from this process, which in this case is a machined workpiece. As described, the cause of the quality deviations in the milled material was diagnosed to be a malfunction in the support element holding the milled profile in the correct position in the milling event. The recorded timeframe contains six different milling operations, of which three original data sets (DS1...DS3) are presented herein to demonstrate the integral research outcomes.  
The proposed SEAD method with physical modeling and a Long Short-Term Memory autoencoder is depicted in Figure 3. Annotations with arrows in the figure describe the information transferred between different process steps and stages (1-3) of the method.  
In Stage 1, following the visual identification of the root cause of the defect, the end user estimates the timeframe for abnormal behavior in the process. This information is then employed to contextualize the condition-monitoring data from the anticipated time of occurrence. Subsequently, the simulation model is created and utilized to reproduce normal torque levels during machine operation, considering the torque calculations, which are presumably affected by the recognized fault. The simulation model is then applied to detect anomalous torque behavior within other datasets from the specified timeframe. This process facilitates the dynamic placement of anomaly thresholds for the simulated torque variable. The Prior Mean Averaged (PMA) signals are compared and based on the experimented and documented results, the machine-based data is categorized into Real Normal (RN) and Real Anomaly (RA) labels. Finally, the manual-labeling process undergoes validation in Diagnostics validation classification 1 (Class. 1) with the LSTM autoencoder to assess the model's ability to differentiate between the provided RN and RA labels.  
After verifying the classification labeling achieved using the torque threshold in the simulation model, Stage 2 involves a further refinement process. This refinement includes generating Simulated Anomaly (SA) torque data using the Simulink uniform number block, in addition to Simulated Normal (SN) data. The goal is to reproduce torque signals within the normal range and to reproduce signals that surpass the predetermined anomaly threshold limit. Subsequently, the SN data and SA excitation data undergo separate validation through the LSTM autoencoder in the Simulation validation step. This assessment specifically examines the classification capability when the dataset comprises solely simulated torque data (both SN and SA), with the simulation model's input variable data acquired from the Programmable Logic Controller (PLC).  
Figure 2: Profile angle towards the support element under support-element failure.  
During Stage 3, the concatenation of input datasets DS2 and DS3 from previous validation rounds takes place to assess the model's performance utilizing an expanded training dataset. This phase, denoted as Comparative validation, entails the classification of the combined dataset and a subsequent analysis of its impact on the preceding validation results.