**Ovidiu Ivanov \*, Bogdan-Constantin Neagu, Gheorghe Grigoras \* and Mihai Gavrilas**

Department of Power Engineering, Gheorghe Asachi Technical University of Iasi, 700050 Iasi, Romania; bogdan.neagu@tuiasi.ro (B.-C.N.); mgavrilas@yahoo.com (M.G.)

**\*** Correspondence: ovidiuivanov@tuiasi.ro (O.I.); ggrigor@tuiasi.ro (G.G.)

Received: 16 September 2019; Accepted: 1 November 2019; Published: 6 November 2019

**Abstract:** Energy losses and bus voltage levels are key parameters in the operation of electricity distribution networks (EDN), in traditional operating conditions or in modern microgrids with renewable and distributed generation sources. Smart grids are set to bring hardware and software tools to improve the operation of electrical networks, using state-of the art demand management at home or system level and advanced network reconfiguration tools. However, for economic reasons, many network operators will still have to resort to low-cost management solutions, such as bus reactive power compensation using optimally placed capacitor banks. This paper approaches the problem of power and energy loss minimization by optimal allocation of capacitor banks (CB) in medium voltage (MV) EDN buses. A comparison is made between five metaheuristic algorithms used for this purpose: the well-established Genetic Algorithm (GA); Particle Swarm Optimization (PSO); and three newer metaheuristics, the Bat Optimization Algorithm (BOA), the Whale Optimization Algorithm (WOA) and the Sperm-Whale Algorithm (SWA). The algorithms are tested on the IEEE 33-bus system and on a real 215-bus EDN from Romania. The newest SWA algorithm gives the best results, for both test systems.

**Keywords:** electricity distribution networks; optimal capacitor allocation; Genetic Algorithm; Particle Swarm Optimization; Bat Algorithm; Whale Algorithm; Sperm-Whale Algorithm
