original.not modified.

This commit is contained in:
facat 2012-05-22 11:33:21 +08:00
commit cb34aec845
83 changed files with 13475 additions and 0 deletions

32
5sj.txt Normal file
View File

@ -0,0 +1,32 @@
5 5 1. 50 .1
1.e-5 2
1 5
0
1 1 2 0.04 0.25 0.25
2 1 3 0.1 0.35 0
3 2 3 0.08 0.30 0.25
0
0
1 2 4 0 0.015 1.05 1 1.06
2 3 5 0 0.03 1.05 1 1.06
0
1 0 0 1.6 0.8
2 0 0 2 1
3 0 0 3.7 1.3
4 5 0 0 0
5 0 0 0 0
0
4 1.05 -3 3
5 1.05 -2.1 5
0
4 1200.6485 200.4335 50.439 1 8
5 1857.201 500.746 200.55 1 8
0
1 1 2 2
2 1 3 0.65
3 2 3 2
4 2 4 6
5 3 5 5
0
0
0

9
AssignXX.m Normal file
View File

@ -0,0 +1,9 @@
function [deltZ,deltL,deltW,deltU,deltX,deltY]=AssignXX(XX)
deltZ=XX(1:14);
deltL=XX(15:28);
deltW=XX(29:42);
deltU=XX(43:56);
deltX=XX(57:70);
deltY=XX(71:80);
end

23
AssignXX1.asv Normal file
View File

@ -0,0 +1,23 @@
function [deltZ,deltL,deltW,deltU,deltX,deltY]=AssignXX1(XX,ContrlCount,RestraintCount,Busnum)
% deltX=XX(1:14);
% deltY=XX(15:24);
% deltZ=XX(25:38);
% deltW=XX(39:52);
% deltL=XX(53:66);
% deltU=XX(67:80);
k1=0;
k2=0;
deltX=XX(1:ContrlCount);
k1=ContrlCount+2*Busnum;
deltY=XX(ContrlCount+1:,k1);
k2=k1;
k1=k2+RestraintCount
deltZ=XX(k2+1,k1);
k2=k1;
k1=k2+RestraintCount;
deltW=XX(k2+1:k1);
k2=k1;
k1=k2+RestraintCount;
deltL=XX(53:66);
deltU=XX(67:80);
end

23
AssignXX1.m Normal file
View File

@ -0,0 +1,23 @@
function [deltZ,deltL,deltW,deltU,deltX,deltY]=AssignXX1(XX,ContrlCount,RestraintCount,Busnum)
% deltX=XX(1:14);
% deltY=XX(15:24);
% deltZ=XX(25:38);
% deltW=XX(39:52);
% deltL=XX(53:66);
% deltU=XX(67:80);
deltX=XX(1:ContrlCount);
k1=ContrlCount+2*Busnum;
deltY=XX(ContrlCount+1:k1);
k2=k1;
k1=k2+RestraintCount;
deltZ=XX(k2+1:k1);
k2=k1;
k1=k2+RestraintCount;
deltW=XX(k2+1:k1);
k2=k1;
k1=k2+RestraintCount;
deltL=XX(k2+1:k1);
k2=k1;
k1=k2+RestraintCount;
deltU=XX(k2+1:k1);
end

13
CalCost.m Normal file
View File

@ -0,0 +1,13 @@
function CalCost(GenC,PG,PGi)
cost=GenC(:,2).*PG(PGi).^2+GenC(:,3).*PG(PGi)+GenC(:,4);
% Org_PG=[5;
% 2.5794];
% book_PG=[5.5056;
% 2.1568];
% cost2=GenC(:,2).*Org_PG(1:2).^2+GenC(:,3).*Org_PG(1:2)+GenC(:,4);
% cost3=GenC(:,2).*book_PG(1:2).^2+GenC(:,3).*book_PG(1:2)+GenC(:,4);
fprintf('%f\n',sum(cost,1));
% fprintf('PF%f\n',sum(cost2,1));
% fprintf('OPF%f\n',sum(cost3,1));
% fprintf('%f\n',sum(cost3,1)-sum(cost,1));
end

6
DrawGap.asv Normal file
View File

@ -0,0 +1,6 @@
function DrawGap(plotGap)
x=find(plotGap);
ts=size(x,2);
end

6
DrawGap.m Normal file
View File

@ -0,0 +1,6 @@
function DrawGap(plotGap)
x=find(plotGap);
ts=size(x,2);
plot(1:ts,plotGap(1:ts));
end

12
FormAA.asv Normal file
View File

@ -0,0 +1,12 @@
function AA=FormAA(L_1Z,deltG,U_1W,Hcoma,deltH)
tOnes=eye(14);
tZeros=zeros(14);
AA=[
tOnes,L_1Z,tZeros,tZeros,tZeros,zeros(14,10);
tZeros,tOnes,tZeros,tZeros,-deltG',zeros(14,10);
tZeros,tZeros,tOnes,U_1W,tZeros,zeros(14,10);
tZeros,tZeros,tZeros,tOnes,deltG,zeros(14,10);
tZeros,tZeros,tZeros,tZeros,Hcoma,deltH;
zeros(10,14),zeros(10,14),zeros(10,14),zeros(10,14),deltH',zeros(10,10);
];
end

12
FormAA.m Normal file
View File

@ -0,0 +1,12 @@
function AA=FormAA(L_1Z,deltG,U_1W,Hcoma,deltH)
tOnes=eye(14);
tZeros=zeros(14);
AA=[
tOnes,L_1Z,tZeros,tZeros,tZeros,zeros(14,10);
tZeros,tOnes,tZeros,tZeros,-deltG',zeros(14,10);
tZeros,tZeros,tOnes,U_1W,tZeros,zeros(14,10);
tZeros,tZeros,tZeros,tOnes,deltG',zeros(14,10);
tZeros,tZeros,tZeros,tZeros,Hcoma,deltH;
zeros(10,14),zeros(10,14),zeros(10,14),zeros(10,14),deltH',zeros(10,10);
];
end

17
FormAA1.m Normal file
View File

@ -0,0 +1,17 @@
function AA=FormAA1(deltG,deltdeltF,ddh,ddg,deltH,Init_L,Init_U,Init_W,Init_Z,Busnum,PVi,PGi,RestraintCount,Balance)
ContrlCount=size(PVi,1)+size(PGi,1)+Busnum*2;
H=-deltdeltF+ddh;%+ddg;
AA=[
H,deltH,deltG,deltG,zeros(ContrlCount,RestraintCount),zeros(ContrlCount,RestraintCount);
deltH',zeros(2*Busnum,2*Busnum),zeros(2*Busnum,RestraintCount),zeros(2*Busnum,RestraintCount),zeros(2*Busnum,RestraintCount),zeros(2*Busnum,RestraintCount);
deltG',zeros(RestraintCount,2*Busnum),zeros(RestraintCount,RestraintCount),zeros(RestraintCount,RestraintCount),-eye(RestraintCount,RestraintCount),zeros(RestraintCount,RestraintCount);
deltG',zeros(RestraintCount,2*Busnum),zeros(RestraintCount),zeros(RestraintCount),zeros(RestraintCount),eye(RestraintCount);
zeros(RestraintCount,ContrlCount),zeros(RestraintCount,2*Busnum),diag(Init_L),zeros(RestraintCount),diag(Init_Z),zeros(RestraintCount);
zeros(RestraintCount,ContrlCount),zeros(RestraintCount,2*Busnum),zeros(RestraintCount),diag(Init_U),zeros(RestraintCount),diag(Init_W);
];
%´¦ÀíÆ½ºâ½Úµã
t=size(PVi,1)+size(PGi,1);
AA(t+2*Balance-1,:)=0;
AA(:,t+2*Balance-1)=0;
AA(t+2*Balance-1,t+2*Balance-1)=1;
end

9
FormAlphaD.m Normal file
View File

@ -0,0 +1,9 @@
function AlphaD=FormAlphaD(Init_Z,deltZ,Init_W,deltW)
tdeltZinx=find(deltZ<0);
tdeltWinx=find(deltW>0);
t1=-Init_Z(tdeltZinx)./deltZ(tdeltZinx)';
t2=-Init_W(tdeltWinx)./deltW(tdeltWinx)';
t3=[t1,t2];
t4=min(t3);
AlphaD=0.9995*min([t4 1]);
end

7
FormAlphaP.asv Normal file
View File

@ -0,0 +1,7 @@
function AlphaP=FormAlphaP(Init_L,deltL,Init_U,deltU)
ti=deltL(delt)
t1=-Init_L./deltL';
t2=-Init_U./deltU';
t3=[t1,t2];
t4=t3()
end

9
FormAlphaP.m Normal file
View File

@ -0,0 +1,9 @@
function AlphaP=FormAlphaP(Init_L,deltL,Init_U,deltU)
tdeltLinx=find(deltL<0);
tdeltUinx=find(deltU<0);
t1=-Init_L(tdeltLinx)./deltL(tdeltLinx)';
t2=-Init_U(tdeltUinx)./deltU(tdeltUinx)';
t3=[t1,t2];
t4=min(t3);
AlphaP=0.9995*min([t4 1]);
end

26
FormG.asv Normal file
View File

@ -0,0 +1,26 @@
function Mat_G=FormG(Volt,PVi,PG,GB,AngleIJMat,indexi,indexj)
t1=PG(PVi);
%GP=t1;%发电机P
GP=[4.5 4.5]';
%%线路
t1=Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
t4=zeros(size(indexi,2),1);
for I=1:size(indexi,2)
t4(I)=Volt(indexi(I))*real(GB(indexi(I),indexj(I)))+t3(indexi(I),indexj(I));%线路
end
LP=t4;
%发电机Q
t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t3=t1.*t2;
t4=sum(t3,2);%发电机Q
GQ=t4;
Mat_G=[
GP;
GQ(PVi);
Volt';
LP;
];
end

20
FormG.m Normal file
View File

@ -0,0 +1,20 @@
function Mat_G=FormG(Volt,PVi,PGi,PG,QG)
%t1=PG(PVi);
%GP=t1;%P
%GP=[4.5 4.5]';
%%线
%Q
% t1=Volt'*Volt;
% t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
% t3=t1.*t2;
% t4=sum(t3,2);%Q
%GQ=t4;
Mat_G=[
%GP;
PG(PGi);
QG(PVi);
%GQ(PVi);
%[0 1.45]';
Volt';
];
end

24
FormH.asv Normal file
View File

@ -0,0 +1,24 @@
function Mat_H=FormH(Busnum,GB,AngleIJMat,Volt,PG,PD,QG,QD,Y)
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=Volt'*Volt;
t3=t1.*t2;
t4=sum(-t3,2);%P
t5=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t6=t2.*t5;
t7=sum(-t6,2);%Q
t8=PG-PD;
t9=QG-QD;
%Mat_H=([(PG-PD)',(QG-QD)'])'+([t4',t7'])';
Mat_H(1:2:2*Busnum)=t8(1:Busnum)+t4(1:Busnum);
Mat_H(2:2:2*Busnum)=t9(1:Busnum)+t7(1:Busnum);
Mat_H=Mat_H';
%%%%一下是学姐给的公式
AngleIJ=AngleIJMat-angle(GB);
%dP=PG-PD-diag(Volt)*Y*cos(AngleIJ)*Volt';
dP=PG-PD-diag(Volt)*Y.*cos(AngleIJ)*Volt';
dQ=QG-QD-diag(Volt)*Y.*sin(AngleIJ)*Volt';
%Mat_H(1:2:2*Busnum)=dP(1:Busnum);暂时改一下 20111227
%Mat_H(2:2:2*Busnum)=dQ(1:Busnum);暂时改一下 20111227
Mat_H=[]'
end

24
FormH.m Normal file
View File

@ -0,0 +1,24 @@
function Mat_H=FormH(Busnum,GB,AngleIJMat,Volt,PG,PD,QG,QD,Y)
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=Volt'*Volt;
t3=t1.*t2;
t4=sum(-t3,2);%P
t5=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t6=t2.*t5;
t7=sum(-t6,2);%Q
t8=PG-PD;
t9=QG-QD;
%Mat_H=([(PG-PD)',(QG-QD)'])'+([t4',t7'])';
Mat_H(1:2:2*Busnum)=t8(1:Busnum)+t4(1:Busnum);
Mat_H(2:2:2*Busnum)=t9(1:Busnum)+t7(1:Busnum);
Mat_H=Mat_H';
%%%%
AngleIJ=AngleIJMat-angle(GB);
%dP=PG-PD-diag(Volt)*Y*cos(AngleIJ)*Volt';
dP=PG-PD-diag(Volt)*Y.*cos(AngleIJ)*Volt';
dQ=QG-QD-diag(Volt)*Y.*sin(AngleIJ)*Volt';
%Mat_H(1:2:2*Busnum)=dP(1:Busnum); 20111227
%Mat_H(2:2:2*Busnum)=dQ(1:Busnum); 20111227
Mat_H=[dP;dQ;];
end

8
FormLw.asv Normal file
View File

