Next Article in Journal
Green DevOps: A Strategic Framework for Sustainable Software Development
Previous Article in Journal
Blockchain for Sustainable Smart Cities: Motivations and Challenges
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Fuzzy Logic Detector for Photovoltaic Fault Diagnosis †

by
Chaymae Abdellaoui
* and
Youssef Lagmich
Physics and Electricity Laboratory, Polydisciplinary Faculty University of Abdelmalek Essaadi (UAE), Larache 93004, Morocco
*
Author to whom correspondence should be addressed.
Presented at the International Conference on Sustainable Computing and Green Technologies (SCGT’2025), Larache, Morocco, 14–15 May 2025.
Comput. Sci. Math. Forum 2025, 10(1), 4; https://doi.org/10.3390/cmsf2025010004
Published: 16 June 2025

Abstract

:
The performance degradation of photovoltaic (PV) systems, comprising solar panels and DC-DC converters, is often caused by various anomalies related to manufacturing defects, operational conditions, or environmental factors. These faults significantly reduce energy output, preventing the system from reaching its nominal power and expected production levels. Given the demonstrated impact of such faults on PV system efficiency, an effective diagnostic method is essential for proactive maintenance and optimal performance. This paper presents a fault detection algorithm based on a Mamdani-type fuzzy logic approach. The proposed method utilizes three key inputs—panel current, panel voltage, and converter voltage—to assess system health. By computing the distortion ratios of these electrical parameters and processing them through a fuzzy logic controller, the algorithm accurately identifies fault conditions. Simulation results validate the effectiveness of this approach, demonstrating its capability to detect and classify 12 distinct faults in both the PV array and the DC-DC converter. The study highlights the potential of fuzzy logic-based diagnostics in enhancing the reliability and maintenance of photovoltaic systems.

1. Introduction

Photovoltaic (PV) systems play a pivotal role in advancing renewable energy adoption and mitigating climate change. However, their reliable operation is often compromised by various faults, which can significantly degrade performance, elevate operational costs, and introduce safety hazards [1]. As with most industrial systems, optimizing PV installations requires maximizing energy output while minimizing maintenance expenditures to ensure long-term economic and operational viability.
Shading and temperature critically affect photovoltaic (PV) systems. Shading reduces irradiance, decreasing photocurrent and causing power loss. Non-uniform illumination creates current mismatch, forcing shaded cells into reverse bias and generating hot spots that accelerate degradation. Temperature fluctuations induce thermal stresses, promoting microcracks and reducing efficiency through increased carrier recombination. These effects collectively lower performance and reliability, necessitating mitigation strategies like optimized bypass diodes and thermal management [2].
In [3], the authors observed an inverse relationship between relative humidity and solar radiation intensity: as humidity increases, solar radiation intensity decreases. This decrease is attributed to increased scattering and absorption of solar radiation by water vapor in the atmosphere, especially in regions like Larache, Morocco, with its Atlantic-influenced climate (Figure 1).
Fault detection techniques often analyze electrical properties like current–voltage (I-V) and power–voltage (P-V) curves and the behavior of components like boost converters. Advanced methods, including AI, fuzzy logic controllers, and machine learning, are increasingly being used to improve fault detection [4].
This paper emphasizes the importance of fault detection in PV systems, focusing on fuzzy logic-based control for accurate fault identification and classification. It introduces a Mamdani fuzzy inference system using three inputs—power loss percentage, short-circuit current (Isc), and open-circuit voltage (Voc)—to assess algorithm effectiveness. The aim is to enhance system resilience and efficiency, supporting the transition to renewable energy. In [5], a technique using array voltage, current, and radiation values is proposed for detecting faults, where a Mamdani fuzzy logic system classifies defects and takes corrective actions. The diagnostic process was implemented in MATLAB/Simulink.

2. PV System Description and Modeling Design

2.1. PV Panel Mathematical Model

