Battery internal faults are one of the major factors causing safety concern, performance degradation, and cost increases. To extend the lifetime of the battery and bring more security in the system, internal fault detection of solar battery is proposed in this paper using an unsupervised machine learning algorithm based on anomaly detection method. The advantages of adopting such a method consist of using unlabeled data that meet the battery case in the difficulty of obtaining the fault data. In contrast, healthy data can easily be obtained from the battery and therefore allows building the anomaly detection algorithm. The effectiveness of the proposed method is validated using a simulation platform of a stand-alone photovoltaic system developed in Matlab/Simulink that takes as system input a real profile of irradiance and temperature captured from the Centre de Development des Energies renewable (CDER), Algeria. The test results in real-time data show the ability of the proposed approach to detect the fault occurrence in the battery.
- anomaly detection
- internal faults
The future development of stand-alone photovoltaic (SAPV) systems will know a progression in all countries, especially in remote areas and islands . The battery is the main component in SAPV system, since it represents 43% of lifecycle costs for this system , where this lifecycle could significantly reduce in badly work conditions. To check continuously the status of battery and aging, monitoring of internal resistance is proposed in [3, 4] proposed an estimation of solar irradiation to monitor the overcharge and internal resistance in Battery. Other studies [5, 6, 7, 8] focusing to assess the performance of the whole SAPV system using energy parameters. This latter provides an analysis of SAPV system, where the battery takes a part in this system. Fault diagnosis in SAPV system including the specific fault battery external short-circuit is proposed in [9, 10] using Artificial Neural Network, the study is experimentally validated an additionally integrated with the system using Matlab Graphical User Interface (GUI) . Battery performance evaluation in PV-diesel hybrid system is proposed in  where the analysis requires many days and provides inaccurate results concerning the battery state.
The failure developed in battery, in particular, the internal faults could bring a difficulty to eliminate them by electrical protection elements such as fuse or circuit-breaker by reason of absence an appropriate selection of fuse for this circuit . This will result in undetected faults that conduct the battery to work in low performance and decrease its lifecycle, furthermore, it increases the risk of fire hazard and even an explosion, without account the contamination of equipment’s beside . To solve this problem and overcome the limitation of existed battery fault analysis, this paper proposes internal faults detection of solar battery using anomaly detection technique. This method is commonly utilized for fault detection  specifically in the photovoltaic system [15, 16], where the proposed anomaly detection prediction model has the ability of development with only normal data and using the readily available battery voltage and current without requiring extra sensor circuit. Furthermore, it could recognize any non-specific failure in battery which makes them a promising choice for practical application.
The training and test for validation have been performed using data from the simulation platform of SAPV system, the battery is adequately represented in Matlab\SimPowerSystem to allows the creation of fault such as short-circuit and ground-fault. In addition, to make the simulation varies along with irradiance level and temperature, a real climatic measurements profile captured from CDER is used as input to estimate the output.
The test results of fault detection using anomaly detection method in real-time data show the capability of anomaly detection to recognize all the faults in the battery.
2. Modeling of SAPV system
2.1 Output PV panel modeling
The output current and voltage of PV panel is obtained using the common one-diode model , in which the relationship I-V is given as follow:
2.2 Battery modeling
The charge and discharge models of lead-acid battery implemented in SimPowerSystems simulation environment  are summarized in the following:
2.2.1 Model for charge
2.2.2 Model for discharge
2.3 Load and charge regulator representation
The load is represented by a resistance connected in parallel with the PV panels and battery. The charge regulator consists of a simple switch on/off placed in one side between PV panels and battery in our case.
3. Proposed fault detection method
Anomaly detection or known as novelty detection or outlier detection  is one the most machine learning technique used in fault detection , which aim to detect abnormalities or unusual operation that can come up, it makes the assumption that the data are distributed according to Gaussian (or Normal) distribution and this latter can be modeled based on two parameters: the mean μ and the variance σ2.
Three phases are required to build an anomaly detection model, the first is training phase, where the Gaussian distribution is estimated by the parameters μ and σ2, the second is validation phase, in this step, some threshold ε is selected as a limit of being an anomaly (outlier) compared to the Gaussian probability function, the third is testing phase, in which a test is performed to check the performance of the model. In the following, Mathematical equations behind this approach are given.
3.1 Gaussian distribution
Fit a model of Gaussian distribution from data relies on the assumption that huge number of data used is normal data. For each feature
3.2 Estimation parameters for Gaussian distribution
The parameters of Gaussian distribution
3.3 Choosing the value of threshold ε
To decide if new examples are anomalies or not, the procedure consists to compare the value of Gaussian probability density with a threshold or limit, if the probability is lower than a certain threshold then these examples are anomalies. However, the selection of the threshold ε could be done by the trial-error method using the F1 score (Eq. (7)) metric as criteria. As shown in Figure 2, the algorithm proceeds to try several values of ε, where the chosen value of ε corresponds to the maximum F1 score  defined below:
4. Case study
A small SAPV system composed of 2 PV panels (212 Wp) connected with a battery of 1200 Ah and a load of 50 W is considered in this work. The PV panel used is Isofoton 106 W-12 V, where the parameters for this panel are obtained from . Industrial lead-acid battery of 12 V contains six cells connected in series, in order to investigate internal faults in the battery, each cell is represented by a single battery of 2 V connected in series to model a real battery of 12 V, we point out that the cells are assumed has identical electrical characteristics.
The object of this paper is detecting internal faults that occur in the battery, where two faults are considered: ground fault and short-circuit (Figure 3), in which ground fault situate at three locations: upper, middle and lower, and short-circuit between cells consist of 1, 2, 3, 4 or 5 cells circuited. These faults are used to test and evaluate the detection approach.
5. Results and discussion
A real environmental measurement (irradiance and temperature) illustrated in Figure 4, taken from CDER, Bouzareah, Algeria, In which nine clear days are used as input to simulate the SAPV system under Matlab/Simulink.
In the following, some scenarios of faults are performed in order to test the capability of anomaly detection to recognize these faults using the last 4 days of data constituted of battery voltage and current, The Gaussian probability density is calculated and plotted with the threshold ε before and after occurring the fault.
In Figure 5 a test for the Normal operation is realized, it can be seen that the probability does not drop below the threshold ε apart three false alarms noticed, which means there is no fault detected by the detector system.
As illustrated in Figure 6, when a ground fault in the upper cell occurs, the probability decrease under the threshold ε after a certain time, and Figure 7 shows a ground fault in the middle cell, which takes longer time than the previous fault before to be detected.
In Figure 8 a short-circuit between 2 cells is created and as illustrated this fault take much time to descend under the threshold ε, while in Figure 9 a similar fault is created with Rf ≈ 0, then the probability drop below the threshold instantly and detected.
Figure 10 indicates the detection of short-circuit of 5 cells after a specific time of occurring this fault. From all these figures, it shows that all the faults are detected, whereas some faults take much time to detected than other, and this by the fact that the faulted voltage and current of Battery is reduced gradually and not immediately, and this depend on the external circuitry at moment of fault, in our case this is due to the value of Rf.
In this paper, a detection of battery cell interconnection fault is proposed using anomaly detection algorithm. The method has the benefits of using only the steady-state of battery and uses the easily available battery voltage and current to predict the internal fault in battery. Based on simulation data, the anomaly detection is developed and tested for validation, where in the simulation environment, the battery unit is viewed as series-connected battery cells. In this way, several typical faults such as internal short and ground fault are carried out. The proposed method is capable to effectively predict the battery internal faults, where the analysis finding reveal that as more battery cell are involved at faults or the fault circuit has negligible resistance, the fault detection becoming much faster to indicate the fault occurrence. The future work consists to implement this method on real battery as well as extend the application of battery fault detection to include battery EV and other appliances. Furthermore, another method based on a statistical approach to select the threshold ε in a better way would be proposed in the future, these techniques will perfectly manage to find the outlier of battery operation.
IEA-PVPS. Trends 2018 in Photovoltaics Applications. Report IEA PVPS T1-34:2018. 2018. pp. 73-91
Luque A, Hegedus S. Handbook of Photovoltaic Science and Engineering. John Wiley Sons, Ltd; 1 Jan 2003;92-100
Kim M, Hwang E. Monitoring the battery status for photovoltaic systems. Journal of Power Sources. 1997; 64(97):193-196
Tadj M, Benmouiza K, Cheknane A. An innovative method based on satellite image analysis to check fault in a PV system lead-acid battery. Simulation Modelling Practice and Theory. 2014; 47(14):236-247
Mayer D, Heidenreich M. Performance analysis of stand alone PV systems from a rational use of energy point of view. In: 3rd World Conference on Photovolt Energy Conversion; 2003
Muñoz FJ, Almonacid G, Nofuentes G, Almonacid F. A new method based on charge parameters to analyse the performance of stand-alone photovoltaic systems. Solar Energy Materials & Solar Cells. 2006; 90(06):1750-1763
Muñoz FJ, Echbarthi I, Nofuentes G, Fuentes M, Aguilera J. Estimation of the potential array output charge in the performance analysis of stand-alone photovoltaic systems without MPPT (Case study: Mediterranean climate). Solar Energy. 2009; 83(09):1985-1997
Torres M, Muñoz FJ, Muñoz JV, Rus C. Online monitoring system for stand-alone photovoltaic applications—Analysis of system performance from monitored data. Journal of Solar Energy Engineering. 2012; 134:034502-1
Sabri N, Tlemçani A, Chouder A. Faults diagnosis in stand-alone photovoltaic system using artificial neural network. In: 2018 6th International Conference on Control Engineering & Information Technology (CEIT); 2018. pp. 1-6
Sabri N, Tlemcani A, Chouder A. Intelligent fault supervisory system applied on stand-alone photovoltaic system. In: Proceedings of the 2018 International Conference on Applied Smart Systems (ICASS 2018); 2019
Sabri N, Tlemçani A, Chouder A. Monitoring Tool for Stand-Alone Photovoltaic System Using Artificial Neural Network BT—Renewable Energy for Smart and Sustainable Cities. In: Hatti M, editor. Cham: Springer International Publishing; 2019. p. 114-21
IEA-PVPS. A User Guide to Simple Monitoring and Sustainable Operation of PV-Diesel Hybrid Systems. Report IEA PVPS T9-16:2015. 2015
Nailen RL. Battery protection-where do we stand? IEEE Transactions on Industry Applications. 1991; 27(4):658-667
Purarjomandlangrudi A, Ghapanchi AH, Esmalifalak M. A data mining approach for fault diagnosis: An application of anomaly detection algorithm. Measurement [Internet]. 2014; 55:343-352
Zhao Y, Lehman B, Ball R, Mosesian J, de Palma J. Outlier detection rules for fault detection in solar photovoltaic arrays. In: 2013 Twenty-Eighth Annual IEEE Applied Power Electronics Conference and Exposition (APEC); 2013. pp. 2913-2920
Zhao Y, Balboni F, Arnaud T, Mosesian J, Ball R, Lehman B. Fault experiments in a commercial-scale PV laboratory and fault detection using local outlier factor. In: 2014 IEEE 40th Photovoltaic Specialist Conference (PVSC); 2014. pp. 3398-3403
Castaner L, Silvestre S, Castaaner L. Modelling Photovoltaic Systems Using PSpice. Chichester: John Wiley & Sons, Ltd; 2002
Villalva MG, Gazoli JR, Filho ER. Comprehensive approach to modeling and simulation of photovoltaic arrays. IEEE Transactions on Power Electronics. 2009; 24(5):1198-1208
Tremblay O, Dessaint LA. Experimental validation of a battery dynamic model for EV applications. World Electric Vehicle Journal. 2009; 03:0289-0298
Marsland S. Novelty detection in learning systems. Neural Computing Surveys. 2002; 03:1-39
Markou M, Singh S. Novelty detection: A review—Part 1: Statistical approaches. Signal Processing [Internet]. 2003; 83(12):2481-2497
Chouder A, Silvestre S. Automatic supervision and fault detection of PV systems based on power losses analysis. Energy Conversion and Management. 2010; 51(10):1929-1937