1. Software version

matlab2013b

2. Theoretical knowledge of this algorithm

In a medium and long-term power grid planning , The objective function to be considered can be considered as the minimum value of the sum of the annual investment cost of the new power grid line and the operation cost of the power grid system , The optimal solution of the problem is to meet the minimum objective value and the constraint requirements of power grid operation . According to this principle , Firstly, the objective function of any year is given as :

      

         In the formula , Represents a collection of new lines ; Represents a collection of all lines ;W Represents the total planning cost ; Represents the fund recovery factor ; Represents the fixed operating rate of the project ;
Indicates the line loss cost coefficient ; Represents the power grid branch i The cost of extending a new line ; Represents the power grid branch i Expand the number of new lines ; Represents a branch i Resistance of ;
Represents a branch i Annual loss hours of electric energy ; Indicates the branch under normal operation i Transmitted active power of .

 

 

 

         In a medium and long-term power grid planning , Cost per year needs to be considered , Then the total cost of power grid planning is the sum of the total cost of new lines and the operating costs over the years , Then the objective function in the formula can be rewritten as :

 

 

        formula 3.3 in ,X Represents the total cost of the entire new line , Equivalent to formula 3.1 First item of ;
Represents the operating cost of the grid system in the first year , Equivalent to formula 3.2 Second item of ;i Represents the discount rate ;K Is the fund recovery coefficient , It can be calculated . Then the optimization objective function of medium and long-term power grid planning can be defined as :

3. Some core codes

 
clc; clear; close all; warning off; addpath 'func\' addpath 'GA_toolbox\'
rng(1); % number NO = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]'; % Line head end number START =
[1,1,1,1,1,2,2,2,2,3,3,3,4,4,5]'; % Line end number ENDS =
[2,3,4,5,6,3,4,5,6,4,5,6,5,6,6]'; % Branch reactance ZDK =
[40,50,60,20,10,20,20,40,20,20,30,48,30,20,10]'; % Capacity limit Vmax =
[100,100,80,100,70,100,100,100,100,82,100,100,75,100,78]'; % Line length Len =
[40,38,60,20,68,20,40,31,30,59,20,48,63,30,61]'; % Reactance DZ =
[0.1,0.09,0.15,0.05,0.17,0.05,0.1,0.08,0.08,0.15,0.05,0.12,0.16,0.08,0.15]';
% Reactance DK = [0.4,0.38,0.6,0.2,0.68,0.2,0.4,0.31,0.3,0.59,0.2,0.48,0.63,0.3,0.61]';
tmps =[NO,START,ENDS,ZDK,Vmax,Len,DZ,DK]; % arrangement IEEE6
=[tmps([1,3,4,6,7,11],:);tmps([9,11,14],:)]; % Initial line Nline =[1,1,1,1,1,1,0,0,0];
% Initial adjacency matrix Connect=[0 1 0 1 1 0; 1 0 1 1 0 0; 0 1 0 0 1 0; 1 1 0 0 0 0; 1 0 1 0 0
0; 0 0 0 0 0 0]; % Injected power of each node P = [-30,-240,125,-160,-240]'; % Number of nodes N = 6; tic;
% Defining genetic algorithm parameters % Population size NIND = 1000; % Iterations MAXGEN = 200; Price = zeros(MAXGEN,1); % Base vector
BaseV = 5*ones(1,length(Nline)); Chrom = crtbp(20,BaseV); gen = 0; % Initial population function value
ObjV = func_obj(Chrom,IEEE6,Nline,Connect,P,N); df = 1000; while gen< MAXGEN
gen if gen == 0 Pe = 0.92; else Pe = 1/(1+exp(-df/10)); end gen = gen+1; FitnV
= ranking(ObjV); % choice SelCh = select('sus',Chrom,FitnV); SelCh =
recombin('xovmp',SelCh,Pe); % recombination f =
[zeros(1,length(Nline));5*ones(1,length(Nline))]; % variation SelCh = mutbga(SelCh,f);
SelCh = fix(SelCh); ObjV2 = func_obj(SelCh,IEEE6,Nline,Connect,P,N);
[Chrom,ObjV] = reins(Chrom,SelCh,1,1,ObjV,ObjV2); indx = find(isnan(ObjV) ==
1); ObjV3 = ObjV; ObjV3(indx) = []; Price(gen) = min(ObjV3); if gen > 1 df =
abs(Price(gen) - Price(gen-1)); end end [Y,I] = min(ObjV); % plan Net_new =
Chrom(I,:); Net_new Y figure; plot(Price,'b','linewidth',2); grid on
xlabel('Iteration times'); ylabel('Total cost'); toc; save R2.mat Price
4. Simulation conclusion

 

 

5. reference

[01]Valenzuela  Jorge,  Wang  Jianhui.  A  probabilistic  model  for 
assessing  the  long-term economics of wind energy. Electric power systems
research, 2011, 81(4): 853~861.

[02]C.W.Fu, T. T.Nguyen. Models for Long-Term Energy Forecasting[J].IEEE
Power  Engineering  Society  General  Meeting,2003,13-17  July, Volume 
1:235.239.

[03] Gujindi , Wuxupeng et al . Study on reliability evaluation of transmission network planning scheme [J]. East China Power ,2010,38(12):184-187.

A06-48

6. How to obtain complete source code

mode 1: Wechat or QQ Contact bloggers
mode 2: subscribe , Free access to tutorial case code and any 2 Complete source code

 

 

 

Technology