Fault Detection and Prediction for Power Transformers Using Fuzzy Logic and Neural Networks

: Transformers are indispensable in the industry sector and society in general, as they play an important role in power distribution, allowing the delivery of electricity to different loads and locations. Because of their great importance, it is necessary that they have high reliability, so that their failure does not cause additional losses to the companies. Inside a transformer, the primary and secondary turns are insulated by oil. Analyzing oil samples, it is possible to diagnose the health status or type of fault in the transformer. This paper combines Fuzzy Logic and Neural Network techniques, with the main objective of detecting and if possible predicting failures, so that the maintenance technicians can make decisions and take action at the right time. The results showed an accuracy of up to 95% in detecting failures. This study also highlights the importance of predictive maintenance and provides a unique approach to support decision-making for maintenance technicians.


Introduction
High-power electrical equipment is critical to the operation of power distribution systems.Hence, techniques for detecting and anticipating faults are of crucial importance [1].Power transformers are essential components of a power transmission system.Failure of a power transformer can cause cascading failures and catastrophic loss of power to the power system [2,3].According to Huang and Sun [4], power transformers are very expensive equipment in power systems.Any combination of electrical, mechanical, or thermal stress can cause catastrophic transformer failure and irreversible internal damage.The reliability of the power transformers makes the transmission of electrical power cost-effective [5].The way to avoid these catastrophic failures is to have an effective monitoring system capable of early warning of impending failure conditions, as shown, for example, in [6][7][8][9].This can be achieved by monitoring and examining the equipment more closely.Insulating oils, due to their dielectric characteristics, allow the strengthening of the insulation structure of transformers.For the functioning of insulation, the oil must have the properties of high dielectric strength and low dielectric dissipation factor to withstand the electrical loads in operation [10,11].The materials inside the transformer, the insulating oil, can decompose under the influence of thermal and electrical stresses, producing gases that dissolve in the insulating oil [12,13].The state and quantity of the gases formed, which are extracted from the insulating oil, can provide information about the nature and the degree of faults affecting the transformers [12].
Transformer failures can be categorized as electrical, mechanical, environmental, or thermal [14].As cited by Khalil [14], studies conducted at the Conseil International des Grands Réseaux Electriques ((CIGRE) https://cse.cigre.org/cse-n023/cigre-reliabilitysurvey-on-equipment.html(accessed on 23 February 2023)) on power transformer failures show that 40% of the failures occur with tap changers.Then, 3% of the failures occur on internal components such as windings and magnetic cores, while other failures occur on bushings, bins, and accessories, as shown in Figure 1.According to Dong et al. [15], the type of power transformer disconnection is defined as either forced disconnection or planned disconnection.In forced disconnection, the transformer is taken out of service immediately, while in planned disconnection, a transformer is taken out of service at a predefined time.Ideally, the disconnection times are minimal in order to maximise service time.
Maintenance is aimed at maintaining the operational capability of the equipment.To do this, technological tools that enable the collection of information are used, such as Internet of Things (IoT) sensors and information systems.Artificial Intelligence tools, such as Artificial Neural Networks (ANN), can use sensory data to help detect and troubleshoot faults in a reduced time frame.
Figure 2 represents common maintenance policies in detail.Predictive maintenance has proven to be very important in anticipating failures that may occur.Works such as that of Rodrigues et al. [16] and de Almeida Pais et al. [17] show how useful predictive maintenance is in decision-making.Predictive maintenance focuses on predicting failures that occur through systematic monitoring of parameters and equipment conditions [18,19].Predictive maintenance does not replace corrective and preventive maintenance but it is a technological tool designed to minimize maintenance costs and equipment losses by monitoring specific parameters (data patterns from sensors associated with the equipment).
The technological methods used for predictive maintenance, such as neural networks, require good-quality data.High-quality data require adequate sensors, networks, and data loggers.According to [20], this quality is also achieved by calibrating the sensors that collect the data.
A literature review on stochastic methods and AI techniques for predictive maintenance in the automotive sector was carried out by [21].Shamayleh et al. [22] proposed an IoT-based predictive maintenance approach that employs machine learning tools and real-time data collection to predict and classify the condition of equipment.These studies highlight the importance of predictive maintenance in increasing equipment reliability and reducing maintenance costs.The present article combines two approaches, namely fuzzy logic and recurrent neural networks, used in predictive maintenance to detect and predict failures to optimise and support decision-making.
Section 2 presents an overview of power transformer failures.Section 3 presents the state of the art and a survey of related work.Section 4 describes the theory of fuzzy logic, neural networks, and the IEC method.Section 5 describes the tests and results of the models.Section 6 discusses the results and compares them to the state of the art.Section 7 draws some conclusions and suggestions for future work.

Overview of Power Transformer Failures
Transformers typically can suffer a number of failures.Adequate maintenance policies help prevent many of those failures from happening.

Power Transformers
Power transformers, or simply transformers, according to Jahromi et al. [23], have the highest equipment value in a power system, representing up to 60% of the total investment.According to Saha [24], the technical performance is driving most utilities to continuously assess the actual health of their transformers.
Transformers and high-voltage cables are insulated with a combination of cellulose paper and insulating mineral oil that provides 40 years of reliability.The paper contains about 90% cellulose, 6-7% hemicellulose, and 3-4% lignin.Cellulose is a natural glucose polymer that degrades slowly during use, as the polymer chains are broken down and the degradation products are released into the oil [25].

Typical Failures and Maintenance Methods
In order to determine whether the insulating oils in transformers are acceptable for use, their properties are compared with the limits established in the specifications of the respective manufacturers, users of electrical transformers, and oil refineries [26].When the transformer is filled with oil, the paper absorbs moisture from the oil (due to the hygroscopic nature of the paper), which affects its insulating properties, shortening its useful life [27].
To keep the power transformer in good condition, it is necessary to conduct regular inspection of the transformer to find the incipient faults inside and prevent further deterioration as early as possible [28].
Kumar et al. [29] have published a flowchart of the procedure for transformer maintenance, as shown in Figure 3, and efforts have been made to analyse the causes that have contributed to power transformer failures.Research has focused on analysing different methods for managing the life cycle of power transformers.Methods used include frequency response analysis, voltage restoration techniques, thermal imaging, tap changer testing, bushing testing and measurement or monitoring of dissolved gases, oil or conductor temperature, humidity, oil quality (dielectric strength, acidity, colour, and interfacial tension), and partial discharge [24,[31][32][33][34].
Typically, maintenance technicians periodically disconnect transformers and circuit breakers from the grid to check the operating condition of the equipment [35].This is a time-consuming and expensive job.If there is no suspected problem in the transformer, samples are taken at intervals of up to one year, depending on the operator's maintenance regime [35].
For most utility applications, maintenance leading to limited improvements is the common practice, and model replacement plays only a minor role.Maintenance plans can range from very simple to very complex.The simplest plan is a strict maintenance schedule in which activities are performed at specific times.When a component fails, it is either repaired or replaced.Both repair and replacement are much more expensive than a simple maintenance activity [36].Thanks to the improved monitoring and maintenance methods that have emerged with technological progress, their lifespan has increased.
If a transformer problem is detected in its initial state, before a catastrophic failure occurs, unnecessary transmission line downtime can be avoided.Predictive maintenance can minimize the risk of failure and prevent loss of service [37].
Some diagnostic techniques can be based on the analysis of the gases dissolved in the oil [38][39][40][41].Muthanna et al. [34] provide a coded list of faults that can be detected by dissolved gas analysis IEEE Standard C57.104.
According to Dong et al. [40], methods for diagnosing potential hidden faults in power transformers have attracted considerable research interest.The IEEE and IEC have traditionally recommended dissolved gas analysis (DGA) as a reliable method for locating incipient or probable problems in power transformers.
When abnormal situations occur inside transformers, a reaction occurs between the insulating oil and the materials, producing flammable gases such as H 2 , CO and hydrocarbons such as CH 4 , C 2 H 2 , C 2 H 4 , C 2 H 6 , etc.By analysing the gases produced during this reaction, it is possible to determine whether a transformer is working properly and, if not, what type of fault it has [42].
In the 1970s, thermodynamic models were proposed to describe the relationship between temperature stress and gas properties.According to this model, the growth rate of each generated gas can be calculated for each temperature of the insulating oil. Figure 4 illustrates the relationship between the oil temperature and the gases generated.These models are useful for analysing how the concentrations of various gases, including hydro-gen, methane, ethane, ethylene, and acetylene, have changed over time.Concentrations of some gases can be indicative of problems such as overheating, partial discharges, or degradation of insulating oil.
Partial Discharge (Not Temperature Dependent)

Range of Normal Operation
Hot Sports Arcing Conditions (Of increasing temperature Hydrogen ( 2 ) Comparative oil gas evolution rates as a function of decomposition energy; adapted from [43,44].

Literature Review
Due to its importance in modern energy systems, fault prediction in transformers has been subject to an important body of research.Some approaches are presented below.

Methodology for Literature Review
A survey of related work was performed, searching four major scientific databases: Scopus, Web of Science (WOS), Science Direct, and b-on.The search keywords and results, in terms of number of documents retrieved, are summarised in Table 1.As the table shows, a large number of documents were retrieved, showing the importance of the topic for the scientific community.The papers retrieved in the first pages of the results were opened and those that have higher similarity with the topic of the present paper were analysed in deeper detail.

Related Work
Attempts to diagnose the nature of failure from the gases produced after the failure of mineral oil-immersed power transformers started 50 years ago [45].By 1956, Howe [46] had evolved a detailed failure assessment of the gases collected in the Buchholz relay.
Farhan Naeem et al. [47] states that a new method based on fuzzy logic accurately predicts the condition and remaining useful life of power transformers, analyzing components such as windings, insulation, oil, and core.Case studies demonstrate the effectiveness of the method in predicting failures, but no mention is made of the accuracy of the model in predicting these failures.
In order to analyse and diagnose the physical and operational conditions of high power transformers, Da Silva Noronha et al. [48] obtain data about vibrations in these devices.Their results show that vibration has the potential to be a non-invasive and affordable predictive maintenance method for efficient monitoring and future problem prevention in high power transformers.Souahlia et al. [49] propose a method for power transformer fault classification using Multilayer Perceptron Neural Networks (MLPNN), presenting results superior to existing methods and an effective solution for transformer fault diagnosis with 85% accuracy.
Soni and Mehta [50] present a power transformer diagnosis and prognosis expert decision-making model based on a fuzzy logic controller (FLC) and fuzzy clustering means (FCM), which is implemented in this research work with an accuracy analysis efficiency of more than 90% in several proposed techniques.To evaluate the status of the insulation, the model integrates dissolved gas monitoring methods, humidity, furans, interfacial tension, polymerization, and fuzzy clustering.
Fu et al. [51] has proposed a fast lightweight fault diagnosis method for power transformers, called LightFD, which integrates several technical components.
According to Mofizul Islam et al. [52], the analysis of gases dissolved in oil is a proven method for detecting faults in oil-insulated power transformers during operation.This study aims to propose a new fuzzy logic approach for fault diagnosis in transformers.The method overcomes the difficulty of using the ratio tables which fail to interpret many cases.
The above reviews show that few approaches combine machine learning techniques and fuzzy logic to prevent or predict transformer failure using the gases released in the transformer as a pattern, despite the good results obtained by both methods in other applications.

Background and Methods
IEC 60599 method, fuzzy logic, and artificial neural networks have been applied in the present research.

Fuzzy Logic
Dukarm [53] suggests the use of fuzzy logic algorithms and neural networks to predict the type of failure of a power transformer based on Dissolved Gas Analysis (DGA).
According to McNeill and Thro [54], there is obvious growth for this tool.Although the Japanese fuzzy logic sector is worth billions in USD, total worldwide sales in 1993 were estimated at about 650 million USD.In 1997, Japan spent 500 million USD on the research and development of fuzzy systems.
Boolean logic uses only the values 0 and 1 to represent the degree of relevance µ of a given variable, i.e., µ = 0 does not belong to the set and µ = 1 belongs to the set.In contrast to Boolean logic, µ in fuzzy logic can take any value in the range from 0 to 1, so the variable can be false, true, or have any degree of truthness in between.
In the Scopus platform, it is possible to see a growing interest in this tool, for it is increasingly used in the context of investigating equipment faults, as shown in Figure 5.According to Lin et al. [55], fuzzy logic has been successfully used in many engineering applications and has the ability to effect a gradual transition.Fwa and Shanmugam [56] claim that fuzzy mathematics provides a suitable tool to consider subjective analysis and uncertainties in the classification of maintenance needs.
Fuzzy logic helps to represent and manipulate correct information.It is of great importance in decision-making in some sectors, such as the commercial sector [57].

Artificial Neural Networks
One of the most successful areas of machine learning is ANNs.However, there are some challenges and limitations, such as the difficulty of determining the structure in each application, and problems in the training process when it comes to some types of data, selection of neuron types, and number of neurons, or maintaining local minima during long training times, among others.
Nonetheless, they are very good for data analysis because they extract patterns from the data just from examples, thus saving the time and effort of manually finding those patterns.
ANNs hold great promise for modeling complex tasks in process control and simulations, as well as in machine perception applications.Process control, medical diagnosis, forensic analysis, weather forecasting, financial applications, and investment analysis are now among the areas where ANN technology is applied [58,59].
The MLP (Multi-Layer Perceptron) regressor is a machine learning model used for regression problems.It began gaining prominence in the 1980s due to its effectiveness in solving regression problems.It is a type of feedforward neural network, also known as a direct propagation neural network.This architecture is one of the most common structures in known neural networks.
Chaturvedi et al. [60] report the application of artificial neural networks for power load prediction.
Munir et al. [61] used this type of network for attention-based prediction of software faults, and Li et al. [62] for short-term wind speed interval prediction.This type of network has shown good results because it minimizes the problem of gradient breakout.
Figure 6 shows a representation of the feedforward MLP neural network architecture.The MLP is trained by adjusting the weights and biases to minimize a cost function using optimization algorithms such as Gradient Descent.The MLP equation describes how the output of a neuron is computed in a multi-layer neural network model.This can be expressed as follows:

Bias Bias
where x i is the input with n coordinates, y represents the output of the neuron, w i is the weight associated with the input x i , b is the bias of the neuron, and f is the activation function applied to the result of the weighted sum of inputs and weights, plus the bias.
In the present work, with a small dataset, it was proposed to use a feedforward neural network due to its advantages in predicting low dimensional data [19].

Method IEC 60599
The method proposed by the IEC (International Electrotechnical Commission) was introduced in 1978 in the first edition of the IEC 60599 standard and updated in its second edition in March 1999 [63].
The IEC method is widely used because it provides high efficiency and a better definition for consistent diagnosis in chromatographic analysis of transformer insulating oil.The method is based on the amount of gases, namely methane (CH 4 ), hydrogen (H 2 ), ethane (C 2 H 6 ), ethylene (C 2 H 4 ), and acetylene (C 2 H 2 ), using the following relationships to establish the diagnosis [64]: The relationships are presented in a structured form in Table 2.The table shows the gas ratios and their ranges.Each of these ranges is classified by a type of failure in the power transformer.In some ranges the value is not specific, so it is marked NS.It is therefore possible to see that some faults may be easier to determine than others.

Experiments and Results
A dataset of transformer failures was used to train different fault prediction models.The results obtained are presented and discussed below.

Dataset
A commonly used method for identifying potential defects in oil-soaked transformers is dissolved gas analysis (DGA).It is possible to determine the nature of the defect in the transformer by examining the concentration of the various gases dissolved in the transformer oil, as introduced in Section 4.3.Data provided by (IEEEDataPort https://ieee-dataport.org/documents/dissolvedgas-data-transformer-oil-fault-diagnosis-power-transformers-membership-degree(accessed on 20 January 2023).were used for the present studies.This dataset contains information about the dissolved gases in the transformer oil at different fault conditions, for different fault types.It consists of five variables and 201 samples.Figure 7 shows the types of gases to be analysed, the quantity of samples contained in the data and the quantity of gases to be analysed.In the literature, many studies on the process of model training and testing do not take into account that the dataset may be skewed, with many samples of some categories and few samples of other categories.However, that is important not only during the training but also when the dataset is split, so the data subsets may become skewed and are therefore not representative of the problem being studied.This can lead to the exclusion of some important data in the training or test sets, which hinders the effective training or evaluation of the model and, therefore, leads to possibly incorrect results.
Table 3 shows the selection of samples by fault type to ensure that the data divided into training and test can contain all fault types.As the table shows, the dataset is highly unbalanced, with D1 being the dominant class and T2 a class of very scarce representation.A poor dataset split can have consequences such as easily under-representing T2 in the test set.The data were divided into two subsets: 70% of the data in the training set for all fault types and 30% in the test set for all fault types.
In this paper, different approaches are evaluated to determine which approach gives the best results in classifying transformer faults.
In Figure 8, it is possible to observe the dispersions of the samples in relation to the different types of faults.The figure shows that in some variables there is a specific correlation for each failure type, while in others discrimination of the clusters is more difficult.To interpret the patterns in the data, a correlation analysis was performed with respect to the types of variables present in the data, as shown in Figure 9.The figure shows a correlation analysis between variables showing the correlation between C 2 H 6 gas and CH 4 gas, C 2 H 4 gas and CH 4 gas, and between C 2 H 4 gas and C 2 H 6 gas.From the matrix it is possible to conclude that the correlation between some gases is relatively high, while in other situations it is non-existent.

Fault Detection with Fuzzy Logic
A fuzzy logic system was created to classify failures in the power transformer in DGA data by following the guidelines of the IEC 60599 standard.This algorithm includes association functions that take the dataset's characteristics into account.The association functions use logical operators like AND and OR to combine the input gases' degrees of membership.
Based on the intervals defined in Table 2 for each type of gas, a fuzzy logic model was developed with six outputs, each representing a probable type of fault, this type of fault can be indicated by line black, as shown in Figure 10.

Fault Detection with Artificial Neural Networks
The use of artificial neural networks for classifying errors based on DGA data necessitates training a neural network model to understand the patterns and connections between entry gas characteristics and the appropriate type of errors.
The procedure starts with data preparation, which is followed by the division of the total amount of data into training and testing subsets.The neural network MLP architecture is chosen, and the model is trained using training data, adjusting internal weights through backpropagation.
The model's performance is evaluated using test data and, if necessary, it is optimized by adjusting hyperparameters for the MLP.Finally, the trained model is implemented to generate failure predictions based on data from DGA.To validate the test, the confusion matrix is used, which is an effective tool to validate the accuracy of the model.
The MLP neural network takes as input the five variables representing the amounts of gases under study and outputs the classifications of the types of transformer faults.The network has six outputs, one for each type of failure.
The architecture of the MLP neural network consists of three hidden layers.The first has 50 units, the second 550 units, and the third 100 units.The MLP neural network required 38 epochs for the model to learn.
Figure 11 shows the results of the fuzzy logic system, and Figure 12 shows the results of the MLPClassifier network in the training and testing sets.Note that there are some points of 97% accuracy, which is lower than precision, i.e., the model is better at predicting class 0 than class 1.It can also be seen that the fuzzy logic model finds all instances of positive fault types, while the MLPClassifier in the test set shows weakness in faults D2, T1, and T3.

Algorithm Used-Ensemble of Fuzzy Logic and Neural Network
Figure 13 shows the methods proposed for predicting the type of faults in a power transformer using fuzzy logic and neural networks.In the first part (a), the prediction is made using fuzzy logic, which, according to the literature review, uses the ratios of the gases presented above.In the second part (b), the fault types are predicted using MLPClassifier neural networks.Finally, the results of the two approaches are compared.After the prediction results of the individual models were analysed, a mechanism was developed to combine the results by performing a weighted sum of the predictions from the fuzzy system and the neural network.Table 4 shows the type of faults for each proposed model.Figure 15a shows the first result where the weight parameter was set at 50%, i.e., each of the two predictor models has the same weight in deciding the type of fault in the transformer.A threshold for predicting a fault was set at 60%, meaning that if the sum of the results is equal to 1, a fault type is considered.This in practice means that a fault is only predicted when both models agree, eliminating many false positives.
Figure 15b shows the result of a second test, where the weight parameter was considered to be 70% for the MLPClassifier.This means the neural network model has more weight in deciding the type of fault in the transformer than the FL model.In practice, this means the neural network alone can predict a fault, and the FL is used just for higher confidence in the prediction.From the previous results, it turns out that the NN model is superior to the fuzzy logic model.However, the NN model still generates a few false positives.In order to eliminate those false positives, a verification mechanism was implemented, so that the fuzzy system was used to determine the most probable fault when two faults were present in the output of the NN.To achieve this, when two or more faults were present in the output of the NN, the outputs were compared to the output of the FL, and only those faults predicted by both models were accepted as valid predicted faults.
Figure 16 shows the results of the precision and accuracy of the two models compared to the real data in the test set.It can be seen that the accuracy for the type of error was 96% for the PD error, 1% for the D1 error, 58% for the D2 error, 66% for the T1 error, 50% for the T2 error, 95% for the T3 error.

Discussion
Diagnosing transformer failures is extremely important because failures can lead to safety hazards and loss of service.
Transformer failures can also lead to power losses, reduced energy efficiency, and monetary losses for the companies that operate them.
Diagnosing transformer faults can help extend the life of the equipment and avoid premature replacement.
In the literature, there are different approaches and methods for the diagnosis and maintenance of power transformers.These techniques include statistical analysis, vibration analysis, dissolved gas analysis, and FL.The present study has the same objective of improving the life of the transformer and also contributes by combining two tools to provide highly accurate results.
The article shows the contribution of each of the tools studied (FL and MLPClassifier) to produce reliable fault prediction.In conducting the study, care was taken to split the data and the respective errors into the training set and the testing set, as it was a small and unbalanced dataset.The sample size of 201 had some limitations because the larger the number of data points, the more information could be obtained.
The literature review shows little detail on determining the accuracy of power transformer fault types, only on their overall accuracy.For example, the study Soni and Mehta [50] presents an accuracy of 97% using the three-ratio technique, but it is not clear whether this accuracy is the same for every fault.The study proposed in this article provides an individual analysis of accuracy.
The present work proposes a system architecture and shows the parameters more important for evaluating the model, namely precision, recall, and accuracy on the common types of failures of power transforms.

Conclusions
The management of a transformer is of great importance because its proper functioning brings benefits to companies and people.Maintenance management and its politics, namely preventive maintenance, allow accurate diagnosis of transformer failures, and it is possible to perform preventive maintenance and repairs before a catastrophic failure occurs.
The present paper concludes that FL and MLPClassifier offer fault prediction with high accuracy, in a dataset where it was guaranteed that samples of all fault classes were optimally distributed.The accuracy of the results for each type of fault are partial discharge (PD)-96%, discharges of low energy (D1)-95%, discharges of high energy (D2)-58%, thermal faul T < 300 • C (T1)-66%, thermal fault 300ºC < T < 700 • C-48%, and thermal fault T > 700 • C (T3)-94%.
In future work, other classifier models can also be explored.Since the dataset used is small, we also would like to work with a larger dataset, so that the models can be better trained and there can be more confidence in the results.

Figure 2 .
Figure 2. Types of maintenance policies.

Figure 5 .
Figure 5. Number of scientific documents using the fuzzy logic approach for fault detection, retrieved from Scopus.

Figure 6 .
Figure 6.Architecture of the feedforward neural network model used.

Figure 8 .
Figure 8. Dispersion of the types of failures in function of the amounts of gases.

Figure 11 .
Figure 11.Accuracy and precision in training and testing sets for fuzzy logic model.

Figure 12 .
Figure 12.Accuracy and precision in training and testing sets for MLPClassifier.

Figure 13 .
Figure 13.Diagram of the algorithm's operation.

Figure 14
Figure14shows the confusion matrix of the proposed models.The matrix shows that the FL model is weak when it comes to predicting true positives and true negatives.The MLPClassifier model is more efficient than the FL model, since it is correct for three types of faults true positives and true negatives.

Figure 14 .
Figure 14.Confusion matrix of the four proposed approaches.

Figure 15 .
Figure 15.Confusion matrix of the junctions of the proposed approaches with variation in the weight of the neural network.

Figure 16 .
Figure 16.Accuracy and precision in the training and test sets for the combination of fuzzy logic and the MLPClassifier.

Table 1 .
The keywords searched and total articles found in different search platforms.

Table 3 .
Types of failures and number of samples.

Table 4 .
Calculation of fault type considering 60% weight and 50% limit.