# Improving Deep Learning Anomaly Diagnostics with a Physics-Based Simulation Model
## 1 Introduction
From these results, it is possible to use scoring metrics such as the precision and recall of the system, which indicate how well the system is performing in terms of correctly identifying anomalies [13; 14]. This study analyzes in vivo data from an extemporary time interval of a peripheral milling machine's manufacturing operation. In vivo data is defined here as referring to data collected from real-world situations that were not primarily created or modified for the collection of data [2]. This may include data collected from experiments, surveys, or observations of naturally occurring phenomena. The data used in this research consists of normal operation data as well as anomalistic behavior data, yet the exact temporal appearance of the anomaly states and the cause of the recognized quality issues were unknown in the initial situation. The milling spindle of the peripheral milling machine consists of 72 milling blades, which are divided into four blade rows as depicted in Figure 1, with each row containing 18 individual blades per spindle circumference. The spindle rotates in a down-feed direction in reference to the profile-feed direction. Blade Rows 1 and 2 are at a 90-degree angle towards the milled profile whereas rows 0 and 3 are at an 86-degree angle, rendering two surface options for welding. The ranges of the milled-profile height, thickness, and length are depicted in Table 1. \begin{table}
\begin{tabular}{c c c} \hline
**Height (mm)** & **Thickness (mm)** & **Length (mm)** \\
**X–Direction** & **Y–Direction** & **Z–Direction** \\ \hline
70–200 & 5–30 & 600–23,800 \\ \end{tabular}
\end{table} 
Table 1: Milled-profile dimensions. While in operation, the profile is resting on support elements on both sides of the profile, yet only the spindle side of the support element is annotated in Figure 1. The support element consists of a fixed rod and a bearing rotating the support element, which is in perpendicular contact with the milled profile. The last point of contact between the milled material and the support element occurs in the Z-direction at 535 mm before the profile contact with the milling blades. Generally, by designing an appropriate rake angle for milling, the amount of material removed with each pass of the milling blade is optimized, which reduces the friction and frictional stress on the workpiece. Improper rake angle increases energy consumption, accelerates tool wear, and accumulates the risk of failure [15]. [PERSON] and [PERSON] discovered that the amount of electricity consumed is determined by the velocity of the drive and the amount of resistance it meets while in motion [16]. A failure in the profile-support element was discovered in the fault-finding process. The support-element-failure outcome is illustratively visualized in Figure 2. The failure in the support element's bearing induces negative deviation (\(\Delta\beta\)) to the nominal support angle '\(\beta\)', causing profile contact angle decrement (Y\(-\)) towards the lower blade's Row 3. Thus, due to the milling angle change, the torque demand in the motor will increase because the variable frequency drive (VFD) is aiming to maintain the required cutting velocity. This demand leads to increased electrical-energy consumption in the electrical motor running the spindle as the cutting speed decreases. Consequently, achieving the same amount of work demands a higher energy input. The first contribution of this study is to report an anomaly detection process for in vivo data that uses a physics-based simulation model to create a baseline for normal behavior and to distinguish any recognized anomalous behavior into binary classes of normal and failure states. The second contribution is to establish an authentic simulated representation of the machine's normal and anomalous torque behaviors. These simulated behaviors are used to improve the classification capability of the LSTM autoencoder when more descriptive failure information is available for the neural network to learn.