Multi-layer photovoltaic fault detection algorithm

: This study proposes a fault detection algorithm based on the analysis of the theoretical curves which describe the behaviour of an existing grid-connected photovoltaic (GCPV) system. For a given set of working conditions, a number of attributes such as voltage ratio (VR) and power ratio (PR) are simulated using virtual instrumentation LabVIEW software. Furthermore, a third-order polynomial function is used to generate two detection limits (high and low limits) for the VR and PR ratios. The high and low detection limits are compared with real-time long-term data measurements from a 1.1 kWp GCPV system installed at the University of Huddersfield, United Kingdom. Furthermore, samples that lie out of the detecting limits are processed by a fuzzy logic classification system which consists of two inputs (VR and PR) and one output membership function. The obtained results show that the fault detection algorithm accurately detects different faults occurring in the PV system. The maximum detection accuracy (DA) of the proposed algorithm before considering the fuzzy logic system is equal to 95.27%; however, the fault DA is increased up to a minimum value of 98.8% after considering the fuzzy logic system.


Introduction
Despite the fact that grid-connected photovoltaic (GCPV) systems have no moving parts, and therefore usually require low maintenance, they are still subject to various failures and faults associated with the PV arrays, batteries, power conditioning units, utility interconnections and wiring [1,2].It is especially difficult to shut down PV modules completely during faulty conditions related to PV arrays (DC side) [3].It is therefore required to create algorithms to facilitate the detection of possible faults occurring in GCPV systems [4].
There are existing fault detection techniques for use in GCPV systems.Some use satellite data for fault prediction as presented by Tadj et al. [5]; this approach is based on satellite image for estimating solar radiation data and predicting faults occurring in the DC side of the GCPV system.However, some algorithms do not require any climate data such as solar irradiance and modules' temperature, but instead use Earth capacitance measurements in a technique established by Takashima et al. [6].
Some fault detection methods use an automatic supervision based on the analysis of the output power for the GCPV system.Chouder and Silvestre [7] presented a new automatic supervision and fault detection technique which uses a standard deviation method (±2σ) for detecting various faults in PV systems such as faulty modules in a PV string and faulty maximum power point tracking (MPPT) units.However, Silvestre et al. [8] presented a new fault detection algorithm based on the evaluation of the current and output voltage indicators for analysing the type of fault occurred in PV systems installations.
PV fault detection technique based on artificial neural network is proposed by Chine et al. [9].The technique is based on the analysis of the voltage, power and the number of peaks in the current-voltage (I-V) curve characteristics.However, Dhimish and Holmes [10] and Dhimish et al. [11] proposed a fault detection algorithm which allows the detection of seven different fault modes on the DC side of the GCPV system.The algorithm uses the t-test statistical analysis technique for identifying the presence of systems fault conditions.
Other fault detection algorithms focus on faults occurring on the AC side of GCPV systems, as proposed by Platon et al. [12].The approach uses ±3σ statistical analysis technique for identifying the faulty conditions in the DC/AC inverter units.Moreover, hot-spot detection in PV substrings using the AC parameters characterisation was developed by Kim et al. [13].The hot-spot detection method can be further used and integrated with DC/DC power converters that operate at the subpanel level.Nevertheless, the analysis of the I-V indicators in a GCPV system operating in partial shading (PS) faulty conditions is created by Silvestre et al. [8].
A comprehensive review of the faults, trends and challenges of the GCPV system is explained by Obi and Bass [14], Alam et al. [15] and Khamis et al. [16].
Currently, fuzzy logic systems are widely used with GCPV systems.Boukenoui et al. [17] proposed a new intelligent MPPT method for standalone PV system operating under fast transient variations based on fuzzy logic controller (FLC) with scanning and storing algorithm.Furthermore, Mutlag et al. [18] present an adaptive FLC design technique for PV inverters using differential search algorithm.However, to the best of our knowledge, few of the reviewed articles used a fuzzy classifier system in order to investigate the faulty condition occurring in the DC side of the GCPV system.
Since many fault detection algorithms use statistical analysis techniques such as [10][11][12]19], this work proposes a fault detection algorithm that does not depend on any statistical approaches in order to classify faulty conditions in PV systems.Furthermore, some existing fault detection techniques such as [20,21] use a complex power circuit design to facilitate the fault detection in GCPV systems.However, the proposed fault detection algorithm depends only on the variations of the voltage and the power, which makes the algorithm simple to construct and reused in wide range of GCPV systems.
In this work, we present the development of a fault detection algorithm which allows the detection of possible faults occurring on the DC side of GCPV systems.The algorithm is based on the analysis of theoretical voltage ratio (VR) and power ratio (PR) for the examined GCPV system.High and low detection limits are generated using third-order polynomial functions which are obtained using the simulated data of the VR and PR ratios.Subsequently, if the theoretical curves are not capable to detect the type of the fault occurred in the GCPV system, a fuzzy logic classifier system is designed to facilitate the fault type detecting for the examined PV system.A software tool is designed using virtual instrumentation (VI) LabVIEW software to automatically display and monitor the possible faults occurring within the GCPV system.A LabVIEW VI is also used to log the measured power, voltage High Volt.This is an open access article published by the IET and CEPRI under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0/)and current data for the entire GCPV system, more details regarding the VI LabVIEW structure is presented in [22].
The main contribution of this work is the development and the theoretical implementation of a simple, fast and reliable GCPV fault detection algorithm.The algorithm does not depend on any statistical techniques which make it easier to facilitate and detect faults based on theoretical curves analysis and fuzzy logic classification system.In practise, the proposed fault detection algorithm is capable of localising and identifying faults occurring on the DC side of GCPV systems.The types of faults which can be detected are based on the size of the GCPV system, which will be discussed in the next section.
This paper is organised as follows: Section 2 describes the methodology which consists of the PV theoretical power curve modelling and the proposed fault detection algorithm, while Section 3 shows the validation and a brief discussion of the obtained results.Finally, Sections 4 and 5 describe the conclusion and acknowledgment, respectively.

