## 1 Introduction
There are also some rule based control method examples in literature [11]. It should be noted that previously given methods are applicable to small distribution systems or microgrids with a few number of DERs. In larger microgrids the number of controllable elements may be high and sudden changes in generation may yield unexpected voltage deviations. The relationship between bus voltages and power flows are non-linear. Therefore, control of the voltage in microgrid by the use of complex optimization methods would be more convenient [11]. There are some linear programming examples in the literature [11; 12]; however, those methods may fail in case of penetrations of many DERs. Moreover, application of linearization may yield omission of power losses. Both the centralized and decentralized voltage control methods are commonly used. Decentralized methods are generally used to decrease the computation burden. Explanation and effectiveness of the method is discussed in various works [13; 14; 15; 16]. Specifically in [14], authors are proposing a consensus based distributed voltage control to guarantee reactive power sharing in inverter based microgrids. There are many works on centralized microgrid controllers. Centralized and decentralized approaches were compared in [17]. The authors of [18] solved voltage control problem by modeling as an optimization problem for multi-microgrid systems. In power systems, more specifically in distribution systems and microgrids, obtaining optimal operating states of the control devices and hence efficient operation needs a proper modeling of the optimization problem. The optimization problems are generally solved by using either derivative or non-derivative based numerical methods. The convergence speeds of the derivative based numerical methods [19] are better compared to the non-derivative based ones, however these types of algorithms may have convergence problems and finding derivatives of functions may not be always possible. Heuristic methods are popular in literature thanks to low time requirements, although they cannot guarantee the optimal solution [13]. From these, methods like genetic algorithms [20], particle swarm optimization [21], differential evolution [22] and harmony search [23] have gained popularity. These type of methods generally mimic the behaviors from nature. The main working philosophy behind these type of methods is similar to each other. They at first create initial solution candidates and by using operators like crossover, mutation, new and better solution candidate vectors are formed. Thus, this paper will aim to solve **e**f the voltage regulation problem of microgrid systems by using harmony search method. There are **to** many studies conducted in recent years aiming to solve different problems related to microgrids using heuristic methods. One work utilizes multi objective genetic algorithm to find the optimum reactive power flow on the system [15]. In [16], the use of particle swarm optimization is explained to set the coefficients of controller. The authors of [24] proposed a hybridized harmony search algorithm and differential evolution algorithm in order to solve day-ahead scheduling problem of a microgrid. A multi-objective optimization model to minimize the cost and losses was proposed in [25], and solved by chaotic binary particle swarm optimization algorithm. Another paper [26] models the islanded operating mode of microgrids and optimizes the costs by a newly developed learning based chaotic differential evolution algorithm. This paper models the voltage deviation problem in microgrids utilizing harmony search algorithm. For this aim it needs to simulate the power flows on the microgrids both in isolated and grid connected operation modes. Hence, a backward/forward sweep based ladder iterative power flow algorithm is implemented and the numerical results are verified to those of the actual ones.