3.1.2. Wind Turbine

The output of WTs is mainly affected by wind speed [24]. The ANN is still used to predict wind power [25]. The inputs are the wind speed and wind direction from NWP.

### *3.2. Electric Vehicles*

### 3.2.1. EVs Model

The EVs in the MMGS are all commuter vehicles, and the residents of the residential area are the workers in the office area. As 77.95% of EVs' users will reach the working area at 7:30–9:30 [26], the standard parking time slots in OBMG and RMG are assumed to be 9:00–17:00 and 19:00–7:00 [27,28]. The capacity of EV at *t*-th is

$$SOC\_{EVm,n,t} = SOC\_{EVm,n,t-1}(1-\sigma) + P\_{m,n,t}^{EV} \bullet \Lambda t \bullet \eta\_{\text{CEV}} \quad , \qquad if \quad P\_{m,n,t}^{EV} \ge 0 \tag{1}$$

$$SOC\_{EVm,n,t} = SOC\_{EVm,n,t-1}(1-\sigma) + P\_{m,n,t}^{EV} \bullet \Lambda t / \eta\_{DEV} \quad , \qquad if \quad P\_{m,n,t}^{EV} < 0 \tag{2}$$

The power output of EV in (1) and (2) is measured on the MMGS side. Where *SOCEVm*,*n*,*<sup>t</sup>* is the remaining power capacity of the *n*-th EV in the *m*-th MG in the *t*-th hour, σ is the self-discharge coefficient. *PEV <sup>m</sup>*,*n*,*<sup>t</sup>* is the charging or discharging power in the *t*-th hour of the *n*-th EV in the *m*-th MG. If *PEV <sup>m</sup>*,*n*,*<sup>t</sup>* ≥ 0, EVs are charged. If *PEV <sup>m</sup>*,*n*,*<sup>t</sup>* < 0, EVs release energy; Δ*t* = 1 h. *ηDEV* and *ηCEV* are the discharging and charging efficiency of EVs to calculate the power actual charging or discharging power of EVs.

### 3.2.2. Across-Time-and-Space Energy Transmission of EV

In the same MG, the EV is used as an energy storage unit, and its charging/discharging power can be dispatched for the operation of the MG. When the EV is connected to the MG and the power is sufficient, MMGS controls the EV to charge during the low charging price or when the system has excess energy, and discharge during the peak discharging price or when the system is short of power. The EV is charged and discharged in the same MG to realize energy transfer over time, thereby reducing the cost of MMGS purchasing electricity directly from the distribution network. At the same time, it also allows the user of the EV to profit by selling part of the electricity, which enables both parties to obtain a certain amount of economic benefit.

On the other hand, EVs not only have energy storage characteristics but also can move between different locations. In the case of differences in the electricity price of the distribution network within a region, benefits can be obtained through the cross-space transfer of energy. For example, the electricity prices of RMG and OBMG for electricity trading with the distribution network are quite different. Most of the time, the electricity price of OBMG purchasing electricity from the distribution network is higher than RMG. Therefore, the electric energy charged in the RMG at a low charging price is sold to the MMGS at a high discharging price in the OBMG, and the electric energy is transferred between different spaces and times through charging and discharging.

EVs realize the across-time energy transmission in the same MG and realize the acrosstime-and-space energy transmission in different MGs, which can transfer the lower-priced electric energy in RMG to OBMG at a higher price. Under the right conditions, both MMGS and EV users can benefit. This characteristic of EVs for energy transfer between different times and different spaces is called the across-time-and-space energy transmission.

### *3.3. EV Charging/Discharging Infrastructures*

The charging/discharging behaviors of EVs are carried out through the EVCDIs.

$$P\_{m,n,t}^{EVCDIs} = P\_{m,n,t}^{EV} \bullet \eta\_{\text{CEV}} \quad , \qquad \text{if} \quad P\_{m,n,t}^{EV} \ge 0 \tag{3}$$

$$P\_{m,n,t}^{EVCDls} = P\_{m,n,t}^{EV} / \eta\_{DEV} \quad , \qquad \text{if} \quad P\_{m,n,t}^{EV} < 0 \tag{4}$$

where *PEVCDIs <sup>m</sup>*,*n*,*<sup>t</sup>* is the power of the EVCDIs of the *n*-th EV in the *m*-th MG in the *t*-th hour.

### **4. Cooperative Multi-Objective Optimization Model**

### *4.1. Description of the Optimization Model*

