-The necessity for clean electric power without any power quality problems has persuaded distribution companies to overcome these issues. Sag/swell, flicker and harmonics are these ones. Among them, voltage sag is one of the most important problems. This phenomenon imposes a bad effect on domestic and industrial loads, especially on sensitive ones. An alternative is use of distributed generation (DG) because of its positive impacts such as voltage support, improved reliability, small size and losses reduction, together with improving voltage sag. An approach is proposed based on Particle Swarm Optimization (PSO), capable to establish the optimal DG allocation and sizing on a distribution network. The objective function is the summation of cost of injecting energy of DGs, fixed installation cost of DGs and number of percentage of buses Experiencing voltage sag in a vulnerable zone that multi plied by number of faults for every kind of faults. The results show that the appropriate placement of DG results in improvement of the aforementioned indices.