# Economic Dispatch Using Parameter-Setting-Free Harmony Search

Authors: Zong Woo Geem
Journal: Journal of Applied Mathematics
 (2013)

---

## Abstract

Economic dispatch is one of the popular energy system optimization problems. Recently, it has been solved by various phenomenon-mimicking metaheuristic algorithms such as genetic algorithm, tabu search, evolutionary programming, particle swarm optimization, harmony search, honey bee mating optimization, and firefly algorithm. However, those phenomenon-mimicking problems require a tedious and troublesome process of algorithm parameter value setting. Without a proper parameter setting, good results cannot be guaranteed. Thus, this study adopts a newly developed parameter-setting-free technique combined with the harmony search algorithm and applies it to the economic dispatch problem for the first time, obtaining good results. Hopefully more researchers in energy system fields will adopt this user-friendly technique in their own problems in the future.


---

## Body

## 1. Introduction

Economic dispatch (ED) is defined in the US Energy Policy Act of 2005 as the operation of electrical generation facilities to produce energy at the least cost to reliably serve consumers while satisfying any operational limits of generation and transmission facilities. ED became a popular optimization problem in energy system field, which has been tackled by various optimization techniques such as genetic algorithm (GA) [1], tabu search (TS) [2], evolutionary programming (EP) [3], particle swarm optimization (PSO) [4], harmony search (HS) [5], honey bee mating optimization (HBMO) [6], and firefly algorithm (FA) [7].As observed in the literature, better results have been obtained by phenomenon-mimicking metaheuristic algorithms rather than gradient-based mathematical techniques. Indeed, the metaheuristic algorithm has advantages over the mathematical technique in terms of several factors:(1) the former does not require complex derivative functions; (2) the former does not require a feasible starting solution vector which is sensitive to the final solution quality; and (3) the former has more chance to find the global optimum.However, the metaheuristic algorithm also has the weakness in the sense that it requires “proper and appropriate” value setting for algorithm parameters [8]. For example, in GA, only carefully chosen values for crossover and mutation rates can guarantee good final solution quality, which is not an easy task for algorithm users in practical fields who seldom know how the algorithm exactly works.In order to overcome this troublesome parameter setting process, researchers have proposed adaptive GA techniques [9], which adjust crossover and mutation rates adaptively, instead of using fixed rates, to find good solutions without manually setting the algorithm parameters. This adaptive technique has been applied to various technical applications such as environmental treatment [10], structural design [11], and sewer network design [12].In energy system field, the adaptive GA was also applied to a reactive power dispatch optimization as early as 1998 [13]. Afterwards, however, there have been seldom applications in major research databases using the adaptive technique. Thus, this study intends to apply a newly developed adaptive parameter-setting-free (PSF) technique [8], which is combined with the HS algorithm, to the economic dispatch problem for the first time.


## 2. Economic Dispatch Problem

The economic dispatch problem can be optimally formulated. The objective function can be as follows:(1)Minz=∑iCi(Pi),
where Ci(·) is generation cost for generator i and Pi is electrical power generated by generator i. Here, Ci(·) can be further expressed as follows:
(2)Ci(Pi)=ai+biPi+ciPi2+|ei×sin(fi×(Pimin-Pi))|,
where ai, bi, ci, ei, and fi are cost coefficients for generator i. The fourth term in the right-hand side of (2) represents valve-point effects.The above objective function is to be minimized while satisfying the following equality constraint:(3)∑iPi=D,
where D is total load demand. Also, each generator should generate power between minimum and maximum limits as the following inequality constraint:
(4)Pimin≤Pi≤Pimax.


## 3. Parameter-Setting-Free Technique