@ -0,0 +1,8 @@
function FormLw(Mat_G,Init_L,GenU,LinePLimt)
PL=GenU(:,1);%发电机有功下界
QL=GenU(:,2);%发电机无功下界
VoltL=0.8*ones(1,5);
t1=([PL',QL',VoltL,LinePLimt'])';
t2=Mat_G-Init_L'-t1;
Lz=t2;
end

10
FormLw.m Normal file
View File

@ -0,0 +1,10 @@
function Lw=FormLw(Mat_G,Init_U,GenU,Busnum,PVQU)
PU=GenU(:,2);%
QU=PVQU(:,1);%
VoltU=1.1*ones(1,Busnum);
t1=([PU',QU',VoltU])';
t2=Mat_G+Init_U'-t1;
Lw=t2;
end

4
FormLx.m Normal file
View File

@ -0,0 +1,4 @@
function Lx=FormLx(deltF,deltH,Init_Y,deltG,Init_Z,Init_W)
t1=deltF-deltH*Init_Y'-deltG*(Init_Z'+Init_W');
Lx=t1;
end

11
FormLxComa.m Normal file
View File

@ -0,0 +1,11 @@
function LxComa=FormLxComa(deltF,deltG,deltH,Init_L,Luu,Lul,Init_Z,Init_Y,Lz,Init_U,Init_W,Lw,Lx)
%t1=deltG*(Init_Z'+Init_W');%%
t2=Lul+diag(Init_Z)*Lz;
t3=inv(diag(Init_L));
t4=t3*t2;%
t5=Luu-diag(Init_W)*Lw;
t6=inv(diag(Init_U));
t7=t6*t5;%
t8=deltG*(t4+t7);%%
LxComa=Lx+t8;
end

10
FormLz.asv Normal file
View File

@ -0,0 +1,10 @@
function Lz=FormLz(Mat_G,Init_L,GenL,LinePLimt,LineCount,Busnum,PVQL)
PL=GenL(:,2);%发电机有功下界
QL=PVQL(:,1);%发电机无功下界
VoltL=0.9*ones(1,Busnum);
t1=([PL',QL',VoltL])';
t2=Mat_G-Init_L'-t1;
Lz=t2;
end

10
FormLz.m Normal file
View File

@ -0,0 +1,10 @@
function Lz=FormLz(Mat_G,Init_L,GenL,Busnum,PVQL)
PL=GenL(:,2);%
QL=PVQL(:,1);%
VoltL=0.9*ones(1,Busnum);
t1=([PL',QL',VoltL])';
t2=Mat_G-Init_L'-t1;
Lz=t2;
end

5
FormYY.asv Normal file
View File

@ -0,0 +1,5 @@
function FormYY(Init_L,Lul.Lz,Init_U,Luu,Lw,Lz,LxComa)
t=[
-
]
end

11
FormYY.m Normal file
View File

@ -0,0 +1,11 @@
function YY=FormYY(Init_L,Lul,Lz,Ly,Init_U,Luu,Lw,LxComa)
t=[
-inv(diag(Init_L))*Lul;
Lz;
-inv(diag(Init_U))*Luu;
-Lw;
LxComa;
-Ly;
];
YY=t;
end

10
FormYY1.m Normal file
View File

@ -0,0 +1,10 @@
function YY=FormYY1(Lul,Lz,Ly,Luu,Lw,Lx)
YY=[
Lx;
-Ly;
-Lz;
-Lw;
-Lul;
-Luu;
];
end

3515
IEEE1047.dat Normal file

File diff suppressed because it is too large Load Diff

3516
IEEE10471.dat Normal file

File diff suppressed because it is too large Load Diff

398
IEEE118.dat Normal file
View File

@ -0,0 +1,398 @@
118 179 100 28 0.1
1.e-5 2
1 69
0
1 1 2 0.0303 0.0999 0.0127
2 1 3 0.0129 0.0424 0.00541
3 4 5 0.00176 0.00798 0.00105
4 3 5 0.0241 0.1080 0.0142
5 5 6 0.0119 0.0540 0.00713
6 6 7 0.00459 0.0208 0.00275
7 8 9 0.00244 0.0305 0.5810
9 9 10 0.00258 0.0322 0.6150
10 4 11 0.0209 0.0688 0.00874
11 5 11 0.0203 0.0682 0.00869
12 11 12 0.00595 0.0196 0.00251
13 2 12 0.0187 0.0616 0.00786
14 3 12 0.0484 0.1600 0.0203
15 7 12 0.00862 0.0340 0.00437
16 11 13 0.02225 0.0731 0.00938
17 12 14 0.0215 0.0707 0.00908
18 13 15 0.0744 0.2444 0.03134
19 14 15 0.0595 0.1950 0.0251
20 12 16 0.0212 0.0834 0.0107
21 15 17 0.0132 0.0437 0.0222
22 16 17 0.0454 0.1801 0.0233
23 17 18 0.0123 0.0505 0.00649
24 18 19 0.01119 0.0493 0.00571
25 19 20 0.0252 0.1170 0.0149
26 15 19 0.0120 0.0394 0.00505
27 20 21 0.0183 0.0849 0.0108
28 21 22 0.0209 0.0970 0.0123
29 22 23 0.0342 0.1590 0.0202
30 23 24 0.0135 0.0492 0.0249
31 23 25 0.0156 0.0800 0.0432
33 25 27 0.0318 0.1630 0.0882
34 27 28 0.01913 0.0855 0.0108
35 28 29 0.0237 0.0943 0.0119
37 8 30 0.00431 0.0504 0.2570
38 26 30 0.00799 0.0860 0.4540
39 17 31 0.0474 0.1563 0.01995
40 29 31 0.0108 0.0331 0.00415
41 23 32 0.0317 0.1153 0.05865
42 31 32 0.0298 0.0985 0.01255
43 27 32 0.0229 0.0755 0.00963
44 15 33 0.0380 0.1244 0.01597
45 19 34 0.0752 0.2470 0.0316
46 35 36 0.00224 0.0102 0.00124
47 35 37 0.0110 0.0497 0.00659
48 33 37 0.0415 0.1420 0.0183
49 34 36 0.00871 0.0268 0.00284
50 34 37 0.00256 0.0094 0.00429
52 37 39 0.0321 0.1060 0.0135
53 37 40 0.0593 0.1680 0.0210
54 30 38 0.00464 0.0540 0.2110
55 39 40 0.0184 0.0605 0.00776
56 40 41 0.0145 0.0487 0.00611
57 40 42 0.0555 0.1830 0.0233
58 41 42 0.0410 0.1350 0.0172
59 43 44 0.0608 0.2454 0.03034
60 34 43 0.0413 0.1681 0.02113
61 44 45 0.0224 0.0901 0.0112
62 45 46 0.0400 0.1356 0.0166
63 46 47 0.0380 0.1270 0.0158
64 46 48 0.0601 0.1890 0.0236
65 47 49 0.0191 0.0625 0.00802
66 42 49 0.03575 0.1615 0.0860
67 45 49 0.0684 0.1860 0.0222
68 48 49 0.0179 0.0505 0.00629
69 49 50 0.0267 0.0752 0.00937
70 49 51 0.0486 0.1370 0.0171
71 51 52 0.0203 0.0588 0.00698
72 52 53 0.0405 0.1635 0.02029
73 53 54 0.0263 0.1220 0.0155
74 49 54 0.03976 0.1450 0.0734
75 54 55 0.0169 0.0707 0.0101
76 54 56 0.00275 0.00955 0.00366
77 55 56 0.00488 0.0151 0.00187
78 56 57 0.0343 0.0966 0.0121
79 50 57 0.0474 0.1340 0.0166
80 56 58 0.0343 0.0966 0.0121
81 51 58 0.0255 0.0719 0.00894
82 54 59 0.0503 0.2293 0.0299
83 56 59 0.04069 0.12243 0.05525
84 55 59 0.04739 0.2158 0.02823
85 59 60 0.0317 0.1450 0.0188
86 59 61 0.0328 0.1500 0.0194
87 60 61 0.00264 0.0135 0.00728
88 60 62 0.0123 0.0561 0.00734
89 61 62 0.00824 0.0376 0.0049
91 63 64 0.00172 0.0200 0.1080
93 38 65 0.00901 0.0986 0.5230
94 64 65 0.00269 0.0302 0.1900
95 49 66 0.0090 0.04595 0.0248
96 62 66 0.0482 0.2180 0.0289
97 62 67 0.0258 0.1170 0.0155
99 66 67 0.0224 0.1015 0.01341
100 65 68 0.00138 0.0160 0.3190
101 47 69 0.0844 0.2778 0.03546
102 49 69 0.0985 0.3240 0.0414
104 69 70 0.0300 0.1270 0.0610
105 24 70 0.10221 0.4115 0.05099
106 70 71 0.00882 0.0355 0.00439
107 24 72 0.0488 0.1960 0.0244
108 71 72 0.0446 0.1800 0.02222
109 71 73 0.00866 0.0454 0.00589
110 70 74 0.0401 0.1323 0.01684
111 70 75 0.0428 0.1410 0.0180
112 69 75 0.0405 0.1220 0.0620
113 74 75 0.0123 0.0406 0.00517
114 76 77 0.0444 0.1480 0.0184
115 69 77 0.0309 0.1010 0.0519
116 75 77 0.0601 0.1999 0.02489
117 77 78 0.00376 0.0124 0.00632
118 78 79 0.00546 0.0244 0.00324
119 77 80 0.01077 0.03318 0.0350
120 79 80 0.0156 0.0704 0.00945
121 68 81 0.00175 0.0202 0.4040
123 77 82 0.0298 0.0853 0.04087
124 82 83 0.0112 0.03665 0.01898
125 83 84 0.0625 0.1320 0.0129
126 83 85 0.0430 0.1480 0.0174
127 84 85 0.0302 0.0641 0.00617
128 85 86 0.0350 0.1230 0.0138
129 86 87 0.02828 0.2074 0.02225
130 85 88 0.0200 0.1020 0.0138
131 85 89 0.0239 0.1730 0.0235
132 88 89 0.0139 0.0712 0.00969
133 89 90 0.01631 0.06515 0.0794
134 90 91 0.0254 0.0836 0.0107
135 89 92 0.00791 0.03827 0.0481
136 91 92 0.0387 0.1272 0.01634
137 92 93 0.0258 0.0848 0.0109
138 92 94 0.0481 0.1580 0.0203
139 93 94 0.0223 0.0732 0.00938
140 94 95 0.0132 0.0434 0.00555
141 80 96 0.0356 0.1820 0.0247
142 82 96 0.0162 0.0530 0.0272
143 94 96 0.0269 0.0869 0.0115
144 80 97 0.0183 0.0934 0.0127
145 80 98 0.0238 0.1080 0.0143
146 80 99 0.0454 0.2060 0.0273
148 94 100 0.0178 0.0580 0.0302
149 95 96 0.0171 0.0547 0.00737
150 96 97 0.0173 0.0885 0.0120
151 98 100 0.0397 0.1790 0.0238
152 99 100 0.0180 0.0813 0.0108
153 100 101 0.0277 0.1262 0.0164
154 92 102 0.0123 0.0559 0.00732
155 101 102 0.0246 0.1120 0.0147
156 100 103 0.0160 0.0525 0.0268
157 100 104 0.0451 0.2040 0.02705
158 103 104 0.0466 0.1584 0.02035
159 103 105 0.0535 0.1625 0.0204
160 100 106 0.0605 0.2290 0.0310
161 104 105 0.00994 0.0378 0.00493
162 105 106 0.0140 0.0547 0.00717
163 105 107 0.0530 0.1830 0.0236
164 105 108 0.0261 0.0703 0.09222
166 108 109 0.0105 0.0288 0.0038
167 103 110 0.03906 0.1813 0.02305
168 109 110 0.0278 0.0762 0.0101
169 110 111 0.0220 0.0755 0.0100
170 110 112 0.0247 0.0640 0.0310
171 17 113 0.00913 0.0301 0.00384
172 32 113 0.0615 0.2030 0.0259
173 32 114 0.0135 0.0612 0.00814
174 27 115 0.0164 0.0741 0.00986
175 114 115 0.0023 0.0104 0.00138
176 68 116 0.00034 0.00405 0.0820
177 12 117 0.0329 0.1400 0.0179
178 75 118 0.01450 0.04810 0.00599
179 76 118 0.0164 0.0544 0.00678
0
5 -0.4
17 0.
34 .14
37 -0.25
44 .1
45 .1
46 .1
48 .15
74 .12
79 .2
82 .2
83 .1
105 .2
107 .06
110 .06
0
1 8 5 0.0 0.0267 0.9850 0.9 1.1
2 25 26 0.0 0.0382 0.9600 0.9 1.1
3 17 30 0.0 0.0388 0.9600 0.9 1.1
4 37 38 0.0 0.0375 0.9350 0.9 1.1
5 59 63 0.0 0.0386 0.9600 0.9 1.1
6 61 64 0.0 0.0268 0.9850 0.9 1.1
7 65 66 0.0 0.0370 0.9350 0.9 1.1
8 68 69 0.0 0.0370 0.9350 0.9 1.1
9 80 81 0.0 0.0370 0.9350 0.9 1.1
10 92 100 0.0648 0.2950 1. 0.9 1.1
11 106 107 0.0530 0.1830 1. 0.9 1.1
0
1 0. 0. 51. 27.
2 0. 0. 20. 9.
3 0. 0. 39. 10.
4 -9. 0. 30. 12.
5 0. 0. 0. 0.
6 0. 0. 52. 22.
7 0. 0. 19. 2.
8 -28. 0. 0. 0.
9 0. 0. 0. 0.
10 450. 0. 0. 0.
11 0. 0. 70. 23.
12 85. 0. 47. 10.
13 0. 0. 34. 16.
14 0. 0. 14. 1.
15 0. 0. 90. 30.
16 0. 0. 25. 10.
17 0. 0. 11. 3.
18 0. 0. 60. 34.
19 0. 0. 45. 25.
20 0. 0. 18. 3.
21 0. 0. 14. 8.
22 0. 0. 10. 5.
23 0. 0. 7. 3.
24 -13. 0. 0. 0.
25 220. 0. 0. 0.
26 314. 0. 0. 0.
27 -9. 0. 62. 13.
28 0. 0. 17. 7.
29 0. 0. 24. 4.
30 0. 0. 0. 0.
31 7. 0. 43. 27.
32 0. 0. 59. 23.
33 0. 0. 23. 9.
34 0. 0. 59. 26.
35 0. 0. 33. 9.
36 0. 0. 31. 17.
37 0. 0. 0. 0.
38 0. 0. 0. 0.
39 0. 0. 27. 11.
40 -46. 0. 20. 23.
41 0. 0. 37. 10.
42 -59. 0. 37. 23.
43 0. 0. 18. 7.
44 0. 0. 16. 8.
45 0. 0. 53. 22.
46 19. 0. 28. 10.
47 0. 0. 34. 0.
48 0. 0. 20. 11.
49 204. 0. 87. 30.
50 0. 0. 17. 4.
51 0. 0. 17. 8.
52 0. 0. 18. 5.
53 0. 0. 23. 11.
54 48. 0. 113. 32.
55 0. 0. 63. 22.
56 0. 0. 84. 18.
57 0. 0. 12. 3.
58 0. 0. 12. 3.
59 155. 0. 277. 113.
60 0. 0. 78. 3.
61 160. 0. 0. 0.
62 0. 0. 77. 14.
63 0. 0. 0. 0.
64 0. 0. 0. 0.
65 391. 0. 0. 0.
66 392. 0. 39. 18.
67 0. 0. 28. 7.
68 0. 0. 0. 0.
69 516.4 0. 0. 0.
70 0. 0. 66. 20.
71 0. 0. 0. 0.
72 -12. 0. 0. 0.
73 -6. 0. 0. 0.
74 0. 0. 68. 27.
75 0. 0. 47. 11.
76 0. 0. 68. 36.
77 0. 0. 61. 28.
78 0. 0. 71. 26.
79 0. 0. 39. 32.
80 477. 0. 130. 26.
81 0. 0. 0. 0.
82 0. 0. 54. 27.
83 0. 0. 20. 10.
84 0. 0. 11. 7.
85 0. 0. 24. 15.
86 0. 0. 21. 10.
87 4. 0. 0. 0.
88 0. 0. 48. 10.
89 607. 0. 0. 0.
90 -85. 0. 78. 42.
91 -10. 0. 0. 0.
92 0. 0. 65. 10.
93 0. 0. 12. 7.
94 0. 0. 30. 16.
95 0. 0. 42. 31.
96 0. 0. 38. 15.
97 0. 0. 15. 9.
98 0. 0. 34. 8.
99 -42. 0. 0. 0.
100 252. 0. 37. 18.
101 0. 0. 22. 15.
102 0. 0. 5. 3.
103 40. 0. 23. 16.
104 0. 0. 38. 25.
105 0. 0. 31. 26.
106 0. 0. 43. 16.
107 -22. 0. 28. 12.
108 0. 0. 2. 1.
109 0. 0. 8. 3.
110 0. 0. 39. 30.
111 36. 0. 0. 0.
112 -43. 0. 25. 13.
113 -6. 0. 0. 0.
114 0. 0. 8. 3.
115 0. 0. 22. 7.
116 -184. 0. 0. 0.
117 0. 0. 20. 8.
118 0. 0. 33. 15.
0
1 .955 -5. 15.
4 .998 -300. 300.
6 .99 -13. 50.
8 1.015 -300. 300.
10 1.05 -147. 200.
12 .99 -35. 120.
15 .97 -10. 30.
18 .973 -16. 50.
19 .963 -8. 24.
24 .992 -300. 300.
25 1.05 -47. 140.
26 1.015 -1000. 1000.
27 .968 -300. 300.
31 .967 -300. 300.
32 .964 -14. 42.
34 .984 -8. 24.
36 .98 -8. 24.
40 .97 -300. 300.
42 .985 -300. 300.
46 1.005 -100. 100.
49 1.025 -85. 210.
54 .955 -300. 300.
55 .952 -8. 23.
56 .954 -8. 15.
59 .985 -60. 180.
61 .995 -100. 300.
62 .998 -20. 20.
65 1.005 -67. 200.
66 1.05 -67. 200.
69 1.035 -300. 300.
70 .984 -10. 32.
72 .98 -100. 100.
73 .991 -100. 100.
74 .958 -6. 9.
76 .943 -8. 23.
77 1.006 -20. 70.
80 1.04 -165. 280.
85 .985 -8. 23.
87 1.015 -100. 1000.
89 1.005 -210. 300.
90 .985 -300. 300.
91 .98 -100. 100.
92 .993 -3. 9.
99 1.01 -100. 100.
100 1.017 -50. 155.
103 1.001 -15. 40.
104 .971 -8. 23.
105 .965 -8. 23.
107 .952 -200. 200.
110 .973 -8. 23.
111 .98 -100. 1000.
112 .975 -100. 1000.
113 .993 -100. 200.
116 1.005 -1000. 1000.
0
10 0. 1.25 1. 100. 600.
12 0. 2.6 1.2 60. 200.
25 0. 1.5 1. 50. 300.
26 0. 1.5 1. 100. 400.
49 0. 2.1 1. 100. 400.
54 0. 2.0 1.4 20. 300.
59 0. 1.6 1. 50. 350.
61 0. 1.5 1. 50. 400.
65 0. 1.5 1. 100. 500.
66 0. 1.5 1. 100. 500.
69 0. 1.0 1. 100. 800.
80 0. 1.23 1. 100. 600.
89 0. 1.2 1. 100. 800.
100 0. 1.6 1. 100. 400.
103 0. 2.5 1.2 20. 200.
111 0. 2.4 1.1 10. 200.
0
0
0
1 100 92 -25. 25.
2 106 107 -18. 18.
0
0

58
IEEE14.dat Normal file
View File

@ -0,0 +1,58 @@
14 20 100. 20 0.1
1.e-5 2
1 1
0
1 1 2 0.01938 0.05917 0.0264
2 1 5 0.05403 0.22304 0.0246
3 2 3 0.04699 0.19797 0.0219
4 2 4 0.05811 0.17632 0.0187
5 2 5 0.05695 0.17388 0.0170
6 3 4 0.06701 0.17103 0.0173
7 4 5 0.01335 0.04211 0.0064
11 6 11 0.09498 0.19890 0.0
12 6 12 0.12291 0.15581 0.0
13 6 13 0.06615 0.13027 0.0
14 7 8 0.0 0.17615 0.0
15 7 9 0.0 0.11001 0.0
16 9 10 0.03181 0.08450 0.0
19 12 13 0.22092 0.19988 0.0
20 13 14 0.17038 0.34802 0.0
4 9 14 0.12711 0.27038 0.0
5 10 11 0.08205 0.19207 0.0
0
9 0.19
0
1 4 7 0.0 0.20912 0.978 0.9 1.1
2 4 9 0.0 0.55618 0.969 0.9 1.1
3 5 6 0.0 0.25202 0.932 0.9 1.1
0
1 60. 0. 0. 0.
2 40. 42.4 21.7 12.7
3 0. 23.39 94.2 19.0
4 0. 0. 47.8 -3.9
5 0. 0. 7.6 1.6
6 0. 12.24 11.2 7.5
7 0. 0. 0. 0.
8 0. 17.36 0. 0.
9 0. 0. 29.5 16.6
10 0. 0. 9. 5.8
11 0. 0. 3.5 1.8
12 0. 0. 6.1 1.6
13 0. 0. 13.5 5.8
14 0. 0. 14.9 5.
0
1 1.060 -40. 50.
2 1.045 -40. 50.
3 1.010 0. 40.
6 1.070 -30. 40.
8 1.090 -30. 45.
0
1 105. 2.45 0.005 50. 200.
2 44.4 3.51 0.005 20. 100.
6 40.6 3.89 0.005 20. 100.
0
0

96
IEEE30.dat Normal file
View File

@ -0,0 +1,96 @@
30 41 100.0 28 0.1
1.e-5 2
1 1
0
1 1 2 0.0192 0.0575 0.0264
2 1 3 0.0452 0.1852 0.0204
3 2 4 0.0570 0.1737 0.0184
4 3 4 0.0132 0.0379 0.0042
5 2 5 0.0472 0.1983 0.0209
6 2 6 0.0581 0.1763 0.0187
7 4 6 0.0119 0.0414 0.0045
8 5 7 0.0460 0.1160 0.0102
9 6 7 0.0267 0.0820 0.0085
10 6 8 0.0120 0.0420 0.0045
13 9 11 0.0 0.2080 0.0
15 12 13 0.0 0.1400 0.0
16 12 14 0.1231 0.2559 0.0
17 12 15 0.0662 0.1304 0.0
18 12 16 0.945 0.1987 0.0
19 14 15 0.2210 0.1997 0.0
20 16 17 0.0824 0.1923 0.0
21 15 18 0.1070 0.2185 0.0
22 18 19 0.0639 0.1292 0.0
23 19 20 0.0340 0.0680 0.0
24 10 20 0.0936 0.2090 0.0
25 10 17 0.0324 0.0845 0.0
26 10 21 0.0348 0.0749 0.0
27 10 22 0.0727 0.1499 0.0
28 21 22 0.0116 0.0236 0.0
29 15 23 0.1000 0.2020 0.0
30 22 24 0.1150 0.1790 0.0
31 23 24 0.1320 0.2700 0.0
32 24 25 0.1885 0.3292 0.0
33 25 26 0.2554 0.3800 0.0
34 25 27 0.1093 0.2087 0.0
36 27 29 0.2198 0.4153 0.0
37 27 30 0.3202 0.6027 0.0
38 29 30 0.2399 0.4533 0.0
39 8 28 0.0636 0.2000 0.0214
40 6 28 0.0169 0.0599 0.0065
41 9 10 0.0 0.1100 0.0
0
10 0.19
24 0.043
0
1 9 6 0.0 0.2080 0.978 0.9 1.1
2 6 10 0.0 0.5560 0.969 0.9 1.1
3 12 4 0.0 0.2560 0.932 0.9 1.1
4 28 27 0.0 0.3960 0.968 0.9 1.1
0
1 20. 0. 0. 0.
2 57.56 2.43 21.7 12.7
3 0. 0. 2.4 1.2
4 0. 0. 7.6 1.6
5 24.56 22.25 94.2 19.
6 0. 0. 0. 0.
7 0. 0. 22.8 10.9
8 35 37.27 30. 30.
9 0. 0. 0. 0.
10 0. 0. 5.8 2.
11 17.93 17.61 0. 0.
12 0. 0. 11.2 7.5
13 16.91 24.69 0. 0.
14 0. 0. 6.2 1.6
15 0. 0. 8.2 2.5
16 0. 0. 3.5 1.8
17 0. 0. 9. 5.8
18 0. 0. 3.2 .9
19 0. 0. 9.5 3.4
20 0. 0. 2.2 .7
21 0. 0. 17.5 11.2
22 0. 0. 0. 0.
23 0. 0. 3.2 1.6
24 0. 0. 8.7 6.7
25 0. 0. 0. 0.
26 0. 0. 3.5 2.3
27 0. 0. 0. 0.
28 0. 0. 0. 0.
29 0. 0. 2.4 .9
30 0. 0. 10.6 1.9
0
1 1.060 -50 50.
2 1.045 -40. 60.
5 1.010 -40. 40.
8 1.010 -10. 40.
11 1.082 -6. 24.
13 1.071 -6. 24.
0
1 10. 2.0 2.0 10. 60.
2 10. 1.5 2.4 10. 60.
5 20. 1.8 0.8 10. 150.
8 10. 1.0 1.2 10. 120.
11 20. 1.8 0.8 10. 150.
13 10. 1.5 2.0 10. 60.
0
0

824
IEEE300.dat Normal file
View File

@ -0,0 +1,824 @@
300 409 100. 28 0.1
1.e-5 4
1 38
0
1 269 291 0.00080 0.00348 0.00000
2 226 271 0.05558 0.24666 0.00000
3 226 300 0.05559 0.24666 0.00000
4 227 225 0.03811 0.21648 0.00000
5 225 228 0.05370 0.07026 0.00000
6 228 229 1.10680 0.95278 0.00000
7 271 300 0.05580 0.24666 0.00000
8 300 144 0.07378 0.06352 0.00000
9 144 270 0.03832 0.02894 0.00000
10 227 68 0.23552 0.99036 0.00000
11 146 147 0.00100 0.00600 0.00000
12 230 71 0.00100 0.00900 0.00000
13 230 148 0.00600 0.02700 0.05400
14 292 272 0.00000 0.00300 0.00000
15 292 150 0.00800 0.06900 0.13900
16 292 104 0.00100 0.00700 0.00000
17 70 149 0.00200 0.01900 1.12700
18 147 72 0.00600 0.02900 0.01800
19 272 231 0.00100 0.00900 0.07000
20 272 98 0.00100 0.00700 0.01400
21 148 273 0.01300 0.05950 0.03300
22 148 75 0.01300 0.04200 0.08100
23 72 273 0.00600 0.02700 0.01300
24 273 74 0.00800 0.03400 0.01800
25 231 233 0.00200 0.01500 0.11800
26 74 232 0.00600 0.03400 0.01600
27 75 286 0.01400 0.04200 0.09700
28 286 297 0.06500 0.24800 0.12100
29 286 165 0.09900 0.24800 0.03500
30 286 166 0.09600 0.36300 0.04800
31 149 274 0.00200 0.02200 1.28000
32 150 233 0.00200 0.01800 0.03600
33 150 163 0.01300 0.08000 0.15100
34 232 77 0.01600 0.03300 0.01500
35 232 79 0.06900 0.18600 0.09800
36 233 235 0.00400 0.03400 0.28000
37 77 234 0.05200 0.11100 0.05000
38 234 78 0.01900 0.03900 0.01800
39 235 14 0.00700 0.06800 0.13400
40 78 151 0.03600 0.07100 0.03400
41 151 79 0.04500 0.12000 0.06500
42 151 15 0.04300 0.13000 0.01400
43 236 80 0.00000 0.06300 0.00000
44 236 238 0.00250 0.01200 0.01300
45 236 152 0.00600 0.02900 0.02000
46 236 287 0.00700 0.04300 0.02600
47 80 274 0.00100 0.00800 0.04200
48 237 245 0.01200 0.06000 0.00800
49 237 161 0.00600 0.01400 0.00200
50 237 293 0.01000 0.02900 0.00300
51 81 164 0.00400 0.02700 0.04300
52 297 238 0.00800 0.04700 0.00800
53 297 152 0.02200 0.06400 0.00700
54 297 287 0.01000 0.03600 0.02000
55 297 241 0.01700 0.08100 0.04800
56 297 165 0.10200 0.25400 0.03300
57 297 166 0.04700 0.12700 0.01600
58 238 287 0.00800 0.03700 0.02000
59 238 239 0.03200 0.08700 0.04000
60 82 274 0.00060 0.00640 0.40400
61 152 155 0.02600 0.15400 0.02200
62 287 274 0.00000 0.02900 0.00000
63 287 241 0.06500 0.19100 0.02000
64 287 156 0.03100 0.08900 0.03600
65 274 153 0.00200 0.01400 0.80600
66 239 275 0.02600 0.07200 0.03500
67 239 155 0.09500 0.26200 0.03200
68 239 84 0.01300 0.03900 0.01600
69 275 154 0.02700 0.08400 0.03900
70 275 157 0.02800 0.08400 0.03700
71 240 87 0.00700 0.04100 0.31200
72 240 246 0.00900 0.05400 0.41100
73 153 248 0.00500 0.04200 0.69000
74 154 277 0.05200 0.14500 0.07300
75 154 94 0.04300 0.11800 0.01300
76 155 173 0.02500 0.06200 0.00700
77 241 156 0.03100 0.09400 0.04300
78 156 83 0.03700 0.10900 0.04900
79 83 242 0.02700 0.08000 0.03600
80 84 157 0.02500 0.07300 0.03500
81 157 242 0.03500 0.10300 0.04700
82 242 243 0.06500 0.16900 0.08200
83 243 85 0.04600 0.08000 0.03600
84 243 159 0.15900 0.53700 0.07100
85 85 86 0.00900 0.02600 0.00500
86 86 158 0.00200 0.01300 0.01500
87 87 276 0.00900 0.06500 0.48500
88 276 88 0.01600 0.10500 0.20300
89 276 101 0.00100 0.00700 0.01300
90 159 19 0.02650 0.17200 0.02600
91 160 298 0.05100 0.23200 0.02800
92 160 247 0.05100 0.15700 0.02300
93 89 244 0.03200 0.10000 0.06200
94 89 20 0.02000 0.12340 0.02800
95 244 245 0.03600 0.13100 0.06800
96 244 277 0.03400 0.09900 0.04700
97 245 293 0.01800 0.08700 0.01100
98 245 21 0.02560 0.19300 0.00000
99 277 161 0.02100 0.05700 0.03000
100 277 247 0.01800 0.05200 0.01800
101 246 164 0.00400 0.02700 0.05000
102 246 23 0.02860 0.20130 0.37900
103 161 293 0.01600 0.04300 0.00400
104 293 162 0.00100 0.00600 0.00700
105 293 90 0.01400 0.07000 0.03800
106 293 22 0.08910 0.26760 0.02900
107 293 24 0.07820 0.21270 0.02200
108 162 247 0.00600 0.02200 0.01100
109 162 1 0.00000 0.03600 0.00000
110 247 298 0.09900 0.37500 0.05100
111 90 298 0.02200 0.10700 0.05800
112 248 205 0.00350 0.03300 0.53000
113 248 206 0.00350 0.03300 0.53000
114 91 249 0.00800 0.06400 0.12800
115 249 163 0.01200 0.09300 0.18300
116 249 17 0.00600 0.04800 0.09200
117 165 167 0.04700 0.11900 0.01400
118 166 168 0.03200 0.17400 0.02400
119 167 169 0.10000 0.25300 0.03100
120 167 278 0.02200 0.07700 0.03900
121 168 171 0.01900 0.14400 0.01700
122 168 250 0.01700 0.09200 0.01200
123 169 278 0.27800 0.42700 0.04300
124 278 170 0.02200 0.05300 0.00700
125 278 280 0.03800 0.09200 0.01200
126 278 171 0.04800 0.12200 0.01500
127 92 170 0.02400 0.06400 0.00700
128 92 280 0.03400 0.12100 0.01500
129 279 173 0.05300 0.13500 0.01700
130 279 174 0.00200 0.00400 0.00200
131 279 251 0.04500 0.35400 0.04400
132 279 252 0.05000 0.17400 0.02200
133 170 280 0.01600 0.03800 0.00400
134 280 172 0.04300 0.06400 0.02700
135 171 250 0.01900 0.06200 0.00800
136 172 174 0.07600 0.13000 0.04400
137 172 16 0.04400 0.12400 0.01500
138 250 173 0.01200 0.08800 0.01100
139 250 252 0.15700 0.40000 0.04700
140 174 18 0.07400 0.20800 0.02600
141 251 252 0.07000 0.18400 0.02100
142 251 94 0.10000 0.27400 0.03100
143 251 175 0.10900 0.39300 0.03600
144 252 93 0.14200 0.40400 0.05000
145 93 175 0.01700 0.04200 0.00600
146 95 256 0.00360 0.01990 0.00400
147 96 255 0.00200 0.10490 0.00100
148 97 253 0.00010 0.00180 0.01700
149 253 254 0.00000 0.02710 0.00000
150 253 142 0.00000 0.61630 0.00000
151 142 255 0.00000 -0.36970 0.00000
152 253 176 0.00220 0.29150 0.00000
153 254 255 0.00000 0.03390 0.00000
154 254 176 0.00000 0.05820 0.00000
155 256 177 0.08080 0.23440 0.02900
156 256 179 0.09650 0.36690 0.05400
157 177 178 0.03600 0.10760 0.11700
158 177 179 0.04760 0.14140 0.14900
159 179 294 0.00060 0.01970 0.00000
160 294 257 0.00590 0.04050 0.25000
161 294 181 0.01150 0.11060 0.18500
162 294 182 0.01980 0.16880 0.32100
163 294 191 0.00500 0.05000 0.33000
164 294 192 0.00770 0.05380 0.33500
165 294 196 0.01650 0.11570 0.17100
166 257 180 0.00590 0.05770 0.09500
167 257 183 0.00490 0.03360 0.20800
168 257 195 0.00590 0.05770 0.09500
169 180 299 0.00780 0.07730 0.12600
170 180 288 0.00260 0.01930 0.03000
171 181 299 0.00760 0.07520 0.12200
172 181 288 0.00210 0.01860 0.03000
173 299 182 0.00160 0.01640 0.02600
174 299 105 0.00170 0.01650 0.02600
175 299 115 0.00790 0.07930 0.12700
176 299 195 0.00780 0.07840 0.12500
177 288 295 0.00170 0.01170 0.28900
178 288 195 0.00260 0.01930 0.03000
179 288 196 0.00210 0.01860 0.03000
180 288 2 0.00020 0.01010 0.00000
181 183 99 0.00430 0.02930 0.18000
182 183 121 0.00390 0.03810 0.25800
183 99 184 0.00910 0.06230 0.38500
184 184 295 0.01250 0.08900 0.54000
185 184 106 0.00560 0.03900 0.95300
186 295 296 0.00150 0.01140 0.28400
187 295 201 0.00050 0.00340 0.02100
188 295 122 0.00070 0.01510 0.12600
189 295 262 0.00050 0.00340 0.02100
190 185 197 0.05620 0.22480 0.08100
191 296 186 0.01200 0.08360 0.12300
192 296 187 0.01520 0.11320 0.68400
193 296 282 0.04680 0.33690 0.51900
194 296 258 0.04300 0.30310 0.46300
195 296 102 0.04890 0.34920 0.53800
196 296 119 0.00130 0.00890 0.11900
197 186 258 0.02910 0.22670 0.34200
198 187 281 0.00600 0.05700 0.76700
199 281 282 0.00750 0.07730 0.11900
200 281 103 0.01270 0.09090 0.13500
201 282 258 0.00850 0.05880 0.08700
202 282 103 0.02180 0.15110 0.22300
203 258 102 0.00730 0.05040 0.07400
204 188 261 0.05230 0.15260 0.07400
205 188 200 0.13710 0.39190 0.07600
206 106 189 0.01370 0.09570 0.14100
207 189 110 0.00550 0.02880 0.19000
208 107 108 0.17460 0.31610 0.04000
209 107 120 0.08040 0.30540 0.04500
210 190 110 0.01100 0.05680 0.38800
211 191 193 0.00080 0.00980 0.06900
212 192 193 0.00290 0.02850 0.19000
213 192 109 0.00660 0.04480 0.27700
214 111 194 0.00240 0.03260 0.23600
215 111 113 0.00180 0.02450 1.66200
216 112 194 0.00440 0.05140 3.59700
217 113 114 0.00020 0.01230 0.00000
218 115 196 0.00180 0.01780 0.02900
219 197 259 0.06690 0.48430 0.06300
220 197 198 0.05580 0.22100 0.03100
221 259 198 0.08070 0.33310 0.04900
222 259 260 0.07390 0.30710 0.04300
223 259 199 0.17990 0.50170 0.06900
224 260 199 0.09040 0.36260 0.04800
225 260 200 0.07700 0.30920 0.05400
226 199 117 0.02510 0.08290 0.04700
227 117 261 0.02220 0.08470 0.05000
228 261 200 0.04980 0.18550 0.02900
229 261 118 0.00610 0.02900 0.08400
230 201 100 0.00040 0.02020 0.00000
231 201 123 0.00040 0.00830 0.11500
232 121 3 0.00250 0.02450 0.16400
233 122 262 0.00070 0.00860 0.11500
234 123 262 0.00070 0.00860 0.11500
235 262 100 0.00040 0.02020 0.00000
236 202 212 0.03300 0.09500 0.00000
237 202 131 0.04600 0.06900 0.00000
238 203 290 0.00040 0.00220 6.20000
239 203 138 0.00000 0.02750 0.00000
240 124 125 0.00300 0.04800 0.00000
241 125 218 0.00200 0.00900 0.00000
242 204 210 0.04500 0.06300 0.00000
243 204 212 0.04800 0.12700 0.00000
244 205 284 0.00310 0.02860 0.50000
245 205 25 0.00240 0.03550 0.36000
246 206 284 0.00310 0.02860 0.50000
247 263 207 0.01400 0.04000 0.00400
248 263 283 0.03000 0.08100 0.01000
249 207 289 0.01000 0.06000 0.00900
250 207 298 0.01500 0.04000 0.00600
251 289 128 0.33200 0.68800 0.00000
252 289 129 0.00900 0.04600 0.02500
253 289 283 0.02000 0.07300 0.00800
254 289 298 0.03400 0.10900 0.03200
255 126 208 0.07600 0.13500 0.00900
256 126 283 0.04000 0.10200 0.00500
257 208 283 0.08100 0.12800 0.01400
258 127 209 0.12400 0.18300 0.00000
259 129 298 0.01000 0.05900 0.00800
260 209 210 0.04600 0.06800 0.00000
261 210 211 0.30200 0.44600 0.00000
262 211 130 0.07300 0.09300 0.00000
263 211 212 0.24000 0.42100 0.00000
264 213 215 0.01390 0.07780 0.08600
265 214 215 0.00170 0.01850 0.02000
266 214 222 0.00150 0.01080 0.00200
267 215 132 0.00450 0.02490 0.02600
268 132 264 0.00400 0.04970 0.01800
269 264 216 0.00000 0.04560 0.00000
270 264 284 0.00050 0.01770 0.02000
271 264 265 0.00270 0.03950 0.83200
272 284 285 0.00030 0.00180 5.20000
273 265 216 0.00370 0.04840 0.43000
274 265 133 0.00100 0.02950 0.50300
275 265 221 0.00160 0.00460 0.40200
276 133 134 0.00030 0.00130 1.00000
277 217 218 0.01000 0.06400 0.48000
278 217 135 0.00190 0.00810 0.86000
279 218 124 0.00100 0.06100 0.00000
280 135 290 0.00050 0.02120 0.00000
281 219 220 0.00190 0.00870 1.28000
282 219 290 0.00260 0.09170 0.00000
283 219 266 0.00130 0.02880 0.81000
284 220 203 0.00000 0.06260 0.00000
285 290 136 0.00020 0.00690 1.36400
286 290 285 0.00010 0.00060 3.57000
287 136 8 0.00170 0.04850 0.00000
288 266 137 0.00020 0.02590 0.14400
289 266 285 0.00060 0.02720 0.00000
290 137 221 0.00020 0.00060 0.80000
291 138 13 0.00030 0.00430 0.00900
292 222 267 0.00820 0.08510 0.00000
293 222 268 0.01120 0.07230 0.00000
294 139 140 0.01270 0.03550 0.00000
295 139 267 0.03260 0.18040 0.00000
296 140 223 0.01950 0.05510 0.00000
297 267 223 0.01570 0.07320 0.00000
298 267 268 0.03600 0.21190 0.00000
299 223 268 0.02680 0.12850 0.00000
300 268 224 0.04280 0.12150 0.00000
301 224 141 0.03510 0.10040 0.00000
302 141 12 0.06160 0.18570 0.00000
0
97 3.250
255 0.550
107 0.345
194 -2.120
114 -1.030
259 0.530
200 0.450
203 -1.500
290 -3.000
221 -1.500
138 -1.400
224 0.456
300 0.024
54 0.017
0
1 297 269 0.0001 0.0005 1.0082 0.9043 1.1043
2 269 226 0.0244 0.4368 0.9668 0.9391 1.1478
3 269 227 0.0362 0.6490 0.9796 0.9391 1.1478
4 291 62 0.0158 0.3749 1.0435 0.9391 1.1478
5 291 63 0.0158 0.3749 0.9391 0.9391 1.1478
6 291 145 0.0160 0.3805 1.0435 0.9391 1.1478
7 291 64 0.0000 0.1520 1.0435 0.9391 1.1000
8 291 65 0.0000 0.8000 1.0435 0.9391 1.1000
9 228 47 0.4436 2.8152 1.0000 0.9391 1.1000
10 225 48 0.5075 3.2202 1.0000 0.9391 1.1000
11 229 49 0.6669 3.9440 1.0000 0.9391 1.1000
12 229 50 0.6113 3.6152 1.0000 0.9391 1.1000
13 271 66 0.4412 2.9668 1.0000 0.9391 1.1000
14 271 67 0.3079 2.0570 1.0000 0.9391 1.1000
15 300 51 0.7363 4.6724 1.0000 0.9391 1.1000
16 300 52 0.7698 4.8846 1.0000 0.9391 1.1000
17 300 53 0.7573 4.8056 1.0000 0.9391 1.1000
18 270 59 0.3661 2.4560 1.0000 0.9391 1.1000
19 270 60 1.0593 5.4536 1.0000 0.9391 1.1000
20 270 61 0.1567 1.6994 1.0000 0.9000 1.1000
21 300 54 0.1301 1.3912 1.0000 0.9391 1.1000
22 300 55 0.5448 3.4572 1.0000 0.9391 1.1000
23 300 56 0.1543 1.6729 1.0000 0.9391 1.1000
24 300 57 0.3849 2.5712 1.0000 0.9391 1.1000
25 300 58 0.4412 2.9668 1.0000 0.9391 1.1000
26 145 69 0.0000 0.7500 0.9583 0.9391 1.1000
27 4 214 0.0025 0.0380 1.0000 0.9391 1.1000
28 5 285 0.0014 0.0514 1.0000 0.9391 1.1000
29 6 290 0.0009 0.0472 1.0000 0.9391 1.1000
30 11 285 0.0005 0.0154 1.0000 0.9391 1.1000
31 292 146 0.0000 0.0520 0.9470 0.9000 1.1000
32 292 230 0.0000 0.0520 0.9560 0.9000 1.1000
33 292 70 0.0000 0.0050 0.9710 0.9000 1.1000
34 272 147 0.0000 0.0390 0.9480 0.9000 1.1000
35 272 71 0.0000 0.0390 0.9590 0.9000 1.1000
36 73 273 0.0000 0.0890 1.0460 0.9000 1.1000
37 231 73 0.0000 0.0530 0.9850 0.9000 1.1000
38 286 76 0.0194 0.0311 0.9561 0.9000 1.1000
39 149 286 0.0010 0.0380 0.9710 0.9000 1.1000
40 233 232 0.0000 0.0140 0.9520 0.9000 1.1000
41 235 234 0.0000 0.0640 0.9430 0.9000 1.1000
42 81 237 0.0000 0.0470 1.0100 0.9000 1.1000
43 240 275 0.0000 0.0200 1.0080 0.9000 1.1000
44 240 153 0.0000 0.0210 1.0000 0.9000 1.1000
45 276 158 0.0000 0.0590 0.9750 0.9000 1.1000
46 159 88 0.0000 0.0380 1.0170 0.9000 1.1000
47 277 246 0.0000 0.0244 1.0000 0.9000 1.1000
48 248 164 0.0000 0.0200 1.0000 0.9000 1.1000
49 91 279 0.0000 0.0480 1.0000 0.9000 1.1000
50 249 280 0.0000 0.0480 1.0000 0.9000 1.1000
51 163 169 0.0000 0.0460 1.0150 0.9000 1.1000
52 175 130 0.0000 0.1490 0.9670 0.9000 1.1000
53 96 178 0.0052 0.0174 1.0100 0.9000 1.1000
54 176 95 0.0000 0.0280 1.0500 0.9000 1.1000
55 256 191 0.0005 0.0195 1.0000 0.9000 1.1000
56 299 98 0.0000 0.0180 1.0522 0.9000 1.1000
57 299 104 0.0000 0.0140 1.0522 0.9000 1.1000
58 182 116 0.0010 0.0402 1.0500 0.9000 1.1000
59 186 198 0.0024 0.0603 0.9750 0.9000 1.1000
60 187 260 0.0024 0.0498 1.0000 0.9000 1.1000
61 281 101 0.0000 0.0833 1.0350 0.9000 1.1000
62 281 188 0.0013 0.0371 0.9565 0.9000 1.1000
63 282 118 0.0005 0.0182 1.0000 0.9000 1.1000
64 105 116 0.0010 0.0392 1.0500 0.9000 1.1000
65 189 120 0.0027 0.0639 1.0730 0.9000 1.1000
66 190 108 0.0008 0.0256 1.0500 0.9000 1.1000
67 193 97 0.0000 0.0160 1.0506 0.9000 1.1000
68 109 178 0.0012 0.0396 0.9750 0.9000 1.1000
69 112 295 0.0013 0.0384 0.9800 0.9000 1.1000
70 194 190 0.0009 0.0231 0.9560 0.9000 1.1000
71 119 185 0.0003 0.0131 1.0500 0.9000 1.1000
72 202 283 0.0000 0.2520 1.0300 0.9000 1.1000
73 204 263 0.0000 0.2370 1.0300 0.9000 1.1000
74 206 213 0.0008 0.0366 0.9850 0.9000 1.1000
75 208 224 0.0000 0.2200 1.0000 0.9000 1.1000
76 127 160 0.0000 0.0980 1.0300 0.9000 1.1000
77 128 298 0.0000 0.1280 1.0100 0.9000 1.1000
78 209 143 0.0200 0.2040 1.0500 0.9000 1.1000
79 131 289 0.0260 0.2110 1.0300 0.9000 1.1000
80 298 213 0.0030 0.0122 1.0000 0.9000 1.1000
81 216 284 0.0030 0.0122 0.9700 0.9000 1.1000
82 134 217 0.0012 0.0195 1.0000 0.9000 1.1000
83 220 7 0.0010 0.0332 1.0200 0.9000 1.1000
84 266 9 0.0005 0.0160 1.0700 0.9000 1.1000
85 221 10 0.0005 0.0160 1.0200 0.9000 1.1000
86 263 143 0.0001 0.0200 1.0000 0.9000 1.1000
87 254 26 0.0010 0.0230 1.0223 0.9000 1.1000
88 255 27 0.0000 0.0230 0.9284 0.9000 1.1000
89 29 230 0.0010 0.0146 1.0000 0.9000 1.1000
90 30 292 0.0000 0.0105 1.0000 0.9000 1.1000
91 41 158 0.0000 0.0238 1.0000 0.9000 1.1000
92 42 276 0.0000 0.0321 0.9500 0.9000 1.1000
93 46 114 0.0000 0.0154 1.0000 0.9000 1.1000
94 35 235 0.0000 0.0289 1.0000 0.9000 1.1000
95 28 146 0.0000 0.0195 1.0000 0.9000 1.1000
96 44 299 0.0000 0.0193 1.0000 0.9000 1.1000
97 31 273 0.0000 0.0192 1.0000 0.9000 1.1000
98 34 234 0.0000 0.0230 1.0000 0.9000 1.1000
99 38 241 0.0000 0.0124 1.0000 0.9000 1.1000
100 45 185 0.0000 0.0167 1.0000 0.9000 1.1000
101 32 231 0.0000 0.0312 1.0000 0.9000 1.1000
102 33 76 0.0000 0.0165 0.9420 0.9000 1.1000
103 36 82 0.0000 0.0316 0.9650 0.9000 1.1000
104 40 243 0.0000 0.0535 0.9500 0.9000 1.1000
105 37 275 0.0000 0.1818 0.9420 0.9000 1.1000
106 39 242 0.0000 0.1961 0.9420 0.9000 1.1000
107 43 244 0.0000 0.0690 0.9565 0.9000 1.1000
0
146 0.00 0.00 90.00 49.00
230 0.00 0.00 56.00 15.00
292 0.00 0.00 20.00 0.00
70 0.00 0.00 0.00 0.00
147 0.00 0.00 353.00 130.00
71 0.00 0.00 120.00 41.00
272 0.00 0.00 0.00 0.00
148 -5.00 0.00 58.00 14.00
72 0.00 0.00 96.00 43.00
73 -5.00 0.00 148.00 33.00
273 0.00 0.00 83.00 21.00
231 0.00 0.00 0.00 0.00
74 0.00 0.00 58.00 10.00
75 0.00 0.00 160.00 60.00
286 0.00 0.00 126.70 23.00
149 0.00 0.00 0.00 0.00
76 0.00 0.00 561.00 220.00
150 0.00 0.00 0.00 0.00
232 -10.00 0.00 595.00 120.00
233 0.00 0.00 77.00 1.00
77 0.00 0.00 81.00 23.00
234 0.00 0.00 21.00 7.00
235 0.00 0.00 0.00 0.00
78 0.00 0.00 45.00 12.00
151 0.00 0.00 28.00 9.00
79 0.00 0.00 69.00 13.00
236 0.00 0.00 55.00 6.00
80 0.00 0.00 0.00 0.00
237 0.00 0.00 0.00 0.00
81 0.00 0.00 0.00 0.00
297 0.00 0.00 85.00 32.00
238 0.00 0.00 155.00 18.00
82 0.00 0.00 0.00 0.00
152 0.00 0.00 46.00 -21.00
287 0.00 0.00 86.00 0.00
274 0.00 0.00 0.00 0.00
239 0.00 0.00 39.00 9.00
275 0.00 0.00 195.00 29.00
240 0.00 0.00 0.00 0.00
153 0.00 0.00 0.00 0.00
154 0.00 0.00 58.00 11.80
155 0.00 0.00 41.00 19.00
241 0.00 0.00 92.00 26.00
156 0.00 0.00 -5.00 5.00
83 0.00 0.00 61.00 28.00
84 0.00 0.00 69.00 3.00
157 0.00 0.00 10.00 1.00
242 0.00 0.00 22.00 10.00
243 0.00 0.00 98.00 20.00
85 0.00 0.00 14.00 1.00
86 0.00 0.00 218.00 106.00
87 0.00 0.00 0.00 0.00
158 0.00 0.00 227.00 110.00
276 0.00 0.00 0.00 0.00
159 0.00 0.00 70.00 30.00
88 0.00 0.00 0.00 0.00
160 0.00 0.00 0.00 0.00
89 0.00 0.00 56.00 20.00
244 0.00 0.00 116.00 38.00
245 0.00 0.00 57.00 19.00
277 0.00 0.00 224.00 71.00
246 0.00 0.00 0.00 0.00
161 0.00 0.00 208.00 107.00
293 0.00 0.00 74.00 28.00
162 0.00 0.00 0.00 0.00
247 0.00 0.00 48.00 14.00
90 0.00 0.00 28.00 7.00
248 0.00 0.00 0.00 0.00
1 375.00 0.00 37.00 13.00
91 0.00 0.00 0.00 0.00
249 0.00 0.00 0.00 0.00
163 0.00 0.00 0.00 0.00
164 0.00 0.00 0.00 0.00
165 0.00 0.00 44.20 0.00
166 0.00 0.00 66.00 0.00
167 155.00 0.00 17.40 0.00
168 290.00 0.00 15.80 0.00
169 0.00 0.00 60.30 0.00
278 0.00 0.00 39.90 0.00
92 68.00 0.00 66.70 0.00
279 0.00 0.00 83.50 0.00
170 0.00 0.00 0.00 0.00
280 0.00 0.00 77.80 0.00
171 0.00 0.00 32.00 0.00
172 0.00 0.00 8.60 0.00
250 0.00 0.00 49.60 0.00
173 0.00 0.00 4.60 0.00
174 117.00 0.00 112.10 0.00
251 0.00 0.00 30.70 0.00
252 0.00 0.00 63.00 0.00
93 0.00 0.00 19.60 0.00
94 0.00 0.00 26.20 0.00
175 0.00 0.00 18.20 0.00
95 0.00 0.00 0.00 0.00
96 0.00 0.00 0.00 0.00
97 0.00 0.00 0.00 0.00
253 0.00 0.00 14.10 650.00
254 1930.00 0.00 0.00 0.00
255 0.00 0.00 777.00 215.00
176 0.00 0.00 535.00 55.00
256 0.00 0.00 229.10 11.80
177 0.00 0.00 78.00 1.40
178 240.00 0.00 276.40 59.30
179 0.00 0.00 514.80 82.70
294 0.00 0.00 57.90 5.10
257 0.00 0.00 380.80 37.00
180 0.00 0.00 0.00 0.00
181 0.00 0.00 0.00 0.00
299 0.00 0.00 0.00 0.00
98 0.00 0.00 0.00 0.00
182 0.00 0.00 0.00 0.00
288 0.00 0.00 0.00 0.00
183 0.00 0.00 0.00 0.00
99 0.00 0.00 169.20 41.60
184 0.00 0.00 55.20 18.20
295 0.00 0.00 273.60 99.80
100 -192.50 0.00 826.70 135.20
185 0.00 0.00 595.00 83.30
296 0.00 0.00 387.70 114.70
186 281.00 0.00 145.00 58.00
187 0.00 0.00 56.50 24.50
281 696.00 0.00 89.50 35.50
101 0.00 0.00 0.00 0.00
282 0.00 0.00 24.00 14.00
258 84.00 0.00 0.00 0.00
102 217.00 0.00 0.00 0.00
188 0.00 0.00 63.00 25.00
103 103.00 0.00 0.00 0.00
104 0.00 0.00 0.00 0.00
105 0.00 0.00 0.00 0.00
106 372.00 0.00 17.00 9.00
189 216.00 0.00 0.00 0.00
107 0.00 0.00 70.00 5.00
190 0.00 0.00 200.00 50.00
108 0.00 0.00 75.00 50.00
191 0.00 0.00 123.50 -24.30
192 0.00 0.00 0.00 0.00
193 0.00 0.00 33.00 16.50
109 0.00 0.00 0.00 0.00
110 0.00 0.00 35.00 15.00
111 0.00 0.00 85.00 24.00
112 0.00 0.00 0.00 0.40
194 0.00 0.00 0.00 0.00
113 0.00 0.00 0.00 0.00
114 0.00 0.00 0.00 0.00
115 0.00 0.00 299.90 95.70
195 0.00 0.00 0.00 0.00
196 0.00 0.00 0.00 0.00
116 205.00 0.00 481.80 205.00
2 0.00 0.00 763.60 291.10
197 0.00 0.00 26.50 0.00
259 0.00 0.00 163.50 43.00
198 0.00 0.00 0.00 0.00
260 0.00 0.00 176.00 83.00
199 228.00 0.00 5.00 4.00
117 84.00 0.00 28.00 12.00
261 0.00 0.00 427.40 173.60
200 0.00 0.00 74.00 29.00
118 0.00 0.00 69.50 49.30
201 0.00 0.00 73.40 0.00
119 0.00 0.00 240.70 89.00
120 0.00 0.00 40.00 4.00
121 0.00 0.00 136.80 16.60
3 200.00 0.00 0.00 0.00
122 1200.00 0.00 59.80 24.30
123 1200.00 0.00 59.80 24.30
262 0.00 0.00 182.60 43.60
202 0.00 0.00 7.00 2.00
203 475.00 0.00 0.00 0.00
124 1973.00 0.00 489.00 53.00
125 0.00 0.00 800.00 72.00
204 0.00 0.00 0.00 0.00
205 0.00 0.00 0.00 0.00
206 0.00 0.00 0.00 0.00
263 0.00 0.00 10.00 3.00
207 0.00 0.00 43.00 14.00
289 424.00 0.00 64.00 21.00
126 0.00 0.00 35.00 12.00
208 0.00 0.00 27.00 12.00
127 0.00 0.00 41.00 14.00
128 0.00 0.00 38.00 13.00
129 0.00 0.00 42.00 14.00
209 0.00 0.00 72.00 24.00
210 0.00 0.00 0.00 -5.00
211 0.00 0.00 12.00 2.00
130 0.00 0.00 -21.00 -14.20
212 0.00 0.00 7.00 2.00
131 0.00 0.00 38.00 13.00
283 0.00 0.00 0.00 0.00
298 0.00 0.00 96.00 7.00
213 0.00 0.00 0.00 0.00
4 272.00 0.00 0.00 0.00
214 0.00 0.00 22.00 16.00
215 0.00 0.00 47.00 26.00
132 0.00 0.00 176.00 105.00
264 0.00 0.00 100.00 75.00
216 0.00 0.00 131.00 96.00
284 0.00 0.00 0.00 0.00
265 100.00 0.00 285.00 100.00
133 450.00 0.00 171.00 70.00
5 250.00 0.00 328.00 188.00
134 0.00 0.00 428.00 232.00
217 0.00 0.00 173.00 99.00
218 0.00 0.00 410.00 40.00
135 0.00 0.00 0.00 0.00
6 303.00 0.00 538.00 369.00
219 0.00 0.00 223.00 148.00
220 0.00 0.00 96.00 46.00
7 345.00 0.00 0.00 0.00
290 0.00 0.00 159.00 107.00
136 0.00 0.00 448.00 143.00
8 300.00 0.00 404.00 212.00
266 0.00 0.00 572.00 244.00
137 0.00 0.00 269.00 157.00
9 600.00 0.00 0.00 0.00
285 0.00 0.00 0.00 0.00
221 250.00 0.00 255.00 149.00
10 550.00 0.00 0.00 0.00
138 0.00 0.00 0.00 0.00
11 575.43 0.00 0.00 0.00
222 170.00 0.00 0.00 0.00
139 84.00 0.00 8.00 3.00
140 0.00 0.00 0.00 0.00
267 0.00 0.00 61.00 30.00
223 0.00 0.00 77.00 33.00
268 0.00 0.00 61.00 30.00
224 0.00 0.00 29.00 14.00
141 0.00 0.00 29.00 14.00
12 0.00 0.00 -23.00 -17.00
13 0.00 0.00 -33.10 -29.40
14 0.00 0.00 115.80 -24.00
15 0.00 0.00 2.40 -12.60
16 0.00 0.00 2.40 -3.90
17 0.00 0.00 -14.90 26.50
18 0.00 0.00 24.70 -1.20
19 0.00 0.00 145.30 -34.90
20 0.00 0.00 28.10 -20.50
21 0.00 0.00 14.00 2.50
22 0.00 0.00 -11.10 -1.40
23 0.00 0.00 50.50 17.40
24 0.00 0.00 29.60 0.60
25 0.00 0.00 -113.70 76.70
26 0.00 0.00 100.31 29.17
27 0.00 0.00 -100.00 34.17
142 0.00 0.00 0.00 0.00
143 0.00 0.00 0.00 0.00
28 467.00 0.00 0.00 0.00
29 623.00 0.00 0.00 0.00
30 1210.00 0.00 0.00 0.00
31 234.00 0.00 0.00 0.00
32 372.00 0.00 0.00 0.00
33 330.00 0.00 0.00 0.00
34 185.00 0.00 0.00 0.00
35 410.00 0.00 0.00 0.00
36 500.00 0.00 0.00 0.00
37 37.00 0.00 0.00 0.00
38 0.00 0.00 0.00 0.00
39 45.00 0.00 0.00 0.00
40 165.00 0.00 0.00 0.00
41 400.00 0.00 0.00 0.00
42 400.00 0.00 0.00 0.00
43 116.00 0.00 0.00 0.00
44 1292.00 0.00 0.00 0.00
45 700.00 0.00 0.00 0.00
46 553.00 0.00 0.00 0.00
269 0.00 0.00 0.00 0.00
225 -4.20 0.00 0.00 0.00
300 0.00 0.00 2.71 0.94
270 0.00 0.00 0.86 0.28
291 0.00 0.00 0.00 0.00
226 0.00 0.00 0.00 0.00
271 0.00 0.00 0.00 0.00
227 0.00 0.00 0.00 0.00
228 0.00 0.00 4.75 1.56
47 0.00 0.00 1.53 0.53
229 0.00 0.00 0.00 0.00
48 0.00 0.00 1.35 0.47
49 0.00 0.00 0.45 0.16
50 0.00 0.00 0.45 0.16
51 0.00 0.00 1.84 0.64
52 0.00 0.00 1.39 0.48
53 0.00 0.00 1.89 0.65
54 0.00 0.00 1.55 0.54
55 0.00 0.00 1.66 0.58
56 0.00 0.00 3.03 1.00
57 0.00 0.00 1.86 0.64
58 0.00 0.00 2.58 0.89
59 0.00 0.00 1.01 0.35
60 0.00 0.00 0.81 0.28
61 0.00 0.00 1.60 0.52
144 0.00 0.00 0.00 0.00
62 -35.81 0.00 0.00 0.00
63 0.00 0.00 30.00 23.00
145 -26.48 0.00 0.00 0.00
64 50.00 0.00 0.00 0.00
65 8.00 0.00 0.00 0.00
66 0.00 0.00 1.02 0.35
67 0.00 0.00 1.02 0.35
68 0.00 0.00 3.80 1.25
69 0.00 0.00 1.19 0.41
0
148 1.0153 -10.00 10.00
73 1.0205 -20.00 20.00
232 1.0010 -20.00 20.00
159 0.9583 -25.00 25.00
161 0.9632 12.00 35.00
1 1.0250 -240.00 240.00
167 1.0520 -11.00 96.00
168 1.0520 -153.00 153.00
92 1.0000 -30.00 56.00
174 0.9900 -24.00 77.00
254 1.0435 -500.00 1500.00
178 1.0233 -60.00 120.00
179 1.0103 -25.00 200.00
100 1.0550 -125.00 350.00
186 1.0510 -50.00 75.00
281 1.0435 -100.00 300.00
258 1.0528 -15.00 35.00
102 1.0528 -50.00 100.00
103 1.0735 -25.00 50.00
106 1.0535 -50.00 175.00
189 1.0435 -50.00 90.00
108 0.9630 -10.00 15.00
116 0.9290 -40.00 90.00
2 0.9829 -50.00 150.00
199 1.0522 -45.00 90.00
117 1.0077 -15.00 35.00
3 1.0522 -50.00 80.00
122 1.0650 -100.00 400.00
123 1.0650 -100.00 400.00
203 1.0551 -300.00 300.00
124 1.0435 -1000.00 1000.00
289 1.0150 -260.00 260.00
4 1.0100 -150.00 150.00
265 1.0080 -60.00 60.00
133 1.0000 -320.00 320.00
5 1.0500 -300.00 300.00
6 1.0000 -300.00 300.00
7 1.0400 -250.00 250.00
8 1.0000 -500.00 500.00
9 1.0165 -300.00 300.00
221 1.0100 -200.00 200.00
10 1.0000 -400.00 400.00
11 1.0500 -600.00 600.00
222 0.9930 40.00 100.00
139 1.0100 40.00 80.00
28 1.0507 -210.00 210.00
29 1.0507 -280.00 280.00
30 1.0323 -420.00 420.00
31 1.0145 -100.00 100.00
32 1.0145 -224.00 224.00
33 1.0507 0.00 350.00
34 1.0507 0.00 120.00
35 1.0290 -224.00 224.00
36 1.0500 -200.00 200.00
37 1.0145 0.00 42.00
38 1.0507 -500.00 500.00
39 0.9967 0.00 25.00
40 1.0212 -90.00 90.00
41 1.0145 -150.00 150.00
42 1.0017 0.00 150.00
43 0.9893 0.00 87.00
44 1.0507 -100.00 600.00
45 1.0507 -125.00 325.00
46 1.0145 -200.00 300.00
225 0.9945 -2.00 2.00
62 1.0000 -17.35 17.35
145 1.0000 -12.80 12.83
64 1.0000 -38.00 38.00
65 1.0000 -6.00 6.00
0
5 0.2000 0.2000 0.1375 210.0000 600.0000
4 0.3000 0.1750 0.1750 200.0000 580.0000
9 0.3000 0.1250 0.1000 200.0000 800.0000
11 0.3500 0.2250 0.1283 300.0000 800.0000
28 0.2200 0.1430 0.2500 300.0000 600.0000
29 0.7500 0.1250 0.2500 300.0000 800.0000
30 0.5400 0.1950 0.2520 600.0000 1600.0000
31 0.3800 0.2200 0.4390 200.0000 400.0000
32 0.3600 0.1250 0.6350 200.0000 500.0000
33 0.9000 0.1300 0.0250 200.0000 500.0000
34 0.8300 0.2300 0.0730 100.0000 300.0000
35 0.4400 0.1430 0.3120 320.0000 600.0000
36 0.1200 0.1400 0.6650 400.0000 800.0000
38 0.5400 0.1150 0.1020 600.0000 1600.0000
40 0.6600 0.1550 0.2650 100.0000 350.0000
41 0.8200 0.1600 0.7000 250.0000 600.0000
42 0.4400 0.1450 0.1050 250.0000 600.0000
43 0.3500 0.1270 0.4500 80.0000 300.0000
44 0.5400 0.1250 0.1220 600.0000 1600.0000
45 0.3800 0.2000 0.1390 500.0000 900.0000
46 0.3600 0.1250 0.2350 400.0000 800.0000
0
0

824
IEEE3001.dat Normal file
View File

@ -0,0 +1,824 @@
300 409 100 28 0.100000000000000 0 0 0
1.00000000000000e-05 4 0 0 0 0 0 0
1 38 0 0 0 0 0 0
0 0 0 0 0 0 0 0
1 269 291 0.000800000000000000 0.00348000000000000 0 0 0
2 226 271 0.0555800000000000 0.246660000000000 0 0 0
3 226 300 0.0555900000000000 0.246660000000000 0 0 0
4 227 225 0.0381100000000000 0.216480000000000 0 0 0
5 225 228 0.0537000000000000 0.0702600000000000 0 0 0
6 228 229 1.10680000000000 0.952780000000000 0 0 0
7 271 300 0.0558000000000000 0.246660000000000 0 0 0
8 300 144 0.0737800000000000 0.0635200000000000 0 0 0
9 144 270 0.0383200000000000 0.0289400000000000 0 0 0
10 227 68 0.235520000000000 0.990360000000000 0 0 0
11 146 147 0.00100000000000000 0.00600000000000000 0 0 0
12 230 71 0.00100000000000000 0.00900000000000000 0 0 0
13 230 148 0.00600000000000000 0.0270000000000000 0.0540000000000000 0 0
14 292 272 0 0.00300000000000000 0 0 0
15 292 150 0.00800000000000000 0.0690000000000000 0.139000000000000 0 0
16 292 104 0.00100000000000000 0.00700000000000000 0 0 0
17 70 149 0.00200000000000000 0.0190000000000000 1.12700000000000 0 0
18 147 72 0.00600000000000000 0.0290000000000000 0.0180000000000000 0 0
19 272 231 0.00100000000000000 0.00900000000000000 0.0700000000000000 0 0
20 272 98 0.00100000000000000 0.00700000000000000 0.0140000000000000 0 0
21 148 273 0.0130000000000000 0.0595000000000000 0.0330000000000000 0 0
22 148 75 0.0130000000000000 0.0420000000000000 0.0810000000000000 0 0
23 72 273 0.00600000000000000 0.0270000000000000 0.0130000000000000 0 0
24 273 74 0.00800000000000000 0.0340000000000000 0.0180000000000000 0 0
25 231 233 0.00200000000000000 0.0150000000000000 0.118000000000000 0 0
26 74 232 0.00600000000000000 0.0340000000000000 0.0160000000000000 0 0
27 75 286 0.0140000000000000 0.0420000000000000 0.0970000000000000 0 0
28 286 297 0.0650000000000000 0.248000000000000 0.121000000000000 0 0
29 286 165 0.0990000000000000 0.248000000000000 0.0350000000000000 0 0
30 286 166 0.0960000000000000 0.363000000000000 0.0480000000000000 0 0
31 149 274 0.00200000000000000 0.0220000000000000 1.28000000000000 0 0
32 150 233 0.00200000000000000 0.0180000000000000 0.0360000000000000 0 0
33 150 163 0.0130000000000000 0.0800000000000000 0.151000000000000 0 0
34 232 77 0.0160000000000000 0.0330000000000000 0.0150000000000000 0 0
35 232 79 0.0690000000000000 0.186000000000000 0.0980000000000000 0 0
36 233 235 0.00400000000000000 0.0340000000000000 0.280000000000000 0 0
37 77 234 0.0520000000000000 0.111000000000000 0.0500000000000000 0 0
38 234 78 0.0190000000000000 0.0390000000000000 0.0180000000000000 0 0
39 235 14 0.00700000000000000 0.0680000000000000 0.134000000000000 0 0
40 78 151 0.0360000000000000 0.0710000000000000 0.0340000000000000 0 0
41 151 79 0.0450000000000000 0.120000000000000 0.0650000000000000 0 0
42 151 15 0.0430000000000000 0.130000000000000 0.0140000000000000 0 0
43 236 80 0 0.0630000000000000 0 0 0
44 236 238 0.00250000000000000 0.0120000000000000 0.0130000000000000 0 0
45 236 152 0.00600000000000000 0.0290000000000000 0.0200000000000000 0 0
46 236 287 0.00700000000000000 0.0430000000000000 0.0260000000000000 0 0
47 80 274 0.00100000000000000 0.00800000000000000 0.0420000000000000 0 0
48 237 245 0.0120000000000000 0.0600000000000000 0.00800000000000000 0 0
49 237 161 0.00600000000000000 0.0140000000000000 0.00200000000000000 0 0
50 237 293 0.0100000000000000 0.0290000000000000 0.00300000000000000 0 0
51 81 164 0.00400000000000000 0.0270000000000000 0.0430000000000000 0 0
52 297 238 0.00800000000000000 0.0470000000000000 0.00800000000000000 0 0
53 297 152 0.0220000000000000 0.0640000000000000 0.00700000000000000 0 0
54 297 287 0.0100000000000000 0.0360000000000000 0.0200000000000000 0 0
55 297 241 0.0170000000000000 0.0810000000000000 0.0480000000000000 0 0
56 297 165 0.102000000000000 0.254000000000000 0.0330000000000000 0 0
57 297 166 0.0470000000000000 0.127000000000000 0.0160000000000000 0 0
58 238 287 0.00800000000000000 0.0370000000000000 0.0200000000000000 0 0
59 238 239 0.0320000000000000 0.0870000000000000 0.0400000000000000 0 0
60 82 274 0.000600000000000000 0.00640000000000000 0.404000000000000 0 0
61 152 155 0.0260000000000000 0.154000000000000 0.0220000000000000 0 0
62 287 274 0 0.0290000000000000 0 0 0
63 287 241 0.0650000000000000 0.191000000000000 0.0200000000000000 0 0
64 287 156 0.0310000000000000 0.0890000000000000 0.0360000000000000 0 0
65 274 153 0.00200000000000000 0.0140000000000000 0.806000000000000 0 0
66 239 275 0.0260000000000000 0.0720000000000000 0.0350000000000000 0 0
67 239 155 0.0950000000000000 0.262000000000000 0.0320000000000000 0 0
68 239 84 0.0130000000000000 0.0390000000000000 0.0160000000000000 0 0
69 275 154 0.0270000000000000 0.0840000000000000 0.0390000000000000 0 0
70 275 157 0.0280000000000000 0.0840000000000000 0.0370000000000000 0 0
71 240 87 0.00700000000000000 0.0410000000000000 0.312000000000000 0 0
72 240 246 0.00900000000000000 0.0540000000000000 0.411000000000000 0 0
73 153 248 0.00500000000000000 0.0420000000000000 0.690000000000000 0 0
74 154 277 0.0520000000000000 0.145000000000000 0.0730000000000000 0 0
75 154 94 0.0430000000000000 0.118000000000000 0.0130000000000000 0 0
76 155 173 0.0250000000000000 0.0620000000000000 0.00700000000000000 0 0
77 241 156 0.0310000000000000 0.0940000000000000 0.0430000000000000 0 0
78 156 83 0.0370000000000000 0.109000000000000 0.0490000000000000 0 0
79 83 242 0.0270000000000000 0.0800000000000000 0.0360000000000000 0 0
80 84 157 0.0250000000000000 0.0730000000000000 0.0350000000000000 0 0
81 157 242 0.0350000000000000 0.103000000000000 0.0470000000000000 0 0
82 242 243 0.0650000000000000 0.169000000000000 0.0820000000000000 0 0
83 243 85 0.0460000000000000 0.0800000000000000 0.0360000000000000 0 0
84 243 159 0.159000000000000 0.537000000000000 0.0710000000000000 0 0
85 85 86 0.00900000000000000 0.0260000000000000 0.00500000000000000 0 0
86 86 158 0.00200000000000000 0.0130000000000000 0.0150000000000000 0 0
87 87 276 0.00900000000000000 0.0650000000000000 0.485000000000000 0 0
88 276 88 0.0160000000000000 0.105000000000000 0.203000000000000 0 0
89 276 101 0.00100000000000000 0.00700000000000000 0.0130000000000000 0 0
90 159 19 0.0265000000000000 0.172000000000000 0.0260000000000000 0 0
91 160 298 0.0510000000000000 0.232000000000000 0.0280000000000000 0 0
92 160 247 0.0510000000000000 0.157000000000000 0.0230000000000000 0 0
93 89 244 0.0320000000000000 0.100000000000000 0.0620000000000000 0 0
94 89 20 0.0200000000000000 0.123400000000000 0.0280000000000000 0 0
95 244 245 0.0360000000000000 0.131000000000000 0.0680000000000000 0 0
96 244 277 0.0340000000000000 0.0990000000000000 0.0470000000000000 0 0
97 245 293 0.0180000000000000 0.0870000000000000 0.0110000000000000 0 0
98 245 21 0.0256000000000000 0.193000000000000 0 0 0
99 277 161 0.0210000000000000 0.0570000000000000 0.0300000000000000 0 0
100 277 247 0.0180000000000000 0.0520000000000000 0.0180000000000000 0 0
101 246 164 0.00400000000000000 0.0270000000000000 0.0500000000000000 0 0
102 246 23 0.0286000000000000 0.201300000000000 0.379000000000000 0 0
103 161 293 0.0160000000000000 0.0430000000000000 0.00400000000000000 0 0
104 293 162 0.00100000000000000 0.00600000000000000 0.00700000000000000 0 0
105 293 90 0.0140000000000000 0.0700000000000000 0.0380000000000000 0 0
106 293 22 0.0891000000000000 0.267600000000000 0.0290000000000000 0 0
107 293 24 0.0782000000000000 0.212700000000000 0.0220000000000000 0 0
108 162 247 0.00600000000000000 0.0220000000000000 0.0110000000000000 0 0
109 162 1 0 0.0360000000000000 0 0 0
110 247 298 0.0990000000000000 0.375000000000000 0.0510000000000000 0 0
111 90 298 0.0220000000000000 0.107000000000000 0.0580000000000000 0 0
112 248 205 0.00350000000000000 0.0330000000000000 0.530000000000000 0 0
113 248 206 0.00350000000000000 0.0330000000000000 0.530000000000000 0 0
114 91 249 0.00800000000000000 0.0640000000000000 0.128000000000000 0 0
115 249 163 0.0120000000000000 0.0930000000000000 0.183000000000000 0 0
116 249 17 0.00600000000000000 0.0480000000000000 0.0920000000000000 0 0
117 165 167 0.0470000000000000 0.119000000000000 0.0140000000000000 0 0
118 166 168 0.0320000000000000 0.174000000000000 0.0240000000000000 0 0
119 167 169 0.100000000000000 0.253000000000000 0.0310000000000000 0 0
120 167 278 0.0220000000000000 0.0770000000000000 0.0390000000000000 0 0
121 168 171 0.0190000000000000 0.144000000000000 0.0170000000000000 0 0
122 168 250 0.0170000000000000 0.0920000000000000 0.0120000000000000 0 0
123 169 278 0.278000000000000 0.427000000000000 0.0430000000000000 0 0
124 278 170 0.0220000000000000 0.0530000000000000 0.00700000000000000 0 0
125 278 280 0.0380000000000000 0.0920000000000000 0.0120000000000000 0 0
126 278 171 0.0480000000000000 0.122000000000000 0.0150000000000000 0 0
127 92 170 0.0240000000000000 0.0640000000000000 0.00700000000000000 0 0
128 92 280 0.0340000000000000 0.121000000000000 0.0150000000000000 0 0
129 279 173 0.0530000000000000 0.135000000000000 0.0170000000000000 0 0
130 279 174 0.00200000000000000 0.00400000000000000 0.00200000000000000 0 0
131 279 251 0.0450000000000000 0.354000000000000 0.0440000000000000 0 0
132 279 252 0.0500000000000000 0.174000000000000 0.0220000000000000 0 0
133 170 280 0.0160000000000000 0.0380000000000000 0.00400000000000000 0 0
134 280 172 0.0430000000000000 0.0640000000000000 0.0270000000000000 0 0
135 171 250 0.0190000000000000 0.0620000000000000 0.00800000000000000 0 0
136 172 174 0.0760000000000000 0.130000000000000 0.0440000000000000 0 0
137 172 16 0.0440000000000000 0.124000000000000 0.0150000000000000 0 0
138 250 173 0.0120000000000000 0.0880000000000000 0.0110000000000000 0 0
139 250 252 0.157000000000000 0.400000000000000 0.0470000000000000 0 0
140 174 18 0.0740000000000000 0.208000000000000 0.0260000000000000 0 0
141 251 252 0.0700000000000000 0.184000000000000 0.0210000000000000 0 0
142 251 94 0.100000000000000 0.274000000000000 0.0310000000000000 0 0
143 251 175 0.109000000000000 0.393000000000000 0.0360000000000000 0 0
144 252 93 0.142000000000000 0.404000000000000 0.0500000000000000 0 0
145 93 175 0.0170000000000000 0.0420000000000000 0.00600000000000000 0 0
146 95 256 0.00360000000000000 0.0199000000000000 0.00400000000000000 0 0
147 96 255 0.00200000000000000 0.104900000000000 0.00100000000000000 0 0
148 97 253 0.000100000000000000 0.00180000000000000 0.0170000000000000 0 0
149 253 254 0 0.0271000000000000 0 0 0
150 253 142 0 0.616300000000000 0 0 0
151 142 255 0 -0.369700000000000 0 0 0
152 253 176 0.00220000000000000 0.291500000000000 0 0 0
153 254 255 0 0.0339000000000000 0 0 0
154 254 176 0 0.0582000000000000 0 0 0
155 256 177 0.0808000000000000 0.234400000000000 0.0290000000000000 0 0
156 256 179 0.0965000000000000 0.366900000000000 0.0540000000000000 0 0
157 177 178 0.0360000000000000 0.107600000000000 0.117000000000000 0 0
158 177 179 0.0476000000000000 0.141400000000000 0.149000000000000 0 0
159 179 294 0.000600000000000000 0.0197000000000000 0 0 0
160 294 257 0.00590000000000000 0.0405000000000000 0.250000000000000 0 0
161 294 181 0.0115000000000000 0.110600000000000 0.185000000000000 0 0
162 294 182 0.0198000000000000 0.168800000000000 0.321000000000000 0 0
163 294 191 0.00500000000000000 0.0500000000000000 0.330000000000000 0 0
164 294 192 0.00770000000000000 0.0538000000000000 0.335000000000000 0 0
165 294 196 0.0165000000000000 0.115700000000000 0.171000000000000 0 0
166 257 180 0.00590000000000000 0.0577000000000000 0.0950000000000000 0 0
167 257 183 0.00490000000000000 0.0336000000000000 0.208000000000000 0 0
168 257 195 0.00590000000000000 0.0577000000000000 0.0950000000000000 0 0
169 180 299 0.00780000000000000 0.0773000000000000 0.126000000000000 0 0
170 180 288 0.00260000000000000 0.0193000000000000 0.0300000000000000 0 0
171 181 299 0.00760000000000000 0.0752000000000000 0.122000000000000 0 0
172 181 288 0.00210000000000000 0.0186000000000000 0.0300000000000000 0 0
173 299 182 0.00160000000000000 0.0164000000000000 0.0260000000000000 0 0
174 299 105 0.00170000000000000 0.0165000000000000 0.0260000000000000 0 0
175 299 115 0.00790000000000000 0.0793000000000000 0.127000000000000 0 0
176 299 195 0.00780000000000000 0.0784000000000000 0.125000000000000 0 0
177 288 295 0.00170000000000000 0.0117000000000000 0.289000000000000 0 0
178 288 195 0.00260000000000000 0.0193000000000000 0.0300000000000000 0 0
179 288 196 0.00210000000000000 0.0186000000000000 0.0300000000000000 0 0
180 288 2 0.000200000000000000 0.0101000000000000 0 0 0
181 183 99 0.00430000000000000 0.0293000000000000 0.180000000000000 0 0
182 183 121 0.00390000000000000 0.0381000000000000 0.258000000000000 0 0
183 99 184 0.00910000000000000 0.0623000000000000 0.385000000000000 0 0
184 184 295 0.0125000000000000 0.0890000000000000 0.540000000000000 0 0
185 184 106 0.00560000000000000 0.0390000000000000 0.953000000000000 0 0
186 295 296 0.00150000000000000 0.0114000000000000 0.284000000000000 0 0
187 295 201 0.000500000000000000 0.00340000000000000 0.0210000000000000 0 0
188 295 122 0.000700000000000000 0.0151000000000000 0.126000000000000 0 0
189 295 262 0.000500000000000000 0.00340000000000000 0.0210000000000000 0 0
190 185 197 0.0562000000000000 0.224800000000000 0.0810000000000000 0 0
191 296 186 0.0120000000000000 0.0836000000000000 0.123000000000000 0 0
192 296 187 0.0152000000000000 0.113200000000000 0.684000000000000 0 0
193 296 282 0.0468000000000000 0.336900000000000 0.519000000000000 0 0
194 296 258 0.0430000000000000 0.303100000000000 0.463000000000000 0 0
195 296 102 0.0489000000000000 0.349200000000000 0.538000000000000 0 0
196 296 119 0.00130000000000000 0.00890000000000000 0.119000000000000 0 0
197 186 258 0.0291000000000000 0.226700000000000 0.342000000000000 0 0
198 187 281 0.00600000000000000 0.0570000000000000 0.767000000000000 0 0
199 281 282 0.00750000000000000 0.0773000000000000 0.119000000000000 0 0
200 281 103 0.0127000000000000 0.0909000000000000 0.135000000000000 0 0
201 282 258 0.00850000000000000 0.0588000000000000 0.0870000000000000 0 0
202 282 103 0.0218000000000000 0.151100000000000 0.223000000000000 0 0
203 258 102 0.00730000000000000 0.0504000000000000 0.0740000000000000 0 0
204 188 261 0.0523000000000000 0.152600000000000 0.0740000000000000 0 0
205 188 200 0.137100000000000 0.391900000000000 0.0760000000000000 0 0
206 106 189 0.0137000000000000 0.0957000000000000 0.141000000000000 0 0
207 189 110 0.00550000000000000 0.0288000000000000 0.190000000000000 0 0
208 107 108 0.174600000000000 0.316100000000000 0.0400000000000000 0 0
209 107 120 0.0804000000000000 0.305400000000000 0.0450000000000000 0 0
210 190 110 0.0110000000000000 0.0568000000000000 0.388000000000000 0 0
211 191 193 0.000800000000000000 0.00980000000000000 0.0690000000000000 0 0
212 192 193 0.00290000000000000 0.0285000000000000 0.190000000000000 0 0
213 192 109 0.00660000000000000 0.0448000000000000 0.277000000000000 0 0
214 111 194 0.00240000000000000 0.0326000000000000 0.236000000000000 0 0
215 111 113 0.00180000000000000 0.0245000000000000 1.66200000000000 0 0
216 112 194 0.00440000000000000 0.0514000000000000 3.59700000000000 0 0
217 113 114 0.000200000000000000 0.0123000000000000 0 0 0
218 115 196 0.00180000000000000 0.0178000000000000 0.0290000000000000 0 0
219 197 259 0.0669000000000000 0.484300000000000 0.0630000000000000 0 0
220 197 198 0.0558000000000000 0.221000000000000 0.0310000000000000 0 0
221 259 198 0.0807000000000000 0.333100000000000 0.0490000000000000 0 0
222 259 260 0.0739000000000000 0.307100000000000 0.0430000000000000 0 0
223 259 199 0.179900000000000 0.501700000000000 0.0690000000000000 0 0
224 260 199 0.0904000000000000 0.362600000000000 0.0480000000000000 0 0
225 260 200 0.0770000000000000 0.309200000000000 0.0540000000000000 0 0
226 199 117 0.0251000000000000 0.0829000000000000 0.0470000000000000 0 0
227 117 261 0.0222000000000000 0.0847000000000000 0.0500000000000000 0 0
228 261 200 0.0498000000000000 0.185500000000000 0.0290000000000000 0 0
229 261 118 0.00610000000000000 0.0290000000000000 0.0840000000000000 0 0
230 201 100 0.000400000000000000 0.0202000000000000 0 0 0
231 201 123 0.000400000000000000 0.00830000000000000 0.115000000000000 0 0
232 121 3 0.00250000000000000 0.0245000000000000 0.164000000000000 0 0
233 122 262 0.000700000000000000 0.00860000000000000 0.115000000000000 0 0
234 123 262 0.000700000000000000 0.00860000000000000 0.115000000000000 0 0
235 262 100 0.000400000000000000 0.0202000000000000 0 0 0
236 202 212 0.0330000000000000 0.0950000000000000 0 0 0
237 202 131 0.0460000000000000 0.0690000000000000 0 0 0
238 203 290 0.000400000000000000 0.00220000000000000 6.20000000000000 0 0
239 203 138 0 0.0275000000000000 0 0 0
240 124 125 0.00300000000000000 0.0480000000000000 0 0 0
241 125 218 0.00200000000000000 0.00900000000000000 0 0 0
242 204 210 0.0450000000000000 0.0630000000000000 0 0 0
243 204 212 0.0480000000000000 0.127000000000000 0 0 0
244 205 284 0.00310000000000000 0.0286000000000000 0.500000000000000 0 0
245 205 25 0.00240000000000000 0.0355000000000000 0.360000000000000 0 0
246 206 284 0.00310000000000000 0.0286000000000000 0.500000000000000 0 0
247 263 207 0.0140000000000000 0.0400000000000000 0.00400000000000000 0 0
248 263 283 0.0300000000000000 0.0810000000000000 0.0100000000000000 0 0
249 207 289 0.0100000000000000 0.0600000000000000 0.00900000000000000 0 0
250 207 298 0.0150000000000000 0.0400000000000000 0.00600000000000000 0 0
251 289 128 0.332000000000000 0.688000000000000 0 0 0
252 289 129 0.00900000000000000 0.0460000000000000 0.0250000000000000 0 0
253 289 283 0.0200000000000000 0.0730000000000000 0.00800000000000000 0 0
254 289 298 0.0340000000000000 0.109000000000000 0.0320000000000000 0 0
255 126 208 0.0760000000000000 0.135000000000000 0.00900000000000000 0 0
256 126 283 0.0400000000000000 0.102000000000000 0.00500000000000000 0 0
257 208 283 0.0810000000000000 0.128000000000000 0.0140000000000000 0 0
258 127 209 0.124000000000000 0.183000000000000 0 0 0
259 129 298 0.0100000000000000 0.0590000000000000 0.00800000000000000 0 0
260 209 210 0.0460000000000000 0.0680000000000000 0 0 0
261 210 211 0.302000000000000 0.446000000000000 0 0 0
262 211 130 0.0730000000000000 0.0930000000000000 0 0 0
263 211 212 0.240000000000000 0.421000000000000 0 0 0
264 213 215 0.0139000000000000 0.0778000000000000 0.0860000000000000 0 0
265 214 215 0.00170000000000000 0.0185000000000000 0.0200000000000000 0 0
266 214 222 0.00150000000000000 0.0108000000000000 0.00200000000000000 0 0
267 215 132 0.00450000000000000 0.0249000000000000 0.0260000000000000 0 0
268 132 264 0.00400000000000000 0.0497000000000000 0.0180000000000000 0 0
269 264 216 0 0.0456000000000000 0 0 0
270 264 284 0.000500000000000000 0.0177000000000000 0.0200000000000000 0 0
271 264 265 0.00270000000000000 0.0395000000000000 0.832000000000000 0 0
272 284 285 0.000300000000000000 0.00180000000000000 5.20000000000000 0 0
273 265 216 0.00370000000000000 0.0484000000000000 0.430000000000000 0 0
274 265 133 0.00100000000000000 0.0295000000000000 0.503000000000000 0 0
275 265 221 0.00160000000000000 0.00460000000000000 0.402000000000000 0 0
276 133 134 0.000300000000000000 0.00130000000000000 1 0 0
277 217 218 0.0100000000000000 0.0640000000000000 0.480000000000000 0 0
278 217 135 0.00190000000000000 0.00810000000000000 0.860000000000000 0 0
279 218 124 0.00100000000000000 0.0610000000000000 0 0 0
280 135 290 0.000500000000000000 0.0212000000000000 0 0 0
281 219 220 0.00190000000000000 0.00870000000000000 1.28000000000000 0 0
282 219 290 0.00260000000000000 0.0917000000000000 0 0 0
283 219 266 0.00130000000000000 0.0288000000000000 0.810000000000000 0 0
284 220 203 0 0.0626000000000000 0 0 0
285 290 136 0.000200000000000000 0.00690000000000000 1.36400000000000 0 0
286 290 285 0.000100000000000000 0.000600000000000000 3.57000000000000 0 0
287 136 8 0.00170000000000000 0.0485000000000000 0 0 0
288 266 137 0.000200000000000000 0.0259000000000000 0.144000000000000 0 0
289 266 285 0.000600000000000000 0.0272000000000000 0 0 0
290 137 221 0.000200000000000000 0.000600000000000000 0.800000000000000 0 0
291 138 13 0.000300000000000000 0.00430000000000000 0.00900000000000000 0 0
292 222 267 0.00820000000000000 0.0851000000000000 0 0 0
293 222 268 0.0112000000000000 0.0723000000000000 0 0 0
294 139 140 0.0127000000000000 0.0355000000000000 0 0 0
295 139 267 0.0326000000000000 0.180400000000000 0 0 0
296 140 223 0.0195000000000000 0.0551000000000000 0 0 0
297 267 223 0.0157000000000000 0.0732000000000000 0 0 0
298 267 268 0.0360000000000000 0.211900000000000 0 0 0
299 223 268 0.0268000000000000 0.128500000000000 0 0 0
300 268 224 0.0428000000000000 0.121500000000000 0 0 0
301 224 141 0.0351000000000000 0.100400000000000 0 0 0
302 141 12 0.0616000000000000 0.185700000000000 0 0 0
0 0 0 0 0 0 0 0
97 3.25000000000000 0 0 0 0 0 0
255 0.550000000000000 0 0 0 0 0 0
107 0.345000000000000 0 0 0 0 0 0
194 -2.12000000000000 0 0 0 0 0 0
114 -1.03000000000000 0 0 0 0 0 0
259 0.530000000000000 0 0 0 0 0 0
200 0.450000000000000 0 0 0 0 0 0
203 -1.50000000000000 0 0 0 0 0 0
290 -3 0 0 0 0 0 0
221 -1.50000000000000 0 0 0 0 0 0
138 -1.40000000000000 0 0 0 0 0 0
224 0.456000000000000 0 0 0 0 0 0
300 0.0240000000000000 0 0 0 0 0 0
54 0.0170000000000000 0 0 0 0 0 0
0 0 0 0 0 0 0 0
1 297 269 0.000100000000000000 0.000500000000000000 1.00820000000000 0.904300000000000 1.10430000000000
2 269 226 0.0244000000000000 0.436800000000000 0.966800000000000 0.939100000000000 1.14780000000000
3 269 227 0.0362000000000000 0.649000000000000 0.979600000000000 0.939100000000000 1.14780000000000
4 291 62 0.0158000000000000 0.374900000000000 1.04350000000000 0.939100000000000 1.14780000000000
5 291 63 0.0158000000000000 0.374900000000000 0.939100000000000 0.939100000000000 1.14780000000000
6 291 145 0.0160000000000000 0.380500000000000 1.04350000000000 0.939100000000000 1.14780000000000
7 291 64 0 0.152000000000000 1.04350000000000 0.939100000000000 1.10000000000000
8 291 65 0 0.800000000000000 1.04350000000000 0.939100000000000 1.10000000000000
9 228 47 0.443600000000000 2.81520000000000 1 0.939100000000000 1.10000000000000
10 225 48 0.507500000000000 3.22020000000000 1 0.939100000000000 1.10000000000000
11 229 49 0.666900000000000 3.94400000000000 1 0.939100000000000 1.10000000000000
12 229 50 0.611300000000000 3.61520000000000 1 0.939100000000000 1.10000000000000
13 271 66 0.441200000000000 2.96680000000000 1 0.939100000000000 1.10000000000000
14 271 67 0.307900000000000 2.05700000000000 1 0.939100000000000 1.10000000000000
15 300 51 0.736300000000000 4.67240000000000 1 0.939100000000000 1.10000000000000
16 300 52 0.769800000000000 4.88460000000000 1 0.939100000000000 1.10000000000000
17 300 53 0.757300000000000 4.80560000000000 1 0.939100000000000 1.10000000000000
18 270 59 0.366100000000000 2.45600000000000 1 0.939100000000000 1.10000000000000
19 270 60 1.05930000000000 5.45360000000000 1 0.939100000000000 1.10000000000000
20 270 61 0.156700000000000 1.69940000000000 1 0.900000000000000 1.10000000000000
21 300 54 0.130100000000000 1.39120000000000 1 0.939100000000000 1.10000000000000
22 300 55 0.544800000000000 3.45720000000000 1 0.939100000000000 1.10000000000000
23 300 56 0.154300000000000 1.67290000000000 1 0.939100000000000 1.10000000000000
24 300 57 0.384900000000000 2.57120000000000 1 0.939100000000000 1.10000000000000
25 300 58 0.441200000000000 2.96680000000000 1 0.939100000000000 1.10000000000000
26 145 69 0 0.750000000000000 0.958300000000000 0.939100000000000 1.10000000000000
27 4 214 0.00250000000000000 0.0380000000000000 1 0.939100000000000 1.10000000000000
28 5 285 0.00140000000000000 0.0514000000000000 1 0.939100000000000 1.10000000000000
29 6 290 0.000900000000000000 0.0472000000000000 1 0.939100000000000 1.10000000000000
30 11 285 0.000500000000000000 0.0154000000000000 1 0.939100000000000 1.10000000000000
31 292 146 0 0.0520000000000000 0.947000000000000 0.900000000000000 1.10000000000000
32 292 230 0 0.0520000000000000 0.956000000000000 0.900000000000000 1.10000000000000
33 292 70 0 0.00500000000000000 0.971000000000000 0.900000000000000 1.10000000000000
34 272 147 0 0.0390000000000000 0.948000000000000 0.900000000000000 1.10000000000000
35 272 71 0 0.0390000000000000 0.959000000000000 0.900000000000000 1.10000000000000
36 73 273 0 0.0890000000000000 1.04600000000000 0.900000000000000 1.10000000000000
37 231 73 0 0.0530000000000000 0.985000000000000 0.900000000000000 1.10000000000000
38 286 76 0.0194000000000000 0.0311000000000000 0.956100000000000 0.900000000000000 1.10000000000000
39 149 286 0.00100000000000000 0.0380000000000000 0.971000000000000 0.900000000000000 1.10000000000000
40 233 232 0 0.0140000000000000 0.952000000000000 0.900000000000000 1.10000000000000
41 235 234 0 0.0640000000000000 0.943000000000000 0.900000000000000 1.10000000000000
42 81 237 0 0.0470000000000000 1.01000000000000 0.900000000000000 1.10000000000000
43 240 275 0 0.0200000000000000 1.00800000000000 0.900000000000000 1.10000000000000
44 240 153 0 0.0210000000000000 1 0.900000000000000 1.10000000000000
45 276 158 0 0.0590000000000000 0.975000000000000 0.900000000000000 1.10000000000000
46 159 88 0 0.0380000000000000 1.01700000000000 0.900000000000000 1.10000000000000
47 277 246 0 0.0244000000000000 1 0.900000000000000 1.10000000000000
48 248 164 0 0.0200000000000000 1 0.900000000000000 1.10000000000000
49 91 279 0 0.0480000000000000 1 0.900000000000000 1.10000000000000
50 249 280 0 0.0480000000000000 1 0.900000000000000 1.10000000000000
51 163 169 0 0.0460000000000000 1.01500000000000 0.900000000000000 1.10000000000000
52 175 130 0 0.149000000000000 0.967000000000000 0.900000000000000 1.10000000000000
53 96 178 0.00520000000000000 0.0174000000000000 1.01000000000000 0.900000000000000 1.10000000000000
54 176 95 0 0.0280000000000000 1.05000000000000 0.900000000000000 1.10000000000000
55 256 191 0.000500000000000000 0.0195000000000000 1 0.900000000000000 1.10000000000000
56 299 98 0 0.0180000000000000 1.05220000000000 0.900000000000000 1.10000000000000
57 299 104 0 0.0140000000000000 1.05220000000000 0.900000000000000 1.10000000000000
58 182 116 0.00100000000000000 0.0402000000000000 1.05000000000000 0.900000000000000 1.10000000000000
59 186 198 0.00240000000000000 0.0603000000000000 0.975000000000000 0.900000000000000 1.10000000000000
60 187 260 0.00240000000000000 0.0498000000000000 1 0.900000000000000 1.10000000000000
61 281 101 0 0.0833000000000000 1.03500000000000 0.900000000000000 1.10000000000000
62 281 188 0.00130000000000000 0.0371000000000000 0.956500000000000 0.900000000000000 1.10000000000000
63 282 118 0.000500000000000000 0.0182000000000000 1 0.900000000000000 1.10000000000000
64 105 116 0.00100000000000000 0.0392000000000000 1.05000000000000 0.900000000000000 1.10000000000000
65 189 120 0.00270000000000000 0.0639000000000000 1.07300000000000 0.900000000000000 1.10000000000000
66 190 108 0.000800000000000000 0.0256000000000000 1.05000000000000 0.900000000000000 1.10000000000000
67 193 97 0 0.0160000000000000 1.05060000000000 0.900000000000000 1.10000000000000
68 109 178 0.00120000000000000 0.0396000000000000 0.975000000000000 0.900000000000000 1.10000000000000
69 112 295 0.00130000000000000 0.0384000000000000 0.980000000000000 0.900000000000000 1.10000000000000
70 194 190 0.000900000000000000 0.0231000000000000 0.956000000000000 0.900000000000000 1.10000000000000
71 119 185 0.000300000000000000 0.0131000000000000 1.05000000000000 0.900000000000000 1.10000000000000
72 202 283 0 0.252000000000000 1.03000000000000 0.900000000000000 1.10000000000000
73 204 263 0 0.237000000000000 1.03000000000000 0.900000000000000 1.10000000000000
74 206 213 0.000800000000000000 0.0366000000000000 0.985000000000000 0.900000000000000 1.10000000000000
75 208 224 0 0.220000000000000 1 0.900000000000000 1.10000000000000
76 127 160 0 0.0980000000000000 1.03000000000000 0.900000000000000 1.10000000000000
77 128 298 0 0.128000000000000 1.01000000000000 0.900000000000000 1.10000000000000
78 209 143 0.0200000000000000 0.204000000000000 1.05000000000000 0.900000000000000 1.10000000000000
79 131 289 0.0260000000000000 0.211000000000000 1.03000000000000 0.900000000000000 1.10000000000000
80 298 213 0.00300000000000000 0.0122000000000000 1 0.900000000000000 1.10000000000000
81 216 284 0.00300000000000000 0.0122000000000000 0.970000000000000 0.900000000000000 1.10000000000000
82 134 217 0.00120000000000000 0.0195000000000000 1 0.900000000000000 1.10000000000000
83 220 7 0.00100000000000000 0.0332000000000000 1.02000000000000 0.900000000000000 1.10000000000000
84 266 9 0.000500000000000000 0.0160000000000000 1.07000000000000 0.900000000000000 1.10000000000000
85 221 10 0.000500000000000000 0.0160000000000000 1.02000000000000 0.900000000000000 1.10000000000000
86 263 143 0.000100000000000000 0.0200000000000000 1 0.900000000000000 1.10000000000000
87 254 26 0.00100000000000000 0.0230000000000000 1.02230000000000 0.900000000000000 1.10000000000000
88 255 27 0 0.0230000000000000 0.928400000000000 0.900000000000000 1.10000000000000
89 29 230 0.00100000000000000 0.0146000000000000 1 0.900000000000000 1.10000000000000
90 30 292 0 0.0105000000000000 1 0.900000000000000 1.10000000000000
91 41 158 0 0.0238000000000000 1 0.900000000000000 1.10000000000000
92 42 276 0 0.0321000000000000 0.950000000000000 0.900000000000000 1.10000000000000
93 46 114 0 0.0154000000000000 1 0.900000000000000 1.10000000000000
94 35 235 0 0.0289000000000000 1 0.900000000000000 1.10000000000000
95 28 146 0 0.0195000000000000 1 0.900000000000000 1.10000000000000
96 44 299 0 0.0193000000000000 1 0.900000000000000 1.10000000000000
97 31 273 0 0.0192000000000000 1 0.900000000000000 1.10000000000000
98 34 234 0 0.0230000000000000 1 0.900000000000000 1.10000000000000
99 38 241 0 0.0124000000000000 1 0.900000000000000 1.10000000000000
100 45 185 0 0.0167000000000000 1 0.900000000000000 1.10000000000000
101 32 231 0 0.0312000000000000 1 0.900000000000000 1.10000000000000
102 33 76 0 0.0165000000000000 0.942000000000000 0.900000000000000 1.10000000000000
103 36 82 0 0.0316000000000000 0.965000000000000 0.900000000000000 1.10000000000000
104 40 243 0 0.0535000000000000 0.950000000000000 0.900000000000000 1.10000000000000
105 37 275 0 0.181800000000000 0.942000000000000 0.900000000000000 1.10000000000000
106 39 242 0 0.196100000000000 0.942000000000000 0.900000000000000 1.10000000000000
107 43 244 0 0.0690000000000000 0.956500000000000 0.900000000000000 1.10000000000000
0 0 0 0 0 0 0 0
1 375 0 37 13 0 0 0
2 0 0 763.600000000000 291.100000000000 0 0 0
3 200 0 0 0 0 0 0
4 272 0 0 0 0 0 0
5 250 0 328 188 0 0 0
6 303 0 538 369 0 0 0
7 345 0 0 0 0 0 0
8 300 0 404 212 0 0 0
9 600 0 0 0 0 0 0
10 550 0 0 0 0 0 0
11 575.430000000000 0 0 0 0 0 0
12 0 0 -23 -17 0 0 0
13 0 0 -33.1000000000000 -29.4000000000000 0 0 0
14 0 0 115.800000000000 -24 0 0 0
15 0 0 2.40000000000000 -12.6000000000000 0 0 0
16 0 0 2.40000000000000 -3.90000000000000 0 0 0
17 0 0 -14.9000000000000 26.5000000000000 0 0 0
18 0 0 24.7000000000000 -1.20000000000000 0 0 0
19 0 0 145.300000000000 -34.9000000000000 0 0 0
20 0 0 28.1000000000000 -20.5000000000000 0 0 0
21 0 0 14 2.50000000000000 0 0 0
22 0 0 -11.1000000000000 -1.40000000000000 0 0 0
23 0 0 50.5000000000000 17.4000000000000 0 0 0
24 0 0 29.6000000000000 0.600000000000000 0 0 0
25 0 0 -113.700000000000 76.7000000000000 0 0 0
26 0 0 100.310000000000 29.1700000000000 0 0 0
27 0 0 -100 34.1700000000000 0 0 0
28 467 0 0 0 0 0 0
29 623 0 0 0 0 0 0
30 1210 0 0 0 0 0 0
31 234 0 0 0 0 0 0
32 372 0 0 0 0 0 0
33 330 0 0 0 0 0 0
34 185 0 0 0 0 0 0
35 410 0 0 0 0 0 0
36 500 0 0 0 0 0 0
37 37 0 0 0 0 0 0
38 0 0 0 0 0 0 0
39 45 0 0 0 0 0 0
40 165 0 0 0 0 0 0
41 400 0 0 0 0 0 0
42 400 0 0 0 0 0 0
43 116 0 0 0 0 0 0
44 1292 0 0 0 0 0 0
45 700 0 0 0 0 0 0
46 553 0 0 0 0 0 0
47 0 0 1.53000000000000 0.530000000000000 0 0 0
48 0 0 1.35000000000000 0.470000000000000 0 0 0
49 0 0 0.450000000000000 0.160000000000000 0 0 0
50 0 0 0.450000000000000 0.160000000000000 0 0 0
51 0 0 1.84000000000000 0.640000000000000 0 0 0
52 0 0 1.39000000000000 0.480000000000000 0 0 0
53 0 0 1.89000000000000 0.650000000000000 0 0 0
54 0 0 1.55000000000000 0.540000000000000 0 0 0
55 0 0 1.66000000000000 0.580000000000000 0 0 0
56 0 0 3.03000000000000 1 0 0 0
57 0 0 1.86000000000000 0.640000000000000 0 0 0
58 0 0 2.58000000000000 0.890000000000000 0 0 0
59 0 0 1.01000000000000 0.350000000000000 0 0 0
60 0 0 0.810000000000000 0.280000000000000 0 0 0
61 0 0 1.60000000000000 0.520000000000000 0 0 0
62 -35.8100000000000 0 0 0 0 0 0
63 0 0 30 23 0 0 0
64 50 0 0 0 0 0 0
65 8 0 0 0 0 0 0
66 0 0 1.02000000000000 0.350000000000000 0 0 0
67 0 0 1.02000000000000 0.350000000000000 0 0 0
68 0 0 3.80000000000000 1.25000000000000 0 0 0
69 0 0 1.19000000000000 0.410000000000000 0 0 0
70 0 0 0 0 0 0 0
71 0 0 120 41 0 0 0
72 0 0 96 43 0 0 0
73 -5 0 148 33 0 0 0
74 0 0 58 10 0 0 0
75 0 0 160 60 0 0 0
76 0 0 561 220 0 0 0
77 0 0 81 23 0 0 0
78 0 0 45 12 0 0 0
79 0 0 69 13 0 0 0
80 0 0 0 0 0 0 0
81 0 0 0 0 0 0 0
82 0 0 0 0 0 0 0
83 0 0 61 28 0 0 0
84 0 0 69 3 0 0 0
85 0 0 14 1 0 0 0
86 0 0 218 106 0 0 0
87 0 0 0 0 0 0 0
88 0 0 0 0 0 0 0
89 0 0 56 20 0 0 0
90 0 0 28 7 0 0 0
91 0 0 0 0 0 0 0
92 68 0 66.7000000000000 0 0 0 0
93 0 0 19.6000000000000 0 0 0 0
94 0 0 26.2000000000000 0 0 0 0
95 0 0 0 0 0 0 0
96 0 0 0 0 0 0 0
97 0 0 0 0 0 0 0
98 0 0 0 0 0 0 0
99 0 0 169.200000000000 41.6000000000000 0 0 0
100 -192.500000000000 0 826.700000000000 135.200000000000 0 0 0
101 0 0 0 0 0 0 0
102 217 0 0 0 0 0 0
103 103 0 0 0 0 0 0
104 0 0 0 0 0 0 0
105 0 0 0 0 0 0 0
106 372 0 17 9 0 0 0
107 0 0 70 5 0 0 0
108 0 0 75 50 0 0 0
109 0 0 0 0 0 0 0
110 0 0 35 15 0 0 0
111 0 0 85 24 0 0 0
112 0 0 0 0.400000000000000 0 0 0
113 0 0 0 0 0 0 0
114 0 0 0 0 0 0 0
115 0 0 299.900000000000 95.7000000000000 0 0 0
116 205 0 481.800000000000 205 0 0 0
117 84 0 28 12 0 0 0
118 0 0 69.5000000000000 49.3000000000000 0 0 0
119 0 0 240.700000000000 89 0 0 0
120 0 0 40 4 0 0 0
121 0 0 136.800000000000 16.6000000000000 0 0 0
122 1200 0 59.8000000000000 24.3000000000000 0 0 0
123 1200 0 59.8000000000000 24.3000000000000 0 0 0
124 1973 0 489 53 0 0 0
125 0 0 800 72 0 0 0
126 0 0 35 12 0 0 0
127 0 0 41 14 0 0 0
128 0 0 38 13 0 0 0
129 0 0 42 14 0 0 0
130 0 0 -21 -14.2000000000000 0 0 0
131 0 0 38 13 0 0 0
132 0 0 176 105 0 0 0
133 450 0 171 70 0 0 0
134 0 0 428 232 0 0 0
135 0 0 0 0 0 0 0
136 0 0 448 143 0 0 0
137 0 0 269 157 0 0 0
138 0 0 0 0 0 0 0
139 84 0 8 3 0 0 0
140 0 0 0 0 0 0 0
141 0 0 29 14 0 0 0
142 0 0 0 0 0 0 0
143 0 0 0 0 0 0 0
144 0 0 0 0 0 0 0
145 -26.4800000000000 0 0 0 0 0 0
146 0 0 90 49 0 0 0
147 0 0 353 130 0 0 0
148 -5 0 58 14 0 0 0
149 0 0 0 0 0 0 0
150 0 0 0 0 0 0 0
151 0 0 28 9 0 0 0
152 0 0 46 -21 0 0 0
153 0 0 0 0 0 0 0
154 0 0 58 11.8000000000000 0 0 0
155 0 0 41 19 0 0 0
156 0 0 -5 5 0 0 0
157 0 0 10 1 0 0 0
158 0 0 227 110 0 0 0
159 0 0 70 30 0 0 0
160 0 0 0 0 0 0 0
161 0 0 208 107 0 0 0
162 0 0 0 0 0 0 0
163 0 0 0 0 0 0 0
164 0 0 0 0 0 0 0
165 0 0 44.2000000000000 0 0 0 0
166 0 0 66 0 0 0 0
167 155 0 17.4000000000000 0 0 0 0
168 290 0 15.8000000000000 0 0 0 0
169 0 0 60.3000000000000 0 0 0 0
170 0 0 0 0 0 0 0
171 0 0 32 0 0 0 0
172 0 0 8.60000000000000 0 0 0 0
173 0 0 4.60000000000000 0 0 0 0
174 117 0 112.100000000000 0 0 0 0
175 0 0 18.2000000000000 0 0 0 0
176 0 0 535 55 0 0 0
177 0 0 78 1.40000000000000 0 0 0
178 240 0 276.400000000000 59.3000000000000 0 0 0
179 0 0 514.800000000000 82.7000000000000 0 0 0
180 0 0 0 0 0 0 0
181 0 0 0 0 0 0 0
182 0 0 0 0 0 0 0
183 0 0 0 0 0 0 0
184 0 0 55.2000000000000 18.2000000000000 0 0 0
185 0 0 595 83.3000000000000 0 0 0
186 281 0 145 58 0 0 0
187 0 0 56.5000000000000 24.5000000000000 0 0 0
188 0 0 63 25 0 0 0
189 216 0 0 0 0 0 0
190 0 0 200 50 0 0 0
191 0 0 123.500000000000 -24.3000000000000 0 0 0
192 0 0 0 0 0 0 0
193 0 0 33 16.5000000000000 0 0 0
194 0 0 0 0 0 0 0
195 0 0 0 0 0 0 0
196 0 0 0 0 0 0 0
197 0 0 26.5000000000000 0 0 0 0
198 0 0 0 0 0 0 0
199 228 0 5 4 0 0 0
200 0 0 74 29 0 0 0
201 0 0 73.4000000000000 0 0 0 0
202 0 0 7 2 0 0 0
203 475 0 0 0 0 0 0
204 0 0 0 0 0 0 0
205 0 0 0 0 0 0 0
206 0 0 0 0 0 0 0
207 0 0 43 14 0 0 0
208 0 0 27 12 0 0 0
209 0 0 72 24 0 0 0
210 0 0 0 -5 0 0 0
211 0 0 12 2 0 0 0
212 0 0 7 2 0 0 0
213 0 0 0 0 0 0 0
214 0 0 22 16 0 0 0
215 0 0 47 26 0 0 0
216 0 0 131 96 0 0 0
217 0 0 173 99 0 0 0
218 0 0 410 40 0 0 0
219 0 0 223 148 0 0 0
220 0 0 96 46 0 0 0
221 250 0 255 149 0 0 0
222 170 0 0 0 0 0 0
223 0 0 77 33 0 0 0
224 0 0 29 14 0 0 0
225 -4.20000000000000 0 0 0 0 0 0
226 0 0 0 0 0 0 0
227 0 0 0 0 0 0 0
228 0 0 4.75000000000000 1.56000000000000 0 0 0
229 0 0 0 0 0 0 0
230 0 0 56 15 0 0 0
231 0 0 0 0 0 0 0
232 -10 0 595 120 0 0 0
233 0 0 77 1 0 0 0
234 0 0 21 7 0 0 0
235 0 0 0 0 0 0 0
236 0 0 55 6 0 0 0
237 0 0 0 0 0 0 0
238 0 0 155 18 0 0 0
239 0 0 39 9 0 0 0
240 0 0 0 0 0 0 0
241 0 0 92 26 0 0 0
242 0 0 22 10 0 0 0
243 0 0 98 20 0 0 0
244 0 0 116 38 0 0 0
245 0 0 57 19 0 0 0
246 0 0 0 0 0 0 0
247 0 0 48 14 0 0 0
248 0 0 0 0 0 0 0
249 0 0 0 0 0 0 0
250 0 0 49.6000000000000 0 0 0 0
251 0 0 30.7000000000000 0 0 0 0
252 0 0 63 0 0 0 0
253 0 0 14.1000000000000 650 0 0 0
254 1930 0 0 0 0 0 0
255 0 0 777 215 0 0 0
256 0 0 229.100000000000 11.8000000000000 0 0 0
257 0 0 380.800000000000 37 0 0 0
258 84 0 0 0 0 0 0
259 0 0 163.500000000000 43 0 0 0
260 0 0 176 83 0 0 0
261 0 0 427.400000000000 173.600000000000 0 0 0
262 0 0 182.600000000000 43.6000000000000 0 0 0
263 0 0 10 3 0 0 0
264 0 0 100 75 0 0 0
265 100 0 285 100 0 0 0
266 0 0 572 244 0 0 0
267 0 0 61 30 0 0 0
268 0 0 61 30 0 0 0
269 0 0 0 0 0 0 0
270 0 0 0.860000000000000 0.280000000000000 0 0 0
271 0 0 0 0 0 0 0
272 0 0 0 0 0 0 0
273 0 0 83 21 0 0 0
274 0 0 0 0 0 0 0
275 0 0 195 29 0 0 0
276 0 0 0 0 0 0 0
277 0 0 224 71 0 0 0
278 0 0 39.9000000000000 0 0 0 0
279 0 0 83.5000000000000 0 0 0 0
280 0 0 77.8000000000000 0 0 0 0
281 696 0 89.5000000000000 35.5000000000000 0 0 0
282 0 0 24 14 0 0 0
283 0 0 0 0 0 0 0
284 0 0 0 0 0 0 0
285 0 0 0 0 0 0 0
286 0 0 126.700000000000 23 0 0 0
287 0 0 86 0 0 0 0
288 0 0 0 0 0 0 0
289 424 0 64 21 0 0 0
290 0 0 159 107 0 0 0
291 0 0 0 0 0 0 0
292 0 0 20 0 0 0 0
293 0 0 74 28 0 0 0
294 0 0 57.9000000000000 5.10000000000000 0 0 0
295 0 0 273.600000000000 99.8000000000000 0 0 0
296 0 0 387.700000000000 114.700000000000 0 0 0
297 0 0 85 32 0 0 0
298 0 0 96 7 0 0 0
299 0 0 0 0 0 0 0
300 0 0 2.71000000000000 0.940000000000000 0 0 0
0 0 0 0 0 0 0 0
148 1.01530000000000 -10 10 0 0 0 0
73 1.02050000000000 -20 20 0 0 0 0
232 1.00100000000000 -20 20 0 0 0 0
159 0.958300000000000 -25 25 0 0 0 0
161 0.963200000000000 12 35 0 0 0 0
1 1.02500000000000 -240 240 0 0 0 0
167 1.05200000000000 -11 96 0 0 0 0
168 1.05200000000000 -153 153 0 0 0 0
92 1 -30 56 0 0 0 0
174 0.990000000000000 -24 77 0 0 0 0
254 1.04350000000000 -500 1500 0 0 0 0
178 1.02330000000000 -60 120 0 0 0 0
179 1.01030000000000 -25 200 0 0 0 0
100 1.05500000000000 -125 350 0 0 0 0
186 1.05100000000000 -50 75 0 0 0 0
281 1.04350000000000 -100 300 0 0 0 0
258 1.05280000000000 -15 35 0 0 0 0
102 1.05280000000000 -50 100 0 0 0 0
103 1.07350000000000 -25 50 0 0 0 0
106 1.05350000000000 -50 175 0 0 0 0
189 1.04350000000000 -50 90 0 0 0 0
108 0.963000000000000 -10 15 0 0 0 0
116 0.929000000000000 -40 90 0 0 0 0
2 0.982900000000000 -50 150 0 0 0 0
199 1.05220000000000 -45 90 0 0 0 0
117 1.00770000000000 -15 35 0 0 0 0
3 1.05220000000000 -50 80 0 0 0 0
122 1.06500000000000 -100 400 0 0 0 0
123 1.06500000000000 -100 400 0 0 0 0
203 1.05510000000000 -300 300 0 0 0 0
124 1.04350000000000 -1000 1000 0 0 0 0
289 1.01500000000000 -260 260 0 0 0 0
4 1.01000000000000 -150 150 0 0 0 0
265 1.00800000000000 -60 60 0 0 0 0
133 1 -320 320 0 0 0 0
5 1.05000000000000 -300 300 0 0 0 0
6 1 -300 300 0 0 0 0
7 1.04000000000000 -250 250 0 0 0 0
8 1 -500 500 0 0 0 0
9 1.01650000000000 -300 300 0 0 0 0
221 1.01000000000000 -200 200 0 0 0 0
10 1 -400 400 0 0 0 0
11 1.05000000000000 -600 600 0 0 0 0
222 0.993000000000000 40 100 0 0 0 0
139 1.01000000000000 40 80 0 0 0 0
28 1.05070000000000 -210 210 0 0 0 0
29 1.05070000000000 -280 280 0 0 0 0
30 1.03230000000000 -420 420 0 0 0 0
31 1.01450000000000 -100 100 0 0 0 0
32 1.01450000000000 -224 224 0 0 0 0
33 1.05070000000000 0 350 0 0 0 0
34 1.05070000000000 0 120 0 0 0 0
35 1.02900000000000 -224 224 0 0 0 0
36 1.05000000000000 -200 200 0 0 0 0
37 1.01450000000000 0 42 0 0 0 0
38 1.05070000000000 -500 500 0 0 0 0
39 0.996700000000000 0 25 0 0 0 0
40 1.02120000000000 -90 90 0 0 0 0
41 1.01450000000000 -150 150 0 0 0 0
42 1.00170000000000 0 150 0 0 0 0
43 0.989300000000000 0 87 0 0 0 0
44 1.05070000000000 -100 600 0 0 0 0
45 1.05070000000000 -125 325 0 0 0 0
46 1.01450000000000 -200 300 0 0 0 0
225 0.994500000000000 -2 2 0 0 0 0
62 1 -17.3500000000000 17.3500000000000 0 0 0 0
145 1 -12.8000000000000 12.8300000000000 0 0 0 0
64 1 -38 38 0 0 0 0
65 1 -6 6 0 0 0 0
0 0 0 0 0 0 0 0
5 0.200000000000000 0.200000000000000 0.137500000000000 210 600 0 0
4 0.300000000000000 0.175000000000000 0.175000000000000 200 580 0 0
9 0.300000000000000 0.125000000000000 0.100000000000000 200 800 0 0
11 0.350000000000000 0.225000000000000 0.128300000000000 300 800 0 0
28 0.220000000000000 0.143000000000000 0.250000000000000 300 600 0 0
29 0.750000000000000 0.125000000000000 0.250000000000000 300 800 0 0
30 0.540000000000000 0.195000000000000 0.252000000000000 600 1600 0 0
31 0.380000000000000 0.220000000000000 0.439000000000000 200 400 0 0
32 0.360000000000000 0.125000000000000 0.635000000000000 200 500 0 0
33 0.900000000000000 0.130000000000000 0.0250000000000000 200 500 0 0
34 0.830000000000000 0.230000000000000 0.0730000000000000 100 300 0 0
35 0.440000000000000 0.143000000000000 0.312000000000000 320 600 0 0
36 0.120000000000000 0.140000000000000 0.665000000000000 400 800 0 0
38 0.540000000000000 0.115000000000000 0.102000000000000 600 1600 0 0
40 0.660000000000000 0.155000000000000 0.265000000000000 100 350 0 0
41 0.820000000000000 0.160000000000000 0.700000000000000 250 600 0 0
42 0.440000000000000 0.145000000000000 0.105000000000000 250 600 0 0
43 0.350000000000000 0.127000000000000 0.450000000000000 80 300 0 0
44 0.540000000000000 0.125000000000000 0.122000000000000 600 1600 0 0
45 0.380000000000000 0.200000000000000 0.139000000000000 500 900 0 0
46 0.360000000000000 0.125000000000000 0.235000000000000 400 800 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0

23
IEEE4.dat Normal file
View File

@ -0,0 +1,23 @@
4 4 1. 18 .1
1.e-5 2
1 4
0
1 1 2 .1 .4 0.01528
2 1 4 .12 .5 0.0192
3 2 4 .08 .4 0.01413
0
0
1 1 3 .0 .3 0.90909 .9 1.15
0
1 0. 0. 0.3 0.18
2 0. 0. 0.55 0.13
3 0.5 0. 0. 0.
4 0.36 0.26 0. 0.
0
3 1.1 -0.1 0.6
4 1.05 -0.6 0.6
0
3 44.4 351. 50. 0.3 1.2
4 40.6 389. 50. 0.3 1.2
0
0

13
Initial.m Normal file
View File

@ -0,0 +1,13 @@
function [P0,Q0,U,Uangle] = Initial(PG,PD,PQstandard,Pointpoweri,QG,QD,Busnum)
%**************************************************************************
% :
%
% 2010.12
%**************************************************************************
%%
P0 = sparse(1, Pointpoweri,(PG-PD)/PQstandard); %
Q0 = sparse(1, Pointpoweri,(QG-QD)/PQstandard); %
%%
U = ones(1,Busnum); %
Uangle = zeros(1,Busnum); %
end

18
Modification.asv Normal file
View File

@ -0,0 +1,18 @@
function [Init_Z,Init_L,Init_W,Init_U,Init_Y,deltZ,deltL,deltW,deltU,deltX,deltY,PG,QG,Volt,UAngel]=Modification(Init_Z,Init_L,Init_W,Init_U,Init_Y,deltZ,deltL,deltW,deltU,deltX,deltY,PG,QG,Volt,UAngel,PVi,ContrlCount,Balance,Busnum,PGi)
AlphaP=FormAlphaP(Init_L,deltL,Init_U,deltU);
fprintf('AlphaP %f\n',AlphaP);
AlphaD=FormAlphaD(Init_Z,deltZ,Init_W,deltW);
fprintf('AlphaD %f\n',AlphaD);
Init_Z=Init_Z+AlphaD*deltZ';
Init_L=Init_L+AlphaP*deltL';
Init_W=Init_W+AlphaD*deltW';
Init_U=Init_U+AlphaP*deltU';
Init_Y=Init_Y+AlphaD*deltY';
PG(PVi)=PG(PGi)+deltX(size(PGi,1));
QG(PVi)=QG(PVi)+deltX(size(PGi,1)+1,1:(size(PVi,1)+size(PGi,1)));
t=deltX(size(PVi,1)+size(PGi,1)+1,ContrlCount)';
t(2*Balance-1)=0;
Volt=Volt+AlphaP*t(2:2:2*Busnum);
UAngel=UAngel+AlphaP*t(1:2:2*Busnum);
end

22
Modification.m Normal file
View File

@ -0,0 +1,22 @@
function [Init_Z,Init_L,Init_W,Init_U,Init_Y,PG,QG,Volt,UAngel]=Modification(Init_Z,Init_L,Init_W,Init_U,Init_Y,deltZ,deltL,deltW,deltU,deltX,deltY,PG,QG,Volt,UAngel,PVi,ContrlCount,Balance,Busnum,PGi)
AlphaP=FormAlphaP(Init_L,deltL,Init_U,deltU);
fprintf('AlphaP %f\n',AlphaP);
AlphaD=FormAlphaD(Init_Z,deltZ,Init_W,deltW);
fprintf('AlphaD %f\n',AlphaD);
Init_Z=Init_Z+AlphaD*deltZ';
Init_L=Init_L+AlphaP*deltL';
Init_W=Init_W+AlphaD*deltW';
Init_U=Init_U+AlphaP*deltU';
Init_Y=Init_Y+AlphaD*deltY';
%PG(PGi)=PG(PGi)+deltX(1:size(PGi,1));
PG(PGi)=PG(PGi)+AlphaP*deltX(1:size(PGi,1));
%QG(PVi)=QG(PVi)+deltX(size(PGi,1)+1:size(PVi,1)+size(PGi,1) );
QG(PVi)=QG(PVi)+AlphaP*deltX(size(PGi,1)+1:size(PVi,1)+size(PGi,1) );
t=deltX(size(PVi,1)+size(PGi,1)+1:ContrlCount)';
t(Busnum+Balance)=0;
%Volt=Volt+AlphaP*t(2:2:2*Busnum);ÔÝʱ¸ÄÒ»ÏÂ20111227
%UAngel=UAngel+AlphaP*t(1:2:2*Busnum);ÔÝʱ¸ÄÒ»ÏÂ20111227
Volt=Volt+AlphaP*t(1:Busnum);
UAngel=UAngel+AlphaP*t(Busnum+1:2*Busnum);
end

75
OPF.asv Normal file
View File

@ -0,0 +1,75 @@
tic
clear
%[kmax,Precision,UAngel,Volt,Busnum,PVi,PVu,Balance,Y,Angle,P0,Q0,r,c,GB,Linei,Linej,Transfori,Transforj,GenU,GenL,GenC,LineLimti,LineLimtj,LinePLimt,PG,QG,PD,QD,CenterA,LineCount,PGi,PVQU,PVQL]=pf('5sj.txt');
[kmax,Precision,UAngel,Volt,Busnum,PVi,PVu,Balance,Y,Angle,P0,Q0,r,c,GB,Linei,Linej,Transfori,Transforj,GenU,GenL,GenC,PG,QG,PD,QD,CenterA,PGi,PVQU,PVQL]=pf('ieee14.dat');
GB=full(GB);
%PVi电压节点序号
%PVu电压节点电压标幺值
Volt
UAngel*180/3.1415926
%sprintf('%f\n',Volt);
%sprintf('%f\n',Angel);
%% 初值
[Volt,UAngel,Init_Z,Init_W,Init_L,Init_U,Init_Y,PG,QG,RestraintCount]=OPF_Init(Busnum,Balance,PG,QG,Volt,GenU,GenL,PVi,PGi,PVQU,PVQL);
Gap=(Init_L*Init_Z'-Init_U*Init_W');
KK=0;
plotGap=zeros(1,50);
ContrlCount=size(PVi,1)+size(PGi,1)+Busnum*2;
while(abs(Gap)>Precision)
if KK>kmax
break;
end
plotGap(KK+1)=Gap;
Init_u=Gap/2/RestraintCount*CenterA;
AngleIJMat=repmat(UAngel',1,Busnum)-repmat(UAngel,Busnum,1);
%indexi=[Linei',Transfori'];
%indexj=[Linej',Transforj'];
%% 开始计算OPF
%% 形成等式约束的雅克比
deltH=func_deltH(Busnum,Volt,PVi,AngleIJMat,Y,GB,PGi);
%% 形成不等式约束的雅克比
deltG=func_deltG(Busnum,PVi,PGi);
%%
L_1Z=diag(Init_Z./Init_L);
U_1W=diag(Init_W./Init_U);
%% 形成海森阵
deltdeltF=func_deltdeltF(Busnum,GenC,PVi,PGi);
%% 形成ddHy
ddh=func_ddh3(AngleIJMat,GB,Volt,Init_Y,Busnum,PVi,PGi,Y);
%% 开始构建ddg
ddg=func_ddg(PGi,PVi,Busnum,RestraintCount);
%% 开始构建deltF
deltF=func_deltF(PG,PVi,GenC,ContrlCount,PGi);
%% 形成方程矩阵
% Hcoma=-deltdeltF+ddh+ddg-deltG*(L_1Z-U_1W)*deltG';
%AA=FormAA1(deltG,deltdeltF,ddh,ddg,deltH,Init_L,Init_U,Init_W,Init_Z,Busnum,PVi,PGi,RestraintCount,Balance);
%AA=FormAA(L_1Z,deltG,U_1W,Hcoma,deltH);
%%
Luu=Init_U'.*Init_W'+Init_u*ones(RestraintCount,1);
Lul=Init_L'.*Init_Z'-Init_u*ones(RestraintCount,1);
Mat_G=FormG(Volt,PVi,PGi,PG,QG);
Mat_H=FormH(Busnum,GB,AngleIJMat,Volt,PG,PD,QG,QD,Y);
Ly=Mat_H;
Lz=FormLz(Mat_G,Init_L,GenL,Busnum,PVQL);
Lw=FormLw(Mat_G,Init_U,GenU,Busnum,PVQU);
Lx=FormLx(deltF,deltH,Init_Y,deltG,Init_Z,Init_W);
%LxComa=FormLxComa(deltF,deltG,deltH,Init_L,Luu,Lul,Init_Z,Init_Y,Lz,Init_U,Init_W,Lw);
YY=FormYY1(Lul,Lz,Ly,Luu,Lw,Lx);
%YY=FormYY(Init_L,Lul,Lz,Ly,Init_U,Luu,Lw,LxComa);
%% 开始解方程
%XX=AA\YY;
XX=SolveIt(deltF,deltG,Init_L,Init_Z,Init_U,Init_W,deltdeltF,ddh,ddg,deltH,Init_Y,Ly,Lz,ContrlCount,Lw,Lul,Luu,RestraintCount,Lx,Balance,PVi,PGi,Busnum);
%%取各分量
[deltZ,deltL,deltW,deltU,deltX,deltY]=AssignXX1(XX,ContrlCount,RestraintCount,Busnum);
%[deltZ,deltL,deltW,deltU,deltX,deltY]=AssignXX(XX);
[Init_Z,Init_L,Init_W,Init_U,Init_Y,PG,QG,Volt,UAngel]=Modification(Init_Z,Init_L,Init_W,Init_U,Init_Y,deltZ,deltL,deltW,deltU,deltX,deltY,PG,QG,Volt,UAngel,PVi,ContrlCount,Balance,Busnum,PGi);
Gap=(Init_L*Init_Z'-Init_U*Init_W');
KK=KK+1;
end
fprintf('迭代次数%d\n',KK);
CalCost(GenC,PG,PGi);
DrawGap(plotGap);
toc

75
OPF.m Normal file
View File

@ -0,0 +1,75 @@
tic
clear
%[kmax,Precision,UAngel,Volt,Busnum,PVi,PVu,Balance,Y,Angle,P0,Q0,r,c,GB,Linei,Linej,Transfori,Transforj,GenU,GenL,GenC,LineLimti,LineLimtj,LinePLimt,PG,QG,PD,QD,CenterA,LineCount,PGi,PVQU,PVQL]=pf('5sj.txt');
[kmax,Precision,UAngel,Volt,Busnum,PVi,PVu,Balance,Y,Angle,P0,Q0,r,c,GB,Linei,Linej,Transfori,Transforj,GenU,GenL,GenC,PG,QG,PD,QD,CenterA,PGi,PVQU,PVQL]=pf('ieee3001.dat');
GB=full(GB);
%PVi
%PVu
Volt
UAngel*180/3.1415926
%sprintf('%f\n',Volt);
%sprintf('%f\n',Angel);
%%
[Volt,UAngel,Init_Z,Init_W,Init_L,Init_U,Init_Y,PG,QG,RestraintCount]=OPF_Init(Busnum,Balance,PG,QG,Volt,GenU,GenL,PVi,PGi,PVQU,PVQL);
Gap=(Init_L*Init_Z'-Init_U*Init_W');
KK=0;
plotGap=zeros(1,50);
ContrlCount=size(PVi,1)+size(PGi,1)+Busnum*2;
while(abs(Gap)>Precision)
if KK>kmax
break;
end
plotGap(KK+1)=Gap;
Init_u=Gap/2/RestraintCount*CenterA;
AngleIJMat=repmat(UAngel',1,Busnum)-repmat(UAngel,Busnum,1);
%indexi=[Linei',Transfori'];
%indexj=[Linej',Transforj'];
%% OPF
%%
deltH=func_deltH(Busnum,Volt,PVi,AngleIJMat,Y,GB,PGi);
%%
deltG=func_deltG(Busnum,PVi,PGi);
%%
L_1Z=diag(Init_Z./Init_L);
U_1W=diag(Init_W./Init_U);
%%
deltdeltF=func_deltdeltF(Busnum,GenC,PVi,PGi);
%% ddHy
ddh=func_ddh3(AngleIJMat,GB,Volt,Init_Y,Busnum,PVi,PGi,Y);
%% ddg
ddg=func_ddg(PGi,PVi,Busnum,RestraintCount);
%% deltF
deltF=func_deltF(PG,PVi,GenC,ContrlCount,PGi);
%%
% Hcoma=-deltdeltF+ddh+ddg-deltG*(L_1Z-U_1W)*deltG';
%AA=FormAA1(deltG,deltdeltF,ddh,ddg,deltH,Init_L,Init_U,Init_W,Init_Z,Busnum,PVi,PGi,RestraintCount,Balance);
%AA=FormAA(L_1Z,deltG,U_1W,Hcoma,deltH);
%%
Luu=Init_U'.*Init_W'+Init_u*ones(RestraintCount,1);
Lul=Init_L'.*Init_Z'-Init_u*ones(RestraintCount,1);
Mat_G=FormG(Volt,PVi,PGi,PG,QG);
Mat_H=FormH(Busnum,GB,AngleIJMat,Volt,PG,PD,QG,QD,Y);
Ly=Mat_H;
Lz=FormLz(Mat_G,Init_L,GenL,Busnum,PVQL);
Lw=FormLw(Mat_G,Init_U,GenU,Busnum,PVQU);
Lx=FormLx(deltF,deltH,Init_Y,deltG,Init_Z,Init_W);
%LxComa=FormLxComa(deltF,deltG,deltH,Init_L,Luu,Lul,Init_Z,Init_Y,Lz,Init_U,Init_W,Lw);
YY=FormYY1(Lul,Lz,Ly,Luu,Lw,Lx);
%YY=FormYY(Init_L,Lul,Lz,Ly,Init_U,Luu,Lw,LxComa);
%%
%XX=AA\YY;
XX=SolveIt(deltF,deltG,Init_L,Init_Z,Init_U,Init_W,deltdeltF,ddh,ddg,deltH,Init_Y,Ly,Lz,ContrlCount,Lw,Lul,Luu,RestraintCount,Lx,Balance,PVi,PGi,Busnum);
%%
[deltZ,deltL,deltW,deltU,deltX,deltY]=AssignXX1(XX,ContrlCount,RestraintCount,Busnum);
%[deltZ,deltL,deltW,deltU,deltX,deltY]=AssignXX(XX);
[Init_Z,Init_L,Init_W,Init_U,Init_Y,PG,QG,Volt,UAngel]=Modification(Init_Z,Init_L,Init_W,Init_U,Init_Y,deltZ,deltL,deltW,deltU,deltX,deltY,PG,QG,Volt,UAngel,PVi,ContrlCount,Balance,Busnum,PGi);
Gap=(Init_L*Init_Z'-Init_U*Init_W');
KK=KK+1;
end
fprintf('%d\n',KK);
CalCost(GenC,PG,PGi);
DrawGap(plotGap);
toc

22
OPF_Init.asv Normal file
View File

@ -0,0 +1,22 @@
function [Volt,UAngel,Init_Z,Init_W,Init_L,Init_U,Init_Y,PG,QG,RestraintCount]=OPF_Init(Busnum,Balance,PG,QG,Volt,LineNum,GenU,GenL,PVi,PGi)
RestraintCount=size(PVi,1)+size(PGi,1)+Busnum+LineNum; %约束条件数
t_Bal_volt=Volt(Balance);
Volt=ones(1,Busnum);
Volt(Balance)=t_Bal_volt;
UAngel=zeros(1,Busnum);
Init_Z=ones(1,RestraintCount);
Init_W=-.5*ones(1,RestraintCount);
Init_L=ones(1,RestraintCount);
Init_U=ones(1,RestraintCount);
Init_Y=zeros(1,2*Busnum);
Init_Y(1:2:2*Busnum)=1e-10;
Init_Y(2:2:2*Busnum)=-1e-10;
tPU=GenU(:,2);% 发电机有功上限
tQU=GenU(:,3);% 发电机无功上限
tPL=GenL(:,2);% 发电机有功下限
tQL=GenL(:,3);% 发电机无功下限
%PG(4:5)=[4.5 4.5];
PG(PVi)=(tPU+tPL)/2;
%QG(4:5)=[0 1.45];
QG(PVi)=(tQU+tQL)/2;
end

25
OPF_Init.m Normal file
View File

@ -0,0 +1,25 @@
function [Volt,UAngel,Init_Z,Init_W,Init_L,Init_U,Init_Y,PG,QG,RestraintCount]=OPF_Init(Busnum,Balance,PG,QG,Volt,GenU,GenL,PVi,PGi,PVQU,PVQL)
RestraintCount=size(PVi,1)+size(PGi,1)+Busnum; %
t_Bal_volt=Volt(Balance);
Volt=ones(1,Busnum);
%Volt(Balance)=t_Bal_volt;
Volt(Balance)=1;
UAngel=zeros(1,Busnum);
Init_Z=ones(1,RestraintCount);
Init_W=-1*ones(1,RestraintCount);
Init_L=ones(1,RestraintCount);
Init_U=ones(1,RestraintCount);
%Init_Y=zeros(1,2*Busnum);
%Init_Y=ones(1,2*Busnum);
Init_Y=zeros(1,2*Busnum);%
%Init_Y(1:2:2*Busnum)=1e-10;
%Init_Y(2:2:2*Busnum)=-1e-10;
tPU=GenU(:,2);%
tQU=PVQU(:,1);%
tPL=GenL(:,2);%
tQL=PVQL(:,1);%
%PG(4:5)=[4.5 4.5];
PG(PGi)=(tPU+tPL)/2;
%QG(4:5)=[0 1.45];
QG(PVi)=(tQU+tQL)/2;
end

1
ReadMe.txt Normal file
View File

@ -0,0 +1 @@
对照学姐给的公式

36
SolveIt.asv Normal file
View File

@ -0,0 +1,36 @@
function XX=SolveIt(deltF,deltG,Init_L,Init_Z,Init_U,Init_W,deltdeltF,ddh,ddg,deltH,Init_Y,Ly,Lz,ContrlCount,Lw,Lul,Luu,RestraintCount,Lx,Balance,PVi,PGi,Busnum)
LxComa=FormLxComa(deltF,deltG,deltH,Init_L,Luu,Lul,Init_Z,Init_Y,Lz,Init_U,Init_W,Lw,Lx);
H=-deltdeltF+ddh;%+ddg*(Init_Z'+Init_W');
t1=diag(Init_L.\Init_Z-Init_U.\Init_W);
t2=-deltG*( t1 )*deltG';
aa=[
(H+t2),deltH;
deltH',zeros(size(Init_Y,),ContrlCount);
];
yy=[LxComa;-Ly];
% t=size(PVi,1)+size(PGi,1);
% aa(t+2*Balance-1,:)=0;
% aa(:,t+2*Balance-1)=0;
% aa(t+2*Balance-1,t+2*Balance-1)=1;
%ÔÝʱ¸ÄÒ»ÏÂ
t=size(PVi,1)+size(PGi,1)+Busnum;
aa(t+Balance,:)=0;
aa(:,t+Balance)=0;
aa(t+Balance,t+Balance)=1;
dxdy=aa\yy;
dX=dxdy(1:ContrlCount);
dY=dxdy(ContrlCount+1:RestraintCount+ContrlCount);
dL=Lz+deltG'*dX;
dU=-Lw-deltG'*dX;
dZ=-diag(Init_L)\Lul-diag(Init_L)\diag(Init_Z)*dL;
dW=-diag(Init_U)\Luu-diag(Init_U)\diag(Init_W)*dU;
XX=[
dX;
dY;
dZ;
dW;
dL;
dU;
];
end

36
SolveIt.m Normal file
View File

@ -0,0 +1,36 @@
function XX=SolveIt(deltF,deltG,Init_L,Init_Z,Init_U,Init_W,deltdeltF,ddh,ddg,deltH,Init_Y,Ly,Lz,ContrlCount,Lw,Lul,Luu,RestraintCount,Lx,Balance,PVi,PGi,Busnum)
LxComa=FormLxComa(deltF,deltG,deltH,Init_L,Luu,Lul,Init_Z,Init_Y,Lz,Init_U,Init_W,Lw,Lx);
H=-deltdeltF+ddh;%+ddg*(Init_Z'+Init_W');
t1=diag(Init_L.\Init_Z-Init_U.\Init_W);
t2=-deltG*( t1 )*deltG';
aa=[
(H+t2),deltH;
deltH',zeros(size(Init_Y,2));
];
yy=[LxComa;-Ly];
% t=size(PVi,1)+size(PGi,1);
% aa(t+2*Balance-1,:)=0;
% aa(:,t+2*Balance-1)=0;
% aa(t+2*Balance-1,t+2*Balance-1)=1;
%ÔÝʱ¸ÄÒ»ÏÂ
t=size(PVi,1)+size(PGi,1)+Busnum;
aa(t+Balance,:)=0;
aa(:,t+Balance)=0;
aa(t+Balance,t+Balance)=1;
dxdy=aa\yy;
dX=dxdy(1:ContrlCount);
dY=dxdy(ContrlCount+1:ContrlCount+2*Busnum);
dL=Lz+deltG'*dX;
dU=-Lw-deltG'*dX;
dZ=-diag(Init_L)\Lul-diag(Init_L)\diag(Init_Z)*dL;
dW=-diag(Init_U)\Luu-diag(Init_U)\diag(Init_W)*dU;
XX=[
dX;
dY;
dZ;
dW;
dL;
dU;
];
end

31
admmatrix.asv Normal file
View File

@ -0,0 +1,31 @@
function [G,B,GB,Y,r,c,Angle] = admmatrix(Busnum,Linei,Linej,Liner,Linex,Lineb,Transfori...
,Transforj,Transforr,Transforx,Transfork0,Branchi,Branchb)
%**************************************************************************
% 程序功能 : 子函数——形成节点导纳矩阵Y
% 编 者:
% 编制时间2010.12
%**************************************************************************
%% 支路导纳计算
G = -sparse(Linei,Linej,Liner./(Liner.^2+Linex.^2),Busnum,Busnum) - sparse(Linej,Linei,Liner./(Liner.^2+Linex.^2),Busnum,Busnum);
G = G - sparse(1:Busnum,1:Busnum,sum(G,2)'); % 计算各线路支路电导
B = sparse(Linei,Linej,Linex./(Liner.^2+Linex.^2),Busnum,Busnum)+sparse(Linej,Linei,Linex./(Liner.^2+Linex.^2),Busnum,Busnum);
B = B - sparse(1:Busnum,1:Busnum,sum(B,2)')+sparse(Linei,Linei,Lineb,Busnum,Busnum)+sparse(Linej,Linej,Lineb,Busnum,Busnum);
%% 变压器支路计算
if Transfori>0
mr = Transforr./(Transforr.^2+Transforx.^2); % 计算变压器支路电导
mx = -Transforx./(Transforr.^2+Transforx.^2); % 计算变压器支路电纳
G = G-sparse(Transfori,Transforj,mr./Transfork0,Busnum,Busnum)-sparse(Transforj,Transfori,mr./Transfork0,Busnum,Busnum)...
+sparse(Transfori,Transfori,mr./Transfork0./Transfork0,Busnum,Busnum)+sparse(Transforj,Transforj,mr,Busnum,Busnum);
B = B-sparse(Transfori,Transforj,mx./Transfork0,Busnum,Busnum)-sparse(Transforj,Transfori,mx./Transfork0,Busnum,Busnum)...
+sparse(Transfori,Transfori,mx./Transfork0./Transfork0,Busnum,Busnum)+sparse(Transforj,Transforj,mx,Busnum,Busnum);
end
%% 接地支路计算
if Branchi>0 % 判断有无接地支路
B = B+sparse(Branchi,Branchi,Branchb,Busnum,Busnum);
end
%% 化作极坐标形式
GB = G+B.*1i; %将电导,电纳合并,写成复数形式
Y = abs(GB); %求节点导纳幅值
[r,c] = find(Y);
Angle = angle(GB(GB~=0)); %求节点导纳角度
%Angle=angle(GB);

32
admmatrix.m Normal file
View File

@ -0,0 +1,32 @@
function [G,B,GB,Y,r,c,Angle] = admmatrix(Busnum,Linei,Linej,Liner,Linex,Lineb,Transfori...
,Transforj,Transforr,Transforx,Transfork0,Branchi,Branchb)
%**************************************************************************
% : Y
%
% 2010.12
%**************************************************************************
%%
G = -sparse(Linei,Linej,Liner./(Liner.^2+Linex.^2),Busnum,Busnum) - sparse(Linej,Linei,Liner./(Liner.^2+Linex.^2),Busnum,Busnum);
G = G - sparse(1:Busnum,1:Busnum,sum(G,2)'); % 线
B = sparse(Linei,Linej,Linex./(Liner.^2+Linex.^2),Busnum,Busnum)+sparse(Linej,Linei,Linex./(Liner.^2+Linex.^2),Busnum,Busnum);
B = B - sparse(1:Busnum,1:Busnum,sum(B,2)')+sparse(Linei,Linei,Lineb,Busnum,Busnum)+sparse(Linej,Linej,Lineb,Busnum,Busnum);
%%
if Transfori>0
mr = Transforr./(Transforr.^2+Transforx.^2); %
mx = -Transforx./(Transforr.^2+Transforx.^2); %
G = G-sparse(Transfori,Transforj,mr./Transfork0,Busnum,Busnum)-sparse(Transforj,Transfori,mr./Transfork0,Busnum,Busnum)...
+sparse(Transfori,Transfori,mr./Transfork0./Transfork0,Busnum,Busnum)+sparse(Transforj,Transforj,mr,Busnum,Busnum);
B = B-sparse(Transfori,Transforj,mx./Transfork0,Busnum,Busnum)-sparse(Transforj,Transfori,mx./Transfork0,Busnum,Busnum)...
+sparse(Transfori,Transfori,mx./Transfork0./Transfork0,Busnum,Busnum)+sparse(Transforj,Transforj,mx,Busnum,Busnum);
end
%%
if Branchi>0 %
B = B+sparse(Branchi,Branchi,Branchb,Busnum,Busnum);
end
%%
GB = G+B.*1i; %
Y = abs(GB); %
Y=full(Y);
[r,c] = find(Y);
Angle = angle(GB(GB~=0)); %
%Angle=angle(GB);

176
func_ddf.m Normal file
View File

@ -0,0 +1,176 @@
function ddf=func_ddh(AngleIJMat,GB,Volt,Init_Y,Busnum)
%% deltaPi/deltaThytai_deltaThytaj
t1=-Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
dPdTidTj=t1.*t2; %%()
dPidTidTj_2=dPdTidTj-diag(diag(dPdTidTj));%
t3=repmat(Init_Y',1,size(Init_Y,2));%y
dPidTidTj_2=dPidTidTj_2.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
dPjdTidTj=t3-diag(diag(t3));%
t3=repmat(Init_Y,size(Init_Y,2),1);
dPjdTidTj=dPjdTidTj.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdTidTj=dPidTidTj_2+dPjdTidTj;% @@
%% deltaP/deltaThyta_deltaThyta
t1=sum(-dPidTidTj_2,2);
t2=diag(t1'.*Init_Y(1:2:size(Init_Y,2)));%y
t3=sum(-dPidTidTj_2,1);
t4=diag(t3.*Init_Y(1:2:size(Init_Y,2)));%y
dPdTidTi=t2+t4;%% @@
%% deltaP/deltaThytai_dVi
t1=ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t1-diag(t2);%
t4=sum(t3,2);
t4=t4'.*Init_Y(1:2:size(Init_Y,2));%y
dPidTidVi=diag(t4);
dPidTjdVj=-t3;
t6=sum(dPidTjdVj,1);%y
t6=t6.*Init_Y(1:2:size(Init_Y,2));%y
dPdTidVi=dPidTidVi+diag(t6);%% @@
%% deltaP/deltaThytai_dVj
t1=ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidTidVj=t1-diag(diag(t1));%%
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidTidVj=dPidTidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
t1=ones(Busnum,1)*Volt.*real(GB).*(sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdTidVj=t1-diag(diag(t1));%
t2=t2';
dPjdTidVj=dPjdTidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdTidVj=dPidTidVj+dPjdTidVj;% @@
%% deltaP/dVi_deltaThytaj
t1=-ones(Busnum,1)*Volt.*real(GB).*(sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidVidTj=t1-diag(diag(t1));
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidVidTj=dPidVidTj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdVidTj=t1-diag(diag(t1));
t2=t2';
dPjdVidTj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdVidTj=dPidVidTj+dPjdVidTj;%
%% deltaPi/dVi_deltaThyta
dPdVidTi=dPdTidVi;% @@
%% deltaP/dVi_dVj
t1=-(real(GB).*(cos(AngleIJMat)+imag(GB).*sin(AngleIJMat)));
dPidVidVj=t1-diag(diag(t1));%
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidVidVj=dPidVidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
t1=-(real(GB).*(cos(AngleIJMat)-imag(GB).*sin(AngleIJMat)));
dPjdVidVj=t1-diag(diag(t1));
t2=t2';
dPjdVidVj=dPjdVidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdVidVj=dPidVidVj+dPjdVidVj;% @@
%% deltaP/dVi_dVi
t1=diag(real(GB));
t2=t1'.*Init_Y(1:2:size(Init_Y,2));%y
dPidVidVi=-2*diag(t2);
dPidVjdVj=0;
dPdVidVi=dPidVidVi+dPidVjdVj;% @@
%% APi
APi=zeros(2*Busnum,2*Busnum);
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTj;%% TT
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVj;%% TV
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTj;%% VT
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVj;%% VV
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTi;%%
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVi;%%
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTi;%%
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVi;%%
%% deltaQ/deltaThyta_deltaThyta
t1=-Volt'*Volt;
t2=real(GB).*(sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dQidTidTj=t1.*t2;%
t3=repmat(Init_Y',1,size(Init_Y,2));
dQidTidTj=dQidTidTj.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t2=real(GB).*(sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dQjdTidTj=t1.*t2;
t3=t3';
dQjdTidTj=dQjdTidTj.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQdTidTj=dQidTidTj+dQjdTidTj;%
%% deltaQ/deltaThyta_deltaThyta
t1=dQidTidTj-diag(diag(dQidTidTj));
t2=sum(t1,2);
t3=t2'.*Init_Y(2:2:size(Init_Y,2));%y
dQidTidTi=diag(t3);
t1=-Volt'*Volt;
t2=real(GB).*(sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t3=t1.*t2;
t4=t3-diag(diag(t3));
t5=sum(t4,1);
t6=t5.*Init_Y(2:2:size(Init_Y,2));%y
dQjdTidTi=diag(t6);
dQdTidTi=dQjdTidTi+dQidTidTi;%
%% deltaQ/deltaThyta_deltaV
t1=-Volt;
t2=real(GB).*(cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
t3=ones(Busnum,1)*t1.*t2;
t4=repmat(Init_Y',1,size(Init_Y,2));
dQidTidVj=t3.*t4(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t2=real(GB).*(cos(AngleIJMat)-imag(GB).*sin(AngleIJMat));
t3=Volt'*ones(1,Busnum).*t2;
t4=t4';
dQjdTidVj=t2.*t3.*t4(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQdTidVj=dQidTidVj+dQjdTidVj;%
%% deltaQ/deltaThyta_deltaV
t1=sum(dQidTidVj,2)-diag(dQidTidVj);
t2=t1'.*Init_Y(2:2:size(Init_Y,2));%y
dQidTidVi=diag(t2);
t1=-Volt'*ones(1,Busnum).*(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
t2=t1-diag(diag(t1));
t3=sum(t2,1);
t4=t3.*Init_Y(2:2:size(Init_Y,2));%y
dQjdTidVi=diag(t4);
dQdTidVi=dQidTidVi+dQjdTidVi;
%% deltaQ/deltaV_deltaV
t1=real(GB).*(sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=repmat(Init_Y',1,size(Init_Y,2));
t3=t1.*t2(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQidVidVj=t3;
t1=-real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t2=t2';
t3=t1.*t2(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQjdVidVj=t3;
dQdVidVj=dQidVidVj+dQjdVidVj;
%% deltaQ/deltaV_deltaV
t1=2*(real(GB).*(sin(AngleIJMat)-imag(GB).*cos(AngleIJMat)));
t2=diag(t1);
t3=t2'.*Init_Y(2:2:size(Init_Y,2));%y
dQidVidVi=diag(t3);
t1=-real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t2=diag(t1);
t3=t1-diag(t2);
t4=sum(t3,1);
t5=t4.*Init_Y(2:2:size(Init_Y,2));%y
dQjdVidVi=diag(t5);
dQdVidVi=dQidVidVi+dQjdVidVi;
%% deltaQ/deltaV_deltaThyta
t1=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*(t1);
t3=repmat(Init_Y',1,size(Init_Y,2));
t4=t2'.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQidVidTj=t4;
t1=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*(t1);
t3=t3';
t4=t2.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQjdVidTj=t4;
dQdVidTj=dQidVidTj+dQjdVidTj;
%% deltaQ/deltaV_deltaThyta
dQdVidTi=dQdTidVi;
%% AQi
AQi=zeros(2*Busnum,2*Busnum);
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTj;%% TT
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVj;%% TV
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTj;%% VT
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVj;%% VV
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTi;%%
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVi;%%
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTi;%%
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVi;%%
%% ddf
t=[zeros(2*14-2*5,2*14);
zeros(2*5,2*14-2*5),AQi+APi;
];
ddf=t;
end

93
func_ddg.asv Normal file
View File

@ -0,0 +1,93 @@
function ddg=func_ddg(AngleIJMat,GB,Volt,Init_W,Init_Z,Busnum,indexi,indexj,PVi,RestraintCount)
c=Init_W+Init_Z;
%% dg4_dTdT 对角元素
%t1=-Volt'*Volt;
t1=Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
t4=t3(sub2ind(size(t3),indexi,indexj));
t5=zeros(Busnum);
offset=2*size(PVi,1)+Busnum;
for I=1:size(indexi,2)
t5(indexi(I),indexi(I))=t4(I)*c(offset+I);
t5(indexj(I),indexj(I))=t4(I)*c(offset+I);
end
dPdTidTi=t5; %@@@
%% dg4_dTdT 非对角元素
%t1=Volt'*Volt;
t1=-Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
t5=zeros(Busnum);
for I=1:size(indexi,2)
t5(indexi(I),indexj(I))=t3(indexi(I),indexj(I))*c(offset+I);
t5(indexj(I),indexi(I))=t3(indexi(I),indexj(I))*c(offset+I);
end
dPdTidTj=t5;% @@@
%% dg4_dVdV 对角元素
t1=real(GB)*2;
%dPijdVidVi=t1;
t2=zeros(Busnum);
for I=1:size(indexi,2)
t2(indexi(I),indexi(I))=t1(indexi(I),indexj(I))*c(offset+I);
end
dPdVidVi=t2; % @
%% dg4_dVdV 非对角元素
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t4=zeros(Busnum);
for I=1:size(indexi,2)
%t4(indexi(I),indexj(I))=t2(indexi(I),indexj(I))*c(offset+I);
t4(indexi(I),indexj(I))=-t2(indexi(I),indexj(I))*c(offset+I);
%t4(indexj(I),indexi(I))=t2(indexi(I),indexj(I))*c(offset+I);
t4(indexj(I),indexi(I))=-t2(indexi(I),indexj(I))*c(offset+I);
end
dPdVidVj=t4; %@@
%% dg4_dTdV 对角元素
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t4=zeros(Busnum);
for I=1:size(indexi,2)
%t4(indexi(I),indexi(I))=-Volt(indexj(I))*t2(indexi(I),indexi(I))*c(offset+I);
t4(indexi(I),indexi(I))=Volt(indexj(I))*t2(indexi(I),indexj(I))*c(offset+I);
%t4(indexj(I),indexj(I))=Volt(indexi(I))*t2(indexj(I),indexj(I))*c(offset+I);
t4(indexj(I),indexj(I))=-Volt(indexi(I))*t2(indexi(I),indexj(I))*c(offset+I);
end
dPdTidVi=t4; % @@
%% dg4_dTdV 非对角元素
t1=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t2=zeros(Busnum);
for I=1:size(indexi,2)
%t2(indexi(I),indexj(I))=-Volt(indexi(I))*t1(indexi(I),indexj(I))*c(offset+I);
t2(indexi(I),indexj(I))=Volt(indexi(I))*t1(indexi(I),indexj(I))*c(offset+I);
%t2(indexj(I),indexi(I))=Volt(indexj(I))*t1(indexi(I),indexj(I))*c(offset+I);
t2(indexj(I),indexi(I))=-Volt(indexj(I))*t1(indexi(I),indexj(I))*c(offset+I);
end
dPdTidVj=t2; % @@
%% dg4_dVdT 对角元素
dPdVidTi=dPdTidVi;
%% dg4_dVdT 非对角元素
t1=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t2=zeros(Busnum);
for I=1:size(indexi,2)
%t2(indexi(I),indexj(I))=Volt(indexj(I))*t1(indexi(I),indexj(I))*c(offset+I);
t2(indexi(I),indexj(I))=-Volt(indexj(I))*t1(indexi(I),indexj(I))*c(offset+I);
%t2(indexj(I),indexi(I))=Volt(indexi(I))*t1(indexi(I),indexj(I))*c(offset+I);
t2(indexj(I),indexi(I))=Volt(indexi(I))*t1(indexi(I),indexj(I))*c(offset+I);
end
dPdVidTj=t2; % @
%% 生成ddg4ddx
ddg4ddx=zeros(2*Busnum,2*Busnum);
ddg4ddx(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTj;%%非对角 TT
ddg4ddx(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVj;%%非对角 TV
ddg4ddx(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTj;%%非对角 VT
ddg4ddx(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVj;%%非对角 VV
ddg4ddx(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTi;%%对角
ddg4ddx(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVi;%%对角
ddg4ddx(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTi;%%对角
ddg4ddx(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVi;%%对角
%% 生成ddg
t=[zeros(2*size(PVi,1),RestraintCount);
zeros(2*Busnum,RestraintCount-size(PVi,1)-2*Busnum),ddg4ddx;
];
ddg=t;
end

6
func_ddg.m Normal file
View File

@ -0,0 +1,6 @@
function ddg=func_ddg(PGi,PVi,Busnum,RestraintCount)
t=zeros(size(PVi,1)+size(PGi,1)+2*Busnum,RestraintCount);
ddg=t;
end

185
func_ddh.asv Normal file
View File

@ -0,0 +1,185 @@
function ddh=func_ddh(AngleIJMat,GB,Volt,Init_Y,Busnum)
%% deltaPi/deltaThytai_deltaThytaj 非对角元素
t1=-Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
dPdTidTj=t1.*t2; %%(保留了对角元素的)
dPidTidTj_2=dPdTidTj-diag(diag(dPdTidTj));%去掉了对角元素的
t3=repmat(Init_Y',1,size(Init_Y,2));%乘y的系数
dPidTidTj_2=dPidTidTj_2.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
dPjdTidTj=t3-diag(diag(t3));%去掉了对角元素的
t3=repmat(Init_Y,size(Init_Y,2),1);
dPjdTidTj=dPjdTidTj.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
dPdTidTj=dPidTidTj_2+dPjdTidTj;%最终非对角元素 @@@
%% deltaP/deltaThyta_deltaThyta 对角元素
t1=sum(-dPidTidTj_2,2);
t2=diag(t1'.*Init_Y(1:2:size(Init_Y,2)));%乘y的系数
t3=sum(-dPidTidTj_2,1);
t4=diag(t3.*Init_Y(1:2:size(Init_Y,2)));%乘y的系数
dPdTidTi=t2+t4;%%最终对角元素 @@@
%% deltaP/deltaThytai_dVi 对角元素
t1=ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t1-diag(t2);%去掉了对角元素的
t4=sum(t3,2);
t4=t4'.*Init_Y(1:2:size(Init_Y,2));%乘y的系数
dPidTidVi=diag(t4);
dPidTjdVj=-t3;
t6=sum(dPidTjdVj,1);
t6=t6.*Init_Y(1:2:size(Init_Y,2));%乘y的系数
dPdTidVi=dPidTidVi+diag(t6);%%最终对角元素 @@@
%% deltaP/deltaThytai_dVj 非对角元素
t1=ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidTidVj=t1-diag(diag(t1));%%去掉对角元素的
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidTidVj=dPidTidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
t1=ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdTidVj=t1-diag(diag(t1));%去掉对角元素的
t2=t2';
dPjdTidVj=dPjdTidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
dPdTidVj=dPidTidVj+dPjdTidVj;%最终非对角元素 @@@
%% deltaP/dVi_deltaThytaj 非对角元素
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidVidTj=t1-diag(diag(t1));
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidVidTj=dPidVidTj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdVidTj=t1-diag(diag(t1));
t2=t2';
dPjdVidTj=dPjdVidTj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
dPdVidTj=dPidVidTj+dPjdVidTj;%最终非对角元素 @@@
%% deltaPi/dVi_deltaThyta 对角元素
dPdVidTi=dPdTidVi;%最终对角元素 @@
%% deltaP/dVi_dVj 非对角元素
t1=-(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
dPidVidVj=t1-diag(diag(t1));%去掉对角元素的
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidVidVj=dPidVidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
t1=-(real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat));
dPjdVidVj=t1-diag(diag(t1));
t2=t2';
dPjdVidVj=dPjdVidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
dPdVidVj=dPidVidVj+dPjdVidVj;%最终非对角元素 @@@@
%% deltaP/dVi_dVi 对角元素
t0=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t1=diag(diag(t0));
t2=t1'.*Init_Y(1:2:size(Init_Y,2));%乘y的系数
dPidVidVi=-2*diag(t2);
dPidVjdVj=0;
dPdVidVi=dPidVidVi+dPidVjdVj;%最终对角元素 @@@
%% 生成APi
APi=zeros(2*Busnum,2*Busnum);
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTj;%%非对角 TT
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVj;%%非对角 TV
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTj;%%非对角 VT
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVj;%%非对角 VV
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTi;%%对角
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVi;%%对角
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTi;%%对角
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVi;%%对角
%% deltaQ/deltaThyta_deltaThyta 非对角元素
%t1=-Volt'*Volt;
t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
dQidTidTj=t1.*t2;%不去掉对角元素了,反正最后是要修正的
t3=repmat(Init_Y',1,size(Init_Y,2));
dQidTidTj=dQidTidTj.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
t2=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
dQjdTidTj=-t1.*t2;
t3=t3';
dQjdTidTj=dQjdTidTj.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQdTidTj=dQidTidTj+dQjdTidTj;%最终非对角元素 @@@
%% deltaQ/deltaThyta_deltaThyta 对角元素
t1=dQidTidTj-diag(diag(dQidTidTj));%去对角元素
t2=sum(t1,2);
t3=t2'.*Init_Y(2:2:size(Init_Y,2));%乘y的系数
%dQidTidTi=diag(t3);
dQidTidTi=-diag(t3);
t1=-Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
t5=repmat(Init_Y',1,size(Init_Y,2));%乘y的系数
t6=t4.*t5;
t7=sum(t6,1);
dQjdTidTi=diag(t7);
dQdTidTi=dQjdTidTi+dQidTidTi;%最终对角元素 @@@
%% deltaQ/deltaThyta_deltaV 非对角元素
%t1=-Volt;
t1=Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1'*ones(1,Busnum).*t2;
t4=repmat(Init_Y',1,size(Init_Y,2));
dQidTidVj=t3.*t4(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=-Volt'*ones(1,Busnum).*t2;
t4=t4';
dQjdTidVj=t3.*t4(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQdTidVj=dQidTidVj+dQjdTidVj;%最终非对角元素 @@@
%% deltaQ/deltaThyta_deltaV 对角元素
%t1=sum(dQidTidVj,2)-diag(dQidTidVj);%去掉对角元素
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=ones(Busnum,1)*Volt.*t
t2=t1'.*Init_Y(2:2:size(Init_Y,2));%乘y的系数
dQidTidVi=diag(t2);
t1=-Volt'*ones(1,Busnum).*(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
t2=t1-diag(diag(t1));
t3=sum(t2,1);
t4=t3.*Init_Y(2:2:size(Init_Y,2));%乘y的系数
dQjdTidVi=diag(t4);
dQdTidVi=dQidTidVi+dQjdTidVi;% @@
%% deltaQ/deltaV_deltaV 非对角元素
t1=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t2=repmat(Init_Y',1,size(Init_Y,2));
t3=t1.*t2(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQidVidVj=t3;
t1=-real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t2=t2';
t3=t1.*t2(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQjdVidVj=t3;
dQdVidVj=dQidVidVj+dQjdVidVj;% @@
%% deltaQ/deltaV_deltaV 对角元素
t1=2*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t2'.*Init_Y(2:2:size(Init_Y,2));%乘y的系数
dQidVidVi=diag(t3);
% t1=-real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
% t2=diag(t1);
% t3=t1-diag(t2);
% t4=sum(t3,1);
% t5=t4.*Init_Y(2:2:size(Init_Y,2));%乘y的系数
% dQjdVidVi=diag(t5);
dQjdVidVi=0;
dQdVidVi=dQidVidVi+dQjdVidVi; % @@
%% deltaQ/deltaV_deltaThyta 非对角元素
%t1=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*(t1);
t3=repmat(Init_Y',1,size(Init_Y,2));
t4=t2'.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQidVidTj=t4;
t1=-real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*(t1);
t3=t3';
t4=t2.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQjdVidTj=t4;
dQdVidTj=dQidVidTj+dQjdVidTj;% @
%% deltaQ/deltaV_deltaThyta 对角元素
dQdVidTi=dQdTidVi;% @
%% 生成AQi
AQi=zeros(2*Busnum,2*Busnum);
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTj;%%非对角 TT
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVj;%%非对角 TV
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTj;%%非对角 VT
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVj;%%非对角 VV
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTi;%%对角
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVi;%%对角
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTi;%%对角
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVi;%%对角
%% 生成ddh
t=[zeros(4,14);
zeros(2*5,4),AQi+APi;
];
ddh=t;
end

187
func_ddh.m Normal file
View File

@ -0,0 +1,187 @@
function ddh=func_ddh(AngleIJMat,GB,Volt,Init_Y,Busnum)
%% deltaPi/deltaThytai_deltaThytaj
t1=-Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
dPdTidTj=t1.*t2; %%()
dPidTidTj_2=dPdTidTj-diag(diag(dPdTidTj));%
t3=repmat(Init_Y',1,size(Init_Y,2));%y
dPidTidTj_2=dPidTidTj_2.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
dPjdTidTj=t3-diag(diag(t3));%
t3=repmat(Init_Y,size(Init_Y,2),1);
dPjdTidTj=dPjdTidTj.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdTidTj=dPidTidTj_2+dPjdTidTj;% @@@
%% deltaP/deltaThyta_deltaThyta
t1=sum(-dPidTidTj_2,2);
t2=diag(t1'.*Init_Y(1:2:size(Init_Y,2)));%y
t3=sum(-dPidTidTj_2,1);
t4=diag(t3.*Init_Y(1:2:size(Init_Y,2)));%y
dPdTidTi=t2+t4;%% @@@
%% deltaP/deltaThytai_dVi
t1=ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t1-diag(t2);%
t4=sum(t3,2);
t4=t4'.*Init_Y(1:2:size(Init_Y,2));%y
dPidTidVi=diag(t4);
dPidTjdVj=-t3;
t6=sum(dPidTjdVj,1);
t6=t6.*Init_Y(1:2:size(Init_Y,2));%y
dPdTidVi=dPidTidVi+diag(t6);%% @@@
%% deltaP/deltaThytai_dVj
t1=ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidTidVj=t1-diag(diag(t1));%%
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidTidVj=dPidTidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
t1=ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdTidVj=t1-diag(diag(t1));%
t2=t2';
dPjdTidVj=dPjdTidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdTidVj=dPidTidVj+dPjdTidVj;% @@@
%% deltaP/dVi_deltaThytaj
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidVidTj=t1-diag(diag(t1));
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidVidTj=dPidVidTj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdVidTj=t1-diag(diag(t1));
t2=t2';
dPjdVidTj=dPjdVidTj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdVidTj=dPidVidTj+dPjdVidTj;% @@@
%% deltaPi/dVi_deltaThyta
dPdVidTi=dPdTidVi;% @@
%% deltaP/dVi_dVj
t1=-(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
dPidVidVj=t1-diag(diag(t1));%
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidVidVj=dPidVidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
t1=-(real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat));
dPjdVidVj=t1-diag(diag(t1));
t2=t2';
dPjdVidVj=dPjdVidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdVidVj=dPidVidVj+dPjdVidVj;% @@@@
%% deltaP/dVi_dVi
t0=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t1=diag(t0);
t2=t1'.*Init_Y(1:2:size(Init_Y,2));%y
dPidVidVi=-2*diag(t2);
dPidVjdVj=0;
dPdVidVi=dPidVidVi+dPidVjdVj;% @@@
%% APi
APi=zeros(2*Busnum,2*Busnum);
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTj;%% TT
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVj;%% TV
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTj;%% VT
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVj;%% VV
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTi;%%
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVi;%%
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTi;%%
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVi;%%
%% deltaQ/deltaThyta_deltaThyta
%t1=-Volt'*Volt;
t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
dQidTidTj=t1.*t2;%
t3=repmat(Init_Y',1,size(Init_Y,2));
dQidTidTj=dQidTidTj.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t2=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
dQjdTidTj=-t1.*t2;
t3=t3';
dQjdTidTj=dQjdTidTj.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQdTidTj=dQidTidTj+dQjdTidTj;% @@@
%% deltaQ/deltaThyta_deltaThyta
t1=dQidTidTj-diag(diag(dQidTidTj));%
t2=sum(t1,2);
t3=t2'.*Init_Y(2:2:size(Init_Y,2));%y
%dQidTidTi=diag(t3);
dQidTidTi=-diag(t3);
t1=-Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
t5=repmat(Init_Y',1,size(Init_Y,2));%y
t6=t4.*t5(2:2:size(Init_Y,2),2:2:size(Init_Y,2));
t7=sum(t6,1);
dQjdTidTi=diag(t7);
dQdTidTi=dQjdTidTi+dQidTidTi;% @@@
%% deltaQ/deltaThyta_deltaV
%t1=-Volt;
t1=Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1'*ones(1,Busnum).*t2;
t4=repmat(Init_Y',1,size(Init_Y,2));
dQidTidVj=t3.*t4(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=-Volt'*ones(1,Busnum).*t2;
t4=t4';
dQjdTidVj=t3.*t4(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQdTidVj=dQidTidVj+dQjdTidVj;% @@@
%% deltaQ/deltaThyta_deltaV
%t1=sum(dQidTidVj,2)-diag(dQidTidVj);%
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=ones(Busnum,1)*Volt.*t1;
t3=sum(t2,2);
t4=t3'.*Init_Y(2:2:size(Init_Y,2));%y
dQidTidVi=diag(t4);
t1=-Volt'*ones(1,Busnum).*(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
t2=t1-diag(diag(t1));
t3=repmat(Init_Y',1,size(Init_Y,2));
t4=t2.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t5=sum(t4,1);
dQjdTidVi=diag(t5);
dQdTidVi=dQidTidVi+dQjdTidVi;% @@
%% deltaQ/deltaV_deltaV
t1=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t2=repmat(Init_Y',1,size(Init_Y,2));
t3=t1.*t2(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQidVidVj=t3;
t1=-real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t2=t2';
t3=t1.*t2(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQjdVidVj=t3;
dQdVidVj=dQidVidVj+dQjdVidVj;% @@@
%% deltaQ/deltaV_deltaV
t1=2*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t2'.*Init_Y(2:2:size(Init_Y,2));%y
dQidVidVi=diag(t3);
% t1=-real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
% t2=diag(t1);
% t3=t1-diag(t2);
% t4=sum(t3,1);
% t5=t4.*Init_Y(2:2:size(Init_Y,2));%y
% dQjdVidVi=diag(t5);
dQjdVidVi=0;
dQdVidVi=dQidVidVi+dQjdVidVi; % @@
%% deltaQ/deltaV_deltaThyta
%t1=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*(t1);
t3=repmat(Init_Y',1,size(Init_Y,2));
t4=t2'.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQidVidTj=t4;
t1=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*(t1);
t3=t3';
t4=t2.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQjdVidTj=t4;
dQdVidTj=dQidVidTj+dQjdVidTj;% @
%% deltaQ/deltaV_deltaThyta
dQdVidTi=dQdTidVi;% @
%% AQi
AQi=zeros(2*Busnum,2*Busnum);
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTj;%% TT
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVj;%% TV
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTj;%% VT
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVj;%% VV
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTi;%%
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVi;%%
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTi;%%
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVi;%%
%% ddh
t=[zeros(4,14);
zeros(2*5,4),AQi+APi;
];
ddh=t;
end

203
func_ddh1.asv Normal file
View File

@ -0,0 +1,203 @@
function ddh=func_ddh1(AngleIJMat,GB,Volt,Init_Y,Busnum)
%% deltaPi/deltaThytai_deltaThytaj 非对角元素
t1=-Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
dPdTidTj=t1.*t2; %%(保留了对角元素的)
dPidTidTj_2=dPdTidTj-diag(diag(dPdTidTj));%去掉了对角元素的
t3=repmat(Init_Y',1,size(Init_Y,2));%乘y的系数
dPidTidTj_2=dPidTidTj_2.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
dPjdTidTj=t3-diag(diag(t3));%去掉了对角元素的
t3=repmat(Init_Y,size(Init_Y,2),1);
dPjdTidTj=dPjdTidTj.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
dPdTidTj=dPidTidTj_2+dPjdTidTj;%最终非对角元素 @@@@@@
%% deltaP/deltaThyta_deltaThyta 对角元素
t1=Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
t5=sum(t4,2);
t6=t5'.*Init_Y(1:2:size(Init_Y,2));%乘y的系数
dPidTidTi=diag(t6);
t1=Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=t2-diag(diag(t2));
t3=repmat(Init_Y',1,size(Init_Y,2));%乘y的系数
t4=t1.*t2.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));
t5=sum(t4,1);
dPidTjdTj=diag(t5);
dPdTidTi=dPidTidTi+dPidTjdTj;%%最终对角元素 @@@@@@
%% deltaP/deltaThytai_dVi 对角元素
t1=ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t1-diag(t2);%去掉了对角元素的
t4=sum(t3,2);
t4=t4'.*Init_Y(1:2:size(Init_Y,2));%乘y的系数
dPidTidVi=diag(t4);
t1=-Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t1=t1-diag(diag(t1));%去掉对角元素
t2=repmat(Init_Y',1,size(Init_Y,2));
t3=t1.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
t6=sum(t3,1);
dPdTidVi=dPidTidVi+diag(t6);%%最终对角元素 @@@@@@
%% deltaP/deltaThytai_dVj 非对角元素
t1=Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidTidVj=t1-diag(diag(t1));%%去掉对角元素的
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidTidVj=dPidTidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
t1=Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdTidVj=t1-diag(diag(t1));%去掉对角元素的
t2=t2';
dPjdTidVj=dPjdTidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
dPdTidVj=dPidTidVj+dPjdTidVj;%最终非对角元素 @@@@@
%% deltaP/dVi_deltaThytaj 非对角元素
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidVidTj=t1-diag(diag(t1));
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidVidTj=dPidVidTj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdVidTj=t1-diag(diag(t1));
t2=t2';
dPjdVidTj=dPjdVidTj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
dPdVidTj=dPidVidTj+dPjdVidTj;%最终非对角元素 @@@@
%% deltaPi/dVi_deltaThyta 对角元素
dPdVidTi=dPdTidVi;%最终对角元素 @@
%% deltaP/dVi_dVj 非对角元素
t1=-(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
dPidVidVj=t1-diag(diag(t1));%去掉对角元素的
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidVidVj=dPidVidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
t1=-(real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat));
dPjdVidVj=t1-diag(diag(t1));
t2=t2';
dPjdVidVj=dPjdVidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
dPdVidVj=dPidVidVj+dPjdVidVj;%最终非对角元素 @@@@@
%% deltaP/dVi_dVi 对角元素
t0=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t1=diag(t0);
t2=t1'.*Init_Y(1:2:size(Init_Y,2));%乘y的系数
dPidVidVi=-2*diag(t2);
dPidVjdVj=0;
dPdVidVi=dPidVidVi+dPidVjdVj;%最终对角元素 @@@@
%% 生成APi
APi=zeros(2*Busnum,2*Busnum);
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTj;%%非对角 TT
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVj;%%非对角 TV
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTj;%%非对角 VT
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVj;%%非对角 VV
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTi;%%对角
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVi;%%对角
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTi;%%对角
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVi;%%对角
%% deltaQ/deltaThyta_deltaThyta 非对角元素
t1=-Volt'*Volt;
%t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
dQidTidTj=t1.*t2;%不去掉对角元素了,反正最后是要修正的
t3=repmat(Init_Y',1,size(Init_Y,2));
dQidTidTj=dQidTidTj.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
t2=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
dQjdTidTj=-t1.*t2;
t3=t3';
dQjdTidTj=dQjdTidTj.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQdTidTj=dQidTidTj+dQjdTidTj;%最终非对角元素 @@@@
%% deltaQ/deltaThyta_deltaThyta 对角元素
t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
t5=repmat(Init_Y',1,size(Init_Y,2));
t6=t4.*t5(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
t7=sum(t6,2);
dQidTidTi=diag(t7);
t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
%t5=t5';
t6=t4.*t5(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
t7=sum(t6,1);
dQjdTidTi=diag(t7);
dQdTidTi=dQjdTidTi+dQidTidTi;%最终对角元素 @@@@
%% deltaQ/deltaThyta_deltaV 非对角元素
t1=-Volt;
%t1=Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1'*ones(1,Busnum).*t2;
t4=repmat(Init_Y',1,size(Init_Y,2));
dQidTidVj=t3.*t4(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=Volt'*ones(1,Busnum).*t2;
t4=t4';
dQjdTidVj=t3.*t4(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQdTidVj=dQidTidVj+dQjdTidVj;%最终非对角元素 @@@@@
%% deltaQ/deltaThyta_deltaV 对角元素
%t1=sum(dQidTidVj,2)-diag(dQidTidVj);%去掉对角元素
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*t1;
t2=t2-diag(diag(t2));
t3=sum(t2,2);
t4=t3'.*Init_Y(2:2:size(Init_Y,2));%乘y的系数
dQidTidVi=diag(t4);
t1=Volt'*ones(1,Busnum).*(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
t2=t1-diag(diag(t1));
t3=repmat(Init_Y',1,size(Init_Y,2));
t4=t2.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
t5=sum(t4,1);
dQjdTidVi=diag(t5);
dQdTidVi=dQidTidVi+dQjdTidVi;% @@@@
%% deltaQ/deltaV_deltaV 非对角元素
t1=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t2=repmat(Init_Y',1,size(Init_Y,2));
t3=-t1.*t2(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQidVidVj=t3;
t1=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
t2=t2';
t3=t1.*t2(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQjdVidVj=t3;
dQdVidVj=dQidVidVj+dQjdVidVj;% @@@@@
%% deltaQ/deltaV_deltaV 对角元素
t1=-2*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t2'.*Init_Y(2:2:size(Init_Y,2));%乘y的系数
dQidVidVi=diag(t3);
% t1=-real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
% t2=diag(t1);
% t3=t1-diag(t2);
% t4=sum(t3,1);
% t5=t4.*Init_Y(2:2:size(Init_Y,2));%乘y的系数
% dQjdVidVi=diag(t5);
dQjdVidVi=0;
dQdVidVi=dQidVidVi+dQjdVidVi; % @@@@
%% deltaQ/deltaV_deltaThyta 非对角元素
%t1=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=ones(Busnum,1)*Volt.*(t1);
t3=repmat(Init_Y',1,size(Init_Y,2));
t4=t2'.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQidVidTj=t4;
t1=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*(t1);
t3=t3';
t4=t2.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQjdVidTj=t4;
dQdVidTj=dQidVidTj+dQjdVidTj;% @@@
%% deltaQ/deltaV_deltaThyta 对角元素
dQdVidTi=dQdTidVi;% @
%% 生成AQi
AQi=zeros(2*Busnum,2*Busnum);
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTj;%%非对角 TT
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVj;%%非对角 TV
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTj;%%非对角 VT
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVj;%%非对角 VV
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTi;%%对角
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVi;%%对角
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTi;%%对角
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVi;%%对角
%% 生成ddh
t=[zeros(4,14);
zeros(2*Busnum,2*size(PVi,1)),AQi+APi;
];
ddh=t;
end

204
func_ddh1.m Normal file
View File

@ -0,0 +1,204 @@
function ddh=func_ddh1(AngleIJMat,GB,Volt,Init_Y,Busnum,PVi)
%% deltaPi/deltaThytai_deltaThytaj
ContrlCount=size(PVi,1)*2+Busnum*2;
t1=-Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
dPdTidTj=t1.*t2; %%()
dPidTidTj_2=dPdTidTj-diag(diag(dPdTidTj));%
t3=repmat(Init_Y',1,size(Init_Y,2));%y
dPidTidTj_2=dPidTidTj_2.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
dPjdTidTj=t3-diag(diag(t3));%
t3=repmat(Init_Y,size(Init_Y,2),1);
dPjdTidTj=dPjdTidTj.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdTidTj=dPidTidTj_2+dPjdTidTj;% @@@@@@
%% deltaP/deltaThyta_deltaThyta
t1=Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
t5=sum(t4,2);
t6=t5'.*Init_Y(1:2:size(Init_Y,2));%y
dPidTidTi=diag(t6);
t1=Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=t2-diag(diag(t2));
t3=repmat(Init_Y',1,size(Init_Y,2));%y
t4=t1.*t2.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));
t5=sum(t4,1);
dPidTjdTj=diag(t5);
dPdTidTi=dPidTidTi+dPidTjdTj;%% @@@@@@
%% deltaP/deltaThytai_dVi
t1=ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t1-diag(t2);%
t4=sum(t3,2);
t4=t4'.*Init_Y(1:2:size(Init_Y,2));%y
dPidTidVi=diag(t4);
t1=-Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t1=t1-diag(diag(t1));%
t2=repmat(Init_Y',1,size(Init_Y,2));
t3=t1.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
t6=sum(t3,1);
dPdTidVi=dPidTidVi+diag(t6);%% @@@@@@
%% deltaP/deltaThytai_dVj
t1=Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidTidVj=t1-diag(diag(t1));%%
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidTidVj=dPidTidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
t1=Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdTidVj=t1-diag(diag(t1));%
t2=t2';
dPjdTidVj=dPjdTidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdTidVj=dPidTidVj+dPjdTidVj;% @@@@@
%% deltaP/dVi_deltaThytaj
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidVidTj=t1-diag(diag(t1));
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidVidTj=dPidVidTj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdVidTj=t1-diag(diag(t1));
t2=t2';
dPjdVidTj=dPjdVidTj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdVidTj=dPidVidTj+dPjdVidTj;% @@@@
%% deltaPi/dVi_deltaThyta
dPdVidTi=dPdTidVi;% @@
%% deltaP/dVi_dVj
t1=-(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
dPidVidVj=t1-diag(diag(t1));%
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidVidVj=dPidVidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
t1=-(real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat));
dPjdVidVj=t1-diag(diag(t1));
t2=t2';
dPjdVidVj=dPjdVidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdVidVj=dPidVidVj+dPjdVidVj;% @@@@@
%% deltaP/dVi_dVi
t0=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t1=diag(t0);
t2=t1'.*Init_Y(1:2:size(Init_Y,2));%y
dPidVidVi=-2*diag(t2);
dPidVjdVj=0;
dPdVidVi=dPidVidVi+dPidVjdVj;% @@@@
%% APi
APi=zeros(2*Busnum,2*Busnum);
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTj;%% TT
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVj;%% TV
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTj;%% VT
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVj;%% VV
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTi;%%
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVi;%%
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTi;%%
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVi;%%
%% deltaQ/deltaThyta_deltaThyta
t1=-Volt'*Volt;
%t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
dQidTidTj=t1.*t2;%
t3=repmat(Init_Y',1,size(Init_Y,2));
dQidTidTj=dQidTidTj.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t2=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
dQjdTidTj=-t1.*t2;
t3=t3';
dQjdTidTj=dQjdTidTj.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQdTidTj=dQidTidTj+dQjdTidTj;% @@@@
%% deltaQ/deltaThyta_deltaThyta
t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
t5=repmat(Init_Y',1,size(Init_Y,2));
t6=t4.*t5(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t7=sum(t6,2);
dQidTidTi=diag(t7);
t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
%t5=t5';
t6=t4.*t5(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t7=sum(t6,1);
dQjdTidTi=diag(t7);
dQdTidTi=dQjdTidTi+dQidTidTi;% @@@@
%% deltaQ/deltaThyta_deltaV
t1=-Volt;
%t1=Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1'*ones(1,Busnum).*t2;
t4=repmat(Init_Y',1,size(Init_Y,2));
dQidTidVj=t3.*t4(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=Volt'*ones(1,Busnum).*t2;
t4=t4';
dQjdTidVj=t3.*t4(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQdTidVj=dQidTidVj+dQjdTidVj;% @@@@@
%% deltaQ/deltaThyta_deltaV
%t1=sum(dQidTidVj,2)-diag(dQidTidVj);%
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*t1;
t2=t2-diag(diag(t2));
t3=sum(t2,2);
t4=t3'.*Init_Y(2:2:size(Init_Y,2));%y
dQidTidVi=diag(t4);
t1=Volt'*ones(1,Busnum).*(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
t2=t1-diag(diag(t1));
t3=repmat(Init_Y',1,size(Init_Y,2));
t4=t2.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t5=sum(t4,1);
dQjdTidVi=diag(t5);
dQdTidVi=dQidTidVi+dQjdTidVi;% @@@@
%% deltaQ/deltaV_deltaV
t1=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t2=repmat(Init_Y',1,size(Init_Y,2));
t3=-t1.*t2(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQidVidVj=t3;
t1=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
t2=t2';
t3=t1.*t2(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQjdVidVj=t3;
dQdVidVj=dQidVidVj+dQjdVidVj;% @@@@@
%% deltaQ/deltaV_deltaV
t1=-2*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t2'.*Init_Y(2:2:size(Init_Y,2));%y
dQidVidVi=diag(t3);
% t1=-real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
% t2=diag(t1);
% t3=t1-diag(t2);
% t4=sum(t3,1);
% t5=t4.*Init_Y(2:2:size(Init_Y,2));%y
% dQjdVidVi=diag(t5);
dQjdVidVi=0;
dQdVidVi=dQidVidVi+dQjdVidVi; % @@@@
%% deltaQ/deltaV_deltaThyta
%t1=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=ones(Busnum,1)*Volt.*(t1);
t3=repmat(Init_Y',1,size(Init_Y,2));
t4=t2'.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQidVidTj=t4;
t1=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*(t1);
t3=t3';
t4=t2.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQjdVidTj=t4;
dQdVidTj=dQidVidTj+dQjdVidTj;% @@@
%% deltaQ/deltaV_deltaThyta
dQdVidTi=dQdTidVi;% @
%% AQi
AQi=zeros(2*Busnum,2*Busnum);
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTj;%% TT
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVj;%% TV
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTj;%% VT
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVj;%% VV
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTi;%%
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVi;%%
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTi;%%
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVi;%%
%% ddh
t=[zeros(2*size(PVi,1),ContrlCount);
zeros(2*Busnum,2*size(PVi,1)),AQi+APi;
];
ddh=t;
end

205
func_ddh2.asv Normal file
View File

@ -0,0 +1,205 @@
function ddh=func_ddh2(AngleIJMat,GB,Volt,Init_Y,Busnum,PVi,PGi)
%% deltaPi/deltaThytai_deltaThytaj 非对角元素
ContrlCount=size(PVi,1)+size(PGi,1)+Busnum*2;
t1=-Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
dPdTidTj=t1.*t2; %%(保留了对角元素的)
dPidTidTj_2=dPdTidTj-diag(diag(dPdTidTj));%去掉了对角元素的
t3=repmat(Init_Y',1,size(Init_Y,2));%乘y的系数
dPidTidTj_2=dPidTidTj_2.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
dPjdTidTj=t3-diag(diag(t3));%去掉了对角元素的
t3=repmat(Init_Y,size(Init_Y,2),1);
dPjdTidTj=dPjdTidTj.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
dPdTidTj=dPidTidTj_2+dPjdTidTj;%最终非对角元素 @@@@@@@
%% deltaP/deltaThyta_deltaThyta 对角元素
t1=Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
t5=sum(t4,2);
t6=t5'.*Init_Y(1:2:size(Init_Y,2));%乘y的系数
dPidTidTi=diag(t6);
t1=Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=t1.*t2;
t2=t2-diag(diag(t2));
t3=repmat(Init_Y',1,size(Init_Y,2));%乘y的系数
t4=t2.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));
t5=sum(t4,1);
dPidTjdTj=diag(t5);
dPdTidTi=dPidTidTi+dPidTjdTj;%%最终对角元素 @@@@@@@
%% deltaP/deltaThytai_dVi 对角元素
t1=ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t1-diag(t2);%去掉了对角元素的
t4=sum(t3,2);
t4=t4'.*Init_Y(1:2:size(Init_Y,2));%乘y的系数
dPidTidVi=diag(t4);
t1=-Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t1=t1-diag(diag(t1));%去掉对角元素
t2=repmat(Init_Y',1,size(Init_Y,2));
t3=t1.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
t6=sum(t3,1);
dPdTidVi=dPidTidVi+diag(t6);%%最终对角元素 @@@@@@
%% deltaP/deltaThytai_dVj 非对角元素
t1=Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidTidVj=t1-diag(diag(t1));%%去掉对角元素的
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidTidVj=dPidTidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
t1=Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdTidVj=t1-diag(diag(t1));%去掉对角元素的
t2=t2';
dPjdTidVj=dPjdTidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
dPdTidVj=dPidTidVj+dPjdTidVj;%最终非对角元素 @@@@@@
%% deltaP/dVi_deltaThytaj 非对角元素
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidVidTj=t1-diag(diag(t1));
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidVidTj=dPidVidTj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdVidTj=t1-diag(diag(t1));
t2=t2';
dPjdVidTj=dPjdVidTj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
dPdVidTj=dPidVidTj+dPjdVidTj;%最终非对角元素 @@@@@
%% deltaPi/dVi_deltaThyta 对角元素
dPdVidTi=dPdTidVi;%最终对角元素 @@
%% deltaP/dVi_dVj 非对角元素
t1=-(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
dPidVidVj=t1-diag(diag(t1));%去掉对角元素的
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidVidVj=dPidVidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
t1=-(real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat));
dPjdVidVj=t1-diag(diag(t1));
t2=t2';
dPjdVidVj=dPjdVidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%乘y的系数
dPdVidVj=dPidVidVj+dPjdVidVj;%最终非对角元素 @@@@@@
%% deltaP/dVi_dVi 对角元素
t0=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t1=diag(t0);
t2=t1'.*Init_Y(1:2:size(Init_Y,2));%乘y的系数
dPidVidVi=-2*diag(t2);
dPidVjdVj=0;
dPdVidVi=dPidVidVi+dPidVjdVj;%最终对角元素 @@@@@
%% 生成APi
APi=zeros(2*Busnum,2*Busnum);
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTj;%%非对角 TT
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVj;%%非对角 TV
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTj;%%非对角 VT
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVj;%%非对角 VV
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTi;%%对角
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVi;%%对角
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTi;%%对角
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVi;%%对角
%% deltaQ/deltaThyta_deltaThyta 非对角元素
t1=-Volt'*Volt;
%t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
dQidTidTj=t1.*t2;%不去掉对角元素了,反正最后是要修正的
t3=repmat(Init_Y',1,size(Init_Y,2));
dQidTidTj=dQidTidTj.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
t2=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
dQjdTidTj=-t1.*t2;
t3=t3';
dQjdTidTj=dQjdTidTj.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQdTidTj=dQidTidTj+dQjdTidTj;%最终非对角元素 @@@@@
%% deltaQ/deltaThyta_deltaThyta 对角元素
t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
t5=repmat(Init_Y',1,size(Init_Y,2));
t6=t4.*t5(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
t7=sum(t6,2);
dQidTidTi=diag(t7);
t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
%t5=t5';
t6=t4.*t5(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
t7=sum(t6,1);
dQjdTidTi=diag(t7);
dQdTidTi=dQjdTidTi+dQidTidTi;%最终对角元素 @@@@@
%% deltaQ/deltaThyta_deltaV 非对角元素
t1=-Volt;
%t1=Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1'*ones(1,Busnum).*t2;
t4=repmat(Init_Y',1,size(Init_Y,2));
dQidTidVj=t3.*t4(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=Volt'*ones(1,Busnum).*t2;
t4=t4';
dQjdTidVj=t3.*t4(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQdTidVj=dQidTidVj+dQjdTidVj;%最终非对角元素 @@@@@@
%% deltaQ/deltaThyta_deltaV 对角元素
%t1=sum(dQidTidVj,2)-diag(dQidTidVj);%去掉对角元素
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*t1;
t2=t2-diag(diag(t2));
t3=sum(t2,2);
t4=t3'.*Init_Y(2:2:size(Init_Y,2));%乘y的系数
dQidTidVi=diag(t4);
t1=Volt'*ones(1,Busnum).*(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
t2=t1-diag(diag(t1));
t3=repmat(Init_Y',1,size(Init_Y,2));
t4=t2.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
t5=sum(t4,1);
dQjdTidVi=diag(t5);
dQdTidVi=dQidTidVi+dQjdTidVi;% @@@@
%% deltaQ/deltaV_deltaV 非对角元素
t1=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t2=repmat(Init_Y',1,size(Init_Y,2));
t3=-t1.*t2(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQidVidVj=t3;
t1=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
t2=t2';
t3=t1.*t2(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQjdVidVj=t3;
dQdVidVj=dQidVidVj+dQjdVidVj;% @@@@@
%% deltaQ/deltaV_deltaV 对角元素
t1=-2*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t2'.*Init_Y(2:2:size(Init_Y,2));%乘y的系数
dQidVidVi=diag(t3);
% t1=-real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
% t2=diag(t1);
% t3=t1-diag(t2);
% t4=sum(t3,1);
% t5=t4.*Init_Y(2:2:size(Init_Y,2));%乘y的系数
% dQjdVidVi=diag(t5);
dQjdVidVi=0;
dQdVidVi=dQidVidVi+dQjdVidVi; % @@@@
%% deltaQ/deltaV_deltaThyta 非对角元素
%t1=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=ones(Busnum,1)*Volt.*(t1);
t3=repmat(Init_Y',1,size(Init_Y,2));
t4=t2'.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQidVidTj=t4;
t1=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*(t1);
t3=t3';
t4=t2.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%乘y的系数
dQjdVidTj=t4;
dQdVidTj=dQidVidTj+dQjdVidTj;% @@@
%% deltaQ/deltaV_deltaThyta 对角元素
dQdVidTi=dQdTidVi;% @
%% 生成AQi
AQi=zeros(2*Busnum,2*Busnum);
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTj;%%非对角 TT
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVj;%%非对角 TV
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTj;%%非对角 VT
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVj;%%非对角 VV
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTi;%%对角
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVi;%%对角
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTi;%%对角
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVi;%%对角
%% 生成ddh
t=[zeros(size(PGi,1)+size(PVi,1),ContrlCount);
zeros(2*Busnum,size(PVi,1)+size(PGi,1)),AQi+APi;
];
ddh=t;
end

206
func_ddh2.m Normal file
View File

@ -0,0 +1,206 @@
function ddh=func_ddh2(AngleIJMat,GB,Volt,Init_Y,Busnum,PVi,PGi)
%% deltaPi/deltaThytai_deltaThytaj
ContrlCount=size(PVi,1)+size(PGi,1)+Busnum*2;
t1=-Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
dPdTidTj=t1.*t2; %%()
dPidTidTj_2=dPdTidTj-diag(diag(dPdTidTj));%
t3=repmat(Init_Y',1,size(Init_Y,2));%y
dPidTidTj_2=dPidTidTj_2.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
dPjdTidTj=t3-diag(diag(t3));%
t3=repmat(Init_Y,size(Init_Y,2),1);
dPjdTidTj=dPjdTidTj.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdTidTj=dPidTidTj_2+dPjdTidTj;% @@@@@@@
%% deltaP/deltaThyta_deltaThyta
t1=Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
t5=sum(t4,2);
t6=t5'.*Init_Y(1:2:size(Init_Y,2));%y
dPidTidTi=diag(t6);
t1=Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=t1.*t2;
t2=t2-diag(diag(t2));
t3=repmat(Init_Y',1,size(Init_Y,2));%y
t4=t2.*t3(1:2:size(Init_Y,2),1:2:size(Init_Y,2));
t5=sum(t4,1);
dPidTjdTj=diag(t5);
dPdTidTi=dPidTidTi+dPidTjdTj;%% @@@@@@@
%% deltaP/deltaThytai_dVi
t1=ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t1-diag(t2);%
t4=sum(t3,2);
t4=t4'.*Init_Y(1:2:size(Init_Y,2));%y
dPidTidVi=diag(t4);
t1=-Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t1=t1-diag(diag(t1));%
t2=repmat(Init_Y',1,size(Init_Y,2));
t3=t1.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
t6=sum(t3,1);
dPdTidVi=dPidTidVi+diag(t6);%% @@@@@@
%% deltaP/deltaThytai_dVj
t1=Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidTidVj=t1-diag(diag(t1));%%
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidTidVj=dPidTidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
t1=Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdTidVj=t1-diag(diag(t1));%
t2=t2';
dPjdTidVj=dPjdTidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdTidVj=dPidTidVj+dPjdTidVj;% @@@@@@
%% deltaP/dVi_deltaThytaj
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidVidTj=t1-diag(diag(t1));
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidVidTj=dPidVidTj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdVidTj=t1-diag(diag(t1));
t2=t2';
dPjdVidTj=dPjdVidTj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdVidTj=dPidVidTj+dPjdVidTj;% @@@@@
%% deltaPi/dVi_deltaThyta
dPdVidTi=dPdTidVi;% @@
%% deltaP/dVi_dVj
t1=-(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
dPidVidVj=t1-diag(diag(t1));%
t2=repmat(Init_Y',1,size(Init_Y,2));
dPidVidVj=dPidVidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
t1=-(real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat));
dPjdVidVj=t1-diag(diag(t1));
t2=t2';
dPjdVidVj=dPjdVidVj.*t2(1:2:size(Init_Y,2),1:2:size(Init_Y,2));%y
dPdVidVj=dPidVidVj+dPjdVidVj;% @@@@@@
%% deltaP/dVi_dVi
t0=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t1=diag(t0);
t2=t1'.*Init_Y(1:2:size(Init_Y,2));%y
dPidVidVi=-2*diag(t2);
dPidVjdVj=0;
dPdVidVi=dPidVidVi+dPidVjdVj;% @@@@@
%% APi
APi=zeros(2*Busnum,2*Busnum);
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTj;%% TT
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVj;%% TV
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTj;%% VT
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVj;%% VV
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTi;%%
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVi;%%
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTi;%%
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVi;%%
%% deltaQ/deltaThyta_deltaThyta
t1=-Volt'*Volt;
%t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
dQidTidTj=t1.*t2;%
t3=repmat(Init_Y',1,size(Init_Y,2));
dQidTidTj=dQidTidTj.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t2=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
dQjdTidTj=-t1.*t2;
t3=t3';
dQjdTidTj=dQjdTidTj.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQdTidTj=dQidTidTj+dQjdTidTj;% @@@@@
%% deltaQ/deltaThyta_deltaThyta
t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
t5=repmat(Init_Y',1,size(Init_Y,2));
t6=t4.*t5(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t7=sum(t6,2);
dQidTidTi=diag(t7);
t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
%t5=t5';
t6=t4.*t5(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t7=sum(t6,1);
dQjdTidTi=diag(t7);
dQdTidTi=dQjdTidTi+dQidTidTi;% @@@@@
%% deltaQ/deltaThyta_deltaV
t1=-Volt;
%t1=Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1'*ones(1,Busnum).*t2;
t4=repmat(Init_Y',1,size(Init_Y,2));
dQidTidVj=t3.*t4(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=Volt'*ones(1,Busnum).*t2;
t4=t4';
dQjdTidVj=t3.*t4(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQdTidVj=dQidTidVj+dQjdTidVj;% @@@@@@
%% deltaQ/deltaThyta_deltaV
%t1=sum(dQidTidVj,2)-diag(dQidTidVj);%
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*t1;
t2=t2-diag(diag(t2));
t3=sum(t2,2);
t4=t3'.*Init_Y(2:2:size(Init_Y,2));%y
dQidTidVi=diag(t4);
t1=Volt'*ones(1,Busnum).*(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
t2=t1-diag(diag(t1));
t3=repmat(Init_Y',1,size(Init_Y,2));
t4=t2.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t5=sum(t4,1);
dQjdTidVi=diag(t5);
dQdTidVi=dQidTidVi+dQjdTidVi;% @@@@
%% deltaQ/deltaV_deltaV
t1=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t2=repmat(Init_Y',1,size(Init_Y,2));
t3=-t1.*t2(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQidVidVj=t3;
t1=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
t2=t2';
t3=t1.*t2(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQjdVidVj=t3;
dQdVidVj=dQidVidVj+dQjdVidVj;% @@@@@@
%% deltaQ/deltaV_deltaV
t1=-2*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t2'.*Init_Y(2:2:size(Init_Y,2));%y
dQidVidVi=diag(t3);
% t1=-real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
% t2=diag(t1);
% t3=t1-diag(t2);
% t4=sum(t3,1);
% t5=t4.*Init_Y(2:2:size(Init_Y,2));%y
% dQjdVidVi=diag(t5);
dQjdVidVi=0;
dQdVidVi=dQidVidVi+dQjdVidVi; % @@@@@
%% deltaQ/deltaV_deltaThyta
%t1=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=ones(Busnum,1)*Volt.*(t1);
t3=repmat(Init_Y',1,size(Init_Y,2));
%t4=t2'.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
t4=t2.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQidVidTj=t4;
t1=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*(t1);
t3=t3';
t4=t2.*t3(2:2:size(Init_Y,2),2:2:size(Init_Y,2));%y
dQjdVidTj=t4;
dQdVidTj=dQidVidTj+dQjdVidTj;% @@@@
%% deltaQ/deltaV_deltaThyta
dQdVidTi=dQdTidVi;% @
%% AQi
AQi=zeros(2*Busnum,2*Busnum);
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTj;%% TT
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVj;%% TV
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTj;%% VT
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVj;%% VV
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTi;%%
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVi;%%
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTi;%%
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVi;%%
%% ddh
t=[zeros(size(PGi,1)+size(PVi,1),ContrlCount);
zeros(2*Busnum,size(PVi,1)+size(PGi,1)),AQi+APi;
];
ddh=t;
end

409
func_ddh3.asv Normal file
View File

@ -0,0 +1,409 @@
function ddh=func_ddh3(AngleIJMat,GB,Volt,Init_Y,Busnum,PVi,PGi,Y)
%决定用循环重写
ContrlCount=size(PVi,1)+size(PGi,1)+Busnum*2;
%deltaPi/deltaThytai_deltaThytaj 非对角元素
dPidTidTj=zeros(Busnum);
t1=-Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
for I=1:Busnum
for J=1:Busnum
dPidTidTj(I,J)=dPidTidTj(I,J)+Init_Y(2*I-1)*t3(I,J);
end
end
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
dPjdTidTj=zeros(Busnum);
for I=1:Busnum
for J=1:Busnum
dPjdTidTj(I,J)=dPjdTidTj(I,J)+Init_Y(2*J-1)*t3(I,J);
end
end
dPdTidTj=dPidTidTj+dPjdTidTj;%最终非对角元素
%% deltaP/deltaThyta_deltaThyta 对角元素
t1=Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
t5=sum(t4,2);
t6=t5'.*Init_Y(1:2:size(Init_Y,2));%乘y的系数
dPidTidTi=diag(t6);
t1=Volt'*Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=t1.*t2;
dPidTjdTj=zeros(Busnum);
for J=1:Busnum
for I=1:Busnum
if I==J
continue;
end
dPidTjdTj(J,J)=dPidTjdTj(J,J)+Init_Y(2*I-1)*t2(I,J);
end
end
dPdTidTi=dPidTidTi+dPidTjdTj;
%%%%%%%%%
dPdTidTj=dPdTidTj-diag(diag(dPdTidTj));
hh=dPdTidTj+dPdTidTi; %#ok<NASGU>
%% deltaP/deltaThytai_dVi 对角元素
t1=ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t1-diag(t2);%去掉了对角元素的
t4=sum(t3,2);
t4=t4'.*Init_Y(1:2:size(Init_Y,2));%乘y的系数
dPidTidVi=diag(t4);
t1=-Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPjdTidVi=zeros(Busnum);
for J=1:Busnum
for I=1:Busnum
if I==J
continue;
end
dPjdTidVi(J,J)=dPjdTidVi(J,J)+Init_Y(2*I-1)*t1(I,J);
end
end
dPdTidVi=dPidTidVi+dPjdTidVi;
%% deltaP/deltaThytai_dVj 非对角元素
t1=Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));%20111224 存疑与学姐给的公式不一致
%t1=ones(1,Busnum)'*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidTidVj=zeros(Busnum);
for I=1:Busnum
for J=1:Busnum
dPidTidVj(I,J)=dPidTidVj(I,J)+Init_Y(2*I-1)*t1(I,J);
end
end
dPjdTidVj=zeros(Busnum);
t1=Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
for I=1:Busnum
for J=1:Busnum
dPjdTidVj(I,J)=dPjdTidVj(I,J)+Init_Y(2*J-1)*t1(I,J);
end
end
dPdTidVj=dPidTidVj+dPjdTidVj;
%%%%%%%%%%%%%%%%%%%%%%
dPdTidVj=dPdTidVj-diag(diag(dPdTidVj));
hh=dPdTidVj+dPdTidVi; %#ok<NASGU>
%% deltaP/dVi_deltaThytaj 非对角元素
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
dPidVidTj=zeros(Busnum);
for I=1:Busnum
for J=1:Busnum
dPidVidTj(I,J)=dPidVidTj(I,J)+Init_Y(2*I-1)*t1(I,J);
end
end
t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
dPjdVidTj=zeros(Busnum);
for I=1:Busnum
for J=1:Busnum
dPjdVidTj(I,J)=dPjdVidTj(I,J)+Init_Y(2*J-1)*t1(I,J);
end
end
dPdVidTj=dPidVidTj+dPjdVidTj;
%% deltaPi/dVi_deltaThyta 对角元素
dPdVidTi=dPdTidVi;
%%%%%%%%%%%%%%%%
dPdVidTj=dPdVidTj-diag(diag(dPdVidTj));
hh=dPdVidTj+dPdVidTi;
%% deltaP/dVi_dVj 非对角元素
t1=-(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
dPidVidVj=zeros(Busnum);
for I=1:Busnum
for J=1:Busnum
dPidVidVj(I,J)=dPidVidVj(I,J)+Init_Y(2*I-1)*t1(I,J);
end
end
t1=-(real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat));
dPjdVidVj=zeros(Busnum);
for I=1:Busnum
for J=1:Busnum
dPjdVidVj(I,J)=dPjdVidVj(I,J)+Init_Y(2*J-1)*t1(I,J);
end
end
dPdVidVj=dPidVidVj+dPjdVidVj;
%% deltaP/dVi_dVi 对角元素
t0=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t1=diag(t0);
t2=t1'.*Init_Y(1:2:size(Init_Y,2));%乘y的系数
dPidVidVi=-2*diag(t2);
dPidVjdVj=0;
dPdVidVi=dPidVidVi+dPidVjdVj;
%%%%%%%%%%%
dPdVidVj=dPdVidVj-diag(diag(dPdVidVj));
hh=dPdVidVj+dPdVidVi;
%% 生成APi
APi=zeros(2*Busnum,2*Busnum);
dPdTidTj=dPdTidTj-diag(diag(dPdTidTj));
dPdTidVj=dPdTidVj-diag(diag(dPdTidVj));
dPdVidTj=dPdVidTj-diag(diag(dPdVidTj));
dPdVidVj=dPdVidVj-diag(diag(dPdVidVj));
APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTj;%%非对角 TT
APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVj;%%非对角 TV
APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTj;%%非对角 VT
APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVj;%%非对角 VV
APi(1:2:2*Busnum,1:2:2*Busnum)=APi(1:2:2*Busnum,1:2:2*Busnum)+dPdTidTi;%%对角
APi(1:2:2*Busnum,2:2:2*Busnum)=APi(1:2:2*Busnum,2:2:2*Busnum)+dPdTidVi;%%对角
APi(2:2:2*Busnum,1:2:2*Busnum)=APi(2:2:2*Busnum,1:2:2*Busnum)+dPdVidTi;%%对角
APi(2:2:2*Busnum,2:2:2*Busnum)=APi(2:2:2*Busnum,2:2:2*Busnum)+dPdVidVi;%%对角
%% deltaQ/deltaThyta_deltaThyta 非对角元素
t1=-Volt'*Volt;
% %t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t3=t1.*t2;
dQidTidTj=zeros(Busnum);
for I=1:Busnum
for J=1:Busnum
dQidTidTj(I,J)=dQidTidTj(I,J)+Init_Y(2*I)*t3(I,J);
end
end
t2=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
t3=-t1.*t2;
dQjdTidTj=zeros(Busnum);
for I=1:Busnum
for J=1:Busnum
dQjdTidTj(I,J)=dQjdTidTj(I,J)+Init_Y(2*J)*t3(I,J);
end
end
dQdTidTj=dQidTidTj+dQjdTidTj;
%% deltaQ/deltaThyta_deltaThyta 对角元素
t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t3=t1.*t2;
t4=t3-diag(diag(t3));
t5=sum(t4,2);
t6=t5'.*Init_Y(2:2:size(Init_Y,2));
dQidTidTi=diag(t6);
t1=Volt'*Volt;
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t3=t1.*t2;
dQjdTidTi=zeros(Busnum);
for J=1:Busnum
for I=1:Busnum
if I==J
continue;
end
dQjdTidTi(J,J)=dQjdTidTi(J,J)+Init_Y(2*I)*t3(I,J);
end
end
dQdTidTi=dQjdTidTi+dQidTidTi;
%%%%%%%%%%%%
dQdTidTj=dQdTidTj-diag(diag(dQdTidTj));
hh=dQdTidTj+dQdTidTi;
%% deltaQ/deltaThyta_deltaV 非对角元素
t1=-Volt;
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t3=t1'*ones(1,Busnum).*t2;
dQidTidVj=zeros(Busnum);
for I=1:Busnum
for J=1:Busnum
dQidTidVj(I,J)=dQidTidVj(I,J)+Init_Y(2*I)*t3(I,J);
end
end
t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t3=Volt'*ones(1,Busnum).*t2;
dQjdTidVj=zeros(Busnum);
for I=1:Busnum
for J=1:Busnum
%dQjdTidVj(I,J)=dQidTidVj(I,J)+Init_Y(2*J)*t3(I,J); 20111225
dQjdTidVj(I,J)=dQjdTidVj(I,J)+Init_Y(2*J)*t3(I,J);
end
end
dQdTidVj=dQidTidVj+dQjdTidVj;
%% deltaQ/deltaThyta_deltaV 对角元素
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*t1;
t2=t2-diag(diag(t2));
t3=sum(t2,2);
t3=t3'.*Init_Y(2:2:size(Init_Y,2));
dQidTidVi=diag(t3);
t1=Volt'*ones(1,Busnum).*(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
t2=t1-diag(diag(t1));
dQjdTidVi=zeros(Busnum);
for J=1:Busnum
for I=1:Busnum
if I==J
continue;
end
dQjdTidVi(J,J)=dQjdTidVi(J,J)+Init_Y(2*I)*t2(I,J);
end
end
dQdTidVi=dQidTidVi+dQjdTidVi;
dQdTidVj=dQdTidVj-diag(diag(dQdTidVj));
hh=dQdTidVj+dQdTidVi;
%% deltaQ/deltaV_deltaV 非对角元素
t1=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
t2=-t1;
dQidVidVj=zeros(Busnum);
for I=1:Busnum
for J=1:Busnum
dQidVidVj(I,J)=dQidVidVj(I,J)+Init_Y(2*I)*t2(I,J);
end
end
t1=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
dQjdVidVj=zeros(Busnum);
for I=1:Busnum
for J=1:Busnum
dQjdVidVj(I,J)=dQjdVidVj(I,J)+Init_Y(2*J)*t1(I,J);
end
end
dQdVidVj=dQidVidVj+dQjdVidVj;
%% deltaQ/deltaV_deltaV 对角元素
t1=-2*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
t2=diag(t1);
t3=t2'.*Init_Y(2:2:size(Init_Y,2));%乘y的系数
dQidVidVi=diag(t3);
dQjdVidVi=0;
dQdVidVi=dQidVidVi+dQjdVidVi;
%%%%%%%%%%%%%%
dQdVidVj=dQdVidVj-diag(diag(dQdVidVj));
hh=dQdVidVi+dQdVidVj;
%% deltaQ/deltaV_deltaThyta 非对角元素
t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t2=ones(Busnum,1)*Volt.*(t1);
dQidVidTj=zeros(Busnum);
for I=1:Busnum
for J=1:Busnum
dQidVidTj(I,J)=dQidVidTj(I,J)+Init_Y(2*I)*t2(I,J);
end
end
t1=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
t2=-ones(Busnum,1)*Volt.*(t1);
dQjdVidTj=zeros(Busnum);
for I=1:Busnum
for J=1:Busnum
dQjdVidTj(I,J)=dQjdVidTj(I,J)+Init_Y(2*J)*t2(I,J);
end
end
dQdVidTj=dQidVidTj+dQjdVidTj;
%% deltaQ/deltaV_deltaThyta 对角元素
dQdVidTi=dQdTidVi;% @
dQdVidTj=dQdVidTj-diag(diag(dQdVidTj));
hhd=dQdVidTi+dQdVidTj;
%% 生成AQi
AQi=zeros(2*Busnum,2*Busnum);
dQdTidTj=dQdTidTj-diag(diag(dQdTidTj));
dQdTidVj=dQdTidVj-diag(diag(dQdTidVj));
dQdVidTj=dQdVidTj-diag(diag(dQdVidTj));
dQdVidVj=dQdVidVj-diag(diag(dQdVidVj));
AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTj;%%非对角 TT
AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVj;%%非对角 TV
AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTj;%%非对角 VT
AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVj;%%非对角 VV
AQi(1:2:2*Busnum,1:2:2*Busnum)=AQi(1:2:2*Busnum,1:2:2*Busnum)+dQdTidTi;%%对角
AQi(1:2:2*Busnum,2:2:2*Busnum)=AQi(1:2:2*Busnum,2:2:2*Busnum)+dQdTidVi;%%对角
AQi(2:2:2*Busnum,1:2:2*Busnum)=AQi(2:2:2*Busnum,1:2:2*Busnum)+dQdVidTi;%%对角
AQi(2:2:2*Busnum,2:2:2*Busnum)=AQi(2:2:2*Busnum,2:2:2*Busnum)+dQdVidVi;%%对角
%% 生成ddh
t=[zeros(size(PGi,1)+size(PVi,1),ContrlCount);
zeros(2*Busnum,size(PVi,1)+size(PGi,1)),AQi+APi;
];
ddh=t;
%% 以下是学姐给的公式
AngleIJ=AngleIJMat-angle(GB);
%yP=Init_Y(1:2:size(Init_Y,2));
yP=Init_Y(1:2:size(Init_Y,2));%暂时改这里 20111227
%yQ=Init_Y(2:2:size(Init_Y,2));
t1=-diag(Y.*cos(AngleIJ')*diag(Volt)*yP');
t2=diag(diag(Volt)*yP')*Y.*cos(AngleIJ);
t3=(t1+t2)*diag(Volt);
t4=-(diag(Y.*cos(AngleIJ)*Volt') -diag(Volt)*Y.*cos(AngleIJ') )*diag(diag(Volt)*yP');
ddPdTdT=t3+t4;%ok1
tttt=t2*diag(Volt);%ok1
ttttt=diag(Volt)*Y.*cos(AngleIJ')*diag(diag(Volt)*yP');%ok1
tttttt=tttt+ttttt;%ok1
ttttttt=-diag(Y.*cos(AngleIJ)*Volt')*diag(diag(Volt)*yP')+tttt;%ok1
tttttttt=diag(Volt)*Y.*cos(AngleIJ')*diag(diag(Volt)*yP')+t1*diag(Volt);%ok1
t1=(-diag(Y.*sin(AngleIJ)*Volt')+diag(Volt)*Y.*sin(AngleIJ') )*diag(yP);
t2= -diag( diag(Volt)*yP' )*Y.*sin(AngleIJ)+diag(Y.*sin(AngleIJ')*diag(Volt)*yP');
ddPdVdT=t1+t2;%ok1
tttt=-diag( diag(Volt)*yP' )*Y.*sin(AngleIJ);
t1=diag( Y.*sin(AngleIJ')*diag(Volt)*yP');
t2=diag(yP)*Y.*sin(AngleIJ)*diag(Volt);
t3=-diag(yP)*diag(Y.*sin(AngleIJ)*Volt');
t4=-Y.*sin(AngleIJ')*diag( diag(Volt)*yP' );
ddPdTdV=t1+t2+t3+t4;%存疑与我的不一样
tttt=t2;
ttttt=t4;
t1=Y.*cos(AngleIJ')*diag(yP);
t2=diag(yP)*Y.*cos(AngleIJ);
ddPdVdV=t1+t2;
t1=-diag(Y.*sin(AngleIJ)*Volt');
t2=diag(Volt)*Y.*sin(AngleIJ');
t3=(t1+t2)*diag( diag(Volt)*yQ' );
t4=-diag( diag(Volt)*yQ' )*Y.*sin(AngleIJ);
t5=diag(Y.*sin(AngleIJ')*diag(Volt)*yQ');
t6=-(t4+t5)*diag(Volt);
ddQdTdT=t3+t6;%ok1
tttt=-(t4)*diag(Volt);
ttttt=t2*diag( diag(Volt)*yQ' );
tttttt=t1*diag( diag(Volt)*yQ' )+tttt;
ttttttt=-t5*diag(Volt)+t2*diag( diag(Volt)*yQ' );
t1=(diag(Y.*cos(AngleIJ)*Volt')-diag(Volt)*Y.*cos(AngleIJ') )*diag(yQ);
t2=+diag( diag(Volt)*yQ' )*Y.*cos(AngleIJ)-diag(Y.*cos(AngleIJ')*diag(Volt)*yQ');
tttt=diag( diag(Volt)*yQ' )*Y.*cos(AngleIJ);
ttttt=-diag(Volt)*Y.*cos(AngleIJ') *diag(yQ);
ddQdVdT=t1+t2;
t1=Y.*cos(AngleIJ')*diag(diag(Volt)*yQ');
t2=diag(yQ)*diag(Y.*cos(AngleIJ)*Volt');
t3=-diag(Y.*cos(AngleIJ')*diag(Volt)*yQ');
t4=-diag(yQ)*Y.*cos(AngleIJ)*diag(Volt);
ddQdTdV=t1+t2+t3+t4;
t1=Y.*sin(AngleIJ')*diag(yQ);
t2=diag(yQ)*Y.*sin(AngleIJ);
ddQdVdV=t1+t2;
%%%%
t=zeros(2*Busnum);
% t(1:2:2*Busnum,1:2:2*Busnum)=ddPdTdT+ddQdTdT;
% %t(1:2:2*Busnum,2:2:2*Busnum)=ddPdTdV+ddQdTdV;
% %t(2:2:2*Busnum,1:2:2*Busnum)=ddPdVdT+ddQdVdT;
% t(1:2:2*Busnum,2:2:2*Busnum)=ddPdVdT+ddQdVdT;
% t(2:2:2*Busnum,1:2:2*Busnum)=ddPdTdV+ddQdTdV;
% t(2:2:2*Busnum,2:2:2*Busnum)=ddPdVdV+ddQdVdV;暂时改一下 20111227
t=[ddPdVdV+ddQdVdV,ddPdVdT+ddQdVdT;
ddPdTdV+ddQdTdV,ddPdTdT+ddQdTdT;
];
t=[zeros(size(PGi,1)+size(PVi,1),ContrlCount);
zeros(2*Busnum,size(PVi,1)+size(PGi,1)),-t;
];
ddh=t;
end

413
func_ddh3.m Normal file
View File

@ -0,0 +1,413 @@
function ddh=func_ddh3(AngleIJMat,GB,Volt,Init_Y,Busnum,PVi,PGi,Y)
%
ContrlCount=size(PVi,1)+size(PGi,1)+Busnum*2;
%deltaPi/deltaThytai_deltaThytaj
% dPidTidTj=zeros(Busnum);
% t1=-Volt'*Volt;
% t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
% t3=t1.*t2;
% for I=1:Busnum
% for J=1:Busnum
% dPidTidTj(I,J)=dPidTidTj(I,J)+Init_Y(2*I-1)*t3(I,J);
% end
% end
% t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
% t3=t1.*t2;
% dPjdTidTj=zeros(Busnum);
%
% for I=1:Busnum
% for J=1:Busnum
% dPjdTidTj(I,J)=dPjdTidTj(I,J)+Init_Y(2*J-1)*t3(I,J);
% end
% end
% dPdTidTj=dPidTidTj+dPjdTidTj;%
%
%
%
% %% deltaP/deltaThyta_deltaThyta
% t1=Volt'*Volt;
% t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
% t3=t1.*t2;
% t4=t3-diag(diag(t3));
% t5=sum(t4,2);
% t6=t5'.*Init_Y(1:2:size(Init_Y,2));%y
% dPidTidTi=diag(t6);
% t1=Volt'*Volt;
% t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
% t2=t1.*t2;
% dPidTjdTj=zeros(Busnum);
% for J=1:Busnum
% for I=1:Busnum
%
% if I==J
% continue;
% end
% dPidTjdTj(J,J)=dPidTjdTj(J,J)+Init_Y(2*I-1)*t2(I,J);
%
% end
% end
%
% dPdTidTi=dPidTidTi+dPidTjdTj;
% %%%%%%%%%
% dPdTidTj=dPdTidTj-diag(diag(dPdTidTj));
% hh=dPdTidTj+dPdTidTi; %#ok<NASGU>
% %% deltaP/deltaThytai_dVi
% t1=ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
% t2=diag(t1);
% t3=t1-diag(t2);%
% t4=sum(t3,2);
% t4=t4'.*Init_Y(1:2:size(Init_Y,2));%y
% dPidTidVi=diag(t4);
%
% t1=-Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
% dPjdTidVi=zeros(Busnum);
% for J=1:Busnum
% for I=1:Busnum
%
% if I==J
% continue;
% end
% dPjdTidVi(J,J)=dPjdTidVi(J,J)+Init_Y(2*I-1)*t1(I,J);
%
% end
% end
% dPdTidVi=dPidTidVi+dPjdTidVi;
% %% deltaP/deltaThytai_dVj
%
% t1=Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));%20111224
% %t1=ones(1,Busnum)'*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
% dPidTidVj=zeros(Busnum);
% for I=1:Busnum
% for J=1:Busnum
% dPidTidVj(I,J)=dPidTidVj(I,J)+Init_Y(2*I-1)*t1(I,J);
% end
% end
%
% dPjdTidVj=zeros(Busnum);
% t1=Volt'*ones(1,Busnum).*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
% for I=1:Busnum
% for J=1:Busnum
% dPjdTidVj(I,J)=dPjdTidVj(I,J)+Init_Y(2*J-1)*t1(I,J);
% end
% end
%
% dPdTidVj=dPidTidVj+dPjdTidVj;
% %%%%%%%%%%%%%%%%%%%%%%
% dPdTidVj=dPdTidVj-diag(diag(dPdTidVj));
% hh=dPdTidVj+dPdTidVi; %#ok<NASGU>
% %% deltaP/dVi_deltaThytaj
% t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
% dPidVidTj=zeros(Busnum);
% for I=1:Busnum
% for J=1:Busnum
% dPidVidTj(I,J)=dPidVidTj(I,J)+Init_Y(2*I-1)*t1(I,J);
% end
% end
% t1=-ones(Busnum,1)*Volt.*(real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat));
% dPjdVidTj=zeros(Busnum);
% for I=1:Busnum
% for J=1:Busnum
% dPjdVidTj(I,J)=dPjdVidTj(I,J)+Init_Y(2*J-1)*t1(I,J);
% end
% end
% dPdVidTj=dPidVidTj+dPjdVidTj;
% %% deltaPi/dVi_deltaThyta
%
% dPdVidTi=dPdTidVi;
% %%%%%%%%%%%%%%%%
% dPdVidTj=dPdVidTj-diag(diag(dPdVidTj));
% hh=dPdVidTj+dPdVidTi;
% %% deltaP/dVi_dVj
% t1=-(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
% dPidVidVj=zeros(Busnum);
% for I=1:Busnum
% for J=1:Busnum
% dPidVidVj(I,J)=dPidVidVj(I,J)+Init_Y(2*I-1)*t1(I,J);
% end
% end
%
%
% t1=-(real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat));
% dPjdVidVj=zeros(Busnum);
% for I=1:Busnum
% for J=1:Busnum
% dPjdVidVj(I,J)=dPjdVidVj(I,J)+Init_Y(2*J-1)*t1(I,J);
% end
% end
% dPdVidVj=dPidVidVj+dPjdVidVj;
% %% deltaP/dVi_dVi
% t0=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
% t1=diag(t0);
% t2=t1'.*Init_Y(1:2:size(Init_Y,2));%y
% dPidVidVi=-2*diag(t2);
% dPidVjdVj=0;
% dPdVidVi=dPidVidVi+dPidVjdVj;
% %%%%%%%%%%%
% dPdVidVj=dPdVidVj-diag(diag(dPdVidVj));
% hh=dPdVidVj+dPdVidVi;
% %% APi
% APi=zeros(2*Busnum,2*Busnum);
% dPdTidTj=dPdTidTj-diag(diag(dPdTidTj));
% dPdTidVj=dPdTidVj-diag(diag(dPdTidVj));
% dPdVidTj=dPdVidTj-diag(diag(dPdVidTj));
% dPdVidVj=dPdVidVj-diag(diag(dPdVidVj));
%
% APi(1:2:2*Busnum,1:2:2*Busnum)=dPdTidTj;%% TT
% APi(1:2:2*Busnum,2:2:2*Busnum)=dPdTidVj;%% TV
% APi(2:2:2*Busnum,1:2:2*Busnum)=dPdVidTj;%% VT
% APi(2:2:2*Busnum,2:2:2*Busnum)=dPdVidVj;%% VV
%
% APi(1:2:2*Busnum,1:2:2*Busnum)=APi(1:2:2*Busnum,1:2:2*Busnum)+dPdTidTi;%%
% APi(1:2:2*Busnum,2:2:2*Busnum)=APi(1:2:2*Busnum,2:2:2*Busnum)+dPdTidVi;%%
% APi(2:2:2*Busnum,1:2:2*Busnum)=APi(2:2:2*Busnum,1:2:2*Busnum)+dPdVidTi;%%
% APi(2:2:2*Busnum,2:2:2*Busnum)=APi(2:2:2*Busnum,2:2:2*Busnum)+dPdVidVi;%%
% %% deltaQ/deltaThyta_deltaThyta
% t1=-Volt'*Volt;
% % %t1=Volt'*Volt;
% t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
% t3=t1.*t2;
% dQidTidTj=zeros(Busnum);
% for I=1:Busnum
% for J=1:Busnum
% dQidTidTj(I,J)=dQidTidTj(I,J)+Init_Y(2*I)*t3(I,J);
% end
% end
%
% t2=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
% t3=-t1.*t2;
%
% dQjdTidTj=zeros(Busnum);
% for I=1:Busnum
% for J=1:Busnum
% dQjdTidTj(I,J)=dQjdTidTj(I,J)+Init_Y(2*J)*t3(I,J);
% end
% end
%
% dQdTidTj=dQidTidTj+dQjdTidTj;
% %% deltaQ/deltaThyta_deltaThyta
% t1=Volt'*Volt;
% t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
% t3=t1.*t2;
% t4=t3-diag(diag(t3));
% t5=sum(t4,2);
% t6=t5'.*Init_Y(2:2:size(Init_Y,2));
% dQidTidTi=diag(t6);
% t1=Volt'*Volt;
% t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
% t3=t1.*t2;
% dQjdTidTi=zeros(Busnum);
% for J=1:Busnum
% for I=1:Busnum
%
% if I==J
% continue;
% end
% dQjdTidTi(J,J)=dQjdTidTi(J,J)+Init_Y(2*I)*t3(I,J);
%
% end
% end
%
% dQdTidTi=dQjdTidTi+dQidTidTi;
% %%%%%%%%%%%%
% dQdTidTj=dQdTidTj-diag(diag(dQdTidTj));
% hh=dQdTidTj+dQdTidTi;
% %% deltaQ/deltaThyta_deltaV
% t1=-Volt;
% t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
% t3=t1'*ones(1,Busnum).*t2;
% dQidTidVj=zeros(Busnum);
% for I=1:Busnum
% for J=1:Busnum
% dQidTidVj(I,J)=dQidTidVj(I,J)+Init_Y(2*I)*t3(I,J);
% end
% end
% t2=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
% t3=Volt'*ones(1,Busnum).*t2;
% dQjdTidVj=zeros(Busnum);
% for I=1:Busnum
% for J=1:Busnum
% %dQjdTidVj(I,J)=dQidTidVj(I,J)+Init_Y(2*J)*t3(I,J); 20111225
% dQjdTidVj(I,J)=dQjdTidVj(I,J)+Init_Y(2*J)*t3(I,J);
% end
% end
%
% dQdTidVj=dQidTidVj+dQjdTidVj;
% %% deltaQ/deltaThyta_deltaV
%
% t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
% t2=-ones(Busnum,1)*Volt.*t1;
% t2=t2-diag(diag(t2));
% t3=sum(t2,2);
% t3=t3'.*Init_Y(2:2:size(Init_Y,2));
% dQidTidVi=diag(t3);
%
%
%
% t1=Volt'*ones(1,Busnum).*(real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat));
% t2=t1-diag(diag(t1));
% dQjdTidVi=zeros(Busnum);
% for J=1:Busnum
% for I=1:Busnum
%
% if I==J
% continue;
% end
% dQjdTidVi(J,J)=dQjdTidVi(J,J)+Init_Y(2*I)*t2(I,J);
%
% end
% end
%
% dQdTidVi=dQidTidVi+dQjdTidVi;
% dQdTidVj=dQdTidVj-diag(diag(dQdTidVj));
% hh=dQdTidVj+dQdTidVi;
% %% deltaQ/deltaV_deltaV
% t1=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
% t2=-t1;
% dQidVidVj=zeros(Busnum);
% for I=1:Busnum
% for J=1:Busnum
% dQidVidVj(I,J)=dQidVidVj(I,J)+Init_Y(2*I)*t2(I,J);
% end
% end
%
% t1=real(GB).*sin(AngleIJMat)+imag(GB).*cos(AngleIJMat);
% dQjdVidVj=zeros(Busnum);
% for I=1:Busnum
% for J=1:Busnum
% dQjdVidVj(I,J)=dQjdVidVj(I,J)+Init_Y(2*J)*t1(I,J);
% end
% end
%
% dQdVidVj=dQidVidVj+dQjdVidVj;
% %% deltaQ/deltaV_deltaV
% t1=-2*(real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat));
% t2=diag(t1);
% t3=t2'.*Init_Y(2:2:size(Init_Y,2));%y
% dQidVidVi=diag(t3);
%
% dQjdVidVi=0;
% dQdVidVi=dQidVidVi+dQjdVidVi;
% %%%%%%%%%%%%%%
% dQdVidVj=dQdVidVj-diag(diag(dQdVidVj));
% hh=dQdVidVi+dQdVidVj;
% %% deltaQ/deltaV_deltaThyta
%
% t1=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
% t2=ones(Busnum,1)*Volt.*(t1);
% dQidVidTj=zeros(Busnum);
% for I=1:Busnum
% for J=1:Busnum
% dQidVidTj(I,J)=dQidVidTj(I,J)+Init_Y(2*I)*t2(I,J);
% end
% end
%
%
% t1=real(GB).*cos(AngleIJMat)-imag(GB).*sin(AngleIJMat);
% t2=-ones(Busnum,1)*Volt.*(t1);
% dQjdVidTj=zeros(Busnum);
% for I=1:Busnum
% for J=1:Busnum
% dQjdVidTj(I,J)=dQjdVidTj(I,J)+Init_Y(2*J)*t2(I,J);
% end
% end
%
% dQdVidTj=dQidVidTj+dQjdVidTj;
% %% deltaQ/deltaV_deltaThyta
% dQdVidTi=dQdTidVi;% @
% dQdVidTj=dQdVidTj-diag(diag(dQdVidTj));
% hhd=dQdVidTi+dQdVidTj;
% %% AQi
% AQi=zeros(2*Busnum,2*Busnum);
% dQdTidTj=dQdTidTj-diag(diag(dQdTidTj));
% dQdTidVj=dQdTidVj-diag(diag(dQdTidVj));
% dQdVidTj=dQdVidTj-diag(diag(dQdVidTj));
% dQdVidVj=dQdVidVj-diag(diag(dQdVidVj));
%
% AQi(1:2:2*Busnum,1:2:2*Busnum)=dQdTidTj;%% TT
% AQi(1:2:2*Busnum,2:2:2*Busnum)=dQdTidVj;%% TV
% AQi(2:2:2*Busnum,1:2:2*Busnum)=dQdVidTj;%% VT
% AQi(2:2:2*Busnum,2:2:2*Busnum)=dQdVidVj;%% VV
%
% AQi(1:2:2*Busnum,1:2:2*Busnum)=AQi(1:2:2*Busnum,1:2:2*Busnum)+dQdTidTi;%%
% AQi(1:2:2*Busnum,2:2:2*Busnum)=AQi(1:2:2*Busnum,2:2:2*Busnum)+dQdTidVi;%%
% AQi(2:2:2*Busnum,1:2:2*Busnum)=AQi(2:2:2*Busnum,1:2:2*Busnum)+dQdVidTi;%%
% AQi(2:2:2*Busnum,2:2:2*Busnum)=AQi(2:2:2*Busnum,2:2:2*Busnum)+dQdVidVi;%%
% %% ddh
% t=[zeros(size(PGi,1)+size(PVi,1),ContrlCount);
% zeros(2*Busnum,size(PVi,1)+size(PGi,1)),AQi+APi;
% ];
% ddh=t;
%%
AngleIJ=AngleIJMat-angle(GB);
%yP=Init_Y(1:2:size(Init_Y,2));
yP=Init_Y(1:size(Init_Y,2)/2);% 20111227
%yQ=Init_Y(2:2:size(Init_Y,2));
yQ=Init_Y(size(Init_Y,2)/2+1:size(Init_Y,2));% 20111227
t1=-diag(Y.*cos(AngleIJ')*diag(Volt)*yP');
t2=diag(diag(Volt)*yP')*Y.*cos(AngleIJ);
t3=(t1+t2)*diag(Volt);
t4=-(diag(Y.*cos(AngleIJ)*Volt') -diag(Volt)*Y.*cos(AngleIJ') )*diag(diag(Volt)*yP');
ddPdTdT=t3+t4;%ok1
% tttt=t2*diag(Volt);%ok1
% ttttt=diag(Volt)*Y.*cos(AngleIJ')*diag(diag(Volt)*yP');%ok1
% tttttt=tttt+ttttt;%ok1
% ttttttt=-diag(Y.*cos(AngleIJ)*Volt')*diag(diag(Volt)*yP')+tttt;%ok1
% tttttttt=diag(Volt)*Y.*cos(AngleIJ')*diag(diag(Volt)*yP')+t1*diag(Volt);%ok1
t1=(-diag(Y.*sin(AngleIJ)*Volt')+diag(Volt)*Y.*sin(AngleIJ') )*diag(yP);
t2= -diag( diag(Volt)*yP' )*Y.*sin(AngleIJ)+diag(Y.*sin(AngleIJ')*diag(Volt)*yP');
ddPdVdT=t1+t2;%ok1
%tttt=-diag( diag(Volt)*yP' )*Y.*sin(AngleIJ);
t1=diag( Y.*sin(AngleIJ')*diag(Volt)*yP');
t2=diag(yP)*Y.*sin(AngleIJ)*diag(Volt);
t3=-diag(yP)*diag(Y.*sin(AngleIJ)*Volt');
t4=-Y.*sin(AngleIJ')*diag( diag(Volt)*yP' );
ddPdTdV=t1+t2+t3+t4;%
% tttt=t2;
% ttttt=t4;
t1=Y.*cos(AngleIJ')*diag(yP);
t2=diag(yP)*Y.*cos(AngleIJ);
ddPdVdV=t1+t2;
t1=-diag(Y.*sin(AngleIJ)*Volt');
t2=diag(Volt)*Y.*sin(AngleIJ');
t3=(t1+t2)*diag( diag(Volt)*yQ' );
t4=-diag( diag(Volt)*yQ' )*Y.*sin(AngleIJ);
t5=diag(Y.*sin(AngleIJ')*diag(Volt)*yQ');
t6=-(t4+t5)*diag(Volt);
ddQdTdT=t3+t6;%ok1
% tttt=-(t4)*diag(Volt);
% ttttt=t2*diag( diag(Volt)*yQ' );
% tttttt=t1*diag( diag(Volt)*yQ' )+tttt;
% ttttttt=-t5*diag(Volt)+t2*diag( diag(Volt)*yQ' );
t1=(diag(Y.*cos(AngleIJ)*Volt')-diag(Volt)*Y.*cos(AngleIJ') )*diag(yQ);
t2=+diag( diag(Volt)*yQ' )*Y.*cos(AngleIJ)-diag(Y.*cos(AngleIJ')*diag(Volt)*yQ');
% tttt=diag( diag(Volt)*yQ' )*Y.*cos(AngleIJ);
% ttttt=-diag(Volt)*Y.*cos(AngleIJ') *diag(yQ);
ddQdVdT=t1+t2;
t1=Y.*cos(AngleIJ')*diag(diag(Volt)*yQ');
t2=diag(yQ)*diag(Y.*cos(AngleIJ)*Volt');
t3=-diag(Y.*cos(AngleIJ')*diag(Volt)*yQ');
t4=-diag(yQ)*Y.*cos(AngleIJ)*diag(Volt);
ddQdTdV=t1+t2+t3+t4;
t1=Y.*sin(AngleIJ')*diag(yQ);
t2=diag(yQ)*Y.*sin(AngleIJ);
ddQdVdV=t1+t2;
%%%%
%t=zeros(2*Busnum);
% t(1:2:2*Busnum,1:2:2*Busnum)=ddPdTdT+ddQdTdT;
% %t(1:2:2*Busnum,2:2:2*Busnum)=ddPdTdV+ddQdTdV;
% %t(2:2:2*Busnum,1:2:2*Busnum)=ddPdVdT+ddQdVdT;
% t(1:2:2*Busnum,2:2:2*Busnum)=ddPdVdT+ddQdVdT;
% t(2:2:2*Busnum,1:2:2*Busnum)=ddPdTdV+ddQdTdV;
% t(2:2:2*Busnum,2:2:2*Busnum)=ddPdVdV+ddQdVdV; 20111227
% t=[ddPdVdV+ddQdVdV,ddPdVdT+ddQdVdT;
% ddPdTdV+ddQdTdV,ddPdTdT+ddQdTdT;
% ];20111227
t=[ddPdVdV+ddQdVdV,ddPdTdV+ddQdTdV ;
ddPdVdT+ddQdVdT,ddPdTdT+ddQdTdT;
];
t=[zeros(size(PGi,1)+size(PVi,1),ContrlCount);
zeros(2*Busnum,size(PVi,1)+size(PGi,1)),-t;
];
ddh=t;
end

14
func_deltF.asv Normal file
View File

@ -0,0 +1,14 @@
function deltF=func_deltF(PG,GB,Balance,PVi,AngleIJMat,GenC)
t1=PG(PVi);
t2=Volt'*Volt;
t3=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
t4=t2.*t3;
t5=sum(t4,2);
PBal=t5(Balance);
PPG=([PG',PBal])';
%%
c2=GenC(:,1);
c1=GenC(:,2);
t1=PPG.*c2+c1;
end

18
func_deltF.m Normal file
View File

@ -0,0 +1,18 @@
function deltF=func_deltF(PG,PVi,GenC,ContrlCount,PGi)
%t1=PG(setdiff(PVi,Balance));
% t2=Volt'*Volt;
% t3=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
% t4=t2.*t3;
% t5=sum(t4,2);
% PBal=t5(Balance);
% PPG=([PQ(1),PBal])';%
%%
c2=GenC(:,2);
c1=GenC(:,3);
t1=2*PG(PGi).*c2+c1;
deltF=[
t1;
zeros(ContrlCount-size(PGi,1),1);
];
end

78
func_deltG.asv Normal file
View File

@ -0,0 +1,78 @@
function deltG=func_deltG(Busnum,PVi,GB,Volt,UAngel,indexi,indexj,PGi)
dg1_dPg=eye(size(PGi,1));
dg2_dPg=zeros(size(PGi,1));
dg3_dPg=zeros(size(PGi,1),Busnum);
dg4_dPg=zeros(size(PGi,1),Busnum);
%%
dg1_dQr=zeros(size(PVi,1));
dg2_dQr=eye(size(PVi,1));
dg3_dQr=zeros(size(PVi,1),Busnum);
dg4_dQr=zeros(size(PVi,1),Busnum);
%%
dg1_dx=zeros(2*Busnum,2);
dg2_dx=zeros(2*Busnum,2);
dg3_dx=zeros(2*Busnum,Busnum);
for I=1:Busnum
dg3_dx(2*I,I)=1;
end
dg4_dx=zeros(2*Busnum,Busnum);
indexi=indexi';
indexj=indexj';
%% Ïß·
t1=Volt(indexi).*Volt(indexj);
t2=real(...
GB( ...
sub2ind(size(GB),indexi,indexj) ...
...
)...
).*...
sin(...
UAngel(indexi)'-UAngel(indexj)'...
);
t3=imag(...
GB( sub2ind(size(GB),indexi,indexj) )...
).*...
cos(...
UAngel(indexi)'-UAngel(indexj)'...
);
dPij_dThytai=t1.*(t2-t3)';
%%
t1=-Volt(indexj);
t2=real(...
GB( ...
sub2ind(size(GB),indexi,indexj) ...
...
)...
).*...
cos(...
UAngel(indexi)'-UAngel(indexj)' ...
);
t3=imag(...
GB( sub2ind(size(GB),indexi,indexj) )...
).*...
sin(...
UAngel(indexi)'-UAngel(indexj)'...
);
t4=2*Volt(indexi).*real(...
GB( sub2ind(size(GB),indexi,indexj) )...
)';
dPij_dVi=t4+t1.*(t2+t3)';
dPij_dVj=-Volt(indexi).*(t2+t3)';
%% ¿ªÊ¼ÐγÉdg4_dx
for I=1:size(indexi,1)
dg4_dx(2*indexi(I)-1,I)=dPij_dThytai(I);
dg4_dx(2*indexj(I)-1,I)=-dPij_dThytai(I);
dg4_dx(2*indexi(I),I)=dPij_dVi(I);
dg4_dx(2*indexj(I),I)=dPij_dVj(I);
end
%%
deltG=[dg1_dPg,dg2_dPg,dg3_dPg,dg4_dPg;
dg1_dQr,dg2_dQr,dg3_dQr,dg4_dQr;
dg1_dx,dg2_dx,dg3_dx,dg4_dx;
];

21
func_deltG.m Normal file
View File

@ -0,0 +1,21 @@
function deltG=func_deltG(Busnum,PVi,PGi)
dg1_dPg=eye(size(PGi,1));
dg2_dPg=zeros(size(PGi,1),size(PVi,1));
dg3_dPg=zeros(size(PGi,1),Busnum);
%%
dg1_dQr=zeros(size(PVi,1),size(PGi,1));
dg2_dQr=eye(size(PVi,1));
dg3_dQr=zeros(size(PVi,1),Busnum);
%%
dg1_dx=zeros(2*Busnum,size(PGi,1));
dg2_dx=zeros(2*Busnum,size(PVi,1));
dg3_dx=zeros(2*Busnum,Busnum);
for I=1:Busnum
%dg3_dx(2*I,I)=1;ÔÝĘą¸ÄŇťĎÂ
dg3_dx(I,I)=1;
end
%%
deltG=[dg1_dPg,dg2_dPg,dg3_dPg;
dg1_dQr,dg2_dQr,dg3_dQr;
dg1_dx,dg2_dx,dg3_dx;
];

20
func_deltH.asv Normal file
View File

@ -0,0 +1,20 @@
function deltH=func_deltH(Busnum,Volt,PVi,AngleIJMat,Y,GB,PGi)
dH_dPg=zeros(size(PGi,1)+size(PVi,1),2*Busnum);
for I=1:size(PGi,1)
%dH_dPg(I,2*PVi(I)-1)=-1;王锡凡书上的公式
%dH_dPg(I,2*PGi(I)-1)=1;暂时改一下20111227
dH_dPg(I,PGi(I))=1;
end
dH_dQr=zeros(size(PVi,1)+size(PGi,1),2*Busnum);
for I=1:size(PVi,1)
%dH_dQr(I,2*PVi(I))=-1;王锡凡书上的公式
%dH_dQr(I,2*PVi(I))=1;暂时改一下20111227
dH_dQr(I,PVi(I))=1;
end
Angle=angle(GB);
dH_dx = jacobian_M3(Busnum,Volt,Y,Angle,AngleIJMat); %形成雅克比矩阵
%deltH=[dH_dPg;dH_dQr;dH_dx'];%dH_dx 需要使用一下转置 暂时改一下
deltH=[dH_dPg;dH_dQr;dH_dx'];
end

20
func_deltH.m Normal file
View File

@ -0,0 +1,20 @@
function deltH=func_deltH(Busnum,Volt,PVi,AngleIJMat,Y,GB,PGi)
dH_dPg=zeros(size(PGi,1),2*Busnum);
for I=1:size(PGi,1)
%dH_dPg(I,2*PVi(I)-1)=-1;
%dH_dPg(I,2*PGi(I)-1)=1;20111227
dH_dPg(I,PGi(I))=1;
end
dH_dQr=zeros(size(PVi,1),2*Busnum);
for I=1:size(PVi,1)
%dH_dQr(I,2*PVi(I))=-1;
%dH_dQr(I,2*PVi(I))=1;20111227
dH_dQr(I,PVi(I)+Busnum)=1;
end
Angle=angle(GB);
dH_dx = jacobian_M3(Busnum,Volt,Y,Angle,AngleIJMat); %
%deltH=[dH_dPg;dH_dQr;dH_dx'];%dH_dx 使
deltH=[dH_dPg;dH_dQr;dH_dx'];
end

16
func_deltdeltF.asv Normal file
View File

@ -0,0 +1,16 @@
function deltdeltF=func_deltdeltF(Busnum,GenC,PVi,PGi)
%t1=deltG*[L_1Z-U_1W]*deltG';
%TotalDim=2*Busnum+2*size(PVi,1);
% deltdeltF=[diag(GenC(:,2))*2,zeros(size(GenC,1),TotalDim-size(GenC,1));
% zeros(TotalDim-size(GenC,1),TotalDim)
% ];
% deltdeltF=[diag(GenC(:,2))*2,zeros(2,12);
% zeros(12,14);
% ];
ContrlCount=size(PVi,1)+size(PGi,1)+Busnum*2; %P,Q,Volt thetaÕâЩ¿ØÖƱäÁ¿Êý
t=zeros(size(PGi,1));
t(PGi,PGi)=GenC(:,2);
deltdeltF=[t*2,zeros());
zeros(ContrlCount-size(GenC,1),ContrlCount);
];
end

8
func_deltdeltF.m Normal file
View File

@ -0,0 +1,8 @@
function deltdeltF=func_deltdeltF(Busnum,GenC,PVi,PGi)
ContrlCount=size(PVi,1)+size(PGi,1)+Busnum*2; %P,Q,Volt theta
deltdeltF=[diag(GenC(:,2))*2,zeros(size(GenC,1),ContrlCount-size(GenC,1));
zeros(ContrlCount-size(GenC,1),ContrlCount);
];
end

13
imbalance.m Normal file
View File

@ -0,0 +1,13 @@
function [P0,Q0,U,Uangle]=imbalance(PG,PD,PQstandard,Pointpoweri,QG,QD,Busnum)
%**************************************************************************
% :
%
% 2010.12
%**************************************************************************
%%
P0=(PG-PD)/PQstandard; %
Q0=(QG-QD)/PQstandard; %
%%
U=ones(1,Busnum); %
Uangle=zeros(1,Busnum); %
end

38
jacobian.m Normal file
View File

@ -0,0 +1,38 @@
function [Jacob,PQ,U,Uangle]=jacobian(Busnum,Balance,PVi,PVu,U,Uangle,Y,Angle,P0,Q0,r,c)
%**************************************************************************
% : Jacobian
%
% 2010.12
%**************************************************************************
%% H,L,N,JP,Q
AngleIJ = Uangle(r) - Uangle(c)- Angle';
U(PVi) = PVu;
temp1= -sparse(1:Busnum,1:Busnum,U,Busnum,Busnum)*Y*sparse(1:Busnum,1:Busnum,U,Busnum,Busnum); %
temp2 = sum(temp1.*sparse(r,c,sin(AngleIJ)),2);
temp3 = sum(temp1.*sparse(r,c,cos(AngleIJ)),2);
temp4=sparse(1:Busnum,1:Busnum,temp2,Busnum,Busnum);
temp5=sparse(1:Busnum,1:Busnum,temp3,Busnum,Busnum);
H = temp1.*sparse(r,c,sin(AngleIJ))-temp4;
L = temp1.*sparse(r,c,sin(AngleIJ))+temp4;
N = temp1.*sparse(r,c,cos(AngleIJ))+temp5;
J = -temp1.*sparse(r,c,cos(AngleIJ))+temp5;
Q = Q0+temp2'; %P
P = P0+temp3'; %Q
%% pv
H(:,Balance) = 0;
H(Balance,:) = 0;
H(Balance,Balance) = 100; %
L(:,PVi) = 0;
L(PVi,:) = 0;
L = L+sparse(PVi,PVi,ones(1,length(PVi)),Busnum,Busnum); % PV1
J(:,Balance) = 0;
J(PVi,:) = 0;
N(:,PVi) = 0;
N(Balance,:) = 0;
Q(PVi) = 0; % pv
P(Balance) = 0; %
%% PQ
PQ = cat(2,P,Q); %
Jacob = cat(1,cat(2,H,N),cat(2,J,L)); % Jacobian
end

60
jacobian_M.asv Normal file
View File

@ -0,0 +1,60 @@
function Jacob=jacobian_M(Busnum,Volt,Y,Angle,AngleIJMat)
%**************************************************************************
% 程序功能 : 子函数——形成雅可比矩阵Jacobian
% 编 者:
% 编制时间2010.12
%**************************************************************************
%% 分别求雅克比矩阵的子阵H,L,N,J及有功无功分量P,Q
temp1=-Volt'*Volt.*Y;
AngleIJ=AngleIJMat-Angle;
temp11=Volt'*ones(1,Busnum).*Y;
temp2=sum(temp1.*sin(AngleIJ),2);
temp22 = sum(temp11.*sin(AngleIJ),2);
temp3 = sum(temp1.*cos(AngleIJ),2);
temp33 = sum(temp11.*cos(AngleIJ),2);
temp4=diag(temp2);
temp44=diag(temp22);
temp5=diag(temp3);
temp55=diag(temp33);
%计算Lii的累加项
t1=ones(Busnum,1)*Volt.*Y;
t2=sum(t1.*sin(AngleIJ),2);
t3=sum(t1.*cos(AngleIJ),2);
t4=diag(t2);
H = temp1.*sin(AngleIJ)-temp4;%
L = -temp11.*sin(AngleIJ);%
%L(1:Busnum,1:Busnum)=-temp44+;
L=L-t3.*
N=-temp11.*cos(AngleIJ);%
N(1:Busnum,1:Busnum)=-temp55-diag(diag(temp11.*cos(Angle) ) );
J = -temp1.*cos(AngleIJ)+temp5;%
%%
%Q = Q0+temp2'; %求有功分量P
%P = P0+temp3'; %求无功分量Q
%% 处理平衡节点和pv节点
% H(:,Balance) = 0;
% H(Balance,:) = 0;
% H(Balance,Balance) = 100; % 平衡节点对应的对角元素置一个有限数
% L(:,PVi) = 0;
% L(PVi,:) = 0;
% L = L+sparse(PVi,PVi,ones(1,length(PVi)),Busnum,Busnum); % PV节点对应的对角元素置为1
% J(:,Balance) = 0;
% J(PVi,:) = 0;
% N(:,PVi) = 0;
% N(Balance,:) = 0;
% Q(PVi) = 0; % 将pv节点的无功不平衡分量置零
% P(Balance) = 0; % 平衡节点的有功功率不平衡分量置零
%% 合成PQ和雅可比矩阵
t1=zeros(2*Busnum);
t1(1:2:2*Busnum,1:2:2*Busnum)=H;
t1(1:2:2*Busnum,2:2:2*Busnum)=N;
t1(2:2:2*Busnum,1:2:2*Busnum)=J;
t1(2:2:2*Busnum,2:2:2*Busnum)=L;
% t1(1:)
% PQ = cat(2,P,Q); % 形成功率不平衡分量列向量
%Jacob = cat(1,cat(2,H,N),cat(2,J,L)); % 形成Jacobian矩阵
Jacob=t1;
end

61
jacobian_M.m Normal file
View File

@ -0,0 +1,61 @@
function Jacob=jacobian_M(Busnum,Volt,Y,Angle,AngleIJMat)
%**************************************************************************
% : Jacobian
%
% 2010.12
%**************************************************************************
%% H,L,N,JP,Q
temp1=-Volt'*Volt.*Y;
AngleIJ=AngleIJMat-Angle;
temp11=Volt'*ones(1,Busnum).*Y;
temp2=sum(temp1.*sin(AngleIJ),2);
temp22 = sum(temp11.*sin(AngleIJ),2);
temp3 = sum(temp1.*cos(AngleIJ),2);
temp33 = sum(temp11.*cos(AngleIJ),2);
temp4=diag(temp2);
temp44=diag(temp22);
temp5=diag(temp3);
temp55=diag(temp33);
%Lii
t1=ones(Busnum,1)*Volt.*Y;
t2=sum(t1.*sin(AngleIJ),2);
t3=sum(t1.*cos(AngleIJ),2);
t4=diag(t2);
t5=diag(t3);
H = temp1.*sin(AngleIJ)-temp4;%
L = -temp11.*sin(AngleIJ);%
%L(1:Busnum,1:Busnum)=-temp44+;
L=L-t4;
N=-temp11.*cos(AngleIJ);%
%N(1:Busnum,1:Busnum)=-temp55-diag(diag(temp11.*cos(Angle) ) );
N=N-t5;
J = -temp1.*cos(AngleIJ)+temp5;%
%%
%Q = Q0+temp2'; %P
%P = P0+temp3'; %Q
%% pv
% H(:,Balance) = 0;
% H(Balance,:) = 0;
% H(Balance,Balance) = 100; %
% L(:,PVi) = 0;
% L(PVi,:) = 0;
% L = L+sparse(PVi,PVi,ones(1,length(PVi)),Busnum,Busnum); % PV1
% J(:,Balance) = 0;
% J(PVi,:) = 0;
% N(:,PVi) = 0;
% N(Balance,:) = 0;
% Q(PVi) = 0; % pv
% P(Balance) = 0; %
%% PQ
t1=zeros(2*Busnum);
t1(1:2:2*Busnum,1:2:2*Busnum)=H;
t1(1:2:2*Busnum,2:2:2*Busnum)=N;
t1(2:2:2*Busnum,1:2:2*Busnum)=J;
t1(2:2:2*Busnum,2:2:2*Busnum)=L;
% t1(1:)
% PQ = cat(2,P,Q); %
%Jacob = cat(1,cat(2,H,N),cat(2,J,L)); % Jacobian
Jacob=t1;
end

84
jacobian_M1.m Normal file
View File

@ -0,0 +1,84 @@
function [Jacob]=jacobian_M1(Busnum,Volt,Y,Angle,AngleIJMat)
%**************************************************************************
% : Jacobian
%
% 2010.12
%**************************************************************************
%% H,L,N,JP,Q
%Volt(PVi) = PVu;
temp1=Volt'*Volt.*Y;
AngleIJ=AngleIJMat-Angle;
temp2=sum(temp1.*sin(AngleIJ),2);
temp3 = sum(temp1.*cos(AngleIJ),2);
temp4=diag(temp2);
temp5=diag(temp3);
%t1=Volt'*ones(1,Busnum).*Y;
t1=ones(Busnum,1)*Volt.*Y;
%t1=Volt'*Volt.*Y;
t2=sum(t1.*sin(AngleIJ),2);
t3=sum(t1.*cos(AngleIJ),2);
t4=diag(t2);
t5=diag(t3);
H = -temp1.*sin(AngleIJ)+temp4;%
L = -t1.*sin(AngleIJ);%
%L(1:Busnum,1:Busnum)=-temp44+;
L=L-t4;
N=-t1.*cos(AngleIJ);%
%N(1:Busnum,1:Busnum)=-temp55-diag(diag(temp11.*cos(Angle) ) );
N=N-t5;
J = temp1.*cos(AngleIJ)-temp5;%
%%%%
%t=diag(Volt);
%N=t*N;%*t;
%L=t*L;%*t;
%%%%
%%
%Q
%
%% PQ
% t1(1:)
%
%Jacob = cat(1,cat(2,H,N),cat(2,J,L)); % Jacobian
t1=zeros(2*Busnum);
t1(1:2:2*Busnum,1:2:2*Busnum)=H;
t1(1:2:2*Busnum,2:2:2*Busnum)=N;
t1(2:2:2*Busnum,1:2:2*Busnum)=J;
t1(2:2:2*Busnum,2:2:2*Busnum)=L;
Jacob=t1;
end
% function Jacob=jacobian_M1(Busnum,PVi,PVu,U,Uangle,Y,Angle,r,c)
% AngleIJ = Uangle(r) - Uangle(c)- Angle';
% U(PVi) = PVu;
% temp1= -sparse(1:Busnum,1:Busnum,U,Busnum,Busnum)*Y*sparse(1:Busnum,1:Busnum,U,Busnum,Busnum); %
% temp2 = sum(temp1.*sparse(r,c,sin(AngleIJ)),2);
% temp3 = sum(temp1.*sparse(r,c,cos(AngleIJ)),2);
% temp4=sparse(1:Busnum,1:Busnum,temp2,Busnum,Busnum);
% temp5=sparse(1:Busnum,1:Busnum,temp3,Busnum,Busnum);
% H = temp1.*sparse(r,c,sin(AngleIJ))-temp4;
% L = temp1.*sparse(r,c,sin(AngleIJ))+temp4;
% N = temp1.*sparse(r,c,cos(AngleIJ))+temp5;
% J = -temp1.*sparse(r,c,cos(AngleIJ))+temp5;
%
%
% t1=zeros(2*Busnum);
% t1(1:2:2*Busnum,1:2:2*Busnum)=H;
% t1(1:2:2*Busnum,2:2:2*Busnum)=N;
% t1(2:2:2*Busnum,1:2:2*Busnum)=J;
% t1(2:2:2*Busnum,2:2:2*Busnum)=L;
% % t1(1:)
% % PQ = cat(2,P,Q); %
% %Jacob = cat(1,cat(2,H,N),cat(2,J,L)); % Jacobian
% Jacob=t1;
%
% end

84
jacobian_M2.m Normal file
View File

@ -0,0 +1,84 @@
function [Jacob]=jacobian_M2(Busnum,Volt,Y,Angle,AngleIJMat)
%**************************************************************************
% : Jacobian
%
% 2010.12
%**************************************************************************
%% H,L,N,JP,Q
temp1=Volt'*Volt.*Y;
AngleIJ=AngleIJMat-Angle;
temp2=sum(temp1.*sin(AngleIJ),2);
temp3 = sum(temp1.*cos(AngleIJ),2);
temp4=diag(temp2);
temp5=diag(temp3);
%t1=Volt'*ones(1,Busnum).*Y;
t1=ones(Busnum,1)*Volt.*Y;
t11=Volt'*ones(1,Busnum).*Y;
%t1=Volt'*Volt.*Y;
t2=sum(t1.*sin(AngleIJ),2);
t3=sum(t1.*cos(AngleIJ),2);
t4=diag(t2);
t5=diag(t3);
H = -temp1.*sin(AngleIJ)+temp4;%
L = -t11.*sin(AngleIJ);%
%L(1:Busnum,1:Busnum)=-temp44+;
L=L-t4;
N=-t11.*cos(AngleIJ);%
%N(1:Busnum,1:Busnum)=-temp55-diag(diag(temp11.*cos(Angle) ) );
N=N-t5;
J = temp1.*cos(AngleIJ)-temp5;%
%%%%
%t=diag(Volt);
%N=t*N;%*t;
%L=t*L;%*t;
%%%%
%%
%Q
%
%% PQ
% t1(1:)
%
%Jacob = cat(1,cat(2,H,N),cat(2,J,L)); % Jacobian
t1=zeros(2*Busnum);
t1(1:2:2*Busnum,1:2:2*Busnum)=H;
t1(1:2:2*Busnum,2:2:2*Busnum)=N;
t1(2:2:2*Busnum,1:2:2*Busnum)=J;
t1(2:2:2*Busnum,2:2:2*Busnum)=L;
Jacob=t1;
end
% function Jacob=jacobian_M1(Busnum,PVi,PVu,U,Uangle,Y,Angle,r,c)
% AngleIJ = Uangle(r) - Uangle(c)- Angle';
% U(PVi) = PVu;
% temp1= -sparse(1:Busnum,1:Busnum,U,Busnum,Busnum)*Y*sparse(1:Busnum,1:Busnum,U,Busnum,Busnum); %
% temp2 = sum(temp1.*sparse(r,c,sin(AngleIJ)),2);
% temp3 = sum(temp1.*sparse(r,c,cos(AngleIJ)),2);
% temp4=sparse(1:Busnum,1:Busnum,temp2,Busnum,Busnum);
% temp5=sparse(1:Busnum,1:Busnum,temp3,Busnum,Busnum);
% H = temp1.*sparse(r,c,sin(AngleIJ))-temp4;
% L = temp1.*sparse(r,c,sin(AngleIJ))+temp4;
% N = temp1.*sparse(r,c,cos(AngleIJ))+temp5;
% J = -temp1.*sparse(r,c,cos(AngleIJ))+temp5;
%
%
% t1=zeros(2*Busnum);
% t1(1:2:2*Busnum,1:2:2*Busnum)=H;
% t1(1:2:2*Busnum,2:2:2*Busnum)=N;
% t1(2:2:2*Busnum,1:2:2*Busnum)=J;
% t1(2:2:2*Busnum,2:2:2*Busnum)=L;
% % t1(1:)
% % PQ = cat(2,P,Q); %
% %Jacob = cat(1,cat(2,H,N),cat(2,J,L)); % Jacobian
% Jacob=t1;
%
% end

115
jacobian_M3.asv Normal file
View File

@ -0,0 +1,115 @@
function [Jacob]=jacobian_M3(Busnum,Volt,Y,Angle,AngleIJMat)
%**************************************************************************
% 程序功能 : 子函数——形成雅可比矩阵Jacobian
% 编 者:
% 编制时间2010.12
%**************************************************************************
%%参照图书馆6楼的书编写
%% 分别求雅克比矩阵的子阵H,L,N,J及有功无功分量P,Q
AngleIJ=AngleIJMat-Angle;
t1=Volt'*Volt;
H=t1.*Y.*sin(AngleIJ);
N=-t1.*Y.*cos(AngleIJ);
%J=Volt'*ones(1,Busnum).*cos(AngleIJ);这里错了
J=Volt'*ones(1,Busnum).*cos(AngleIJ).*Y;
%L=Volt'*ones(1,Busnum).*sin(AngleIJ);这里错了
L=Volt'*ones(1,Busnum).*sin(AngleIJ).*Y;
%%对角
t1=Volt'*Volt;
t2=t1.*Y.*sin(AngleIJ);
t3=diag(t2);
t4=t2-diag(t3);
t5=sum(t4,2);
HH=-diag(t5);
t2=t1.*Y.*cos(AngleIJ);
t3=diag(t2);
t4=t2-diag(t3);
t5=sum(t4,2);
NN=diag(t5);
%t1=ones(Busnum,1)*Volt;
t1=ones(Busnum,1)*Volt.*Y;
t2=t1.*cos(AngleIJ);
t3=sum(t2,2);
JJ=diag(t3);
t1=Volt'*ones(1,Busnum).*cos(AngleIJ).*Y;
%t1=Volt'*ones(1,Busnum).*cos(AngleIJ);
t2=diag(t1);%
JJ=JJ+diag(t2);
t1=ones(Busnum,1)*Volt.*Y;
%t1=ones(Busnum,1)*Volt;
t2=t1.*sin(AngleIJ);
t3=sum(t2,2);
LL=diag(t3);
%t1=Volt'*ones(1,Busnum).*sin(AngleIJ);
t1=Volt'*ones(1,Busnum).*sin(AngleIJ).*Y;
t2=diag(t1);%
%LL=LL-diag(t2);这里错了
LL=LL+diag(t2);
H=H-diag(diag(H));
N=N-diag(diag(N));
J=J-diag(diag(J));
L=L-diag(diag(L));
H=H+HH;
J=J+JJ;
N=N+NN;
L=L+LL;
t1=zeros(2*Busnum);
t1(1:2:2*Busnum,1:2:2*Busnum)=H;
t1(1:2:2*Busnum,2:2:2*Busnum)=N;
t1(2:2:2*Busnum,1:2:2*Busnum)=J;
t1(2:2:2*Busnum,2:2:2*Busnum)=L;
Jacob=-t1;
%%以下是学姐给的公式
H=diag(Volt)*Y.*sin(AngleIJ')*diag(Volt)-diag(Y.*sin(AngleIJ)*Volt')*diag(Volt);
N=-diag(Volt)*Y.*cos(AngleIJ')*diag(Volt)+diag(Y.*cos(AngleIJ)*Volt')*diag(Volt);
J=diag(Y.*cos(AngleIJ)*Volt')+Y.*cos(AngleIJ')*diag(Volt);
L=diag(Y.*sin(AngleIJ)*Volt')+Y.*sin(AngleIJ')*diag(Volt);
H=H;
N=N;
J=J;
L=L;
t1=zeros(2*Busnum);
% t1(1:2:2*Busnum,1:2:2*Busnum)=-H;%10111227
% t1(1:2:2*Busnum,2:2:2*Busnum)=N;
% t1(2:2:2*Busnum,1:2:2*Busnum)=-J;%10111227
% t1(2:2:2*Busnum,2:2:2*Busnum)=L;
%暂时改一下
t1=[J,L;
H,N;
]';
Jacob=-t1;
end
% function Jacob=jacobian_M1(Busnum,PVi,PVu,U,Uangle,Y,Angle,r,c)
% AngleIJ = Uangle(r) - Uangle(c)- Angle';
% U(PVi) = PVu;
% temp1= -sparse(1:Busnum,1:Busnum,U,Busnum,Busnum)*Y*sparse(1:Busnum,1:Busnum,U,Busnum,Busnum); % 计算雅克比矩阵可利用的中间变量
% temp2 = sum(temp1.*sparse(r,c,sin(AngleIJ)),2);
% temp3 = sum(temp1.*sparse(r,c,cos(AngleIJ)),2);
% temp4=sparse(1:Busnum,1:Busnum,temp2,Busnum,Busnum);
% temp5=sparse(1:Busnum,1:Busnum,temp3,Busnum,Busnum);
% H = temp1.*sparse(r,c,sin(AngleIJ))-temp4;
% L = temp1.*sparse(r,c,sin(AngleIJ))+temp4;
% N = temp1.*sparse(r,c,cos(AngleIJ))+temp5;
% J = -temp1.*sparse(r,c,cos(AngleIJ))+temp5;
%
%
% t1=zeros(2*Busnum);
% t1(1:2:2*Busnum,1:2:2*Busnum)=H;
% t1(1:2:2*Busnum,2:2:2*Busnum)=N;
% t1(2:2:2*Busnum,1:2:2*Busnum)=J;
% t1(2:2:2*Busnum,2:2:2*Busnum)=L;
% % t1(1:)
% % PQ = cat(2,P,Q); % 形成功率不平衡分量列向量
% %Jacob = cat(1,cat(2,H,N),cat(2,J,L)); % 形成Jacobian矩阵
% Jacob=t1;
%
% end

115
jacobian_M3.m Normal file
View File

@ -0,0 +1,115 @@
function [Jacob]=jacobian_M3(Busnum,Volt,Y,Angle,AngleIJMat)
%**************************************************************************
% : Jacobian
%
% 2010.12
%**************************************************************************
%%6
%% H,L,N,JP,Q
AngleIJ=AngleIJMat-Angle;
% t1=Volt'*Volt;
% H=t1.*Y.*sin(AngleIJ);
% N=-t1.*Y.*cos(AngleIJ);
% %J=Volt'*ones(1,Busnum).*cos(AngleIJ);
% J=Volt'*ones(1,Busnum).*cos(AngleIJ).*Y;
%
% %L=Volt'*ones(1,Busnum).*sin(AngleIJ);
% L=Volt'*ones(1,Busnum).*sin(AngleIJ).*Y;
%
% %%
% t1=Volt'*Volt;
% t2=t1.*Y.*sin(AngleIJ);
% t3=diag(t2);
% t4=t2-diag(t3);
% t5=sum(t4,2);
% HH=-diag(t5);
% t2=t1.*Y.*cos(AngleIJ);
% t3=diag(t2);
% t4=t2-diag(t3);
% t5=sum(t4,2);
% NN=diag(t5);
% %t1=ones(Busnum,1)*Volt;
% t1=ones(Busnum,1)*Volt.*Y;
% t2=t1.*cos(AngleIJ);
% t3=sum(t2,2);
% JJ=diag(t3);
% t1=Volt'*ones(1,Busnum).*cos(AngleIJ).*Y;
% %t1=Volt'*ones(1,Busnum).*cos(AngleIJ);
% t2=diag(t1);%
% JJ=JJ+diag(t2);
% t1=ones(Busnum,1)*Volt.*Y;
% %t1=ones(Busnum,1)*Volt;
% t2=t1.*sin(AngleIJ);
% t3=sum(t2,2);
% LL=diag(t3);
% %t1=Volt'*ones(1,Busnum).*sin(AngleIJ);
% t1=Volt'*ones(1,Busnum).*sin(AngleIJ).*Y;
% t2=diag(t1);%
% %LL=LL-diag(t2);
% LL=LL+diag(t2);
%
% H=H-diag(diag(H));
% N=N-diag(diag(N));
% J=J-diag(diag(J));
% L=L-diag(diag(L));
%
% H=H+HH;
% J=J+JJ;
% N=N+NN;
% L=L+LL;
%
% t1=zeros(2*Busnum);
% t1(1:2:2*Busnum,1:2:2*Busnum)=H;
% t1(1:2:2*Busnum,2:2:2*Busnum)=N;
% t1(2:2:2*Busnum,1:2:2*Busnum)=J;
% t1(2:2:2*Busnum,2:2:2*Busnum)=L;
% Jacob=-t1;
%%
H=diag(Volt)*Y.*sin(AngleIJ')*diag(Volt)-diag(Y.*sin(AngleIJ)*Volt')*diag(Volt);
N=-diag(Volt)*Y.*cos(AngleIJ')*diag(Volt)+diag(Y.*cos(AngleIJ)*Volt')*diag(Volt);
J=diag(Y.*cos(AngleIJ)*Volt')+Y.*cos(AngleIJ')*diag(Volt);
L=diag(Y.*sin(AngleIJ)*Volt')+Y.*sin(AngleIJ')*diag(Volt);
H=H;
N=N;
J=J;
L=L;
t1=zeros(2*Busnum);
% t1(1:2:2*Busnum,1:2:2*Busnum)=-H;%10111227
% t1(1:2:2*Busnum,2:2:2*Busnum)=N;
% t1(2:2:2*Busnum,1:2:2*Busnum)=-J;%10111227
% t1(2:2:2*Busnum,2:2:2*Busnum)=L;
%
t1=[J,L;
H,N;
]';
Jacob=-t1;
end
% function Jacob=jacobian_M1(Busnum,PVi,PVu,U,Uangle,Y,Angle,r,c)
% AngleIJ = Uangle(r) - Uangle(c)- Angle';
% U(PVi) = PVu;
% temp1= -sparse(1:Busnum,1:Busnum,U,Busnum,Busnum)*Y*sparse(1:Busnum,1:Busnum,U,Busnum,Busnum); %
% temp2 = sum(temp1.*sparse(r,c,sin(AngleIJ)),2);
% temp3 = sum(temp1.*sparse(r,c,cos(AngleIJ)),2);
% temp4=sparse(1:Busnum,1:Busnum,temp2,Busnum,Busnum);
% temp5=sparse(1:Busnum,1:Busnum,temp3,Busnum,Busnum);
% H = temp1.*sparse(r,c,sin(AngleIJ))-temp4;
% L = temp1.*sparse(r,c,sin(AngleIJ))+temp4;
% N = temp1.*sparse(r,c,cos(AngleIJ))+temp5;
% J = -temp1.*sparse(r,c,cos(AngleIJ))+temp5;
%
%
% t1=zeros(2*Busnum);
% t1(1:2:2*Busnum,1:2:2*Busnum)=H;
% t1(1:2:2*Busnum,2:2:2*Busnum)=N;
% t1(2:2:2*Busnum,1:2:2*Busnum)=J;
% t1(2:2:2*Busnum,2:2:2*Busnum)=L;
% % t1(1:)
% % PQ = cat(2,P,Q); %
% %Jacob = cat(1,cat(2,H,N),cat(2,J,L)); % Jacobian
% Jacob=t1;
%
% end

77
jacobian_M4.asv Normal file
View File

@ -0,0 +1,77 @@
function [Jacob]=jacobian_M4(Busnum,Volt,Y,Angle,AngleIJMat)
%**************************************************************************
% 程序功能 : 子函数——形成雅可比矩阵Jacobian
% 编 者:
% 编制时间2010.12
%**************************************************************************
%% 分别求雅克比矩阵的子阵H,L,N,J及有功无功分量P,Q
temp1=Volt'*Volt.*Y;
AngleIJ=AngleIJMat-Angle;
tt1=temp1.*sin(AngleIJ);
tt2=temp1.*cos(AngleIJ);
tt3=diag(tt1);
tt4=diag(tt2);
tt5=tt1-diag(tt3);
tt6=tt2-diag(tt4);
temp2=sum(tt5,2);
temp3 = sum(tt6,2);
HH=temp2;
JJ=temp3;
t1=ones(Busnum,1)*Volt.*Y;
t11=Volt'*ones(1,Busnum).*Y;
t2=sum(t1.*sin(AngleIJ),2);
t3=sum(t1.*cos(AngleIJ),2);
t4=diag(t1.*sin(AngleIJ));
t5=diag(t1.*cos(AngleIJ));
NN=-diag(t3)-diag(t5);
LL=-diag(t2)+diag(t4);
H = -temp1.*sin(AngleIJ);
L = -t11.*sin(AngleIJ);%
N=-t11.*cos(AngleIJ);%
J = temp1.*cos(AngleIJ);%
H=H-diag(diag(H));
N=N-diag(N));
J=J-diag(J);
L=L-diag(L);
H=H+diag(HH);
N=N+diag(NN);
J=J+diag(JJ);
L=L+diag(LL);
t1=zeros(2*Busnum);
t1(1:2:2*Busnum,1:2:2*Busnum)=H;
t1(1:2:2*Busnum,2:2:2*Busnum)=N;
t1(2:2:2*Busnum,1:2:2*Busnum)=J;
t1(2:2:2*Busnum,2:2:2*Busnum)=L;
Jacob=t1;
end
% function Jacob=jacobian_M1(Busnum,PVi,PVu,U,Uangle,Y,Angle,r,c)
% AngleIJ = Uangle(r) - Uangle(c)- Angle';
% U(PVi) = PVu;
% temp1= -sparse(1:Busnum,1:Busnum,U,Busnum,Busnum)*Y*sparse(1:Busnum,1:Busnum,U,Busnum,Busnum); % 计算雅克比矩阵可利用的中间变量
% temp2 = sum(temp1.*sparse(r,c,sin(AngleIJ)),2);
% temp3 = sum(temp1.*sparse(r,c,cos(AngleIJ)),2);
% temp4=sparse(1:Busnum,1:Busnum,temp2,Busnum,Busnum);
% temp5=sparse(1:Busnum,1:Busnum,temp3,Busnum,Busnum);
% H = temp1.*sparse(r,c,sin(AngleIJ))-temp4;
% L = temp1.*sparse(r,c,sin(AngleIJ))+temp4;
% N = temp1.*sparse(r,c,cos(AngleIJ))+temp5;
% J = -temp1.*sparse(r,c,cos(AngleIJ))+temp5;
%
%
% t1=zeros(2*Busnum);
% t1(1:2:2*Busnum,1:2:2*Busnum)=H;
% t1(1:2:2*Busnum,2:2:2*Busnum)=N;
% t1(2:2:2*Busnum,1:2:2*Busnum)=J;
% t1(2:2:2*Busnum,2:2:2*Busnum)=L;
% % t1(1:)
% % PQ = cat(2,P,Q); % 形成功率不平衡分量列向量
% %Jacob = cat(1,cat(2,H,N),cat(2,J,L)); % 形成Jacobian矩阵
% Jacob=t1;
%
% end

77
jacobian_M4.m Normal file
View File

@ -0,0 +1,77 @@
function [Jacob]=jacobian_M4(Busnum,Volt,Y,Angle,AngleIJMat)
%**************************************************************************
% : Jacobian
%
% 2010.12
%**************************************************************************
%% H,L,N,JP,Q
temp1=Volt'*Volt.*Y;
AngleIJ=AngleIJMat-Angle;
tt1=temp1.*sin(AngleIJ);
tt2=temp1.*cos(AngleIJ);
tt3=diag(tt1);
tt4=diag(tt2);
tt5=tt1-diag(tt3);
tt6=tt2-diag(tt4);
temp2=sum(tt5,2);
temp3 = sum(tt6,2);
HH=temp2;
JJ=-temp3;
t1=ones(Busnum,1)*Volt.*Y;
t11=Volt'*ones(1,Busnum).*Y;
t2=sum(t1.*sin(AngleIJ),2);
t3=sum(t1.*cos(AngleIJ),2);
t4=diag(t1.*sin(AngleIJ));
t5=diag(t1.*cos(AngleIJ));
NN=-diag(t3)-diag(t5);
LL=-diag(t2)+diag(t4);
H = -temp1.*sin(AngleIJ);
L = -t11.*sin(AngleIJ);%
N=-t11.*cos(AngleIJ);%
J = temp1.*cos(AngleIJ);%
H=H-diag(diag(H));
N=N-diag(diag(N));
J=J-diag(diag(J));
L=L-diag(diag(L));
H=H+diag(HH);
N=N+NN;
J=J+diag(JJ);
L=L+LL;
t1=zeros(2*Busnum);
t1(1:2:2*Busnum,1:2:2*Busnum)=H;
t1(1:2:2*Busnum,2:2:2*Busnum)=N;
t1(2:2:2*Busnum,1:2:2*Busnum)=J;
t1(2:2:2*Busnum,2:2:2*Busnum)=L;
Jacob=t1;
end
% function Jacob=jacobian_M1(Busnum,PVi,PVu,U,Uangle,Y,Angle,r,c)
% AngleIJ = Uangle(r) - Uangle(c)- Angle';
% U(PVi) = PVu;
% temp1= -sparse(1:Busnum,1:Busnum,U,Busnum,Busnum)*Y*sparse(1:Busnum,1:Busnum,U,Busnum,Busnum); %
% temp2 = sum(temp1.*sparse(r,c,sin(AngleIJ)),2);
% temp3 = sum(temp1.*sparse(r,c,cos(AngleIJ)),2);
% temp4=sparse(1:Busnum,1:Busnum,temp2,Busnum,Busnum);
% temp5=sparse(1:Busnum,1:Busnum,temp3,Busnum,Busnum);
% H = temp1.*sparse(r,c,sin(AngleIJ))-temp4;
% L = temp1.*sparse(r,c,sin(AngleIJ))+temp4;
% N = temp1.*sparse(r,c,cos(AngleIJ))+temp5;
% J = -temp1.*sparse(r,c,cos(AngleIJ))+temp5;
%
%
% t1=zeros(2*Busnum);
% t1(1:2:2*Busnum,1:2:2*Busnum)=H;
% t1(1:2:2*Busnum,2:2:2*Busnum)=N;
% t1(2:2:2*Busnum,1:2:2*Busnum)=J;
% t1(2:2:2*Busnum,2:2:2*Busnum)=L;
% % t1(1:)
% % PQ = cat(2,P,Q); %
% %Jacob = cat(1,cat(2,H,N),cat(2,J,L)); % Jacobian
% Jacob=t1;
%
% end

18
modifyadmmatrix.asv Normal file
View File

@ -0,0 +1,18 @@
function [new_G,new_B,GB,Y,r,c,Angle] = modifyadmmatrix(ii,jj,G,GG,B,BB)
%**************************************************************************
% 程序功能 : 子函数——形成节点导纳矩阵Y
% 编 者:
% 编制时间2010.12
%**************************************************************************
%% 支路导纳计算
new_G=G;
new_G(ii,jj)=new_G(ii,jj)-G(ii,jj);
new_G(jj,ii)=new_G(jj,ii)-G(jj,ii);
new_G(ii,ii)=new_G(ii,ii)+G(ii,jj);
new_G(jj,jj)=new_G(jj,jj)+G(ii,jj);
%% 化作极坐标形式
GB = G+B.*1i; %将电导,电纳合并,写成复数形式
Y = abs(GB); %求节点导纳幅值
[r,c] = find(Y);
Angle = angle(GB(GB~=0)); %求节点导纳角度

23
modifyadmmatrix.m Normal file
View File

@ -0,0 +1,23 @@
function [new_G,new_B,GB,Y,r,c,Angle] = modifyadmmatrix(ii,jj,G,B)
%**************************************************************************
% : Y
%
% 2010.12
%**************************************************************************
%%
new_G=G;
new_G(ii,jj)=new_G(ii,jj)-G(ii,jj);
new_G(jj,ii)=new_G(jj,ii)-G(jj,ii);
new_G(ii,ii)=new_G(ii,ii)+G(ii,jj);
new_G(jj,jj)=new_G(jj,jj)+G(ii,jj);
new_B=B;
new_B(ii,jj)=new_B(ii,jj)-B(ii,jj);
new_B(jj,ii)=new_B(jj,ii)-B(jj,ii);
new_B(ii,ii)=new_B(ii,ii)+B(ii,jj);
new_B(jj,jj)=new_B(jj,jj)+B(ii,jj);
%%
GB = new_G+new_B.*1i; %
Y = abs(GB); %
[r,c] = find(Y);
Angle = angle(GB(GB~=0)); %

64
openfile.asv Normal file
View File

@ -0,0 +1,64 @@
function [Busnum,Balance,PQstandard,Precision,Linei,Linej,Liner,Linex,Lineb,kmax,Transfori ,...
Transforj,Transforr,Transforx,Transfork0,Branchi,Branchb,Pointpoweri,PG,QG,PD,QD,PVi,PVu,Gen,GenU,GenL,GenC,CenterA,PGi,PVQU,PVQL] = openfile(FileName)
%**************************************************************************
% 程序简介 : 子函数——读取潮流计算所需数据
% 编 者:
% 编制时间 2010.12
%**************************************************************************
data = dlmread(FileName); % 一次读入全部数据
Busnum= data(1,1); % 节点数
PQstandard = data(1,3); % 基准容量
kmax = data(1,4); %最大迭代次数
Precision = data(2,1); % 精度
Balance = data(3,2); % 生成1到节点号的列向量
CenterA=data(1,5); %中心参数
LineNum=data(1,2); %支路数
%% 各参数矩阵分块
zeroRow = find(data(:,1)==0); %查找第一列元素为零的行号
line = data(zeroRow(1)+1:zeroRow(2)-1,:); % 形成线路参数矩阵
ground = data(zeroRow(2)+1:zeroRow(3)-1,:); % 形成对地支路参数矩阵
tran = data(zeroRow(3)+1:zeroRow(4)-1,:); % 形成变压器参数矩阵
buspq = data(zeroRow(4)+1:zeroRow(5)-1,:); % 形成节点功率参数矩阵
PV = data(zeroRow(5)+1:zeroRow(6)-1,:); % 形成pv节点功率参数矩阵
Gen=data(zeroRow(6)+1:zeroRow(7)-1,:);
%% 线路参数矩阵分块
Linei = line(:,2); % 节点i
Linej= line(:,3); % 节点j
Liner = line(:,4); % 线路电阻
Linex = line(:,5); % 线路电抗
Lineb = line(:,6); % b/2
%% 对地支路参数矩阵
Branchi = ground(:,1); % 对地支路节点号
Branchb = ground(:,2); % 对地支路的导纳
%% 变压器参数矩阵
Transfori = tran(:,2); % 节点i
Transforj= tran(:,3); % 节点j
Transforr = tran(:,4); % 变压器电阻
Transforx= tran(:,5); % 变压器电抗
Transfork0 = tran(:,6); % 变压器变比
%% 节点功率参数矩阵
Pointpoweri = buspq(:,1);
PG=buspq(:,2); % 发电机有功
QG=buspq(:,3); % 发电机无功
PD=buspq(:,4); % 负荷有功
QD=buspq(:,5); % 负荷无功
%% pv节点功率参数矩阵
PVi = PV(:,1); % PV节点的节点号
PVu = PV(:,2); % PV节点电压
PVQL=PV(:,3);%PV节点无功下限
PVQU=PV(:,4); %PV节点无功上限
%% 发电机参数
%GenU=Gen(:,[1 5 6]);
%GenL=Gen(:,[1 7 8]);
GenC=Gen(:,[1 2:4]);
t=GenC(:,2);
GenC(:,2)=GenC(:,4);
GenC(:,4)=t;
t=Gen(:,[1 5]);
%GenL=[t,PVQL(PVi)];
GenL=t;%有功下界
t=Gen(:,[1 6]);
%GenU=[t,PVQU(PVi)];
GenU=t;%有功上届
PGi=Gen(:,1);%发电机节点号
end

76
openfile.m Normal file
View File

@ -0,0 +1,76 @@
function [Busnum,Balance,PQstandard,Precision,Linei,Linej,Liner,Linex,Lineb,kmax,Transfori ,...
Transforj,Transforr,Transforx,Transfork0,Branchi,Branchb,Pointpoweri,PG,QG,PD,QD,PVi,PVu,Gen,GenU,GenL,GenC,CenterA,PGi,PVQU,PVQL] = openfile(FileName)
%**************************************************************************
% :
%
% 2010.12
%**************************************************************************
data = dlmread(FileName); %
Busnum= data(1,1); %
PQstandard = data(1,3); %
kmax = data(1,4); %
Precision = data(2,1); %
Balance = data(3,2); % 1
CenterA=data(1,5); %
LineNum=data(1,2); %
Base=data(1,3);
%%
zeroRow = find(data(:,1)==0); %
line = data(zeroRow(1)+1:zeroRow(2)-1,:); % 线
ground = data(zeroRow(2)+1:zeroRow(3)-1,:); %
tran = data(zeroRow(3)+1:zeroRow(4)-1,:); %
buspq = data(zeroRow(4)+1:zeroRow(5)-1,:); %
PV = data(zeroRow(5)+1:zeroRow(6)-1,:); % pv
Gen=data(zeroRow(6)+1:zeroRow(7)-1,:);
%% 线
Linei = line(:,2); % i
Linej= line(:,3); % j
Liner = line(:,4); % 线
Linex = line(:,5); % 线
Lineb = line(:,6); % b/2
%%
Branchi = ground(:,1); %
Branchb = ground(:,2); %
%%
Transfori = tran(:,2); % i
Transforj= tran(:,3); % j
Transforr = tran(:,4); %
Transforx= tran(:,5); %
Transfork0 = tran(:,6); %
%%
Pointpoweri = buspq(:,1);
PG=buspq(:,2); %
QG=buspq(:,3); %
PD=buspq(:,4); %
QD=buspq(:,5); %
%%
PG=PG/Base;
QG=QG/Base;
PD=PD/Base;
QD=QD/Base;
%% pv
PVi = PV(:,1); % PV
PVu = PV(:,2); % PV
PVQL=PV(:,3);%PV
PVQL=PVQL/Base;
PVQU=PV(:,4); %PV
PVQU=PVQU/Base;
%%
%GenU=Gen(:,[1 5 6]);
%GenL=Gen(:,[1 7 8]);
GenC=Gen(:,[1 2:4]);
t=GenC(:,2);
GenC(:,2)=GenC(:,4);
GenC(:,4)=t;
%%%%%%%%%%%%%%%%%%%%
%GenC(:,2:4)=100*GenC(:,2:4);
t=Gen(:,[1 5]);
%GenL=[t,PVQL(PVi)];
GenL=t;%
GenL(:,2)=GenL(:,2)/Base;
t=Gen(:,[1 6]);
%GenU=[t,PVQU(PVi)];
GenU=t;%
GenU(:,2)=GenU(:,2)/Base;
PGi=Gen(:,1);%
end

35
pf.asv Normal file
View File

@ -0,0 +1,35 @@
function [kmax,Precision,Uangle,U,Busnum,PVi,PVu,Balance,Y,Angle,P0,Q0,r,c,GB,Linei,Linej,Transfori,Transforj,GenU,GenL,GenC,PG,QG,PD,QD,CenterA,PGi,PVQU,PVQL]=pf(FileName)
%**************************************************************************
% 程序名称:电力系统潮流计算程序
% 程序算法:极坐标下的牛顿-拉夫逊法
% 程序功能:主函数
% 程序编者:
% 编制时间2010.12
%**************************************************************************
clc;
tic;
%% 读取数据文件
[Busnum,Balance,PQstandard,Precision,Linei,Linej,Liner,Linex,Lineb,kmax,Transfori ,...
Transforj,Transforr,Transforx,Transfork0,Branchi,Branchb,Pointpoweri,PG,QG,PD,QD,PVi,PVu,Gen,GenU,GenL,GenC,CenterA,PGi,PVQU,PVQL]= openfile(FileName);
%% 形成节点导纳矩阵
[G,B,GB,Y,r,c,Angle] = admmatrix(Busnum,Linei,Linej,Liner,Linex,Lineb,Transfori,Transforj,Transforr,...
Transforx,Transfork0,Branchi,Branchb);
[P0,Q0,U,Uangle] = Initial(PG,PD,PQstandard,Pointpoweri,QG,QD,Busnum); %求功率不平衡量
disp('迭代次数i 最大不平衡量');
%% 循环体计算
for i = 0:kmax
[Jacob,PQ,U,Uangle] = jacobian(Busnum,Balance,PVi,PVu,U,Uangle,Y,Angle,P0,Q0,r,c); %形成雅克比矩阵
% disp('第一次雅克比');
%full(Jacob);
m = max(abs(PQ));
m = full(m);
fprintf(' %u %.8f \n',i,m);
if m > Precision %判断不平衡量是否满足精度要求
[Uangle,U] = solvefun(Busnum,Jacob,PQ,Uangle,U); %求解修正方程,更新电压变量
else
disp(['收敛,迭代次数为',num2str(i),'次']);
break %若满足精度要求,则计算收敛
end
end
toc;
end

35
pf.m Normal file
View File

@ -0,0 +1,35 @@
function [kmax,Precision,Uangle,U,Busnum,PVi,PVu,Balance,Y,Angle,P0,Q0,r,c,GB,Linei,Linej,Transfori,Transforj,GenU,GenL,GenC,PG,QG,PD,QD,CenterA,PGi,PVQU,PVQL]=pf(FileName)
%**************************************************************************
%
% -
%
%
% 2010.12
%**************************************************************************
clc;
tic;
%%
[Busnum,Balance,PQstandard,Precision,Linei,Linej,Liner,Linex,Lineb,kmax,Transfori ,...
Transforj,Transforr,Transforx,Transfork0,Branchi,Branchb,Pointpoweri,PG,QG,PD,QD,PVi,PVu,Gen,GenU,GenL,GenC,CenterA,PGi,PVQU,PVQL]= openfile(FileName);
%%
[G,B,GB,Y,r,c,Angle] = admmatrix(Busnum,Linei,Linej,Liner,Linex,Lineb,Transfori,Transforj,Transforr,...
Transforx,Transfork0,Branchi,Branchb);
[P0,Q0,U,Uangle] = Initial(PG,PD,PQstandard,Pointpoweri,QG,QD,Busnum); %
disp('i ');
%%
for i = 0:kmax
[Jacob,PQ,U,Uangle] = jacobian(Busnum,Balance,PVi,PVu,U,Uangle,Y,Angle,P0,Q0,r,c); %
% disp('');
%full(Jacob);
m = max(abs(PQ));
m = full(m);
fprintf(' %u %.8f \n',i,m);
if m > Precision %
[Uangle,U] = solvefun(Busnum,Jacob,PQ,Uangle,U); %
else
disp(['',num2str(i),'']);
break %
end
end
toc;
end

13
solvefun.m Normal file
View File

@ -0,0 +1,13 @@
function[Uangle,U] = solvefun(Busnum,Jacob,PQ,Uangle,U)
%**************************************************************************
% :
%
% 2010.12
%**************************************************************************
%%
PQ = sparse(PQ);
X = (Jacob\-PQ')';
%%
Uangle = Uangle+X(1:Busnum); %
U = U+U.*X(Busnum+1:end); %
end

14
sy.m Normal file
View File

@ -0,0 +1,14 @@
clear
clc
syms T11 T12 T21 T22;
syms V1 V2;
syms Y11 Y12 Y21 Y22;
yP=ones(1,2);
AngleIJ=[T11,T12;T21,T22];
Volt=[V1,V2];
Y=[Y11,Y12;Y21,Y22];
t1=-diag(Y.*cos(AngleIJ')*diag(Volt)*yP');
t2=diag(diag(Volt)*yP')*Y.*cos(AngleIJ);
t3=(t1+t2)*diag(Volt);
t4=-(diag(Y.*cos(AngleIJ)*Volt') -diag(Volt)*Y.*cos(AngleIJ') )*diag(diag(Volt)*yP');
ddPdTdT=t1+t2+t3+t4