PV theoretical power curve modelling
All the DC side of the GCPV system is modelled using the fiveparameter model.The voltage and current characteristics of the PV module can be obtained using the single diode model [23] as shown in (1) where I ph is the photo-generated current, I 0 is the dark saturation current, R s is the module series resistance, R sh is the panel parallel resistance, ns is the number of series cells in the PV module and V t is the thermal voltage and it can be defined based on (2) where A is the ideal diode factor, k is Boltzmann's constant and q is the charge of the electron.
The five-parameter model is determined by solving the transcendental (1) using Newton-Raphson algorithm [24] based only on the datasheet of the available parameters for the examined PV module as shown in Table 1 under standard test conditions (STCs).STC conditions are the industrial standards for the conditions under which PV modules are tested and are the same for all PV modules: a cell temperature (T) of 25°C and an irradiance (G) of 1000 W/m 2 with an air mass 1.5 (AM1.5).The power produced by the PV module in watts can be easily calculated along with the I-V that is generated using (1); therefore The power-voltage (P-V) curve analysis of the tested PV module is shown in Fig. 1 under various irradiance levels and fixed PV module temperature (25°C).The maximum P-V for each irradiance level under the same temperature value can be expressed by the P-V curves.The purpose of using the analysis for the P-V curves is to generate the expected output power of the examined PV module; therefore, it can be used to predict the error between the measured PV data and the theoretical P-V performance.
The proposed PV fault detection algorithm can detect various faults in the GCPV systems such as: • PS condition affects the GCPV system.• One faulty PV module and PS.
• Two faulty PV modules and PS.• (n−1) Faulty PV modules and PS, where n is the total number of PV modules in the GCPV system.

