## 3 Power Management Scheme of MG with EV Charging/Discharging Scheduling Algorithm
### Multi-Objective Optimization for Power Management of Interdependent MG and EV Fleets
#### 3.2.2 Objective Functions  
In this paper, minimization of the operating cost of PV-based charging station by (20), minimization of the grid power consumption of the MG by (21), and maximization of the utilization of EVs as ESS by (24) are performed through multi-objective optimization. The charging requirements of parked EVs are also satisfied with the consideration of remaining parking time and current SOC by (22) and (23). The first objective function is presented to reduce the operating cost of the PV-based charging station, while satisfying the charging requirements of parked EVs. The reduction in operating cost is achieved by the economical and energy-efficient use of grid power, PV power, and discharging power of parked EVs as follows. \[\min\left[ \begin{array}{c}TOU(t)\times\left(\sum\limits_{i=1}^{I}PW_{ch}^{i} \times O_{ch}^{i}(t)-PW_{PV,EV}(t)\times O_{PV,EV}(t)-PW_{EV,EV}(t)\times O_{EV,EV}(t)\right)\\ -(SMP(t)+w*REC)\times(PW_{PV,load}(t)\times O_{PV,load}(t)+PW_{EV,load}(t) \times O_{EV,load}(t))\end{array} \right] \tag{20}\]  
where \(TOU(t)\), \(SMP(t)\), and \(REC\) represent time-of-use (TOU) price which is one of the price-based tariffs under DR program at time \(t\), the SMP of electricity supplied from PV power generation and discharging power of parked EVs at time \(t\), and REC which can be sold to other electricity company with weighted value \(w\), respectively. For the stable and economical operation of the PV-based charging station, the operating cost should be minimized in relation with the EV charging/discharging scheduling by controlling switching functions \(O_{ch}^{1}(t)\cdots O_{ch}^{I}(t)\), \(O_{dch}^{1}(t)\cdots O_{dch}^{I}(t)\) of EVs. In the PV-based charging station, after the power required for the charging demand of EVs is self-supplied by the PV system and discharging of EVs, the power from the utility grid is supplied to the rest of the charging demand of EVs at TOU price. The power not used for the charging demand of EVs can be sold to electric company at the price considering the SMP and weighted REC, while using the power to supplement the local load demand. Due to increasing electricity load demand in the MG, the RES becomes more significant as it has relatively less impact on the environmental issues than non-renewable energy sources. Even though the use of grid power can be more economical according to DR program, the use of PV power is promoted due to its eco-friendly characteristic [66]. Moreover, it can reduce the grid power consumption and enhance energy efficiency by using PV power directly supplied from the PV system, not via long transmission line. The decrement of the grid power consumption and the increment of the PV power consumption can be achieved by the equation as following  
\[\min\left[ \begin{array}{c}\left(PW_{grid,load}(t)\times O_{grid,load}(t)+PW_{ grid,EV}(t)\times O_{grid,EV}(t)\right)\\ -(PW_{PV,load}(t)\times O_{PV,load}(t)+PW_{PV,EV}(t)\times O_{PV,EV}(t))\end{array} \right] \tag{21}\]  
To satisfy the charging requirements of EVs and utilize the discharging of EVs to the power management of the MG simultaneously, intelligent charging/discharging scheduling process of EVs is essential. After the parked EVs are classified into charging/dischargingcandidates depending on each EV's information, one of charging, discharging, and idle operations is assigned to each EV by (22) and (23) relevant to the remaining parking time of EVs and the difference between the current SOC and the target SOC of EVs.