**3. The concept of adaptive neuro-fuzzy inference system**

Adaptive neural fuzzy inference system (ANFIS) is based on fuzzy logic modeling and uses artificial neural network as the learning algorithm. The system can teach, change the data environment or respond to the remote stimulus for adapting to the change of data environment (Michael, 2005). ANFIS produces constant and linear target by using respective zero and first-order polynomial equations and is also known as a Sugeno-type of fuzzy inference system (FIS).

ANFIS approach targets only one output from several given inputs. The target is manipulated through the performance of the membership function curve according to a particular data input. The curve parameters are identified based on the respective weighted values via the product in between the created learning rules. A ratio between the individual and overall weighted values is calculated. The ratio is gained by using the parameters of output membership function then, finally ANFIS predicts the target by producing an overall gained value as an output. Membership function parameters in input and output sides are adjusted through a learning process to get the targeted values. ANFIS uses hybrid algorithm that consists of a combination between back-propagation and least-square estimation techniques (Jang, 1993). The techniques are implemented in artificial neural network as a learning algorithm that gives very fast convergence and more accurate in ANFIS target.

#### **3.1 ANFIS's learning processes**

The ANFIS model exhibits a predicted target whenever it is trained by using at least two columns of data. The last column is the target data and also as an output of the trained ANFIS, while the rest of the columns are the input data. Thus, an ANFIS structure has a single output with at least one column of input data. For the best prediction and high reliability of its performance, the model needs more elements in the column of the input data. However, this situation will also cause the processing time for learning to be slow. For that reason, the ANFIS has to be configured in a high speed processor. Every element in each row of the input data is called data variable in which the linguistic values of the relationship between them is by the rule of 'IF-THEN'. A total of the rule is proportional to the membership function value and the number of column data is linked by the following equation:

Fault Diagnosis in Power Distribution Network



**Error**

0

0.5

1

prediction error in initial and final learning process.

Fig. 2. Prediction errors according to different training epoch

Fig. 3. (a) Initial stage and (b) MF curve of input side on final stage

tool for fault diagnosis in power distribution network.

**3.2 Development of ANFIS model** 

Using Adaptive Neuro-Fuzzy Inference System (ANFIS) 319

and 3 show the effect of different epoch and change of MF curve's shape with respect to the

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57

**Data** 100 epochs 500 epochs

(a) (b)

ANFIS's learning process can be implemented easily by using the provided source code in Matlab such as 'newfis', 'evalfis' and editfis'. A trained ANFIS model is formatted with a file extension of '.fis' to represent an ANFIS module. On the other hand, the file is represented as a module for a particular task where all modules are configured accordingly based on a hierarchy layout to form a fault diagnosis system in power distribution network. The '.fis' file is also a flexible module that can reform when the data changes or new data is added without restructuring the model physically. ANFIS has a capability of producing very fast result in prediction even when handles a large size of input data. Therefore, the system is compliable to most application especially in adaptive control as well as ANFIS in implementing fault diagnosis. Each ANFIS module for a particular task is programmed by using source codes in Matlab. The programming is developed for every task in fault diagnosis and then the tasks are integrated in another programming to perform a simulation

A basic ANFIS model is shown in Fig.4 in which the model is illustrated in five blocks of learning stages. This model is an example of ANFIS development model for power restoration plan that consists of two inputs and two membership functions. So, there are four fuzzy 'IF-THEN' rules to show the relationship between fault locations in 'x, y' coordinates and it also shows the operational status of CB and LI in the power distribution network. So, the target is '1' for operating while '0' for non-operating state of the devices.

where,

D : Total number of column for the input data

F : Number of membership functions

P : Number of rules

The data is classified as training data and testing data in ANFIS's learning process. Testing data should be in the range of training data for the purpose of testing procedures. The number of training epoch also gives a good result in predicting the target. Accurate targets consider a minimum prediction error from the result of ANFIS training. The error can be reduced by adjusting the variable membership function (MF) and epoch parameters. With increasing in number of MF and epoch, the error will reduce accordingly. Sometimes, no reducing in error can be noticed even though the epoch was increased up to 5000 and above. This is due to the way the data is assembled. Therefore effective input data assembly will result good prediction. For this work, effective configuration of the data has been reached by preparing a wide data range between their elements and arranging the data from small to large values.

During the training process, MF parameters are varied so as to yield the ANFIS's output as target values. The minimum error percentage is a small difference between target and prediction values and it is used to measure the success level of a training process. ANFIS performs a hybrid learning algorithm in the training process which is a combination of two algorithms namely back-propagation and least square estimate (Jang, 1993). The hybrid method improves the bad features of individual algorithm and both are popular in ANN implementation.