The single-diode model is the most commonly used model in the literature. It is used for PV cells and PV modules because of its simplicity and good accuracy. The single-diode electrical model of the PV cell is given in Figure 2. Its mathematical model is presented in the equation relating current and voltage [1].
I = I p h I 0 × exp V + R s   I V t 1 V + R s   I R s h  
I p h = I S C + K i T T r G 1000

2.2. PV System Modeling

The performance of photovoltaic (PV) cells is significantly influenced by environmental conditions, necessitating maximum power point tracking (MPPT) control through a DC-DC boost converter [6,7]. This study employs the SunPower SPR-X20-250-BLK module (Pmax = 250 W) for simulation and fault analysis, selected for its established modeling parameters and industry prevalence. System characterization was performed under standard test conditions (25 °C, 1000 W/m2 irradiation), and the key electrical parameters are detailed in Table 1. The implemented MATLAB/Simulink model (Figure 3) facilitated comprehensive performance evaluation.
Photovoltaic system malfunctions can be categorized as transient or persistent based on their duration and origin. Transient faults primarily result from environmental factors including partial shading, humidity fluctuations, and surface contamination. In contrast, persistent faults stem from intrinsic module defects such as delamination, bubble formation, encapsulant discoloration, surface abrasions, and cell burnout [8]. Such defects often necessitate module repair or complete replacement. Furthermore, electrical faults (short circuits, wiring losses), equipment failures, and MPPT controller malfunctions can substantially reduce system efficiency. These operational issues—spanning grid anomalies to component-level failures—are collectively classified as system performance degradations [9]. Table 2 provides a comprehensive taxonomy of prevalent PV system faults and their characteristics.

3. Fault Detector

3.1. PV Array Faults

Photovoltaic (PV) array faults can be systematically categorized based on their origin, encompassing panel-specific defects, electrical interconnection issues, and environmental influences [10]. This stage covers shading patterns (partial: F01, F02; total: F03, F04), temperature-related faults (F05), reverse bypass diode issues (F06) due to damage or insulation faults, and humidity-related problems (F07–F09) causing PV power decline. Different types of PV array faults are shown in Figure 4.

3.2. DC-DC Converter Faults

PV systems employ switching-mode DC-DC converters to power DC loads, utilizing pulse-width modulation to regulate current through duty cycle control [11]. The maximum power point tracking (MPPT) controllers [12] managing these converters may introduce system faults, including command signal errors (F10). Converter-related faults primarily manifest as short-circuit (F11) or open-circuit (F12) conditions, detectable through voltage and current waveform analysis. These faults significantly impact output voltage characteristics and system performance. Figure 5 illustrates the various boost converter fault modes and their corresponding effects on output voltage.

3.3. PV System Fuzzy Diagnosis

Fuzzy logic has been widely adopted in photovoltaic (PV) system monitoring due to its ability to handle uncertainty and mimic human decision-making in complex, nonlinear environments. Various studies have implemented fuzzy logic controllers (FLCs) to improve fault detection accuracy and system adaptability. The FLC typically consists of three main stages: fuzzification, inference, and defuzzification (Figure 6). During fuzzification, input parameters—such as irradiance, temperature, voltage, or current—are translated into fuzzy linguistic variables using membership functions (e.g., low, medium, high). The fuzzy inference engine then applies a predefined rule base composed of IFTHEN statements to determine the system’s response to abnormal conditions [13].
This article proposes an intelligent technique based on Mamdani-type fuzzy logic to diagnose and identify faults in the PV generator and boost converter failures. This technique is chosen because of its tolerance to imprecise data. It suffices to adjust the inputs/outputs of the system and call the fuzzy rules to improve detection [14]. The diagram block shown in Figure 7 summarizes the proposed technique.
The fault diagnostic method relies on F00 reference values (no fault) and simulated fault values. All cases are discussed and detected. The examination of the main features of the I-V and P-V characteristics of the PV array is crucial for precisely identifying faults, whereby the open-circuit voltage (Voc), short-circuit current (Isc), and maximum power (Pmax) values areutilized to detect various fault types. The converter output voltage (Vc) was utilized to identify the region in which the defects manifested in the output voltage [15]. Then, the distortion rate Ii of all values is calculated as:
  I i = 1 V a l c a l V c a l r e f
