1.加大系统算例
2.这个是0%最好的参数。 Signed-off-by: dmy@lab <dmy@lab.lab>
This commit is contained in:
parent
04e95a448e
commit
b57e14a499
|
|
@ -1,11 +1,6 @@
|
|||
function Lw=FormLwstate1(Loadi,Mat_G,Init_U,I1measurement,dI_F,flag,guessIf1)
|
||||
function Lw=FormLwstate1(Loadi,Mat_G,Init_U,I1measurement,dI_F,flag,guessIf1,rIf1,upper)
|
||||
|
||||
|
||||
Ir=real(guessIf1);
|
||||
pIr=find(Ir>0);
|
||||
nIr=find(Ir<0);
|
||||
Ii=imag(guessIf1);
|
||||
pIi=find(Ii>0);
|
||||
nIi=find(Ii<0);
|
||||
|
||||
% Loadi=[1,4,5,6,8,10];
|
||||
|
||||
|
|
@ -15,22 +10,37 @@ nIi=find(Ii<0);
|
|||
% upper(nIr)=0.6*Ir(nIr);
|
||||
% upper(pIi+length(Ir))=1.4*Ii(pIi);
|
||||
% upper(nIi+length(Ir))=0.6*Ii(nIi);
|
||||
upper=ones(length(Loadi)*2,1);
|
||||
|
||||
% upper(pIr)=abs(real(dI_F(pIr,flag)))+Ir(pIr);
|
||||
% upper(nIr)=abs(real(dI_F(nIr,flag)))+Ir(nIr);
|
||||
% upper(pIi+length(Ir))=abs(imag(dI_F(pIi,flag)))+Ii(pIi);
|
||||
% upper(nIi+length(Ir))=abs(imag(dI_F(nIi,flag)))+Ii(nIi);
|
||||
upper(pIr)=1.3*Ir(pIr);
|
||||
upper(nIr)=0.7*Ir(nIr);
|
||||
upper(pIi+length(Ir))=1.3*Ii(pIi);
|
||||
upper(nIi+length(Ir))=0.7*Ii(nIi);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
% if flag~=2
|
||||
% upper(pIr)=0.8;
|
||||
% upper(nIr)=0.8;
|
||||
% upper(pIi+length(Ir))=0.8;
|
||||
% upper(nIi+length(Ir))=0.8;
|
||||
% end
|
||||
|
||||
|
||||
% if real(rIf1(Loadi))>upper( union( pIr,nIr) )
|
||||
% warning('not bounded');
|
||||
% end
|
||||
%
|
||||
% if imag(rIf1(Loadi))>upper(union( pIr,nIr)+length(Ir))
|
||||
% warning('not bounded');
|
||||
% end
|
||||
|
||||
%太小的数都要放宽一些
|
||||
% tooSmall=find(abs(Ir)<0.0005);
|
||||
% upper(tooSmall)=0.2;
|
||||
% tooSmall=find(abs(Ii)<0.0005);
|
||||
% upper(tooSmall+length(Ir))=0.2;
|
||||
% tooSmall=find(abs(Ir)<0.05);
|
||||
% upper(tooSmall)=0.8;
|
||||
% tooSmall=find(abs(Ii)<0.05);
|
||||
% upper(tooSmall+length(Ir))=0.8;
|
||||
|
||||
Lw=Mat_G+Init_U-upper;
|
||||
end
|
||||
|
|
@ -1,14 +1,9 @@
|
|||
function Lz=FormLzstate1(Loadi,Mat_G,Init_L,I1measurement,dI_F,flag,guessIf1)
|
||||
Ir=real(guessIf1);
|
||||
pIr=find(Ir>0);
|
||||
nIr=find(Ir<0);
|
||||
Ii=imag(guessIf1);
|
||||
pIi=find(Ii>0);
|
||||
nIi=find(Ii<0);
|
||||
function Lz=FormLzstate1(Loadi,Mat_G,Init_L,I1measurement,dI_F,flag,guessIf1,rIf1,lower)
|
||||
|
||||
|
||||
% Loadi=[1,4,5,6,8,10];
|
||||
|
||||
lower=ones(length(Loadi)*2,1);
|
||||
|
||||
% lower(pIr)=0.6*Ir(pIr);
|
||||
% lower(nIr)=1.4*Ir(nIr);
|
||||
% lower(pIi+length(Ir))=0.6*Ii(pIi);
|
||||
|
|
@ -24,17 +19,33 @@ lower=ones(length(Loadi)*2,1);
|
|||
% lower(pIi+length(Ir))=-abs(imag(dI_F(pIi,flag)))+Ii(pIi);
|
||||
% lower(nIi+length(Ir))=-abs(imag(dI_F(nIi,flag)))+Ii(nIi);
|
||||
|
||||
lower(pIr)=0.7*Ir(pIr);
|
||||
lower(nIr)=1.3*Ir(nIr);
|
||||
lower(pIi+length(Ir))=0.7*Ii(pIi);
|
||||
lower(nIi+length(Ir))=1.3*Ii(nIi);
|
||||
|
||||
% lower(nIr(1))=-18;
|
||||
% lower(nIr(2))=-18;
|
||||
% lower(nIr(3))=-18;
|
||||
% lower(nIr(4))=-18;
|
||||
|
||||
|
||||
% if flag~=2
|
||||
% lower(pIr)=-18;
|
||||
% lower(nIr)=-18;
|
||||
% lower(pIi+length(Ir))=-18;
|
||||
% lower(nIi+length(Ir))=-18;
|
||||
% end
|
||||
|
||||
% if real(rIf1(Loadi))<lower( union( pIr,nIr) )
|
||||
% warning('not bounded');
|
||||
% end
|
||||
%
|
||||
% if imag(rIf1(Loadi))<lower(union( pIr,nIr)+length(Ir))
|
||||
% warning('not bounded');
|
||||
% end
|
||||
|
||||
%太小的数都要放宽一些
|
||||
% tooSmall=find(abs(Ir)<0.0005);
|
||||
% lower(tooSmall)=-0.2;
|
||||
% tooSmall=find(abs(Ii)<0.0005);
|
||||
% lower(tooSmall+length(Ir))=-0.2;
|
||||
% tooSmall=find(abs(Ir)<0.05);
|
||||
% lower(tooSmall)=-0.8;
|
||||
% tooSmall=find(abs(Ii)<0.05);
|
||||
% lower(tooSmall+length(Ir))=-0.8;
|
||||
|
||||
Lz=Mat_G-Init_L-lower;
|
||||
end
|
||||
123
IPMLoop.m
123
IPMLoop.m
|
|
@ -1,24 +1,33 @@
|
|||
function [ V1r,V1i,I1r,I1i,isConverged ] = IPMLoop(V1measurement,wV1r,wV1i,I1measurement,wI1r,wI1i,BalI1r,BalI1i,busNum,Loadi,fsY1,Balance,Vref,dI_F,flag,guessIf1 )
|
||||
function [ V1r,V1i,I1r,I1i,isConverged,calcuTime ] = IPMLoop(V1measurement,wV1r,wV1i,I1measurement,wI1r,wI1i,BalI1r,BalI1i,busNum,Loadi,fsY1,Balance,Vref,dI_F,flag,guessIf1,rIf1,noLoadi )
|
||||
%把每个序的循环写在这个函数中。其实也就是内点法循环。
|
||||
V1r=Vref*ones(busNum,1);
|
||||
V1i=0*ones(busNum,1);
|
||||
I1r=0.1*ones(length(Loadi),1);%注入电流,相当于放电机电流,与负荷电流负荷相反
|
||||
I1i=0.1*ones(length(Loadi),1);%注入电流,相当于放电机电流,与负荷电流负荷相反
|
||||
% I1r=0.1*ones(length(Loadi),1);%注入电流,相当于放电机电流,与负荷电流负荷相反
|
||||
% I1i=0.1*ones(length(Loadi),1);%注入电流,相当于放电机电流,与负荷电流负荷相反
|
||||
I1r=real(guessIf1);
|
||||
I1i=imag(guessIf1);
|
||||
KK=0;
|
||||
plotGap=zeros(1,60);
|
||||
%初始化
|
||||
%状态量为 SEPD SEQD SEVmf1 SEVaf1
|
||||
RestraintCount=length(Loadi)*2;
|
||||
% ContrlCount=busNum*2+length(Loadi)*2;
|
||||
noBoundedLoadi=setdiff(Loadi,noLoadi);
|
||||
noBoundedLoadi=[];
|
||||
ContrlCount=busNum*2+length(Loadi)*2;
|
||||
CenterA=0.1;
|
||||
Init_Z=sparse(ones(RestraintCount,1));
|
||||
Init_W=sparse(-1.0*ones(RestraintCount,1));
|
||||
Init_Z=1*sparse(ones(RestraintCount,1));
|
||||
Init_W=sparse(-1*ones(RestraintCount,1));
|
||||
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=30;
|
||||
while(abs(Gap)>0.00001)
|
||||
kmax=100;
|
||||
isSetBound=0;
|
||||
largerBound=1;
|
||||
realBound=0;
|
||||
tic
|
||||
while(abs(Gap)>1e-4)
|
||||
if KK>=kmax
|
||||
break;
|
||||
end
|
||||
|
|
@ -49,8 +58,100 @@ while(abs(Gap)>0.00001)
|
|||
Mat_G=FormGstate1(I1r,I1i);
|
||||
Mat_H=FormH(fsY1,Loadi,V1r,V1i,I1r,I1i,BalI1r,BalI1i,Balance);
|
||||
Ly=Mat_H;
|
||||
Lz=FormLzstate1(Loadi,Mat_G,Init_L,I1measurement,dI_F,flag,guessIf1);
|
||||
Lw=FormLwstate1(Loadi,Mat_G,Init_U,I1measurement,dI_F,flag,guessIf1);
|
||||
|
||||
% if isSetBound==0
|
||||
|
||||
Ir=real(guessIf1);
|
||||
pIr=find(Ir>0);
|
||||
nIr=find(Ir<0);
|
||||
Ii=imag(guessIf1);
|
||||
pIi=find(Ii>0);
|
||||
nIi=find(Ii<0);
|
||||
lower=ones(length(Loadi)*2,1);
|
||||
% if abs(Gap)<1 || isSetBound==1
|
||||
|
||||
if abs(Gap)<1000
|
||||
largerBound=0;
|
||||
realBound=1;
|
||||
end
|
||||
|
||||
if realBound==1
|
||||
% lower(pIr)=(0.9-3/(KK+1))*Ir(pIr);
|
||||
% lower(nIr)=(1.100+3/(KK+1))*Ir(nIr);
|
||||
% lower(pIi+length(Ir))=(0.9-3/(KK+1))*Ii(pIi);
|
||||
% lower(nIi+length(Ir))=(1.10+3/(KK+1))*Ii(nIi);
|
||||
isSetBound=1;
|
||||
lower(pIr)=(0.7)*Ir(pIr);
|
||||
lower(nIr)=(1.300)*Ir(nIr);
|
||||
lower(pIi+length(Ir))=(0.7)*Ii(pIi);
|
||||
lower(nIi+length(Ir))=(1.30)*Ii(nIi);
|
||||
lower( ismember(Loadi,noBoundedLoadi))=-0.9;
|
||||
lower(ismember(Loadi,noBoundedLoadi)+length(Ir))=-0.9;
|
||||
end
|
||||
|
||||
if largerBound==1
|
||||
lower(pIr)=-2.8;
|
||||
lower(nIr)=-2.8;
|
||||
lower(pIi+length(Ir))=-2.8;
|
||||
lower(nIi+length(Ir))=-2.8;
|
||||
|
||||
% lower(pIr)=(0.7)*Ir(pIr)-0.1;
|
||||
% lower(nIr)=(1.300)*Ir(nIr)-0.1;
|
||||
% lower(pIi+length(Ir))=(0.7)*Ii(pIi)-0.1;
|
||||
% lower(nIi+length(Ir))=(1.30)*Ii(nIi)-0.1;
|
||||
end
|
||||
|
||||
|
||||
|
||||
% lowerR=lower(1:length(lower)/2);
|
||||
% lowerR(I1r./lowerR>0.98)=lowerR(I1r./lowerR>0.98)-0.001;
|
||||
% lowerI=lower(length(lower)/2+1:end);
|
||||
% lowerI(I1i./lowerI>0.98)=lowerI(I1i./lowerI>0.98)-0.001;
|
||||
% lower=[lowerR;lowerI];
|
||||
|
||||
% I1r(I1r./lowerR>0.9998)=lowerR(I1r./lowerR>0.9998);
|
||||
% I1i(I1i./lowerI>0.9998)=lowerI(I1i./lowerI>0.9998);
|
||||
|
||||
Ir=real(guessIf1);
|
||||
pIr=find(Ir>0);
|
||||
nIr=find(Ir<0);
|
||||
Ii=imag(guessIf1);
|
||||
pIi=find(Ii>0);
|
||||
nIi=find(Ii<0);
|
||||
upper=ones(length(Loadi)*2,1);
|
||||
% if abs(Gap)<1 || isSetBound==1
|
||||
if realBound==1
|
||||
% upper(pIr)=(1.10+3/(KK+1))*Ir(pIr);
|
||||
% upper(nIr)=(0.9-3/(KK+1))*Ir(nIr);
|
||||
% upper(pIi+length(Ir))=(1.10+3/(KK+1))*Ii(pIi);
|
||||
% upper(nIi+length(Ir))=(0.9-3/(KK+1))*Ii(nIi);
|
||||
isSetBound=1;
|
||||
upper(pIr)=(1.30)*Ir(pIr);
|
||||
upper(nIr)=(0.7)*Ir(nIr);
|
||||
upper(pIi+length(Ir))=(1.30)*Ii(pIi);
|
||||
upper(nIi+length(Ir))=(0.7)*Ii(nIi);
|
||||
upper(ismember(Loadi,noBoundedLoadi))=0.9;
|
||||
upper(ismember(Loadi,noBoundedLoadi)+length(Ir))=0.9;
|
||||
end
|
||||
|
||||
if largerBound==1
|
||||
|
||||
upper(pIr)=2.8;
|
||||
upper(nIr)=2.8;
|
||||
upper(pIi+length(Ir))=2.8;
|
||||
upper(nIi+length(Ir))=2.8;
|
||||
|
||||
% upper(pIr)=(1.30)*Ir(pIr)+0.1;
|
||||
% upper(nIr)=(0.7)*Ir(nIr)+0.1;
|
||||
% upper(pIi+length(Ir))=(1.30)*Ii(pIi)+0.1;
|
||||
% upper(nIi+length(Ir))=(0.7)*Ii(nIi)+0.1;
|
||||
end
|
||||
|
||||
|
||||
% end
|
||||
|
||||
Lz=FormLzstate1(Loadi,Mat_G,Init_L,I1measurement,dI_F,flag,guessIf1,rIf1,lower);
|
||||
Lw=FormLwstate1(Loadi,Mat_G,Init_U,I1measurement,dI_F,flag,guessIf1,rIf1,upper);
|
||||
Lx=FormLx(deltF,deltH,Init_Y,deltG,Init_Z,Init_W);
|
||||
YY=FormYY(Lul,Lz,Ly,Luu,Lw,Lx);
|
||||
%% 开始解方程
|
||||
|
|
@ -59,9 +160,11 @@ while(abs(Gap)>0.00001)
|
|||
[deltZ,deltL,deltW,deltU,deltX,deltY]=AssignXX(XX,ContrlCount,RestraintCount,busNum,Balance);
|
||||
[Init_Z,Init_L,Init_W,Init_U,Init_Y,V1r,V1i,I1r,I1i]=Modification(Init_Z,Init_L,Init_W,Init_U,Init_Y,deltZ,deltL,deltW,deltU,deltX,deltY,V1r,V1i,I1r,I1i,ContrlCount,Balance,busNum,Loadi,Vref);
|
||||
Gap=(Init_L'*Init_Z-Init_U'*Init_W)+max(abs(deltX));
|
||||
fprintf('Gap %f\n',full(Gap));
|
||||
fprintf('Gap %f :%d\n',full(Gap),KK+1);
|
||||
KK=KK+1;
|
||||
end
|
||||
toc
|
||||
calcuTime=toc/KK;
|
||||
% f=sum(([real(I1measurement);imag(I1measurement)]-[I1r;I1i]).^2)+sum((real(V1measurement)-V1r(Loadi)).^2)+sum((imag(V1measurement)-V1i(Loadi)).^2);
|
||||
if abs(Gap)<0.00001 && KK<kmax
|
||||
isConverged=1;
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,13 @@
|
|||
650
|
||||
0
|
||||
602 632 633 500
|
||||
601 650 632 2000
|
||||
601 632 671 2000
|
||||
601 671 680 1000
|
||||
0
|
||||
0
|
||||
633 160 120 120 110 90 90
|
||||
671 385 385 385 220 220 220
|
||||
0
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
650
|
||||
0
|
||||
600 632 645 500
|
||||
602 632 633 500
|
||||
601 633 634 0
|
||||
600 645 646 300
|
||||
601 650 632 2000
|
||||
602 684 652 800
|
||||
601 632 671 2000
|
||||
600 671 684 300
|
||||
602 671 680 1000
|
||||
600 671 692 0
|
||||
602 684 611 300
|
||||
601 692 675 500
|
||||
0
|
||||
|
||||
Binary file not shown.
|
|
@ -0,0 +1,76 @@
|
|||
650 4.16
|
||||
0
|
||||
600 632 645 50
|
||||
602 632 633 50
|
||||
601 633 634 60
|
||||
600 645 646 30
|
||||
601 650 632 200
|
||||
602 684 652 80
|
||||
601 632 671 200
|
||||
600 671 684 30
|
||||
600 671 692 30
|
||||
602 684 611 30
|
||||
601 692 675 50
|
||||
600 2632 2645 50
|
||||
602 2632 2633 50
|
||||
601 2633 2634 60
|
||||
600 2645 2646 30
|
||||
601 650 2632 200
|
||||
602 2684 2652 80
|
||||
601 2632 2671 200
|
||||
600 2671 2684 30
|
||||
600 2671 2692 30
|
||||
602 2684 2611 30
|
||||
601 2692 2675 50
|
||||
0
|
||||
692 0 0 0
|
||||
0
|
||||
634 120 90 120 90 160 110
|
||||
645 40 30 50 40 60 50
|
||||
646 100 50 70 40 60 40
|
||||
652 20 10 60 30 40 40
|
||||
671 385 220 385 220 385 220
|
||||
675 68 60 290 212 285 190
|
||||
692 260 200 40 40 70 40
|
||||
611 80 20 60 40 30 20
|
||||
2634 120 90 120 90 160 110
|
||||
2645 40 30 50 40 60 50
|
||||
2646 100 50 70 40 60 40
|
||||
2652 20 10 60 30 40 40
|
||||
2671 385 220 385 220 385 220
|
||||
2675 68 60 290 212 285 190
|
||||
2692 260 200 40 40 70 40
|
||||
2611 80 20 60 40 30 20
|
||||
0
|
||||
600 632 645 500
|
||||
602 632 633 500
|
||||
601 633 634 600
|
||||
600 645 646 300
|
||||
601 650 632 2000
|
||||
602 684 652 800
|
||||
601 632 671 2000
|
||||
600 671 684 300
|
||||
602 671 680 1000
|
||||
600 671 692 300
|
||||
602 684 611 300
|
||||
601 692 675 500
|
||||
0
|
||||
632 0 0 0
|
||||
0
|
||||
634 160 110 120 90 120 90
|
||||
645 123 102 170 125 133 110
|
||||
646 172 150 230 132 0 211 160
|
||||
652 128 86 30 10 80 70
|
||||
671 385 220 385 220 385 220
|
||||
675 485 190 68 60 290 212
|
||||
692 142 140 153 121 170 151
|
||||
611 156 142 185 60 170 80
|
||||
0
|
||||
634 160 110 120 90 120 90
|
||||
645 123 102 170 125 133 110
|
||||
646 17 15 23 13 21 16
|
||||
652 128 86 30 10 80 70
|
||||
675 85 10 68 60 20 12
|
||||
611 52 42 85 60 70 40
|
||||
680 12 4 10 6 7 4
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
650 4.16
|
||||
0
|
||||
601 650 632 2000
|
||||
602 632 631 1800
|
||||
602 631 630 1700
|
||||
0
|
||||
632 0 0 0
|
||||
0
|
||||
630 90 70 80 40 30 10
|
||||
631 40 10 60 30 100 80
|
||||
632 12 12 120 120 11 11
|
||||
0
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
650
|
||||
0
|
||||
602 632 633 500
|
||||
601 650 632 2000
|
||||
601 632 671 2000
|
||||
601 671 680 1000
|
||||
0
|
||||
0
|
||||
633 160 120 120 110 90 90
|
||||
671 385 385 385 220 220 220
|
||||
0
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
650 4.16
|
||||
0
|
||||
602 632 633 500
|
||||
601 650 632 2000
|
||||
601 632 671 2000
|
||||
601 671 680 1000
|
||||
0
|
||||
0
|
||||
671 385 385 385 220 220 220
|
||||
0
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,27 @@
|
|||
601
|
||||
0.3465 0.1560 0.1580
|
||||
0.1560 0.3375 0.1535
|
||||
0.1580 0.1535 0.3414
|
||||
0
|
||||
1.0179 0.5017 0.4236
|
||||
0.5017 1.0478 0.3849
|
||||
0.4236 0.3849 1.0348
|
||||
0
|
||||
6.2998 -1.9958 -1.2595
|
||||
-1.9958 5.9597 -0.7417
|
||||
-1.2595 -0.7417 5.6386
|
||||
0
|
||||
602
|
||||
0.7526 0.1580 0.1560
|
||||
0.1580 0.7475 0.1535
|
||||
0.1560 0.1535 0.7436
|
||||
0
|
||||
1.1814 0.4236 0.5017
|
||||
0.4236 1.1983 0.3849
|
||||
0.5017 0.3849 1.2112
|
||||
0
|
||||
5.6990 -1.0817 -1.6905
|
||||
-1.0817 5.1795 -0.6588
|
||||
-1.6905 -0.6588 5.4246
|
||||
0
|
||||
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
600
|
||||
0.3465 0.1560 0.1580
|
||||
0.1560 0.3375 0.1535
|
||||
0.1580 0.1535 0.3414
|
||||
0
|
||||
1.0179 0.5017 0.4236
|
||||
0.5017 1.0478 0.3849
|
||||
0.4236 0.3849 1.0348
|
||||
0
|
||||
6.2998 -1.9958 -1.2595
|
||||
-1.9958 5.9597 -0.7417
|
||||
-1.2595 -0.7417 5.6386
|
||||
0
|
||||
601
|
||||
0.3465 0.1560 0.1580
|
||||
0.1560 0.3375 0.1535
|
||||
0.1580 0.1535 0.3414
|
||||
0
|
||||
1.0179 0.5017 0.4236
|
||||
0.5017 1.0478 0.3849
|
||||
0.4236 0.3849 1.0348
|
||||
0
|
||||
6.2998 -1.9958 -1.2595
|
||||
-1.9958 5.9597 -0.7417
|
||||
-1.2595 -0.7417 5.6386
|
||||
0
|
||||
602
|
||||
0.7526 0.1580 0.1560
|
||||
0.1580 0.7475 0.1535
|
||||
0.1560 0.1535 0.7436
|
||||
0
|
||||
1.1814 0.4236 0.5017
|
||||
0.4236 1.1983 0.3849
|
||||
0.5017 0.3849 1.2112
|
||||
0
|
||||
5.6990 -1.0817 -1.6905
|
||||
-1.0817 5.1795 -0.6588
|
||||
-1.6905 -0.6588 5.4246
|
||||
0
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
line data
|
||||
XFM-1 -1
|
||||
Switch -2
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,13 @@
|
|||
650
|
||||
0
|
||||
602 632 633 500
|
||||
601 650 632 2000
|
||||
601 632 671 2000
|
||||
601 671 680 1000
|
||||
0
|
||||
0
|
||||
633 160 120 120 110 90 90
|
||||
671 385 385 385 220 220 220
|
||||
0
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
650
|
||||
0
|
||||
600 632 645 500
|
||||
602 632 633 500
|
||||
601 633 634 0
|
||||
600 645 646 300
|
||||
601 650 632 2000
|
||||
602 684 652 800
|
||||
601 632 671 2000
|
||||
600 671 684 300
|
||||
602 671 680 1000
|
||||
600 671 692 0
|
||||
602 684 611 300
|
||||
601 692 675 500
|
||||
0
|
||||
|
||||
Binary file not shown.
|
|
@ -0,0 +1,95 @@
|
|||
650 4.16
|
||||
0
|
||||
600 632 645 50
|
||||
602 632 633 50
|
||||
601 633 634 60
|
||||
600 645 646 30
|
||||
601 650 632 200
|
||||
602 684 652 80
|
||||
601 632 671 200
|
||||
600 671 684 30
|
||||
600 671 692 30
|
||||
602 684 611 30
|
||||
601 692 675 50
|
||||
600 2632 2645 50
|
||||
602 2632 2633 50
|
||||
601 2633 2634 60
|
||||
600 2645 2646 30
|
||||
601 650 2632 200
|
||||
602 2684 2652 80
|
||||
601 2632 2671 200
|
||||
600 2671 2684 30
|
||||
600 2671 2692 30
|
||||
602 2684 2611 30
|
||||
601 2692 2675 50
|
||||
600 3632 3645 50
|
||||
602 3632 3633 50
|
||||
601 3633 3634 60
|
||||
600 3645 3646 30
|
||||
601 650 3632 200
|
||||
602 3684 3652 80
|
||||
601 3632 3671 200
|
||||
600 3671 3684 30
|
||||
600 3671 3692 30
|
||||
602 3684 3611 30
|
||||
601 3692 3675 50
|
||||
0
|
||||
692 0 0 0
|
||||
0
|
||||
634 120 90 120 90 160 110
|
||||
645 40 30 50 40 60 50
|
||||
646 100 50 70 40 60 40
|
||||
652 20 10 60 30 40 40
|
||||
671 385 220 385 220 385 220
|
||||
675 68 60 290 212 285 190
|
||||
692 260 200 40 40 70 40
|
||||
611 80 20 60 40 30 20
|
||||
2634 120 90 120 90 160 110
|
||||
2645 40 30 50 40 60 50
|
||||
2646 100 50 70 40 60 40
|
||||
2652 20 10 60 30 40 40
|
||||
2671 385 220 385 220 385 220
|
||||
2675 68 60 290 212 285 190
|
||||
2692 260 200 40 40 70 40
|
||||
2611 80 20 60 40 30 20
|
||||
3634 120 90 120 90 160 110
|
||||
3645 40 30 50 40 60 50
|
||||
3646 100 50 70 40 60 40
|
||||
3652 20 10 60 30 40 40
|
||||
3671 385 220 385 220 385 220
|
||||
3675 68 60 290 212 285 190
|
||||
3692 260 200 40 40 70 40
|
||||
3611 80 20 60 40 30 20
|
||||
0
|
||||
600 632 645 500
|
||||
602 632 633 500
|
||||
601 633 634 600
|
||||
600 645 646 300
|
||||
601 650 632 2000
|
||||
602 684 652 800
|
||||
601 632 671 2000
|
||||
600 671 684 300
|
||||
602 671 680 1000
|
||||
600 671 692 300
|
||||
602 684 611 300
|
||||
601 692 675 500
|
||||
0
|
||||
632 0 0 0
|
||||
0
|
||||
634 160 110 120 90 120 90
|
||||
645 123 102 170 125 133 110
|
||||
646 172 150 230 132 0 211 160
|
||||
652 128 86 30 10 80 70
|
||||
671 385 220 385 220 385 220
|
||||
675 485 190 68 60 290 212
|
||||
692 142 140 153 121 170 151
|
||||
611 156 142 185 60 170 80
|
||||
0
|
||||
634 160 110 120 90 120 90
|
||||
645 123 102 170 125 133 110
|
||||
646 17 15 23 13 21 16
|
||||
652 128 86 30 10 80 70
|
||||
675 85 10 68 60 20 12
|
||||
611 52 42 85 60 70 40
|
||||
680 12 4 10 6 7 4
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
650 4.16
|
||||
0
|
||||
601 650 632 2000
|
||||
602 632 631 1800
|
||||
602 631 630 1700
|
||||
0
|
||||
632 0 0 0
|
||||
0
|
||||
630 90 70 80 40 30 10
|
||||
631 40 10 60 30 100 80
|
||||
632 12 12 120 120 11 11
|
||||
0
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
650
|
||||
0
|
||||
602 632 633 500
|
||||
601 650 632 2000
|
||||
601 632 671 2000
|
||||
601 671 680 1000
|
||||
0
|
||||
0
|
||||
633 160 120 120 110 90 90
|
||||
671 385 385 385 220 220 220
|
||||
0
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
650 4.16
|
||||
0
|
||||
602 632 633 500
|
||||
601 650 632 2000
|
||||
601 632 671 2000
|
||||
601 671 680 1000
|
||||
0
|
||||
0
|
||||
671 385 385 385 220 220 220
|
||||
0
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,27 @@
|
|||
601
|
||||
0.3465 0.1560 0.1580
|
||||
0.1560 0.3375 0.1535
|
||||
0.1580 0.1535 0.3414
|
||||
0
|
||||
1.0179 0.5017 0.4236
|
||||
0.5017 1.0478 0.3849
|
||||
0.4236 0.3849 1.0348
|
||||
0
|
||||
6.2998 -1.9958 -1.2595
|
||||
-1.9958 5.9597 -0.7417
|
||||
-1.2595 -0.7417 5.6386
|
||||
0
|
||||
602
|
||||
0.7526 0.1580 0.1560
|
||||
0.1580 0.7475 0.1535
|
||||
0.1560 0.1535 0.7436
|
||||
0
|
||||
1.1814 0.4236 0.5017
|
||||
0.4236 1.1983 0.3849
|
||||
0.5017 0.3849 1.2112
|
||||
0
|
||||
5.6990 -1.0817 -1.6905
|
||||
-1.0817 5.1795 -0.6588
|
||||
-1.6905 -0.6588 5.4246
|
||||
0
|
||||
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
600
|
||||
0.3465 0.1560 0.1580
|
||||
0.1560 0.3375 0.1535
|
||||
0.1580 0.1535 0.3414
|
||||
0
|
||||
1.0179 0.5017 0.4236
|
||||
0.5017 1.0478 0.3849
|
||||
0.4236 0.3849 1.0348
|
||||
0
|
||||
6.2998 -1.9958 -1.2595
|
||||
-1.9958 5.9597 -0.7417
|
||||
-1.2595 -0.7417 5.6386
|
||||
0
|
||||
601
|
||||
0.3465 0.1560 0.1580
|
||||
0.1560 0.3375 0.1535
|
||||
0.1580 0.1535 0.3414
|
||||
0
|
||||
1.0179 0.5017 0.4236
|
||||
0.5017 1.0478 0.3849
|
||||
0.4236 0.3849 1.0348
|
||||
0
|
||||
6.2998 -1.9958 -1.2595
|
||||
-1.9958 5.9597 -0.7417
|
||||
-1.2595 -0.7417 5.6386
|
||||
0
|
||||
602
|
||||
0.7526 0.1580 0.1560
|
||||
0.1580 0.7475 0.1535
|
||||
0.1560 0.1535 0.7436
|
||||
0
|
||||
1.1814 0.4236 0.5017
|
||||
0.4236 1.1983 0.3849
|
||||
0.5017 0.3849 1.2112
|
||||
0
|
||||
5.6990 -1.0817 -1.6905
|
||||
-1.0817 5.1795 -0.6588
|
||||
-1.6905 -0.6588 5.4246
|
||||
0
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
line data
|
||||
XFM-1 -1
|
||||
Switch -2
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,13 @@
|
|||
650
|
||||
0
|
||||
602 632 633 500
|
||||
601 650 632 2000
|
||||
601 632 671 2000
|
||||
601 671 680 1000
|
||||
0
|
||||
0
|
||||
633 160 120 120 110 90 90
|
||||
671 385 385 385 220 220 220
|
||||
0
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
650
|
||||
0
|
||||
600 632 645 500
|
||||
602 632 633 500
|
||||
601 633 634 0
|
||||
600 645 646 300
|
||||
601 650 632 2000
|
||||
602 684 652 800
|
||||
601 632 671 2000
|
||||
600 671 684 300
|
||||
602 671 680 1000
|
||||
600 671 692 0
|
||||
602 684 611 300
|
||||
601 692 675 500
|
||||
0
|
||||
|
||||
Binary file not shown.
|
|
@ -0,0 +1,114 @@
|
|||
650 4.16
|
||||
0
|
||||
600 632 645 50
|
||||
602 632 633 50
|
||||
601 633 634 60
|
||||
600 645 646 30
|
||||
601 650 632 200
|
||||
602 684 652 80
|
||||
601 632 671 200
|
||||
600 671 684 30
|
||||
600 671 692 30
|
||||
602 684 611 30
|
||||
601 692 675 50
|
||||
600 2632 2645 50
|
||||
602 2632 2633 50
|
||||
601 2633 2634 60
|
||||
600 2645 2646 30
|
||||
601 650 2632 200
|
||||
602 2684 2652 80
|
||||
601 2632 2671 200
|
||||
600 2671 2684 30
|
||||
600 2671 2692 30
|
||||
602 2684 2611 30
|
||||
601 2692 2675 50
|
||||
600 3632 3645 50
|
||||
602 3632 3633 50
|
||||
601 3633 3634 60
|
||||
600 3645 3646 30
|
||||
601 650 3632 200
|
||||
602 3684 3652 80
|
||||
601 3632 3671 200
|
||||
600 3671 3684 30
|
||||
600 3671 3692 30
|
||||
602 3684 3611 30
|
||||
601 3692 3675 50
|
||||
600 4632 4645 50
|
||||
602 4632 4633 50
|
||||
601 4633 4634 60
|
||||
600 4645 4646 30
|
||||
601 650 4632 200
|
||||
602 4684 4652 80
|
||||
601 4632 4671 200
|
||||
600 4671 4684 30
|
||||
600 4671 4692 30
|
||||
602 4684 4611 30
|
||||
601 4692 4675 50
|
||||
0
|
||||
692 0 0 0
|
||||
0
|
||||
634 120 90 120 90 160 110
|
||||
645 40 30 50 40 60 50
|
||||
646 100 50 70 40 60 40
|
||||
652 20 10 60 30 40 40
|
||||
671 385 220 385 220 385 220
|
||||
675 68 60 290 212 285 190
|
||||
692 260 200 40 40 70 40
|
||||
611 80 20 60 40 30 20
|
||||
2634 120 90 120 90 160 110
|
||||
2645 40 30 50 40 60 50
|
||||
2646 100 50 70 40 60 40
|
||||
2652 20 10 60 30 40 40
|
||||
2671 385 220 385 220 385 220
|
||||
2675 68 60 290 212 285 190
|
||||
2692 260 200 40 40 70 40
|
||||
2611 80 20 60 40 30 20
|
||||
3634 120 90 120 90 160 110
|
||||
3645 40 30 50 40 60 50
|
||||
3646 100 50 70 40 60 40
|
||||
3652 20 10 60 30 40 40
|
||||
3671 385 220 385 220 385 220
|
||||
3675 68 60 290 212 285 190
|
||||
3692 260 200 40 40 70 40
|
||||
3611 80 20 60 40 30 20
|
||||
4634 120 90 120 90 160 110
|
||||
4645 40 30 50 40 60 50
|
||||
4646 100 50 70 40 60 40
|
||||
4652 20 10 60 30 40 40
|
||||
4671 385 220 385 220 385 220
|
||||
4675 68 60 290 212 285 190
|
||||
4692 260 200 40 40 70 40
|
||||
4611 80 20 60 40 30 20
|
||||
0
|
||||
600 632 645 500
|
||||
602 632 633 500
|
||||
601 633 634 600
|
||||
600 645 646 300
|
||||
601 650 632 2000
|
||||
602 684 652 800
|
||||
601 632 671 2000
|
||||
600 671 684 300
|
||||
602 671 680 1000
|
||||
600 671 692 300
|
||||
602 684 611 300
|
||||
601 692 675 500
|
||||
0
|
||||
632 0 0 0
|
||||
0
|
||||
634 160 110 120 90 120 90
|
||||
645 123 102 170 125 133 110
|
||||
646 172 150 230 132 0 211 160
|
||||
652 128 86 30 10 80 70
|
||||
671 385 220 385 220 385 220
|
||||
675 485 190 68 60 290 212
|
||||
692 142 140 153 121 170 151
|
||||
611 156 142 185 60 170 80
|
||||
0
|
||||
634 160 110 120 90 120 90
|
||||
645 123 102 170 125 133 110
|
||||
646 17 15 23 13 21 16
|
||||
652 128 86 30 10 80 70
|
||||
675 85 10 68 60 20 12
|
||||
611 52 42 85 60 70 40
|
||||
680 12 4 10 6 7 4
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
650 4.16
|
||||
0
|
||||
601 650 632 2000
|
||||
602 632 631 1800
|
||||
602 631 630 1700
|
||||
0
|
||||
632 0 0 0
|
||||
0
|
||||
630 90 70 80 40 30 10
|
||||
631 40 10 60 30 100 80
|
||||
632 12 12 120 120 11 11
|
||||
0
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
650
|
||||
0
|
||||
602 632 633 500
|
||||
601 650 632 2000
|
||||
601 632 671 2000
|
||||
601 671 680 1000
|
||||
0
|
||||
0
|
||||
633 160 120 120 110 90 90
|
||||
671 385 385 385 220 220 220
|
||||
0
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
650 4.16
|
||||
0
|
||||
602 632 633 500
|
||||
601 650 632 2000
|
||||
601 632 671 2000
|
||||
601 671 680 1000
|
||||
0
|
||||
0
|
||||
671 385 385 385 220 220 220
|
||||
0
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,27 @@
|
|||
601
|
||||
0.3465 0.1560 0.1580
|
||||
0.1560 0.3375 0.1535
|
||||
0.1580 0.1535 0.3414
|
||||
0
|
||||
1.0179 0.5017 0.4236
|
||||
0.5017 1.0478 0.3849
|
||||
0.4236 0.3849 1.0348
|
||||
0
|
||||
6.2998 -1.9958 -1.2595
|
||||
-1.9958 5.9597 -0.7417
|
||||
-1.2595 -0.7417 5.6386
|
||||
0
|
||||
602
|
||||
0.7526 0.1580 0.1560
|
||||
0.1580 0.7475 0.1535
|
||||
0.1560 0.1535 0.7436
|
||||
0
|
||||
1.1814 0.4236 0.5017
|
||||
0.4236 1.1983 0.3849
|
||||
0.5017 0.3849 1.2112
|
||||
0
|
||||
5.6990 -1.0817 -1.6905
|
||||
-1.0817 5.1795 -0.6588
|
||||
-1.6905 -0.6588 5.4246
|
||||
0
|
||||
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
600
|
||||
0.3465 0.1560 0.1580
|
||||
0.1560 0.3375 0.1535
|
||||
0.1580 0.1535 0.3414
|
||||
0
|
||||
1.0179 0.5017 0.4236
|
||||
0.5017 1.0478 0.3849
|
||||
0.4236 0.3849 1.0348
|
||||
0
|
||||
6.2998 -1.9958 -1.2595
|
||||
-1.9958 5.9597 -0.7417
|
||||
-1.2595 -0.7417 5.6386
|
||||
0
|
||||
601
|
||||
0.3465 0.1560 0.1580
|
||||
0.1560 0.3375 0.1535
|
||||
0.1580 0.1535 0.3414
|
||||
0
|
||||
1.0179 0.5017 0.4236
|
||||
0.5017 1.0478 0.3849
|
||||
0.4236 0.3849 1.0348
|
||||
0
|
||||
6.2998 -1.9958 -1.2595
|
||||
-1.9958 5.9597 -0.7417
|
||||
-1.2595 -0.7417 5.6386
|
||||
0
|
||||
602
|
||||
0.7526 0.1580 0.1560
|
||||
0.1580 0.7475 0.1535
|
||||
0.1560 0.1535 0.7436
|
||||
0
|
||||
1.1814 0.4236 0.5017
|
||||
0.4236 1.1983 0.3849
|
||||
0.5017 0.3849 1.2112
|
||||
0
|
||||
5.6990 -1.0817 -1.6905
|
||||
-1.0817 5.1795 -0.6588
|
||||
-1.6905 -0.6588 5.4246
|
||||
0
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
line data
|
||||
XFM-1 -1
|
||||
Switch -2
|
||||
87
run.m
87
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('feeder13\lineParameter.txt');
|
||||
lineZ=readLineZ('feeder52\lineParameter.txt');
|
||||
[ fsY0, fsY1, fsY2,phaseASpotLoadP,phaseBSpotLoadP,phaseCSpotLoadP ...
|
||||
phaseASpotLoadQ,phaseBSpotLoadQ,phaseCSpotLoadQ,setIJ,nodeNum,Balance,phaseABCY ...
|
||||
cap]=dataRead(lineZ,'feeder13\data1.txt');
|
||||
cap]=dataRead(lineZ,'feeder52\data1.txt');
|
||||
a=exp(1j*2*pi/3);
|
||||
Tp2f=1/3*[1 1 1;
|
||||
1 a a^2;
|
||||
|
|
@ -136,7 +136,6 @@ ub=checkSSatisfied(Balance,phaseABCY,VoltpABC, ...
|
|||
phaseASpotLoadP,phaseBSpotLoadP,phaseCSpotLoadP, ...
|
||||
phaseASpotLoadQ,phaseBSpotLoadQ,phaseCSpotLoadQ );
|
||||
fprintf('最大不平衡量为%f\n\n',full(max(abs(ub))))
|
||||
%% 开始进入状态估计
|
||||
% clear PD QD PG QG;
|
||||
%准备量测量
|
||||
rIf0=If0;
|
||||
|
|
@ -168,6 +167,8 @@ mVoltpC=abs(rVoltpC).*(1+normrnd(0,sigma,length(VoltpC),1)).*exp(1j*+120/180*pi)
|
|||
% mVoltpA=sparse(ones(busNum,1));
|
||||
% mVoltpB=sparse(ones(busNum,1)).*exp(1j*-120/180*pi);
|
||||
% mVoltpC=sparse(ones(busNum,1)).*exp(1j*+120/180*pi);
|
||||
%% 开始进入状态估计
|
||||
tic
|
||||
%转换得到徐电压的量测量
|
||||
fV012=Tp2f*conj([mVoltpA';mVoltpB';mVoltpC']);
|
||||
mfV0=conj(fV012(1,:)');
|
||||
|
|
@ -215,8 +216,8 @@ I1measurement=mIf1(Loadi);
|
|||
|
||||
wI1r=abs(real(I1measurement)).*sigma;
|
||||
|
||||
dIrdPr=real(V1measurement)./(abs(V1measurement).^2);
|
||||
dIrdQr=imag(V1measurement)./(abs(V1measurement).^2);
|
||||
% dIrdPr=real(V1measurement)./(abs(V1measurement).^2);
|
||||
% dIrdQr=imag(V1measurement)./(abs(V1measurement).^2);
|
||||
% dIrdV=
|
||||
|
||||
wI1i=abs(imag(I1measurement)).*sigma;
|
||||
|
|
@ -290,7 +291,10 @@ wV0i=wV0i(Loadi);
|
|||
|
||||
%% 不同量测配置
|
||||
noLoadi=[1,8,10,12];
|
||||
noLoadi=[1:2:max(Loadi)];
|
||||
noLoadi=[4,3,2,5,6,7,11,14,22];
|
||||
noLoadi=Loadi;
|
||||
% noLoadi=[];
|
||||
wI0r(ismember(Loadi,noLoadi))=1e100000;
|
||||
wI0i(ismember(Loadi,noLoadi))=1e100000;
|
||||
wI1r(ismember(Loadi,noLoadi))=1e100000;
|
||||
|
|
@ -298,12 +302,25 @@ wI1i(ismember(Loadi,noLoadi))=1e100000;
|
|||
wI2r(ismember(Loadi,noLoadi))=1e100000;
|
||||
wI2i(ismember(Loadi,noLoadi))=1e100000;
|
||||
|
||||
% wI2r(wI2r<1000)=1e100000;
|
||||
% wI2i(wI2i<100)=1e100000;
|
||||
|
||||
wV0r(ismember(Loadi,noLoadi))=1e100000;
|
||||
wV0i(ismember(Loadi,noLoadi))=1e100000;
|
||||
wV1r(ismember(Loadi,noLoadi))=1e100000;
|
||||
wV1i(ismember(Loadi,noLoadi))=1e100000;
|
||||
wV2r(ismember(Loadi,noLoadi))=1e100000;
|
||||
wV2i(ismember(Loadi,noLoadi))=1e100000;
|
||||
|
||||
% wV0r(1:end)=1e100000;
|
||||
% wV0i(1:end)=1e100000;
|
||||
% wV1r(1:end)=1e100000;
|
||||
% wV1i(1:end)=1e100000;
|
||||
% wV2r(1:end)=1e100000;
|
||||
% wV2i(1:end)=1e100000;
|
||||
|
||||
% wV2r(wV2r<100)=1e100000;
|
||||
% wV2i(wV2i<100)=1e100000;
|
||||
%% 计算一下电流增量
|
||||
% %A相的
|
||||
% dIrdP_Ar=real(mVoltpA)./(real(mVoltpA).^2+imag(mVoltpA).^2);
|
||||
|
|
@ -348,19 +365,29 @@ wV2i(ismember(Loadi,noLoadi))=1e100000;
|
|||
% ];
|
||||
% dI_F=conj(dI_F)';
|
||||
% dI_F=dI_F(Loadi,:);
|
||||
% 换一个方式来计算
|
||||
deltmCurpA=conj((mphaseASpotLoadP+1j*mphaseASpotLoadQ)./mVoltpA)*0.3;
|
||||
deltmCurpB=conj((mphaseBSpotLoadP+1j*mphaseBSpotLoadQ)./mVoltpB)*0.3;
|
||||
deltmCurpC=conj((mphaseCSpotLoadP+1j*mphaseCSpotLoadQ)./mVoltpC)*0.3;
|
||||
%转换为序电流
|
||||
deltF012=Tp2f*conj([deltmCurpA';deltmCurpB';deltmCurpC']);
|
||||
dI_F=conj(deltF012)';
|
||||
dI_F=dI_F(Loadi,:);
|
||||
|
||||
% % 换一个方式来计算
|
||||
% deltmCurpA=conj((mphaseASpotLoadP+1j*mphaseASpotLoadQ)./mVoltpA)*0.3;
|
||||
% deltmCurpB=conj((mphaseBSpotLoadP+1j*mphaseBSpotLoadQ)./mVoltpB)*0.3;
|
||||
% deltmCurpC=conj((mphaseCSpotLoadP+1j*mphaseCSpotLoadQ)./mVoltpC)*0.3;
|
||||
% %转换为序电流
|
||||
% deltF012=Tp2f*conj([deltmCurpA';deltmCurpB';deltmCurpC']);
|
||||
% dI_F=conj(deltF012)';
|
||||
% dI_F=dI_F(Loadi,:);
|
||||
|
||||
%考虑负荷曲线不准确的情况
|
||||
guessCurpA=conj((phaseASpotLoadP+1j*phaseASpotLoadQ)./mVoltpA).*(1+unifrnd(-0.15,0.15,length(phaseASpotLoadQ),1));
|
||||
guessCurpB=conj((phaseBSpotLoadP+1j*phaseBSpotLoadQ)./mVoltpB).*(1+unifrnd(-0.15,0.15,length(phaseASpotLoadQ),1));
|
||||
guessCurpC=conj((phaseCSpotLoadP+1j*phaseCSpotLoadQ)./mVoltpC).*(1+unifrnd(-0.15,0.15,length(phaseASpotLoadQ),1));
|
||||
|
||||
% guessCurpA=conj((phaseASpotLoadP+1j*phaseASpotLoadQ)./rVoltpA);
|
||||
% guessCurpB=conj((phaseBSpotLoadP+1j*phaseBSpotLoadQ)./rVoltpB);
|
||||
% guessCurpC=conj((phaseCSpotLoadP+1j*phaseCSpotLoadQ)./rVoltpC);
|
||||
|
||||
% guessCurpA=conj((phaseASpotLoadP+1j*phaseASpotLoadQ)./mVoltpA);
|
||||
% guessCurpB=conj((phaseBSpotLoadP+1j*phaseBSpotLoadQ)./mVoltpB);
|
||||
% guessCurpC=conj((phaseCSpotLoadP+1j*phaseCSpotLoadQ)./mVoltpC);
|
||||
|
||||
% guessCurpA=conj((phaseASpotLoadP+1j*phaseASpotLoadQ)./mVoltpA);
|
||||
% guessCurpB=conj((phaseBSpotLoadP+1j*phaseBSpotLoadQ)./mVoltpB);
|
||||
% guessCurpC=conj((phaseCSpotLoadP+1j*phaseCSpotLoadQ)./mVoltpC);
|
||||
|
|
@ -375,26 +402,26 @@ guessIf2=guessIf2(Loadi);
|
|||
totalTime1=0;%正序时间
|
||||
totalTime2=0;%负序时间
|
||||
totalTime0=0;%零序时间
|
||||
toc
|
||||
tic
|
||||
for II=1:3
|
||||
|
||||
dI_F=100000000000000;
|
||||
initX=struct();
|
||||
if II==1
|
||||
fprintf('正序\n');
|
||||
tic
|
||||
[ V1r,V1i,I1r,I1i,isConverged1 ]=IPMLoop(V1measurement,wV1r,wV1i,I1measurement,wI1r,wI1i,BalI1r,BalI1i,busNum,Loadi,fsY11,Balance,1,dI_F,2,guessIf1 );
|
||||
totalTime1=toc
|
||||
[ V1r,V1i,I1r,I1i,isConverged1,calcuTime ]=IPMLoop(V1measurement,wV1r,wV1i,I1measurement,wI1r,wI1i,BalI1r,BalI1i,busNum,Loadi,fsY11,Balance,1,dI_F,2,guessIf1,rIf1,noLoadi );
|
||||
totalTime1=calcuTime
|
||||
end
|
||||
if II==2
|
||||
fprintf('负序\n');
|
||||
tic
|
||||
[ V2r,V2i,I2r,I2i,isConverged2 ]=IPMLoop(V2measurement,wV2r,wV2i,I2measurement,wI2r,wI2i,BalI2r,BalI2i,busNum,Loadi,fsY22,Balance,0,dI_F,3,guessIf2 );
|
||||
totalTime2=toc
|
||||
[ V2r,V2i,I2r,I2i,isConverged2,calcuTime ]=IPMLoop(V2measurement,wV2r,wV2i,I2measurement,wI2r,wI2i,BalI2r,BalI2i,busNum,Loadi,fsY22,Balance,0,dI_F,3,guessIf2,rIf2,noLoadi );
|
||||
totalTime2=calcuTime
|
||||
end
|
||||
if II==3
|
||||
fprintf('零序\n');
|
||||
tic
|
||||
[ V0r,V0i,I0r,I0i,isConverged0 ]=IPMLoop(V0measurement,wV0r,wV0i,I0measurement,wI0r,wI0i,BalI0r,BalI0i,busNum,Loadi,fsY00,Balance,0,dI_F,1,guessIf0 );
|
||||
totalTime0=toc
|
||||
[ V0r,V0i,I0r,I0i,isConverged0,calcuTime ]=IPMLoop(V0measurement,wV0r,wV0i,I0measurement,wI0r,wI0i,BalI0r,BalI0i,busNum,Loadi,fsY00,Balance,0,dI_F,1,guessIf0,rIf0,noLoadi );
|
||||
totalTime0=calcuTime
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -479,14 +506,14 @@ 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_Volt=abs(rVoltABCV)-abs(SEVoltpABC);
|
||||
AME_VAngle= ( (( angle(rVoltABCV)-angle(SEVoltpABC))));
|
||||
AME_PD= ( ((real(SEThreeLoad-rThreeLoad(:,Loadi)))));
|
||||
AME_QD= ( ((imag(SEThreeLoad-rThreeLoad(:,Loadi)))));
|
||||
%计算与量测值的
|
||||
AME_mVolt= ( (( abs(mVoltABCV)-abs(rVoltABCV))));
|
||||
AME_mPD= ( ((real(rThreeLoad(:,Loadi)-mThreeLoad(:,Loadi)))));
|
||||
AME_mQD= ( ((imag(rThreeLoad(:,Loadi)-mThreeLoad(:,Loadi)))));
|
||||
% AME_Volt=abs(rVoltABCV)-abs(SEVoltpABC);
|
||||
% AME_VAngle= ( (( angle(rVoltABCV)-angle(SEVoltpABC))));
|
||||
% AME_PD= ( ((real(SEThreeLoad-rThreeLoad(:,Loadi)))));
|
||||
% AME_QD= ( ((imag(SEThreeLoad-rThreeLoad(:,Loadi)))));
|
||||
% %计算与量测值的
|
||||
% AME_mVolt= ( (( abs(mVoltABCV)-abs(rVoltABCV))));
|
||||
% AME_mPD= ( ((real(rThreeLoad(:,Loadi)-mThreeLoad(:,Loadi)))));
|
||||
% AME_mQD= ( ((imag(rThreeLoad(:,Loadi)-mThreeLoad(:,Loadi)))));
|
||||
%返回收敛信息
|
||||
isConverged=isConverged1*isConverged2*isConverged0;
|
||||
end
|
||||
29
test.m
29
test.m
|
|
@ -9,10 +9,12 @@ AME_QDSum=0;
|
|||
AME_mVoltSum=0;
|
||||
AME_mPDSum=0;
|
||||
AME_mQDSum=0;
|
||||
totalTime1Sum=0;
|
||||
totalTime2Sum=0;
|
||||
totalTime0Sum=0;
|
||||
N=200;
|
||||
totalTime1Sum=10000;
|
||||
totalTime2Sum=10000;
|
||||
totalTime0Sum=10000;
|
||||
timeOfPrepare=0.00272333333;%×¼±¸Êý¾ÝµÄʱ¼ä
|
||||
timeOfPrepare=0;
|
||||
N=500;
|
||||
loopN=1;
|
||||
while 1
|
||||
[JMeasurement,AME_Volt,AME_VAngle,AME_PD,AME_QD,AME_mVolt,AME_mPD,AME_mQD,isConverged,totalTime1,totalTime2,totalTime0]=run();
|
||||
|
|
@ -32,9 +34,12 @@ while 1
|
|||
AME_mPDSum=AME_mPDSum+AME_mPD;
|
||||
AME_mQDSum=AME_mQDSum+AME_mQD;
|
||||
%ʱ<EFBFBD><EFBFBD>
|
||||
totalTime1Sum=totalTime1Sum+totalTime1;
|
||||
totalTime2Sum=totalTime2Sum+totalTime2;
|
||||
totalTime0Sum=totalTime0Sum+totalTime0;
|
||||
% totalTime1Sum=totalTime1Sum+totalTime1;
|
||||
% totalTime2Sum=totalTime2Sum+totalTime2;
|
||||
% totalTime0Sum=totalTime0Sum+totalTime0;
|
||||
totalTime1Sum=min([totalTime1Sum,totalTime1]);
|
||||
totalTime2Sum=min([totalTime2Sum,totalTime2]);
|
||||
totalTime0Sum=min([totalTime0Sum,totalTime0]);
|
||||
end
|
||||
JMeasurementSum=JMeasurementSum/N;
|
||||
AME_VoltSum=AME_VoltSum/N;
|
||||
|
|
@ -44,6 +49,10 @@ AME_QDSum=AME_QDSum/N;
|
|||
AME_mVoltSum=AME_mVoltSum/N;
|
||||
AME_mPDSum=AME_mPDSum/N;
|
||||
AME_mQDSum=AME_mQDSum/N;
|
||||
totalTime1Sum=totalTime1Sum/N;
|
||||
totalTime2Sum=totalTime2Sum/N;
|
||||
totalTime0Sum=totalTime0Sum/N;
|
||||
|
||||
totalTime1Sum=totalTime1Sum+timeOfPrepare;
|
||||
totalTime2Sum=totalTime2Sum+timeOfPrepare;
|
||||
totalTime0Sum=totalTime0Sum+timeOfPrepare;
|
||||
% totalTime1Sum=totalTime1Sum/N;
|
||||
% totalTime2Sum=totalTime2Sum/N;
|
||||
% totalTime0Sum=totalTime0Sum/N;
|
||||
Loading…
Reference in New Issue