In hybrid learning algorithm, MF parameters are adjusted to identify the best prediction value. The parameters determine the size of MF curve as shown in Fig.1. The curve of 'gbell' shape has been selected in the learning process due to its high performance in giving a precise prediction (Jang, 1993). There are MF curve in input and output parts of ANFIS model. Back-propagation algorithm takes responsibility to vary MF parameter in input side of the model, whereas least square estimate (LSE) takes into consideration on the output side as a linear line. In MF parameters, the input side varies, whereas for output, they are static and vice versa.

Fig. 1. Gbell shape for MF curve in input side

The prediction values are performed after the MF parameters in both sides of the ANFIS model converge the values according to the given training epoch (Mitra et al., 2008). Fig.2

The data is classified as training data and testing data in ANFIS's learning process. Testing data should be in the range of training data for the purpose of testing procedures. The number of training epoch also gives a good result in predicting the target. Accurate targets consider a minimum prediction error from the result of ANFIS training. The error can be reduced by adjusting the variable membership function (MF) and epoch parameters. With increasing in number of MF and epoch, the error will reduce accordingly. Sometimes, no reducing in error can be noticed even though the epoch was increased up to 5000 and above. This is due to the way the data is assembled. Therefore effective input data assembly will result good prediction. For this work, effective configuration of the data has been reached by preparing a wide data

During the training process, MF parameters are varied so as to yield the ANFIS's output as target values. The minimum error percentage is a small difference between target and prediction values and it is used to measure the success level of a training process. ANFIS performs a hybrid learning algorithm in the training process which is a combination of two algorithms namely back-propagation and least square estimate (Jang, 1993). The hybrid method improves the bad features of individual algorithm and both are popular in

In hybrid learning algorithm, MF parameters are adjusted to identify the best prediction value. The parameters determine the size of MF curve as shown in Fig.1. The curve of 'gbell' shape has been selected in the learning process due to its high performance in giving a precise prediction (Jang, 1993). There are MF curve in input and output parts of ANFIS model. Back-propagation algorithm takes responsibility to vary MF parameter in input side of the model, whereas least square estimate (LSE) takes into consideration on the output side as a linear line. In MF parameters, the input side varies, whereas for output, they are

The prediction values are performed after the MF parameters in both sides of the ANFIS model converge the values according to the given training epoch (Mitra et al., 2008). Fig.2

ci-ai ci ci+ai

2ai

slope=-bi/2ai

x

range between their elements and arranging the data from small to large values.

where,

P : Number of rules

ANN implementation.

static and vice versa.

0.5

0

1.0

MF

Fig. 1. Gbell shape for MF curve in input side

D : Total number of column for the input data

F : Number of membership functions

and 3 show the effect of different epoch and change of MF curve's shape with respect to the prediction error in initial and final learning process.

Fig. 2. Prediction errors according to different training epoch

Fig. 3. (a) Initial stage and (b) MF curve of input side on final stage

ANFIS's learning process can be implemented easily by using the provided source code in Matlab such as 'newfis', 'evalfis' and editfis'. A trained ANFIS model is formatted with a file extension of '.fis' to represent an ANFIS module. On the other hand, the file is represented as a module for a particular task where all modules are configured accordingly based on a hierarchy layout to form a fault diagnosis system in power distribution network. The '.fis' file is also a flexible module that can reform when the data changes or new data is added without restructuring the model physically. ANFIS has a capability of producing very fast result in prediction even when handles a large size of input data. Therefore, the system is compliable to most application especially in adaptive control as well as ANFIS in implementing fault diagnosis. Each ANFIS module for a particular task is programmed by using source codes in Matlab. The programming is developed for every task in fault diagnosis and then the tasks are integrated in another programming to perform a simulation tool for fault diagnosis in power distribution network.

### **3.2 Development of ANFIS model**

A basic ANFIS model is shown in Fig.4 in which the model is illustrated in five blocks of learning stages. This model is an example of ANFIS development model for power restoration plan that consists of two inputs and two membership functions. So, there are four fuzzy 'IF-THEN' rules to show the relationship between fault locations in 'x, y' coordinates and it also shows the operational status of CB and LI in the power distribution network. So, the target is '1' for operating while '0' for non-operating state of the devices.

Fault Diagnosis in Power Distribution Network

following equations:

**3.2.2 Stage of 'IF-THEN' rule** 

**3.2.3 Normalization** 

signal by the following equation,

