💥1 概述
优化配电网运行作为电力系统运行管理的一个重要组成部分,也是供电企业的工作目标。在配网优化的各项措施中,由于配电网重构能在不增加投资的前提下,只需通过调节配网中开关的开合状态,就能达到降低线损、均衡负荷以消除过载、提高供电电压质量和提高供电可靠性等目的,因此它是配电网一项最为经济的优化措施。本文基于遗传算法的配电网重构,有效的降低配电网网损,提高电能质量。
📚2 运行结果
部分代码:
function [U,ploss]=powerflow() n=69; b=68; Sb=10; %基准功率 Ub=12.66; %基准电压 Zb=Ub^2/Sb; %基准阻抗 s1=13; s2=69; s3=55; s4=18; s5=61; Q1=0; Q2=0; Q3=0; %输入系统参数 Z=[1, 1, 2,0.005/Zb+0.0012i/Zb,0 2, 2, 3,0.005/Zb+0.0012i/Zb,0 3, 3, 4,0.0015/Zb+0.0036i/Zb,0 4, 4, 5,0.0251/Zb+0.02941i/Zb,0 5, 5, 6,0.366/Zb+0.1869i/Zb,0.0026/Sb+0.0022i/Sb 6, 6, 7,0.3811/Zb+0.1964i/Zb,0.0404/Sb+0.03i/Sb 7, 7, 8,0.0922/Zb+0.047i/Zb,0.075/Sb+0.054i/Sb 8, 8, 9,0.0493/Zb+0.0251i/Zb,0.030/Sb+0.022i/Sb 9, 9, 10,0.8090/Zb+0.2707i/Zb,0.028/Sb+0.019i/Sb 10, 10,11,0.1872/Zb+0.0691i/Zb,0.145/Sb+0.104i/Sb 11,11,12,0.7114/Zb+0.2351i/Zb,0.145/Sb+0.104i/Sb 12,12,13,1.03/Zb+0.34i/Zb,0.008/Sb+0.0055i/Sb 13,13,14,1.044/Zb+0.345i/Zb,0.008/Sb+0.0055i/Sb 14,14,15,1.058/Zb+0.3496i/Zb,0 15,15,16,0.1966/Zb+0.065i/Zb,0.0455/Sb+0.030i/Sb 16,16,17,0.3744/Zb+0.1238i/Zb,0.060/Sb+0.035i/Sb 17,17,18,0.0047/Zb+0.0016i/Zb,0.060/Sb+0.035i/Sb 18,18,19,0.3276/Zb+0.1083i/Zb,0 19,19,20,0.2106/Zb+0.0696i/Zb,0.001/Sb+0.0006i/Sb 20,20,21,0.3416/Zb+0.1129i/Zb,0.114/Sb+0.081i/Sb 21,21,22,0.014/Zb+0.0046i/Zb,0.0053/Sb+0.0035i/Sb 22, 22,23,0.1591/Zb+0.0526i/Zb,0 23,23,24,0.3463/Zb+0.11451i/Zb,0.028/Sb+0.020i/Sb 24,24,25,0.7488/Zb+0.2745i/Zb,0 25, 25,26,0.3089/Zb+0.1021i/Zb,0.014/Sb+0.010i/Sb 26,26,27,0.1732/Zb+0.5728i/Zb,0.014/Sb+0.010i/Sb 27,3,20,0.0044/Zb+0.0108i/Zb,0.026/Sb+0.0186i/Sb 28,28,29,0.064/Zb+0.1565i/Zb,0.026/Sb+0.0186i/Sb 29,29,30,0.3978/Zb+0.1315i/Zb,0 30,30,31,0.0702/Zb+0.0232i/Zb,0 31,32,33,0.3510/Zb+0.1160i/Zb,0 32,32,33,0.8390/Zb+0.2816i/Zb,0.014/Sb+0.010i/Sb 33, 33,34,1.7080/Zb+0.5645i/Zb,0.0194/Sb+0.014i/Sb 34, 34,35,1.4740/Zb+0.4673i/Zb,0.0060/Sb+0.004i/Sb 35,3,59,0.0044/Zb+0.0108i/Zb,0.0260/Sb+0.01855i/Sb 36,59,60,0.064/Zb+0.15650i/Zb,0.0260/Sb+0.01855i/Sb 37,60,61,0.10530/Zb+0.123i/Zb,0 38,61,62,0.0304/Zb+0.355i/Zb,0.024/Sb+0.017i/Sb 39,62,63,0.018/Zb+0.021i/Zb,0.024/Sb+0.017i/Sb 40,63,64,0.7283/Zb+0.8509i/Zb,0.0012/Sb+0.001i/Sb 41,64,65,0.310/Zb+0.3623i/Zb,0 42,65,66,0.041/Zb+0.0478i/Zb,0.006/Sb+0.0043i/Sb 43,66,67,0.0092/Zb+0.0116i/Zb,0 44,67,68,0.1089/Zb+0.1373i/Zb,0.03922/Sb+0.0263i/Sb 45,68,69,0.0009/Zb+0.0012i/Zb,0.03922/Sb+0.0263i/Sb 46,4,36,0.0034/Zb+0.0034i/Zb,0 47,36,37,0.0851/Zb+0.2033i/Zb,0.079/Sb+0.0564i/Sb 48,37,38,0.2898/Zb+0.7091i/Zb,0.3847/Sb+0.2745i/Sb 49,38,39,0.0822/Zb+0.2011i/Zb,0.3847/Sb+0.2745i/Sb 50,8,40,0.0928/Zb+0.0473i/Zb,0.0405/Sb+0.0283i/Sb 51,40,41,0.3391/Zb+0.1114i/Zb,0.0036/Sb+0.0027i/Sb 52,9,42,0.1740/Zb+0.0886i/Zb,0.00435/Sb+0.0035i/Sb 53,42,43,0.2030/Zb+0.1034i/Zb,0.0264/Sb+0.019i/Sb 54,43,44,0.2842/Zb+0.1447i/Zb,0.024/Sb+0.0172i/Sb 55,44,45,0.2813/Zb+0.1433i/Zb,0 56,45,46,1.59/Zb+0.5337i/Zb,0 57,46,47,0.7837/Zb+0.2630i/Zb,0 58,47,48,0.3042/Zb+0.1006i/Zb,0.1/Sb+0.072i/Sb 59,48,49,0.3861/Zb+0.1172i/Zb,0 60,49,50,0.5075/Zb+0.2585i/Zb,1.244/Sb+0.888i/Sb 61,50,51,0.0974/Zb+0.0496i/Zb,0.032/Sb+0.023i/Sb 62,51,52,0.1450/Zb+0.0738i/Zb,0 63,52,53,0.7105/Zb+0.3619i/Zb,0.227/Sb+0.162i/Sb 64,53,54,1.041/Zb+0.5302i/Zb,0.059/Sb+0.042i/Sb 65,11,55,0.2012/Zb+0.0611i/Zb,0.018/Sb+0.013i/Sb 66,55,56,0.0047/Zb+0.0014i/Zb,0.018/Sb+0.013i/Sb 67,12,57,0.7394/Zb+0.2444i/Zb,0.028/Sb+0.020i/Sb 68,57,58,0.0047/Zb+0.0016i/Zb,0.028/Sb+0.020i/Sb 69,11,66,0.5/Zb+0.5/Zb,0.018/Sb+0.013i/Sb 70,13,20,0.5/Zb+0.5/Zb,0.114/Sb+0.081i/Sb 71,15,69,1/Zb+1/Zb,0.018/Sb+0.013i/Sb 72,27,54,1/Zb+1/Zb,0.024/Sb+0.0172i/Sb 73,39,48,2/Zb+2/Zb,0.3847/Sb+0.2745i/Sb ]; for i=1:73 if Z(i,1)==s1 Z(i,5)=0; end end for i=1:73 if Z(i,1)==s2 Z(i,5)=0; end end for i=1:73 if Z(i,1)==s3 Z(i,5)=0; end end for i=1:73 if Z(i,1)==s4 Z(i,5)=0; end end for i=1:73 if Z(i,1)==s5 Z(i,5)=0; end end %计算潮流 v=ones(1,n); %初始化节点电压 k=0; L1=0; while k<10&&L1<1 %收敛条件 v_before=v; %计算节点注入电流,b=32为系统支路数 I=zeros(b,1); %生成一个b行1列的零矩阵 for h=1:b I(h)=conj(0.5*Z(h,5)/v(1,h+1)); %求节点注入电流,conj为求共轭 end J=zeros(b,1); J=J+I; %支路电流,J矩阵中存储的是各节点注入电流,J有32行1列 for h=b-1:-1:1 nn=Z(h,3); %取系统中末端节点编号 for j=b:-1:1 if Z(j,2)==nn %说明他们之间首末端点是相连的 J(h)=J(h)+J(j); end end end %回推节点电压 for h=1:b m=Z(h,2);mm=Z(h,3); v(1,mm+1)=v(1,m+1)-Z(h,4)*J(h); end %收敛条件 for h=1:b dat_v(h)=abs(v(h))-abs(v_before(h)); end if max(abs(dat_v))<1.0e-4 L1=1; %不能用dat_v(i)就指最后的元素第i个 end k=k+1; end %计算网损 ws=zeros(b,1); for i=1:1:b; ws(i,1)=J(i,1)*conj(J(i,1))*real(Z(i,4))*Sb; end ploss=zeros(n,1); ploss=sum(ws); U=zeros(n,1); for i=1:n; U(i)=real(v(i)); end ploss end
🎉3 参考文献
部分理论来源于网络,如有侵权请联系删除。
[1]柯朝晖,彭雪华,徐敏.改进的遗传算法在配电网重构中的应用[J].科技广场,2016(01):42-45.DOI:10.13838/j.cnki.kjgc.2016.01.010.
[2]杨烈. 基于遗传算法的多目标配电网重构研究与应用[D].华北电力大学,2013.
🌈4 Matlab代码实现
链接:https://pan.baidu.com/s/1vjvD0XYKqhr9t7zHIYfBrQ
提取码:xlsb
--来自百度网盘超级会员V3的分享