修复了最后算原始电压时的bug,例如SEIf0=I0r+1j*I0r;写成了SEIf0=I0r+1j*I0i;

Signed-off-by: dugg@lab-desk <dugg@lab-desk>
This commit is contained in:
dugg@lab-desk 2014-10-30 11:45:43 +08:00
parent ebc7882194
commit 971d2e3455
3 changed files with 20 additions and 14 deletions

View File

@ -8,10 +8,10 @@ pIi=find(Ii>0);
nIi=find(Ii<0); nIi=find(Ii<0);
% lower=-0.2*sparse(ones(length(Loadi)*2,1)); % lower=-0.2*sparse(ones(length(Loadi)*2,1));
upper=ones(length(Loadi)*2,1); upper=ones(length(Loadi)*2,1);
upper(pIr)=1.2*Ir(pIr); upper(pIr)=1.1*Ir(pIr);
upper(nIr)=0.8*Ir(nIr); upper(nIr)=0.9*Ir(nIr);
upper(pIi+length(Ir))=1.2*Ii(pIi); upper(pIi+length(Ir))=1.1*Ii(pIi);
upper(nIi+length(Ir))=0.8*Ii(nIi); upper(nIi+length(Ir))=0.9*Ii(nIi);
% upper([4,5,6])=[1;1;1]; % upper([4,5,6])=[1;1;1];
% upper([4,5,6])=0.2*Ii(nIi); % upper([4,5,6])=0.2*Ii(nIi);

View File

@ -7,10 +7,10 @@ pIi=find(Ii>0);
nIi=find(Ii<0); nIi=find(Ii<0);
% lower=-0.2*sparse(ones(length(Loadi)*2,1)); % lower=-0.2*sparse(ones(length(Loadi)*2,1));
lower=ones(length(Loadi)*2,1); lower=ones(length(Loadi)*2,1);
lower(pIr)=0.8*Ir(pIr); lower(pIr)=0.9*Ir(pIr);
lower(nIr)=1.2*Ir(nIr); lower(nIr)=1.1*Ir(nIr);
lower(pIi+length(Ir))=0.8*Ii(pIi); lower(pIi+length(Ir))=0.9*Ii(pIi);
lower(nIi+length(Ir))=1.2*Ii(nIi); lower(nIi+length(Ir))=1.1*Ii(nIi);
% lower=-ones(length(Ir)*2,1); % lower=-ones(length(Ir)*2,1);
% lower([4,5,6])=[-1;-1;-1]; % lower([4,5,6])=[-1;-1;-1];

16
run.m
View File

@ -148,7 +148,7 @@ ub=checkSSatisfied(Balance,phaseABCY,VoltpABC, ...
phaseASpotLoadQ,phaseBSpotLoadQ,phaseCSpotLoadQ ); phaseASpotLoadQ,phaseBSpotLoadQ,phaseCSpotLoadQ );
fprintf('%f\n\n',full(max(abs(ub)))) fprintf('%f\n\n',full(max(abs(ub))))
%% %%
clear PD QD PG QG; % clear PD QD PG QG;
% %
iterPhaseASpotLoadP=phaseASpotLoadP; iterPhaseASpotLoadP=phaseASpotLoadP;
iterPhaseBSpotLoadP=phaseBSpotLoadP; iterPhaseBSpotLoadP=phaseBSpotLoadP;
@ -157,6 +157,9 @@ iterPhaseASpotLoadQ=phaseASpotLoadQ;
iterPhaseBSpotLoadQ=phaseBSpotLoadQ; iterPhaseBSpotLoadQ=phaseBSpotLoadQ;
iterPhaseCSpotLoadQ=phaseCSpotLoadQ; iterPhaseCSpotLoadQ=phaseCSpotLoadQ;
% %
VoltpA=sparse(ones(busNum,1));
VoltpB=sparse(ones(busNum,1)).*exp(1j*-120/180*pi);
VoltpC=sparse(ones(busNum,1)).*exp(1j*+120/180*pi);
CurpA=conj((iterPhaseASpotLoadP+1j*iterPhaseASpotLoadQ)./VoltpA); CurpA=conj((iterPhaseASpotLoadP+1j*iterPhaseASpotLoadQ)./VoltpA);
CurpB=conj((iterPhaseBSpotLoadP+1j*iterPhaseBSpotLoadQ)./VoltpB); CurpB=conj((iterPhaseBSpotLoadP+1j*iterPhaseBSpotLoadQ)./VoltpB);
CurpC=conj((iterPhaseCSpotLoadP+1j*iterPhaseCSpotLoadQ)./VoltpC); CurpC=conj((iterPhaseCSpotLoadP+1j*iterPhaseCSpotLoadQ)./VoltpC);
@ -249,9 +252,12 @@ SEVf2=V2r+1j*V2i;
SEVoltpABC=Tf2p*conj([ SEVf0'; SEVf1'; SEVf2']); SEVoltpABC=Tf2p*conj([ SEVf0'; SEVf1'; SEVf2']);
% SEVoltpABC2=Tf2p*conj([ rV0'; rV1'; rV2']); % SEVoltpABC2=Tf2p*conj([ rV0'; rV1'; rV2']);
% %
SEIf0=I0r+1j*I0r; SEIf0=I0r+1j*I0i;
SEIf1=I1r+1j*I1r; SEIf1=I1r+1j*I1i;
SEIf2=I2r+1j*I2r; SEIf2=I2r+1j*I2i;
SEIpABC=Tf2p*conj([SEIf0';SEIf1';SEIf2']); SEIpABC=full(Tf2p*conj([SEIf0';SEIf1(1:3)';SEIf2']));
% %
(full(abs(VoltpABC))-abs(SEVoltpABC))./abs(SEVoltpABC)*100 (full(abs(VoltpABC))-abs(SEVoltpABC))./abs(SEVoltpABC)*100
% ÈýÏฺºÉ
SEVoltpABC(:,setxor(1:size(SEVoltpABC,2),Balance)).*conj(-SEIpABC)