0%的情况太好了,修改了不等式的确定情况。用现在这个。
Signed-off-by: dmy@lab <dmy@lab.lab>
This commit is contained in:
parent
98502be311
commit
8306ac80f7
6
FormLw.m
6
FormLw.m
|
|
@ -1,4 +1,4 @@
|
|||
function Lw=FormLw(Mat_G,Init_U,Loadi,mPD3P,mQD3P,mVoltABCV)
|
||||
function Lw=FormLw(Mat_G,Init_U,Loadi,rPD3P,rQD3P,mVoltABCV)
|
||||
% KK=999;
|
||||
% %PU=GenU(:,2);%发电机有功上界
|
||||
%
|
||||
|
|
@ -26,8 +26,8 @@ function Lw=FormLw(Mat_G,Init_U,Loadi,mPD3P,mQD3P,mVoltABCV)
|
|||
% QDU=1.0*PD(Loadi).*sqrt(1 -PF.^2)./PF;
|
||||
% PDU=1.8*ones(length(Loadi),1);
|
||||
% QDU=1.8*ones(length(Loadi),1);
|
||||
PDU=1.20*mPD3P;
|
||||
QDU=1.20*mQD3P;
|
||||
PDU=1.20*rPD3P.*(1+unifrnd(-0.2,0.2,length(rPD3P),1));
|
||||
QDU=1.20*rQD3P.*(1+unifrnd(-0.2,0.2,length(rPD3P),1));
|
||||
% t1=([PDU',QDU',1*ones(length(Volt),1)'])';
|
||||
t1=([PDU',QDU'])';
|
||||
t2=Mat_G+Init_U'-t1;
|
||||
|
|
|
|||
6
FormLz.m
6
FormLz.m
|
|
@ -1,4 +1,4 @@
|
|||
function Lz=FormLz(Mat_G,Init_L,Loadi,mPD3P,mQD3P,mVoltABCV)
|
||||
function Lz=FormLz(Mat_G,Init_L,Loadi,rPD3P,rQD3P,mVoltABCV)
|
||||
% KK=999;
|
||||
%
|
||||
% VoltL=(0.9)*ones(1,Busnum);
|
||||
|
|
@ -23,8 +23,8 @@ function Lz=FormLz(Mat_G,Init_L,Loadi,mPD3P,mQD3P,mVoltABCV)
|
|||
% QDL=0*PD(Loadi).*sqrt((1-PF.^2))./PF;
|
||||
% PDL=0*ones(length(Loadi),1);
|
||||
% QDL=0*ones(length(Loadi),1);
|
||||
PDL=0.8*mPD3P;
|
||||
QDL=0.8*mQD3P;
|
||||
PDL=0.8*rPD3P.*(1+unifrnd(-0.15,0.15,length(rPD3P),1));
|
||||
QDL=0.8*rQD3P.*(1+unifrnd(-0.15,0.15,length(rQD3P),1));
|
||||
% t1=([PDL',QDL',0.88*ones(length(Volt),1)'])';
|
||||
t1=([PDL',QDL'])';
|
||||
t2=Mat_G-Init_L'-t1;
|
||||
|
|
|
|||
6
OPF.m
6
OPF.m
|
|
@ -233,7 +233,7 @@ noPQi3P=zeros(length(noLoadi)*3,1);
|
|||
noPQi3P(1:3:end)=(noLoadi-1)*3+1;
|
||||
noPQi3P(2:3:end)=(noLoadi-1)*3+2;
|
||||
noPQi3P(3:3:end)=(noLoadi-1)*3+3;
|
||||
% noLoadi=noPQi3P;
|
||||
% noPQi3P=Loadi;
|
||||
wVolt(setdiff(1:length(wVolt),Loadi))=0;%只有负荷处才有电压量测。
|
||||
wVolt( noPQi3P)=0;
|
||||
wPD(ismember( Loadi,noPQi3P))=0;
|
||||
|
|
@ -288,8 +288,8 @@ while(abs(Gap)>Precision)
|
|||
Mat_G=FormG(Volt,PD3P,QD3P,Loadi);
|
||||
Mat_H=FormH(Busnum,Volt,PG3P,PD3P,QG3P,QD3P,Y,UAngel,r,c,Yangle,Loadi);
|
||||
Ly=Mat_H;
|
||||
Lz=FormLz(Mat_G,Init_L,Loadi,mPD3P,mQD3P,rVoltABCV);
|
||||
Lw=FormLw(Mat_G,Init_U,Loadi,mPD3P,mQD3P,rVoltABCV);
|
||||
Lz=FormLz(Mat_G,Init_L,Loadi,rPD3P,rQD3P,rVoltABCV);
|
||||
Lw=FormLw(Mat_G,Init_U,Loadi,rPD3P,rQD3P,rVoltABCV);
|
||||
Lx=FormLx(deltF,deltH,Init_Y,deltG,Init_Z,Init_W);
|
||||
% YY=FormYY(Lul,Lz,Ly,Luu,Lw,Lx);
|
||||
%% 开始解方程
|
||||
|
|
|
|||
Loading…
Reference in New Issue