shown in the following equation,

where, RT = R1 + R2 + R3 + R4

**3.2.4 Defuzzification** 

Using Adaptive Neuro-Fuzzy Inference System (ANFIS) 321

is yielded via the input side of the MF curve. The curve is performed by using the

1+ �x− c� a� �

1+ �y−c�

where, Xi(x) and Yi(y) are fuzzied values for each input data, whereas ai, bi and ci are MF parameters for respective representative of middle, width and slope of the curve as shown in Fig.1. These parameters are varied accordingly to get a suitable curve in order to get fuzzy signal.

An output signal from the fuzzification stage becomes an input to the stage of the 'IF-THEN'

R1 = X1(x) × Y1(y) (4)

R2 = X1(x) × Y2(y) (5)

R3 = X2(x) × Y1(y) (6)

R4 = X2(x) × Y2(y) (7)

Next, the output signal from the stage of 'IF-THEN' rule will be an input signal to the normalization stage. In this stage, every gained signal are divided to the total of gained

The next process is signal defuzzification in which the output signal from the normalization stage becomes an input signal to this defuzzification stage. In this stage, a normalized signal is gained again through a linear equation that is formed from the MF of the output signal as

R� � i = 1, 2, 3, 4 (8)

G� = N��p�x+ q�y+ r�� i = 1, 2, 3, 4 (9)

a� �

��� (2)

��� (3)

���x� <sup>=</sup> <sup>1</sup>

Y��y� <sup>=</sup> <sup>1</sup>

rule. In this stage, the fuzzy signal is gained by using equation (4) up to (7).

R1, R2, R3 and R4 are real values for every 'IF-Then' rule.

N� <sup>=</sup>R�

with pi, qi and ri being the MF parameters for the linear signal.

In this chapter, an ANFIS model has been developed with 27 fuzzy 'IF-THEN' rules for the task of power restoration plan as shown in Fig.5 and 8 rules in determining the fault location. Since, the number of block functions represent the rules for every input data, it is difficult to describe the operational process of the model due to lack of space. However, a basic ANFIS model is shown in Fig.4 for that purpose. There are five stages of ANFIS operational process that includes fuzzification, 'IF-THEN' rules, normalization, defuzzification and neuron addition.

Fig. 4. A basic ANFIS model with two inputs data and two MFs.

Fig. 5. An ANFIS model structure for the task of power restoration plan

#### **3.2.1 Fuzzification**

Referring to Fig.4, the fuzzification stage is located at the first stage of receiving of the input signal. Its function is to convert the input signal to fuzzy signal in which the signal is yielded via the input side of the MF curve. The curve is performed by using the following equations:

$$X\_{\mathbf{l}}(\mathbf{x}) = \frac{1}{1 + \left(\frac{\mathbf{x} - \mathbf{c}\_{\mathbf{l}}}{\mathbf{a}\_{\mathbf{l}}}\right)^{2\mathbf{b}\_{\mathbf{l}}}} \tag{2}$$

$$\mathbf{Y\_{l}(y)} = \frac{1}{1 + \left(\frac{\mathbf{y} - \mathbf{c\_{l}}}{\mathbf{a\_{l}}}\right)^{2\mathbf{b\_{l}}}} \tag{3}$$

where, Xi(x) and Yi(y) are fuzzied values for each input data, whereas ai, bi and ci are MF parameters for respective representative of middle, width and slope of the curve as shown in Fig.1. These parameters are varied accordingly to get a suitable curve in order to get fuzzy signal.

#### **3.2.2 Stage of 'IF-THEN' rule**

320 Fuzzy Inference System – Theory and Applications

In this chapter, an ANFIS model has been developed with 27 fuzzy 'IF-THEN' rules for the task of power restoration plan as shown in Fig.5 and 8 rules in determining the fault location. Since, the number of block functions represent the rules for every input data, it is difficult to describe the operational process of the model due to lack of space. However, a basic ANFIS model is shown in Fig.4 for that purpose. There are five stages of ANFIS operational process that includes fuzzification, 'IF-THEN' rules, normalization, de-

N4

G4

G3

G2

OT

Neuron Addition

G1

N3

N2

N1

fuzzification and neuron addition.

Y1

Y2

X1

X2

y

x

Fig. 4. A basic ANFIS model with two inputs data and two MFs.

R4

Fuzzification 'IF-THEN' Normalization Defuzzification

R3

R2

R1

Fig. 5. An ANFIS model structure for the task of power restoration plan

Referring to Fig.4, the fuzzification stage is located at the first stage of receiving of the input signal. Its function is to convert the input signal to fuzzy signal in which the signal

