# A Real-Time Novelty Recognition Framework Based on Machine Learning for Fault Detection
## 4 Proof of Concept--Digital Model
### Simulations
When the error in a window crosses the lowest bound, the related predictor is triggered; hence, a prediction is performed every time the obtained error is higher than the lowest bound. Each predictor computes when the error will reach the highest bound using the Linear Regressor explained in the previous paragraph. If the error keeps rising, the predictions will accordingly fit even better. According to Figure 13(a), this window crosses the lowest bound 20 days before the failure, and the framework gives a warning to the maintainer that something has changed compared to the training phase; 10 days before the failure, the prediction performed by the MCU fits well with the real behavior, alerting the maintainer that the change will become too relevant. In Figure 13(a), the framework is tested on a bearing inner race defect type. In this case, the bearing behaves differently compared to the low lubrication one; as explained, the fault manifests itself as periodical impulses with high amplitude in this second configuration. This fault might not be detected from all AIUPs because it occurs only in specific time ranges. In this case, the configuration set is the following (Table 4):  
The error computed is quite disrupted, but the framework accurately predicts when the bearing's change becomes relevant in error deviation. As before, the MCU triggers its agents 20 days before the final failure with low accuracy; the prediction fits well about 10 days before the final failure. An example of the update/retrain function is shown in Figure 15 in which, around July 2021, the update function is executed by the user; the error decreases drastically, reducing itself to a value close to zero, expanding the trained data and transferring the information that the last \(k\) datasets acquired are healthy and the framework should not send any warning to alert the maintainer. \begin{table}
\begin{tabular}{c c} \hline Windows & 20 \\ \hline Average & 4 \\ \hline Lowest Bound & 1 \\ \hline Highest Bound & 5 \\ \hline \end{tabular}
\end{table} 
Table 4: BPFI Framework Configuration. \begin{table}
\begin{tabular}{c c} \hline Windows & 20 \\ \hline Average & 4 \\ \hline Lowest Bound & 5 \\ \hline Highest Bound & 40 \\ \hline \end{tabular}
\end{table} 
Table 3: Low Lubrication Framework Configuration. By tuning the framework's parameters properly (better explained in the following paragraph), the maintainer could be called often or only sometimes, depending on the accuracy wanted during the recognition. A \"faster framework\" detects changes in the data pattern, also giving more false positives, alerting the maintainer many times after the training process. A \"lower framework\" detects changes only when these become too relevant. A trade-off by opportune tuning has to be done during the training process to understand which parameters work better for the application. Generally, the maintainer's work is reduced by properly training the models. Generally, the amount of data is destined to increase over time. Companies and researchers can understand if the model chosen is ready and well-tuned thanks to the feedback sent by the framework. False positives are strictly related to a low amount of data used for training and/or a not well-tuned framework; hence, if the framework works well, giving no warning at the beginning means the tuning and the amount of data are good enough for the model chosen and for the prediction process.