# An Improved Harmony Search Algorithm for Power Distribution Network Planning

Authors: Wei Sun; Xingyan Chang
Journal: Journal of Electrical and Computer Engineering
 (2015)

---

## Abstract

Distribution network planning because of involving many variables and constraints is a multiobjective, discrete, nonlinear, and large-scale optimization problem. Harmony search (HS) algorithm is a metaheuristic algorithm inspired by the improvisation process of music players. HS algorithm has several impressive advantages, such as easy implementation, less adjustable parameters, and quick convergence. But HS algorithm still has some defects such as premature convergence and slow convergence speed. According to the defects of the standard algorithm and characteristics of distribution network planning, an improved harmony search (IHS) algorithm is proposed in this paper. We set up a mathematical model of distribution network structure planning, whose optimal objective function is to get the minimum annual cost and constraint conditions are overload and radial network. IHS algorithm is applied to solve the complex optimization mathematical model. The empirical results strongly indicate that IHS algorithm can effectively provide better results for solving the distribution network planning problem compared to other optimization algorithms.


---

## Body

## 1. Introduction

Distribution network planning can reduce the probability of blackouts, reduce transmission loss, and improve power quality, so that it is an important part of power distribution automation system. The main task of distribution network planning is to optimize network structure and find the optimal expansion scheme of power distribution network. The distribution network planning problem consists of minimizing investment and operation cost of the objective function subject to technical constraints, such as overload, voltage drop, and radial network. Distribution network expansion planning is a complex and large scale combinatorial optimization problem; the classical mathematical methods cannot perform satisfactorily for solving it [1–4]. Modern metaheuristic methods, such as Genetic Algorithm (GA), Particle Swarm Optimization (PSO), and Ant Colony System (ACS), are used recently to solve the distribution network planning problem and have achieved some results. However, the heuristic algorithms mentioned above have some defects: GA is a stochastic search algorithm for global optimization problems. It can reduce the difficulty of solving distribution network planning which is a nonlinear, multiconstraint, and multiobjective problem [5]. But in the practical application of the distribution network planning, it always falls into local optimum prematurely and converging slowly; there may even be infeasible solutions; PSO is a classic biological intelligence algorithm and has some advantages over other similar optimization techniques such as PSO which is easier to implement and there are fewer parameters to adjust, but it is prone to premature convergence [6]; ACS is a swarm intelligence algorithm based on distributed parallel search mechanism. It has strong robustness, but it also has some defects such as long calculation time, prone to stagnation and premature convergence [7, 8].HS algorithm is a heuristic search algorithm for global optimization, which has been recently developed in an analogy with music improvisation process where musicians in an ensemble continue to polish their pitches in order to obtain better harmony [9]. The algorithm has the advantages of simple concept and model, easy implementation, less adjustable parameters, and quick convergence. However, when to solve the complex optimization problems, the standard HS algorithm still has some defects such as premature convergence. According to the defects of the standard algorithm and characteristics of distribution network planning, this paper proposed an improved harmony search (IHS) algorithm with the mechanism for dynamically adjusting parameters. We apply IHS algorithm to solve power distribution network planning. The simulation of example obviously shows that the solution is superior to that of other optimization algorithms.


## 2. Mathematical Model of Distribution Network Planning

In this paper, the model of distribution network planning adopts the objective function to minimize comprehensive costs per year, including the line investment expenses, the depreciation and maintenance costs, and the running year electrical energy loss expense. Considering overload constraints and radial network structure constraints, the objective function can be described as follows [10]:
(1)min⁡f(x)=∑i=1nC1iTixi+C2iτmax⁡iΔPi+M1×L,whenthenetworkisradialM2,else,
where f(x) is the cost per year of distribution network planning; C1i=γi+∂i, γi is the rate of return on investment; ∂i is annual depreciation rate of equipment; Ti is the total investment for the ith newly built line; X is n-dimensional decision vectors; X=x1,x2,…,xn is the n transmission lines which is to be elected in the optimization problem. xi is the element of X, xi=1 when the ith line is newly built, and xi=0 otherwise; C2i is unit power price; τmax⁡i is annual maximum load utilization hours; ΔPi=Pi2+Qi2Ri/Ui2 is the active power loss of the ith line; M1 is penalty coefficient of overload; L is the load which exceeds the total load demand of power system; M2 is a very large penalty value when the network is not radial.


## 3. Harmony Search Algorithm