where V c a l r e f is the reference value, and V a l c a l is the computed value. FLC uses the distortion rate result, which must fall between 0 and 1. The FLC algorithm compares the values of four parameters (Pmax, Voc, Isc, and Vc) with those of its reference. Table 3 shows the reference values of the parameters indicated for each defective scenario.
The algorithm evaluates PV parameters against predefined ranges, triggering alarms upon significant deviations. System scalability is achieved through modular sensor deployment across panels [16]. Membership functions are constructed using Table 4’s reference values and current distortion indicators (Ii). Figure 8 details the complete diagnostic workflow, demonstrating real-time fault detection capability through fuzzy inference of parameter anomalies.
The mathematical computation of the studied PV system determines the membership functions. The IF–THEN, statement is the foundation of the fuzzy logic system [12]. Figure 9 illustrates the schematic of the proposed Fuzzy Logic Controller (FLC) for fault detection, while Figure 10a–d illustrates three triangular membership functions for each input variable and twelve inferred bases that effectively apply the fault condition product.
Following the definition of the membership functions and fuzzy variables, informed by IF–THEN rules, logic inference comes next. For instance, the fault is F01 if the distortion rate of Pmax is medium, the distortion rate of Isc is large, the distortion rate of Voc is medium, and the distortion rate of Vc is moderate. This reasoning is converted to fuzzy logic and then resumed in Table 5.
The process of defuzzification is essential. The Mean of Maximum (MoM) method is used for defuzzification in pattern recognition applications [17]. MoM determines the most usual value associated with the greatest membership score, reflecting the most logical and right outcome. This strategy helps obtain a clear, decisive conclusion from confusing fuzzy data.

3.4. Results and Discussion

The results of the fuzzy logic-based fault detection system are presented in Figure 11 and Figure 12. As illustrated in Figure 11, the inputs for the fuzzy system include four critical variables: maximum power (Pmax), short-circuit current (Isc), open-circuit voltage (Voc), and operating voltage (Vc). In terms of the specific values, Pmax = 0.5 W, Isc = 0.45 A, Voc = 0.05 V, and Vc = 0.495 V; the triangular membership functions are significantly activated for specific fuzzy sets in each input variable. The yellow areas in Figure 11 indicate the activated functions, while the vertical red line shows the precise input value. The fuzzy inference process applies the rules defined in the rule base (12 rules in total, as shown in Figure 12) to produce an aggregated output corresponding to a fault level. The final result, after defuzzing using the centroid method, yields a value of 0.708, as shown in the last column of Figure 11. This value is interpreted according to the output membership functions.
The 0.708 value lies within the overlap of output functions F07 and F08. However, the closest peak and the highest membership degree clearly correspond to F07, indicating a moisture fault in the PV system. This type of fault is consistent with gradual decreases in output power due to condensation or water infiltration into the modules, affecting their electrical performance.
These results validate the effectiveness of the fuzzy method in automatic and interpretable fault recognition in PV systems, especially in situations where input data are imprecise or have subtle variations. The system demonstrates a good ability to detect and classify faults from a small set of electrical measurements, making it suitable for field implementations with limited resources.

4. Conclusions

This work presents an effective method for fault detection in photovoltaic (PV) systems based on Mamdani-type fuzzy logic. Based on four key electrical parameters (Pmax, Isc, Voc, Vc), the proposed algorithm demonstrated its ability to diagnose various malfunction scenarios, including those related to shading, insulation faults, bypass diode problems, and humidity effects. Using triangular membership functions and a set of IF–THEN linguistic rules, the system provides intuitive and robust data interpretation, even in the presence of uncertainties or nonlinear variations. Simulation results showed that the fuzzy logic controller could accurately identify fault types and provide a clear response, as illustrated by the correct classification of a humidity fault (F07) based on a set of measured inputs. This type of approach improves the reliability of real-time diagnostics and enables efficient preventive maintenance of PV installations.
In summary, fuzzy logic represents a promising solution for intelligent monitoring of photovoltaic systems, particularly in dynamic and partially uncertain environments. Future work may incorporate automatic rule optimization, adaptive learning, or combination with artificial intelligence techniques to further enhance the accuracy and generalization capacity of the proposed system.

