This paper presents bacterial foraging optimization (BFO) algorithm and its adaptive version to optimize the planning of passive harmonic filters (PHFs). The important problem of using PHFs is determining location, size and harmonic tuning orders of them, which is reach standard levels of harmonic distortion with applying minimum cost of passive filters. In this study to optimize the PHFs location, size and setting the harmonic tuning orders in the distribution system, considered objective function includes the reduction of power loss and investment cost of PHFs. At the same time, constraints include voltage limits, number/size of installed PHFs, limit candidate buses for PHFs installation and the voltage total harmonic distortion (THDv) in all buses. The harmonic levels of system are obtained by current injections method and the load flow is solved by the iterative method of power sum, which is suitable for the accuracy requirements of this type of study. It is shown that through an economical placement and sizing of PHFs the total voltage harmonic distortion and active power loss could be minimized simultaneously. The considered objective function is of highly non-convex manner, and also has several constraints. On the other hand due to significant computational time reduction and faster convergence of BFO in comparison with other intelligent optimization approach such as genetic algorithm (GA), particle swarm optimization (PSO) and artificial bee colony (ABC) the simple version of BFO has been implemented. Of course other versions of BFO such as Adaptive BFO and combination of BFO with other method due to complexity of harmonic optimization problem have not considered in this research. The simulation results for small scale test system with 10 buses, showed the significant computational time reduction and faster convergence of BFO in comparison with GA, PSO and ABC. Therefore in large scale radial system with 34 buses, the proposed method is solved using BFO. The simulation results for a 10-bus system as a small scale and 34-bus radial system as a large scale show that the proposed method is efficient for solving the presented problem. 
Bacterial foraging optimization and adaptive version for economically optimum sitting, sizing and harmonic tuning orders setting of LC harmonic passive power filters in radial distribution systems with linear and nonlinear loads