Abstract
Photovoltaic systems in desert environments face severe degradation due to heat and dust, making predictive maintenance essential. Unlike existing approaches limited to fault diagnosis, this work proposes a fully integrated closed-loop framework combining IoT monitoring, machine learning diagnostics, and reinforcement learning decision-making. The approach is validated using six months of real data from a 20 MW PV plant in Boujdour, Morocco (500,000 records). Results show 96.3% diagnostic accuracy, 22% downtime reduction, 18% fewer unnecessary interventions, and a 12% performance ratio improvement, demonstrating enhanced reliability and economic efficiency.
1. Introduction
Photovoltaic (PV) deployment has expanded rapidly in arid regions, making desert environments a key component of large-scale renewable energy production. In Morocco, this development is supported by high solar irradiation and large available land [1,2]. However, harsh conditions such as high temperature, dust accumulation, and accelerated degradation significantly affect system reliability and energy yield.
Performance degradation in desert PV systems is strongly influenced by external stressors including soiling, thermal cycling, and inverter stress. Dust accumulation alone can lead to significant power losses [3], making maintenance a critical issue. Conventional strategies based on periodic inspection remain insufficient under highly variable conditions [4].
Recent advances in IoT and Industry 4.0 enable continuous monitoring and real-time data acquisition [5,6], while machine learning techniques improve fault detection and anomaly identification [7]. Among them, Extreme Learning Machines (ELM) offer fast training and low computational cost, making them suitable for real-time applications [8]. However, most existing approaches remain limited to diagnosis and do not address maintenance decision-making [9].
Reinforcement learning (RL) provides a promising solution by enabling adaptive decision-making through interaction with dynamic environments [10]. Nevertheless, its application to PV maintenance under real desert conditions remains limited.
This paper proposes a field-validated predictive maintenance framework integrating IoT monitoring, ELM-based fault detection, and Q-learning decision-making within a closed-loop architecture. The framework is evaluated using real operational data from a large-scale PV plant in Boujdour, Morocco. The main contributions include a large-scale dataset, a lightweight diagnostic module, and an adaptive decision framework improving performance ratio and reducing downtime.
2. Related Work and Scientific Positioning
Predictive maintenance has become essential for improving the reliability and performance of photovoltaic (PV) systems, particularly in large-scale installations where downtime leads to significant economic losses [4]. Traditional corrective and preventive strategies are increasingly replaced by data-driven approaches based on continuous monitoring of electrical, environmental, and operational parameters. These approaches effectively detect performance degradation, inverter faults, and soiling effects [4,7]. However, most existing methods remain limited to fault detection and do not incorporate decision-making mechanisms for optimizing maintenance actions [9]. This limitation is more critical in desert environments, where high irradiance, temperature fluctuations, and dust accumulation introduce significant uncertainty [3,4].
The development of Internet of Things (IoT) technologies has enhanced monitoring capabilities through real-time data acquisition and distributed sensing architectures [6,11]. In PV systems, IoT enables improved observability and remote supervision through integration with cloud and edge infrastructures [9]. Although AIoT frameworks have been proposed to combine sensing and analytics, most solutions remain focused on monitoring rather than decision-making [9,12].
Machine learning (ML) techniques have been widely applied to fault detection in PV systems [4,7]. Models such as decision trees, support vector machines, and neural networks provide high diagnostic accuracy. Extreme Learning Machines (ELM), in particular, offer fast training and low computational complexity, making them suitable for real-time applications [8,13]. Nevertheless, ML approaches remain limited to diagnostic tasks and rely on external decision mechanisms, typically rule-based or manual [4,10].
Reinforcement Learning (RL) enables sequential decision-making under uncertainty and has shown strong performance in energy system optimization [10,12]. However, its application to predictive maintenance in PV systems remains limited, especially in real-world conditions. Existing studies are mainly simulation-based and lack integration with real-time diagnostics and IoT infrastructures [4,10].
The literature reveals a clear fragmentation: IoT systems focus on data acquisition, ML methods on fault detection, and RL approaches on decision-making, without full integration or large-scale validation. This limitation is particularly significant in desert PV systems. Table 1 presents a comparative analysis of existing approaches and highlights the lack of integration between monitoring, diagnosis, and decision-making mechanisms.
Table 1.
Comparative Analysis of Existing Approaches and Proposed Method.
As shown in Table 1, existing approaches do not simultaneously integrate monitoring, diagnostics, decision-making, and field validation. This limitation motivates the development of a unified predictive maintenance framework adapted to desert PV systems.
3. Materials and Methods
The proposed predictive maintenance framework is built as a closed-loop architecture combining IoT-based monitoring, machine learning-driven fault detection, reinforcement learning-based maintenance decision-making, and field validation on a real desert photovoltaic plant. Unlike conventional monitoring pipelines, the system ensures continuous interaction between sensing, analytics, and operational decision layers, in line with recent Industry 4.0 predictive maintenance and intelligent energy management paradigms [5,12].
3.1. System Architecture and Field Deployment
The overall architecture, illustrated in Figure 1, is structured into four interconnected layers: field sensing, communication, data processing, and decision-making. At the field level, photovoltaic modules, inverters, and auxiliary components are instrumented with distributed sensors measuring thermal, electrical, mechanical, and environmental variables.
Figure 1.
Central Architecture of the Proposed Framework.
The sensing infrastructure was designed with industrial-grade components and protective enclosures to withstand high temperatures, dust exposure, and communication disturbances typical of Saharan environments, ensuring reliable operation under extreme field conditions.
Data are transmitted through field gateways using low-power wide-area communication technologies such as LoRaWAN (LoRa Alliance, Fremont, CA, USA), which are particularly suitable for remote and bandwidth-constrained environments [6]. This communication layer ensures reliable transmission and buffering, reducing the impact of intermittent connectivity in desert PV installations [7,11].
The cloud-edge layer performs real-time data ingestion, synchronization, filtering, feature extraction, storage, and analytics. Raw data are stored in a data lake, while structured data are maintained in a data warehouse to support both real-time and historical analyses [5,9]. Machine learning models are used to detect anomalies and classify faults, while a reinforcement learning agent determines optimal maintenance actions. These actions are transmitted to the Computerized Maintenance Management System (CMMS), where maintenance tasks are generated, prioritized, and tracked. A feedback loop between the CMMS and the learning agent enables continuous policy improvement, resulting in an adaptive and data-driven maintenance system [9,10,12].
The framework was validated using real operational data from the Noor Boujdour I photovoltaic plant located in southern Morocco and operated by ONEE. This grid-connected installation has a nominal capacity of 20 MW and operates under extreme Saharan conditions characterized by annual irradiation exceeding 2200 kWh·m−2·year−1, high ambient temperatures, dust accumulation, and thermal cycling [1,3]. These conditions significantly impact system reliability and performance, making the site suitable for predictive maintenance evaluation [4]. Table 2 summarizes the main characteristics of the Noor Boujdour I photovoltaic plant used for validation while Figure 1 illustrates the overall architecture of the proposed predictive maintenance framework, highlighting the interaction between sensing, communication, data processing, and decision-making layers.
Table 2.
Main characteristics of Noor Boujdour I PV plant.
3.2. Data Acquisition and Dataset Preparation
A multimodal IoT-based sensing infrastructure was deployed across the PV plant to capture thermal, electrical, mechanical, and environmental variables. The sensor network includes temperature sensors (RTDs and thermocouples), humidity sensors, accelerometers, and current and voltage transducers installed at module, string, and inverter levels. This configuration enhances fault observability and supports robust diagnostics under harsh environmental conditions [3,9,11].
Data acquisition was performed with a uniform sampling interval of 5 min over a monitoring period of six months, resulting in more than 500,000 synchronized telemetry records. Table 3 presents the sensor deployment and the monitored variables used for data acquisition.
Table 3.
Sensor deployment and monitored variables.
The raw data were processed through a preprocessing pipeline including time synchronization, outlier removal using the Hampel filter, interpolation of missing data, noise smoothing, and feature extraction [4]. Feature engineering was structured into thermal, electrical, mechanical, contextual, and historical indicators, improving fault detectability and model robustness [4,7].
The dataset was labeled using a hybrid approach combining CMMS records, expert annotations, and controlled fault injection. The dataset was partitioned using a stratified 80/20 split, and model validation was performed using 10-fold cross-validation to ensure robustness and generalization [4].
3.3. Machine Learning-Based Fault Detection
The diagnostic layer relies on supervised machine learning models for real-time fault detection and classification based on multimodal sensor data [4,7]. Several models were evaluated, including Random Forest (RF), Support Vector Machine (SVM), Artificial Neural Networks (ANN), and Extreme Learning Machines (ELM) [7].
All data preprocessing, machine learning model development, and reinforcement learning simulations were performed using MATLAB R2024b (The MathWorks, Inc., Natick, MA, USA).
The Extreme Learning Machine (ELM) was selected as the core model due to its fast training, low computational complexity, and strong generalization capability, making it suitable for real-time industrial applications [8,13]. Unlike conventional neural networks, ELM uses a single hidden layer with randomly initialized parameters, while output weights are computed analytically.
The hidden layer output matrix is defined as:
The output weights are obtained using the Moore–Penrose pseudoinverse:
The predicted output is then:
This formulation eliminates iterative backpropagation and significantly reduces training time while maintaining high predictive accuracy [8].
Model performance was evaluated using standard metrics: accuracy, precision, recall, F1-score, and ROC-AUC [4,7].
Figure 2 illustrates the training and inference workflow of the Extreme Learning Machine (ELM) model.
Figure 2.
ELM Training and Inference Workflow.
3.4. Reinforcement Learning-Based Decision Framework
The maintenance decision problem is formulated as a Markov Decision Process (MDP), allowing sequential decision-making under uncertainty [10]. The system state at time t is defined as:
where : health indicators derived from the ELM diagnostic module (fault probabilities, anomaly scores), : fault classification outputs (type, severity), : environmental variables (irradiance, temperature, dust index), : operational context (inverter status, load conditions, maintenance history) [4].
The action space is defined as:
The reward function is expressed as:
where is the maintenance cost, the downtime penalty, the energy loss, the performance improvement, and the weighting coefficients.
The weighting coefficients were empirically calibrated using sensitivity analysis to balance maintenance cost, downtime, and performance improvement. A sensitivity analysis was conducted to quantify the impact of each coefficient on system performance and ensure a balanced trade-off between operational cost, system reliability, and energy efficiency.
The Q-learning update rule is:
This formulation ensures stable convergence of the learning process.
Here, α is the learning rate and γ the discount factor [10].
An ε-greedy policy is used to balance exploration and exploitation. The integration of ELM outputs into the RL state enables context-aware and adaptive maintenance decisions, forming a closed-loop system that continuously improves through feedback [4,10,12].
Figure 3 shows the reinforcement learning-based maintenance decision workflow implemented in the proposed framework, while Table 4 summarizes the main parameters used in the reinforcement learning framework.
Figure 3.
Reinforcement Learning-Based Maintenance Decision Workflow.
Table 4.
Reinforcement Learning Framework Parameters.
3.5. Validation Protocol
The framework was evaluated at three levels. The machine learning component was assessed using accuracy, precision, recall, F1-score, and ROC-AUC under 10-fold cross-validation [4,7]. The reinforcement learning component was evaluated based on operational metrics including downtime reduction, maintenance cost reduction, performance ratio improvement, and reduction in unnecessary interventions [12]. Finally, the complete system was validated in a closed-loop configuration through real-time deployment and CMMS integration, ensuring practical applicability and industrial relevance [9,10].
4. Results and Discussion
4.1. Dataset Characterization
The dataset reflects the complex and dynamic operating conditions of desert photovoltaic systems. More than 500,000 synchronized records were collected over a six-month monitoring period, including thermal, electrical, mechanical, and environmental variables.
Statistical analysis shows significant variability. Ambient temperature ranged from 10 °C to 48 °C, while module temperature frequently exceeded 65 °C during peak irradiation. Dust accumulation events induced progressive performance degradation, consistent with observations in desert PV systems [3].
Correlation analysis highlights strong dependencies between environmental stressors and system behavior. Temperature rise is associated with inverter efficiency reduction, dust accumulation leads to progressive power loss, and voltage imbalance increases under thermal stress. These observations confirm the dominant role of environmental factors in system degradation [4].
Table 5 presents the statistical characteristics of the dataset.
Table 5.
Statistical characteristics of the dataset.
4.2. Machine Learning Performance
The diagnostic models were evaluated using a stratified 10-fold cross-validation protocol. Among all tested models (RF, SVM, ANN, ELM), the Extreme Learning Machine demonstrated the best performance.
The ELM achieved: Accuracy: 96.3%, F1-score: 0.94 and ROC-AUC: 0.97.
In comparison, RF achieved 94.8% accuracy, SVM 93.5%, and ANN 95.2%. The ELM provides the best trade-off between accuracy and computational efficiency, confirming its suitability for real-time fault detection in PV systems [8,13].
Table 6 compares the performance of the evaluated machine learning models.
Table 6.
Performance comparison of ML models.
4.3. Impact of Reinforcement Learning
The integration of reinforcement learning significantly improves maintenance decision-making. The Q-learning agent converges after approximately 1200 training episodes, indicating stable policy learning.
The proposed approach results in a 22% reduction in maintenance-related downtime, an 18% reduction in unnecessary interventions, and a 12% improvement in performance ratio.
These results demonstrate that reinforcement learning enables adaptive and context-aware maintenance strategies in highly variable environments [10,12].
4.4. Ablation Study
An ablation study was conducted to evaluate the contribution of each component by comparing three configurations: ML only, ML + rule-based system and ML + reinforcement learning.
Table 7 presents the results of the ablation study.
Table 7.
Ablation study results.
The ML-only configuration provides accurate diagnostics but lacks decision optimization. The rule-based system improves performance but remains limited. The ML+RL configuration achieves the best results by enabling adaptive and optimized decision-making [4].
4.5. Economic and Operational Impact
The proposed framework provides significant economic and operational benefits. Maintenance cost is reduced by 15–18%, downtime by 22%, and the performance ratio increases by 12%.
Table 8 summarizes the economic impact of the proposed framework.
Table 8.
Economic impact analysis.
Operational improvements include reduced manual interventions, improved maintenance scheduling, and near real-time fault response [5,9].
4.6. Interpretation and Discussion
The results confirm that the proposed framework is effective under harsh desert conditions. The high diagnostic accuracy (96.3%) demonstrates that lightweight models such as ELM are suitable for real-time applications [13].
The dominance of inverter overheating events (≈89%) highlights the impact of thermal stress on system reliability [4]. The results also show that fault detection alone is insufficient. The integration of reinforcement learning enables the transformation of diagnostic outputs into optimized maintenance actions, leading to measurable improvements in system performance.
Reinforcement learning further improves decision-making through sequential optimization, context-aware adaptation, and continuous policy learning, enabling the system to handle environmental variability and optimize long-term performance [10,12].
Table 9 compares decision-making strategies.
Table 9.
Decision-making comparison.
4.7. Comparison with Commercial Systems
Commercial O&M platforms rely primarily on SCADA data, threshold-based detection, and manual decision-making [12]. In contrast, the proposed framework integrates multimodal sensing, machine learning diagnostics, and reinforcement learning-based decision-making in a closed-loop architecture.
Table 10 compares the proposed framework with commercial O&M systems.
Table 10.
Comparison with commercial O&M platforms.
4.8. Limitations
The framework was validated on a single PV plant and over a six-month period. Additional multi-site and long-term validation is required. The deployment cost of the IoT infrastructure is not included in the current economic analysis and will be addressed in future work. The integration of image-based diagnostics and advanced reinforcement learning models such as Deep Q-Networks may further enhance system performance. Operational deployment also requires robust communication infrastructure, cybersecurity measures, and compatibility with existing SCADA systems [5].
5. Conclusions
This paper proposed a field-validated predictive maintenance framework for desert PV systems integrating IoT monitoring, ELM-based diagnostics, and reinforcement learning decision-making. The results demonstrate high diagnostic accuracy (96.3%) and significant improvements in maintenance performance, including a 22% reduction in downtime and a 12% increase in performance ratio. The framework enables adaptive and data-driven maintenance strategies, improving system reliability and economic performance under harsh environmental conditions. Future work will focus on multi-site validation and advanced reinforcement learning models.
Author Contributions
Conceptualization, A.E.-C. and S.S.E.-C.; methodology, A.E.-C. and S.S.E.-C.; software, A.E.-C. and N.E.-C.; validation, A.E.-C., S.S.E.-C. and A.B.; formal analysis, R.M.; investigation, A.E.-C. and R.M.; resources, A.B. and N.E.-C.; data curation, R.M.; writing—original draft preparation, A.E.-C. and S.S.E.-C.; writing—review and editing, N.E.-C. and R.M.; visualization, A.E.-C. and S.S.E.-C.; supervision, A.B. and S.S.E.-C.; project administration, A.B. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding. The work was carried out within the framework of internal research projects of the Faculty of Sciences Ain Chock, Hassan II University of Casablanca.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The data supporting the findings of this study were collected from the Noor Boujdour I photovoltaic plant operated by ONEE and are not publicly available due to confidentiality restrictions. Data are available from the corresponding author upon reasonable request and subject to the data owner’s approval.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Mendyl, A.; Mabasa, B.; Bouzghiba, H.; Weidinger, T. Calibration and validation of global horizontal irradiance clear sky models against McClear clear sky model in Morocco. Appl. Sci. 2023, 13, 320. [Google Scholar] [CrossRef] [Scilit]
- Benbba, R.; Barhdadi, M.; Ficarella, A.; Manente, G.; Romano, M.; Hachemi, N.; Barhdadi, A.; Al-Salaymeh, A.; Outzourhit, A. Solar energy resource and power generation in Morocco: Current situation, potential, and future perspective. Resources 2024, 13, 140. [Google Scholar] [CrossRef] [Scilit]
- Elamim, A.; Sarikh, S.; Hartiti, B.; Benazzouz, A.; Elhamaoui, S.; Ghennioui, A. Experimental studies of dust accumulation and its effects on the performance of solar PV systems in Mediterranean climate. Energy Rep. 2024, 11, 2346–2359. [Google Scholar] [CrossRef] [Scilit]
- Ahmed, A.M.; Li, L.; Khalilpour, K. Predictive maintenance of solar photovoltaic systems: A comprehensive review. IET Renew. Power Gener. 2025, 19, e70152. [Google Scholar] [CrossRef] [Scilit]
- Achouch, M.; Dimitrova, M.; Ziane, K.; Sattarpanah Karganroudi, S.; Dhouib, R.; Ibrahim, H.; Adda, M. On predictive maintenance in Industry 4.0: Overview, models, and challenges. Appl. Sci. 2022, 12, 8081. [Google Scholar] [CrossRef] [Scilit]
- Khoa, N.M.; Dai, L.V.; Toan, N.A.; Tung, D.D. A new design of IoT-based network architecture for monitoring and controlling power consumption in distribution grids. Int. J. Renew. Energy Res. 2021, 11, 1460–1468. [Google Scholar] [CrossRef] [Scilit]
- Al-Humairi, A.; Khalis, E.; Al-Hemyari, Z.A.; Jung, P. Machine learning-based predictive maintenance for photovoltaic systems. AI 2025, 6, 133. [Google Scholar] [CrossRef] [Scilit]
- Liu, X.; Zhou, G.; Zhou, Y.; Luo, Q. Functional extreme learning machine. Front. Comput. Neurosci. 2023, 17, 1209372. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kingsley-Amaehule, M.; Uhunmwangho, R.; Nwazor, N.; Okedu, K. Smart intelligent monitoring and maintenance management of photovoltaic systems. Int. J. Smart Grid 2022, 6, 110–122. [Google Scholar] [CrossRef] [Scilit]
- Afridi, Y.; Ahmad, K.; Hasan, L. Artificial intelligence-based prognostic maintenance of renewable energy systems: A review of techniques, challenges, and future research directions. Int. J. Energy Res. 2022, 46, 21619–21642. [Google Scholar] [CrossRef] [Scilit]
- Abdulhussain, S.H.; Mahmmod, B.M.; Alwhelat, A.; Shehada, D.; Shihab, Z.I.; Mohammed, H.J.; Abdulameer, T.H.; Alsabah, M.; Fadel, M.H.; Ali, S.K. A comprehensive review of sensor technologies in IoT: Technical aspects, challenges, and future directions. Computers 2025, 14, 342. [Google Scholar] [CrossRef] [Scilit]
- Asef, P.; Taheri, R.; Shojafar, M.; Mporas, I.; Tafazolli, R. SIEMS: A secure intelligent energy management system for industrial IoT applications. IEEE Trans. Ind. Inform. 2022, 19, 1039–1050. [Google Scholar] [CrossRef] [Scilit]
- Mutashar, H.S.; Shakir, A.M. Robustness analysis of ELM-based fault detection in PV systems. Int. J. Smart Grid 2023, 7, 189–199. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.


