资源简介

本程序是用matlab编写的电力系统最优潮流计算程序,对于IEEE30节点和IEEE14节点都已经过验证,可得到正确的结果。

资源截图

代码片段和文件信息

clear
clc
n=5;%input(‘请输入节点数:n=‘);
nl=7;%input(‘请输入支路数:nl=‘);
isb=1;%input(‘请输入平衡母线节点号:isb=‘);
pr=1e-5;%input(‘请输入误差精度:pr=‘);
B1=[120.02+j*0.06010;130.08+j*0.24010;230.06+j*0.18010;240.06+j*0.18010;250.04+j*0.12010;340.01+j*0.03010;450.08+j*0.24010];%input(‘请输入由支路参数形成的矩阵:B1=‘);变压器侧为1,否则为0
B2=[001.06101;00.2+j*0.21102;0.45+j*0.1501102;0.4+j*0.0501102;0.6+j*0.101102];%input(‘请输入各节点参数形成的矩阵:B2=‘);
X=[10;20;30;40;50];%input(‘请输入由节点号及其对地阻抗形成的矩阵:X=‘);
Y=zeros(n);U=zeros(1n);cta=zeros(1n);V=zeros(1n);O=zeros(1n);S1=zeros(nl);
for i=1:n
    if X(i2)~=0;
        p=X(i1);
        Y(pp)=X(i2);
    end
end
for i=1:nl
    if B1(i6)==0
        p=B1(i1);q=B1(i2);
    else p=B1(i2);q=B1(i1);
    end
    Y(pq)=Y(pq)-1./(B1(i3)*B1(i5));
    Y(qp)=Y(pq);
    Y(qq)=Y(qq)+1./(B1(i3)*B1(i5))+(B1(i4)*B1(i5))./2;
    Y(pp)=Y(pp)+1./(B1(i3)*B1(i5))+(B1(i4)*B1(i5))./2;
end %求导纳矩阵
G=real(Y);B=imag(Y);
for i=1:n
    cta(i)=angle(B2(i3));%电压角度
    U(i)=abs(B2(i3));
    %V(i)=B2(i4);
end
for i=1:n
    S(i)=B2(i2)-B2(i1);
    B(ii)=B(ii)+B2(i5);
end
P=real(S);Q=imag(S);
ICT1=0;IT2=1;
while IT2~=0
    IT2=0;t1=1;t2=1;
    for i=1:n
        if i~=isb
            C(i)=0;
            D(i)=0;
            for j1=1:n
                C(i)=C(i)+U(i)*U(j1)*(G(ij1)*cos(cta(i)-cta(j1))+B(ij1)*sin(cta(i)-cta(j1)));
                D(i)=D(i)+U(i)*U(j1)*(G(ij1)*sin(cta(i)-cta(j1))-B(ij1)*cos(cta(i)-cta(j1)));
            end
            DP(t1)=P(i)-C(i);
            t1=t1+1;
            if B2(i6)==2
                DQ(t2)=Q(i)-D(i);
                t2=t2+1;
            end 
        end
    end
    t1=t1-1;t2=t2-1;
    DPQ=[DP‘;DQ‘]; %求DPDQ
    for i=1:t1+t2
        if abs(DPQ(i))>pr
            IT2=IT2+1;
        end
    end
    H=zeros(t1t1);N=zeros(t1t2);K=zeros(t2t1);L=zeros(t2t2);
    for i=1:t1+1
        for j1=1:t1+1
            if j1~=isb&j1~=i
               H(ij1)=U(i)*U(j1)*(G(ij1)*sin(cta(i)-cta(j1))-B(ij1)*cos(cta(i)-cta(j1)));
           elseif j1~=isb&j1==i
               H(ij1)=-U(i)^2*B(ij1)-D(i);
           end
        end
    end
    for i=1:t1+1
        for j1=1:t2+1
            if j1~=isb&j1~=i
                N(ij1)=U(i)*U(j1)*(G(ij1)*cos(cta(i)-cta(j1))+B(ij1)*sin(cta(i)-cta(j1)));
            elseif j1~=isb&j1==i
                N(ij1)=U(i)^2*G(ij1)+C(i);
            end
        end
    end
    for  i=1:t2+1
        for j1=1:t1+1
            if j1~=isb&j1~=i
                K(ij1)= -U(i)*U(j1)*(G(ij1)*cos(cta(i)-cta(j1))+B(ij1)*sin(cta(i)-cta(j1)));
            elseif j1~=isb&j1==i
                K(ij1)=-U(i)^2*G(ij1)+C(i);
            end
        end
    end
    for i=1:t2+1
        for j1=1:t2+1
            if j1~=isb&j1~=i
                L(ij1)=U(i)*U(j1)*(G(ij1)*sin(cta(i)-cta(j1))-B(ij1)*cos(cta(i)-cta(j1)));
            elseif j1~=isb&j1==

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

     文件      13824  2009-03-27 10:14  chaoliujisuan\B1-3-4.xls

     文件      15360  2009-03-30 14:59  chaoliujisuan\B1-IEE-14.xls

     文件      13824  2009-03-27 15:03  chaoliujisuan\B2-3-4.xls

     文件      14848  2009-03-27 16:44  chaoliujisuan\B2-IEE-14.xls

     文件       4948  2009-03-26 20:32  chaoliujisuan\ljf_chaoliujisuan_090326.asv

     文件       4949  2009-03-27 09:21  chaoliujisuan\ljf_chaoliujisuan_090326.m

     文件       1664  2009-04-01 10:05  chaoliujisuan\make_Y.asv

     文件       1656  2009-04-01 10:07  chaoliujisuan\make_Y.m

     文件       5316  2007-01-24 02:28  chaoliujisuan\pudu网下载的MATLAB程序\258112139?.rar

     文件    2388562  2007-01-23 03:18  chaoliujisuan\pudu网下载的MATLAB程序\262150rtu.rar

     文件       2036  2007-01-26 03:44  chaoliujisuan\pudu网下载的MATLAB程序\317676435node.rar

     文件     155913  2007-05-19 03:11  chaoliujisuan\pudu网下载的MATLAB程序\35738615feitongbu.rar

     文件    1500525  2007-01-24 08:00  chaoliujisuan\pudu网下载的MATLAB程序\63535271matpower3.0.0.zip

     文件     170482  2007-01-24 22:01  chaoliujisuan\pudu网下载的MATLAB程序\77433611matpower2.0.rar

     文件        392  2009-04-02 16:38  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\a.asv

     文件        451  2009-04-02 16:44  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\a.m

     文件         84  2009-03-30 21:15  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\aaa.asv

     文件        127  2009-03-31 15:17  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\aaa.m

     文件       4095  2009-04-02 08:55  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\aaaa.m

     文件       1752  2004-08-23 16:56  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\bustypes.m

     文件      29354  2004-09-20 21:43  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\case118.m

     文件       4157  2004-09-20 21:46  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\case14.m

     文件       4117  2009-03-31 11:30  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\case14_zj.m

     文件       4493  2004-09-20 22:41  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\case30.m

     文件      62790  2004-09-20 21:45  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\case300.m

     文件       3881  2004-09-20 21:48  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\case30pwl.m

     文件       3914  2004-09-20 21:48  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\case30Q.m

     文件       5275  2004-09-20 21:48  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\case39.m

     文件       1135  2005-01-27 17:58  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\case4gs.m

     文件      12274  2004-09-20 21:47  chaoliujisuan\pudu网下载的MATLAB程序\79419117zycl\最优潮流\case57.m

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

评论

共有 条评论