A Generative Adversarial Network-Based Fault Detection Approach for Photovoltaic Panel
Abstract
:1. Introduction
- (1)
- A novel model-based semi-supervised generative adversarial network is proposed. Compared with the fully supervised learning model, the semi-supervised anomaly detection model does not require a large number of negative samples, which solves the problem of the anomaly detection model’s inability to be trained without negative samples.
- (2)
- The original optimization function is implemented with gradient centralization (GC) to regularize weight and output space to prevent the model from overfitting.
- (3)
- Convolutional block attention module (CBAM) is used to make the model pay more attention to the defective area, and improve the performance of the model.
- (4)
- SmoothL1loss is used to define the loss, which can combine the advantages of L1Loss and L2Loss to speed up the training of the model.
2. Related Work
2.1. Generative Adversarial Networks
2.2. PV Panel Fault Detection
3. ppFDetector Solution
3.1. GAN Model
3.1.1. Generator Network
3.1.2. Encoder Subnet
3.1.3. Discriminator Network
3.2. Loss Functions in GAN Model Training
3.2.1. Adversarial Loss
3.2.2. Contextual Loss
3.2.3. Encoder Loss
3.3. Gradient Centralizaton
3.3.1. GC Formula
3.3.2. Properties of GC
- (1)
- Weight space regularization: The projection of the weight gradient is able to constrain the weight space in a hyperplane, as shown in Figure 5, in which is a projection matrix of hyperplane with normal vector , and is projection gradient. Firstly, projecting gradient to the hyperplane is determined by , in which is the weight vector of the times iteration, then weight is updated along direction. It can be concluded that , i.e., is a constant during the training, so GC regularizes the solution space of , thus decreasing the possibility of overfitting.
- (2)
- Output space regularization: After the introduction of GC, a constant intensity change in an input feature causes a change in the output activation, which is unrelated to the current weight vector. If the mean value of the initial weight vector converges to 0, then the output activation is insensitive to changes in the interference intensity of the input features, so the output feature space is more stable to the changes in the training samples.
3.4. Convolutional Block Attention Module
3.4.1. Channel Attention
3.4.2. Spatial Attention
3.5. Anomaly Detection Strategy
4. Experiment
4.1. Dataset
4.2. Model Construction
4.3. Model Training
4.4. Model Validation
- (1)
- We evaluate the likelihood of the original image and its reconstructed image of the generator. As shown in Figure 11, in the training process, as the number of iterations increases, the difference between the original image and the reconstructed image gradually shrinks.
- (2)
- We evaluate the data distribution comparison between the original image and its reconstructed image for the positive sample and negative sample, respectively. Since only positive sample dataset is fed into the generator during the training process, only learns by the data distribution of the normal PV panel images while the data distribution of the abnormal PV panel images is unknown. When a normal PV panel image is put into the generator, the reconstructed image generated by the generator is equal to the input image because it obeys the data distribution learned by the generator, then its data distribution is infinitely close to as shown in Figure 12a. When an abnormal PV panel image is put into the generator, still encodes it into and then decodes it into in a manner that obeys the data distribution . Due to the difference between and , and are different, and its data distribution is different from as shown in Figure 12b.
- (3)
- We evaluate the error between the latent space vectors of the original image and its reconstructed image. As shown in Figure 13a, the of the positive samples (in blue color) is distributed around 10, but the of the negative samples (in red color) is mainly distributed between 30 and 70. It can also be seen in Figure 13b. So, the of the positive samples and negative samples has a clear decision boundary.
4.5. Model Checking
4.6. Model Evaluation
4.7. Ablation Experiment
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Fan, Z.; Yang, Z.; Yang, L. Daylight performance assessment of atrium skylight with integrated semi-transparent photovoltaic for different climate zones in China. Build. Environ. 2021, 190, 107299. [Google Scholar] [CrossRef]
- Xuan, Q.; Li, G.; Jiang, B.; Zhao, X.; Zhao, B.; Ji, J.; Pei, G. Analysis and quantification of effects of the diffuse solar irradiance on the daylighting performance of the concentrating photovoltaic/daylighting system. Build. Environ. 2021, 193, 107654. [Google Scholar] [CrossRef]
- Liu, Y.; Zhang, R.; Huang, Z.; Cheng, Z.; López-Vicente, M.; Ma, X.; Wu, G. Solar photovoltaic panels significantly promote vegetation recovery by modifying the soil surface microhabitats in an arid sandy ecosystem. Land Degrad. Dev. 2019, 30, 2041–2047. [Google Scholar] [CrossRef]
- Du, W.Z.; Shen, H.Y. Information Technology: Investigators from Huazhong University of Science and Technology Target Information Technology (Defect Image Sample Generation with GAN for Improving Defect Recognition). Inf. Technol. Newsweekly 2020, 27, 24–33. [Google Scholar]
- Mohammed, S.; Boumediene, B.; Miloud, B. Assessment of PV modules degradation based on performances and visual inspection in Algerian Sahara. Int. J. Renew. Energy Res. 2016, 6, 106–116. [Google Scholar]
- Kontges, M. Review of Failures of Photovoltaic Modules; IEA-Photovoltaic Power Systems Programme T13-01; SUPSI, 2014; pp. 1–140. Available online: https://iea-pvps.org/wp-content/uploads/2020/01/IEA-PVPS_T13-01_2014_Review_of_Failures_of_Photovoltaic_Modules_Final.pdf (accessed on 3 February 2022).
- Tabanjat, A.; Becherif, M.; Hissel, D. Reconfiguration solution for shaded PV panels using switching control. Renew. Energy 2015, 82, 4–13. [Google Scholar] [CrossRef]
- Dolara, A.; Lazaroiu, G.; Leva, S.; Manzolini, G. Snail trails and cell micro-cracks impact on PV module maximum power and energy production. IEEE J. Photovolt. 2016, 6, 1269–1277. [Google Scholar] [CrossRef] [Green Version]
- Yang, T.; Zhao, L.Y.; Wang, C.S. Overview of application of Artificial Intelligence in Power System and Integrated Energy System. Autom. Electr. Power Syst. 2019, 43, 2–14. [Google Scholar]
- Zhou, N.C.; Liao, J.Q.; Wang, Q.G. Analysis and Prospect of Deep Learning Application in Smart Grid. Autom. Electr. Power Syst. 2019, 43, 180–191. [Google Scholar]
- Li, X.; Yang, Q.; Yan, W. Intelligent fault pattern recognition of aerial photovoltaic module images based on deep learning technique. Syst. Cybern. Inform. 2018, 16, 67–71. [Google Scholar]
- Tang, W.; Yang, Q.; Xiong, K.; Yan, W. Deep learning based automatic defect identification of photovoltaic module using electroluminescence images. Sol. Energy 2020, 201, 453–460. [Google Scholar] [CrossRef]
- Zhao, Y.; Zhan, K.; Wang, Z.; Shen, W. Deep learning-based automatic detection of multitype defects in photovoltaic modules and application in real production line. Prog. Photovolt. Res. Appl. 2021, 29, 471–484. [Google Scholar] [CrossRef]
- Mittal, S.; Dutta, M.K.; Issac, A. Non-destructive image processing based system for assessment of rice quality and defects for classification according to inferred commercial value. Measurement 2019, 148, 1792–1797. [Google Scholar] [CrossRef]
- Singh, A.P.; Kumar, A.; Akshayveer, O.P.S. Performance enhancement strategies of a hybrid solar chimney power plant integrated with photovoltaic panel. Energy Convers. Manag. 2020, 218, 113020. [Google Scholar] [CrossRef]
- Zhang, E.; Li, B.; Li, P.; Chen, Y. A Deep Learning Based Printing Defect Classification Method with Imbalanced Samples. Symmetry 2019, 11, 1440. [Google Scholar] [CrossRef] [Green Version]
- Schlegl, T.; Seebock, P.; Waldstein, S.M.; Schmidt-Erfurth, U.; Langs, G. Unsupervised anomaly detection with generative adversarial networks to guide marker discovery. In International Conference on Information Processing in Medical Imaging; Lecture Notes in Computer Science, 10265 LNCS; Springer: Cham, Switzerland, 2017; pp. 146–147. [Google Scholar]
- Zhao, Z.; Li, B.; Dong, R.; Zhao, P. A surface defect detection method based on positive samples. In Proceedings of the Pacific Rim International Conference on Artificial Intelligence (PRICAI), Nanjing, China, 28–31 August 2018; pp. 473–481. [Google Scholar]
- Schlegl, T.; Seeböck, P.; Waldstein, S.M.; Langs, G.; Schmidt-Erfurth, U. f-AnoGAN: Fast unsupervised anomaly detection with generative adversarial networks. Med. Image Anal. 2019, 54, 30–44. [Google Scholar] [CrossRef]
- Akcay, S.; Abarghouei, A.A.; Breckon, T.P. Ganomaly: Semi-supervised anomaly detection via adversarial training. In Proceedings of the ACCV, Perth, Australia, 2–6 December 2018; pp. 622–637. [Google Scholar]
- Radford, A.; Metz, L.; Chintala, S. Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks. arXiv 2015, arXiv:1511.06434. [Google Scholar]
- Undirwade, A.; Das, S. Image anonymization using deep convolutional generative adversarial network. In Machine Learning Algorithms and Applications; Srinivas, M., Sucharitha, G., Matta, A., Chatterjee, P., Eds.; Crc Press: Boca Raton, FL, USA, 2021. [Google Scholar] [CrossRef]
- Karnewar, A.; Wang, O. MSG-GAN: Multi-Scale Gradients for Generative Adversarial Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 7796–7805. [Google Scholar]
- Tatapudi, S.; Libby, C.; Raupp, C. Defect and safety inspection of 6 PV technologies from 56000 modules representing 257000 modules in 4 climatic regions of the United States. In Proceedings of the 43rd IEEE Photovoltaic Specialists Conference, Portland, OR, USA, 5–10 June 2016; pp. 1747–1751. [Google Scholar]
- Sawyer, D.; Kessler, H.K. The solar cell is scanned by laser for displaying the working characteristics of the cell and detecting the defects of the cell. J. Electron. Equip. 1980, 27, 864–872. [Google Scholar]
- Tsuzuki, K.; Murakami, T.; Yoshino, T.; Takeyama, Y.; Shimizu, K. Inspection Method and Production Method of Solar Cell Modules. U.S. Patent 6,271,462, 7 August 2001. [Google Scholar]
- Tsai, D.M.; Wu, S.C.; Li, W.C. Defect detection of solar cells in electroluminescence images using Fourier image reconstruction. Sol. Energy Mater. Sol. Cells 2012, 99, 250–262. [Google Scholar] [CrossRef]
- Bastari, A.; Bruni, A.; Cristalli, C. Classification of silicon solar cells using electroluminescence texture analysis. In Proceedings of the IEEE International Symposium on Industrial Electronics, Bari, Italy, 4–7 July 2010; pp. 1722–1727. [Google Scholar]
- Quater, P.; Grimaccia, F.; Leva, S. Light unmanned aerial vehicles (UAVs) for cooperative inspection of PV plants. IEEE J. Photovolt. 2014, 4, 1107–1113. [Google Scholar] [CrossRef] [Green Version]
- Li, X.; Yang, Q.; Chen, Z. Visible defects detection based on UAV-based inspection in large-scale photovoltaic systems. IET Renew. Power Gener. 2017, 11, 1234–1244. [Google Scholar] [CrossRef]
- Yong, H.; Huang, J.; Hua, X.; Zhang, L. Gradient Centralization: A New Optimization Technique for Deep Neural Networks. In Proceedings of the ECCV, Cambridge, UK, 14–18 April 2020; pp. 635–652. [Google Scholar]
- Woo, S.; Park, J.; Lee, J.Y.; Kweon, I.S. CBAM: Convolutional Block Attention Module. In Proceedings of the ECCV, Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
- Ioffe, S.; Szegedy, C. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the International Conference on International Conference on Machine Learning (ICICML), Lille, France, 6–11 July 2015; pp. 234–238. [Google Scholar]
- Xu, B.; Wang, N.; Chen, T. Empirical Evaluation of Rectified Activations in Convolutional Network. CoRR. 2015, pp. 14–23. Available online: http://arxiv.org/abs/1505.00853 (accessed on 3 February 2022).
Layer 1 | Input | Filter Number | Kernel | Stride | Padding | Batch Normalization | Activation Function | Attention Mechanism | Output |
---|---|---|---|---|---|---|---|---|---|
1 | (32,32,3) | 64 | (4,4) | 2 | Same (1) | Batch Norm | LeakyReLU (0.2) | CBAM | (16,16,64) |
2 | (16,16,64) | 128 | (4,4) | 2 | Same (1) | Batch Norm | LeakyReLU (0.2) | CBAM | (8,8,128) |
3 | (8,8,128) | 256 | (4,4) | 2 | Same (1) | Batch Norm | LeakyReLU (0.2) | CBAM | (4,4,256) |
4 | (4,4,256) | 100 | (4,4) | 1 | Valid (0) | None | None | None | (1,1,100) |
Layer 1 | Input | Filter Number | Kernel | Stride | Padding | Batch Normalization | Activation Function | Output |
---|---|---|---|---|---|---|---|---|
1 | (1,1,100) | 256 | (4,4) | 1 | Valid (0) | Batch Norm | ReLU | (4,4,256) |
2 | (4,4,256) | 128 | (4,4) | 2 | Same (1) | Batch Norm | ReLU | (8,8,128) |
3 | (8,8,128) | 64 | (4,4) | 2 | Same (1) | Batch Norm | ReLU | (16,16,64) |
4 | (16,16,64) | 3 | (4,4) | 2 | Same (1) | None | tanh | (32,32,3) |
Model | Precision | Accuracy | F1 | Sensitivity |
---|---|---|---|---|
Pre-trained Vgg16 (10) | 0.324 | 0.265 | 0.378 | 0.453 |
Pre-trained Vgg16 (100) | 0.746 | 0.750 | 0.795 | 0.852 |
Pre-trained Vgg16 (200) | 0.930 | 0.960 | 0.936 | 0.941 |
ppFDetector | 0.929 | 0.945 | 0.944 | 0.960 |
Model | Precision | Accuracy | F1 | Sensitivity |
---|---|---|---|---|
AnoGAN | 0.878 | 0.749 | 0.852 | 0.827 |
Zhao’s method | 0.869 | 0.887 | 0.899 | 0.931 |
GANomaly | 0.908 | 0.892 | 0.929 | 0.952 |
f-AnoGAN | 0.912 | 0.930 | 0.930 | 0.950 |
ppFDetector | 0.929 | 0.945 | 0.944 | 0.960 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Lu, F.; Niu, R.; Zhang, Z.; Guo, L.; Chen, J. A Generative Adversarial Network-Based Fault Detection Approach for Photovoltaic Panel. Appl. Sci. 2022, 12, 1789. https://doi.org/10.3390/app12041789
Lu F, Niu R, Zhang Z, Guo L, Chen J. A Generative Adversarial Network-Based Fault Detection Approach for Photovoltaic Panel. Applied Sciences. 2022; 12(4):1789. https://doi.org/10.3390/app12041789
Chicago/Turabian StyleLu, Fangfang, Ran Niu, Zhihao Zhang, Lingling Guo, and Jingjing Chen. 2022. "A Generative Adversarial Network-Based Fault Detection Approach for Photovoltaic Panel" Applied Sciences 12, no. 4: 1789. https://doi.org/10.3390/app12041789
APA StyleLu, F., Niu, R., Zhang, Z., Guo, L., & Chen, J. (2022). A Generative Adversarial Network-Based Fault Detection Approach for Photovoltaic Panel. Applied Sciences, 12(4), 1789. https://doi.org/10.3390/app12041789