随着大规模,跨区域的配电网不断发展,对配电网运行的经济性和可靠性要求越来越高,在配电网发生大范围停电事故后,需要对配电网的拓扑结构进行重新组合,从而达到恢复供电的目的,这个重新组合配电网拓扑结构的过程即为配电网恢复重构.配电网恢复重构是一个多目标非线性组合优化问题,智能优化算法被认为是当前最有效的求解方法. 本文选用了粒子群算法作为求解配电网恢复重构问题的智能优化算法.首先通过分析配电网恢复重构和优化重构的不同之处,建立了以负荷恢复最大化为重构目标的配电网恢复重构数学模型,并将离散的二进制粒子群算法应用于配电网恢复重构.
%function main()
clear;
clc;
tic;
numberofRuns = 1; %number of trials per experiment
psoOptions = get_psoOptions;
psoOptions.Vars.ErrGoal = 1e-4; %最小误差
LL=5; %联络开关数
% Parameters common across all functions
psoOptions.SParams.c1 = 0.02; %边界参数
psoOptions.SParams.w_beta = 0.5; %初始化beta值
% Run experiments for the three complex functions
psoOptions.Obj.f2eval = 'fitness_cgfcPQV';
psoOptions.Obj.lb = ones(1,LL); %初始化下限
%psoOptions.Obj.lb = ones(1,32);
psoOptions.Obj.ub = [10 7 15 21 11]; %初始化上限 %通过运行程序maxswarmmin得到的结果
%psoOptions.Obj.ub = 20*ones(1,32);
%psoOptions.Obj.ub(1,1:5)=4;
psoOptions.SParams.Xmax =psoOptions.Obj.ub; %最大限制位置
%-----------------------------------------------------------%
%--Run Experiments for different dimensions and SwarmSizes--%
%-----------------------------------------------------------%
DimIters = [5; ... %Dimensions维数
300]; %Corresponding iterations迭代次数
x = DimIters;
psoOptions.Vars.Dim = x(1,:);
psoOptions.Vars.Iterations = x(2,:);
swarmsize = [50] %种群规模
psoOptions.Vars.SwarmSize = swarmsize;
disp(sprintf('This experiment will optimize %s function for %d times.', psoOptions.Obj.f2eval, numberofRuns));
disp(sprintf('Population Size: %d\t\tDimensions: %d.', psoOptions.Vars.SwarmSize, psoOptions.Vars.Dim));
temp = 5e6;
fVal = 0;
for i = 1:numberofRuns %程序运行numberofRuns次
[tfxmin, xmin,PBest,fPBest, tHistory] = QPSO(psoOptions);
fVal(:,i)=tfxmin;
if temp>tfxmin
temp=tfxmin;
record=tHistory;
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
toc;
disp(sprintf('\nminxfmin= \t\t%2.10g',temp)); %最优函数适应值
xmin %优化的开关组合
fPBest %备选开关组合函数适应值
PBest %备选开关组合(用于在哪个开关失灵情况下,采用备选方案,更加符合实际情况)
a=fbm(xmin)
sumall=0;
for i = 1:numberofRuns
if fVal(i)<100
sumall=sumall+1;
end
end
pre=sumall/numberofRuns
Avg = sum(fVal)/numberofRuns;
disp(sprintf('\nAvg. \t\t%2.10g\n\n', Avg)) %平均值
[fploss,fustab]=powflow(a) %根据运行结果调用潮流函数,求得运行处的网损与节点电压稳定性值
[1]彭伊伊. 基于粒子群算法的配电网恢复重构的研究. 华中科技大学, 2012.
部分理论引用网络文献,若有侵权联系博主删除。