资源预览内容
第1页 / 共4页
第2页 / 共4页
第3页 / 共4页
第4页 / 共4页
亲,该文档总共4页全部预览完了,如果喜欢就下载吧!
资源描述
function Flow1(Z,S,Sb,Vb)% Z 各支路阻抗 % S 各节点运算负荷 % Sb 基准功率 % Zb 基准阻抗% Flow(Z,S,Sb,Vb) 计算网络功率及电压分布 % 输出收敛迭代次数及功率分布和电压分布% 数据初始化 Z(:,1)=Z(:,1)+1; Z1=1,0,1,0; Z=Z1;Z;%使得支路编号与支路末点编号一致 m,n=size(Z); Zb=(Vb2)/Sb*1000; Z(:,4)=Z(:,4)/Zb; S(:,2)=S(:,2)/Sb; k=1; V=ones(m,1); dU=ones(m,1);%前推回代 n=0; while max(abs(dU)10-4Sr=S(:,2);V1=V;for i=m:-1:1 %前推功率A=(find(Z(:,2)=i);%求以 i 节点为始点的各支路b,c=size(A); if b=0for j=1:1:b %求以当前节点为始点的各支路功率总和N=A(j,1);if N=6dSr=(abs(Sr(N,1)/V(N,1)2)*Z(N,4); %各支路功率损耗 elsedSr=0;endSr(N,2)=Sr(N,1)+dSr; %N 支路功率Sr(i,1)=Sr(i,1)+Sr(N,2);end else Sr(i,2)=Sr(i,1); endendV(1,1)=1;for t=2:m %回代电压if t=6a=Z(t,2); %由于是辐射型网络,只有一个始点 dV1=(real(Sr(t,2)*real(Z(t,4)+imag(Sr(t,2)*imag(Z(t,4)/V(a,1);dV2=(real(Sr(t,2)*imag(Z(t,4)-imag(Sr(t,2)*real(Z(t,4)/V(a,1);V(t,1)=(V(a,1)-dV1)2+dV22)0.5 ;else dk=k*(V(5,1)/V1(5,1)-1)k=k-dkif k=1.1k=1.1;elseif k15fprintf(迭代 15 次不收!n);break;end end%输出 a=1:1:m;%编号 fprintf(迭代收敛次数为:n); n fprintf(网络功率分布为:n); Sr(:,2)=Sr(:,2)*Sb; Sr=a,Sr fprintf(网络电压分布为:n); %V=V*Vb; V=a,Vclc clear all; Z2=1, 1, 2, 1.197+j*0.82 ;2, 2, 3, 1.796+j*1.231;3, 3, 4, 1.306+j*0.895;4, 4, 5, 1.851+j*1.268; 5, 5, 6, 1.524+j*1.044; 6, 6, 7, 1.905+j*1.305;7, 7, 8, 1.197+j*0.82 ; 8, 8, 9, 0.653+j*0.447; 9, 9, 10, 1.143+j*0.783;10, 4, 11, 2.823+j*1.172;11, 11, 12, 1.184+j*0.491;12, 12, 13, 1.002+j*0.416;13, 13, 14, 0.455+j*0.189;14, 14, 15, 0.546+j*0.227; 15, 5, 16, 2.55+j*1.058; 16, 6, 17, 1.366+j*0.567;17, 17, 18, 0.819+j*0.34 ; 18, 18, 19, 1.548+j*0.642;19, 19, 20, 1.368+j*0.567; 20, 20, 21, 3.552+j*1.474;21, 7, 22, 1.548+j*0.642; 22, 22, 23, 1.092+j*0.453;23, 23, 24, 0.91+j*0.378;24, 24, 25, 0.455+j*0.189;25, 25, 26, 0.364+j*0.151;26, 8, 27, 1.002+j*0.417;27, 27, 28, 4.403+j*1.215; ;S2=1, 0;2, 35.28;3, 14;4, 35.28; 5, 14; 6, 35.28;7, 35.28; 8, 35.28; 9, 14;10, 14;11, 56;12, 35.28;13, 35.28;14, 14;15, 35.28;16, 35.28;17, 8.96; 18, 8.96; 19, 35.28;20, 35.28;21, 14;22, 35.28;23, 8.96; 24, 5625, 8.96; 26, 35.28;27, 35.28;28, 35.28; ;%28nodes dataJ=5.441, 2.946 , 2.946 ;2.946, 8.848 , 5.258 ;2.946, 5.258 , 8.376 ; ;c=0.7; Vb=10.5; Sb=100; Z2(:,4)=Z2(:,4); S2(:,2)=S2(:,2); S2(:,2)=S2(:,2)+i*(S2(:,2)*tan(acos(c); Z=Z2; S=S2;%Flow(Z,S,Sb,Vb,J); Flow1(Z,S,Sb,Vb);
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号