# Maintenance Time Prediction for Predictive Maintenance of Ship Engines
## 2 Materials and Methods
### Experimental Methods  
A dedicated data preprocessing algorithm was constructed for the generator engine to ensure reliable training data for machine learning-based prediction, as shown in Figure 2. Data from the ship's AMS were initially grouped and merged by voyage and engine system unit (e.g., lubricating oil, exhaust gas, scavenge air, fuel consumption), followed by the removal of duplicate rows and null entries. Then, based on the operating characteristics of the generator engine, which runs at a constant rpm, error data such as non-operating engine segments, missing AMS values, and abnormal consumption values were excluded using predefined rules. Additionally, the engine status was clarified into loading and unloading phases using power-based thresholds (GE gen power > 0 for loading and \(\leq\)0 for unloading) to distinguish idle periods. This preprocessing procedure ensures that the input dataset reflects normal engine operations and allows for accurate anomaly detection and maintenance time prediction. Predicting the maintenance time after detecting anomalous symptoms is important for predictive maintenance. The proposed prediction algorithm for the GE maintenance time was built using the RGCCV. This value was derived as a standard generator condition factor in a detection algorithm for a GE's anomalous symptoms in a previous study [4]. The RGCCV is defined by Equation (1) [4]. The performance of the constructed maintenance time prediction algorithm was analyzed as follows: The results of maintenance time prediction using only the cylinder exhaust gas temperature, anomalous symptom, and maintenance decision criteria for the GE were compared with the results of RGCCV-based  
Figure 2: Data preprocessing algorithm. maintenance time prediction, and the following prediction performance metrics were calculated: mean squared error (MSE), root MSE (RMSE), and mean absolute error (MAE). \[RGCCV=GMDCT-\left\{ \begin{aligned} GCET\\ +\begin{bmatrix}(GELR*(GLC-GCL))\\ +(GESTR\;*(GSTC-GCST))\\ +(GESPR\;*(GPC-GCSP))\end{bmatrix}\end{aligned} \right\}, \tag{1}\]  
* GMDCT: generator maintenance decision criteria temperature
* GLC: generator load criterion
* GSTC: generator scavenge temperature criterion
* GSPC: generator scavenge pressure criterion
* GELR: generator exhaust gas temperature/load regression coefficient
* GESTR: generator exhaust gas temperature/scavenge temperature regression coefficient
* GESPR: generator exhaust gas temperature/scavenge pressure regression coefficient
* GCL: generator collected load
* GCST: generator collected scavenge temperature
* GCSP: generator collected scavenge pressure
* GCET: generator collected exhaust gas temperature  
The GE maintenance time prediction algorithm was created by analyzing the RGCCV change tendency of the voyage with the detected anomalous symptoms (VOYAGE 21113) or a specific time period. The created algorithm should be configured per cylinder, as the cylinders have different normal operating conditions, such as the exhaust gas temperature and maximum combustion pressure [3; 4]. Regression analysis was conducted on the RGCCV change trend of VOYAGE 21113 according to the operating time of the GE. Then, the intercept of the derived regression coefficients (such as the prediction intercept by the RGCCV [PIRG]) and the slope (such as the prediction slope by the RGCCV [PSRG]) were utilized as factors for the prediction equation. The predicted maintenance time by the RGCCV (PTMRG), as expressed in Equation (2), is the predicted operating time of the engine until the maintenance criteria are met. The standard for the operation time was expressed in seconds (s) and divided by 3600 to obtain the number of hours. \[PTMRG=\frac{\left[\frac{(MCRG-PIRG)}{PSRG}\right]}{3600}, \tag{2}\]  
* MCRG: RGCCV as maintenance criterion
* PIRG: prediction intercept by the RGCCV
* PSRG: prediction slope by the RGCCV  
The maintenance criterion RGCCV (MCRG) is the RGCCV at the point where the GE requires maintenance (i.e., the maintenance standard factor).