Diagnosis of contamination discharge state of porcelain insulators based on GA-CNN

ABSTRACT Porcelain insulators play an important role in power transmission lines. It is of great significance to improve the accuracy of diagnosis of porcelain insulators’ discharge state and ensure the reliability of power supply. Therefore, this paper presents a diagnosis method of polluted discharge state of porcelain insulator based on GA-optimised CNN network structure. Firstly, the artificial pollution discharge test of porcelain insulator is carried out. According to the characteristics of leakage current, the discharge development process is divided into five stages: normal state, initial discharge, through discharge, flashover and flashover completion. GA algorithm is used to optimise the parameters of CNN model, and several single models are established simultaneously to compare the progress with the proposed model. The results show that GA has the advantages of global optimisation, less adjustment parameters, etc. It can automatically select the best structure of CNN network, avoid the problem of poor performance of artificial selection of CNN network structure, reduce the time required for parameter selection, and improve the accuracy of diagnosis of polluted discharge state of porcelain insulators, with the diagnosis accuracy as high as 99.2%. The results show that the discharge state of porcelain insulator surface can be judged by leakage current.


Introduction
Pollution flashover is a serious threat to the safe operation of power systems.Insulators are the electrical components with the largest number, the most abundant types, and the operating environment most affected by the atmospheric environment in power transmission and transformation equipment (Cai et al., 2021;Miao et al., 2022;Ning et al., 2021;Wang, Wang, et al., 2022).After the implementation of external insulation classification based on pollution zone classification and insulator pollution flashover withstand voltage, large-scale pollution flashover accidents no longer occur at this stage, but flashover accidents still occur near key pollution sources, which are monitored.Key areas (Bai et al., 2021;Qian et al., 2022;Wang, Sun, et al., 2022;Yu et al., 2022;Zhang et al., 2022).
At present, the detection methods of contamination discharge mainly include ultrasonic detection methods, infrared imaging methods, ultraviolet pulse detection methods and leakage current detection methods.The ultrasonic detection method can realise the non-contact detection of contamination discharge, but the sensitivity is not high, and it is difficult to extract the effective discharge signal due to the large electromagnetic interference of transmission lines or substations (Alia & Tsuchiya, 2021;Hou et al., 2021;Vasilev et al., 2021).The infrared imaging method is to observe the leakage current or the local temperature change from the infrared image.Quantitative analysis of the temperature distribution law of the infrared image can realise the monitoring of the state.However, due to the influence of sunlight and environmental temperature changes, online monitoring can be realised.There are certain difficulties (Li et al., 2021;Shafiei et al., 2021).The ultraviolet pulse detection method realises the detection of the discharge by detecting the radiation of the optical signal in the discharge process of the insulator.The advantages of the ultraviolet pulse method are fast response speed and good linearity, which is convenient for studying the characteristics and mechanism of the discharge optical radiation.It is still difficult to completely detect the solar-blind band by the method, and it is easy to be interfered with by large sunlight, and it still faces certain difficulties in practical engineering applications (Danzi et al., 2022;Jamali et al., 2020;Odeyemi et al., 2020;Zhong et al., 2022).Compared with the above methods, the leakage current has the advantages of simple equipment and mature technology, and is especially suitable for on-site real-time monitoring (Deb et al., 2020;Govindaraju & Muniraj, 2020;Sun et al., 2021;Vigneshwaran et al., 2021).Sun et al. (2021) collects the leakage current of insulators, and uses exploratory factor analysis and least squares support vector machine combined model to predict the degree of contamination on the surface of insulators.However, this method requires high feature quantities, and the support vector machine model has a weak anti-noise ability.Govindaraju and Muniraj (2020), Vigneshwaran et al. (2021) used neural network to train the leakage current feature to evaluate the contamination of the insulator surface, but the neural network has problems such as difficulty in selecting structural parameters and long training time.Deb et al. (2020) uses the determined fluctuation analysis method to extract the leakage current distortion features and then uses the clustering algorithm to identify the pollution degree, but does not consider the influence of humidity on the leakage current waveform, and does not give the specific leakage current distortion degree and insulator surface pollution degree corresponding relationship (Salem et al., 2020).In order to explore the essential relationship between insulator leakage current and various factors, the specific functional relationship between them is determined.Genetic algorithm (GA) was used to obtain the corresponding relationship between relative humidity, equivalent salt density, applied voltage and leakage current amplitude.The results show that the method of estimating leakage current amplitude by genetic algorithm is effective and feasible.
It can be seen from the above that the leakage current method is simple, easy to operate, high in use value and slightly lower in economic cost.With the rapid development of science and technology, the power system is constantly improving itself and developing towards automation and informatisation.In order to further improve the accuracy of the diagnosis of polluted discharge state of porcelain insulators, a fault diagnosis model of polluted discharge state of insulators based on convolution neural network optimised by genetic algorithm is proposed in this paper.Although convolutional neural network has powerful nonlinear feature extraction ability, its final performance depends on the optimisation algorithm in the training process.In order to further improve the diagnostic effect of convolution neural network in insulator polluted discharge state, this paper integrates genetic algorithm into the training process of network model to realise in-depth optimisation of network model parameters.Finally, this model is compared with SVM, ELM, BPNN and CNN to verify the effectiveness of this model.