Proposed multi-layer fault detection algorithm
The main objective of the fault detection algorithm is to detect and determine when and where a fault has occurred in the GCPV system.To generate the expected theoretical P-V curve as described previously in Section 2.1, the first layer of the fault detection algorithm passes the measured irradiance level and PV module's temperature to VI LabVIEW software.
To determine if a fault has occurred in a GCPV system, two ratios have been identified.The theoretical PR and the theoretical VR have been used to categorise the region of the fault.It is necessary to use both ratios because: i. both ratios are changeable during faulty conditions in the PV systems and ii.when the PR is equal to zero, the VR can still have a value regarding the voltage open circuit of the PV modules.The PR and VR ratios are given by ( 4) and ( 5), respectively where P G, T is the theoretical output power generated by the GCPV system at specific G (irradiance) and T (module temperature) values, n is the number of PV modules, V G, T is the theoretical output voltage generated by the GCPV system at specific G and T values and both V 0, P 0 are the maximum operating voltage and power under STC.
The number of faulty PV modules can be expressed by the number of PV modules in the examined PV string.For example, if the PV string comprises five PV modules connected in series, then, n = 5.
In reality, the internal sensors used to measure the voltage and current for a GCPV system have efficiencies of <100%.This tolerance rate must, therefore, be considered in the PR and VR ratio calculations.For this instance, the PR and VR values are divided into two limits: i. High limit: where the maximum operating efficiency of the sensors is applied; therefore, the high limits for both PR and VR ratios are expressed by ( 4) and (5).ii.Low limit: where the efficiency (tolerance rate) of the sensors is applied.Both limits can be expressed by the following formulas: where η sensor is the efficiency of both the voltage and current sensors, while, η sensor1 is the efficiency of the voltage sensor η sensor = η sensor1 voltage sensor efficiency + η sensor2 current sensor efficiency The PR and VR high and low detection limits are evaluated for an examined GCPV system using various irradiance levels, as described in the third layer in Fig. 2. For this particular layer, the analysis of the PR versus VR curves can be seen in the example shown next to layer 5, Fig. 2.This example shows the high and low detection limits for two case scenarios: one faulty PV module and two faulty PV modules, where both curves are created using thirdorder polynomial functions.The purpose of the third-order polynomial curves is to generate a regression function which describes the performance of the curves which are created by the theoretical points using VI LabVIEW software.
The overall GCPV fault detecting algorithm is explained in Fig. 2. Layer 5 shows the measured data versus the third-order polynomial curves generated by VI LabVIEW software.The measured PR and measured VR can be evaluated using (9) measured PR versus measured VR = In case of which the measured PR versus VR is out of range F high limit < measured PR versus measured VR < F low limit Therefore, the fault detection algorithm cannot identify the type of the fault that has occurred in the GCPV system.However, it can predict two possible faulty conditions which might occur in the GCPV system.As shown in Fig. 2, layer 5 example.The measured data 2 indicates two possible faulty conditions: i. faulty PV module and PS effects on the GCPV system and ii.two faulty PV modules and PS effects on the GCPV system.Thus, out of range samples are processed by a fuzzy logic classifier as shown in Fig. 2, layer 6.
The difference between the proposed curve modelling fault detection technique with other similar approaches described by [7][8][9][10] is that the algorithm contains the number of modules in the GCPV system, in addition to using third-order polynomial function which can be used to plot a regression function that describes the behaviour of the faulty region and the design of a fuzzy logic fault classification which is described in the next section (Section 2.3).
In addition, the proposed fault detection algorithm can work with different environmental scenarios.For example, if the G and T are above the STC conditions, the multi-layer PV detection algorithm still can simulate the variations of the PR and VR ratios.Therefore, the proposed detection limits can be used to detect possible PV faults occurring in various environmental conditions.

Fuzzy logic classification system
Nowadays, fuzzy logic systems became more in use with PV systems.A brief overview of the recent publications on fuzzy logic system design is presented by Suganthi et al. [25].From the literature reviewed previously in Section 1, currently, there is a lack of research in the field of fuzzy logic classification systems which are used in examining faulty conditions in PV plants.Therefore, in this paper, a fuzzy logic classifier is demonstrated and verified experimentally.
Fig. 3 describes the overall fuzzy logic classifier system design.The fuzzy logic system consists of two inputs: VR and PR, denoted in Fig. 3 as (A) and (B), respectively.The membership function for each input is divided into five fuzzy sets described as: PS, 1 (one faulty PV module), 2 (two faulty PV modules), 3 (three faulty PV modules) and 4 (four faulty PV modules).The fuzzy interface applies the approach of Mamdani method (min-max) managed by the fuzzy logic system rule, stage 2 of the fuzzy logic system.After the rules application, the output is applied to classify the fault detection type occurred in the GCPV system.
A brief calculation of each membership function for VR, PR and the fuzzy logic membership output function is reported in Fig. 3.The membership functions are based on the mathematical calculation of the examined GCPV system.The examined GCPV system which is used to evaluate the performance of the fault detection algorithm is demonstrated briefly in Section 3.1.Both fuzzy logic system inputs VR and PR are evaluated at the maximum P-V of the GCPV system, which are equal to 1100 Wp and 143.5 V.In addition, the mathematical calculations include the PS conditions which might affect the performance of the entire PV system.
The fuzzy logic system rules are based on: if, and statement.Each case scenario is presented after the fuzzy logic system rule as shown in Table 2.However, the output membership function is divided into five sets: PS (0-0.2),one faulty PV module (0.2-0.4), two faulty PV modules (0.4-0.6), three faulty PV modules (0.6-0.8) and four faulty PV modules (0.8-1.0).Furthermore, the output surface for the fuzzy logic classifier system is plotted and represented by a three-dimensional curve as shown in Fig. 4, where the x-axis presents the PR, y-axis presents the VR and the fault detection output classification is on the z-axis.

