Determination of Optimal Size and Site of Distributed Generators using Particle Swarm Optimization Technique

DOI : 10.17577/IJERTV6IS010030

Download Full-Text PDF Cite this Publication

Text Only Version

Determination of Optimal Size and Site of Distributed Generators using Particle Swarm Optimization Technique

Debasish Choudhury

Testing and Commissioning Division Assam Electricity Grid Corporation Limited

Guwahati-781001, Assam, India

Abstract The problem of installation of DG units at proper location and sizing is of great importance. The placement of distributed generation (DG) at non-suitable places can result increasing in system losses, implying an increase in costs and therefore having an effect opposite to the desired. This paper introduces an optimal placement method in order to sizing and sitting of distributed generation in IEEE 30 bus mesh test system to improve of voltage profile, stability, reduction of power losses etc. The algorithm for optimization is Particle Swarm Optimization (PSO). Proposed objective function is the active power losses of the system and to test the feasibility of the

number of combinations is required, such as PSO [17] to get better solutions and improve convergence. In this work, PSO is implemented to solve placement and size of DG with the objective of minimizing power losses of meshed networks.


    The problem of finding the best location of DG can be formulated as a minimization of power losses with constraints, as shown in (1)


    proposed method, five cases of power increasing from 1 to 5 NL



    DGs are considered.

    Keywords Distributed Generation, Particle Swarm Optimization

    F K

    p (PLossj j1

    ) Kv



    VLIM ) N





      real power loss in the given line in MW.

      With the on-going expansion and the growth of industries in developing countries, the demand for electric power is increasing globally. This in turn forces a certain level of intricacy on the power system and that intricacy compounds with time; to the point where the power system face the inability to progress with ease due to introductions of new

      NL number of lines in the system.

      K p , Kv penalty factors.

      Equality Constraints:

      1. Active power balance in the network

        P (V , ) P P 0, for i 1,2,…, N

        transmission systems and construction of generating plants i

        gi di

        near load centre. As the system grows more complex and burdened with increasing load; various issues regarding cost, pollution, power quality and voltage stability takes centre stage. These problems can be solved/minimized by the introduction of Distributed Generation (DG). Distributed Generation (DG) can be defined as the system in which any type of electrical generating units (conventional or non- conventional sources of energy) of limited size which is

        Real power equations are


        Pi (V , ) Vi Vj (Gij Cos(i j ) Bij Sin(i j ))


      2. Reactive power balance in the network

      Qi (V , ) Qgi Qdi 0, for i NG1, NG2,…, N

      Reactive power flow equations are

      connected directly to the distribution network systems. It

      Q (V , ) V V (G Sin (

      ) B Cos( ))


      means DG consist the small generating units installed in i

      strategic points of allocations of the electric power system

      i j ij


      i j ij i j

      close to the load centers. Distributed generators can provide the consumers local demand (isolated way) as well as an

      where NG number of generator buses,

      N number of buses,

      incremental capacity to electric power system, (integrated way). Some researchers presented some power flow algorithms to find the optimal size of DG at each load bus [1], [2]. Several algorithms have been proposed to place DG such as particle swarm optimization [3][5], ant colony [6], optimal power flow [7], analytical methods [8], [9],

      evolutionary algorithm [10][13], simulated annealing [14] [16]. Meta heuristic algorithms are preferred when large

      Pi Qi Pd i Qd i Pgi

      active power injection into bus i, reactive power injection into bus i, active load on bus i,

      reactive load on bus i,

      active power generation on bus i,





      reactive power generation on bus

      magnitude of the voltage at ith bus, voltage phase angle of bus i,

      solution in the swarm. All particles fly through a multidimensional search space where each particle is adjusting its position according to its own experience and that of neighbors.


      Suppose X t denote the position vector of particle i in the

      multidimensional search space (i.e. X Rn , where n is the



      Gij jBij

      voltage phase angle of bus i elements of admittance matrix.

      dimension of X) at time step t, then the position of each particle is updated in the search space by




      X t 1 X t V t 1 .

      Inequality Constraints:

      1. Limits on real power generations:

        Therefore, in a PSO method, all particles are initiated randomly and evaluated to compute fitness together

        with finding the personal best (best value of each particle)


        P min

        Pgi Pgimax

        for i 1, 2,……, NG

        and global best (best value of particle in the entire swarm). After that a loop starts to find an optimum solution. In the

      2. Limits on reactive power generations:

        loop, first the particles velocity is updated by the personal and global bests, and then each particles position is updated


        Q min

        Qgi Qgimax

        for i 1, 2,……, NG

        by the current velocity. The loop is ended with a stopping criterion predetermined in advance. In this method the

      3. Limits on voltage generation:

        position of each particle is influenced by the best-fit particle


        V min


        V max

        for i 1, 2,……, N

        in the entire swarm. It uses a star social network topology where the social information obtained from all particles in the entire swarm. In this method each individual


      4. Line flow limits:

        particle, i [1,…., n]

        where n >1, has a current position in

        Pij < TLij

        Where TL thermal limit of the line

        1. sending end bus number

        2. receiving end bus number


    1. Overview

      Particle swarm optimization (PSO) is a population based stochastic optimization technique developed by Dr. Eberhart and Dr. Kennedy in 1995, inspired by social behavior of bird flocking or fish schooling.

      PSO is initialized by a population of random

      search space Xi, a current velocity, Vi, and a personal best position in search space, pbi, The personal best position, pbi, corresponds to the position in search space where particle i had the smallest/ largest value as determined by the objective function, considering a minimization/maximization problem. In addition, the position yielding the best value amongst all the personal best pbi is called the global best position which is denoted by gb. The following equations define how the personal and global best values are updated, respectively.

      Considering minimization problems, then the personal best position pbi at the next time step, t+1, where, t [0,…., n] is calculated as

      i i i i

      pb t+1 = pb t if f(X t+1) > pb t+1

      = pb t if f(X t+1) pb t+1

      solutions and potential solution is asigned a randomized velocity. The potential solutions, called particles, are then flown through the problem space. Each particle keeps track of its coordinates in the problem space, which are associated with the best solution or fitness achieved so far. The fitness value is stored and it is called as pbest. Another value that is tracked by the global version of the particle swarm optimizer is the overall best value, and its location, obtain so far by any particle in population and this value is called gbest. Thus at each time step, the particle changes its velocity and moves toward its pbest and gbest; this is global version of PSO.

    2. Mathematical Form

      Consider the global optimum of an n-dimensional function defined by

      f (x1, x2, x3, .., xn)= f(X)

      where xi is the search variable, which represents the set of free variables of the given function. The aim is to find a value x* such that the function f(x*) is either a maximum or a minimum in the search space.

      The Particle Swarm Optimization (PSO) algorithm is a multi-agent parallel search technique which maintains a swarm of particles and each particle represents a potential

      i i i

      Where f: Rn R is the fitness function. The global best position gb at time step t is calculated as


      gb = min { pb t }, where i [1, ……., n] and n > 1

      Therefore it is important to note that the personal best pb is the best position that the individual particle i has visited since the first time step. On the other hand, the global best position gb is the best position discovered by any of the particles in the entire swarm. The velocity of particle i is updated according to the following expression:

      i 1 i i 2 i

      Vit+1 = V t + c1 U t (pb t – X t) + c2 U t (gbt – X t) ————(2)

      Inertia Personal Influence Social Influence And position is updated according to following expression:

      i i i

      X t+1 = X t + V t+1 ————–(3)


      c1 is called cognitive parameter

      c2 is called social parameter, both are called acceleration coefficients.


      U1t and U t are two random numbers varies between 0 to 1.

      In the next iteration, updated velocities and positions are used as the present velocities and positions. Now these particle positions are used for the calculation of new value. In that condition, position of particle corresponds to optimum value is called new gbest and position of particle corresponds to optimum value that was evaluated by itself, is called new pbest. And these above processes are repeated until stopping criteria (limitation of maximum iteration) is satisfied.

    3. PSO Algorithm

      1. Start.

      2. Create a population of agents (called Particle) uniformly distributed over search space (x).

        • Particle Memory: Each particle remembers its own personal best. Each particle also knows the global best that is found by the entire swarm.

        • Particle Motion: The movements of the particles are influence by the factors: pbset, gbest and previous position of the particle. The particles are pulled by the pbset and gbest positions.


    1. Read the various data, which includes bus data, line data, population size, dimension of the problems, maximum number of iterations, DG size limitations, cognitive

    parameter(c ) , social parameter (c ) etc.

    1. Evaluate each particles position according to the objective 1 2


    2. If a particles current position is better than its previous best position, update it.

    3. Determine the best particle (according to the particles previous best positions).

    4. Update particles velocities according to

      i i 1 1 i i 2 2 i

      V t+1 = V t + c U t (pb t – X t) + c U t (gbt – X t)

    5. Move particles to their new positions according to

    X t+1 = X t + V t+1

    1. Create random population of DG size and random population of location of DG considering the limit of DG size and its locations respectively. Initialize the random velocities (V) of all particles.

    2. Calculate the Objective Function (OF) i.e. Loss by using N-R method of load flow analysis, of all particles considering the DG size and its location which is generated in previous step.

    3. Find the optimum Loss which is called global minima or

    i i i

    1. Go to step 2 until stopping criteria is satisfied.

    2. Stop.

    1. Basic Terms Used in PSO

      • Initialization: PSO algorithm starts by producing a random set of points over the solution space. The function will be evaluated over these points. This is the first generation.

      • Particle: Each search point is known as a particle. The position of the particle is determined by the independent variables. The position of every particle represents a possible solution of the optimization problem.

      • Population Size: The number of search points (particles) is known as population size. Suppose we choose population size to be 200. So, each generation will have 200 particles.

      • Fitness Function and Fitness Value: The function that we are trying to optimize is called the fitness function. The value of the fitness function corresponding to the position of a particle is known as the fitness value of that particle.

      • Movement: The particles are imagined to be moving over the solution space trying to find the maximum (or minimum) value. In PSO, the new set of search points (particles) at each generation is visualized as position change of the particles. The position is changed according to the equations:

    X t+1 = X t + V t+1

    local minima (in the initial condition, both local and global minima are same). Find the particle position corresponding to optimum Loss, i.e. global best (gb), and also find the personal best (pb). In the initial condition, personal best position (pb) is same as initial population.

    1. Set iteration counter, iter = 1.

    2. Update the particles velocities according to the equation (2). After calculating the new velocities, update the particles positions according to the equation (3).

    3. Check the validity of particles according to the particles particular conditions i.e. validate the particles new positions according to the limitations of DG size and its valid locations. If new position of any particle is not valid, then randomly regenerate that particle according to their conditions.

    4. Calculate the Objective Function (OF) i.e. Loss of the system by using N-R method of load flow analysis, corresponding to new particles.

    5. After evaluating the objective function for all new position of each particle, if the new solution is better than the local solution, replace the local best. And if the new solution of each particle is the global best, replace with the new particle.

    6. Increment the iteration counter by 1, i.e. iter=iter+1.

    7. If convergence condition is not satisfied (i.e. if iter <= iter_max) then go to step 7, otherwise continue to next step.

    8. Display the global best and their respected positions. Global best is the optimum Loss and their position

      i i i

      • Personal Best (pbest) and Global Best (gbest): As each particle moves (over successive generations), it remembers the position where it found the best fitness value so far. That position is known as personal best. The best fitness position that is found by population (over the generations) is known as global best.

        indicates the optimum value of DG size and its optimum location. Plot the graph between optimum Loss and iteration number.

    9. Stop.



    Read Dat, like Population Size, Iter_max, Bus data, Line Data, DG Size Limitation


    The IEEE 30-bus system used to evaluate location and size of DG and reduce power losses in a meshed transmission and distribution network.

    Assumptions for the placement of DG:

    1. The total DG capacity is limited to 10% (app.) of the total load demand.

    2. DG location is considered at the PQ buses only.

    3. Maximum numbers of DGs are limited to 5.

    Find the best particle in the initial population and personal best (initially Personal Best is same as initial population)

    Evaluate the Objective function of each particle i.e Ploss by using NR method of Load Flow Analysis

    Create random initial population based on problem's constraints and random initial velocities for each particle.

    Five cases were defined in this work from 1 to 5 distributed generators. The first DG is kept at all load buses in turn, and the location for which losses are the lowest is considered as the optimal location for that DG. Placing this DG at the load bus, the procedure (mentioned above) is repeated for placing the second DG at all load buses in turn and deciding the optimal location for the second DG. This procedure is repeated for all DGs. In this work, Five DGs, each of maximum Capacity of 5 MW are considered.

    Table No.1

    Check the validity of new particles position according to problems constraints

    Compute the Swarm Velocities and update the particles positions

    iter = iter + 1

    Set Iteration count, iter = 1



    PDG (MW)

    (0 PDG 5)



    Bus No. (Location)




    (without DG)

    After Optimal Power Flow

    (Objective Function: Cost Minimization)



    One DG






    Two DGs (4.768, 4.907)





    Three DGs (4.933, 4.895,






    Four DGs (4.951, 4.711,

    4.117, 4.381)





    Five DGs (4.155, 4.133,

    4.396, 4.355, 4.840)




    If particles current position is better than its previous best position, then update it and find the global best and personal best.

    Compute the objective function for each particle

    If any particle doesn't satisfy the conditions then generate new position of that particle based on problems constraints.


    Is iter < iter_max


    Print the best particle position (global best)


    Fig 1: PSO convergences for Case 5 with 5 DGs

    grid. From the above results, it is observed that Bus No. 30 is the best Location for Placement of a single DG.

    Also figure 2 shows the power losses reduction according to the number of generators located in the system. The reduction in real power loss was in the range of 7.6% up to 24%.

    Fig 2: Power loss reduction using PSO

    Fig3: Voltage before and after location of DG

    The parameters used for PSO in all cases were a Population size of 70, and maximum number of iteration of 200. For testing, Five DGs each of Capacity 5 MW are considered i.e the maximum Capacity is 25 MW (about 10% of the Total System Load of 283.40 MW).

    Firstly, one DG of 5 MW is considered for optimal placement and Optimal Location is found as Bus No. 30 (Table No. 1) and accordingly the Active Power Loss reduces to 8.362 MW from 9.046 MW and the Voltage at Bus No. 30 increases to 1.0107 p.u from 0.9958 p.u after and before placement of DG of Capacity 5 MW respectively. In addition to these, it is observed that Voltage magnitude of other Load Buses also improves. Five DGs each of 5 MW is considered and Optimum Locations are found as Bus No. 7, 18, 24, 26, and 30 (Table No. 1) and the active power loss of the system reaches a minimum value of 6.837 MW. The convergence characteristics can be studied from figure 1. The result converges in about 150 iterations. As shown in figure, the objective function reached a global minimum and stayed there till the end of iterations. The improvement in voltage magnitudes in all PQ Buses are also observed. It is shown that the optimal placement of DG units in the system caused a reduction in both power losses and MVA intake from the

    The effect of inserting DG units in the system on the voltage profile shown in figure 3. It is seen that the voltage of all PQ buses has been improved after placing DGs respectively at proper locations. The Blue colour characteristic indicating the voltage profile of buses obtained after Optimal Power Flow (Cost Optimization as Objective Function) without penetration of DGs. The Green, Red, Light Green, Pink and Grey colour characteristics indicating the voltage profile of buses obtained after placement of one, two, three, four and five DGs respectively. From the figure it is observed that after placement of DGs, the voltage magnitude of Bus No. 30 improves specially.


We have seen how PSO solves the DG placement issue by achieving reduced active power loss while maintaining voltage profile. Results obtained based on various cases presented in the paper correlates the same. The proposed method deals with optimal selection of nodes for the placement of DG using PSO and is tested with IEEE 30-Bus system. From the results the reduction of active power loss and the improvement of voltage profile can be observed. In conclusion, this paper highlights two important observations:

  1. The power losses of distribution system can be effectively reduced by proper placement of DG.

  2. On top of reduced power loss, voltage profile can also be maintained.

This method is also relatively versatile for handling various qualitative constraints. Being a stochastic search method, main disadvantage of this proposal is large computing time required to obtain optimal solution. However, benefits achieved via this method far outweighs this disadvantage.


  1. Rau NS, Wan YH. Optimum location of resources in distributed planning, IEEE Trans Power System 1994; 9:201420.

  2. Kim JO, Nam SW, Park SK, Singh C. Dispersed generation planning using improved Hereford ranch algorithm, Electr Power Syst Res 1998; 47(11).

  3. A. Hajizadeh and E. Hajizadeh, PSO-Based Planning of Distribution Systems with Distributed Generations, in World Academy of Science, Engineering and Technology, 2008.

  4. M. P. Lalitha, V. C. V. Reddy, and V. Usha, Optimal DG Placement for Minimum Real Power Loss in Radial Distribution Systems using PSO,

    J. Theor. Appl. Inf. Technol., vol. 13, no. 2, pp. 107 116, 2010.

  5. S. Kansal, B. B. R. Sai, B. Tyagi, and V. Kumar, Optimal placement of distributed generation in distribution networks, Int. J. Eng. Sci. Technol., vol. 3, no. 3, pp. 47 55, 2011.

  6. L. Wang and C. Singh, Reliability-Constrained Optimum Placement of Reclosers and Distributed Generators in Distribution Networks Using an Ant Colony System Algorithm, IEEE Trans. Syst. Man, Cybern. Part C (Applications Rev., vol. 38, no. 6, pp. 757764, Nov. 2008.

  7. D. Gautam and N. Mithulananthan, Optimal DG placement in deregulated electricity market, Electr. Power Syst. Res., vol.77, no. 12, pp. 16271636, 2007.

  8. D. Q. Hung, N. Mithulananthan, ad R. C. Bansal, Analytical Expressions for DG Allocation in Primary Distribution Networks, IEEE Trans. Energy Convers., vol. 25, no. 3, pp. 814820, Sep. 2010.

  9. C. Wang and M. H. Nehrir, Analytical Approaches for Optimal Placement of Distributed Generation Sources in Power Systems, IEEE Trans. Power Syst., vol. 19, no. 4, pp. 20682076, Nov. 2004.

[10]J.-H. Teng, T.-S. Luor, and Y.-H. Liu, Strategic distributed generator placements for service reliability improvements, in IEEE Power Engineering Society Summer Meeting, 2002, vol.2, pp. 719724.

[11]C. L. T. Borges and D. M. Falcão, Optimal distributed generation allocation for reliability, losses, and voltage improvement, Int. J. Electr.

Power Energy Syst., vol. 28, no.6, pp. 413420, 2006

[12]M. F. Shaaban, Y. M. Atwa, and E. F. El-Saadany, DG Allocation for Benefit Maximization in Distribution Networks,IEEE Trans. Power Syst., vol. 28, no. 2, pp. 11, May 2012.

[13]G. Celli, E. Ghiani, S. Mocci, and F. Pilo, A Multiobjective Evolutionary Algorithm for the Sizing and Siting of Distributed Generation, IEEE Trans. Power Syst., vol. 20, no. 2, pp. 750757, May 2005.

[14]T. Sutthibun and P. Bhasaputra, Multi-objective optimal distributed generation placement using simulated annealing, in Internacional Conference on Electrical Engineering/Electronics Computer Telecommunications and Information Technology (ECTI-CON), 2010, pp. 810813.

  1. A. I. Aly, Y. G. Hegazy, and M. A. Alsharkawy, A simulated annealing algorithm for multi-objective distributed generation planning, in IEEE PES General Meeting, 2010, pp. 17.

  2. N. Ghadimi and R. Ghadimi, Optimal Allocation of Distributed Generation and Capacitor Banks in Order to Loss Reduction in Reconfigured System, Res. J. Appl. Sci. Eng.Technol., vol. 4, no. 9, pp. 1099 1104, 2012.

  3. W.-S. Tan, M. Y. Hassan, M. S. Majid, and H. Abdul Rahman, Optimal distributed renewable generation planning: A review of different approaches, Renew. Sustain. Energy Rev., vol. 18, pp. 626 645, 2013.

Leave a Reply