**Marcin Steczek \*, Włodzimierz Jefimowski and Adam Szel ˛ag**

Faculty of Electrical Engineering, Institute of Electrical Power Engineering, Warsaw University of Technology, pl. Politechniki 1, 00-661 Warszawa, Poland; wlodzimierz.jefimowski@ien.pw.edu.pl (W.J.); adam.szelag@ien.pw.edu.pl (A.S.)

**\*** Correspondence: marcin.steczek@ien.pw.edu.pl

Received: 28 October 2020; Accepted: 2 December 2020; Published: 4 December 2020

**Abstract:** In this paper, an application of the recently developed Grasshopper Optimization Algorithm (GOA) for calculation of switching angles for Selective Harmonic Elimination (SHE) PWM in low-frequency voltage source inverter is proposed. The algorithm is based on insect behavior in the food foraging swarm of grasshoppers. The characteristic feature of GOA is the movement of agents is based on the position of all agents in the swarm. This method represents a higher probability of convergence than Particle Swarm Optimization (PSO) Modifications of GOA have been examined regarding their effect on the algorithm's convergence. The proposed modifications were based on the following techniques: Grey Wolf Optimizer (GWO), Natural Selection (NS), Adaptive Grasshopper Optimization Algorithm (AGOA), and Opposite Based Learning (OBL). The performance of GOA and its modifications were compared with well-known PSO. Areas, where GOA is superior to PSO in terms of probability of convergence, have been shown. The efficiency of the GOA algorithm applied for solving the SHE problem was confirmed by measurements in the laboratory.

**Keywords:** grasshopper optimization algorithm (GOA); particle swarm optimization (PSO); voltage source inverter (VSI); selective harmonics elimination PWM (SHEPWM)
