把PQQG作为常数加入潮流方程中。
添加了很多统计函数。
This commit is contained in:
@@ -9,6 +9,6 @@ this.currentPos=this.currentPos+1;
|
||||
this.PDArray(:,this.currentPos)=PD;
|
||||
this.QDArray(:,this.currentPos)=QD;
|
||||
this.PGArray(this.currentPos)=PG;
|
||||
% this.QGArray(this.currentPos)=QG;
|
||||
this.QGArray(this.currentPos)=QG;
|
||||
end
|
||||
|
||||
|
||||
10
@ForThesis/MaxBranchDeviation.asv
Normal file
10
@ForThesis/MaxBranchDeviation.asv
Normal file
@@ -0,0 +1,10 @@
|
||||
function [ output_args ] = MaxBranchDeviation( this, Linei,Linej,Liner,Linex,Lineb,Transfori,Transforj,Transforr,Transforx,Branchg,Branchb,Transfork0,Volt0,UAngel0,Volt,UAngel)
|
||||
%% 最大支路功率偏差
|
||||
% 支路功率包括线路和变压器
|
||||
%%
|
||||
[dispLineloss0 dispTransloss0]=Lineloss(Linei,Linej,Liner,Linex,Lineb2,Transi,Transj,Transr,Transx,Branchg,Branchb,k0,Volt0,Angle0);
|
||||
[dispLineloss dispTransloss]=Lineloss(Linei,Linej,Liner,Linex,Lineb2,Transi,Transj,Transr,Transx,Branchg,Branchb,k0,Volt,Angle);
|
||||
real(dispLineloss0 - dispLineloss)./real(dispLineloss0)
|
||||
|
||||
end
|
||||
|
||||
14
@ForThesis/MaxBranchDeviation.m
Normal file
14
@ForThesis/MaxBranchDeviation.m
Normal file
@@ -0,0 +1,14 @@
|
||||
function [ output_args ] = MaxBranchDeviation( ~, Linei,Linej,Liner,Linex,Lineb,Transfori,Transforj,Transforr,Transforx,Branchi,Branchg,Branchb,Transfork0,Volt0,UAngel0,Volt,UAngel)
|
||||
%% 最大支路功率偏差
|
||||
% 支路功率包括线路和变压器
|
||||
%%
|
||||
[dispLineloss0 dispTransloss0]=Lineloss(Linei,Linej,Liner,Linex,Lineb,Transfori,Transforj,Transforr,Transforx,Branchi,Branchg,Branchb,Transfork0,Volt0,UAngel0);
|
||||
[dispLineloss dispTransloss]=Lineloss(Linei,Linej,Liner,Linex,Lineb,Transfori,Transforj,Transforr,Transforx,Branchi,Branchg,Branchb,Transfork0,Volt,UAngel);
|
||||
t1=(dispLineloss0(:,3) - dispLineloss(:,3))./dispLineloss0(:,3);
|
||||
t2=(dispTransloss0(:,3) - dispTransloss(:,3))./dispTransloss0(:,3);
|
||||
t11=dispLineloss0(:,3)>1e-5;% 太小的值不计算
|
||||
t22=dispTransloss0(:,3)>1e-5;% 太小的值不计算
|
||||
t3=abs([t1(t11);t2(t22)]);
|
||||
output_args=max(t3(t3~=Inf));
|
||||
end
|
||||
|
||||
@@ -6,6 +6,6 @@ QDMaxDev=max(abs( (this.QDArray-QD0Array)./QD0Array ),[],2);
|
||||
PG0Array=repmat(PG0,this.sampleNum,1);
|
||||
QG0Array=repmat(QG0,this.sampleNum,1);
|
||||
PGMaxDev=max(abs( (PG0Array-this.PGArray)./PG0Array ));
|
||||
% QGMaxDev=max( abs( (QG0Array-this.QGArray)./QG0Array ) );
|
||||
output_arg=max([PDMaxDev;QDMaxDev;PGMaxDev]);
|
||||
QGMaxDev=max( abs( (QG0Array-this.QGArray)./QG0Array ) );
|
||||
output_arg=max([PDMaxDev;QDMaxDev;PGMaxDev;QGMaxDev]);
|
||||
end
|
||||
|
||||
12
@ForThesis/PercentOfPass.m
Normal file
12
@ForThesis/PercentOfPass.m
Normal file
@@ -0,0 +1,12 @@
|
||||
function [ output_args ] = PercentOfPass( this, PG0,QG0,PD0,QD0 )
|
||||
%% 估计值合格率
|
||||
PD=this.PDArray(:,end);%用最后一列
|
||||
QD=this.QDArray(:,end);%用最后一列
|
||||
t1=PD-PD0;
|
||||
t2=QD-QD0;
|
||||
t3=abs(t1)/3*0.05;
|
||||
t4=abs(t2)/3*0.05;
|
||||
output_args=sum(t3<=1)+sum(t4<=1);
|
||||
|
||||
end
|
||||
|
||||
13
@ForThesis/SqareDeviation.m
Normal file
13
@ForThesis/SqareDeviation.m
Normal file
@@ -0,0 +1,13 @@
|
||||
function [ output_args ] = SqareDeviation( this, PG0,QG0,PD0,QD0)
|
||||
%% 其实就是负荷系数不为0的目标函数
|
||||
|
||||
PD=this.PDArray(:,end);%用最后一列
|
||||
QD=this.QDArray(:,end);%用最后一列
|
||||
t1=PD-PD0;
|
||||
t2=t1./0.05;
|
||||
t3=QD-QD0;
|
||||
t4=t3./0.05;
|
||||
|
||||
output_args=sqrt(sum(t2.^2)+sum(t4.^2));
|
||||
end
|
||||
|
||||
19
@ForThesis/StatBranchDeviation.m
Normal file
19
@ForThesis/StatBranchDeviation.m
Normal file
@@ -0,0 +1,19 @@
|
||||
function [ output_args ] = StatBranchDeviation( ~, Linei,Linej,Liner,Linex,Lineb,Transfori,Transforj,Transforr,Transforx,Branchi,Branchg,Branchb,Transfork0,Volt0,UAngel0,Volt,UAngel )
|
||||
%STATBRANCHDEVIATION Summary of this function goes here
|
||||
% Detailed explanation goes here
|
||||
|
||||
%% 支路功率统计偏差 L2 范数
|
||||
% 支路功率包括线路和变压器
|
||||
%%
|
||||
[dispLineloss0 dispTransloss0]=Lineloss(Linei,Linej,Liner,Linex,Lineb,Transfori,Transforj,Transforr,Transforx,Branchi,Branchg,Branchb,Transfork0,Volt0,UAngel0);
|
||||
[dispLineloss dispTransloss]=Lineloss(Linei,Linej,Liner,Linex,Lineb,Transfori,Transforj,Transforr,Transforx,Branchi,Branchg,Branchb,Transfork0,Volt,UAngel);
|
||||
t1=(dispLineloss0(:,3) - dispLineloss(:,3))./dispLineloss0(:,3);
|
||||
t2=(dispTransloss0(:,3) - dispTransloss(:,3))./dispTransloss0(:,3);
|
||||
t11=dispLineloss0(:,3)>1e-5;% 太小的值不计算
|
||||
t22=dispTransloss0(:,3)>1e-5;% 太小的值不计算
|
||||
t3=[t1(t11);t2(t22)];
|
||||
t4=t3.^2;
|
||||
t5=sum(t4).^.5;
|
||||
output_args=t5
|
||||
end
|
||||
|
||||
@@ -6,15 +6,15 @@ PD0Array=repmat(PD0,1,this.sampleNum);
|
||||
QD0Array=repmat(QD0,1,this.sampleNum);
|
||||
PDDev=(this.PDArray-PD0Array)/0.05;
|
||||
QDDev=(this.QDArray-QD0Array)/0.05;
|
||||
PG0Array=repmat(PG0,this.sampleNum,1);
|
||||
QG0Array=repmat(QG0,this.sampleNum,1);
|
||||
PGDev=(PG0Array-this.PGArray)/0.01;
|
||||
% PG0Array=repmat(PG0,this.sampleNum,1);
|
||||
% QG0Array=repmat(QG0,this.sampleNum,1);
|
||||
% PGDev=(PG0Array-this.PGArray)/0.01;
|
||||
% QGDev=(QG0Array-this.QGArray)/0.01;
|
||||
wholeMat=[PDDev;QDDev;PGDev'];
|
||||
wholeMat=[PDDev;QDDev;];
|
||||
t1=wholeMat.^2;
|
||||
t2=sum(t1,1);
|
||||
t3=t2/size(t1,1);
|
||||
t4=t3.^2;
|
||||
t4=t3.^.5;
|
||||
output_args=sum(t4)/length(t4);
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user