### State of the Art and Objectives  
In this context, specific microgrids for EV battery charging have been the subject of different studies in the last few years; they have in common the use of a medium voltage network (MV) as a primary energy source to satisfy the huge power demand in both fast and ultrafast charging [3; 4]. Moreover, it is generally accepted to include an energy storage system in the electrical architecture of the charging station to support the EVs charging in the moments of peak power demand [5; 6; 7] and use a hybrid ac/dc microgrid to implement the architecture [8]. A detailed study of the charging infrastructure market is reported in [9], where dedicated on-board chargers are reviewed, charging standards are updated, and the technology of stations for high-power off-board charging is commented on. Nonetheless, other than a succinct description regarding off-board converter topologies, there is no information on the use of specific microgrids for battery charging. There are several steps in the design of a microgrid for battery charging. The first one is to determine the power to be handled by the station and the number of charging points that will ensure a good quality of service [10]. A second issue is in regards to the design of the electrical architecture that can satisfy the power requirements. A subsequent aspect is modeling the microgrid as a state machine and establishing all its operating modes. From the latter point onwards, there are many degrees of freedom in the design, which depend on the approach used in the hierarchical control required in the implementation of the state machine. If power sharing is required, solutions reported in other types of microgrids can be employed, such as sliding mode control [11], distributed periodic event-triggered algorithms [12], and distributed hybrid control [13]. Based on a statistical analysis of real traffic data on a highway in the northeast of Spain, a hybrid microgrid was proposed for the electrical architecture of an ultrafast charging station (UFCS) whose steady-state operation was simulated in [14]. A block diagram of the microgrid is illustrated in Figure 1, where the MV grid supplies the station through a solid-state transformer (SST) [15] and the internal power distribution is carried out by means of an ac bus of 220 V and two dc buses of 600 V and 1500 V, respectively. The purpose of the 600 V dc bus is to insert renewable energy sources into the station, as depicted in Figure 1 by a wind turbine and a photovoltaic array. The 1500 V dc bus is the main dc bus and performs the charging in four points with a unidirectional converter in each one. The latter converter interfaces EV batteries with a nominal voltage in the range between 400 and 800 V.  
Charging four EVs simultaneously requires a maximum power of 1.5 MW, assuming both 95% efficiency in the power converters and the support of the energy storage system (ESS). The ESS provides the extra current required in that situation and consists of a battery package and a supercapacitor module, which gives a hybrid characteristic to the system with the aim of relaxing the power demand in the batteries and increasing its lifetime [16; 17; 18]. Nonetheless, the insertion of the hybrid energy storage system (HESS) into the microgrid is not a simple task because it requires a detailed analysis of the operating modes and transitions among them [19], together with the design of the appropriate control regulating the dynamic behavior of the transitions and the voltage of the main bus. Finding a balance between an automatic transition in two operating modes and a precise control regulating the transition requires the use of a hierarchical control.