• 大小: 1.07MB
    文件类型: .rar
    金币: 2
    下载: 0 次
    发布日期: 2024-01-27
  • 语言: 其他
  • 标签: 蒙特卡洛  电网  

资源简介

可以采用蒙特卡络法对实际配电网例子进行实验,验证了方法的正确性,10负荷点配电网蒙特卡洛法可靠性计算程序

资源截图

代码片段和文件信息

clc
disp(‘本配电网络中共有线路(条):‘)
Nline=10
disp(‘共有变压器(台):‘)
Ntrans=10
disp(‘共有断路器(台):‘)
Nbr=5
disp(‘配电网络中共有元件数:‘)
N=Nline+Ntrans+Nbr

lth=[0.690.290.421.550.982.100.451.251.131.90];   %length of lines
load=[0.670.870.010.221.000.570.820.890.870.68];   %load of each load point
lpuser=[3820482022867437372];  %number of the users

%故障率
disp(‘假设配电线路、变压器、断路器的故障率分别为:‘)
Kline=0.065
Ktrans=0.015
Kbr=0.006

%修复时间
disp(‘假设配电线路、变压器、断路器的修复时间分别为:‘)
Tline=5
Ttrans=200
Tbr=4

%初始化负荷点参数
lpgzcs=zeros(1Ntrans);
lpgzsj=zeros(1Ntrans);
lpgzl=zeros(1Ntrans);
lpgzcxsj=zeros(1Ntrans);
lpngzsj=zeros(1Ntrans);

%初始化10个线路元件的故障率和修复时间
for i=1:Nline
    yjgzl(i)=Kline*lth(i);
    yjxfsj(i)=Tline;
end

%初始化10个变压器元件的故障率和修复时间
for i=(Nline+1):(Nline+Ntrans)
    yjgzl(i)=Ktrans;
    yjxfsj(i)=Ttrans;
end

%初始化5个开关元件的故障率和修复时间
for i=(Nline+Ntrans+1):N
    yjgzl(i)=Kbr;
    yjxfsj(i)=Tbr;
end

%各个负荷点的供电路径
lp1=[11121];
lp2=[121221];
lp3=[1231321];
lp4=[1234142122];
lp5=[12345152122];
lp6=[61623];
lp7=[671723];
lp8=[678182324];
lp9=[6789192324];
lp10=[610202325];

SUMMTTF=0;
while SUMMTTF<=20000
    
    %获得一对对偶数
    R1=rand(1N);
    for i=1:N
        R2(i)=1-R1(i);
    end
    
    %求各元件MTTF
    for i=1:N
        MTTF1(i)=-1/yjgzl(i)*log(R1(i));
    end
    for i=1:N
        MTTF2(i)=-1/yjgzl(i)*log(R2(i));
    end
    
    %确定故障元件,求取MTTR
    a1=MTTF1(1);
    b1=1;
    for i=1:N
        if a1>MTTF1(i)
            a1=MTTF1(i);
            b1=i;
        end
    end
    MTTR1=-yjxfsj(b1)*log(rand(1));
    
    a2=MTTF2(1);
    b2=1;
    for i=1:N
        if  a2>MTTF2(i);
            a2=MTTF2(i);
            b2=i;
        end
    end
    MTTR2=-yjxfsj(b2)*log(rand(1));
   
    SUMMTTF=SUMMTTF+a1+a2;
    
    %计算各个负荷点的故障次数与故障时间
    %计算负荷点1的故障次数与故障时间
    for i=1:3
        if lp1(i)==b1
            lpgzcs(1)=lpgzcs(1)+1;
            lpgzsj(1)=lpgzsj(1)+MTTR1;
        end
    end
    for i=1:3
        if lp1(i)==b2
            lpgzcs(1)=lpgzcs(1)+1;
            lpgzsj(1)=lpgzsj(1)+MTTR2;
        end
    end
      
    %计算负荷点2的故障次数与故障时间
    for i=1:4
        if lp2(i)==b1
            lpgzcs(2)=lpgzcs(2)+1;
            lpgzsj(2)=lpgzsj(2)+MTTR1;
        end
    end
    for i=1:4
        if lp2(i)==b2
            lpgzcs(2)=lpgzcs(2)+1;
            lpgzsj(2)=lpgzsj(2)+MTTR2;
        end
    end
    
    %计算负荷点3的故障次数与故障时间
    for i=1:5
        if lp3(i)==b1
            lpgzcs(3)=lpgzcs(3)+1;
            lpgzsj(3)=lpgzsj(3)+MTTR1;
        end
    end
    for i=1:5
        if lp3(i)==b2
            lpgzcs(3)=lpgzcs(3)+1;
            lpgzsj(3)=lpgzsj(3)+MTTR2;
        end
    end
    
    %计算负荷点4的故障次数与故障时间
    for i=1:7
        if lp4(i)==b1
            lpgzcs(4)=lpgzcs(4)+1;
            lpgzsj(4)=lpgzsj(4)+MTTR1;
        end
    end
    for i=1:7
        if lp4(i)==b2
          

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       6087  2017-11-27 20:45  配电系统可靠性计算\MATLAB_reliability.m

     文件      37888  2017-11-27 21:04  配电系统可靠性计算\reliability\Debug\reliability.exe

     文件     345708  2017-11-27 21:04  配电系统可靠性计算\reliability\Debug\reliability.ilk

     文件     461824  2017-11-27 21:04  配电系统可靠性计算\reliability\Debug\reliability.pdb

     文件    2359296  2017-11-27 21:04  配电系统可靠性计算\reliability\ipch\reliability-853d85eb\reliability-7f0cc46.ipch

     文件       2390  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\cl.command.1.tlog

     文件       7166  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\CL.read.1.tlog

     文件       1628  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\CL.write.1.tlog

     文件          2  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\link-cvtres.read.1.tlog

     文件          2  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\link-cvtres.write.1.tlog

     文件          2  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\link.12276-cvtres.read.1.tlog

     文件          2  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\link.12276-cvtres.write.1.tlog

     文件          2  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\link.12276.read.1.tlog

     文件          2  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\link.12276.write.1.tlog

     文件       5474  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\link.command.1.tlog

     文件      10832  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\link.read.1.tlog

     文件       3416  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\link.write.1.tlog

     文件       1400  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\mt.command.1.tlog

     文件       1358  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\mt.read.1.tlog

     文件        426  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\mt.write.1.tlog

     文件       2060  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\rc.command.1.tlog

     文件       1274  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\rc.read.1.tlog

     文件       1298  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\rc.write.1.tlog

     文件        406  2017-11-27 20:32  配电系统可靠性计算\reliability\reliability\Debug\reliability.exe.embed.manifest

     文件        472  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\reliability.exe.embed.manifest.res

     文件        381  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\reliability.exe.intermediate.manifest

     文件        114  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\reliability.lastbuildstate

     文件       2834  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\reliability.log

     文件      26458  2017-11-27 21:04  配电系统可靠性计算\reliability\reliability\Debug\reliability.obj

     文件          0  2017-11-27 20:32  配电系统可靠性计算\reliability\reliability\Debug\reliability.write.1.tlog

............此处省略24个文件信息

评论

共有 条评论