Multi-layer fault detection algorithm validation
In this section, the performance of the proposed fault detection algorithm is verified.For this purpose, the acquired data for various days have been considered using 1.1 kWp GCPV system.The time zone for all measurements is Greenwich Mean Time.

High Volt.
This is an open access article published by the IET and CEPRI under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0/)

PV system experimental setup
In this work, the PV system used consists of a GCPV comprising five polycrystalline silicon PV modules each with a nominal power of 220 Wp.The PV modules are connected in series.The PV string is connected to MPPT with an output efficiency of not <95%.The DC current and voltage are measured using the internal sensors which are part of the FLEXmax MPPT unit.A battery bank is used to store the energy produced by the PV plant.
A Vantage Pro monitoring unit is used to receive the global solar irradiance measured by the Davis weather station which includes a pyranometer.A hub 4 communication manager is used to facilitate acquisition of modules' temperature using the Davis external temperature sensor, and the electrical data for each PV string.VI LabVIEW software is used to implement data logging and monitoring functions of the GCPV system.Fig. 5a illustrates the overall system architecture of the GCPV system.
The real-time measurements are taken by averaging 60 samples, gathered at a rate of 1 Hz over a period of 1 min.Therefore, the obtained results for power, voltage and current are calculated at 1 min intervals.
The SMT6 (60) P solar module manufactured by Romag has been used in this work.The electrical characteristics of the solar module are shown in Table 1.
The fault detection algorithm has been validated experimentally over a 5 day period.On each day a different fault case scenario was implemented as shown in Fig. 5b: i. Day 1: Normal operation mode and PS effects on the GCPV system (no fault occurred in any of the tested PV modules).ii.Day 2: One faulty PV module and PS effects on the GCPV system.iii.Day 3: Two faulty PV modules and PS effects on the GCPV system.iv.Day 4: Three faulty PV modules and PS effects on the GCPV system.v. Day 5: Four faulty PV modules and PS effects on the GCPV system.
To test the effectiveness of the proposed fault detection algorithm, the theoretical and the measured output power for each case scenario was logged and compared using VI LabVIEW software.

Evaluation of the proposed theoretical curves modelling
In this section, the performance of the fault detection algorithm (theoretical curves modelling) is verified using normal operation mode and PS effects the GCPV system.Fig. 6 describes the theoretical simulation versus the real-time long-term data measurement for this particular case scenario.
To apply a PS condition to the GPCV modules, an opaque paper object has been used.The PS was applied to all PV modules at the same rate.PS condition is increased during the test.
Fig. 7a shows the entire measured data versus the theoretical detecting limits which were discussed previously in Section 2.2.As can be noted, most of the measured data lies within the high and low theoretical detection limits which are created using third-order polynomial function.The high and low detection limit functions are also illustrated in Fig 7a .PR and VR ratios for this particular test are shown in Fig 7b .Since the PS condition applied to the GCPV system is increasing, therefore, both VR and PR ratios are increasing slightly during the test.Moreover, both ratios can be measured using (9).Fig. 7b shows the efficiency of the GCPV system.The efficiency is evaluated using (10) efficiency = measured output power theoretical power From Fig. 7b, the efficiency of the GCPV system decreased while increasing the PS applied to the PV system.The detection accuracy (DA) for the proposed multi-layer fault detection algorithm is expressed by (11) DA = total number of samples − out of region samples total number of samples Using (11), the proposed algorithm has a DA equals to  detection accuracy for the PS condtion = 720 − 37 720 = 0.9486 = 94.86% In this test, the theoretical curves modelling fault detection algorithm shows a significant success for detecting PS conditions applied to the GCPV system.The DA rate can be increased using a fuzzy logic classification system.Therefore, out-of-region samples (samples which are away from the high and low detection limits) are processed by the fuzzy logic system.Each case scenario is examined during a time period of a full day as described as shown in Fig. 5b (Days 2, 3, 4 and 5), where the total number of samples for each examined day are equal to 720 samples.Fig. 8a shows the theoretical curve limits versus realtime long-term measured data.Third-order polynomial function of the theoretical high and low limits is plotted, while the minimum determination factor (R) is equal to 99.59%.
As can be noted, the measured data for each test is plotted and compared with the theoretical curve limits.Most of the measured data among the 4 day test period lies within the high and low detection limits of the theoretical curves.However, in each day, several out-of-region samples have been detected as shown in Fig. 8a.
The DA for each case scenario is calculated using (11) and reported in Table 3.The minimum and maximum DAs are equal to 94.03 and 95.27%, respectively, before considering the fuzzy logic classification system.
For each test including the test illustrated in Section 3.2, out-ofregion samples have been processed by the fuzzy logic classification system.Fig. 8b describes the performance of the fuzzy logic system during each test: • Test 1: PS, described in Section 3.   • Test 4: Three faulty PV modules and PS.
• Test 5: Four faulty PV modules and PS.
It is evident that most of the samples are categorised correctly by the fuzzy classifier.For example, before considering the fuzzy logic system, the DA for test 2 is equal to 95.27% while the DA increased up to 99.03% after taking into account the fuzzy logic classification system.This result is due to the detection of the outof-region samples.The results for this test are shown in Fig. 8b; only 7 out of 34 processed samples are detected incorrectly, whereas 27 samples have been detected correctly within an output membership function between 0.2 and 0.4.
Table 3 shows number of out-of-region samples and the DA for each test separately.The DA rate is increased up to a minimum value equals to 98.8%.
In conclusion, this section evaluates the performance of the theoretical curves modelling and the fuzzy logic system.From the obtained results, it is confirmed that the fault detection algorithm proposed in this paper is suitable for detecting faulty conditions in PV systems accurately.

