# Fault Detection, Diagnosis, and Prognosis of a Process Operating under Time-Varying Conditions
## 5 Discussion  
Before discussing the results obtained in this research, it is useful to describe once again CVA's dual role in maintenance:  
* The input of a prognosis model, which is used to predict the residual useful life of a machine, thus allowing action before the onset of a fault;
* Real-time fault detection, which is used to monitor a machine continuously, thus allowing identification of any unforeseen faults or, in general, to make up for any inconsistencies and errors in the prognosis model. The effectiveness of CVA in fault detection in a process such as the one considered in this contribution was extensively discussed in a previous contribution [5]. The paper not only made it possible to verify the applicability of CVA in this category of processes, but it also laid the foundations for some important considerations. The most noteworthy consideration is the one referring to the structure of the process itself, which needs some special care to be successfully monitored with CVA. In line with what occurred with fault detection, temporal segmentation of the dataset was used for the prognosis as well, meaning that separate production intervals were considered as separate processes. The machine learning model for the prediction of the residual useful life of the machinery was structured with one model for each sub-interval. As explained in the case study presented, the choice of the algorithm was the result of an iterative process. Firstly, after comparing the different results achievable with the different algorithms, decision trees were considered as the most appropriate choice. Subsequently, to define the specific parameters of the regression algorithm, an optimization process was chosen. The last step, based on the results of the optimization process, was to apply the regression algorithms again to the five sub-intervals to validate their effectiveness and extrapolate the results. The results obtained, presented at the end of the case study, show promise of an improved performance. As expected, not all the analyzed intervals reached the same accuracy of forecast. It is also interesting to note that there was no consistency between the results achieved for fault detection and those achieved for the prognosis. To be clearer, the interval in which the best results were obtained for fault detection, for example, did not coincide with the interval in which the best results were obtained for the prognosis. Figure 7: Prediction trend for interval C, without CVA optimization. Furthermore, from the figures, it was noted that the obtained value could be further increased by making a few adjustments. Firstly, the trends showed that by increasing the forecast window, errors were reduced. Consequently, it is possible to state that with a well-managed condition-based and predictive maintenance policy that extends the life expectancy intervals, the results achievable with the presented model are undoubtedly better than those obtained overall. This result is consistent with a failure anticipation policy, rather than with a failure management policy. Forecasting the residual useful life of the machinery with little advance notice does not allow for the ability to implement precautionary maintenance interventions but only ensures better preparedness for its outbreak and its management. Conversely, the management of short time and unexpected events is left to fault detection models based on CVA, which ensures the real-time monitoring of the model. Moreover, the model tended to underestimate rather than overestimate the residual useful life of the machinery, thus allowing anticipation of maintenance operations. It is possible to avoid situations in which the overestimation of the residual useful life makes it necessary to resort to emergency maintenance operations identified through real-time monitoring. The underestimation of the residual useful life leads to a more cautious maintenance approach, thus remaining consistent with the desire for early intervention on machinery.