## 2 Topology and Modelling of the Studied System
### DC Microgrid Power Supply  
The DC microgrid's sources are connected to the common DC bus. The electricity produced by PV sources is primarily for EV charging. Storage is an additional energy source to supply the EVs or to absorb excessive energy produced by PV sources. The public grid is used as a back-up source, which allows PV sources to sell excessive energy. If PV power is lower than the power demanded by the EVs, the additional power needed to charge EVs is provided primarily by the storage and then by the public grid. In contrast, the excess energy primarily feeds the storage, then is injected into the public grid [19; 23]. Based on the above analysis, the EVs are the only loads, as shown in Figure 1, and \(p_{PV},p_{S}\), \(p_{G}\), and \(p_{EVs}\) are respectively the power of the PV, the storage, the public grid, and EVs.  
The flow chart of the power management strategy of the DC microgrid is shown in Figure 2, which focuses on power system control.  
The management strategy, responsible for ensuring instant power balance, interacts with the EV shedding and EV restoration. Equation (1) expresses \(p^{*}\) that is the power reference to keep the stability of the DC bus voltage:  
\[p^{*}=(p_{PV\_MPPT}-p_{PV\_S})-(p_{EVs\_D}-p_{EVs\_S}) \tag{1}\]  
where \(p_{PV\_MPPT}\) is the PV power imposed by MPPT algorithm, \(p_{PV\_S}\) is the PV power needed to be shed, \(p_{EVs\_D}\) is the power demand of EVs, and \(p_{EVs\_S}\) is the EV power needed to be shed.  
In the power management strategy of the DC microgrid, \(p^{*}\) is provided by the public grid power reference \(p^{*}\)\({}_{G}\) and the storage power reference \(p^{*}\)\({}_{S}\), as presented in Equation (2):  
\[p^{*}=p^{*}\)\({}_{G}+p^{*}\)  
Figure 1: EV charging station based on a DC microgrid.  
A distribution coefficient, named \(k\), is introduced by Equation (3):  
\[k=\frac{{p^{*}}_{S}}{{p^{*}}_{S}+{p^{*}}_{G}}\text{, }k\in[0,1] \tag{3}\]  
The distribution coefficient \(k\) does not only take binary values, but also fractional values between zero and one.  
The power \({p_{S}}^{*}\) is calculated by Equation (4) and \({p_{G}}^{*}\) is calculated by Equation (5).  
\[{p_{S}}^{*}=k\cdot{p^{*}}\text{, }k\in[0,1] \tag{4}\]  
\[{p_{G}}^{*}=(1-k){p^{*}} \tag{5}\]  
To avoid storage damage by overcharging and over-discharging, the state of charge \(soc\) of the considered storage is limited: \(SOC_{MIN}\) is the \(soc\) lower limit and \(SOC_{MAX}\) is the \(soc\) upper limit. Also, maximum storage power \(P_{S\_MAX}\) is considered. Regarding the public grid, \(P_{G\_LIM}\) is the absolute value of the grid injection power limit (positive) and grid supply power limit (negative).  
The electrical scheme of the DC microgrid power architecture is given in Figure 3.  
PV sources, the storage system, and EVs are connected to the common DC bus through their dedicated static converters whose switching functions are \(f_{PV}\), \(f_{S}\), and \(f_{EVs}\) respectively. The rated DC bus voltage is considered to be 400 V.  
In order to properly charge EVs and the storage, static converters are required. The public grid connection is carried out by a three-phase bidirectional AC/DC converter with the following switching functions: \(f_{A}\), \(f_{B}\), and \(f_{C}\).  
Assuming that the system is ideal in terms of energy conversion, and neglecting the total losses of the power converter, the DC microgrid power balancing is given by Equation (6):  
\[{p_{G}}+{p_{S}}={p_{PV}}-{p_{EVs}}-{v_{C}}\cdot{C}\frac{{{dv_{C}}}}{{dt}} \tag{6}\]  
where \({v_{C}}\) represents the voltage of DC bus and \(C\) is the capacity of DC bus. In order to make the system work properly, it must always be respected.  
Figure 2: Flow chart of the power management strategy of the DC microgrid.