Harmony search (HS) algorithm is a relatively new metaheuristic algorithm, which was proposed by Geem et al. [9]. Like other heuristic algorithms imitating natural phenomena or artificial ones, HS algorithm is also a heuristic algorithm mimicking the improvisation process of music players, where musicians improvise the pitches of their instruments to search for a perfect state of a harmony.In HS algorithm, musical performances seek a perfect state of harmony determined by aesthetic estimation, as the optimization algorithms seek a global optimum determined by objective function value. Specifically, musical instrumenti  (i=1,2,…,n) is analogous to the ith decision vector of the optimization problems. Each tone of the instrument is analogous to each value of the decision variable. The harmony Hj  (j=1,2,…,n) produced by musical instruments is analogous to the jth solution of the optimization problems. Aesthetic evaluation is analogous to the objective function. The main control parameters of HS algorithm are harmony memory (HM), Harmony Memory Size (HMS), Harmony Memory Considering Rate (HMCR), Pitch Adjusting Rate (PAR), and Band Width (BW). Here, HM is a memory location where all the solution vectors are stored; HMCR and PAR are parameters that are used to improve the solution vector [11].In the process of iteration, each new harmony vectorxnew=(x1new,x2new,…,xnnew) is generated based on three rules: (i) memory consideration, (ii) pitch adjustment, and (iii) random selection. Generating a new harmony is called “improvisation” [11]. In the memory consideration, the value of each component is updated as follows:
(2)xinew=xij,j∈1,2,…,HMS,rand1<HMCRxi∈Xi,else,
where rand1 is a random number uniformly distributed in the range of [0,1] and Xi is the value space of the ith variable.Each component obtained by the memory consideration is examined to determine whether it should be pitch-adjusted. The PAR parameter is the rate of pitch-adjustment. The equation of pitch-adjustment can be described as follows:(3)xinew=xij±rand2*BW,rand2<rand2<PAR(whenxiiscontinuous)xi(k+m),rand2<rand2<PAR(whenxiisdiscrete)xinew,else,
where rand2 is a random number uniformly distributed in the range of [0,1] and m is a constant, which belongs to the (-1,1).


## 4. Improved Harmony Search Algorithm

### 4.1. HMCR

HMCR
∈
[
0,1
] determines whether the value of a decision variable is to be chosen from HM. In order to ensure that the algorithm can quickly find local optima in the early operation and the solutions obtained in the later are diverse, this paper adopts the following linear decreasing strategy to update HMCR [12]:
(4)HMCRt=HMCRmax⁡-HMCRmax⁡-HMCRmin⁡*tTmax⁡,
where t denotes iteration number; Tmax⁡ is the maximum total number of iterations; HMCRmax⁡ and HMCRmin⁡ represent maximum and minimum harmony memory considering rate, respectively.


### 4.2. PAR

In HS algorithm, PAR plays a role in controlling local search. The appropriate PAR can avoid the search being trapped in local optimum effectively. Normally, the smaller PAR is beneficial to quickly find the local optimal solution in early search stage, while the larger PAR is propitious to jump out the local optimal in the later stage. Therefore, dynamic change strategy for PAR is incorporated into the algorithm in this paper; the mathematical expression for PAR is(5)PARt=PARmax⁡-PARmin⁡π/2*arctant+PARmin⁡,
where PARt denotes pitch adjusting rate for the tth generation; PARmax⁡ and PARmin⁡ represent maximum and minimum harmony memory considering rate, respectively.


### 4.3. BW

The appropriate BW can be potentially useful in adjusting convergence rate of algorithm to optimal solution. In this paper, BW changes from large to small. BW changes dynamically with generation number as expressed as follows:(6)BWt=BWmax⁡-BWmax⁡-BWmin⁡Tmax⁡*t,
where PARt denotes pitch band width for the tth generation; BWmax⁡ and BWmin⁡ represent maximum and minimum harmony memory considering rate, respectively.


### 4.4. The Optimization Steps after Algorithm Improved

The optimization steps are summarized in the following.Step 1.
Initialize the HS algorithm parameters. Initialize the maximum number of iterationsTmax⁡; the harmony memory size (HMS), the maximum and minimum harmony memory considering rate, HMCRmax⁡ and HMCRmin⁡; the maximum and minimum pitch adjusting rate, PARmax⁡ and PARmin⁡; the maximum and minimum band width, BWmax⁡ and BWmin⁡.Step 2.
Initialize the harmony memory (HM).Step 3.
Improvise a new harmony from the HM. Use (2), (3), (4), (5), and (6) to improvise a new harmony.Step 4.
Update the HM. Use (1) to evaluate fitness of the new harmony. If the new harmony is better than the worst harmony in the HM, the worst harmony is excluded from the HM and the new harmony is included in the HM.Step 5.
Inspect termination condition. The IHS will be terminated if the number of iterations meets the maximum number of iterationsTmax⁡. Else go to Step 3.


