Home > Computer science essays > Enhanced Artificial Immune Systems (EAIS) algorithm

Essay: Enhanced Artificial Immune Systems (EAIS) algorithm

Essay details and download:

Text preview of this essay:

This page of the essay has 2,852 words. Download the full version above.

With the automation of the distribution networks, an efficient operation offers more significant advantages for electricity companies. In this sense, the distribution system reconfiguration (DSR) acquires a fundamental role and requires robustness and speed to solve the problem in real time. This paper proposes a methodology for the solution of the problem of DSR using artificial immunological systems, based on a new approach of hypermutation proportional to the electric current, which makes it more robust and efficient. The problem is accomplished by a multi-objective optimization with fuzzy variables, minimizing power losses, deviation of voltage, and load balancing between feeders. The proposal is simulated in test systems of 14, 33, 84 and 136 buses, and on Administración Nacional de Electricidad (ANDE) real distribution systems (ENC- 23-kV feeder). A comparison with other DSR solution methods is presented.

Index Terms— Distribution system reconfiguration, artificial immune systems, fuzzy logic


Distribution systems usually have a radial topology with resources (weekly meshed system). This arrangement allows a more straightforward and more reliable protection system design and operation. The connection with other feeders enables the configuration (reconfiguration) to be modified by changing the state of a set of switches which are normally closed (NC) or normally opened (NO).

Distribution systems support a large number of possible configurations, depending on the number of switches and circuits available. These configurations alter the values of current, voltage and system electrical losses. Reconfiguration is a way to reduce electrical losses and to improve the voltage quality at the final consumer. Moreover, reconfiguration is the first alternative and possibly a more economical strategy versus others measures, like an installation of voltage regulators and capacitors or resizing electric circuits.

With the automation of the distribution grid, real-time reconfiguration studies are essential for the system operator’s decision making, with the purpose to maintain high-quality service at the lowest possible cost.

Several papers on distribution system reconfiguration (DSR) were developed with a multi-objective approach, the primary objective being the reduction of electrical power losses. The evolutionary algorithms are the most used. In [1]-[10], the reconfiguration problem was resolved using a genetic algorithm. In [11]-[14] algorithms based on Artificial Immune Systems (AIS) are used, whereas algorithms based on the Swarm Optimization Particle are developed in [15]-[20].

Other evolutionary algorithms used are colony search-based algorithm [21], heuristic and meta-heuristic harmony search [22] enhanced gravitational search algorithm [23], and runner-root algorithm [24]. Other heuristics used are mixed-integer quadratic programming (MIQP) [25], [26], optimal flow and branch Exchange [27].

Optimization of DSR has the primary objective of reducing losses in [1]-[21],[23]-[28], whereas reference [22] focuses on voltage security. In [26]-[28] loss reduction is approached as a mono-objective problem.

Several papers propose a multiobjective approach for the solution of DSR. In addition to loss reduction, the following objective functions are proposed: the improvement of reliability [1],[2],[4],[11],[23], the reduction of operational costs [7],[9],[16],[23],[24], voltage profile improvement [9]-[10],[16]-[18],[25], and load balancing [17]-[18],[21],[24].

In [1], [10] the multiobjective problem is approached using weights in pu, whereas in [2],[7],[13] the problem is translated into a single objective through cost analysis. Techniques based on non-dominant Pareto solutions are used in [3], [11],[16],[18], and methods based on fuzzy logic are used in [9],[17],[21],[23],[24].

In this paper, a novel method based on enhanced Artificial Immune Systems (EAIS) is proposed to solve the DSR problem with a fuzzy multiobjective formulation. The algorithm developed by EAIS is similar to [11], since graph theory for network representation is employed. However, some improvements are proposed in the AIS approach and also in the multiobjective analysis using fuzzy logic. In the AIS, a mutation probability approach proportional to the current is employed, making it more efficient. This methodology improves the advantages of AIS regarding the capacity of local and global search with higher speed and lower computational cost. The mutation approach proposed is the main contribution of this work, this could also be adopted for other heuristics such as Genetic Algorithms, or others that require mutations.

Artificial Immune Systems

