UPFC size and location using abc algorithm
TASK :1 how to add UPFC size and location in this objective function function
TASK 2 :Optimize UPFC size and location using abc algorithm
Plosses = ObjectiveFunction1(V,line,Theta,nbranch,FromNode,ToNode)
for k=1:nbranch
g(k)=line(k,6);
if g(k)==0 % in this case, we are analyzing lines
Zpq(k)=line(k,3)+1i*line(k,4); % impedance of the transmission line
Ypq(k)=Zpq(k)^-1; ?mittance of the transmission linee
Gpq(k)=real(Ypq(k)); % conductance of the transmission line
?tive power loss of the corresponding line
Llpq(k)=Gpq(k)*(V(FromNode(k))^2 +V(ToNode(k))^2 -
2*V(FromNode(k))*V(ToNode(k))*cos(Theta(FromNode(k))-Theta(ToNode(k))));
end
end
% Total active power lossess
Plosses=sum(Llpq);
end