## 4.1. HMCR

HMCR
∈
[
0,1
] determines whether the value of a decision variable is to be chosen from HM. In order to ensure that the algorithm can quickly find local optima in the early operation and the solutions obtained in the later are diverse, this paper adopts the following linear decreasing strategy to update HMCR [12]:
(4)HMCRt=HMCRmax⁡-HMCRmax⁡-HMCRmin⁡*tTmax⁡,
where t denotes iteration number; Tmax⁡ is the maximum total number of iterations; HMCRmax⁡ and HMCRmin⁡ represent maximum and minimum harmony memory considering rate, respectively.


## 4.2. PAR

In HS algorithm, PAR plays a role in controlling local search. The appropriate PAR can avoid the search being trapped in local optimum effectively. Normally, the smaller PAR is beneficial to quickly find the local optimal solution in early search stage, while the larger PAR is propitious to jump out the local optimal in the later stage. Therefore, dynamic change strategy for PAR is incorporated into the algorithm in this paper; the mathematical expression for PAR is(5)PARt=PARmax⁡-PARmin⁡π/2*arctant+PARmin⁡,
where PARt denotes pitch adjusting rate for the tth generation; PARmax⁡ and PARmin⁡ represent maximum and minimum harmony memory considering rate, respectively.


## 4.3. BW

The appropriate BW can be potentially useful in adjusting convergence rate of algorithm to optimal solution. In this paper, BW changes from large to small. BW changes dynamically with generation number as expressed as follows:(6)BWt=BWmax⁡-BWmax⁡-BWmin⁡Tmax⁡*t,
where PARt denotes pitch band width for the tth generation; BWmax⁡ and BWmin⁡ represent maximum and minimum harmony memory considering rate, respectively.


## 4.4. The Optimization Steps after Algorithm Improved

The optimization steps are summarized in the following.Step 1.
Initialize the HS algorithm parameters. Initialize the maximum number of iterationsTmax⁡; the harmony memory size (HMS), the maximum and minimum harmony memory considering rate, HMCRmax⁡ and HMCRmin⁡; the maximum and minimum pitch adjusting rate, PARmax⁡ and PARmin⁡; the maximum and minimum band width, BWmax⁡ and BWmin⁡.Step 2.
Initialize the harmony memory (HM).Step 3.
Improvise a new harmony from the HM. Use (2), (3), (4), (5), and (6) to improvise a new harmony.Step 4.
Update the HM. Use (1) to evaluate fitness of the new harmony. If the new harmony is better than the worst harmony in the HM, the worst harmony is excluded from the HM and the new harmony is included in the HM.Step 5.
Inspect termination condition. The IHS will be terminated if the number of iterations meets the maximum number of iterationsTmax⁡. Else go to Step 3.


## 5. Example Analysis