Author Contributions

Conceptualization, C.A. and Y.L.; methodology, C.A.; software, C.A.; valdation, C.A. and Y.L.; formal analysis, C.A.; investigation, C.A. and Y.L.; resources, C.A.; data curation, C.A.; writing—original draft preparation, C.A.; writing—review and editing, C.A.; visualization, C.A.; supervision, Y.L.; project administration, Y.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available upon request from the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Compaore, W.O. Aide à la Décision Pour le Diagnostic des Défauts Pour une Maintenance Proactive Dans un Générateur photovoltaïque. Ph.D. Thesis, Université Joseph Ki-Zerbo, Ouagadougou, Burkina Faso, 2023. [Google Scholar]
  2. Khan, J.A.; Tang, S.; Ji, B.; Khan, F.; Khan, M.A.; Khalil, U.K.; Ullah, I. A fuzzy classification method based on rules learning for shaded and unshaded hotspot faults on photovoltaic modules. J. Clean. Prod. 2024, 449, 141785. [Google Scholar] [CrossRef]
  3. Damo, U.M.; Ozoegwu, C.G.; Ogbonnaya, C.; Maduabuchi, C. Effects of light, heat and relative humidity on the accelerated testing of photovoltaic degradation using Arrhenius model. Sol. Energy 2023, 250, 335–346. [Google Scholar] [CrossRef]
  4. Khan, S.A.; Mahmood, T.; Awan, K.S. A nature based novel maximum power point tracking algorithm for partial shading conditions. Electr. Eng. Electromech. 2021, 6, 54–63. [Google Scholar] [CrossRef]
  5. Dhimish, M.; Badran, G. Photovoltaic Hot-Spots Fault Detection Algorithm Using Fuzzy Systems. IEEE Trans. Device Mater. Relib. 2019, 19, 671–679. [Google Scholar] [CrossRef]
  6. Ali, A.I.M.; Mohamed, H.R.A. Improved P&O MPPT algorithm with efficient open-circuit voltage estimation for two-stage grid-integrated PV system under realistic solar radiation. Int. J. Electr. Power Energy Syst. 2022, 137, 107805. [Google Scholar] [CrossRef]
  7. Akter, K.; Motakabber, S.M.A.; Alam, A.H.M.Z.; Yusoff, S.H.B. Design and investigation of high power quality PV fed DC-DC boost converter. e-Prime-Adv. Electr. Eng. Electron. Energy 2024, 9, 100649. [Google Scholar] [CrossRef]
  8. Sebbane, S.; Ncir, N.; El Akchioui, N. Diagnosis and Classification of Photovoltaic Panel Defects Based on a Hybrid Intelligent Method. In The Proceedings of the International Conference on Electrical Systems & Automation; Bendaoud, M., Wolfgang, B., El Fathi, A., Eds.; Springer: Singapore, 2022; pp. 59–69. [Google Scholar] [CrossRef]
  9. Nicholas, T.N.; Sigalo, F.B.; Alabraba, M.A. Characterizing the Photovoltaic Solar Panel for Maximum Power Output. J. Sci. Eng. Res. 2018, 5, 143–151. [Google Scholar]
  10. Arkan, F.; Izadyar, M. Theoretical prediction of voltage-current behavior and other photovoltaic properties of natural flavonoid-based solar cells. Sol. Energy 2021, 228, 89–99. [Google Scholar] [CrossRef]
  11. El Karch, H.; Abouelmahjoub, Y.; Mchaouar, Y.; El Beid, S.; Giri, F.; Elouafi, M. Advanced Nonlinear Control of Shunt Active Power Filter Connected to PV System via DC/DC Converter. IFAC-PapersOnLine 2024, 58, 104–109. [Google Scholar] [CrossRef]
  12. Nebti, K.; Lebied, R. Fuzzy maximum power point tracking compared to sliding mode technique for photovoltaic systems based on DC-DC boost converter. Electr. Eng. Electromech. 2021, 1, 67–73. [Google Scholar] [CrossRef]
  13. Ullah, K.; Ishaq, M.; Tchier, F.; Ahmad, H.; Ahmad, Z. Fuzzy-based maximum power point tracking (MPPT) control system for photovoltaic power generation system. Results Eng. 2023, 20, 101466. [Google Scholar] [CrossRef]
  14. Baz, A.; Logeshwaran, J.; Natarajan, Y.; Patel, S.K. Deep fuzzy nets approach for energy efficiency optimization in smart grids. Appl. Soft Comput. 2024, 161, 111724. [Google Scholar] [CrossRef]
  15. Hartani, M.A.; Hamouda, M.; Abdelkhalek, O.; Mekhilef, S. Sustainable energy assessment of multi-type energy storage system in direct-current-microgrids adopting Mamdani with Sugeno fuzzy logic-based energy management strategy. J. Energy Storage 2022, 56, 106037. [Google Scholar] [CrossRef]
  16. Marhraoui, S.; Abbou, A.; Cabrane, Z.; Rhaili, S.E.; Hichami, N.E. Fuzzy Logic-Integral Backstepping Control for PV Grid-Connected System with Energy Storage Management. Int. J. Intell. Eng. Syst. 2020, 13, 359–372. [Google Scholar] [CrossRef]
  17. Wang, D.; Yu, K.; Zhu, X.; Yu, Z. Optimal solutions to granular fuzzy relation equations with fuzzy logic operations. Appl. Soft Comput. 2024, 163, 111861. [Google Scholar] [CrossRef]
