# Predictive Maintenance on the Machining Process and Machine Tool
## 5 Case Study
### Remaining Useful Life Assessment  
For an offline prediction of the spindle load, other models were applied. These models were: ARIMA [47], Gradient Boosting (GB) [48], Random Forest (RF) [49], and Recurrent Neural Network (RNN) [50]. With all the regular series identified in the data processing step, a mean series was built. To evaluate the predictive ability of the models, the training set was made of the first part of the series and the test with the last \(p\) values: 10, 20, 30, 40, and 50 values of the series. The ARIMA model was  
Figure 5: Application integrated at the machine showing the Remaining Useful Life (RUL) for the actual working tool. generated with the series itself, while GB, RF, and RNN were developed with the input of the value of the series on each instant \(t\) and the previous \(9\)\(t-1,t-2,\ldots,t-9\), so that 10 values were taken into account for prediction. In all the models, the output of the model was the spindle load of the instances from \(t+1,t+2,\ldots,t+p\). The obtained results are shown in Table 1 and present the MSE of the \(p\) predicted values against the measured ones. Notice that the values were multiplied by \(10^{-3}\). The results were shown to be good, and in Figure 6, the prediction obtained by each model and the real signal (blue) can be seen. This figure was made with 20 test pieces, while all tested values had similar results. It was shown to have good accuracy in the short term, but the strength was lost in the long term, which implied that an extension of the machining process could be done, while an RUL value could only be suggested once the process was near the threshold. On the other hand, the ARIMA, GB, RF, and RNN models we obtained for the mean regular series were applied on each series separately. Some random series were taken for the validation of the models in order to define if the machining process could be extended in time. As long the machine had a preventive maintenance, these methods were demonstrated to enable the tool to increase the number of pieces machined at least by 20 pieces more; this value is determined in Table 1 as the more accurate one. The spindle load of 115 series was studied, and it could be concluded that for 113 of them, the tool's lifetime could be extended. For only two of the series, the threshold was passed, and an earlier maintenance was suggested. In Figure 7, a flowchart representing the main steps applied on this methodology is provided. First, the spindle load acquisition data are presented. These data needed to be discretized before a characterization was applied. This discretization is shown in Figure 7b. The characterization was based on expert knowledge, and each piece's maximum value was extracted. For each tool, a new time series was developed (see Figure 7c). The obtained series were cleaned and smoothed for better prediction, \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Test Pieces** & **ARIMA** & **GB** & **RF** & **RNN** \\ \hline
10 & 3.668 & 3.832 & 4.050 & 4.256 \\
20 & 2.832 & 3.227 & 2.891 & 3.524 \\
30 & 3.166 & 3.833 & 3.325 & 3.885 \\
40 & 3.909 & 3.489 & 3.121 & 3.756 \\
50 & 3.791 & 3.899 & 4.065 & 4.002 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Mean MSE values for each method for each different number of test pieces (multiplied by \(10^{-3}\)). Figure 6: Prediction for the mean series of each regressor. and future value prediction was developed. Figure 7d shows the ARIMA approach of one series, and Figure 7e presents the comparison between all the machine learning methods applied in this work. Since this work provided a customized solution for a real problem in a factory, as far as we know, there are no works from which comparative results to the solution we found could be obtained. Nevertheless, some similarities were found with [42]. These similarities were:  
Figure 7: Flowchart of the main steps of the methodology exposed in this work. * RUL estimation. * Application in a discrete machining process. * Characterization of the signal acquired (Health Indicator (HI)).