###### Abstract  
Reactive power compensation is one of the practical tools that can be used to improve power systems and reduce costs. These benefits are achieved when the compensators are installed in a suitable place with optimal capacity. This study solves the issues of optimal supply and the purchase of reactive power in the IEEE 30-bus power system, especially when considering voltage stability and reducing total generation and operational costs, including generation costs, reserves, and the installation of reactive power control devices. The modified version of the artificial bee colony (MABC) algorithm is proposed to solve optimization problems and its results are compared with the artificial bee colony (ABC) algorithm, the particle swarm optimization (PSO) algorithm and the genetic algorithm (GA). The simulation results showed that the minimum losses in the power system requires further costs for reactive power compensation. Also, optimization results proved that the proposed MABC algorithm has a lower active power loss, reactive power costs, a better voltage profile and greater stability than the other three algorithms. control devices; artificial bee colony algorithm; voltage stability; reactive power +
Footnote †: journal:  
0000-0001-999-2277-22010]Schock for updates  
0000-0001-9999-2277-22010]Schock for updates  
0000-0001-999-2277-22010]  
distribution feeder. The optimization results indicated that the proposed ABC-PSO algorithm performed better than the PSO and ABC algorithms. In the proposed method in [7], an integrated approach of loss sensitivity factor (LSF) and voltage stability index (VSI) were used to determine the optimal placement of reactive power compensators. Also, the genetic algorithm (GA) was used to determine the optimal size of the compensators. In [8], optimal Static Var Compensator (SVC) placement was done by the ABC algorithm. The objective function was the reduction of ohmic losses and the improvement of the power quality. In [9], optimal thyristor-controlled series compensator (TCSC) placement in IEEE 57 and IEEE 118 Bus Systems was achieved. The ABC algorithm was used for optimization to reduce transmission loss. The results of optimization by the ABC algorithm and comparison with some other metaheuristic algorithms proved the superiority of ABC algorithm. In [10], the fuzzy based ABC algorithm was used to solve the optimization problem of voltage regulator and capacitor placement. The use of the fuzzy method allowed simultaneous minimization of losses in the radial distribution system and voltage deviation. In [11], a new modified version of the ABC algorithm for optimal location of shunt compensators was proposed. In order to validate the proposed ABC algorithm, a number of power systems of different sizes and complexities were used and also compared with meta-heuristic optimization algorithms. The results showed that the proposed method was able to provide better solutions. Usually, a reactive power supply aims to minimize the active power loss or increase voltage stability. In general, it can be said that it aims to reduce the costs of reactive power. Reactive power resources have to supply and purchase reactive power in the grid [12]. The separate costs of grid-connected generators, line charging capacitors, capacitors installed on the buses and reactive power compensators are all worth mentioning, as each one presents an independent problem. It should be noted that the costs of reactive power generation resources depend on their operation conditions, while the cost of compensators depends on their capacity and installation location, which should be modeled accurately. In this paper, a modified version of the artificial bee colony algorithm is proposed to solve the optimization problem. The percentage of the adjustable on-load tap changers (OLTC), capacity of the capacitor banks, and optimal location and capacity of the reactive power compensators are considered as control parameters.