The Artificial Immune System (AIS) is a paradigm of artificial intelligent inspired by metaphors of the immunological system of vertebrates. This algorithm was chosen due to its robustness about the efficiency in combating foreign attacks. This system works in a decentralized, parallel, and adaptive way, which is a desirable characteristic in the field of finding solutions to complex problems, and in the area of artificial intelligence [11].The AIS uses the principles and patterns observed in immunological systems, which are then applied to solve problems. One of the characteristics of these systems is the robustness, expressed in their tolerance to disturbances in individual components that can perform complex tasks when acting together [29].

The AIS is an evolutionary algorithm based on the Clonal Principle [29].This principle uses the main operator called hypermutation. This operator has two steps: cloning of affinities with antibodies directly proportional to affinity and a mutation with an inverse proportional to affinity. Due to this characteristic, the cloning is directed with the higher degree to the local search and the mutation to the global search, to determine an optimal balance between the local and global search. In [31], the AIS is used to solve the problem in distribution systems of charging electric vehicles. In [11] the AIS is proposed to solve the problem of reconfiguration of the distribution system, using graph theory and Prim algorithm. In [12-13] algorithms based on AIS are developed for the DSR solution, and reference [14] presents two approaches based on AIS: the Copt-aiNet (Artificial Immune Network for Combinatorial Optimization) and Opt-aiNet (Artificial Immune Network for Optimization) algorithms, for solving the DRS problem.

This document proposes the use of an algorithm based on AIS with adaptations in the way of applying the mutation process, for the solution of the multi-objective DSR problem. Section 5 details the proposed hypermutation mechanism to improve this search in DSR problems.

Fuzzy Logic

In contrast to the called crisp values sets based on the classical Boolean Logic, fuzzy sets may take truth values between 0 and 1. Furthermore, when linguistic variables are used, these degrees may be managed by specific membership functions.

Thus, a fuzzy set is defined in the universe of discussion as a set of ordered pairs:

A={x,(μ_A (x))⁄x ϵ X}

The membership degree of a particular variable is established by the membership functions μA(x) (Membership Function – MF).

This paper process a multi-objective analysis by the fuzzification of sets of real objective functions. After this fuzzification, this problem is converted to a single function by the weighted sum of these fuzzified functions, similar to [9],[17],[21]-[24].

To exploit the potential of fuzzy logic, the choice of the membership function is critical. The membership function choice depends on the characteristics of the physical variable analyzed. The limits or maximum, minimum and central values are essential to assign the importance degree of the variable.

Distribution System Reconfiguration

In this section, the methodology used to resolve the distribution system reconfiguration is shown.

Distribution Systems Power Flow

In distribution systems, the application of the Newton-based methods of resolution of power flow is not viable due to the high value of X/R ratio, the radial topology and the phase unbalance. However, other methods are available such as a backward-forward sweep, and Z-bus matrix. In this paper, the backward-forward sweep method [31] is used. For an M bus radial distribution network; there are only M−1 lines (elements), and branch currents can be expressed regarding bus currents with the nomenclatures given in equations (1) and (2).

〖 I〗_bus=K∙I_branch (1)

I_branch=K^(-1)∙I_bus (2)

Where I_bus is a vector of currents of each bus j of order M-1, I_(branch )is the vector of currents of each branch (j, m (j)), and m (j) is the bus connected to j. The matrix K is an element incidence matrix. It is a nonsingular square matrix of order (M-1). The elementary incidence matrix is constructed in such a way that:

K(j, m (j))=1: The diagonal elements of matrix K are ones.

K(j, m (j)) =−1.: if branch (j, m (j)) is connected

K(j, k) =0.: All the remaining elements are zeros.

The calculation of power flow used in [30] allows load imbalance per phase.

Graph Theory

In the same way, as in [11], the network is represented by graphs, for managing topology. The nodes represent a set of loads, and the edges represent switches and branches. The distribution circuits are represented by a forest, where each feeder is a tree. Thus all loads are connected, and the radial nature of the circuits is assured. The incidence matrix is used in the same way as the power flow with equations (1) and (2). The control variable is the vector( x) ̅=[x_(1,) x_(2 ),x_(3 )……,x_i,……,x_n ], where x_i=0 if the switch i is open, and x_i=1 if it closed. N=[1,2,3,..……. .,i,………,n] is the vector of the numbers of the switch, in correlative order to facilitate the representation.

