目錄
??1 概述
1.1?功率損耗
?編輯1.2?電壓質(zhì)量
1.3 DG總?cè)萘?/p>
??2 運行結(jié)果
??3 Matlab代碼實現(xiàn)
??4?參考文獻
??1 概述
參考文獻:
本文采用的是換一個算法解決,?基于基于多目標粒子群算法分布式電源選址定容規(guī)劃研究。
將可再生能源的分布式發(fā)電技術(shù)與大電網(wǎng)結(jié) 合,是 普 遍 公認的節(jié)能減排、綠色 環(huán) 保、安全可靠的電力系統(tǒng)運行方式, 是電力發(fā)展的方向。分布式電源(DG)是指在一定的地域范圍內(nèi),以分散方式布置在用戶附近, 與環(huán)境兼容的小型模塊化發(fā)電單元,其發(fā)電功率為幾千瓦到 幾十兆瓦。
分布式發(fā)電系統(tǒng)目前大多與配電網(wǎng)并網(wǎng)運行。DG 入 電 網(wǎng)后,會對配電網(wǎng)的潮流分布產(chǎn)生影響,進而可以優(yōu)化配電網(wǎng) 絡,緩解配電網(wǎng)輸 配 用 電 壓 力。但 是 由 于 DG 的 投 入 和 退出有很大的隨 機 性,且輸出功率的穩(wěn)定性易受環(huán)境影響,因此,DG的不當接入會對電網(wǎng)產(chǎn)生諸多負面影響,如 影 響 配 電網(wǎng)的穩(wěn)定性及電壓質(zhì)量,產(chǎn) 生 諧 波 等。這 些 影 響 的 大 小 與DG的容量和接入位置有很大關(guān),因此,DG 的選址定容是在 DG規(guī)劃階段中需要考慮的重點問題。
由于規(guī)劃的優(yōu)化目標較為單一,傳 統(tǒng) 的 規(guī) 劃 方 法 無 法 很 好地解決這一問題。近 年 來,考 慮 電 壓、電流質(zhì)量和環(huán)境等因素的多目標優(yōu)化迅速發(fā)展,但量綱的不統(tǒng)一,使得求解的復雜性大大提高,給多目標優(yōu)化提出了新的挑戰(zhàn)。本文在 研究標準粒子群優(yōu)化算法的基礎(chǔ)上,針 對 配 電 網(wǎng) 中 DG 的 選址定容問題,建立了包括有功率損耗、電壓質(zhì)量及接入 DG 的總?cè)萘繛槟繕撕瘮?shù)的數(shù)學模型,基于多目標粒子群算法分布式電源選址定容規(guī)劃研究,用Matlab解決之。
1.1?功率損耗
電能在從發(fā)電端傳輸?shù)截撦d端的過程中,輸電線路上產(chǎn)生的電能損耗不可址 見,只議r地減小有功功率損耗,提理地配置配電網(wǎng)中的 DG,可以有效地減小有功功率損耗,提高發(fā)電利用率,節(jié)約能量?;谟泄β蕮p耗的目標函數(shù)最優(yōu)數(shù)學表達式為:
1.2?電壓質(zhì)量
?某些狀況下,電力系統(tǒng)在遭受干擾后的幾秒或幾分鐘內(nèi),系統(tǒng)中的某些母線電壓可能經(jīng)歷大幅度﹑持續(xù)性降低,從而使得系統(tǒng)的完整性遭到破壞,功率不能正常地傳送給用戶。這種災變稱為系統(tǒng)電壓不穩(wěn)定﹐其災難后果則是電壓崩潰。通常用靜態(tài)電壓穩(wěn)定指標來表示系統(tǒng)電壓穩(wěn)定性。配電網(wǎng)中電
壓質(zhì)量受配電系統(tǒng)的電壓穩(wěn)定性影呵。今乂術(shù)用能T網(wǎng)P電壓基于期望電壓的方差來描述電壓質(zhì)量?;陔妷嘿|(zhì)量的目標函數(shù)最優(yōu)數(shù)學表達式為:
1.3 DG總?cè)萘?/h4>
在實際應用中不僅要考慮改善電網(wǎng)帶來的經(jīng)濟效應,還需要考慮DG安裝、運行和維護的成本費用問題。本文中不涉及經(jīng)濟模型,僅考慮接入配電網(wǎng)的DG總?cè)萘??;贒G總?cè)萘康哪繕撕瘮?shù)最優(yōu)數(shù)學表達式為:
??2 運行結(jié)果
??3 Matlab代碼實現(xiàn)
部分代碼:
%% 雅可比矩陣
J=[jpt jpv; jqt jqv];
X = (inv(J))*M;%偏差
%% 相位偏差
dTh = X(1:nbus-1);
%% 電壓偏差
dV = X(nbus:end);
[e1,d1,n1]=eig(JR);%計算矩陣A的特征值和特征向量的函數(shù)是eig(A)[V,D,W] = eig(A),[V,D,W] = eig(A)返回滿矩陣 W,其列是對應的左特征向量,使得 W’A = DW’。
%diag(A),若A是一個矩陣,則diag函數(shù)的作用是產(chǎn)生提取矩陣的對角線;若a是一個向量,則diag函數(shù)的作用是產(chǎn)生一個對角線為a的矩陣
%% 目標2 電壓穩(wěn)定性
f2val=max(1./diag((d1)))*max(abs(dQ));%目標2,穩(wěn)定性
del(2:nbus) = dTh + del(2:nbus);
k = 1;
for i = 2:nbus
? ? if type(i) == 3
? ? ? ? V(i) = dV(k) + V(i);
? ? ? ? k = k+1;
? ? end
end
%% 目標2和目標3
tval=sum(1./diag((d1)));
po_val=flow_cal(nbus,V,del,BMva);
f1val=sum(po_val);%各支路網(wǎng)損和
f3val=sum(datain(5:8));%DG容量和
fout=[f1val; f2val; f3val];
for i = 1 : N
? ? % Number of individuals that dominate this individual
? ? individual(i).n = 0;
? ? % Individuals which this individual dominate
? ? individual(i).p = [];
? ? for j = 1 : N
? ? ? ? dom_less = 0;
? ? ? ? dom_equal = 0;
? ? ? ? dom_more = 0;
? ? ? ? for k = 1 : M
? ? ? ? ? ? if (x(i,V + k) < x(j,V + k))
? ? ? ? ? ? ? ? dom_less = dom_less + 1;
? ? ? ? ? ? elseif (x(i,V + k) == x(j,V + k))
? ? ? ? ? ? ? ? dom_equal = dom_equal + 1;
? ? ? ? ? ? else
? ? ? ? ? ? ? ? dom_more = dom_more + 1;
? ? ? ? ? ? end
? ? ? ? end
? ? ? ? if dom_less == 0 && dom_equal ~= M ? %大于等于的情況
? ? ? ? ? ? individual(i).n = individual(i).n + 1;
? ? ? ? elseif dom_more == 0 && dom_equal ~= M ? %小于等于的情況
? ? ? ? ? ? individual(i).p = [individual(i).p j];
? ? ? ? end
? ? end ??
? ? if individual(i).n == 0
? ? ? ? x(i,M + V + 1) = 1;
? ? ? ? F(front).f = [F(front).f i];
? ? end
end
% Find the subsequent fronts
while ~isempty(F(front).f)
? ?Q = [];
? ?for i = 1 : length(F(front).f)
? ? ? ?if ~isempty(individual(F(front).f(i)).p)
? ? ? ? ? for j = 1 : length(individual(F(front).f(i)).p)
? ? ? ? ? ? ? individual(individual(F(front).f(i)).p(j)).n = ...
? ? ? ? ? ? ? ? ? individual(individual(F(front).f(i)).p(j)).n - 1;
? ? ? ? ? ? ? ?if individual(individual(F(front).f(i)).p(j)).n == 0
? ? ? ? ? ? ? ? ? ?x(individual(F(front).f(i)).p(j),M + V + 1) = ...
? ? ? ? ? ? ? ? ? ? ? ? front + 1;
? ? ? ? ? ? ? ? ? ? Q = [Q individual(F(front).f(i)).p(j)];
? ? ? ? ? ? ? ? end
? ? ? ? ? ? end
? ? ? ?end
? ?end
? ?front = ?front + 1;
? ?F(front).f = Q;
end
[temp,index_of_fronts] = sort(x(:,M + V + 1));
for i = 1 : length(index_of_fronts)
? ? sorted_based_on_front(i,:) = x(index_of_fronts(i),:);
end
current_index = 0;
%% Crowding distance
%The crowing distance is calculated as below
% ?For each front Fi, n is the number of individuals.
% ? ?initialize the distance to be zero for all the individuals i.e. Fi(dj ) = 0,
% ? ? where j corresponds to the jth individual in front Fi.
% ? ?for each objective function m
% ? ? ? * Sort the individuals in front Fi based on objective m i.e. I =
% ? ? ? ? sort(Fi,m).
% ? ? ? * Assign infinite distance to boundary values for each individual
% ? ? ? ? in Fi i.e. I(d1) = ? and I(dn) = ?
% ? ? ? * for k = 2 to (n ? 1)
% ? ? ? ? ? ?I(dk) = I(dk) + (I(k + 1).m ? I(k ? 1).m)/fmax(m) - fmin(m)
% ? ? ? ? ? ?I(k).m is the value of the mth objective function of the kth
% ? ? ? ? ? ? individual in I
% Find the crowding distance for each individual in each front
for front = 1 : (length(F) - 1)
% ? ?objective = [];
? ? distance = 0;
? ? y = [];
? ? previous_index = current_index + 1;
? ? for i = 1 : length(F(front).f)
? ? ? ? y(i,:) = sorted_based_on_front(current_index + i,:);
? ? end
? ? current_index = current_index + i;
? ? % Sort each individual based on the objective
? ? sorted_based_on_objective = [];
? ? for i = 1 : M
? ? ? ? [sorted_based_on_objective, index_of_objectives] = ...
? ? ? ? ? ? sort(y(:,V + i));
? ? ? ? sorted_based_on_objective = [];
? ? ? ? for j = 1 : length(index_of_objectives)
? ? ? ? ? ? sorted_based_on_objective(j,:) = y(index_of_objectives(j),:);
? ? ? ? end
? ? ? ? f_max = ...
? ? ? ? ? ? sorted_based_on_objective(length(index_of_objectives), V + i);
? ? ? ? f_min = sorted_based_on_objective(1, V + i);
? ? ? ? y(index_of_objectives(length(index_of_objectives)),M + V + 1 + i)...
? ? ? ? ? ? = Inf;
? ? ? ? y(index_of_objectives(1),M + V + 1 + i) = Inf;
? ? ? ? ?for j = 2 : length(index_of_objectives) - 1
? ? ? ? ? ? next_obj ?= sorted_based_on_objective(j + 1,V + i);
? ? ? ? ? ? previous_obj ?= sorted_based_on_objective(j - 1,V + i);
? ? ? ? ? ? if (f_max - f_min == 0)
? ? ? ? ? ? ? ? y(index_of_objectives(j),M + V + 1 + i) = Inf;
? ? ? ? ? ? else
? ? ? ? ? ? ? ? y(index_of_objectives(j),M + V + 1 + i) = ...
? ? ? ? ? ? ? ? ? ? ?(next_obj - previous_obj)/(f_max - f_min);
? ? ? ? ? ? end
? ? ? ? ?end
? ? end
? ? distance = [];
? ? distance(:,1) = zeros(length(F(front).f),1);
? ? for i = 1 : M
? ? ? ? distance(:,1) = distance(:,1) + y(:,M + V + 1 + i);
? ? end
? ? y(:,M + V + 2) = distance;
? ? y = y(:,1 : M + V + 2);
? ? z(previous_index:current_index,:) = y;
end
f = z();
??4?參考文獻
部分理論來源于網(wǎng)絡,如有侵權(quán)請聯(lián)系刪除。
[1]周洋,許維勝,王寧,邵煒暉.基于改進粒子群算法的多目標分布式電源選址定容規(guī)劃[J].計算機科學,2015,42(S2):16-18+31.?
[2]馮元元. 基于多目標規(guī)劃的分布式發(fā)電選址定容研究[D].華北電力大學,2015.??文章來源:http://www.zghlxwxcb.cn/news/detail-617893.html
[3]楊智君. 基于群智能算法的分布式電源選址與定容[D].太原科技大學,2019.DOI:10.27721/d.cnki.gyzjc.2019.000065.文章來源地址http://www.zghlxwxcb.cn/news/detail-617893.html
到了這里,關(guān)于【分布式能源的選址與定容】基于多目標粒子群算法分布式電源選址定容規(guī)劃研究(Matlab代碼實現(xiàn))的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!