✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
个人主页:Matlab科研工作室
个人信条:格物致知。
更多Matlab仿真内容点击
智能优化算法 神经网络预测 雷达通信 无线传感器
信号处理 图像处理 路径规划 元胞自动机 无人机
配电网重构是配电管理系统的重要内容,本文提出一种遗传算法来处理配电网重构问题,采用实数编码.同时为解决遗传算法应用于配电网重构时产生的大量不可行解的问题,借助图论知识和搜索技术给出了不可行解的修复方案.理论分析和算例表明,该方法高效可行,适合配电网自动化的实际应用要求.
clear;
% % IEEE34节点网络线路阻抗:
% %-首节点---- 末节点----------Z11-----------------Z22------------------Z33----------------Z12----------------Z13----------------Z23------------Zn-----------
%%%支路信息(节点 R X)
%支路信息% 9列 bus0 bus1 Zaa Zbb Zcc Zab Zac Zbc Zn(中性线阻抗) 前两列是支路编号,后六列是三相间的互阻抗
IData.Branch=...
[ 0 1 0.6532+0.6520i 0.6469+0.6630i 0.6496+0.6582i 0.1027+0.2824i 0.1041+0.2451i 0.1010+0.2243i 0.6532+0.6520i;
1 2 0.4380+0.4372i 0.4337+0.4446i 0.4356+0.4414i 0.0688+0.1893i 0.0698+0.1643i 0.0677+0.1504i 0.4380+0.4372i;
2 3 8.1601+8.1448i 8.0807+8.2827i 8.1149+8.2229i 1.2825+3.5276i 1.3002+3.0612i 1.2611+2.8024i 8.1601+8.1448i;
3 4 9.4943+9.4766i 9.4020+9.6371i 9.4418+9.5675i 1.4922+4.1044i 1.5128+3.5618i 1.4673+3.2607i 9.4943+9.4766i;
4 5 7.5271+7.5130i 7.4539+7.6403i 7.4854+7.5851i 1.1830+3.2540i 1.1993+2.8238i 1.1633+2.5850i 7.5271+7.5130i;
5 6 0.0037+0.0027i 0.0036+0.0027i 0.0036+0.0027i 0.0004+0.0012i 0.0004+0.0011i 0.0004+0.0010i 0.0037+0.0027i;
6 7 0.1133+0.0829i 0.1125+0.0838i 0.1128+0.0834i 0.0137+0.0378i 0.0139+0.0334i 0.0134+0.0308i 0.1133+0.0829i;
7 8 3.7321+2.7294i 3.7044+2.7615i 3.7164+2.7476i 0.4500+1.2457i 0.4562+1.1005i 0.4424+1.0129i 3.7321+2.7294i;
8 9 0.3070+0.2246i 0.3048+0.2272i 0.3058+0.2261i 0.0370+0.1025i 0.0375+0.0905i 0.0364+0.0833i 0.3070+0.2246i;
9 10 7.4714+5.4642i 7.4161+5.5285i 7.4401+5.5006i 0.9008+2.4938i 0.9132+2.2031i 0.8857+2.0277i 7.4714+5.4642i;
10 11 0.1901+0.1390i 0.1887+0.1406i 0.1893+0.1399i 0.0229+0.0634i 0.0232+0.0560i 0.0225+0.0516i 0.1901+0.1390i;
11 12 13.4625+9.8457i 13.3627+9.9615i 13.4060+9.9113i 1.6232+4.4935i 1.6455+3.9697i 1.5960+3.6537i 13.4625+9.8457i;
12 13 0.0037+0.0027i 0.0036+0.0027i 0.0036+0.0027i 0.0004+0.0012i 0.0004+0.0011i 0.0004+0.0010i 0.0037+0.0027i;
13 14 1.7911+1.3099i 1.7778+1.3253i 1.7836+1.3186i 0.2160+0.5978i 0.2189+0.5281i 0.2123+0.4861i 1.7911+1.3099i;
14 15 2.1310+1.5585i 2.1153+1.5769i 2.1221+1.5689i 0.2569+0.7113i 0.2605+0.6284i 0.2526+0.5784i 2.1310+1.5585i;
15 16 0.1023+0.0749i 0.1016+0.0757i 0.1019+0.0754i 0.0123+0.0342i 0.0125+0.0302i 0.0121+0.0278i 0.1023+0.0749i;
16 17 0.4935+0.3609i 0.4898+0.3651i 0.4914+0.3633i 0.0595+0.1647i 0.0603+0.1455i 0.0585+0.1339i 0.4935+0.3609i;
17 18 1.3305+0.9731i 1.3207+0.9845i 1.3249+0.9796i 0.1604+0.4441i 0.1626+0.3923i 0.1577+0.3611i 1.3305+0.9731i;
18 19 0.1937+0.1417i 0.1923+0.1434i 0.1929+0.1426i 0.0234+0.0647i 0.0237+0.0571i 0.0230+0.0526i 0.1937+0.1417i;
3 20 3.0773+1.6109i 3.0773+1.6109i 3.0773+1.6109i 0 0 0 3.0773+1.6109i;
7 21 0.9067+0.4811i 0.9067+0.4811i 0.9067+0.4811i 0 0 0 0.9067+0.4811i;
21 22 25.5295+13.5467i 25.5295+13.5467i 25.5295+13.5467i 0 0 0 25.5295+13.5467i;
22 23 7.2851+3.8657i 7.2851+3.8657i 7.2851+3.8657i 0 0 0 7.2851+3.8657i;
8 24 1.6065+0.8410i 1.6065+0.8410i 1.6065+0.8410i 0 0 0 1.6065+0.8410i;
11 25 12.3698+6.4754i 12.3698+6.4754i 12.3698+6.4754i 0 0 0 12.3698+6.4754i;
14 26 0.8589+0.4558i 0.8589+0.4558i 0.8589+0.4558i 0 0 0 0.8589+0.4558i;
15 27 0.7384+0.5400i 0.7329+0.5464i 0.7353+0.5436i 0.0890+0.2465i 0.0902+0.2177i 0.0875+0.2004i 0.7384+0.5400i;
27 28 0.9796+0.7164i 0.9724+0.7249i 0.9755+0.7212i 0.1181+0.3270i 0.1197+0.2889i 0.1161+0.2659i 0.9796+0.7164i;
28 29 0.3144+0.2299i 0.3120+0.2326i 0.3130+0.2314i 0.0379+0.1049i 0.0384+0.0927i 0.0373+0.0853i 0.3144+0.2299i;
28 30 0.1023+0.0749i 0.1016+0.0757i 0.1019+0.0754i 0.0123+0.0342i 0.0125+0.0302i 0.0121+0.0278i 0.1023+0.0749i;
30 31 1.7688+1.3081i 1.7688+1.3081i 1.7688+1.3081i 0 0 0 1.7688+1.3081i;
13 32 0 0 0 0 0 0 0 ;
32 33 2.6736+2.6686i 2.6476+2.7138i 2.6588+2.6942i 0.4202+1.1558i 0.4260+1.0030i 0.4132+0.9182i 2.6736+2.6686i;
2 6 0.0037+0.0027i 0.0036+0.0027i 0.0036+0.0027i 0.0004+0.0012i 0.0004+0.0011i 0.0004+0.0010i 0.0037+0.0027i;
4 9 0.0037+0.0027i 0.0036+0.0027i 0.0036+0.0027i 0.0004+0.0012i 0.0004+0.0011i 0.0004+0.0010i 0.0037+0.0027i;
8 13 0.0037+0.0027i 0.0036+0.0027i 0.0036+0.0027i 0.0004+0.0012i 0.0004+0.0011i 0.0004+0.0010i 0.0037+0.0027i;
11 30 0.0037+0.0027i 0.0036+0.0027i 0.0036+0.0027i 0.0004+0.0012i 0.0004+0.0011i 0.0004+0.0010i 0.0037+0.0027i;
19 28 0.0037+0.0027i 0.0036+0.0027i 0.0036+0.0027i 0.0004+0.0012i 0.0004+0.0011i 0.0004+0.0010i 0.0037+0.0027i;
];
% %------------------------------------------------------------------------------------------------------------------------------------------------------------------------
%%%%% Daily load profiles of three typical customer sectors.
Rl=[1.05 0.83 0.98 0.9 0.8 0.82 0.6 0.65 0.58 0.59 0.68 0.74 0.78 0.78 0.79 0.8 0.88 1.36 1.63 1.7 1.68 1.71 1.55 1.22];
Il=[0.88 0.85 0.85 0.83 0.82 0.82 0.83 0.94 1.16 1.16 1.18 1.15 0.96 1.19 1.17 1.15 1.05 1 1 1.02 1.02 0.99 0.95 0.9];
Cl=[0.5 0.48 0.48 0.45 0.45 0.5 0.55 1.17 1.5 1.55 1.59 1.6 1.45 1.5 1.51 1.5 1.49 1.3 1 0.85 0.75 0.6 0.6 0.5];
%%以峰值为基准(有功)
RP=Rl/max(Rl);
IP=Il/max(Il);
CP=Cl/max(Cl);
%%以峰值为基准(无功)
% Rl=Rl*tan(acos(0.95));
% Il=Il*tan(acos(0.85));
% Cl=Cl*tan(acos(0.9));
% RQ=Rl/max(Rl);
% IQ=Il/max(Il);
% CQ=Cl/max(Cl);
%%%%% 三种负荷在各节点中的比例.1、2、3 分别表示商业、居民和工业负荷
RICp=[0.3 0.4 0.3; 0.2 0.5 0.3; 0.5 0.3 0.2;0.5 0.2 0.3;0.6 0.1 0.3;0.4 0.4 0.2;0.6 0 0.4;0.3 0.3 0.4;0.4 0.6 0;0.3 0 0.7;
0.6 0.2 0.2;0.5 0.5 0;0.6 0.4 0;0.4 0.4 0.2;0.5 0.1 0.4;0.2 0.7 0.1;0.3 0.3 0.4;0.4 0.5 0.1;0.5 0.2 0.3;0.7 0.3 0;
0.5 0.3 0.2;0.3 0 0.7; 0.5 0.4 0.1;0.4 0.5 0.1;0.6 0.4 0;0.7 0.3 0;0.1 0 0.9;0.6 0.3 0.1;0.4 0.1 0.5;0.7 0.2 0.1;
0.4 0.4 0.2;0.2 0.1 0.7;0.3 0.7 0];
% RICl=[Rl;Il;Cl];
RICP=[CP;RP;IP];
RICPp= RICp*RICP; %33*24
% RICQ=[CQ;RQ;IQ];
% RICQp= RICp*RICQ; %33*24
%%%初始时段节点功率信息:三相负荷采样数据(kW) 33*3
Busl{1}=[0 83.5885 54.1653; 0 51.7621 41.3857;56.4479 74.3268 65.8521;70.1321 66.5257 87.7068; 67.5830 45.4374 0;
102.8724 83.7232 67.4292; 0 49.7123 0; 0 66.1751 0;0 0 35.4929;43.8295 0 0;
72.8796 81.7878 96.1757;63.3237 56.4866 44.7257;59.1474 56.1288 0 ;56.4873 85.8456 68.9349;74.3676 74.2395 85.9734 ;
0 72.6754 63.2086;0 54.2931 0;50.8787 51.7596 0;0 73.0249 0;0 49.4106 0;
71.9222 0 0; 60.4192 0 0;47.0796 0 0; 0 62.6244 0;71.1889 0 0;
0 66.2078 45.5859;89.9806 72.1197 56.0245;61.9570 73.2844 0; 69.7396 69.4317 73.3830;99.8649 79.7141 52.9727;
55.4998 93.7000 70.5078; 0 0 0;94.8887 96.8714 64.7893];
%构造其它时段节点各相数据
% % IEEE34节点网络一天的三相负荷采样数据(kW):节点-采样时间t时刻A相负荷B相负荷C相负荷 如1点ABC表示凌晨1点时各个节点三相负荷
% IData.Busload %-节点--24h-1点ABC-2点ABC-.......-24点ABC-----------------------------------
IData.Busload=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33]';
IData.Busload=[IData.Busload Busl{1}];
MBus=(Busl{1}>0);%得节点相型
SumBusl1=sum(Busl{1},2);
for i=2:24
SumBusli=SumBusl1.*RICPp(:,i)./RICPp(:,1); %各时段各节点各相总负荷
R=(5+rand(33,3)).*MBus;%产生5.5左右较为平均的随机数
SPBusp3=sum(R,2);
for j=1:33
if SPBusp3(j)>0;
PBusp3(j,:)=R(j,:)/SPBusp3(j);%得各相负荷比例
else
PBusp3(j,:)=[0 0 0];
end
Busl{i}(j,:)=SumBusli(j)*PBusp3(j,:);
end
IData.Busload= [IData.Busload Busl{i}];
end
%------------------------------------------------------------------------------------------------------------------------------------------------------------------------
% IEEE34节点负荷类型:节点---负荷连接类型---单相负荷/两相负荷
% IData.BusStyle=...
% [ 1 1 2;
% 2 1 2;
% 3 0 0;
% 4 0 0;
% 5 0 0;
% 6 0 0;
% 7 2 1;
% 8 2 1;
% 9 3 1;
% 10 1 1;
% 11 0 0;
% 12 0 0;
% 13 0 0;
% 14 0 0;
% 15 0 0;
% 16 1 2;
% 17 0 0;
% 18 3 2;
% 19 0 0;
% 20 2 1;
% 21 1 1;
% 22 1 1;
% 23 1 1;
% 24 2 1;
% 25 1 1;
% 26 1 2;
% 27 0 0;
% 28 0 0;
% 29 0 0
% 30 0 0;
% 31 0 0;
% 32 0 0;
% 33 0 0;
% ];
% %环网支路信息
IData.ringBranches{1} = [3,4,5,6,34];
IData.ringBranches{2} = [5,6,7,8,9,35];
IData.ringBranches{3}= [9,10,11,12,13,36];
IData.ringBranches{4} = [12,13,14,15,27,28,30,37];
IData.ringBranches{5} = [28,27,16,17,18,19,38];
[1]程远林, 李茂军. 基于改进单亲遗传算法的多目标配电网重构[C]// 中国高等学校电力系统及其自动化专业第二十二届学术年会. 河海大学, 2006.
[2]何伟强, 孙中伟, 赵康. 基于改进遗传算法的多目标配电网重构[J]. 中国电力教育, 2010(A01):3.
❤️ 关注我领取海量matlab电子书和数学建模资料
❤️部分理论引用网络文献,若有侵权联系博主删除