**3.2.1 Fuzzification** 

An output signal from the fuzzification stage becomes an input to the stage of the 'IF-THEN' rule. In this stage, the fuzzy signal is gained by using equation (4) up to (7).

$$\mathbf{R}\_{\mathbf{l}} = \mathbf{X}\_{\mathbf{l}}(\mathbf{x}) \times \mathbf{Y}\_{\mathbf{l}}(\mathbf{y}) \tag{4}$$

$$\mathbf{R\_2} = \mathbf{X\_l(x)} \times \mathbf{Y\_2(y)}\tag{5}$$

$$\mathbf{R}\_{\mathbf{0}} = \mathbf{X}\_{\mathbf{2}}(\mathbf{x}) \times \mathbf{Y}\_{1}(\mathbf{y}) \tag{6}$$

$$\mathbf{R\_4} = \mathbf{X\_2(x)} \times \mathbf{Y\_2(y)}\tag{7}$$

R1, R2, R3 and R4 are real values for every 'IF-Then' rule.

#### **3.2.3 Normalization**

Next, the output signal from the stage of 'IF-THEN' rule will be an input signal to the normalization stage. In this stage, every gained signal are divided to the total of gained signal by the following equation,

$$\mathbf{N}\_{\mathbf{i}} = \,^{\mathbf{R}\_{\mathbf{i}}}\!/\_{\mathbf{R}\_{\mathbf{T}}} \qquad \qquad \mathbf{i} = \mathbf{1}, \mathbf{2}, \mathbf{3}, \mathbf{4} \tag{8}$$

where, RT = R1 + R2 + R3 + R4

#### **3.2.4 Defuzzification**

The next process is signal defuzzification in which the output signal from the normalization stage becomes an input signal to this defuzzification stage. In this stage, a normalized signal is gained again through a linear equation that is formed from the MF of the output signal as shown in the following equation,

$$\mathbf{G}\_{\mathbf{i}} = \begin{array}{c} \mathrm{N}\_{\mathrm{i}}(\mathrm{p}\_{\mathrm{i}}\mathrm{x} + \mathrm{q}\_{\mathrm{i}}\mathrm{y} + \mathrm{r}\_{\mathrm{i}}) \qquad \qquad \mathrm{i} = \mathrm{1}, \, \mathrm{2}, \, \mathrm{3}, \, \mathrm{4} \tag{9}$$

with pi, qi and ri being the MF parameters for the linear signal.

Fault Diagnosis in Power Distribution Network

Classify the types of fault

**4.1 Fault types classification** 

Fig. 7. A procedure in fault types classification

Using Adaptive Neuro-Fuzzy Inference System (ANFIS) 323

Start

Determine the fault in power distribution network

by using ANFIS1 module Identify the fault location

1 X <sup>10</sup> <sup>Y</sup>

ANFIS2 ANFIS3

Usually, the types of power fault are classified accordingly such as a phase to ground, a phase to phase, two phases to ground and three-phase faults. Fig.7 shows ANFIS1 module

Start

Record the three-phase RMS post-fault current (IF) and three-phase RMS current without fault (IU)

Is IF >> IU ?

Develop ANFIS1 module for classifying the types of fault in terms of integer 1 to 10

End

Yes

Plan the power restoration by using ANFIS4

1 or 0

Fig. 6. A block diagram of the procedures in fault diagnosis system

No

#### **3.2.5 Neuron addition**

The last process in the ANFIS operation is called neuron addition in which all defuzzification signals, Gi are added together as shown below:

$$\text{OT} = \begin{array}{c} \sum \text{G}\_{\text{l}} \\ \end{array} \qquad \qquad \text{i} = \text{1, 2, 3, 4} \tag{10}$$

OT is a predicted value.

### **3.3 Good features of the ANFIS**

The advantages of ANFIS are compared to other artificial intelligent techniques such as an artificial neural network (ANN) and an expert system (ES). The advantages are as follows; i) ANFIS gives a high precision in classification and prediction models. This precision when compared to the index error that is presented between ANFIS and ANN show the error of 0.036 and 0.32 respectively (Jang, 1993). ii) ANFIS has adaptive features to solve wrong data problem that involves new power network configuration. The scenario is rather difficult to solve using expert system due to fixed rules. iii) ANFIS has an effective learning process on the training data while considering optimization in its implementation (Jang, 1993; De Souza et al., 2003).

#### **4. The ANFIS design for fault types classification and fault location determination**

