把PQQG作为常数加入潮流方程中。

添加了很多统计函数。
This commit is contained in:
facat
2013-01-23 21:27:33 +08:00
parent e96ebb226d
commit 4944e38cbd
17 changed files with 256 additions and 176 deletions

View File

@@ -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

View 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

View 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

View File

@@ -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

View 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

View 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

View 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

View File

@@ -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