Test device
The artificial contamination test is carried out in a multi-factor environmental test chamber.and the parameters of the test XP-70 insulator are presented in Table 1.The temperature and humidity control system in the chamber can well control the temperature within ±2°C, and can The humidification process in the environmental box is quickly completed, and the dehumidification process is realised by using a desiccant.The temperature and humidity sensor with an error of ±0.01°C is used to detect and collect the environmental temperature and humidity data.The pillar insulator is placed in the test box, the lower end is connected to the high-voltage input section, and the ground wire connected to the upper end is connected with a high-precision non-inductive resistance sensor to collect the waveform and characteristic quantity of the leakage current.The test principle is shown in Figure 1.

Test method
The experimental design of this paper is as follows: artificial contamination test is carried out by applying corresponding withstand voltage to different salt-dense samples.Each test was repeated for three groups, and the data that highlighted the whole process from creeping discharge to flashover breakdown were selected as the analysis object.The ESDD of the test article in this paper is 0.01, 0.02, 0.05 and 0.1 mg/cm 2 , respectively.

GA principle
In 1969, John Holland formulated the genetic algorithm computational model by simulating the biological evolution process of Darwin's theory of biological evolution and genetic mechanism.The model uses the extinction law of the fittest to simulate the natural evolution process, encodes the parameters in the optimised object to acquire chromosomes, and then evolves the chromosomes through selection, crossover and mutation, and finally generates the chromosomes needed by the object.Implement dynamic optimisation.According to the different optimisation objects, there are also differences in the coding methods of genetic algorithms.Researchers study different optimisation objects and obtain genetic operators suitable for various problems.Different genetic operators and coding methods form different genetic algorithms.When applying the genetic algorithm, the coding operation is performed first, and the coding method has a great influence on the subsequent genetic operation, so the choice of coding is of great significance.

GA process
In GA, genes are encoded to contain individuals, and several individuals form a population.An individual expresses the solution of the object to be optimised in the problem.The population represents the maximal possible solution set of the optimised object in the problem.Gener string.An individual typically consists of a character or numeric code that represents a point in space.First, the GA algorithm sets the number of individuals in the population, and forms a specific number of individuals through coding.The random process of the formation of the primary population can be artificially intervened to boost the quality of the population.Individuals in each generation of the population must be evaluated by fitness function, so that each individual in the population has a fitness value.GA generates a new population through selection, crossover and mutation of genetic operations.The basis of specific selection is the individual's fitness value.The higher the individual's success, the greater the probability of being selected.The lower the individual's fitness is, the lower the probability of the individual entering the next generation of population.Different optimisation objects apply to different selections.Operation to form a new population by selection.Individuals in the new population perform crossover operations, and new individuals are generated through crossover to supplement the original individuals, and a new population is formed through crossover.Finally, the individuals in the new population generated by the crossover are converted to mutation operations, and new individuals are formed through the mutation of individuals in the population, resulting in a new generation of populations that are different from the initial population.The fitness of the new generation of the population is evaluated, and then genetic manipulation is performed to generate the third generation of the population, and this process is continuously cycled.Termination conditions generally include: cycle limit, optimal solution, algorithm running time, individual fitness saturation, and inability to generate better individuals.The main algorithm steps of GA are as follows, and the GA process is shown in Figure 2.
(1) Encode the individual and randomly generate the primary population; (2) Evaluate the fitness of each individual in the current population, so that each individual has a fitness value; (3) Judge whether the termination condition is met, and if so, select the individual with the best fitness in the population as the execution result of GA; (4) If the conditions are not met, the individuals in the current population are selected according to a certain selection method, and the selected individuals form a new population; (5) Crossover the individuals in the new population formed by the selection operation according to a certain crossover operation, and the crossed individuals form a new population; (6) Perform mutation operation on the individuals in the new population obtained through the crossover operation, and the mutated individuals form a new generation of population; (7) Repeat steps (2) to (6) until the termination condition is satisfied.