Conclusion
In this work, a new GCPV fault detection algorithm is proposed.The developed fault detection algorithm is capable of detecting faulty PV modules and PS conditions which affect GCPV systems.The detection algorithm has been tested using 1.1 kWp GCPV system installed at Huddersfield University, United Kingdom.
The fault detection algorithm consists of six layers working in series.The first layer contains the input parameters of the sun irradiance and PV modules' temperature, while the second layer generates the GCPV theoretical performance analysis using VI LabVIEW software.Layer 3 identifies the PR and VR ratios, subsequently creates a high and low detection limits which will be used in layer 4 to apply the third-order polynomial regression model on the top of the PR and VR ratios.The fifth layer consists of two parts: the input parameters of the examined GCPV systems and the third-order polynomial detection limits.If the measured VR versus measured PR lies away from the detection limits, the samples will be processed by the last layer which contains the fuzzy logic classification system.
The novel contribution of this research is that the fault detection algorithm depends on the variations of the voltage and the power of the GCPV system.Additionally, the PR and VR equations contain the number of examined modules and the uncertainty of the voltage and current sensors used.Also, there are a few fuzzy logic classification systems which are used with PV fault detection algorithms; therefore, this research introduced a simple, reliable and quick fuzzy logic classification system which can be reused with various GCPV systems.
The results indicate that the fault detection algorithm is detecting most of the measured data within the theoretical limits created using third-order polynomial functions.Furthermore, the maximum DA of the algorithm before considering the fuzzy logic system is equal to 95.27%; however, the fault DA is increased up to a minimum value of 98.8% after considering the fuzzy logic system.

Fig. 1 P
Fig. 1 P-V curve modelling under various irradiance levels and fixed PV module temperature (25°C)

Fig. 2
Fig. 2 Detailed flowchart of the proposed fault detection algorithm which consists of six different layers

Fig. 3
Fig. 3 Proposed fuzzy logic system interface

Fig. 4 Fig. 5 1 6
Fig. 4 Fuzzy logic system output surface including VR, PR and the fault detection output membership function

Fig. 6 Fig. 7
Fig. 6 Theoretical power versus measured output power for a PS condition affects the examined PV system

Fig. 8
Fig. 8 Validate the proposed fuzzy logic system using various PV faulty conditions (a) Theoretical detection limits versus real-time long-term data measurements, (b) Out-of-region samples processed by the fuzzy logic system versus the output membership function

Table 2
This is an open access article published by the IET and CEPRI under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0/)

Table 3 Output
DA before and after the fuzzy logic system This is an open access article published by the IET and CEPRI under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0/)