N_1={n_m } , n_m is the number of the switches with closed position, and N_2={n_l }, where n_l, is the number of the switches with open position and n, N={N_(1 ,) N_2 } is the total switch set.

The same representation is used for the power flow. Thus, the branch that does not change its state behaves like a fixed switch that maintains its status equal to 1, so these branches do not belong to the set of variables〖 x〗_i.This representation is simplified by using the same incidence matrix for the power flow and for the graph that manages the configurations.

The feasibility conditions of a particular configuration are the radiality (there are no closed meshes) and the connection of all the buses. In graph theory, this implies that each feeder must be represented by a tree and the system as a forest (set of trees connected by a common node).

In [11] the algorithm of Prim is used to obtain the initial population and to ensure the construction of a forest in the network. In this work, the condition of forest is obtained using the Matroid theory used in [1,2,4,5,10,11,14,16]. Starting from a feasible configuration N_(2,) possible closed loops are obtained (fundamental loops), closing the n open switches.

The number of fundamental loops is given by the formula (3). This number is equivalent to N_2.

L_f=M-N+1 (3)

Where〖 L〗_f is the number of fundamental loops, M the number of buses, and N the number of branches.

The condition of the tree is maintained if, in each of these fundamental loops, one of its switches is open.

Fig.1 shows an example of a 14-bus test system, used in [2,3,11,14,17,20,27]. It has 14 buses, 3 feeders, and 16 branches. In this case, the 16 branches correspond to switches, 13 usually closed (NC) and 3 normally open (NO). The initial configuration is equal to x ̅^0=[1,1,1,1,1,1,1,1,0,1,0,1,1,1,10], equivalent to 〖N_1〗^0=[1,2,3,4,5,6,7,8,10,12,13,14,15,], and 〖N_2〗^0=[9,11,16]. There are 3 fundamental loops given by:

L_1=[1 ,2,5 ,7 ,8,11 ],L_2=[2,3,9,10,13],

L_3=[1 ,3,4 ,6,14,15,16].

Objective Functions

Power loss reduction

The power loss of the system is:

P_loos=∑_(l=1)^Nbr▒〖|I_l |^2 R_l 〗 (4)


I_l represents the currents of branch l

Nbr represents the number of branches of the system included closed switches

R_l represents the resistance of branch l

Ploss represents the total loss power of the branches

The membership function used in this case is the shoulder function (Fig. 1), and the fuzzification is performed by (5):

