【配电网重构】基于遗传算法求解实现配电网故障恢复和故障重构问题附Matlab代码
1 簡介
隨著我國社會經(jīng)濟的發(fā)展和人民的生活質(zhì)量日益提高,用戶對電能質(zhì)量的要求也在不斷的提高。作為配電系統(tǒng),其直接面向用戶,所以配電系統(tǒng)的安全可靠性問題已經(jīng)影響到用戶的需求,越來越受到電力部門的關(guān)注和重視。而其中的配電網(wǎng)供電恢復(fù)是系統(tǒng)恢復(fù)中的重要問題。因此,配電網(wǎng)故障恢復(fù)策略的制定尤為重要,像過去一樣單憑個人的經(jīng)驗已經(jīng)不能很好地管理和重構(gòu)現(xiàn)代化的配電系統(tǒng),于是配電網(wǎng)的自動化被提到一個很重要的位置。近年來,隨著通信手段和計算機技術(shù)的發(fā)展,使得配電網(wǎng)故障恢復(fù)策略研究有了長足的發(fā)展,也使得各種算法在配電網(wǎng)中得以應(yīng)用和研究。?本課題研究的目的是在原有的配電網(wǎng)故障恢復(fù)策略算法上進行改進,提出最大化搜尋可行性解的策略,提高算法效率,更有利于為操作員或者系統(tǒng)給出具有參考價值的算法結(jié)果進行開關(guān)操作,提高操作的效率,切除故障和恢復(fù)供電的時間比以前縮短了,供電可靠性也得到提高。?
2 部分代碼
function show_tuopu(a)
S=transform(a);
zhilu=ones(1,37);
for k=1:37? ? ? ? ? ? ?%zhilu中存放閉合的32條支路
? ? if k==S(1)
? ? ? ?zhilu(k)=0;
? ? end
? ? if k==S(2)
? ? ? ?zhilu(k)=0;
? ? end
? ? if k==S(3)
? ? ? ?zhilu(k)=0;
? ? end
? ? if k==S(4)
? ? ? ?zhilu(k)=0;
? ? end
? ? if k==S(5)
? ? ? ?zhilu(k)=0;
? ? end
end
Branch_data = [
? ? 1? 0? ?1? ?0.0922? 0.0470;
? ? 2? 1? ?2? ?0.4930? 0.2511;
? ? 3? 2? ?3? ?0.3660? 0.1864;
? ? 4? 3? ?4? ?0.3811? 0.1941;
? ? 5? 4? ?5? ?0.8190? 0.7070;
? ? 6? 5? ?6? ?0.1872? 0.6188;
? ? 7? 6? ?7? ?0.7114? 0.2351;
? ? 8? 7? ?8? ?1.0300? 0.7400;
? ? 9? 8? ?9? 1.0440? 0.7400;
? ? 10 9? ?10? 0.1966? 0.0650;
? ? 11 10? 11? 0.3744? 0.1238;
? ? 12 11? 12? 1.4680? 1.1550;
? ? 13 12? 13? 0.5416? 0.7129;
? ? 14 13? 14? 0.5910? 0.5260;
? ? 15 14? 15? 0.7463? 0.5450;
? ? 16 15? 16? 1.2890? 1.7210;
? ? 17 16? 17? 0.7320? 0.5740;
? ? 18 1? ?18? 0.1640? 0.1565;
? ? 19 18? 19? 1.5042? 1.3554;
? ? 20 19? 20? 0.4095? 0.4784;
? ? 21 20? 21? 0.7089? 0.9373;
? ? 22 2? ?22? 0.4512? 0.3083;
? ? 23 22? 23? 0.8980? 0.7091;
? ? 24 23? 24? 0.8960? 0.7011;
? ? 25 5? ?25? 0.2030? 0.1034;
? ? 26 25? 26? 0.2842? 0.1447;
? ? 27 26? 27? 1.0590? 0.9337;
? ? 28 27? 28? 0.8042? 0.7006;
? ? 29 28? 29? 0.5075? 0.2585;
? ? 30 29? 30? 0.9744? 0.9630;
? ? 31 30? 31? 0.3105? 0.3619;
? ? 32 31? 32? 0.3410? 0.5302;
? ? 33 7? ?20? 2? ? ? ?2;
? ? 34 8? ?14? 2? ? ? ?2;
? ? 35 11? 21? 2? ? ? ?2;
? ? 36 17? 32? 0.5? ? ?0.5;
? ? 37 24? 28? 0.5? ? ?0.5;
];?
Bitlength=size(zhilu,2);?
%繪制閉合回路
A=zeros(33,33);%非對角元素為1表明兩節(jié)點相連
for k=1:Bitlength
?if zhilu(1,k)==1
? ? ?A(Branch_data(k,2)+1,Branch_data(k,3)+1)=1;?
? ? ?A(Branch_data(k,3)+1,Branch_data(k,2)+1)=1;?
?end
end
B=[1,3;2,3;3,3;4,3;5,3;6,3;7,3;8,3;9,3;10,3.3;11,3.3;12,3.3;13,3.3;14,3.3;15,3;16,3;17,3;18.2,3;2,3.9;3,3.9;4,3.9;5,3.9;3,1.1;4,1.1;5,1.1;6,2;7,2;8,2;9,2;10,2;11,2;12,2;13,2;];? %存放各節(jié)點位置??
%subplot(2,2,ii);
gplot(A,B,'-*');
hold on
%在此基礎(chǔ)上繪制關(guān)斷支路
A1=zeros(33,33);
for k=1:Bitlength
?if zhilu(1,k)==0
? ? ?A1(Branch_data(k,2)+1,Branch_data(k,3)+1)=1;?
? ? ?A1(Branch_data(k,3)+1,Branch_data(k,2)+1)=1;?
?end
end
B=[1,3;2,3;3,3;4,3;5,3;6,3;7,3;8,3;9,3;10,3.3;11,3.3;12,3.3;13,3.3;14,3.3;15,3;16,3;17,3;18.2,3;2,3.9;3,3.9;4,3.9;5,3.9;3,1.1;4,1.1;5,1.1;6,2;7,2;8,2;9,2;10,2;11,2;12,2;13,2;];? %存放各節(jié)點位置??
%subplot(2,2,ii);
gplot(A1,B,'--*');
hold off
%title('配電網(wǎng)拓?fù)浣Y(jié)構(gòu)圖');
%顯示節(jié)點編號
text(1,3.1,'0');
text(2,3.1,'1');
text(3,3.1,'2');
text(4,3.1,'3');
text(5,3.1,'4');
text(6,3.1,'5');
text(7,3.1,'6');
text(8,3.1,'7');
text(9,3.1,'8');
text(10,3.1,'9');
text(11,3.1,'10');
text(12,3.1,'11');
text(13,3.1,'12');
text(14,3.1,'13');
text(15,3.1,'14');
text(16,3.1,'15');
text(17,3.1,'16');
text(17.8,3.1,'17');
text(2,3.8,'18');
text(3,3.8,'19');
text(4,3.8,'20');
text(5,3.8,'21');
text(3,1.2,'22');
text(4,1.2,'23');
text(5,1.2,'24');
text(6,2.1,'25');
text(7,2.1,'26');
text(8,2.1,'27');
text(9,2.1,'28');
text(10,2.1,'29');
text(11,2.1,'30');
text(12,2.1,'31');
text(13,2.1,'32');
%顯示支路
text(1.5,2.9,'1','color','r');
text(2.5,2.9,'2','color','r');
text(3.5,2.9,'3','color','r');
text(4.5,2.9,'4','color','r');
text(5.5,2.9,'5','color','r');
text(6.5,2.9,'6','color','r');
text(7.5,2.9,'7','color','r');
text(8.5,2.9,'8','color','r');
text(9.5,3.2,'9','color','r');
text(10.5,3.2,'10','color','r');
text(11.5,3.2,'11','color','r');
text(12.5,3.2,'12','color','r');
text(13.5,3.2,'13','color','r');
text(14.5,3.2,'14','color','r');
text(15.5,2.9,'15','color','r');
text(16.5,2.9,'16','color','r');
text(17.5,2.9,'17','color','r');
text(1.8,3.5,'18','color','r');
text(2.5,3.7,'19','color','r');? ?
text(3.5,3.7,'20','color','r');
text(4.5,3.7,'21','color','r');
text(2.8,1.5,'22','color','r');
text(3.5,1.3,'23','color','r');
text(4.5,1.3,'24','color','r');
text(5.8,2.5,'25','color','r');
text(6.5,1.9,'26','color','r');
text(7.5,1.9,'27','color','r');
text(8.5,1.9,'28','color','r');
text(9.5,1.9,'29','color','r');
text(10.5,1.9,'30','color','r');
text(11.5,1.9,'31','color','r');
text(12.5,1.9,'32','color','r');
text(4.5,3.5,'33','color','r');
text(12,2.8,'34','color','r');
text(9,3.5,'35','color','r');
text(16,2.1,'36','color','r');
text(6.5,1.5,'37','color','r');
%去除xy軸刻度
set(gca,'xtick',[],'xticklabel',[]);
set(gca,'ytick',[],'yticklabel',[]);
title('case 2');
legend('Closed switch','Open switch');
end
3 仿真結(jié)果
4 參考文獻
[1]李旭前, 李明莉. 基于遺傳算法的配電網(wǎng)故障恢復(fù)[J]. 云南電力技術(shù), 2011, 39(5):3.
博主簡介:擅長智能優(yōu)化算法、神經(jīng)網(wǎng)絡(luò)預(yù)測、信號處理、元胞自動機、圖像處理、路徑規(guī)劃、無人機等多種領(lǐng)域的Matlab仿真,相關(guān)matlab代碼問題可私信交流。
部分理論引用網(wǎng)絡(luò)文獻,若有侵權(quán)聯(lián)系博主刪除。
總結(jié)
以上是生活随笔為你收集整理的【配电网重构】基于遗传算法求解实现配电网故障恢复和故障重构问题附Matlab代码的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Xshell连接ubuntu后,在vim
- 下一篇: 输入一行字符,编程统计其中有多少个单词。