The EVMS collects the dispatchable capacity forecast data of EVs and outputs the dispatching plan of the EVs. The MEMS collects the output of predicted RESs, the predicted load data, and the energy price of the distribution network. Based on this information, MEMS outputs the active power of RESs, EVs, and DC/AC converters in MMGS, and transmits it to the reactive power optimization module in MMGEMS. The reactive power optimization module outputs the optimal reactive power of the DC/AC converters according to the data. The two modules coordinate and output the optimal result.

### *4.2. Double-Loop Optimization Process*

The process is shown in Figure 4. The inner-loop is the dynamic economic dispatch which is used to optimize the active power output of RESs, EVs, and DC/AC converters to obtain the optimal total operating cost of the MMGS. The outer-loop optimizes the reactive power output of the DC/AC converters according to the active power output of the innerloop, to make the network loss of the distribution network minimum, thereby reducing the network loss cost and carbon emissions of MMGS and the distribution network. The inner-loop and the outer-loop work together to obtain the optimal active power output plan in MMGS and reactive power output of the DC/AC converters, which makes the economic cost of MMGS minimum.

### *4.3. Cooperative Multi-Objective Optimization Objective Function*

The main goal of optimization is to reduce the daily economic total cost of MMGS. MMGS discussed in this model consists of multiple MGs, which are assumed to be owned by a single operator. Another goal of the model is the lowest network loss of the distribution network, which can be obtained through the outer-loop model. Therefore, the objective function to minimize the total economic cost of the entire system can be expressed as:

$$f = \mathbb{C}\_{ET\mathbb{C}} = \mathbb{C}\_{OT\mathbb{C}} + \mathbb{C}\_{WT\mathbb{C}} \tag{5}$$

where *f* is the main goal of the cooperative optimization, *CETC* is the economic total cost of MMGS. *COTC* is the operating total cost of MMGS, *CWTC* is the energy loss cost of the MMGS that is obtained from the outer-loop model, where

$$\mathbb{C}\_{\rm WTC} = \mathbb{C}\_{il} + \mathbb{C}\_{\rm co} \tag{6}$$

$$\mathbb{C}\_{\text{co}} = E\_{\text{CO}} \bullet k\_{\text{c}} \tag{7}$$

$$E\_{\rm CO} = (\mathcal{W}\_{\rm S}^{G} - \mathcal{W}\_{\rm S}^{B}) \bullet \Delta t \bullet \mathcal{e}\_{\rm c} \tag{8}$$

$$C\_{il} = (\mathcal{W}\_S^G - \mathcal{W}\_S^B) \bullet \Delta t \bullet k\_{il} \tag{9}$$

$$E\_{\mathbb{C}} = \sum\_{m=1}^{M} E\_{CIm} + E\_{\text{CO}} \tag{10}$$

*Cil* and *Cco* are the network loss cost and carbon emissions cost caused by the increase in the distribution network loss in the outer-loop model, respectively. *ECO* is the carbon emissions generated by the distribution network. *W<sup>G</sup> <sup>S</sup>* is the total daily operating network loss of the distribution network when MMGS is integrated into the distribution network and runs. *W<sup>B</sup> <sup>S</sup>* is the total daily operating network loss when there is no MMGS access, which is a fixed value also called the original baseline loss. *kil*, *ec*, *kc* are fixed factors, *kil* is the loss cost coefficient of the distribution network, *ec* is the carbon emissions factor, *kc* is the carbon cost factor. Δ*t* = 1 h. *EC* is the total carbon emissions of MMGS and the distribution network, *ECIm* is the carbon emissions generated by *m*-th MG in the inner-loop model, *M* is the number of MGs in the MMGS.

**Figure 4.** Process of the cooperative multi-objective optimization.

Since *COTC* and *W<sup>G</sup> <sup>S</sup>* are the optimization targets of the inner-loop model and the outer-loop model, respectively, the objective functions of the inner-loop model and the outer-loop model are set as follows:

$$f\_1 = \min C\_{OTC} \tag{11}$$

$$f\_2 = \min W\_S^G \tag{12}$$

where *f* <sup>1</sup> and *f* <sup>2</sup> are the objective functions of the inner-loop model and the outer-loop model, respectively.

Through (5)–(12), *f* can be expressed as:

$$f = f\_1 + (f\_2 - \mathcal{W}\_S^B) \bullet \Delta t \bullet [\mathcal{e}\_c \bullet k\_c + k\_{il}] \tag{13}$$