(P_loosT ) ̃”=μ” (P_lossTi )”=” {■(1, P_lossTi<P_lossT^min@(P_lossT^max-P_lossTi)/(P_lossT^max-P_lossT^min ), P_lossT^min≤P_lossTi≤P_lossT^max@o, P_lossTi>P_lossT^max )┤ (5)

Load balancing function

Load balance is an important issue to obtain a uniform distribution demand in the feeder of a same substation or bay of feeders or substations. This strategy allows the optimization of infrastructure investments and extends the useful life of the equipment through the optimal distribution of phase’s currents in the feeders set.

The load balancing function can be represented by an index that measures the imbalance between demands of feeders considering restrictions such as voltage drop, the maximum capacity of the lines, and radial topology. The load balancing index among feeders is represented by (6):

β=(∑_(k=1)^n▒|I_k-I ̅ | )/I ̅ (6)

I ̅=(∑_(k=1)^n▒I_k )/n (7)


(I ) ̅represents the average current of substation feeders.

I_k represents the current in the feeder ‘k’ obtained by a power flow methodology.

The membership function used is the shoulder function. This function must find a minimum; therefore, fuzzification is made by equations (8):

β ̃_i “=μ” (β_i )”=” {■(1, β_i<β^min , @(β^max-β_i)/(β^max-β^min ), β^min≤@o, β_i>β^max )┤ β_i≤β^max (8)

where β^min is the minimum value of imbalance, in this case, 2%, and β^max is the maximum values allowed (In this paper, 40%). The minimization problem is translated to a maximization problem of the fuzzy function (β_i ) ̃.

Voltage drop function

The voltage drop (in relation to the nominal value) is given by equation (9)

∆V_max=max(|V_J-V_ref |) j=1,2,…..,nb (9)


V_J represents the j-bus voltage obtained by power flow.

V_ref represents the nominal voltage value.

nb is the number of system buses

The fuzzified function is calculated by the equations given in (10). In this case, the triangular membership function was used, because the voltage has an optimal central value.

(∆V_m ) ̃_i “=μ” (∆V_m i)”=” {■(■(0, V_i<V_min@(V_i-V_min)/(V_ref-V_min ), V_min≤V_i≤V_ref )@■((V_i-V_max)/(V_ref-V_max ), V_ref≤V_i≤V_max@0, V_i>V_max ),)┤ (10)


V_i is the bus related to ∆V_m i (absolute value)

V_max is the maximum voltage allowed

V_min is the minimum voltage allowed

In this case, as well as in the previous one, the minimization problem is transformed into a maximization problem of the fuzzy function (∆V_m ) ̃, as shown in Fig. 2.

Problem formulation

The formulation of the problem can be listed as follows:



is a binary vector indicating the state (open-closed) of system switches,〖 x〗_i=0 if open and x_i=1 if closed

feeder at current pickup

The multi-objective problem can be represented as maximization of fuzzy functions, where a global objective function is calculated through weighted sums according to the equation (12).

(Z_1 ) ̃=w_1∙(P_loosT ) ̃+w_2∙β ̃+w_3∙(∆V_m ) ̃ (12)

Proposed Algorithm

Algorithm Flowchart

The AIS is applied in a similar way to [11], with the improvement of the mutation and fuzzy multiobjective analysis. The flowchart of this algorithm is presented in Fig. 3. The first population is performed by successively applying random mutations identical to [14] from the initial configuration, unlike the approach of [11], which is performed by using Prim’s algorithm. The original configuration of the circuit is included. Then the functions are computed by calculating the power flow. After that, these functions are fuzzified, converting the multi-objective problem into a mono-objective problem. The global objective function is calculated by equation (12), which corresponds to the affinity value. The more affined antibodies are cloned and subjected to the hypermutation process. In [11], the hypermutation process is realized in any bit of the antibody represented by a binary vector. This process varies from the state of one component (switch).

In this paper, the cloning-hypermutation process is carried out according to the approach developed in the section V-B using equations (14), (15) and (16). This approach consists of an adaptation of the CLONALG algorithm described in [30], similar to that developed in [11] and [12]-[13], but with the difference in hypermutation that includes the probability of mutation depending on the current of each switch.

Cloning-hypermutation proposal

The cloning-hypermutation process is performed in 3steps detailed below.

Step1: The cloning of the population is done according to equation (13). Since the number of clones is directly proportional to the affinity; the affinity evaluation is performed with the position i. Position i = 1 corresponds to the individual with higher affinity, and i = N the worst affinity individual.

Step2: An element of n_2^*∈ N_2of each individual is chosen at random, and changes from open state to closed state. A loop composed of the set of switch L=[L_m ]is created in this way using a depth search algorithm of Graph Theory. It is possible to extract these elements through the incidence matrix A. The opening of one of the keys of L_m, is done, in this way it is ensured that the obtained graph is a forest, which implies the radially of the configuration and the connection of all the nodes. This process is carried out following the mutation control criteria described below:

It extracts the values of the currents I=[I_m ] of the formed loop L=[L_m ], from the previous equilibrium point in the last configuration (the individual without applying the mutation)

The opening of one of the keys of L=[L_m ]is performed, according to the probability given in equation (14).

The successive application of mutations is carried out according to (15). For this case, from the second consecutive mutation, the opening probability is the same for all the switches〖 p〗_m^*=1.

Step3: The vector N_1is updated, adding the closed switch and removing the open switch, yielding vector〖 N〗_2 . Then, the incidence matrix A is updated, enabling one to assess the objective function.

cl=round((β×N)/i) (13)

p_m= exp(-(1-i/(δ×N)) I_m^* ) (14)

q_i=round(exp(α∙i/N)∙rand(1,0)) (15)

The degree of affinity is established with the position i, being the antibody more affine for i=1, and the least related to i=N, where N is the antibody population size.

Equation (13) implies that the number of clones is directly proportional to the degree of affinity, establishing a higher local search for more affinity antibodies. Equation (14) determines the probability of switch opening inversely proportional to the current for (1-i/(δ×N))>1 and directly proportional to the current for (1-i/(δ×N))<1, according to the affinity, involving slight changes in the configuration for more affinity antibodies (favoring the local search) and significant changes in the configuration for less affine antibodies (favoring the global search). This is because the opening of a switch associated with a higher current value provokes considerable changes in the configuration. Equation (15) establishes the number of successive mutations inversely proportional to the degree of affinity, favoring local search for more affinity antibodies and global search for fewer affinity antibodies. Rand (1,0) is a random real number between 0 and 1.

Fig. 4 establishes the relationship between affinity and global and local search control.

Example of cloning-hypermutation proposal

Fig. 5 shows the IEEE 14-bus system. The cloning of the population is done according to equation (13). The mutation of this individual depends on its affinity. There are 2 extreme cases: high affinity (i = 1) individual determined by 〖N_2〗^1=[9,11,16] and low affinity (i = 10), defined by 〖N_2〗^10=[6,14,10] then the relationship is proportional in a continuous way to these cases. This individual will be the initial condition to explain the mutations in each case.

High-Affinity Individual given by 〖N_2〗^1

The individual given by〖〖 N〗_2〗^1=[9,11,16] has high affinity, according to the previous power flow value. The currents is given by I=[〖I_(1 )〗_( )……I_m…..I_(16 ) ], for each m branch. An element of the 〖〖 N〗_2〗^1 is then selected at random (for example switch 11), and it is closed, creating the set loop L=[1 2 5 7 8 11]. The currents of the loops are given by I=[I_(11 ) I_(7 ) I_(5 ) I_(8 ) I_(2 ) I_(1 ) ], ordered from the lowest to the highest (I_11=0). Equation (14) is applied and the opening probability of each switch of the loop is obtained, yielding ρ^1=[ρ_(7 ) ρ_(5 ) ρ_(8 ) ρ_(2 ) ρ_(1 ) ρ_(11 ) ], ordered from the highest to the lowest (ρ_(11 )=0) After applying the probability, the opening of the switch is performed, (for example, the switch 7), and the configuration obtained is shown in Fig. 6.

Low-Affinity Individual given by 〖N_2〗^10

According to the power flow and the evaluation of the objective functions, the individual is given by〖 N_2〗^10=[11,14,10] has low affinity. Like in the previous test an element is selected at random (for example switch 14), and it is closed creating the loop set L=[1 4 6 16 15 14 3]. The previous current values [〖I_(14 ) I〗_(15 ) I_(16 ) I_(3 ) I_(6 ) I_(4 ) I_(1 ) ] are obtained in the configuration given by 〖N_2〗^10and ordered from the lowest to the highest, (I_14=0).. Equation (14) is applied, and the opening probability of each switch of the loop is obtained, ρ^1=[ρ_(1 ) ρ_(4 ) ρ_(6 ) 〖ρ_(3 ) ρ_(16 ) ρ〗_(15 ) ρ_(14 ) ], (ρ_(14 )=0) . After using the probability, the opening of the switch is performed, (for example, the switch 6) and the configuration is given by 〖 N_2〗^(10*)=[11,6,10] , shown in Fig. 7 (small affinity implies a high change in configuration). Applying equation (15) for the successive mutation (random), it is likely that one or more mutations are made to this individual. In this example, a successive mutation is applied, closing a switch of 〖 N_2〗^(10*) at random and opening another switch of the loop (also at random), yielding the new individual given by〖 N_2〗^(10**)=[5,6,10], shown in Fig. 8, which determines a configuration with great modification and more viable than the previous given by 〖 N_2〗^(10*).

Thus, a strong mutation was carried out due to a large change in the initial configuration. This implies a global search in a probabilistic way more effective than the application of completely random mutations.

For antibodies with higher affinity, the opening of switch that has low currents in the previous configuration will cause a small change in the configuration in the objective function and consequently, in the affinity of the individual. This type of action creates a minor effort in the calculation of the power flow in the next iteration and favors the local search for the optimal solution. For less affine individuals, the opening of the switch with higher current is favorable to the global search and applying successive mutations also avoids the loss of solutions with overloaded configurations and high losses. This strategy does not require a high additional cost, since the calculation of power flow is made every iteration for the evaluation of the objective function, and the equations are simple.

For comparison purposes, the algorithm proposed EAIS is compared with an algorithm AIS similar to [11], [13], developed in this work.


In this section, simulation results are presented in three test systems, of 33, 84 and 136 buses, with the objective of reducing losses. The results of the proposed algorithm of EAIS are compared with another AIS algorithm without the proportionality to the current. Further simulations are made with the real system with optimization of loss reduction and multiobjective optimization of power losses, load balance between feeders and voltage deviation.

33 Bus System

A 12.66 kV 33-bus radial electrical distribution test system is employed[1],[3],[5],[10],[12],[14]-[16],[21]-[25],[27],[28], which includes five tie switches (open switches) on the initial configuration (switches from 33 to 37) with power loss of 202.68 kW. Values of β = 0.5, N = 30, α = 1, δ = 0.66 are chosen. The maximum number of iterations is 20.

The results are shown in Table 1, and the convergence in is represented in Fig. 9 for the AIS algorithm and in Fig. 10 for the proposed method with 10 simulations.

84 Bus System

A 11.40 kV 84-bus radial electrical distribution test system [14],[19],[25] is used, which includes 13 tie switches (open switches) on the initial configuration (switches from 84 to 96) with a power loss of 531.90 kW. The results are shown in Table 2, and the convergence is represented in Fig. 11 for the AIS algorithm, and in Fig. 12 for the proposed algorithm with 10 simulations. Values of β = 0.5, N = 40, α = 0.5, δ = 0.8 are chosen. The maximum number of iterations is 30.

136 Bus System

A 13.8 kV system with 136 buses and 156 branches is now employed [14],[19],[25]. The initial power loss is 320.36 Kw for total loads of 18313.8 kW and 7932.5 kVar. The results are shown in Table 3, and the convergence is represented in Fig. 13 for the AIS algorithm and in Fig. 14 for the proposed method with 10 simulations..

Values of β = 0.3, N = 50, α = 2, δ = 0.8 are. The maximum number of iterations is 120.

Real System

This system corresponds to an actual integrated network of 3 distribution feeders located in the downtown of Encarnacion City – Paraguay. This system has 527 buses, 91 switches, 43,969 km of distribution line (23kV) and 47,387 kVA installed.

Fig. 15 shows the single-line diagram of this circuit. The results are shown in Table IV, and the convergence with simple objective loss reductions is presented in Fig. 16. For the multiobjective optimization, equation (15) was used with w1 = 0.8, w2 = 0.1 and w3 = 0.1. The convergence is shown in Fig. 17. Values of β = 0.3, N = 50, α = 2, δ = 0.8 are used. The maximum number of iterations is 120.

There is a noticeable improvement in the voltage and the current balance without causing too much loss reduction.


This paper proposes an Enhanced Artificial Immune Systems (EAIS) algorithm with the intelligent mutation approach with a probability related to the current of each branch, reducing the search space, in addition to avoiding as much as possible the calculation of the power flow in overloaded configurations lowering the cost computational.

The proposal was compared with an AIS algorithm with no probability proportional to the current mutations, that is, random, the results obtained were satisfactory with test systems of 33, 84 and 136 buses.

Subsequently, the validated tool was applied to a real system with a mono-objective approach for loss reduction and multi-objective to reduce losses, the load balance between the feeders and the voltage deviation, obtaining satisfactory results.

These results make viable the use of the algorithm proposed for the operation in real time and then can be applied to a variable load approach due to the solidity and the reduction of the computational cost offered by the proposal


...(download the rest of the essay above)

About this essay:

If you use part of this page in your own work, you need to provide a citation, as follows:

Essay Sauce, Enhanced Artificial Immune Systems (EAIS) algorithm. Available from:<https://www.essaysauce.com/computer-science-essays/enhanced-artificial-immune-systems-eais-algorithm/> [Accessed 03-12-22].

These Computer science essays have been submitted to us by students in order to help you with your studies.

* This essay may have been previously published on Essay.uk.com at an earlier date.