*1.3. Paper Organization*

The paper is organized as follows: In Section 2, the smart charging system and its place in the smart grid paradigm will be elaborated, after which the integration of forecasts will be presented in Section 3. The control scheme will be presented in Section 4. Finally, the obtained results are presented in Section 5.

#### **2. System Description and Smart Grid Implementation**

The proposed smart charging system consists of two stages: first, an optimization algorithm finds the optimal charging strategy based on a 15-min resolution. Secondly, a real-time scheduling algorithm operates in real-time within the optimization timesteps. This is integrated into a moving horizon window used to take care of forecast and estimation errors, such as PV/load power, EV arrival times, SoC estimation, etc. The smart charging system is designed to control a multi-port power converter that integrates a PV maximum power point tracker (MPPT), bidirectional BES charger, bidirectional EV charger, and grid-connected inverter on the same DC-link [31,32]; see Figure 1. By connecting these on the same DC-link, several inverting/rectifying power steps can be omitted, achieving higher efficiency and power density. All specifications are given in Table 1; the voltages of the EV and BES are based on [33,34]. Since the inverter is maintaining the power balance on the DC link, it does not require any additional setpoints from the smart charging system. Furthermore, a heat pump connects to the AC side for building heating and tap water. This study assumes that the state-of-charge (SoC) of the BES and EV are known according to the ISO 15118 standard. Finally, as part of the future smart grid, a Smart Grid Operator (SGO) is taken into account, which acts as an aggregator and intermediary between the ancillary services, wholesale market, and small-scale prosumers. This SGO provides the real-time electricity price (*λbuy*/*sell*) as well as up/downregulation prices (*λup*/*dwn*). As a result, the smart charging algorithm can take place in regulatory services and can take this into account in the optimization. Finally, the SGO can also limit the grid power of the system as part of a demand-side managemen<sup>t</sup> program, for which the user will be financially compensated afterwards.

**Figure 1.** Schematic representation of the system: A multi-port converter including electric vehicle (EV), BES charger, photovoltaïc (PV) maximum power point tracker (MPPT), and grid connected inverter. On the AC side, a heat pump and residential load are connected.


**Table 1.** Multi-port system parameters.

### **3. Second-Life Batteries**

Due to the increasing amount of EVs, new markets for second-life EV batteries emerge as EV batteries often have 70–80% remaining capacity left at the end of their EV lifetime [35]. These second-life batteries are then repurposed for stationary applications such as grid reinforcement or demand response systems. This reduces the cost of EV/BES ownership as well as increases the sustainability of the Li-ion batteries. In this study, the second-life value of both the EV and the BES is taken into account and used to assess the operational costs of EV/BES ownership more accurately. Additionally, in [36], it was found that second-life battery performance and state-of-health estimation is strongly influenced by its first-life performance. This motivates the use of a battery degradation model, which minimizes and monitors the degradation such that the performance of the battery in its second-life is increased and more easily assessed.

#### **4. Materials and Methods**

The proposed smart charging algorithm can be divided into three subsection: 1. forecasting, 2. optimal scheduling, and 3. moving horizon and real-time control scheme.
