资源简介
this program is optimal capasitor plasement with PSO algorithm.
代码片段和文件信息
function F=costFinal(XXXDetails)
% load new
for ii = 1:size(XXX1)
B = XXX(ii:);
SZ=1000*[150:150:4050]‘;
V0=23000; % kV
H=7; % number of harmonics
Kp=168; % $/kW
Kc=[0.5 0.35 0.253 0.22 0.276 0.183 0.228 0.17 0.207 0.201 0.193 0.187 0.211 0.176 0.197 0.17 0.189 0.187 0.183 0.18 0.195 0.174 0.188 0.17 0.183 0.182 0.179]‘; % $/kvar
Vmin=0.9*V0;
Vmax=1.1*V0;
THDmax=5;
Qcmax=1000*4186;
VH(5)=0.04*V0;
VH(7)=0.03*V0;
VH(1)=V0;
Sat=0;
s=length(SZ);
V1=V0*([0.992860255487208 - 0.009043100235167i 0.987136589107851 - 0.021846487802908i 0.962611640264684 - 0.039176523812165i 0.947001262060468 - 0.04386301082126i 0.915237415966309 - 0.059525940928483i 0.904808225189338 - 0.065440091116783i 0.886074026679487 - 0.071578710547479i 0.854881817304345 - 0.080864111201839i 0.832934120818783 - 0.087400034920625i]‘);
P=1000*[1840 980 1790 1598 1610 780 1150 980 1640]‘; % kW
Q=1000*[460 340 446 1840 600 110 60 130 200]‘; % kvar
R=[0.1233 0.014 0.7463 0.6984 1.9831 0.9053 2.0552 4.7953 5.3434]‘;
X=[0.4127 0.6051 1.205 0.6084 1.7276 0.7886 1.164 2.716 3.0264]‘;
%w=0.15*zeros(91);
m=length(P);
for k=1:m
B1(k:)=B(((k-1)*s+1):(k*s));
end
for h=1:H
for k=1:m
Qc(k)=B1(k:)*SZ;
Kc1=(B1*Kc)‘;
%I1(k)=(P(k)-j*Q(k))/conj(V1(k));
%I(kh)=w(k)*I1(k)/h;
yc(k)=j*Qc(k)/((abs(V1(k)))^2);
yl(kh)=(P(k)/((abs(V1(k))).^2))-j*(Q(k)/(h*((abs(V1(k))).^2)));
yc(kh)=h*yc(k);
yt(kh)=1/(R(k)+(j*X(k)*h));
end
end
for h=[1 5 7]
for i=1:m;
for a=1:m;
if ((i==a)&(i~=m)) Y(iah)=yt(a+1h)+yl(ah)+yt(ah)+yc(ah);
elseif (abs(a-i)==1) Y(iah)=-yt(max(ia)h);
elseif ((i==a)&(i==m)) Y(iah)=yt(ah)+yc(ah)+yl(ah);
else Y(iah)=0;
end
end
end
% V(:h)=inv(Y(::h))*I(:h);
V(:h)=inv(Y(::h))*([yt(1h)*VH(h);zeros(81)]);
end
for k=1:m
for h=[1 5 7]
if(k>1) Ploss(kh)=R(k)*(((abs(V(kh)-V(k-1h)))*(abs(yt(kh))))^2);
end
Ploss(1h)=R(1)*(((abs(V(1h)-VH(h)))*(abs(yt(1h))))^2);
C(k)=Kc1(k)*Qc(k);
end
end
if (B==zeros(1243)) V(:1)=V1;
for k=1:m
if(k>1) Ploss(k1)=R(k)*(((abs(V(k1)-V(k-11)))*(abs(yt(k1))))^2);
end
Ploss(11)=R(1)*(((abs(V(11)-V0))*(abs(yt(11))))^2);
end
end
Plosst=sum(sum(Ploss));
for k=1:m
Vrms(k)=sqrt(sum((abs(V(k:))).^2));
Vh(k)=sqrt(sum((abs(V(k2:H))).^2));
THD(k)=100*Vh(k)/abs(V1(k));
if((Qc(k)>Qcmax)) Sat=99999999999;
elseif (Sat<3) Sat=0;
end
end
if Details == 0;
F(ii1) = 0.001*Kp*Plosst+.001*sum(C)+Sat;
elseif Details == 1
F.Plost = Plosst;
F.C = C;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3111 2008-10-28 19:18 OPTIMAL CAPACITOR PLACEMENT\costFinal.m
文件 3390 2008-10-28 18:47 OPTIMAL CAPACITOR PLACEMENT\PSO.m
目录 0 2013-07-28 22:04 OPTIMAL CAPACITOR PLACEMENT
----------- --------- ---------- ----- ----
6501 3
- 上一篇:卷积神经网络的字符识别技术算法
- 下一篇:有源滤波器在双馈式风力发电机中使用
评论
共有 条评论