Implementation method
(1) Chromosome encoding method: The encoding method can be divided into binary encoding and floating-point encoding.Because the learning rate in the CNN model is a floating-point number, the floating-point encoding is used in this paper.The floatingpoint number encoding method refers to using a certain range of floating-point numbers to encode the genes of the chromosome, and the number of optimisation variables is equal to the number of chromosome genes.Because the value of the floating point number on the gene is the real value of the variable, the floating point number encoding method is also called the truth value encoding method.For example, if there are 3 variables that need to be optimised in a certain problem, and the values are within [0,1], the gene of a chromosome in this optimisation problem can be directly set as [0.21334, 0.12313, 0.54623] (1) without encoding into binary form.
(2) Selection operator: The purpose of the selection operator is to capture the genes of individuals with high fitness in the population and inherit them for the next generation, so that the population can attain the optimisation goal.When selecting individuals, the proportional selection algorithm is generally used.The steps of the proportional selection algorithm are to first calculate the fitness value of all individuals in the population, and then determine the probability of the population being selected.The larger the fitness value, the higher the probability.Finally, the individuals involved in the inheritance are selected due to the probability.Individuals with higher fitness values have a higher probability of being selected, and individuals with lower fitness values also have the opportunity to participate in inheritance to avoid gaining important genes.
The formula for calculating the probability of an individual being selected is as follows: where N is the size of the group;F i -individual fitness value; P i -the probability of being selected.
(3) Crossover operator: imitating the evolution of nature, crossover operation refers to pairing individuals in pairs and exchanging genes with each other to form two new individuals.The crossover operator is an important operator in the genetic algorithm, which ensures that new individuals in the population are closer to the optimal solution.Commonly used crossover methods include single-point crossover, double-point crossover, and arithmetic crossover.Floating-point number encoding requires high precision.Compared with single-point crossover and double-point crossover, arithmetic crossover operator is more suitable for floating-point number encoding.Arithmetic crossover refers to the weighted calculation of two paired individuals.The specific calculation method is as follows: In the formula, X i A -the individual performing the arithmetic crossover operation; X i Bindividuals performing arithmetic crossover operations; i -the number of iterations; cconstant.
(1) Mutation operator: The mutation operator includes basic bit mutation and uniform mutation.The most important step of basic bit mutation is to negate the gene value at the mutation position with a certain probability, so it is more suitable for binary coding.
The uniform mutation operation is to randomly change the gene value of the mutation position into a floating point number within the set value range according to the mutation probability.The specific formula of uniform mutation operation is as follows: In the formula, x k -the gene of an individual; U min , U max -the upper and lower limits of genes; r -A random number in the range [0,1].

Principle of CNN
CNN is a neural network with a deep network structure inspired by the cat's visual mechanism.In the 1960s, the concept of receptive field was proposed, and it was not until the 1980s that the first realistic network of CNN was proposed based on RF.The network structure of CNN is closer to the structure of biological neural networks than other networks, so it is better at pattern recognition, especially image recognition.Images can be directly input into CNN without feature extraction and data reconstruction, which speeds up the processing speed.CNN was first used in the field of image recognition, and later widely used in deep learning and machine vision.Due to the powerful feature learning ability and complex data processing ability of CNN, it has been used in the field of state diagnosis in recent years.
The neurons of the artificial neural network adopt a fully connected connection method.
When the scale of the data processed by the artificial neural network is relatively large, it is easy to generate a large number of parameters, increase the calculation amount of the neural network, and cannot capture the change of the local data position, resulting in loss of data.Locality, which leads to data overfitting during training, and the inability to optimise the location characteristics of the learning data itself; local connections are used between adjacent neurons in the CNN convolutional layer, and some neurons in the CNN convolutional layer are connected.Weight sharing, convolutional layers reduce the number of parameters through weight sharing and local connections to speed up the learning rate.
The pooling operation of CNN reduces the number of neurons and simplifies the complexity of the subsequent network.The core structure of CNN consists of alternate connections between convolutional layers and pooling layers.

Basic idea of CNN
CNN mainly reduces the parameters of CNN network and accelerates the learning rate through three basic ideas of local connection, weight sharing and pooling operation.As shown in Figure 3, the basic structure of CNN includes: input layer, convolution layer, pooling layer (also called down sampling layer), fully connected layer and output layer.This section will introduce the convolutional layers, pooling layers and fully connected layers of CNN.

