# Optimization of PV and Battery Energy Storage Size in Grid-Connected Microgrid
###### Abstract
Dynamic programming (DP) and linear programming (LP) are examples of mathematical methods [10]. DP is used in [12], but it is difficult to apply to large-scale systems [13]. LP optimization is chosen as a simpler method in [13], and it is implemented for a small energy storage system (ESS) in [14]. However, it has some problems when it is applied to large scale systems. As a result, LP and DP are not good tools for complex systems [10]. As a remedy, different optimization techniques that are named as probabilistic methods (PMs) have been developed. The Markov chain decision method (MCDM) is one of them and is used for battery sizing optimization due to its simple structure. Energy storage devices are scheduled optimally with an MCDM in [15]. However, probabilistic methods are effective when the number of optimized criteria is less (generally one) [10]. These methods are not suitable for optimizing the two parameters together in interaction with the energy management system in the structure that is the subject of this study. Since RES output is uncertain, metaheuristic approaches are suggested in many applications. Metaheuristic methods give more accurate results on large and nonlinear optimization problems [16; 17]. The Genetic Algorithm (GA) is used for cost reduction and optimization of the energy storage system in a hybrid energy system in [18]. The bottleneck of GA is that its results are not conclusive [13]. The Bat Algorithm (BA) is used to find optimum BESS size for a grid-connected low-voltage MG in [19]. The Grey Wolf Optimization (GWO) algorithm is chosen for optimum BESS sizing and decreasing fuel usage, and GWO performance is compared with BA and PSO in [20]. The Artificial Bee Colony algorithm (ABC) is used to calculation of optimal battery size and operation for revenue increasing in a hybrid power system [21]. The Grasshopper Optimization Algorithm (GOA) is another method used for optimal battery, PV, wind, and diesel sizing in a microgrid [22]. Particle Swarm Optimization (PSO) has simplicity and ease of use among other metaheuristic optimization algorithms, yet it can present a high convergence rate [8]. Its robustness of convergence comes from being less dependent on setting initial points among other methods. The PSO algorithm also needs less parameters than other metaheuristic algorithms. In addition to these, it needs lower data storage [8]. The PSO-based frequency control method for an off-grid microgrid is implemented to evaluate optimum BESS size and reduction in cost [23]. The PSO algorithm is used to find optimum battery size and minimum cost for a grid-connected residential system that currently has an available PV system [24]. Similarly, PSO is selected for battery capacity optimization and effective battery installation for an island mode microgrid in [25]. PSO is used for optimal sizing of wind, PV and tidal as a primary and battery as an auxiliary source considering the reliability index [25]. PSO is also proposed to determine optimal BESS with load shedding [5]. The objective of this paper is to enhance frequency control by load shedding, and thus, operation cost reduces. The cost optimization of a PV and BESS system in the grid-connected MG using PSO is proposed in [26]. However, this study does not use an energy management system. In this paper, optimum energy storage and PV size considering cost minimization is determined based on the novel energy management method, and the PSO algorithm is proposed for a grid-connected microgrid. In past studies, various algorithms were used for different systems for optimization. According to the literature study, although the PSO algorithm is a common and well-known algorithm, it has not been used as an optimization algorithm for both PV and BESS sizing. In the majority of studies, one of the parameters is kept constant (mostly PV size), and the remaining parameters (mostly battery size) are optimized. In a limited number of studies, the PSO algorithm is used to determine optimal size of the PV system and BESS but only for island mode systems.