# Optimization of PV and Battery Energy Storage Size in Grid-Connected Microgrid
## 2 System Configuration and Modelling  
The grid connected microgrid structure used in this paper is shown in Figure 2. It consists of the BESS, PV, AC bus, grid and load. It is connected to the grid via the AC bus. The battery and PV are connected to the DC bus via DC/DC converters that charge the battery from the PV throughout the DC bus. The DC bus is connected to the AC bus through the DC/AC inverter. The energy management system tracks load demand, available PV power and battery energy level, and it controls charge/discharge status of the battery and decides whether to demand energy from the grid. Solar PV module performance is affected by irradiation, pollution, aging, shading and ambient temperature. Since the aim of this study is not maximum power point tracking  
Figure 2: The architecture of the microgrid system. design, the effects of these parameters will not be examined, and the net output power of the system will be used directly from the previously obtained data. Two different data sets were used to create different scenarios: case 1 and case 2. The data sets used in this study, which show the relationship between the power produced by the PV system and the load demand, are given in Figure 3a,b. The PV data in Figure 3a are obtained by taking the daily average of the annual data of the International Energy Agency (IEA) future prospect. To test the proposed system for another scenario, the PV and load data in Figure 3b are scaled from data published by the Belgian electricity system operator. The converter efficiency that affects the amount of energy from the PV to the load is given as 95%. Thus, total PV output to load is:  
\[P_{pp}(t)=P_{pp}gen(t)\times\eta_{conv} \tag{1}\]  
where \(P_{p}gen(t)\) is generated power from the PV modules during time interval \(t\), \(\eta_{conv}\) is the converter efficiency, and \(P_{pp}(t)\) is transferred power from the PV to load during time interval \(t\). The power generation capabilities of PV modules deteriorate from year to year due to aging. Thus, the economic life of a PV is considered as 25 years in this study, and PV modules are considered, as they will not be replaced during system cost calculation. The cost and other parameters are listed in Table 1.  
As is known, the minimum and maximum of battery state of charge (\(B_{soc}\)) should be defined to prevent shortening the battery life. \(B_{soc}\) can be given as:  
\[B_{soc}(t)=\left[E_{bat}(t)/E_{bat,rat}(t)\right]\times 100\% \tag{2}\]  
where \(E_{bat}(t)\) is battery energy level and \(E_{bat,rat}\)(t) is rated energy capacity [28]. Overcharging and deep discharging of the battery should be prevented, as it will reduce its lifespan and cycle life. Thus, the following limits are defined:  
\[E_{bat,min}(t)\leq E_{bat}(t)\leq E_{bat,max}(t) \tag{3}\]  
where \(E_{bat,min}(t)\) is minimum energy limit, and it is defined as 0.48 kWh. \(E_{bat,max}(t)\) is a single battery module's maximum energy limit and it is defined as 2.4 kWh. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Value** & **Unit** \\ \hline Efficiency (\(n_{PV}\)) & 95 & \% \\ Capital, Operation and Maintenance Cost & 97 & USD/Unit \\ \hline \hline \end{tabular}
\end{table} 
Table 1: PV cost parameters. Figure 3: Average load demand and single PV module output for: (**a**) case 1; (**b**) case 2. Battery charging and discharging action defined as below, respectively [28]:  
\[E_{bat}(t)[E_{PV}(t)-E_{Load}(t)/\eta_{inv}]\times\eta_{Bch} \tag{4}\]  
\[E_{bat}(t)[E_{Load}(t)/\eta_{inv}-E_{PV}(t)]\times\eta_{Bddh} \tag{5}\]  
where \(E_{PV}(t)\) is the generated energy, and \(E_{Load}(t)\) is the load demand during time interval \(t\). \(\eta_{Bch}\), \(\eta_{Bddh}\) and \(\eta_{inv}\) are battery charging, discharging and inverter efficiencies, respectively, which are defined as 95%. The capacity of battery modules will also decrease over time. In this work, battery module life is taken as 8 years. Battery modules are replaced three times during system cost calculation.