CNN training process
The training process of CNN includes two stages: forward propagation of data and back propagation of errors.The forward propagation of data is the propagation of data from front to back.If the result obtained does not match the expected result after the forward propagation of the data is completed, the back propagation of the error is performed, and the error is propagated from the back to the front.Before CNN starts training, it is necessary to initialise the network, assign connection weights, determine the maximum number of learning times and calculation accuracy, randomly select input samples, and determine output expectations.Finally, the training process of data forward propagation and error back propagation is as follows.
(1) Forward propagation of data: Calculate the input and output of each layer of neurons in the CNN, where α l is the output value of the l layer network, α l−1 is the input value of the l layer network, f l is the activation function of the l layer network, and z l is the linear value before the layer network is not activated.output, W l is the connection weight of the l layer network and the l − 1 layer network, b l is the bias of the l layer network; If the l layer of CNN is a convolutional layer, the input-output relationship is: If the l layer is a pooling layer, the input-output relationship is: If the l layer is a fully connected, the input-output relationship is: (2) Compare the expected output of the network with the actual output, and calculate the error, where y is the actual output of the network, and d is the expected output of the network; (3) Judge whether the error meets the requirements according to the set error accuracy or whether the set learning times meets the maximum learning times.Judge whether the algorithm process should end, and if the conditions are not met, enter the back propagation of the error.

Backpropagation of the error.
(1) Using the error C(W, b) obtained from the forward propagation of the data from the last layer of the network to back-propagate the gradients of W l and b l layer by layer, the gradient calculation formula of the error C(W, b) to the weight W l and bias b l of the last layer of the network is as follows (2) Calculate the gradient of weight W and bias b of error C(W, b) to the hidden layer neurons that are not activated in CNN.The hidden layer is the l-th layer.The calculation formula of weight W l and bias b l is: Substitute equation (20) into equation ( 18) to get: If the CNNC layer l + 1 neural network is a convolutional layer, where rot180(•) represents a 180-degree rotation, then: If the CNNC layer l + 1 neural network is a pooling layer, whereupsample(•) represents a 180-degree rotation, then: (3) Calculate the gradient of the previous error C(W, b) of the data to the weight and bias; If the l-th layer of the CNN is a convolutional layer, then: If the l-th layer of the CNN is a fully connected layer, then (4) Update the weights and biases.If the weights and biases are updated in the first layer of neural network, the calculation formula is, where λ is the network learning rate; (5) Perform the next forward propagation on the updated weights and biases until the errorC(W, b) satisfies the accuracy condition, and the CNN is executed.

The basic idea and algorithm flow of GA-CNN
Using CNN's powerful feature learning ability and complex data processing ability to diagnose the contamination discharge state of porcelain insulators, improve the accuracy of state diagnosis of insulators.However, there is still a lot of optimisation space for CNN in the field of state diagnosis.Facing different practical problems, researchers need to conduct a lot of experiments and have rich experience to choose a more suitable CNN network structure.The choice of CNN network structure affects the accuracy of state diagnosis, and the inappropriate structure is an important factor causing the low accuracy of CNN results.When choosing the CNN network structure in the face of specific practical problems, due to the numerous combinations of CNN network parameters, if only based on experience and experiments, it will take a lot of time to adjust the CNN network structure, and it may not be possible to find the most suitable CNN network structure.However, GA has few adjustable parameters and fast global search.The evaluation information based on the value of the objective function is used in the search process.The search process does not require the optimisation function to be derivable, nor does it require the optimisation function to be continuous.The idea is simple and easy to implement.Therefore, this paper proposes a GA-CNN method of GA-optimised CNN network structure for the diagnosis of insulator pollution discharge state.
The choice of GA coding methods and genetic operations has a great influence on the result.In this paper, floating-point encoding with high precision and suitable for large space search is selected as the encoding method of GA; the best reserved selection that ensures that the individuals with the highest applicability in the current population can enter the next generation is selected as the selection operation of GA; the basic single-point crossover is selected.As the crossover operation of GA; select the basic bit variation that mutates some genes randomly assigned by the individual coding with the mutation probability as the mutation operation of GA.
The GA optimisation CNN network structure algorithm proposed in this paper is mainly composed of four parts: CNN network construction, GA optimisation, CNN network structure determination and CNN state diagnosis.
The algorithm flowchart is shown in Figure 4 and the specific process is as follows: (1) The initial group is randomly generated using real number coding, and each individual in the group represents a CNN network structure parameter; (2) Set the GA chromosome number, gene number, evolutionary generation, mutation rate and crossover rate; (3) Build a CNN and use the genes on each chromosome of GA as the CNN structure; (4) Input each chromosome into CNN for state diagnosis, and the test accuracy is used as the GA fitness function; (5) GA evaluates the fitness of each chromosome to determine whether the chromosome meets the conditions.If the set evolutionary algebra is met, the program ends, and the optimal individual is selected as the CNN structure; (6) If it is not satisfied, select, inherit and mutate the population, and input the chromosomes of the new generation of the population into CNN for diagnosis, and obtain the fitness value of each individual; (7) Repeat step (5)-step (6) until the conditions are met; (8) After the program ends, select the optimal individual as the structure of the CNN for diagnosis

