1 简介
The grey wolf optimizer (GWO) is a new meta-heuristic algorithm inspired from the leadership and prey searching, encircling, and hunting of the grey wolves’ community. The GWO algorithm has the advantages of simplicity (less control parameters), flexibility, and globalism. In this paper, a simple and efficient augmentation for the GWO (AGWO) algorithm is proposed for better hunting performance. The AGWO algorithm focuses on increasing the possibility of the exploration process over the exploitation process by modifying the behavior of the control parameter (a) and position updating. The AGWO is suitable to the low number of search agents such as the electric power system application. The proposed AGWO algorithm is verified using twenty-three benchmark test functions and is applied to the grid-connected permanent magnet synchronous generator driven by variable speed wind turbine (PMSG-VSWT). The obtained results of the AGWO algorithm are compared with the results of the original GWO and other algorithms. The comparisons verified that the proposed AGWO is significantly augmented the performance of the original GWO algorithm without affecting its simplicity and easy implementation.
2 部分代码
% Grey Wolf Optimizer
function [Alpha_score,Alpha_pos,Convergence_curve]=GWO(SearchAgents_no,Max_iter,lb,ub,dim,fobj)
% initialize alpha, beta, and delta_pos
Alpha_pos=zeros(1,dim);
Alpha_score=inf; %change this to -inf for maximization problems
Beta_pos=zeros(1,dim);
Beta_score=inf; %change this to -inf for maximization problems
Delta_pos=zeros(1,dim);
Delta_score=inf; %change this to -inf for maximization problems
%Initialize the positions of search agents
Positions=initialization(SearchAgents_no,dim,ub,lb);
Convergence_curve=zeros(1,Max_iter);
l=0;% Loop counter
% Main loop
while l<Max_iter
for i=1:size(Positions,1)
% Return back the search agents that go beyond the boundaries of the search space
% Flag4ub=Positions(i,:)>ub;
% Flag4lb=Positions(i,:)<lb;
% Positions(i,:)=(Positions(i,:).*(~(Flag4ub+Flag4lb)))+ub.*Flag4ub+lb.*Flag4lb;
% Calculate objective function for each search agent
fitness=fobj(Positions(i,:));
% Update Alpha, Beta, and Delta
if fitness<Alpha_score
Alpha_score=fitness; % Update alpha
Alpha_pos=Positions(i,:);
end
if fitness>Alpha_score && fitness<Beta_score
Beta_score=fitness; % Update beta
Beta_pos=Positions(i,:);
end
if fitness>Alpha_score && fitness>Beta_score && fitness<Delta_score
Delta_score=fitness; % Update delta
Delta_pos=Positions(i,:);
end
end
a=2-l*((2)/Max_iter); % a decreases linearly fron 2 to 0
% Update the Position of search agents including omegas
for i=1:size(Positions,1)
for j=1:size(Positions,2)
r1=rand(); % r1 is a random number in [0,1]
r2=rand(); % r2 is a random number in [0,1]
A1=2*a*r1-a; % Equation (3.3)
C1=2*r2; % Equation (3.4)
D_alpha=abs(C1*Alpha_pos(j)-Positions(i,j)); % Equation (3.5)-part 1
X1=Alpha_pos(j)-A1*D_alpha; % Equation (3.6)-part 1
r1=rand();
r2=rand();
A2=2*a*r1-a; % Equation (3.3)
C2=2*r2; % Equation (3.4)
D_beta=abs(C2*Beta_pos(j)-Positions(i,j)); % Equation (3.5)-part 2
X2=Beta_pos(j)-A2*D_beta; % Equation (3.6)-part 2
r1=rand();
r2=rand();
A3=2*a*r1-a; % Equation (3.3)
C3=2*r2; % Equation (3.4)
D_delta=abs(C3*Delta_pos(j)-Positions(i,j)); % Equation (3.5)-part 3
X3=Delta_pos(j)-A3*D_delta; % Equation (3.5)-part 3
Positions(i,j)=(X1+X2+X3)/3;% Equation (3.7)
%
if Positions(i,j)>ub
Positions(i,j)=ub;
elseif Positions(i,j)<lb
Positions(i,j)=lb;
end
end
end
l=l+1;
Convergence_curve(l)=Alpha_score;
end
3 仿真结果
4 参考文献
[1] Qais M H , Hasanien H M , Alghuwainem S . Augmented Grey Wolf Optimizer for Grid-connected PMSG-based Wind Energy Conversion Systems[J]. Applied Soft Computing, 2018:S1568494618302679.
www.sciencedirect.com/science/art…
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,有科研问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。