# Prediction of Process Quality Performance Using Statistical Analysis and Long Short-Term Memory
## 3 Materials and Methods
### Composite Statistical Analysis of PPD
#### 3.2.2 Process Trajectory of Abnormal Detection  
Recall from Section 1 that a machine that produces repetitive and periodic products has process condition variables. Figure 4 shows the values of the process condition variables collected from the machine at times \(t_{1}\) to \(t_{6}\) to produce one product. The polyline created connecting these values is defined as a process trajectory. In particular, as the same product is produced periodically, the process trajectory should have almost similar characteristics. Here, we call the trajectory for a good quality product the process of normal trajectory. In Figure 4, the trajectory of the thick solid line is the process of normal trajectory. Obviously, the process trajectory when defective products are produced will be different from the process of normal trajectory. Finding the problematic trajectory is called the process trajectory of abnormal detection (TAD). TAD has been proposed as a similar concept, which is a useful analysis method in different scenarios, such as abnormal trajectories, abnormal sub trajectories, abnormal road segments, abnormal events, and abnormal moving objects for time series data [28].  
Assume that a process of normal trajectory is given as solid line in Figure 4 during repeated time period, \(t_{1}\), \(t_{2}\), \(t_{3}\), \(t_{4}\), \(t_{5}\) and \(t_{6}\). Clearly, one product will be repeatedly produced during \(t_{6}-t_{1}\) seconds. Three process trajectories for three products are considered to calculate the process trajectory of abnormal detection (PTAD) analysis results, which enables us to understand the moving behaviors of production process conditions in machines. Many studies have proposed TAD techniques involving directions, distance-based approaches, historical similarity-based approaches, and density-based and classification-based approaches [29; 30; 31; 32]. In this paper, we applied the Gaussian normal distribution  
Figure 4: Multiple processes (i.e., normal and abnormal) trajectories for one machine.  
method for our PPD to detect abnormal trajectories in manufacturing process as shown in Equation (5).  
\[\text{PTAD}_{i}=\sum_{t=t1}^{tn}\ f_{g}(x_{t})=\sum_{t=t1}^{tn}\ \frac{1}{\sqrt{2\pi \sigma_{t}}^{2}}e^{\frac{-(x_{t}-zu)^{2}}{2\sigma_{t}^{2}}} \tag{5}\]  
where \(x_{t}\) is the continuous random variable at a time t, \(e\) is the exponent, \(\mu_{t}\) is the mean of the random variable \(x_{t}\) for normal products, and \(\sigma_{t}\) is the standard deviation of random variable \(x_{t}\) for normal products. The parameters \(\mu_{t}\) and \(\sigma_{t}\) signify the centering and spread of the Gaussian curve. From Figure 4, it can also be observed that the density is higher around the mean and decreases rapidly as the distance from the mean increases. This model point distributes around the mean value and spreads to the variance; therefore, it takes two values, mean and variance, to define a Gaussian. In order to know whether a process trajectory is an anomaly, lower and upper threshold values (LT and UT, respectively) are needed. Thus, if the probability of the new data under Gaussian is either higher than UT or lower than LT, it is probably an abnormal process, as it is outside the threshold. In this paper, UT and LT are given as values of Gaussian function with \(x=1.5\times\) USL and \(x=0.5\times\) LSL, respectively, where USL is the upper specification limits and LSL is the lower specification limits.