Engineering Optimization Economic Load Dispatch Using Bat Algorithm
Engineering Optimization Economic Load Dispatch Using Bat Algorithm
OPTIMIZATION
REVIEW – 3
ECONOMIC LOAD
DISPATCH USING BAT
ALGORITHM
Team Members
18BEI0017 - Ajay Shyam
Step 2:
Generate new solutions.
Where β = [0,1] is a random vector drawn from a uniform distribution. Here, X* is the current
global best solution.
Step 3:
Local search: If a random number is bigger enough than the rate of pulse emission r, then the
local search is invoked.
Suppose and are the frequencies of the source and the receiver, respectively; and are the speeds of the
receiver and the source, respectively. is the wavelength, and v is the wave speed in the medium. Assume
moving source and moving receiver, the can be formulated as above.
Rules for NBA
Bats fly randomly with velocity vi at position xi with a fixed frequency fmin, varying wavelength
λ and loudness A0 to search for prey. They can automatically adjust the wavelength of their
emitted pulses and adjust the rate of pulse emission r λ [0,1], depending on the proximity of
their target.
Although the loudness can vary in many ways, we assume that the loudness varies from a large
(positive) A0 to a minimum constant value Amin.
All bats can move around in different habitats.
All bats can compensate for Doppler Effect in echoes.
They can adapt and adjust their compensation rate depending upon the proximity of their
targets.
Equations used in NBA
Pseudo code for NBA
Input:
N: the number of individuals (bats) contained by the population
M: maximum number of iteration
P: probability of habitat selection
W: inertia weight
C: compensation rates for Doppler effects in echoes
Θ: contraction-expansion coefficient
G: frequency of updating the loudness and pulse emission rate α, γ, f min, f max, Ao, ro: parameters in basic BA
t-0: initialize the population and the related parameters.
While (t<M)
◦ if (rand(0,1)<P)
◦ Generate new solutions using Eq. (17)
Else
Generate new solutions using Eq. (18) – (21)
End if
if (rand(0,1)<ri)
Generate a local solution around the selected best solution using Eqs. (22,23)
End if
Evaluate the objective function value of each individual.
Update solutions, the loudness and pulse emission rate using Eqs. (7-10)
Rank the solutions and fine current best gt.
If gt does not improve in G time step.
Re-initialize the loudness Ai and set temporary pulserates ri which is a uniform random number between [0.85,
0.9].
End if
T=t+1
End while
MATLAB CODE
Code for Novel Bat Algorithm:
function [ bestX, fMin ] = NBA( FitFunc, M, pop, dim, G, gamma, alpha, ...
help NBA.m
if nargin < 1
for iteration = 1 : M
% The compensation rates for Doppler effect in echoes
C = rand( pop, 1 ) .* ( CMax - CMin ) + CMin;
% The probability of habitat selection
prob = rand( pop, 1 ) .* ( probMax - probMin ) + probMin;
% Contraction¨Cexpansion coefficient
theta=( thetaMax - thetaMin ) * ( M - iteration )/(1.0 * M) + thetaMin;
freqD = rand( pop, dim ) .* ( freqDMax - freqDMin ) + freqDMin;
w = (wMax - wMin) * ( M - iteration )/(1.0 * M) + wMin; %Inertia weight
meanP = mean( pX );
meanA = mean( A );
for i = 1 : pop
if rand < prob
if rand < 0.5
x( i, : ) = bestX + theta * abs( meanP - pX(i, :) ) *...
log( 1.0/rand );
else
x( i, : ) = bestX - theta * abs( meanP - pX(i, :) ) *...
log( 1.0/rand );
end
else
freqD( i, :) = freqD(i, :) .* ( 340 + v( i, : ) )./( 340 + ...
v( bestIndex, : ) + realmin );
v( i, : ) = w .* v( i, : ) + ( bestX - pX(i, :) ) .* ...
freqD(i,:) .* ( 1 + C(i) .* ( bestX - pX(i, :) ) ./...
( abs( bestX - pX(i, :) ) + realmin ) );
v( i, : ) = Bounds( v( i, : ), vLb, vUb );
x( i, : ) = x( i, : ) + v( i, : );
end
if rand > r( i )
randnValueA = randn( 1,dim ).* ( abs( A(i) - meanA )+ realmin);
x( i, : ) = bestX .* ( 1 + randnValueA );
end
x( i, : ) = Bounds( x( i, : ), lb, ub );
fit( i ) = FitFunc( x( i, : ) );
End
for i = 1 : pop
if fit( i ) < pFit( i )
pFit( i ) = fit( i );
pX( i, : ) = x( i, : );
end
if( pFit( i ) < fMin && rand < A(i) )
fMin = pFit( i );
bestX = pX( i, : );
bestIndex = i;
bestIter = iteration;
A(i) = A(i) * alpha;
r(i) = r0(i) * ( 1 - exp( -gamma * iteration ) );
end
end
if( iteration - bestIter > G )
r = rand( pop, 1 ) .* 0.05 + 0.85;
A = rand( pop, 1 ) .* ( AMax - AMin ) + AMin;
end
end
function y = Sphere( x )
y = sum( x .^ 2 );
function s = Bounds( s, Lb, Ub)
temp = s;
I = temp < Lb;
temp(I) = Lb(I);
J = temp > Ub;
temp(J) = Ub(J);
s = temp;
Code for ELD
function[ F P1 Pl]=eldnba(x)
global data B Pd
x=abs(x);
n=length(data(:,1));
for i=1:n-1
if x(i)>1;
x(i)=1;
else
end
P(i)=data(i+1,4)+x(i)*(data(i+1,5)-data(i+1,4));
end
B11=B(1,1);
B1n=B(1,2:n);
Bnn=B(2:n,2:n);
A=B11;
BB1=2*B1n*P';
B1=BB1-1;
C1=P*Bnn*P';
C=Pd-sum(P)+C1;
x1=roots([A B1 C]);
% x=.5*(-B1-sqrt(B1^2-4*A*C))/A
x=abs(min(x1));
if x>data(1,5)
x=data(1,5);
else
end
if x<data(1,4)
x=data(1,4);
else
end
P1=[x P];
for i=1:n
F1(i)=data(i,1)* P1(i)^2+data(i,2)*P1(i)+data(i,3);
end
Pl=P1*B*P1';
lam=abs(sum(P1)-Pd-P1*B*P1');
F=sum(F1)+1000*lam;
Test
clear;
clc;
tic;
global data B Pd
data=[0.007 7 240 100 500
0.0095 10 200 50 200
0.009 8.5 220 80 300
0.009 11 200 50 150
0.008 10.5 220 50 200
0.0075 12 120 50 120];
B=1e-4*[0.14 0.17 0.15 0.19 0.26 0.22
0.17 0.6 0.13 0.16 0.15 0.2
0.15 0.13 0.65 0.17 0.24 0.19
0.19 0.16 0.17 0.71 0.3 0.25
0.26 0.15 0.24 0.3 0.69 0.32
0.22 0.2 0.19 0.25 0.32 0.85
];
Pd=700;
M = 1000;
pop = 30;
dim = length(data(:,1));
gamma = 0.9;
alpha = 0.99;
r0Max = 1;
r0Min = 0;
AMax = 2;
AMin = 1;
freqDMax = 1.5;
freqDMin = 0;
G = 10;
probMax = 0.9;
probMin = 0.6;
thetaMax = 1;
thetaMin = 0.5;
wMax = 0.9;
wMin = 0.5;
CMax = 0.9;
CMin = 0.1;
[ x, fMin ] = NBA( @eldnba, M, pop, dim, G, gamma, alpha, ...
r0Max, r0Min, AMax, AMin, freqDMax, freqDMin, probMax, probMin, ...
CMax, CMin, thetaMax, thetaMin, wMax, wMin )
[ F P1 Pl]=eldnba(x)
tic;
Outputs
Contribution
Research : Ajay Shyam
MATLAB Coding : Adil Ahamed
Comparison of techniques and compilation : Karthik Malhotra
Conclusion
Here we have discussed Novel Bat Algorithm for an economic dispatch problem.
The idea of Doppler Effect and foraging of bats between different habitats are
the additions to this algorithm. It can be concluded that NBA is a robust
algorithm for the experiments performed. This method can be extended to
determine its robustness for higher dimensional problems. Using bat algorithm
we can generate more power at less cost compared to dispatch algorithm.
Improvements
The economical power generation and transfer is a widely researched area and
has a large number of possible solutions.
We will focus on a the methods which provide the best outcomes and most
appropriately deal with the issues faced.
For this we put Novel Bat Algorithm into action. Being one of the best possible
solutions present in the market it provides very satisfying results which suffice
the main purpose.
It provides us with the following feature making it the go to for solving problems
of such level of complexity.
References
• Lili A. Wulandharia, Siti Komsiyah, Wisnu Wicaksono, “Bat Algorithm Implementation on Economic Dispatch
Optimization Problem”, 2018.
• Sylvere Mugemanyl , Zhaoyang Qu, “Optimal Reactive Power Dispatch Using Chaotic Bat Algorithm”, 2020.
• Sanchari Deb , Diaa Salama Abdelminaam, “Recent Methodology-Based Gradient-Based Optimizer for Economic Load
Dispatch Problem”, 2021.
• Francois Xavier Rugema, Gangui Yan, “Cauchy-Gaussian Quantum-Behaved Bat Algorithm Applied to Solve the
Economic Load Dispatch Problem”, 2021.
• S. Gautham, J. Rajamohan, “Economic Load Dispatch using Novel Bat Algorithm” , 2016.