Development of a Predictive Maintenance Algorithm for a Diesel Generator using Machine Learning
Development of a Predictive Maintenance Algorithm for a Diesel Generator using Machine Learning
Abstract: This study develops a predictive maintenance framework for a 500kVA diesel generator using advanced machine
learning techniques, aiming to enhance reliability and operational efficiency. The research involves the collection of real-
world operational data at one-minute intervals over two months, focusing on critical parameters such as bearing
temperature, engine vibration, and coolant temperature. Two machine learning models—XGBoost and Multi-Layer
Perceptron (MLP)—were trained to classify generator conditions into distinct maintenance categories with high accuracy.
A meta-learning ensemble approach was implemented, integrating the predictions from these models to leverage their
complementary strengths and enhance robustness. The results demonstrate exceptional performance, with both individual
and ensemble models achieving precision, recall, and F1-scores near 1.00 across multiple fault scenarios. The meta-learning
framework proved particularly effective, showcasing improved reliability over standalone models. This study’s
contributions are twofold: it advances the state of predictive maintenance by employing hybrid modelling techniques and
addresses a critical gap in the proactive management of high-capacity diesel generators. The research underscores the
practical applicability of machine learning in industrial contexts, offering a scalable and sustainable solution to minimise
downtime, reduce maintenance costs, and optimise equipment longevity. By integrating robust data analysis with cutting-
edge machine learning, this framework establishes a foundation for proactive, data-driven maintenance strategies in
industrial settings, aligning with the broader goals of Industry 4.0 and sustainable industrial practices.
How to Cite: Olokede, Oluwagbemiga; Evans Ashigwuike. (2025). Development of a Predictive Maintenance Algorithm for a
Diesel Generator using Machine Learning. International Journal of Innovative Science and Research Technology,
10(3), 1417-1427. https://doi.org/10.38124/ijisrt/25mar1226.
In this study, we aim to develop a predictive [12] explored the development of a microgrid control
maintenance algorithm for a diesel generator using machine system leveraging deep reinforcement learning techniques.
learning techniques. Machine learning models, specifically The research validates the effectiveness of reinforcement
XGBoost and Multi-Layer Perceptron (MLP), were learning in optimising control decisions in systems that
developed and trained to classify the generator’s condition include a diesel generator. Despite its robust control
into distinct maintenance categories with high precision and framework, the study does not directly address predictive
recall. Additionally, a meta-learning ensemble approach was maintenance analytics for fault detection or preventive
implemented to integrate the predictions of these models, maintenance classification.
capitalising on their complementary strengths to enhance
robustness. Key steps included data preprocessing to handle [13] proposed a machine learning approach to forecast
missing values and noise, feature selection guided by a capacitor bank requirements for improving grid efficiency.
correlation heatmap, and iterative model optimisation. Model While this research underscores the potential of machine
performance was evaluated using precision, recall, F1-score, learning in real-time decision-making and energy
and accuracy metrics to ensure reliability across diverse fault optimisation, its focus is more aligned with grid management
scenarios. than predictive maintenance strategies.
The growing complexity of industrial systems, [14] present a Maximum Power Point Tracking (MPPT)
including high-capacity diesel generators, necessitates algorithm that integrates real-time analytics for enhanced
advanced maintenance strategies to prevent unexpected control of industrial power systems. The study highlights the
failures and optimise resource utilisation. Traditional role of predictive analytics in improving system performance
maintenance approaches are increasingly inadequate in but is more focused on system control than on predictive
addressing the dynamic and multifaceted nature of modern maintenance for diesel generators.
equipment. This study addresses these gaps by integrating
cutting-edge machine learning techniques into a predictive [15] investigate the optimisation of post-disaster
maintenance framework. By using ensemble learning, it microgrid control using multi-agent deep reinforcement
aligns with best practices recommended in recent literature, learning. Their findings demonstrate the predictive
which highlight the efficacy of hybrid models in improving capabilities of reinforcement learning algorithms in dynamic
prediction accuracy and reducing false positives [8], [9]. environments. However, the primary focus is on control
response strategies rather than routine maintenance
II. LITERATURE REVIEW prediction.
The empirical review draws from several relevant [16] conduct a ferrographic study of wear particles in
publications to contextualise the development of a predictive used oil from power generation machinery, contributing to
maintenance algorithm for a 500kVA diesel generator using operational parameter monitoring. Although this approach
machine learning techniques. A consistent theme across the provides valuable insights into wear and fault detection, it
reviewed literature is the pursuit of more effective and does not incorporate advanced machine learning methods for
efficient maintenance strategies through the intelligent predictive maintenance.
analysis of operational data. In exploring optimal power
distribution, [10] investigates the integration of distributed [17] examines islanding detection using distributed
diesel generators into power systems in Iraq, with a focus on generator systems and an artificial bee colony algorithm.
addressing operational challenges and developing algorithms While the study offers important insights into system
for optimal power distribution. While the research provides monitoring and health assessment, it diverges from the
valuable insights into the integration and operational development of predictive maintenance strategies using
efficiency of diesel generators, it lacks a direct focus on machine learning techniques.
predictive maintenance, limiting its applicability for fault
detection and classification strategies essential for [18] explore hybrid renewable energy systems
maintenance optimisation. integrating photovoltaics, wind turbines, diesel engines, and
batteries. The study focuses on system optimisation for rural
[11] examined load forecasting at a microgrid level electrification but lacks emphasis on predictive maintenance
using machine learning algorithms to optimise grid load analytics for diesel generators.
management. The study demonstrates the efficacy of
predictive techniques in managing operational states, [19] apply reinforcement learning to optimise the tuning
providing a foundation for forecasting methodologies. of grid-connected inverter controllers in microgrids.
However, its emphasis on load balancing rather than Although the research demonstrates the predictive potential
maintenance prediction diverges from the specific objectives of machine learning, its focus remains on inverter control
of maintenance category classification. rather than predictive maintenance classification for
generator conditions.
C. Data Preprocessing and Feature Engineering approach allows the model to predict various maintenance
The first step in developing the predictive maintenance categories accurately.
model involved cleaning the data to remove anomalies and
inconsistencies, as shown in Figure 2. This process included
addressing missing values, removing outliers, and
standardising the format of timestamps and sensor readings
to ensure accurate predictions.
Fig 2: Data Preprocessing and Feature Engineering Block Fig 3: XGBoost Model Algorithm
Diagram
We optimised the model's performance by carefully
After cleaning, the most relevant parameters that selecting key settings, including learning rate, tree depth, and
influence maintenance needs were identified. These boosting rounds, using Grid Search Cross-Validation. To
parameters include bearing temperature, oil viscosity, engine prevent overfitting, we included regularisation parameters.
vibration, and coolant temperature. These parameters were The data was split with 80% for training and 20% for testing.
chosen based on their relationship with specific fault We addressed any imbalance in maintenance categories using
scenarios. We then standardised the numerical values through the scale_pos_weight parameter and employed multi:softmax
scaling and normalisation to ensure all features had equal for handling multiple maintenance categories. The model's
importance during model training. The maintenance accuracy and reliability were thoroughly evaluated through
categories were converted into numerical values to make classification reports.
them compatible with our machine learning algorithms.
E. Multi-Layer Perceptron Neural Network
D. XGBoost Model The Multi-Layer Perceptron (MLP) neural network
This research used XGBoost for maintenance prediction employed a deep learning approach for predictive
because of its effectiveness with tabular data. As shown in maintenance analysis, designed to capture complex
Figure 3, the model uses multiple decision trees, with each relationships within the diesel generator data. The
new tree improving upon the previous ones' results. This architecture balanced model complexity with
generalisability, as shown in Figure 4.
F. Meta-Learning Ensemble Hybrid models and highlighted which maintenance categories were
The Meta-Learning Ensemble Hybrid approach difficult to distinguish.
combined multiple machine learning models to enhance
maintenance forecast accuracy. This strategy integrated the The evaluation process included a detailed statistical
XGBoost classifier and MLP neural network into a hybrid summary for each maintenance category through a
model, as illustrated in Figure 1. classification report. This report measured the accuracy of
positive predictions, the model's ability to find relevant cases,
The ensemble used a stacking approach where a meta- and provided a balanced assessment through the F1-score. To
model, typically a logistic regression classifier, combined ensure reliable validation and prevent overfitting, the study
predictions from base models. This integration leveraged employed a five-fold cross-validation technique. This method
XGBoost's strength in handling tabular data and MLP's divided the data into five parts, maintaining the original
capability for non-linear relationships. The prediction fusion distribution of maintenance categories while testing the
technique stacked outputs from both models into a new model's performance across different data combinations.
feature set for the meta-model, generating final predictions
with improved accuracy and reliability. The final analysis compared the performance of three
models: the XGBoost Classifier, Multi-Layer Perceptron
G. Performance Evaluation and Validation Neural Network, and Meta-Learning Ensemble Hybrid
The evaluation process assessed the predictive Model. This comparison revealed each model's strengths and
maintenance algorithm's reliability and effectiveness through limitations in predicting maintenance requirements for the
several key measurements. The main metric used was diesel generator. Through these comprehensive evaluation
classification accuracy, which showed how often the model methods, the study established the reliability and
correctly predicted maintenance needs. The analysis also effectiveness of the predictive maintenance system.
included precision, recall, and F1-scores for each
maintenance category to provide detailed insight into the IV. RESULTS AND DISCUSSION
model's performance.
A. Exploratory Data Analysis
A confusion matrix served as an essential analytical The research commenced with a comprehensive data
tool, comparing predicted maintenance categories against visualisation approach to explore the intricate relationships
actual requirements. This matrix tracked correct predictions, between various operational parameters of the 500kVA diesel
incorrect category assignments, missed predictions, and generator. Figure 5 presents a correlation heatmap that
correct identification of non-maintenance scenarios. These illuminates the interdependencies between key variables
measurements helped identify any biases in the predictive monitored during the study.
The trend analysis depicted in Figure 6 provides a vibration. This visualisation offers insights into the dynamic
temporal representation of critical parameters, namely behaviour of these essential indicators throughout the
bearing temperature, winding temperature, and engine generator's operational lifecycle.
Fig 8: Pairplot of Bearing Temperature, Engine Vibration, Oil Contamination and Coolant Temperature
6 1 1 1 200 MLP
7 1 1 1 200 MLP
0 1 1 1 200 Meta-Learning Hybrid Model
1 1 1 1 200 Meta-Learning Hybrid Model
2 1 1 1 200 Meta-Learning Hybrid Model
3 1 1 1 200 Meta-Learning Hybrid Model
4 1 1 1 200 Meta-Learning Hybrid Model
5 1 0.99 1 200 Meta-Learning Hybrid Model
6 1 1 1 200 Meta-Learning Hybrid Model
7 1 1 1 200 Meta-Learning Hybrid Model
C. Discussion of Results
The research successfully developed an advanced
predictive maintenance framework for a 500kVA diesel
generator through sophisticated machine learning
methodologies. Data visualisation revealed intricate
relationships between operational parameters, with the
correlation heatmap (Figure 4.1) demonstrating complex
interconnections among generator variables. This
visualisation proved essential for understanding the
multidimensional nature of mechanical system behaviour.
D. Comparative Analysis
This study advances the field of predictive maintenance
through innovative integration of XGBoost, MLP, and meta-
Fig 10: MLP Confusion Matrix learning ensemble techniques. Previous research, such as the
2021 IoT-enabled predictive maintenance study for diesel
generators, focused primarily on real-time monitoring
without incorporating advanced ensemble techniques [27].
Similarly, the 2023 case study employing Random Forest and
Support Vector Machines, while comprehensive, lacked the
hybrid robustness achieved through MLP and XGBoost
integration [28].
[10]. S. Khalaf, “Integration of Distributed Diesel [21]. M. Eltohamy, “Optimal Utilization of Distributed
Generators in Power System, Iraq Case Study,” Generation,” 2021. [Online]. Available:
Cardiff University, 2021. [Online]. Available: https://www.researchgate.net/profile/Mohammed-
https://orca.cardiff.ac.uk/id/eprint/149179/ Eltohamy/publication/379026349_OPTIMAL_UTILI
[11]. T. A. C. Guimarães, “Load Forecast on a Micro Grid ZATION_OF_DISTRIBUTED_GENERATION/
Level Through Machine Learning Algorithms,” [22]. S. Khalaf, “Integration of Distributed Diesel
University of Porto, 2020. [Online]. Available: Generators in Power Systems,” Cardiff University,
https://search.proquest.com/openview/f0b184775ad6 2021. [Online]. Available:
a29cd4529bf9bbb8d549 https://orca.cardiff.ac.uk/id/eprint/149179/1/Thesis%
[12]. N. F. P. Dinata, M. A. M. Ramli, M. I. Jambak, and 20Final.pdf
M. A. B. Sidik, “Designing an Optimal Microgrid [23]. L. P. Strydom, “Power System Design Guidelines to
Control System Using Deep Reinforcement Learning: Enhance Reliability of Cellular Networks in Africa,”
A Systematic Review,” ScienceDirect, 2024, North-West University, South Africa, 2014. [Online].
[Online]. Available: Available:
https://www.sciencedirect.com/science/article/pii/S2 https://repository.nwu.ac.za/handle/10394/15587
215098624000375 [24]. W. K. Chae and et al., “Design and Field Tests of an
[13]. S. K. Rajput, D. Kulshrestha, N. Paliwal, and V. Inverted Based Remote Microgrid on a Korean
Saxena, “Forecasting Capacitor Banks for Improving Island,” Energies (Basel), vol. 8, no. 8, p. 8193, 2015,
Efficiency of Grid-Integrated PV Plants: A Machine [Online]. Available: https://www.mdpi.com/1996-
Learning Approach,” ScienceDirect, 2025, [Online]. 1073/8/8/8193/pdf
Available: [25]. S. J. A. Haider, “Optimal Predictive Maintenance
https://www.sciencedirect.com/science/article/pii/S2 Strategies,” 2007. [Online]. Available:
352484724008230 https://sites.ualberta.ca/~jed3/Theses/Haider-
[14]. H. Agomuo and B. O. Ogbonna, “Development of MEngReport-UofA-2007.pdf
MPPT Algorithm for Improved Control of Industrial [26]. C. J. Lanigan, “Implementation of a condition
Power Systems, Case Study: Ocean Marine Security,” monitoring program for High Voltage (HV) assets for
IJAEM, 2024. the Santos GLNG Project,” 2013. [Online]. Available:
[15]. H. Nie, Y. Chen, Y. Xia, S. Huang, and B. Liu, https://sear.unisq.edu.au/24698/1/Lanigan_2013.pdf
“Optimizing the Post-Disaster Control of Islanded [27]. D. R. Nayak, A. G. Mohapatra, B. Keswani, A.
Microgrid: A Multi-Agent Deep Reinforcement Mohanty, P. K. Tripathy, and A. K. Samantaray, “IoT
Learning Approach,” in IEEE Xplore, 2020. [Online]. enabled predictive maintenance of diesel generator in
Available: the context to Industry 4.0,” in 2021 19th OITS
https://ieeexplore.ieee.org/document/9172071 International Conference on Information Technology
[16]. A. Adebayo, B. S. Oluwadare, and J. T. Stephen, (OCIT), 2021, pp. 364–368. doi:
“Ferrographic Study of Wear Particles in Used Oil of 10.1109/OCIT53463.2021.00078.
a Machinery System in Power Generating Plant,” [28]. D. S. Satwaliya, H. P. Thethi, A. Dhyani, G. R. Kiran,
IJSTRE, [Online]. Available: M. Al-Taee, and M. B. Alazzam, “Predictive
http://www.ijstre.com/Publish/4202019/12145446.pd Maintenance using Machine Learning: A Case Study
f in Manufacturing Management,” Dec. 2023, doi:
[17]. L. O. Mogaka, “Rotating Machine Based Distributed 10.1109/icacite57410.2023.1018301.
Generator Islanding Detection and Power
Prioritisation Using Artificial Bee Colony
Algorithm,” JKUAT, 2017. [Online]. Available:
http://ir.jkuat.ac.ke/handle/123456789/2576
[18]. M. G. M. Almihat and M. T. E. Kahn, “Design and
Implementation of Hybrid Renewable Energy
(PV/Wind/Diesel/Battery) Microgrids for Rural
Areas,” AJOL, 2023.
[19]. T. L. Vu, A. Singhal, and K. Schneider, “Tuning Phase
Lock Loop Controller of Grid Following Inverters by
Reinforcement Learning to Support Networked
Microgrid Operations,” in IEEE Xplore, 2023.
[20]. A. Adebayo, B. S. Oluwadare, and J. T. Stephen,
“Ferrographic Study of Wear Particles in Used Oil of
a Machinery System in Power Generating Plant,”
International Journal of Scientific and Technical
Research in Engineering (IJSTRE), 2019, [Online].
Available:
http://www.ijstre.com/Publish/4202019/12145446.pd
f