## 2 System Modeling
### Model of Components
#### 2.2.6 Hes  
\(\bullet\) ES  
Battery storage, as one of the most widely used electrical energy storage types in power systems, is deployed in the MEMG system. To consider the battery storage, the amount of charged/discharged energy is expressed as  
\[E_{B}(t)= (1-\kappa_{B})E_{B}(t-1)+(\eta_{B,ch}\cdot P_{B,ch}(t)-\frac{P_{B, dis}(t)}{\eta_{B,dis}})\Delta t \tag{7}\]  
where \(E_{B}\) is the electrical energy stored in the ES; \(\kappa_{B}\) indicates the decay rate of ES, which is assumed to be a constant; \(P_{B,ch}\) and \(P_{B,dis}\) respectively represent the charging and discharging power of the ES; and \(\eta_{B,ch}\) and \(\eta_{B,dis}\) respectively represent the charging and discharging efficiency of the ES.  
\(\bullet\) HS and CS  
In the MEMG system, the heat storage tank and cooling storage tank are used to store heating and cooling energy, respectively. The way the HS and CS tanks work is similar, and the structure of the HS/CS tank [27] is shown in Figure 2. The HS (or CS) tank absorbs or releases heat (or cooling) energy by controlling the volume of hot or cold water (\(V_{H}\) or \(V_{C}\)). When a heat storage tank supplies heat, the temperature of the supply water (\(T_{H}\)) becomes higher. When a cooling storage tank supplies cooling, the temperature of return water (\(T_{C}\)) becomes higher.  
Figure 2: Structure of the heat storage (HS) or cooling storage (CS) tank, where Su_I and Su_O represent the inlet and outlet switch for supply water, respectively; Re_I and Re_O represent the inlet and outlet switch for return water, respectively; V\({}_{\rm H}\) and V\({}_{\rm C}\) represent volume of hot and cold water, respectively; T\({}_{\rm H}\) and T\({}_{\rm C}\) represent temperature of supply and return water, respectively.  
The charging and discharging power of HS/CS tank can be formulated as  
\[P_{\phi,ch}(t)= c_{W}\cdot\rho_{W}\cdot V_{H}(t)\cdot(T_{H}-T_{C}). \tag{8}\] \[P_{\phi,dis}(t)= -c_{W}\cdot\rho_{W}\cdot V_{C}(t)\cdot(T_{C}-T_{H})\;. \tag{9}\]  
where \(P_{\phi,ch}\) and \(P_{\phi,dis}\) respectively indicate the charging and discharging power of the HS/CS tank, the subscript \(\phi\) represents the energy type--heating or cooling, \(c_{W}\) represents the specific heat capacity of water, \(\rho_{W}\) represents the density of water, \(V_{H}\) and \(V_{C}\) respectively represent the volume of the hot or cold water, and \(T_{H}\) and \(T_{C}\) represent the temperature of supply water and return water, respectively.  
The heating/cooling storage energy utilization in the charge and discharge modes is defined in discrete time as follows:  
\[E_{\phi}(t)= (1-\kappa_{\phi})E_{\phi}(t-1)+\eta_{\phi,ch}\cdot P_{\phi,ch}(t) \cdot\Delta t-\frac{P_{\phi,dis}(t)}{\eta_{\phi,dis}}\cdot\Delta t \tag{10}\]  
where \(E_{\phi}\) represents the heat or cooling energy stored in the tank; \(\kappa_{\phi}\) indicates the decay rate of HS or CS, which is assumed to be a constant; \(P_{\phi,ch}\) and \(P_{\phi,dis}\) respectively represent the charging and discharging power of the HS or CS; and \(\eta_{\phi,ch}\) and \(\eta_{\phi,dis}\) respectively represent the charging and discharging efficiency of the HS or CS.