The parameter-setting-free harmony search (PSF-HS) algorithm was first proposed for optimizing the discrete-variable problems such as structural design [14], water network design [15], and recreational magic square [8]. PSF-HS was also applied to a continuous-variable problem such as hydrologic parameter calibration [16].However, it was never applied to a continuous-variable problem with technical constraints. Thus, this study first applies PSF-HS to the ED problem, whose type is the continuous-variable problem with a technical constraint, because its decision variablePi has the continuous value and it has the equality constraint of total power demand as expressed in (3). Here, the inequality constraint in (4) can be simply considered as value ranges without using any penalty method.The basic HS algorithm manages a memory matrix, named harmony memory, as follows:(5)HM=[P11P21⋯Pn1P12P22⋯Pn2⋮⋯⋯⋯P1HMSP2HMS⋯PnHMS|z(P1)z(P2)⋮z(PHMS)].
Once this HM is fully filled with randomly generated vectors (P1,…,PHMS), a new vector PNew is generated as follows:
(6)PiNew⟵{Pimin≤Pi≤Pimaxw.p.RRandomPi(k)∈{Pi1,Pi2,…,PiHMS}w.p.RMemoryPi(k)+Δw.p.RPitch,
where RRandom is random selection rate, RMemory is pure memory consideration rate, RPitch is pure pitch adjustment rate, and Δ is pitch adjustment amount.If the newly generated vectorPNew is better than the worst vector PWorst in HM, those two vectors are swapped as follows:
(7)PNew∈HM∧PWorst∉HM.
The basic HS algorithm performs (6) and (7) until a termination criterion is satisfied.For PSF-HS, one additional matrix, named operation type matrix (OTM), is also managed as follows:(8)[o11=Randomo21=Pitch⋯on1=Memoryo12=Memoryo22=Memory⋯on2=Pitch⋮⋯⋯⋯o1HMS=Memoryo2HMS=Random⋯onHMS=Memory].
OTM memorizes which operation (random selection, memory consideration, and pitch adjustment) each value comes from. For example, if the value of P22 in HM comes from memory consideration operation, the value of o22 in OTM is also set as “Memory.” This process happens when initial vectors are populated or when a new vector is inserted into HM.Thus, instead of using fixed algorithm parameter values, PSF-HS can utilize adaptive parameter values by calculating them at each iteration as follows:(9)Ri,Random=ct(oij=Random,j=1,2,…,HMS)HMS,i=1,2,…,n,Ri,Memory=ct(oij=Memory,j=1,2,…,HMS)HMS,i=1,2,…,n,Ri,Pitch=ct(oij=Pitch,j=1,2,…,HMS)HMS,i=1,2,…,n,
where ct(·) is a function which counts specific elements that satisfy the condition.


## 4. Numerical Example

The PSF-HS is applied to a popular bench-mark ED problem with three generators. The input data for the three-generator problem is shown in Table1.Table 1
Data for three-generator example with valve-point loading.
Generator
P
i
min
P
i
max
a
i
b
i
c
i
e
i
f
i
1
100
600
0.001562
7.92
561
300
0.0315
2
50
200
0.00482
7.97
78
150
0.063
3
100
400
0.00194
7.85
310
200
0.042When the total system demand is set to 850 MW, the optimal solution is known as $8234.07 [2–4], which was replicated by using a popular gradient-based technique (generalized reduced gradient (GRG) method), which has been also successfully applied to other energy optimization problems such as building chiller loading [17], combined heat and power ED [18], and hybrid renewable energy system design [19]. However, the GRG method was able to obtain the identical best solution only when it started with a vector (P1=300; P2=150; P3=400). Instead, when, different starting vector (P1=600, P2=200, P3=400) was used, solution quality was worsened as $8241.41.When PSF-HS was also applied to the problem, it obtained a near-optimal solution of $8234.47 after 100 runs, which has small discrepancy from the optimal solution ($8234.07) by 0.005%. For the results from 100 runs, maximum and mean solutions are $8429.74 (2.4% discrepancy) and $8292.88 (0.7% discrepancy), respectively. Here, PSF-HS was performed using MS-Excel VBA environment with Intel CPU 3.3 GHz. Each run takes only one second in this computing environment.Figure1 shows the convergence history of power generation cost for the case of the near-optimal solution $8234.47. As seen in the figure, PSF-HS closely approached to the near-optimal solution in early iterations.Figure 1
Convergence History of Generation Cost.Table2 shows the final HM with HMS = 30. As observed in the table, there are many similar vectors in HM because PSF-HS tried local search, instead of global search, in late stage of computation.Table 2
Values of final HM.
Number
P
1
P
2
P
3
∑
i
P
i
∑
i
C
i
(
P
i
)
1
300.944
149.782
399.274
850.000
8234.472
2
300.944
149.782
399.274
850.001
8234.477
3
300.944
149.782
399.274
850.001
8234.479
4
300.973
149.754
399.274
850.002
8234.481
5
301.006
149.751
399.244
850.001
8234.482
6
300.974
149.782
399.244
850.000
8234.483
7
300.974
149.754
399.274
850.002
8234.487
8
300.977
149.779
399.244
850.001
8234.489
9
300.977
149.751
399.274
850.003
8234.496
10
300.945
149.782
399.274
850.002
8234.497
11
300.912
149.815
399.274
850.001
8234.501
12
300.934
149.822
399.244
850.000
8234.509
13
300.973
149.784
399.244
850.002
8234.510
14
300.944
149.784
399.274
850.002
8234.511
15
300.912
149.815
399.274
850.002
8234.511
16
300.934
149.794
399.274
850.002
8234.511
17
300.905
149.822
399.274
850.001
8234.514
18
300.974
149.784
399.244
850.002
8234.516
19
300.944
149.784
399.274
850.003
8234.517
20
301.013
149.786
399.202
850.001
8234.520
21
301.013
149.786
399.202
850.002
8234.535
22
300.945
149.784
399.274
850.004
8234.535
23
301.009
149.751
399.244
850.004
8234.536
24
301.006
149.754
399.244
850.004
8234.538
25
300.973
149.786
399.244
850.003
8234.542
26
300.977
149.782
399.244
850.003
8234.542
27
300.944
149.786
399.274
850.004
8234.542
28
301.006
149.794
399.202
850.002
8234.543
29
300.977
149.782
399.244
850.004
8234.547
30
300.974
149.786
399.244
850.004
8234.548Figure2 shows the history of random selection rate RRandom. As observed in the figure, all three parameters (R1,Random, R2,Random, and R3,Random) started with higher values (0.5). In less than 1,000 iterations, R1,Random went up to around 0.4, R2,Random to around 0.5, and R3,Random to around 0.8. Then, they abruptly wend down to less than 0.1 after 3,000 iterations.Figure 2
History of Random Selection Rate.Figure3 shows the history of pure memory consideration rate RMemory. As observed in the figure, all three parameters (R1,Memory, R2,Memory, and R3,Memory) abruptly went up from the starting point of 0.25. After 4,000 iterations, they became more than 0.8 and stayed.Figure 3
History of Pure Memory Consideration Rate.Figure4 shows the history of pure pitch adjustment rate RPitch. As observed in the figure, all three parameters (R1,Pitch, R2,Pitch, and R3,Pitch), from the starting point of 0.25, monotonically stayed less than 0.3 except for one situation when R3,Pitch spiked near 3,000 iterations.Figure 4
History of Pure Pitch Adjustment Rate.Furthermore, the sensitivity analysis of initial parameter values was performed. While the original parameter set (RRandom=0.5, RMemory=0.25, and RPitch=0.25) resulted in minimal solution of $8,243.56 and average solution of $8,287.69 after 10 runs, equal-valued parameter set (RRandom=0.33, RMemory=0.33, and RPitch=0.33) resulted in minimal solution of $8,242.12 and average solution of $8,322.11; memory-consideration-oriented parameter set (RRandom=0.1, RMemory=0.7, and RPitch=0.2) resulted in minimal solution of $8,241.34 and average solution of $8,314.45; random-selection-oriented parameter set (RRandom=0.8, RMemory=0.1, and RPitch=0.1) resulted in minimal solution of $8,241.29 and average solution of $8,272.40. It appeared that the initial parameter values are not very sensitive to final solution quality.Especially, when the results from memory-consideration-oriented parameter set (RRandom=0.1, RMemory=0.7, and RPitch=0.2) and those from random-selection-oriented parameter set (RRandom=0.8, RMemory=0.1, and RPitch=0.1) were statistically compared, although their variances are different based on F-test (p=0.04), their averages are not significantly different based on t-test (p=0.16).


## 5. Conclusions

This study applied PSF-HS to the ED problem for the first time, obtaining a good solution which is very close to the best solution ever found. While existing metaheuristic algorithms require carefully chosen algorithm parameters, PSF-HS did not require that tedious process. Thus, there surely exists a tradeoff between original HS and PSF-HS. Also, it should be noted that PSF-HS respectively considers individual algorithm parameters for each variable, which is more efficient way than using lumped parameters for all variables.For future study, the structure of PSF-HS should be improved to do better performance. Also, it can be applied to large-scale real-world problems to test scalability. Also, other researchers are expected to apply this novel technique to their own energy-related problems.



---

*Source: 427936-2013-05-09.xml*