In this paper, the proposed method for optimal distribution network planning is applied to a 10 kV distribution system in a northern Chinese city using MATLAB 2011b. The network consists of a power supply point (110 KV substation), 32 load points, and 12 existing lines. 18 new load points are added to the existing network. The existing network is shown in Figure1, in which the solid lines denote the existing lines and the dotted line denotes the expansible line. The coordinates and power of each load point are shown in Table 1.Table 1
The coordinates and state of load points.
Number
Abscissa (m)
Ordinate (m)
Load (KVA)
1
2463.4
801.7
substation
2
2462.5
808.4
500
3
2457.1
807.9
400
4
2460.6
773.3
200
5
2481.4
775.3
600
6
2477.5
728.8
800
7
2503.2
724.5
400
8
2503.7
772.8
200
9
2530.8
773.4
500
10
2528.5
730.3
800
11
2572.3
778
400
12
2573.6
799.9
600
13
2533.6
807.7
500
14
2508.3
809.4
400
15
2478.7
808.2
200
16
2535.4
837.5
500
17
2537.7
854.4
1000
18
2507
844.7
400
19
2478.5
849
500
20
2455.2
849.4
800
21
2481.4
871.9
600
22
2455.9
873.5
600
23
2434
873
200
24
2433.5
850
200
25
2404.2
851.1
1000
26
2433.9
807.8
500
27
2434.3
775.2
800
28
2456.5
776.3
400
29
2417.6
808.3
200
30
2403.5
808
200
31
2416.4
774.6
600
32
2403.5
773.7
1000
33
2421.3
729.7
200Figure 1
The existing network.Using the improved algorithm to optimize the distribution network planning mentioned above, the input parameters are set as follows:C1i=0.155, C2i=0.05 yuan/KWh, τmax⁡i=3000 h, HMS=30, HMCRmax⁡=0.95, HMCRmin⁡=0.6, PARmax⁡=0.99, PARmin⁡=0.01, BWmax⁡=1.0, BWmin⁡=0.0001, and Tmax⁡=1000. The optimal distribution network planning based on the HIS algorithm is shown in Figure 2.Figure 2
The optimal distribution network planning based on the HIS algorithm.For further analysis, the IHS algorithm proposed in this paper, HS from [13], PSO from [14], Artificial Fish Swarm Algorithm (AFSA) from [15], Improved Ant Colony algorithm (IAC) from [16], Cross-Entropy Method (CE) [17–19], and two typical evolutionary multiobjective optimization algorithms, Nondominated Sorting Genetic Algorithm version II (NSGA-II) [20–22] and Multiobjective Particle Swarm Optimization Algorithm (MOPSO) [23–25], are compared in optimizing the power network planning. In the case study, 50 independent runs were made for each of the optimization methods involving 50 different initial trial solutions for each optimization method. The parameters of each optimization method are shown in Table 2. The comparison results are shown in Table 3.Table 2
The parameters of each optimization method.
Algorithms
Parameters
HS
HMS = 30, HMCR = 0.95, PAR = 0.05, BW = 0.06
PSO
c
1
=
2, c2=2, wmax⁡=0.9, wmin⁡=0.4, population = 40
AFSA
Step = 0.3, visual = 1.8,δ = 0.618, Aq=0.9, c = 0.85, t0=50, population = 50
IAC
C = 0.5, a = 1.003, ρ = 0.7, population = 300
CE
Ρ = 0.01, tol = 0.15, p0=0.5, N = 50
NSGA-II
p
c
=
0.8, pm=0.33, ηc=2, ηm=20, QUOTETmax⁡ = 500, population = 200
MOPSO
w
0
=
0.35, w1=1.0, β = 0.1, γ = 0.6, N = 100, Tmax⁡ = 250, population = 100Table 3
The comparison results of distribution network planning for some optimization algorithm.
Algorithms
Best solution/108$
Average optimal solution/108$
Average execution time/s
HS
1.1005
1.2061
70.83
PSO
1.1090
1.2162
71.25
AFSA
1.0746
1.1860
80.61
IAC
1.0772
1.1560
65.34
CE
1.1108
1.2307
53.05
NSGA-II
1.0487
1.1452
108.32
MOPSO
1.0441
1.1367
104.19
IHS
1.0432
1.1358
54.58Comparing the results of Table3, it can be found that the best solution (minimum cost) obtained by IHS algorithm is better than that of any other method. In terms of best solution and average optimal solution, it is very evident that the IHS algorithm proposed in this paper is superior to HS, PSO, AFSA, IAC, CE, NSGA-II, and MOPSO. This suggests that IHS algorithm has very strong stability and robustness. When to solve the multiobjective distribution network planning problem, the two typical evolutionary multiobjective optimization algorithms: NSGA-II and MOPSO are significantly superior to the HS, PSO, AFSA, IAC, and CE in terms of stability and robustness. But long execution times for these algorithms suggest that they reach the solution at a very slow speed. Though IHS algorithm obtained slightly better minimum cost and average cost than MOPSO, the average execution time used by IHS algorithm is less than that of MOPSO obviously. From the point of execution time, the average execution time of IHS algorithm is the minimum except CE. Although the execution time of CE is less than that of IHS algorithm, the best solution and average optimal solution obtained by the IHS algorithm are significantly better than that of CE. The reasonable average execution time of IHS algorithm suggests that IHS algorithm is capable of reaching the solution at a very high speed. Therefore, it can be concluded that IHS not only has found the highest quality results among all the algorithms compared, but also possesses greater stability and better robustness to solve such kinds of distribution network planning problem. IHS algorithm is an effective method to solve the distribution network planning problem.


## 6. Conclusion

Distribution network planning is a multiobjective, discrete, nonlinear, and large-scale optimization problem. This paper proposes an improved harmony search (IHS) algorithm to solve the distribution network planning problem. The parameters of basic HS algorithm are specifically improved for distribution network planning problem. The improved method can improve the global search ability and prevent basic HS algorithm into a local optimum. And the improved algorithm has a fast calculation and a good convergence. The numerical example shows that HIS algorithm not only can obtain the highest quality results but also possesses greater stability and better robustness. It is obvious that IHS can acquire satisfactory solution for distribution network planning.



---

*Source: 753712-2015-02-02.xml*