The development of fault diagnosis in power distribution network implements the ANFIS approach because of its compact structure, very fast training process and precise prediction. A developed fault diagnosis requires a compact ANFIS model development with significant tasks. The tasks involve fault types classification, fault location determination and identification of an operational state of CB and LI for power restoration plan. Every task is represented by an ANFIS model that is structured based on a hierarchy of power distribution network. Post-fault three-phase root mean square (RMS) current is applied to the model to produce the respective task at the output. For the purpose of developing fault diagnosis in power distribution network, such fault current is only used as the model input. If a measured current is more than the current without fault in a network, surely there is some fault in the power network. Fig.6 shows a block diagram of the fault diagnosis development that consists of four ANFIS modules. The modules are stated as ANFIS1 to ANFIS4 when representing the diagnosis tasks. From the figure, post-fault 3-phase current from the faulty power network is injected to ANFIS1 that is responsible for predicting the target in integer 1 to 10 when representing the types of fault.

Meanwhile, fault location is identified according to geometry coordinates. The same fault current as an input to the ANFIS1, is also applied to ANFIS2 and ANFIS3 modules in which they are developed to produce the output in X and Y coordinates respectively. In other words, the modules represent precise fault point in the power network. The technique of geometry coordinate gives better accuracy in producing the fault location compared to the cut-off faulty line approach (Butle-Pury & Moratti 2006). Furthermore, Fig.6 shows a position of ANFIS4 module for restoration power plan in the network. The input signal to this module is from fault location identification whereas the operational states of CB and LI are the module output. The states are considered for the purpose of determination of a new power network configuration. Faulty lines must be isolated before proceeding to the power restoration plan. Binary codes are used to show the states in which digit '1' represents CB and LI in 'close' whereas digit '0' is in 'open' switch.

The last process in the ANFIS operation is called neuron addition in which all

The advantages of ANFIS are compared to other artificial intelligent techniques such as an artificial neural network (ANN) and an expert system (ES). The advantages are as follows; i) ANFIS gives a high precision in classification and prediction models. This precision when compared to the index error that is presented between ANFIS and ANN show the error of 0.036 and 0.32 respectively (Jang, 1993). ii) ANFIS has adaptive features to solve wrong data problem that involves new power network configuration. The scenario is rather difficult to solve using expert system due to fixed rules. iii) ANFIS has an effective learning process on the training data while considering optimization in its implementation (Jang, 1993; De Souza et al., 2003).

The development of fault diagnosis in power distribution network implements the ANFIS approach because of its compact structure, very fast training process and precise prediction. A developed fault diagnosis requires a compact ANFIS model development with significant tasks. The tasks involve fault types classification, fault location determination and identification of an operational state of CB and LI for power restoration plan. Every task is represented by an ANFIS model that is structured based on a hierarchy of power distribution network. Post-fault three-phase root mean square (RMS) current is applied to the model to produce the respective task at the output. For the purpose of developing fault diagnosis in power distribution network, such fault current is only used as the model input. If a measured current is more than the current without fault in a network, surely there is some fault in the power network. Fig.6 shows a block diagram of the fault diagnosis development that consists of four ANFIS modules. The modules are stated as ANFIS1 to ANFIS4 when representing the diagnosis tasks. From the figure, post-fault 3-phase current from the faulty power network is injected to ANFIS1 that is responsible for predicting the

Meanwhile, fault location is identified according to geometry coordinates. The same fault current as an input to the ANFIS1, is also applied to ANFIS2 and ANFIS3 modules in which they are developed to produce the output in X and Y coordinates respectively. In other words, the modules represent precise fault point in the power network. The technique of geometry coordinate gives better accuracy in producing the fault location compared to the cut-off faulty line approach (Butle-Pury & Moratti 2006). Furthermore, Fig.6 shows a position of ANFIS4 module for restoration power plan in the network. The input signal to this module is from fault location identification whereas the operational states of CB and LI are the module output. The states are considered for the purpose of determination of a new power network configuration. Faulty lines must be isolated before proceeding to the power restoration plan. Binary codes are used to show the states in which digit '1' represents CB

**4. The ANFIS design for fault types classification and fault location** 

target in integer 1 to 10 when representing the types of fault.

and LI in 'close' whereas digit '0' is in 'open' switch.

OT = ∑ G� i = 1, 2, 3, 4 (10)

defuzzification signals, Gi are added together as shown below:

**3.2.5 Neuron addition** 

OT is a predicted value.

**determination** 

**3.3 Good features of the ANFIS** 

Fig. 6. A block diagram of the procedures in fault diagnosis system
