**1. Introduction**

The development of the Smart Grid is contributing to the integration of renewable energy into the electric grid, which guides the needed decarbonization of energy consumption to deal with climate change and the depletion of fossil fuels. However, this development is increasing the complexity of the electric grid [1], adding new power system elements which must provide reliable operation in all kinds of different situations. One of these new systems is the Electric Vehicle Supply Equipment (EVSE), which is required for the grid integration of the Electric Vehicle (EV), including Battery Electric Vehicle (BEV) and Plug-in Hybrid Electric Vehicle (PHEV). Thanks to the Vehicle-to-Grid (V2G) functionality, the EVSE can work both as a load or as a generation source, using the energy of the EV battery available for secondary purposes, such as peak shaving, load frequency control, demand response or the managemen<sup>t</sup> of renewable energy surplus [2,3].

It is expected than in 2030, more than the 90% of the EVSE will be private [4], while over the 80% of EV charging currently takes place at home [5]. Accordingly, the main domains for V2G functionality will be Vehicle-to-Building (V2B) or Vehicle-to-Home (V2H), whether the building is connected to the grid or isolated, where several advantages has been proved [6]. In order to use this functionality, EVSE must be integrated into the building Energy Managment System (EMS), which will handle the charging or discharging according to the needs of the building [7,8]. Therefore, to ensure the proper behaviour of these new systems, the research of suitable test systems can establish the Smart Grid development [9,10].

There are several test system techniques in the literature, but the ones that exchange real power with the Hardware-Under-Test (HUT) give the most accurate results, due to the fact that they can probe the full system. A very promising technique to test the full system

**Citation:** García-Martínez, E.; Muñoz-Cruzado-Alba, J.; Sanz-Osorio, J.F.; Perié, J.M. Design and Experimental Validation of Power Electric Vehicle Emulator for Testing Electric Vehicle Supply Equipment (EVSE) with Vehicle-to-Grid (V2G) Capability. *Appl. Sci.* **2021**, *11*, 11496. https:// doi.org/10.3390/app112311496

Academic Editor: Michele Roccotelli

Received: 19 October 2021 Accepted: 30 November 2021 Published: 4 December 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

101

is the Power Hardware-In-the-Loop (PHIL) technique, which has the best trade-off between test fidelity and test coverage [11]. However, in applications like testing EV chargers, in which the number of tests carried out can be very high and they have a very defined functionality, the PHIL technique can be replaced by a power test bed, or also known as machine emulator [12].

Electric Vehicle Emulators EVE are powerful tools to develop and test EV charging stations. They have been used for a while for testing EVSE communication [13], unidirectional power [14,15] or unidirectional power and communications [16,17]. Besides, the requirements needed for a test bench based on PHIL for testing and verification of EV and EVSE are defined in [18]. However, bidirectional vehicles and chargers have a better impact on the stability of the Smart Grid, offering expanded flexibility services [5]. Therefore, the testing of these systems is an important step in the development of the present and future power electric grid.

This paper presents the details of the design and development for manufacturing the electric vehicle emulator for testing V2G chargers, with power factor grid correction functionality. The paper is organized as follows. Firstly, Section 2 analyses the main needs of the Electric Vehicle Emulator (EVE). The design of the system is described in Section 3, explaining every developed component. Then, in Section 4 the complete test system and some of the main results are shown. Finally, the conclusions are drawn in Section 5.

#### **2. EV Emulator Needs**

The EV battery needs a bidirectional power electronics system to charge and discharge its energy to the electric grid. However, current on-board EV chargers are only unidirectional and are not able to give energy to the grid. The main reason is that, as a rule of thumb, the unidirectional topologies can ge<sup>t</sup> higher power densities (W/m3) and more specific power (W/kg) than the bidirectional ones. Therefore, the V2G functionality is only available in DC standards, because in this case, the bidirectional power electronics converter is located in the EVSE, where the specific power index is not especially important.

Table 1 shows the current status of the DC chargers standards. Among these standards, CHAdeMO [19] is the first and most used standard with V2G capability [20]. There have been five updates of the protocol in order to include the different necessities of the new EV and their uses. Consequently, an electric vehicle emulator compatible with this standard will cover most of V2G EVSE in the market.


**Table 1.** Current status of the different DC chargers standards [20].

Accordingly, the EVE also needs a bi-directional power electronics system to test both charge and discharge. If the emulator takes energy from the same point of common coupling as the V2G charger, the electric consumption during the test is only the sum of EV emulator and V2G charger losses, which saves in general more than 90% of the test energy. Furthermore, if the power factor is close to 1, the test can be done in facilities with lower electric power supply, which also saves money and allows testing in several places. This is important for testing unidirectional chargers, especially old EVSE [21], since the Active Front End (AFE) can be a topology with no control of the reactive power consumed during the charging state. Therefore, an EVE with a four-quadrants AFE will be able to test different types of EVSE, ensuring low apparent power consumption during the complete test.

The end user of EVE should be laboratories which need to check the integration of the EV in a specific electric grid; for instance to test stability, time response, compatibility, etc. However, it could also be interesting for EVSE manufacturers to check the behaviour of their developments and for maintenance purposes. Therefore, extra functionality to debug the correct behaviour of the EVSE will be desired.

#### **3. EV Emulator Design**

*3.1. Overview*

A block diagram of the complete EV emulator system proposed with the HUT EV charger connection is shown in Figure 1.

**Figure 1.** General EVE testbench block diagram, pointing out the main power subsystems of the EVE (blue) and the HUT (red), as well as the communication interfaces defined between them (dark and light green).

The power electronics system is built up of one AC/DC grid side converter and one DC/DC vehicle converter, whose specifications are listed in Table 2. The two components communicate through an embedded low cost gateway, which is called Energy Box (EBox) [22], via Modbus RS485. The EBox also communicates via Modbus RS485 with the grid analyzer to measure in real time the active and reactive power of the HUT and with the Human–Machine Interface (HMI) via TCP/IP. Furthermore, a CHAdeMO protocol communication via CAN has been implemented in the DC/DC, which allows the emulator to interact with HUT, setting the power limits and the desired current during the test. In order to have galvanic isolation in the whole system, a three-phase transformer /Δ is connected between the AFE and the electric grid at 400 Vrms and 50 Hz.


**Table 2.** Main electrical parameters of the designed EVE.

## *3.2. DC/DC Converter*
