对抗型半监督光伏面板故障检测
卢芳芳1, 牛然1, 杜海舟1, 杨振辰2, 陈菁菁3(1.上海电力大学计算机科学与技术学院, 上海 200090;2.上海上电新达新能源科技有限公司, 上海 200010;3.浙大城市学院, 杭州 310015) 摘 要
目的 传统的光伏面板故障检测主要依靠人工巡检,效率低下且误检率很高,而流行的基于机器视觉的智能检测方法又面临缺少大量负样例造成故障检测模型准确性偏低的问题。针对上述问题,本文提出一种基于对抗训练的半监督异常检测模型,通过应用梯度中心化(gradient centralization,GC)和Smooth L1损失函数,使模型具有更好的准确性和鲁棒性。方法 通过构建半监督异常检测模型并定义目标函数,将正常的光伏面板图像作为正样例原图输入半监督异常检测模型进行模型训练。然后将待测光伏面板图像输入到训练好的半监督异常检测模型,生成该待测图像对应的重建图像。最后通过计算待测原图像与其重建图像隐空间向量之间的误差来判断该待测光伏面板是否存在异常。结果 本文以浙江某光伏电站采集的光伏面板为实验对象,将本文方法与Pre-trained VGG16(Visual Geometry Group 16-layer network)、AnoGAN (anomaly generative adversarial network)、GANomaly等方法进行比较,AUC (area under curve)分别提高了0.12、0.052和0.033。结论 实验结果证明,本文提出的基于生成对抗网络的半监督异常检测模型大幅提高了光伏面板故障检测的准确率。
关键词
Generative adversarial networks based semi-supervised fault detection for photovoltaic panel
Lu Fangfang1, Niu Ran1, Du Haizhou1, Yang Zhenchen2, Chen Jingjing3(1.College of Computer Science and Technology, Shanghai University of Electric Power, Shanghai 200090, China;2.Shanghai Electric Power Xinda New Energy Technology Co., Ltd., Shanghai 200010, China;3.Zhejiang University City College, Hangzhou 310015, China) Abstract
Objective Global clean energy development has promoted the annual installed capacity of photovoltaic (PV), and the following failure rate of PV panel has been increasing as well. Traditional PV panel fault detection relies on manual inspection, which has low efficiency and high false detection rate. Currently, the intelligent PV panel fault detection method is more practical based on machine vision. To solve PV panel fault detection, many studies used convolutional neural networks (CNNs), and these models are based on supervised learning. However, supervised learning method is not adequate due to the lack of negative samples. Our research is focused on training a semi supervised network that detects anomalies using a dataset that is highly biased towards a particular class, i.e., only use positive samples for training. The generative adversarial network (GAN) can produce good output through the mutual game learning of two modules (at least) in the framework, including the generative model and the discriminant model. Conditional GAN introduces condition variable via generator and discriminator. This additional condition variable can be used to guide the generated data by generator. The gradient descent is challenged more while the number of layers of neural network increasing. Most activation or weight execution methods are challenged in the context of gradient disappearance, gradient explosion and non-convergence. To improve the generalization performance of the deep convolution network, gradient centralization (GC) is applied on conditional GAN to resist over fitting through regularizing weight space and output feature space.Method To complete the PV panel fault detection with efficiency and accuracy, we use a semi supervised anomaly detection model which combines the adversarial auto-encoders and the conditional GAN. First, a novel model is constructed based on semi supervised generative countermeasure network. Second, three loss functions are defined to optimize individual sub-networks, i.e., adversarial loss, encoder loss, and contextual loss. This model use smooth L1 loss to define the loss because it can optimize the advantages of L1 loss and L2 loss to speed up the training of the model. Next, the objective function L is obtained by the weighted sum of the three loss functions. Third, the original optimization function is added with GC to regularize the weight and output space for over fitting prevention. To reduce the error between the reconstructed image and its input original image, the generator network is used to learn the data distribution of the positive sample in the PV panel dataset, and the discriminator network is used for adversarial training. The generator can capture the training data distribution within PV panel image and its latent space vector both. Fourthly, the generator will first encode it into latent space vector for testing when the normal PV panel image is put into the trained model, and then decode it into the reconstructed image. The illustration of reconstructed image generated by the model is equivalent to the input image. Thanks to the data distribution learned by the generator, the error between the input normal PV panel image and its reconstructed image is smaller than the threshold, which is defined by the anomaly model. However, the reconstructed image is not similar to the input image when the abnormal PV panel image is put into the model. The error between the input image and its reconstructed image is bigger than the threshold due to no learned data distribution by the generator. Finally, the model can detect abnormal PV panel via the existing error between the input image and its reconstructed image.Result This dataset of the PV panel image is collected by Zhejiang Power Plant and photographed by unmanned aerial vehicle (UAV). The original image size is 3 840×2 048 pixels. The color and pattern of PV panel image are single and regular. The original images are cut into the size of 32×32 pixels and the following 32 000 sub images are obtained because dividing a large image into several small images has no negative impact on the model. The training set is randomly selected from the total sample by 80%, and the test set is the remaining 20%, that is, the size of the training set is 25 600, and the size of the test set is 6 400. Because the image size is 32×32 pixels and the color image is reflected in three channels, the input size of the encoder is 32×32×3, the convolution kernel of 4×4 is used. The first three layers of convolution are filled with 0 edges and the number is 1, and the step size of convolution kernels is 2. In the last step, 1×100 convolution space is used to fill the final volume. The structure of decoder and encoder is symmetrical. The first layer of transposed convolution has no filling, and the last three layers are filled with 1 and 2 steps. The first three layers transpose the convolution layer, and then add batch standardization layer and ReLU activation function layer. The reconstructed image with the size of 32×32×3 is as the output. Then, the normal PV panel image is used as input of the semi supervised anomaly detection model as the original image of the positive sample, then the model is trained. The momentum parameter is set to 0.999, the learning rate is set to 0.000 2, and the batch size is set to 64. After the training of the model, the test PV panel image is input into the trained semi supervised anomaly detection model, and its reconstructed image is generated by the generator network. The error is calculated between the original PV panel image and its reconstructed image. Finally, the model can clarify the PV panel is normal or abnormal in terms of the error is less than the adaptive threshold or not. Our method is compared to the pretrained Visual Geometry Group 16-layer network(VGG16), anomaly generative adversarial network(AnoGAN), GANomaly, etc, and the area under curve (AUC) is improved by 0.12, 0.052 and 0.033, respectively.Conclusion In this semi supervised anomaly detection model, a large number of positive samples are needed to be included in the training samples with no labels. The semi supervised anomaly detection model does not need a large number of negative examples in comparison with supervised learning, which solves the problem of the lack of negative examples. Furthermore, the proposed model combines the advantages of GC and ganomaly to make the PV panel anomaly detection results more accurate.
Keywords
abnormal detection generative adversarial network (GAN) photovoltaic power generation deep convolutional gradient centralization(GC)
|