Transformer Fault Diagnosis Based on Probabilistic Neural Network

1. Case background

1.1 Overview of PNN

Probabilistic neural network (probabilistic neural networks. PNN) was first proposed by Dr. D.F. Specht in 1989. It is a parallel algorithm developed based on the Bayesian classification rule and the probability density function estimation method of the Parzen window. It is a kind of artificial neural network with simple structure, simple training and wide application. In practical applications, especially in the application of solving classification problems, the advantage of PNN is to use linear learning algorithms to complete the work done by nonlinear learning algorithms, while maintaining the characteristics of high precision of nonlinear algorithms; this kind of network corresponds to The weight is the distribution of pattern samples, and the network does not need to be trained, so it can meet the requirements of real-time processing in training.
The PNN network is a feedforward neural network developed from the radial basis function network. Its theoretical basis is the Bayesian minimum risk criterion (Bayesian decision theory). PNN is a kind of radial basis network. Suitable for pattern classification. When the value of distribution density SPREAD is close to 0, it forms the nearest neighbor classifier; when the value of SPREAD is larger, it forms the neighbor classifier for several training samples. The hierarchical model of PNN consists of four layers: input layer, model layer, summation layer, and output layer. Its basic structure is shown in Figure 24-1.

The input layer receives the values from the training samples and passes the feature vectors to the network with the number of neurons equal to the dimension of the sample vectors. The pattern layer calculates the matching relationship between the input feature vector and each pattern in the training set. The number of neurons in the pattern layer is equal to the sum of the number of training samples of each category. The output of each pattern unit in this layer is

The third layer is the summation layer, which accumulates the probability belonging to a certain category and calculates according to formula (24-1), so as to obtain the estimated probability density function of the failure mode. Each class has only one summation layer unit, and the summation layer unit is connected only to the pattern layer unit belonging to its own class, but not connected to other units in the pattern layer. So the summation layer unit simply sums the outputs of the pattern layer units belonging to its own class, regardless of the outputs of the pattern layer units belonging to other classes. The output of the summation layer unit is proportional to the estimates of various kernel-based probability densities, and various probability estimates can be obtained by normalizing the output layer. The output decision layer of the network is composed of a simple threshold discriminator, whose function is to select a neuron with the largest posterior probability density among the estimated probability densities of each failure mode as the output of the whole system. The neurons in the output layer are a kind of competitive neurons, and each neuron corresponds to a data type, that is, a failure mode. The number of neurons in the output layer is equal to the number of types of training sample data. Probability density function, the output of the neuron with the largest probability density function is 1, that is, the corresponding category is the sample pattern category to be recognized, and the output of other neurons is all 0.

1.2 Related background of transformer fault diagnosis system

Fault Diagnosis (Fault Diagnosis, FD) begins with mechanical equipment fault diagnosis. The technical level and complexity of modern equipment are constantly increasing, and the impact of equipment failure on production is also significantly increasing. Therefore, to ensure the reliable and efficient operation of equipment and give full play to its benefits, it is necessary to develop fault diagnosis technology. With the help of modern testing, monitoring and computer analysis, the fault diagnosis technology studies the status information of the equipment in operation or under relatively static conditions, analyzes the technical status of the equipment, diagnoses the nature and cause of the fault, and predicts the fault trend to determine necessary countermeasures. Fault diagnosis technology can be used to find fault symptoms and causes early, which is conducive to early elimination of faults and safety hazards, and avoid unnecessary losses, so it has high economic and social benefits.
When transformers in operation have different degrees of faults, abnormal phenomena or information will be generated. Fault analysis is to collect abnormal phenomena or information of transformers, and analyze them according to these phenomena or information, so as to judge the type, severity and fault location of the fault. Therefore, the purpose of transformer fault diagnosis is to accurately judge whether the operating equipment is in a normal state or an abnormal state. If the transformer is in an abnormal state and there is a fault, then judge the nature, type and cause of the fault. If it is an insulation fault, overheating fault or mechanical fault: if it is an insulation fault, is it insulation aging, moisture, or a discharge fault; if it is a discharge fault, what type of discharge is it? Transformer fault diagnosis should also predict the possible development of faults based on fault information or information processing results, that is, make a diagnosis of the severity and development trend of faults; propose measures to control faults, prevent and eliminate faults; propose reasonable methods and corresponding measures for equipment maintenance. Anti-accident measures; propose improvement suggestions for equipment design, manufacturing, assembly, etc., and provide scientific basis and suggestions for equipment modernization management.
The analysis of dissolved gas in transformer oil is an important means of transformer internal fault diagnosis. The improved three-ratio method is widely used in our country at present, but there are two deficiencies in using the three-ratio method as a criterion for transformer fault diagnosis, namely the so-called coding defect and critical value criterion defect. With its advantages of distributed parallel processing, self-adaptation, self-learning, associative memory and nonlinear mapping, artificial neural network has opened up a new way to solve this problem. Most current transformer fault diagnosis systems use the BP network model, but due to the characteristics of the BP network’s own structure, when the training samples are large and require high precision, the network often does not converge and easily falls into local optimum.

2. Model building

In any neural network modeling, the selected input feature vector must be able to correctly reflect the characteristics of the problem. If the fault characteristics based on do not include enough information to be identified or fail to extract the information reflecting the fault characteristics, the diagnosis results will be greatly affected. The analysis method of dissolved gas in oil can well reflect the latent fault of the transformer, and among various diagnostic methods, the improved three-ratio method has the highest judgment accuracy, so the three-ratio value of dissolved gas content in oil is selected as the neural network The input eigenvector of , and the output eigenvector is the fault type of the transformer.