Experimental comparison and analysis
In order to prove the accuracy of the GA-CNN-based diagnosing model for the contamination discharge state of porcelain insulators, this paper establishes a support vector machine, BP neural network, ELM neural network and artificial random selection of the CNN network structure parameter model and the GA-CNN model to compare the accuracy.

GA-CNN model diagnostic accuracy
In the five-category classification problem, the confusion matrix of the GA-CNN model is shown in Figure 5.In the figure, state1 ∼ state5 represent normal state, initial discharge, through discharge, flashover and flashover completion, respectively.It can be seen from Figure 5. that the recognition accuracy rates of the GA-CNN model for normal state, initial discharge, through discharge, flashover and flashover completion are 100%, 98%, 99%, 99%, and 100%, respectively.The GA-CNN model achieved good diagnostic results.

Diagnostic accuracy of a single model
The confusion matrix of the SVM state diagnosis model is shown in Figure 6.The SVM state diagnosis model has an accuracy rate of 68% per cent for the normal state, 66% per cent for  the initial discharge state, 58% per cent for the through-discharge state, and 61% per cent for the flashover state and the flashover completion state respectively and 60%.The SVM model has a good diagnostic effect on the normal state and the initial discharge state; the diagnostic effect on the flashover state and the flashover completion state is average; the diagnostic effect on the through discharge state is poor.
As can be seen from Figure 7, the overall accuracy of the Bp neural network state diagnosis model is 89.8%, of which the Bp neural network state diagnosis model has an accuracy of 92% for the normal state and 91% for the initial discharge state diagnosis.The accuracy  It can be observed from Figure 8 that the diagnostic accuracy of the ELM model is 91.4%.The diagnostic accuracy rates of ELM model for normal state, initial discharge state, through discharge state, flashover state and flashover completion state are 92%, 91%, 89%, 92%, and 93%, respectively.The accuracy of the ELM diagnostic model is higher than that of the Bp model and the CNN model.
The diagnostic accuracy of SVM, BP, ELM and GA-CNN models are plotted in Table 2.The diagnostic accuracy of SVM, BP and ELM models is 62.6%, 89.8% and 91.4% respectively.On the whole, GA-CNN has the best diagnostic accuracy, with an accuracy of 99.2%, so the diagnostic accuracy of GA-CNN model is the highest.The accuracy of SVM test set is not high, and the diagnosis of different states is quite different.

Diagnostic accuracy of unoptimised CNN models
Table 3 shows the state diagnosis results after GA optimises the CNN network structure and the diagnosis results after manually selecting the CNN network structure randomly.Parameters C1 and C2 are the number of convolution kernels in each layer of the first and second convolution layers, and F1 and F2 are the number of neurons in each layer of the first and second fully connected layers.
The experimental results show that the GA-CNN studied in this paper has the highest state diagnosis accuracy.The recognition accuracy of artificially randomly selected CNN network structure is lower than that of GA-CNN.The recognition accuracy rate of manually selected CNN network structure has strong uncertainty, because the relationship between network parameters and recognition accuracy rate is difficult to describe by mathematical formulas, researchers can only adjust parameters based on their own experience, while GA is suitable.It is used to solve such optimisation problems of unanalytical objective functions.Therefore, the GA-CNN method proposed in this paper reduces the difficulty and complexity of CNN network structure parameter selection, and at the same time improves the accuracy of state diagnosis based on the CNN method.

Conclusion
In this paper, the pollution discharge of insulators is studied, and the leakage current is directly input into the GA-CNN model after segmentation.The advantages of the proposed

Figure 7 .
Figure 7. Confusion matrix of Bp model.

Table 1 .
The parameters of the XP-70 insulator.
Figure 1.Schematic diagram of the artificial pollution test.

Table 2 .
Accuracy comparison of different models.

Table 3 .
GA and manually selected CNN structure parameters.