Figure 1. Graph of solar radiation and relative humidity in Larache, Morocco, 2024.
Figure 1. Graph of solar radiation and relative humidity in Larache, Morocco, 2024.
Csmf 10 00004 g001
Figure 2. The equivalent electrical circuit of a PV cell to a diode.
Figure 2. The equivalent electrical circuit of a PV cell to a diode.
Csmf 10 00004 g002
Figure 3. MATLAB/Simulink model of the simulated PV system.
Figure 3. MATLAB/Simulink model of the simulated PV system.
Csmf 10 00004 g003
Figure 4. (a) I-V characteristic of PV faults; (b) P-V characteristic of PV faults.
Figure 4. (a) I-V characteristic of PV faults; (b) P-V characteristic of PV faults.
Csmf 10 00004 g004
Figure 5. Impact of faults on boost converter output.
Figure 5. Impact of faults on boost converter output.
Csmf 10 00004 g005
Figure 6. Fuzzy logic controller (FLC).
Figure 6. Fuzzy logic controller (FLC).
Csmf 10 00004 g006
Figure 7. (a) The general setup of a fuzzy system; (b)the detector component.
Figure 7. (a) The general setup of a fuzzy system; (b)the detector component.
Csmf 10 00004 g007
Figure 8. A flow chart for the suggested FLC fault diagnostic and detection technique.
Figure 8. A flow chart for the suggested FLC fault diagnostic and detection technique.
Csmf 10 00004 g008
Figure 9. The proposed four-input single-output Mamdani-type FLC.
Figure 9. The proposed four-input single-output Mamdani-type FLC.
Csmf 10 00004 g009
Figure 10. Fuzzy logic system inputs: (a) Pmax; (b) Isc; (c) Voc; and (d) Vc.
Figure 10. Fuzzy logic system inputs: (a) Pmax; (b) Isc; (c) Voc; and (d) Vc.
Csmf 10 00004 g010
Figure 11. Visualization of the rules of the fuzzy logic system.
Figure 11. Visualization of the rules of the fuzzy logic system.
Csmf 10 00004 g011
Figure 12. (a) Output of the Fuzzy logic system; (b) surface of the system.
Figure 12. (a) Output of the Fuzzy logic system; (b) surface of the system.
Csmf 10 00004 g012
Table 1. Electrical characteristics of a simulated PV module.
Table 1. Electrical characteristics of a simulated PV module.
ParameterValue
PPPM249.952 W
VPPM42.8 V
IPPM5.84 A
VOC50.93 V
ISC6.2 A
NCell72
Diode ideality factor1.0262
Shunt resistance RSh420.5449 Ω
Series resistance RS0.37748 Ω
Table 2. Faults in the PV system under examination.
Table 2. Faults in the PV system under examination.
ComponentsFaultsFault Code
PV array25% shadingF01
50% shadingF02
75% shadingF03
100% shadingF04
Temperature increaseF05
Reverse bypass diodeF06
Humidity 100%F07
Humidity more than 50%F08
Humidity less than 50%F09
DC-DC Boost ConverterMPP Controller FailureF10
Short circuit F11
Open circuitF12
Table 3. FLC reference values for every incorrect occurrence.
Table 3. FLC reference values for every incorrect occurrence.
FaultPmax (W)ISC (A)VOC (V)VC (V)
F00249.9525.8442.8290.5
F01187.3984.38291242.7565254.7
F02124.3312.9260142.4916213.3
F0361.0811.4604941.8225149.2
F0423.62640.584540.421585.99
F05226.4485.8127438.9572281.2
F065.0026.25250.80620.8117
F07174.5654.134142.2107256.8
F08189.6914.3910742.1807261.1
F09212.275.02842.1472279.7
F10249.9525.8442.860.7
F110.0925.8442.80
F12249.9525.8442.850.06
Table 4. Distortion rate of all parameters for each faulty case.
Table 4. Distortion rate of all parameters for each faulty case.
Fault Distortion Rate of
Pmax (W)ISC (A)VOC (V)VC (V)
F000000
F010.25260.24950.001010.1171
F020.502580.498970.00720.2606
F030.755620.749910.0220.4828
F040.905470.899910.05550.7019
F050.094030.00460.10380.0253
F060.97998−0.07060.98110.9971
F070.30160.29210.013760.1160
F080.241090.24810.014470.1012
F090.150750.13900.015250.0371
F100000.7896
F110.99963001
F120000.8264
Table 5. Fuzzy logic of all parameters for each faulty case.
Table 5. Fuzzy logic of all parameters for each faulty case.
FaultDistortion Rate of
Pmax (W)ISC (A)VOC (V)VC (V)
F00SmallSmallSmallSmall
F01SmallMediumSmallSmall
F02MediumMediumSmallMedium
F03BigBigMediumMedium
F04BigBigBigBig
F05SmallSmallBigSmall
F06BigSmallBigBig
F07 MediumMediumSmall
F08SmallMediumMediumSmall
F09SmallSmallMediumSmall
F10SmallSmallSmallMedium
F11BigSmallSmallBig
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.

Share and Cite

MDPI and ACS Style

Abdellaoui, C.; Lagmich, Y. Fuzzy Logic Detector for Photovoltaic Fault Diagnosis. Comput. Sci. Math. Forum 2025, 10, 4. https://doi.org/10.3390/cmsf2025010004

AMA Style

Abdellaoui C, Lagmich Y. Fuzzy Logic Detector for Photovoltaic Fault Diagnosis. Computer Sciences & Mathematics Forum. 2025; 10(1):4. https://doi.org/10.3390/cmsf2025010004

Chicago/Turabian Style

Abdellaoui, Chaymae, and Youssef Lagmich. 2025. "Fuzzy Logic Detector for Photovoltaic Fault Diagnosis" Computer Sciences & Mathematics Forum 10, no. 1: 4. https://doi.org/10.3390/cmsf2025010004

APA Style

Abdellaoui, C., & Lagmich, Y. (2025). Fuzzy Logic Detector for Photovoltaic Fault Diagnosis. Computer Sciences & Mathematics Forum, 10(1), 4. https://doi.org/10.3390/cmsf2025010004

Article Metrics

Back to TopTop