用matlab来画那几个图。

Signed-off-by: facat <dugg@21cn.com>
This commit is contained in:
facat 2013-04-04 22:05:27 +08:00
parent 0f95f9c04b
commit 6fdf435f66
16 changed files with 101 additions and 21 deletions

BIN
20PD0.mat

Binary file not shown.

BIN
20QD0.mat

Binary file not shown.

View File

@ -1,13 +1,19 @@
function Lz=FormLz(Mat_G,Init_L,GenL,Busnum,PVQL,PD0,Loadi,KK)
%KK=999;
PL=1*GenL(:,2);%发电机有功下界
QL=PVQL(:,1);%发电机无功下界
VoltL=(0.8-1/exp(KK))*ones(1,Busnum);
function Lz=FormLz(Mat_G,Init_L,GenL,Busnum,PVQL,PD,PD0,QD0,Loadi,KK,PF)
KK=999;
VoltL=(0.9)*ones(1,Busnum);
%VoltL=-10*ones(1,Busnum);
PDL=PD0(Loadi);
PDL(PDL>0)=0.8*PDL(PDL>0);
PDL(PDL<0)=1.2*PDL(PDL<0);
PDL(PDL==0)=-.2;
t1=([PL',QL',PDL',VoltL])';
PDL(PDL>0)=0.700*PDL(PDL>0);
PDL(PDL<0)=1.300*PDL(PDL<0);
PDL(PDL==0)=-0.400;
%PDL=-10*ones(length(Loadi),1);
QDL=QD0(Loadi);
QDL(QDL>0)=0.700*QDL(QDL>0);
QDL(QDL<0)=1.300*QDL(QDL<0);
QDL(QDL==0)=-0.400;
% QDL=0*PD(Loadi).*sqrt((1-PF.^2))./PF;
t1=([PDL',QDL',VoltL])';
t2=Mat_G-Init_L'-t1;
Lz=t2;

12
JSMJZM.asv Normal file
View File

@ -0,0 +1,12 @@
JSM=[0.0575 0.051 0.0029];
JZM=[0.003 0.02629 0.0582];
plot(1:3,JSM,'k');
axis([0 4 0 0.07])
text(1,JSM(1)+0.001,'0.0575')
text(2,JSM(2)+0.001,'0.051')
text(3,JSM(3)+0.001,'0.0029')
hold on
plot(1:3,JZM,'k--');
text(1,JZM(1)+0.001,'0.003')
text(2,JZM(2)+0.001,'0.02629')
text(3,JZM(3)+0.001,'0.0029')

18
JSMJZM.m Normal file
View File

@ -0,0 +1,18 @@
JSM=[0.0575 0.051 0.0029];
JZM=[0.0003 0.02629 0.0582];
for I=0.01:0.01:0.06
line([0.5 3.5],[I I],'Color',[220 220 220]/255)
end
hold on
plot(1:3,JSM,'k');
ylabel('ͳ¼ÆÎó²î')
xlabel('Çé¿ö')
axis([0.5 3.5 0 0.065])
text(1,JSM(1)+0.001,'0.0575')
text(2,JSM(2)+0.001,'0.0510')
text(3,JSM(3)+0.001,'0.0029')
hold on
plot(1:3,JZM,'k--');
text(1-.3,JZM(1)+0.001,'0.0003')
text(2,JZM(2)-0.001,'0.0263')
text(3,JZM(3)-0.001,'0.0029')

14
JSNZN.asv Normal file
View File

@ -0,0 +1,14 @@
JSN=[0.1213 0.1092 0.0587];
JZN=[0.0971 0.1314 0.1408];
plot(1:3,JSM,'k');
ylabel('Öľ')
xlabel('Çéżö')
axis([0.5 3.5 0 0.065])
text(1,JSM(1)+0.001,'0.1213')
text(2,JSM(2)+0.001,'0.0510')
text(3,JSM(3)+0.001,'0.0029')
hold on
plot(1:3,JZM,'k--');
text(1-.3,JZM(1)+0.001,'0.0003')
text(2,JZM(2)-0.001,'0.0263')
text(3,JZM(3)-0.001,'0.0029')

18
JSNZN.m Normal file
View File

@ -0,0 +1,18 @@
JSN=[0.1213 0.1092 0.0587]*100;
JZN=[0.0971 0.1314 0.1408]*100;
for I=2:2:14
line([0.5 3.5],[I I],'Color',[220 220 220]/255)
end
hold on
plot(1:3,JSN,'k');
ylabel('/%')
xlabel('')
axis([0.5 3.5 0 16])
text(1,JSN(1)+0.3,'12.13')
text(2,JSN(2)+0.1,'10.92')
text(3,JSN(3)+0.6,'5.87')
hold on
plot(1:3,JZN,'k--');
text(1,JZN(1)-0.5,'9.71')
text(2,JZN(2)-0.5,'13.14')
text(3,JZN(3)-0.5,'14.08')

4
OPF.m
View File

@ -7,7 +7,7 @@ clear
thesis=ForThesis(1,45);
for II=1:1
[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,Liner,Linex,Lineb,Transforr,Transforx,Branchi,Branchg,Branchb,Transfork0]= ...
pf('E://<EFBFBD>926_21671693_2012-09-06/newFIle20.txt');
pf('E://926_21671693_2012-09-06/newFIle20 - 2 - (20).txt');
% pf('E:\\<EFBFBD>926_21671693_2012-09-06\newFIle16.txt');
%pf('D:\Project\\\\\9223-1_0.5_120%.txt');
%pf('D:\Project\\\919.txt');
@ -56,6 +56,8 @@ for II=1:1
%%
PD0(Loadi)=PD0(Loadi).*(1+normrnd(0,0.05,length(Loadi),1));
QD0(Loadi)=QD0(Loadi).*(1+normrnd(0,0.05,length(Loadi),1));
% save('20PD0.mat','PD0');
% save('20QD0.mat','QD0');
load('20PD0.mat');
load('20QD0.mat');
% PG0(PGi)=PG0(PGi).*(1+normrnd(0,0.01,length(PGi),1));

View File

@ -21,9 +21,9 @@ wQG=0;
%randPDind=randInt(1:10);
randPDind=0;
wPD=1/.05^2*ones(size(Loadi,1),1);
wPD(1:2:end)=0;
% wPD(1:2:end)=0;
wQD=1/.05^2*zeros(size(Loadi,1),1);
wQD(1:2:end)=0;
% wQD(1:2:end)=0;
%wD(randPDind)=0;%一些负荷不约束
%wD(7)=0;
% wD(11)=0;

View File

@ -20,10 +20,10 @@ wQG=0;
%randInt=randperm(size(Loadi,1));
%randPDind=randInt(1:10);
randPDind=0;
wPD=1/.05^2*ones(size(Loadi,1),1);
% wPD(1:2:end)=0;
wQD=1/.05^2*ones(size(Loadi,1),1);
% wQD(1:2:end)=0;
wPD=1/.05^2*zeros(size(Loadi,1),1);
wPD(1:2:end)=0;
wQD=1/.05^2*zeros(size(Loadi,1),1);
wQD(1:2:end)=0;
%wD(randPDind)=0;%
%wD(7)=0;
% wD(11)=0;

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
caseM.mat

Binary file not shown.

BIN
caseR.mat

Binary file not shown.

View File

@ -11,19 +11,29 @@ load('caseM.mat');
CVM=Volt;
subplot(3,2,1)
hist(CVR)
title('')
xlabel('/p.u');
ylabel('/');
title('')
subplot(3,2,2)
hist(CVM)
title('')
xlabel('/p.u');
ylabel('/');
title('')
subplot(3,2,3)
hist(CV1)
title('Case 1')
xlabel('/p.u');
ylabel('/');
title('1')
subplot(3,2,4)
hist(CV2)
title('Case 2')
xlabel('/p.u');
ylabel('/');
title('2')
subplot(3,2,5)
hist(CV3)
title('Case 3')
xlabel('/p.u');
ylabel('/');
title('3')
% figure()