On the basis of this idea, the PNN network model is designed through the following steps, and the flow chart is shown in Figure 24-2.


The structure of the probabilistic neural network is simple and the training is simple. Using the powerful nonlinear classification ability of the probabilistic neural network model, the fault sample space is mapped to the fault mode space, and a diagnostic network system with strong fault tolerance and structural self-adaptive ability can be formed. , so as to improve the accuracy of fault diagnosis. In this case, after an in-depth analysis of the dissolved gas analysis method in oil, a fault diagnosis model based on a probabilistic neural network is established based on the improved three-ratio method. The data.mat in the case data is a 33×4-dimensional matrix. The first three columns are the values of the improved three-ratio method, and the fourth column is the output of the classification, that is, the category of the fault. Use the first 23 samples as PNN training samples, and the last 10 samples as verification samples.

3. MATLAB code

%% Clear environment variables
clc;
clear all
close all
nnt warn off;
warning off;
%% data loading
load data
%% Select training data and test data

Train=data(1:23,:);
Test=data(24:end,:);
p_train=Train(:,1:3)';
t_train=Train(:,4)';
p_test=Test(:,1:3)';
t_test=Test(:,4)';

%% Convert the desired category to a vector
t_train=ind2vec(t_train);
t_train_temp=Train(:,4)';
%% Use the newpnn function to create a PNN SPREAD is selected as 1.5
Spread=1.5;
net=newpnn(p_train,t_train,Spread)

%% Training data back generation Check the classification effect of the network

% Sim function for network prediction
Y=sim(net,p_train);
% Convert the network output vector to a pointer
Yc=vec2ind(Y);

%% Observe the classification effect of the network on the training data by drawing
figure(1)
subplot(1,2,1)
stem(1:length(Yc),Yc,'bo')
hold on
stem(1:length(Yc),t_train_temp,'r*')
title('The effect of PNN network training')
xlabel('sample number')
ylabel('classification result')
set(gca,'Ytick',[1:5])
subplot(1,2,2)
H=Yc-t_train_temp;
stem(H)
title('Error map after PNN network training')
xlabel('sample number')


%% The network predicts the effect of unknown data
Y2=sim(net,p_test);
Y2c=vec2ind(Y2);
figure(2)
stem(1:length(Y2c),Y2c,'b^')
hold on
stem(1:length(Y2c),t_test,'r*')
title('Prediction performance of PNN network')
xlabel('predicted sample number')
ylabel('classification result')
set(gca,'Ytick',[1:5])

operation result:

It can be seen from the figure that after training, when the training data is used as input to replace the trained PNN network, only two samples are misjudged, and when the predicted samples are used for verification, there are only two samples, that is, two transformer fault types Misjudgment. The resulting PNN network can be used to predict more samples.

4 case extension

4.1 Compared with BP network, the advantages of PNN.

① The PNN process is simple and the convergence speed is fast. The input and output of the BP network are the same as those of the PNN, but there is no deterministic rule for the selection of the hidden layer unit, and it needs to be obtained by trial and error based on experience. However, PNN has fewer parameters to be adjusted, and does not need to determine the network structure such as the number of hidden layers and the number of neurons in the hidden layer, so it is easier to use. The learning algorithm of BP network converges slowly, and it is easy to fall into local optimum. The training process of PNN is in place in one step, the training samples can be directly assigned to the network, the training time is only slightly longer than the data reading time, and there is no local optimal value.
②PNN always converges to the Bayes optimal solution with high stability.

The classification rules of BP network have no definite explanation and lack of transparency. PNN classifies objects based on the Bayesian minimum risk criterion, which can maximize the use of prior knowledge of faults. No matter how complex the classification problem is, as long as there are enough training samples, the probabilistic neural network can guarantee to obtain the results under the Bayesian criterion. , but the BP neural network may be interrupted at a local optimal value, and cannot guarantee to obtain a global optimal value.
③ The ability to add samples is strong, and individual wrong samples can be tolerated.

If new training samples are added or some old training samples need to be removed during the fault diagnosis process, PNN only needs to increase or decrease the corresponding model layer units, and the newly added connection weights from the input layer to the model layer only need to change the new Samples are assigned directly. For the BP network, after modifying the training samples, it needs to be retrained, and all the connection weights of the network need to be reassigned, which is equivalent to rebuilding the entire network.
In practical applications, it is necessary to establish a transformer fault sample library, and its content will change with the increase and change of transformer faults. At this time, the superiority of PNN sample addition ability can be fully reflected. To sum up, the performance of PNN transformer fault diagnosis system is better than that of BP transformer fault diagnosis system in terms of diagnosis speed, ability to add samples, and diagnostic accuracy in practical applications.

4.2 The role of SPREAD

If the value of SPREAD is close to 0, the probabilistic neural network created can be used as a nearest neighbor classifier. As the SPREAD increases, more consideration needs to be given to the design vectors near this network. For details, see the discussion on SPREAD in 7.4.2.

4.3 Other issues that need attention

The selection of the fault features of the PNN model should make the fault feature samples contain the maximum amount of fault information, so it is necessary to deeply analyze the fault generation mechanism and the transmission relationship of fault information, and select the feature quantity that can best reflect the fault. The amount should not be considered to ensure the smallest size of the generated PNN.