parent
7d4f318b58
commit
27bd5cb77c
19
run.m
19
run.m
|
|
@ -10,7 +10,7 @@ addpath('.\Powerflow')
|
|||
% 电压 相角
|
||||
%%
|
||||
%% 开始生成量测量
|
||||
sigma=0.01;% ±ê×¼²î
|
||||
sigma=0.05;% ±ê×¼²î
|
||||
%% 电压
|
||||
%电压幅值
|
||||
rVolt=Volt; %幅值
|
||||
|
|
@ -53,7 +53,7 @@ mPG=rPG.*(normrnd(0,sigma,length(rPG),1)+1);
|
|||
mQG=rQG.*(normrnd(0,sigma,length(rQG),1)+1);
|
||||
%% 冗余度计算
|
||||
stateVarCount=2*length(Volt);
|
||||
measurements=length(mVolt)+length(mBranchP)+length(mBranchQ)+length(mPG)+length(mQG);
|
||||
measurements=length(mVolt)+length(mBranchI)+length(mBranchP)+length(mBranchQ)+length(mPG)+length(mQG);
|
||||
fprintf('冗余度 %f\n',measurements/stateVarCount);
|
||||
%% 进入状态估计计算
|
||||
% SEVolt=sdpvar(length(Volt),1,'full');
|
||||
|
|
@ -96,12 +96,15 @@ onlyQG=setdiff(QGi,PDQDi);
|
|||
Busnum=length(Volt);
|
||||
seOpti=SEOpti();
|
||||
seOpti=seOpti.init(Busnum, mVolt,sigma,newwordParameter,zerosInjectionIndex,cmpY,onlyPG,onlyQG,mPG,mQG,Balance,mBranchI,mBranchP,mBranchQ);
|
||||
opts = optiset('solver','ipopt');
|
||||
opts.maxiter=3500;
|
||||
opts.tolrfun=1e-3;
|
||||
opts.tolafun=1e-3;
|
||||
opts.warnings='warnings';
|
||||
opts.display='iter';
|
||||
opts = optiset('solver','filtersd');
|
||||
opts.maxiter=15500;
|
||||
opts.maxtime=3000;
|
||||
opts.maxfeval=15000;
|
||||
opts.maxnodes=15000;
|
||||
opts.tolrfun=1e-5;
|
||||
opts.tolafun=1e-5;
|
||||
opts.warnings='all';
|
||||
opts.display='off';
|
||||
x0=[ones(Busnum,1);zeros(Busnum,1)];
|
||||
[~,seOpti]=seOpti.equ(x0);
|
||||
nlrhs=seOpti.nlrhs();
|
||||
|
|
|
|||
Loading…
Reference in New Issue