diff --git a/IPMLoop.m b/IPMLoop.m index 8957b5a..6a62c69 100644 --- a/IPMLoop.m +++ b/IPMLoop.m @@ -25,7 +25,7 @@ Init_L=1*sparse(ones(RestraintCount,1)); Init_U=1*sparse(ones(RestraintCount,1)); Init_Y=sparse(2*busNum,1);%等式约束乘子 Gap=(Init_L'*Init_Z-Init_U'*Init_W); -kmax=20; +kmax=15; isSetBound=0; largerBound=0; realBound=1; diff --git a/lineWithConfig.m b/lineWithConfig.m index 16c2a87..b810d2d 100644 --- a/lineWithConfig.m +++ b/lineWithConfig.m @@ -11,7 +11,7 @@ if isempty(entry) fprintf('warning: line type %d not found.\n',config) return; end -phase3R=lineZ(entry+1:entry+3,:); +phase3R=0.5*lineZ(entry+1:entry+3,:); phase3X=lineZ(entry+5:entry+7,:); phase3B2=lineZ(entry+9:entry+11,:); phase3Z=phase3R+1j*phase3X; diff --git a/modified-feeder69/lineParameter.txt b/modified-feeder69/lineParameter.txt index b8e6825..75dee0d 100644 --- a/modified-feeder69/lineParameter.txt +++ b/modified-feeder69/lineParameter.txt @@ -1,4 +1,17 @@ 222 +3.0179 1.5017 1.5017 +1.5017 3.0179 1.5017 +1.5017 1.5017 3.0179 +0 +0.3465 0.1560 0.1560 +0.1560 0.3465 0.1560 +0.1560 0.1560 0.3465 +0 +6.2998 -1.9958 -1.2595 +-1.9958 5.9597 -0.7417 +-1.2595 -0.7417 5.6386 +0 +2221 0.3465 0.1560 0.1560 0.1560 0.3465 0.1560 0.1560 0.1560 0.3465 diff --git a/run.m b/run.m index 2770951..e318296 100644 --- a/run.m +++ b/run.m @@ -4,10 +4,10 @@ function [JMeasurement,AME_Volt,AME_VAngle,AME_PD,AME_QD,AME_mVolt,AME_mPD,AME_m close all clc clear -lineZ=readLineZ('E:\算例\modified-feeder69\lineParameter.txt'); +lineZ=readLineZ('modified-feeder69\lineParameter.txt'); [ fsY0, fsY1, fsY2,phaseASpotLoadP,phaseBSpotLoadP,phaseCSpotLoadP ... phaseASpotLoadQ,phaseBSpotLoadQ,phaseCSpotLoadQ,setIJ,nodeNum,Balance,phaseABCY ... - cap]=dataRead(lineZ,'E:\算例\modified-feeder69\data.txt'); + cap]=dataRead(lineZ,'modified-feeder69\data.txt'); a=exp(1j*2*pi/3); Tp2f=1/3*[1 1 1; 1 a a^2; @@ -316,12 +316,13 @@ wV0i=wV0i(Loadi); % matlabpool local 3 %% 不同量测配置 -noLoadi=[1,8,10,12]; -% noLoadi=[1:3:max(Loadi)]; +% noLoadi=[1,8,10,12]; +noLoadi=[1:4:max(Loadi)]; +noLoadi=Loadi(1:6:end); % noLoadi=[1,19]; % noLoadi=[4,3,2,5,6,7,11,14,22]; noLoadi=Loadi; -% noLoadi=[1]; +noLoadi=[5]; wI0r(ismember(Loadi,noLoadi))=1e100000; wI0i(ismember(Loadi,noLoadi))=1e100000; wI1r(ismember(Loadi,noLoadi))=1e100000; @@ -445,14 +446,14 @@ JMeasurement=sum(sum((( abs(mVoltABCV)-abs(SEVoltpABC) )./ abs(mVoltABCV)./sigma Busnum=busNum; mCount=Busnum*3+length(Loadi)*3*2; %估计量质量 -AME_Volt=sum(sum(abs( abs(rVoltABCV)-abs(SEVoltpABC)))); -AME_VAngle=sum(sum(abs( angle(rVoltABCV)-angle(SEVoltpABC)))); -AME_PD=sum(sum(abs(real(SEThreeLoad-rThreeLoad(:,Loadi))))); -AME_QD=sum(sum(abs(imag(SEThreeLoad-rThreeLoad(:,Loadi))))); +AME_Volt=sum(sum(abs( abs(rVoltABCV)-abs(SEVoltpABC))))/size(rVoltABCV,1)/size(rVoltABCV,2); +AME_VAngle=sum(sum(abs( angle(rVoltABCV)-angle(SEVoltpABC))))/size(rVoltABCV,1)/size(rVoltABCV,2); +AME_PD=sum(sum(abs(real(SEThreeLoad-rThreeLoad(:,Loadi)))))/length(Loadi)/3; +AME_QD=sum(sum(abs(imag(SEThreeLoad-rThreeLoad(:,Loadi)))))/length(Loadi)/3; %计算与量测值的 -AME_mVolt=sum(sum(abs( abs(mVoltABCV)-abs(rVoltABCV)))); -AME_mPD=sum(sum(abs(real(rThreeLoad(:,Loadi)-mThreeLoad(:,Loadi))))); -AME_mQD=sum(sum(abs(imag(rThreeLoad(:,Loadi)-mThreeLoad(:,Loadi))))); +AME_mVolt=sum(sum(abs( abs(mVoltABCV)-abs(rVoltABCV))))/size(rVoltABCV,1)/size(rVoltABCV,2); +AME_mPD=sum(sum(abs(real(rThreeLoad(:,Loadi)-mThreeLoad(:,Loadi)))))/length(Loadi)/3; +AME_mQD=sum(sum(abs(imag(rThreeLoad(:,Loadi)-mThreeLoad(:,Loadi)))))/length(Loadi)/3; %无偏估计 % AME_Volt=abs(rVoltABCV)-abs(SEVoltpABC); % AME_VAngle= ( (( angle(rVoltABCV)-angle(SEVoltpABC))));