# A Machine Learning Framework for Condition-Based Maintenance of Marine Diesel Engines: A Case Study
## 3 Proposed Framework  
In this section, we describe the proposed strategy for data-driven predictive maintenance. Industrial machinery has different numbers and types of sensors installed on it. The aim of the sensors is to monitor the health status of the main components continuously. These components are those more sensitive to failure or those necessary for the good operation of the entire machinery. In the case of a marine diesel engine, we take the oil circuit as an example, since filtering the impurities is important. Namely, both a non-optimal filtering operation and excessive clogging can cause an unhealthy engine status. The consequence of this is the reduction of the engine life and, in catastrophic situations, it can lead to dangerous conditions for the ship crew and passengers. So, it is extremely important for the engine status to monitor the oil filter, and the associated pressure drop must be measured by sensors to detect clogging. Similar considerations can be made for other engine components.  
Assuming that \(m\) is the number of sensors in the machinery, let us indicate as \([x_{1},x_{2},...,x_{m}]\) all the monitored variables. Then, \([u_{1},u_{2},...,u_{r}]\) are the variables chosen as inputs to the considered ML algorithms, which are trained to provide the predictions \([\hat{x}_{1},\hat{x}_{2},...,\hat{x}_{m}]\) by processing the employed inputs. The predictions give the expected values in the case of a healthy engine. They are next compared to the real values from the asset, thus allowing the technicians to take decisions regarding the maintenance plan.  
The next step is to standardize the \(x_{j}\) variables, for \(j=1,...,m\), by the Z-score method to yield \(x_{z_{j}}\), with \(j=1,...,m\), as shown below:  
\[x_{z_{j}}=(x_{j}-\mu_{j})/\sigma_{j} \tag{1}\]  
where \(\mu_{j}\) is the mean and \(\sigma_{j}\) is the standard deviation.  
Now, we may apply \(k\) different ML algorithms to the \(m\) variables and compute the mean squared error (\(MSE\)), say \(mse_{i,j}\) for \(i=1,...,k\) and \(j=1,...,m\), between the predictions and the real experimental values.  
The \(MSE\) is given by  
\[MSE=\frac{1}{m}\sum_{j=1}^{m}(x_{z_{j}}-\hat{x}_{z_{j}})^{2} \tag{2}\]  
where \(x_{z_{j}}\) is the real standardized value and \(\hat{x}_{z_{j}}\) the predicted standardized value. For each algorithm, the necessary time \(t_{pr}\) for obtaining the predicted value is also measured. In this way, a performance index \(J=f(MSE,t_{pr})\) is evaluated: the higher \(J\) is, the better the algorithm's performance. Then, for each variable \(x_{z_{j}}\), the algorithm number \(i_{j}\), \(1\leq i_{j}\leq k\), with the highest \(J\), i.e., \(J_{i_{j},i_{j}}\), is chosen. Finally, algorithm number \(i^{*}\), which presents the highest \(J\) for the largest number of times, is selected for the overall prediction. The procedure is summarized in Figure 1.  
Figure 1 shows the following: the inputs are the standardized measurements from sensors; \(J\) is computed for each algorithm prediction and for each sensor; the outputs provide the lowest \(J\) for each sensor. The rationale is to select the algorithm which provides  
Figure 1: Proposed framework for choosing the most suitable predictive algorithm.  
the highest \(J\) for the highest number of sensors. This optimal algorithm is used subsequently for predictive maintenance with all sensors.  
The following algorithms were considered for the benchmark after a careful analysis of the literature:  
1. An artificial neural network (ANN);
2. An ensemble neural network (ENN), which provides an arithmetical mean of the outputs from the single neural networks;
3. An ENN providing the weighted mean of outputs from single neural networks;
4. A random forest (RF).