Optimised controlled charging of electric vehicles under peak power‐based electricity pricing

This study presents a practical control method for electric vehicle (EV) charging optimisation for detached and attached houses. The developed EV charging control method utilises real-time measurements to minimise charging costs of up to two EVs in a single household. Since some Finnish distribution system operators have already launched peak power-based distribution tariffs for small-scale customers and because there is a lot of discussion on this kind of tariff development, the control method considers peak power-based charges. Additionally, the proposed smart charging control method utilises charging current measurements as feedback to reallocate unused charging capacity if an EV does not utilise the whole capacity allocated for it. The control method is implemented and tested with commercial EVs. The conducted hardware-in-the-loop simulations and measurements confirm that the control method works as intended. The proposed smart charging control reduces EV charging electricity distribution costs around 60% when compared to the uncontrolled EV charging.


Introduction
According to [1], the share of detached houses and attached houses of all Finnish dwellings are 38 and 14%, respectively. Furthermore, 50 and 22% of the households living in detached or attached houses, respectively, include two cars [2]. As electric vehicles (EVs) are emerging and more traditional internal combustion engine vehicles are being replaced by EVs, a notable number of detached and attached houses in Finland are likely to include two EVs in the future. The number of EVs in Finland have almost doubled every year since 2012 [3], and thus, the need for smart charging solutions is quickly increasing. The amount of EVs was around 30,000 at the end of 2019 [3]. Although a block of flats is the most common type of dwelling in Finland [1], only under 7% of these households include a second car [2]; therefore, EV charging in a block of flats is left out of this paper. Due to range anxiety, which is discussed further in [4], and the practicality of home charging, it is likely that many EV owners prefer to charge at home. Therefore, it is of great importance to enable cost-effective and practical domestic charging solutions.
It is a well-known fact that uncontrolled EV charging can negatively impact electric networks due to the daily load peak in a residential area and often occur soon after people arrive home after work [5,6]. Peak load management could be a key incentive for decentralised EV charging control methods to prevent potential congestions caused by uncontrolled EV charging. In Finland, three distribution system operators already use peak power-based tariffs for households and other small-scale customers [7][8][9]. According to [10,11], peak power-based tariffs are becoming more popular as they can improve the electricity pricing cost reflectivity. Therefore, peak load management as the main objective of the home charging control should be investigated. Since peak power-based tariff structures also tend to include traditional time-of-use (TOU) pricing, as seen in [7][8][9], night-time charging should be preferred. In Finland, there are currently no tariffs that combine demand charges and real-time (RT) electricity pricing, and thus, RT pricing is not considered in this paper.

Related work
Several studies in the literature, such as [12][13][14][15], have optimised EV charging in residential real estates. These studies optimise charging cost under TOU electricity pricing [12] or RT pricing [13][14][15]. However, these studies did not consider modern peak power-based tariffs. Several studies, such as [16][17][18], have already stated that solely TOU or RT electricity price minimisation-based EV charging can cause even higher load peaks than uncontrolled charging.
EV charging peak load limitations have been studied from different viewpoints, e.g. in cases of non-residential building [19], apartment building energy community [20], and residential real estate [21]. In [19], a real-time valley-filling algorithm to reduce peak demand in commercial and industrial buildings is proposed. Data such as charging time and energy dispensed from real EV charging sessions is used to determine the maximum flexibility of the EV charging. In [20], EV charging powers are adjusted to limit total monthly peak loads of an apartment building energy community. The peak power limit for a new month is estimated based on historical data, and then, if necessary, the limit is adjusted to a new level based on real-time measurements. In [21], the EV charging scheduling objective is to flatten the net load profile of a residential real estate with a photovoltaic (PV) generator. The charging scheduling problems were formulated and solved with quadratic programming approaches.
The algorithms presented in these studies limit peak loading, but they share common shortcomings when it comes to real-life solutions. EVs are often assumed to use the charging current set by the EV supply equipment (EVSE) as in [19][20][21], but the EVSE can only set the maximum charging current, and the EV on-board charger (OBC) decides the charging current below this limit. Therefore, an EV might not utilise the whole charging capacity allocated to it. This is discussed further in Section 2.1. If there is more than one EV, as opposed to [21], this can result in a non-ideal utilisation of the available charging capacity. Furthermore, many studies, such as [19,21], assume that plug-in durations or energy requirements are known by the EVSE. Since an accurate historical data-based prediction is not always available and the EV owners might not be willing to actively input their driving needs due to response fatigue [22], access to this kind of information may be difficult to obtain. Some EV models allow the user to track the battery SOC via a mobile application. However, there is currently no standardised method to transfer the data, and not all EV models have such a feature. Therefore, the utilisation of such information is excluded from this paper.
Load control implementations with commercial EVs are studied, e.g. in [23,24]. Study [23] presents a practical EV charging load control solution in which the total EV charging load limit is based on PV input and the maximum constant loading of the transformer. However, due to the high total charging capacity and the low number of charging points, there is no need to pause any charging sessions. Additionally, the load control does not consider the fact that EVs may not utilise the whole charging capacity allocated to them. Therefore, the control algorithm can be more simplified. In [24], a unique physical testbed for large-scale EV charging research is described, and a practical framework for online scheduling based on model predictive control and convex optimisation is presented. For optimisation purposes, the control system utilises a mobile application to collect user inputs, such as their expected departure and energy demand. Additionally, the charging currents are measured and used as feedback for the control algorithm. However, there was no mention of allocating the unused capacity for other EVs. It also remains to be seen how actively the EV users are willing to keep reporting their departure times and energy demands.
It is also worth mentioning that the EV charging peak loads could be mitigated by using, e.g. a battery energy storage system (BESS) as in [25]. Additionally, vehicle-to-grid (V2G) can be used for peak shaving and valley-filling as mentioned in [26]. However, this paper focuses solely on grid-to-vehicle charging, which ensures that battery degradation is not increased due to more frequent charging and discharging sessions. Additionally, at present, most of the commercial EVs and charging controllers, including the ones mentioned in Section 3.3, do not support V2G operation, and thus, V2G is excluded from this paper. Auxiliary energy storages for the household are not considered in this paper either, as they would increase the total system costs notably.
Based on the literature review, there does not seem to be an optimised but practical home charging solution, which considers modern peak power-based tariffs and the fact that a household might very likely include a second EV. This fact is the major motivation for this paper.

Contributions and structure
The contribution of this paper is to develop a smart charging control algorithm, which minimises the charging costs in a residential real estate under a modern peak power-based tariff and reallocates the unused charging capacity if an EV does not utilise the whole capacity allocated to it. According to the authors' best knowledge, there are no similar works presented in the literature. The effectiveness of the proposed control algorithm is demonstrated with commercial EVs through hardware-in-the-loop (HIL) simulations. The proposed control algorithm includes advantages such as the suitability for households with one or two EVs and the ease of implementation. The control algorithm does not rely heavily on predictions nor knowledge about the future. It is only assumed that the EVs are connected to charging points during the night time.
The rest of the paper is organised as follows. In Section 2, EV charging control is discussed, and the smart charging algorithm is introduced. In Section 3, the investigated case, related parameters, and laboratory setup are described. The results are presented in Section 4. Section 5 discusses the control system requirements, the assumptions made in the case study, and the suitability of the control system in other countries. In Section 6, the paper is finalised with conclusions.

Charging control
In the next subsection, the relevant properties of EV charging control are discussed. After that, the developed smart charging method and two simpler control strategies are described. These simpler control strategies are only used for comparison purposes. The idea is that the simpler control strategies do not require a separate control system, and thus, their implementation would be easier. However, the simpler control strategies do not dynamically limit currents nor peak powers, and they do not prevent overloading nor an increase in the peak power-based costs. This paper focuses on single-phase charging as it is often sufficient when considering the long parking duration and the moderate charging requirements of domestic charging. However, the smart charging algorithm could be extended to be suitable for three-phase charging with moderate modifications.

Controllability of EV charging
According to IEC 61851-1, the allowed charging current limits in mode 3 charging are 6-80 A [27]. An EVSE can use pulse-width modulation (PWM) through a control pilot circuit to indicate the charging current limit for the EV. By changing the duty cycle of the PWM signal, the EVSE can indicate a new maximum charging current limit. The standard limits the EVSE from initiating a new charging current limit within 5 s of the previous current limit.
IEC 61851-1 also determines that an EV shall indicate the readiness to receive energy. This is done by adjusting the EV side resistance of the control pilot circuit, which affects pilot voltage measured at the EVSE output. The information can be transferred forward from the charging controller to the control unit so that the number of EVs requiring charging energy can be calculated. This can be used to distribute the available charging capacity more effectively.
As mentioned in [24], an EV can charge with a lower rate than the pilot signal indicates for multiple reasons. For example, the maximum charging rate of the vehicle's OBC or the charging cable might cause a lower limit. Also, the OBC charger may choose a lower charging rate to protect the battery from overheating, or the battery might require slower charging when it is nearly fully charged. In Fig. 1, an example is given for the BMW i3 and Nissan Leaf (technical characteristics are shown in Section 3.3), where the charging currents decrease in the last ∼20 and ∼26 min, respectively, before becoming fully charged. The initial SOCs are about 33 and 40% for the BMW and Nissan, respectively. The charging currents are constant for about 2:02 and 2:37 h, respectively, before the batteries are close to being fully charged. Additionally, some EVs may be able to use only a few specific charging currents. For example, according to the measurements, the BMW i3 used in this study can only utilise 6 or 16 A currents for charging. Therefore, if a charging current limit of 15 A is set by the charging controller, the BMW would start charging with 6 A.
It is reasonable to assume that EVs can utilise different charging currents more flexibly in the future as OBCs will go through technical improvements. However, it is likely that there will be more opportunities for charging at different locations, such as homes, workplaces, and within the vicinity of commercial buildings. Therefore, it will be more likely that EVs are often close to their final SOCs, and in order to fully utilise available charging capacity in the case of multiple EVs, it becomes necessary to measure the actual charging currents drawn by the EVs. Even though this paper does not consider V2G, it is worth mentioning that the V2G operation is likely to include similar nonideal characteristics, where e.g. the vehicle's OBC might choose a lower discharging rate to protect the battery. Therefore, future V2G studies should be carried out using commercial EVs, which supports the V2G operation.

Proposed smart charging algorithm
The objective of the smart charging control method proposed in this paper is to reactively limit the peak loads and currents if necessary while ensuring that the available power capacity (APC) is used as effectively as possible. Additionally, the control method delays the EV charging to night-time hours (22:00-7:00) to reduce charging energy costs. Therefore, the EVs should be parked at home and plugged in to the charging points during the night. To balance phase loads, the control method gives priority to the phase with the lowest non-controllable load when only one EV can be charged at a time. The restriction to limit the total peak power of the real estate includes an acceptance that by using the charging algorithm, the EV charging process will take a longer time than without the algorithm.
To limit peak loading, it is necessary for the control method to know the highest non-controllable load peak of the building and its real-time electricity consumption. These can then be used to calculate the APC for EV charging, which will not increase the peak loads and thus peak power-based costs. It should be mentioned that the selected tariff [7] accounts for only 80% of the peak powers during night time, which effectively allows 25% higher peak loads during those hours without additional costs. It is expected that demand charges will be more notable in the future, and thus, the tariff with the highest demand charge is selected. The night-time peak power limit P limit can be determined according to the following equation: where P peak is the highest measured peak load, SF is a safety factor, and t is hour. The control method is chosen to adjust charging currents every 10 s. Since the charging currents cannot be adjusted more frequently according to the peak load limit and the real-time energy consumption of the household, a peak power safety factor of 0.99 is used to limit the highest allowed peak load to 1% under the target peak load. The highest non-controllable load peak can be estimated, and the control method can use the measurement data to detect whether the non-controllable loads reach a new peak value. A similar peak load management principle is used in [20]. The setup of the control system is presented in Fig. 2, and the block diagram of the control method is presented in Fig. 3. The control system can be, e.g. a microcomputer that runs the algorithm script. The control system requests EV charging states and realised charging current information from EVSEs and then sends new current limits calculated using the algorithm. Household electricity consumption and line voltages are measured using the household's smart meter and are sent to the control system when requested.
The algorithm starts (part 1 in Fig. 3) by calculating the available current capacities for phases A and B (ACC a , ACC b , respectively), the APC, and the number of EVs requiring a charge (N). ACC a and ACC b represent the currents that are available for EV charging while considering the household electricity consumption and the limit set by the main fuse of the building (25 A). APC represents the power available for EV charging while considering the household power consumption and the highest allowed peak load. The equations for ACC a , ACC b , and APC are presented in (2), where I fuse represents the current limit of the main fuse of the household (25 A), I sf is safety marginal (0.1 A) for the fuse, I a -I b are phase currents, and P household is the power consumption of the household If both ACC a and ACC b are below the minimum current limit (6 A), the APC is too low, it is daytime, or there are no EVs requiring  a charge, the EV charging should be disabled (part 2 in Fig. 3). To allow charging, APC should be high enough so that there are at least 6 A for EV charging with the present voltage level (∼230 V), which is measured in real time. If only one EV requires charging, the charging current should be limited according to APC and the respective ACC (part 3 in Fig. 3). The conditions and the charging current limits C limit for the EVs that are connected to phases A and B, respectively, are presented in (3), where S represents the charging state of an EV in accordance to the IEC 61851-1 standard, V is phase voltage, and I cp,max is the maximum current allowed by the charging point. Charging is only allowed if the charging state is C (EV is ready to receive energy) or D (EV is ready to receive energy but requires charging area ventilation) [27]. In most cases, the charging area ventilation is only necessary with higher charging powers (>32 A), and thus, its further analysation is excluded from this paper if S a t = C or S a t = D and ACC a t ≥ 6 and N = 1 and APC t /V a t ≥ 6 then C limit, a t = min ACC a t , APC t /V a t , I cp, max and N = 1 and APC t /V b t ≥ 6 then C limit, a t = 0 To allow two EVs to charge simultaneously, both ACC a and ACC b should be at least the minimum limit (6 A). Additionally, APC should be high enough so that the minimum charging current (6 A) for both EVs does not cause a new load peak in the given phase voltage levels (part 4 in Fig. 3). Available charging currents of up to 16 A could be used effectively to charge one EV. However, the algorithm prefers to charge two EVs, if possible, as it promotes phase load balancing within the real estate network. As mentioned earlier, an EV may not be able to utilise the whole charging current set by the EVSE. Therefore, the realised charging currents are measured and used as a feedback. If an EV is drawing less current than the set limit, the difference should be allocated to the other EV.
The condition to allow two simultaneous charging sessions is presented in (4). To allocate available charging capacity effectively, preliminary allocations C pre,limit are calculated first based on (5). After that, the algorithm calculates the unused charging capacity C unused of the previous control cycle from both EVs, as shown in (6), where C measured is the measured charging current. A margin of 1 A is used to determine whether the OBC is limiting the charging current below the set charging current limit. If the OBC limits the charging current, the expected charging currents C expected are calculated based on (7), which assumes that the charging current will stay on the same level set by the OBC even if its limit is increased. Finally, the charging current limits are updated according to (8) if N = 2 and APC t /avg(V a t , V b t ) ≥ 12 and ACC a t ≥ 6 and ACC b t ≥ 6 then (4) C pre, limit, a t = min ACC a t , I cp, max , APC t /2/V a C pre, limit, b t = min (ACC b t , I cp, max , C unused, a t − 1 = C limit, a t − 1 − C measured, a t C expected, a t + 1 = min C pre, limit, a t , C measured, a t C expected, b t + 1 = min C pre, limit, b t , C measured, b t C limit, a t = min (ACC a t , I cp, max , C pre, limit, a t + C pre, limit, b t − C expected, b t + 1 , C limit, b t = min (ACC b t , I cp, max , C pre, limit, b t + C pre, limit, a t − C expected, a t + 1 , If ACC a or ACC b is below the minimum limit (6 A) or if APC is not high enough to allow charging for the two EVs, only one EV can be charged (part 5 in Fig. 3). The conditions and charging current limits are presented in the following equations: if (ACC b t < 6 or (ACC a t > ACC b t and APC t /avg V a t , V b t ) < 12) and N = 2 then C limit, a t = min ACC a t , APC t /V a t , I cp, max if (ACC a t < 6 or (ACC b t > ACC a t and APC t /avg V a t , V b t ) < 12) and N = 2 then C limit, a t = 0 This case study does not consider a distributed generation such as solar power. However, optimal solar power use would be relatively simple in this case. The same algorithm, shown in Fig. 3, can be used during the daytime if it is modified so that the available charging capacity is equal to the excess solar energy that is not consumed by the household.

Simpler charging strategies
Naturally, the simplest EV charging strategy is the uncontrolled charging, where the EVs start charging immediately after being plugged in after arriving home. This would be the easiest solution for EV owners as this would not require any extra effort or any kind of charging control system at the charging station. As TOU electricity pricing is commonly used in detached households in Finland, the next most obvious simple control strategy would be to delay charging until night time (uncontrolled night-time charging). However, this would not likely lower the peak loads that much. In fact, if controllable loads, e.g. space heating and the hot water heater, are already utilising only nighttime electricity, night-time EV charging could cause even higher peak loads, as mentioned in [18].

Case description
The developed charging algorithm is tested using HIL simulations with a modified commercial charging station and two commercial EVs. A detailed description about the simulation environment is presented in the following subsections.

Detached house under study
The studied case is a detached house located in Pirkanmaa, Finland. It was built in 2010. The floor area of the building is 158 m 2 , and a geothermal heat pump is used as the main heating system. This represents a typical Finnish detached house.
The electricity consumption was measured in December 2018 in 1 s intervals. The daily average outdoor temperature was between −1 and − 5°C throughout the measurement period. Wintertime was chosen to be investigated in this case study so that the heating load would be high, with a limited capacity for EV charging. The highest measured hourly peak load was 6.88 kW. For phases A-C, the average currents over the whole measurement period were 2.9, 2.3, and 3.6 A, whereas the highest 1 h peak currents were 12.7, 12.4, and 13.8 A, respectively. The highest hourly peak loads and daily electrical energy consumptions are presented in Fig. 4.
The electricity consumption measurement started on Saturday (15.12.) at 12:53 h, which explains the low energy consumption during that day. There is notable loading every day around 18:00-20:00 h, but three of the highest daily load peaks occurred at 9:00, 12:00, and 22:00 h. The main fuse is sized as 3 × 25 A.
The residents own two passenger cars. Due to the limits set by the main fuse, the study focuses on charging points with a maximum charging current of 16 A. As phase C has the highest average loading, phases A and B are chosen for EV charging. Phase B has the lowest average and peak loading, so it is logical to use it to charge the EV with a higher charging requirement.

EV driving profiles
According to [28], passenger cars were driven almost 33,000 km/a in total in Finnish households with two cars in 2016. Car (B), driven the most, had an average distance of 21,900 km/a, whereas the other (A) had 11,000 km/a. The yearly driving distances equal to around 59.8 and 30.1 km/day, respectively. Passenger car trips most often start around 7:00 or 16:00 h on weekdays, according to [28]. During weekends, the most active passenger car usage is between 10:00 and 16:00 h [28]. The departure and arrival times used in this study are presented in Table 1. These values are used as a basis for this study. However, the impacts of different driving behaviours are discussed in Section 5.1.

Laboratory setup
The practical implementation of the EV charging control system is carried out at the Smart Grid Technology Lab [29] at TU Dortmund University. The lab included Nissan Leaf (A), BMW i3 (B), and a charging station, which made it possible to conduct the study. The technical characteristics of the EVs are presented in Table 2. The used charging point is a modified RWE eSTATION charging station with two independent charging sockets. Both charging sockets are suitable for charging powers up to 22 kW (400 V AC), but one of them is modified into a one-phase socket by disconnecting phases A and C. This was necessary to make sure that the BMW would charge using only phase B. The Nissan Leaf uses one-phase (phase A in this case) charging regardless of the opportunity for three-phase charging. As charging controllers, there were two Phoenix Contact Advanced EV charge controllers (type EM-CP-PP-ETH), which are fully compatible with the IEC 61851-1 standard and allow limiting the charging currents and reading the charging states through Modbus TCP/IP.
The control algorithm and the household simulations are run on a computer that was connected to the same local area network with a KoCoS EPPE CX power quality meter and charge controllers. The algorithm is implemented using the Python programming language and a Modbus library (ModbusTcpClient). The KoCoS meter measured the total electricity consumption and line voltages. In a real-life case, a smart meter could provide the same measurements as the KoCoS meter in this case. The KoCoS meter and the charging station are connected to the 400 V laboratory network. The pre-recorded household electricity consumption data are simulated and read from an Excel file in real time. The lab setup topology and the setup of the lab are presented in Figs. 5 and 6, respectively. The laboratory has been previously used in, e.g. [30], where the EVs were controlled to limit voltage violations and network congestion.

Results
The results of the HIL simulations are presented in this section. Table 3 presents the driving distances of the measurement period as well as the energy consumptions, which are calculated by using the values (currents and voltages) measured throughout the charging sessions.
The energy consumptions shown in Table 3 are the electrical energy drawn from the residential network, including losses, such as OBC and EVSE losses.

Analysing the operation of the proposed control algorithm
According to the results, the smart charging algorithm works as intended. This is illustrated in Fig. 7, where the peak load is successfully limited below 5.97 kW during the night time.
In Figs. 7-9, notations a-c represent phases, H is for household, C is for charging, and CL is for charging current limit set by the charging controller. Fig. 7 is presented in 1 min resolutions. A peak load of 4.77 kW was measured earlier on the same day during the daytime, resulting in the peak power limit of 5.97 kW according to (1). Fig. 7 shows that the EV charging load is increased and reduced depending on the electricity consumption of the household.
During the charging sessions, several unideal characteristics are identified, as illustrated in Fig. 8. Fig. 8a shows that there is always a delay of a few seconds between the current limit set by the charging controller and the actual charging current. This can cause short load peaks if the household consumption suddenly rises as in Fig. 8b at 22:38 h. However, this kind of peak load only lasts for about one control cycle which, in this case, is 10 s and thus its impact is negligible. In Fig. 8a, there is a slight anomaly in the behaviour of the Nissan (connected to phase A) at 22:25 h. The algorithm allows a 9-15 A charging current for the Nissan at 22:25:10 h, but the charging starts after 40 s (22:25:50 h). Within this time, the algorithm notices the unused charging capacity and allocates it for the BMW (connected to phase B). This causes a slight charging current peak for the BMW at 22:25 h. The measurements show that the control algorithm can reallocate unused charging capacity, but the used control cycle of 10 s might be unnecessarily short and result in a high number of control actions.
As shown in Fig. 4, there is a notable load peak (6.88 kW) in the real estate on Sunday. Therefore, the peak load limit is 8.60 kW during the night time according to (1) for the rest of the measurement period. Since the limit is quite high, the EVs are charged relatively fast. In Fig. 9, the charging sessions are illustrated for Monday.

Comparing the control strategies
For practical reasons, simpler control strategies are only simulated. The charging currents are assumed to stay at a constant 16 A for the bulk part of the charging sessions. The charging currents at high SOCs are modelled based on measurements of uncontrolled charging sessions. For the Nissan and the BMW, the charging currents start to decrease when there is under 0.90 and 0.39 kWh of energy, respectively, remaining to be charged. The charging curves at the final SOCs are presented in Fig. 10 in 1 min resolution.
The total charging energy is 103.2 kWh during the six days that were studied. By assuming that the average daily charging requirement stays the same, the total charging energy requirement would be 533.4 kWh for all of December. For the sake of simplicity, the peak power of 6.88 kW is assumed to be the peak power that determines monthly demand charges for the case where EV charging is not considered. These values can then be used to  (10), where X energy,day is the costs of daytime energy consumption, X energy,night is the costs of night-time energy consumption, X peak is the peak power-based costs, E day is the daytime energy consumption, and E night is the night-time energy consumption. The cost increments are presented in Table 4 ΔX energy, day = Ø energy, day * ΔE day ΔX energy, night = Ø energy, night * ΔE night ΔX peak = Ø peak * ΔP peak The proposed smart charging algorithm reduces charging costs by around 59.8% (10.7 €) when compared to uncontrolled charging. The uncontrolled night-time charging mostly affects the volumetric electricity costs instead of the peak demand charges. In Fig. 11, the total power consumptions in 1 min resolutions are presented for Monday.
It is worth mentioning that one of the uncontrolled night-time charging sessions could be delayed to later hours of the night. This could give time for the first sessions to finish before the second starts. Therefore, it reduces the probability of two simultaneous charging sessions and could reduce peak power-based costs. However, in practice, this could be an unreliable solution and inconvenient from the EV user's perspective. A very late charging start time could result in a higher probability that the EV would not be fully charged in the morning, and an earlier charging start time would more likely cause a similar peak load increase.

Discussion
This section discusses the requirements of the control system, the suitability of the control system in other countries, and the potential impacts of different EV usage. The discussions are divided into two separate subsections.

Requirements and suitability
The control system requires that the household consumption be measured with a smart meter. The smart meter is also a key component to enable more complex tariffs, such as peak powerbased tariffs. In Finland, the electricity consumption is measured by smart meters for over 99% of the network customers [31]. According to [32], 35% of households in the EU were equipped with smart meters in 2018. The current expectation is that smart meter penetration will reach 77 and 92% in 2024 and 2030, respectively. However, there are already several countries with smart meter penetrations of >80%, such as Denmark, Estonia, Italy, Malta, Spain, and Sweden [32].
The control system also requires that the realised charging currents be measured. Usually, this cannot be done by the charging controller itself, and thus, a separated energy meter is required on the EVSE. However, it is becoming more common that even the low-cost EVSEs include an energy meter as it does not notably affect the total costs of the EVSE.
The presented control method is suitable for detached houses and attached houses that include one or two EVs. Only 5% of the detached or semi-detached households include a third vehicle [2]; thus, they have been excluded from this paper. According to Eurostat [33], around 57% of the European population lives in detached or semi-detached houses, stating the importance of smart EV charging control in detached and attached houses. In Fig. 12, the 15 countries with the highest percent of residents living in detached houses or semi-detached houses are presented [33].

Impact of different driving behaviours
In this paper, it is assumed that the EVs would be charged solely at home. In reality, there are an increasing number of charging opportunities in, e.g. workplaces and shopping centres. Therefore, the real home charging requirement might be lower in most cases. However, a shorter driving distance would mostly decrease the electricity volumetric costs, and a home charging energy requirement of >3.6 kWh (∼20 km) could still cause the same maximum peak power increase. Additionally, in case of uncontrolled charging, it takes only 1 day where the household peak consumption and the EV charging load coincide to cause unnecessarily high monthly demand charges. Therefore, from a  According to the household electricity consumption measurements, the household consumes electrical energy around 10.5-16.0 kWh at night (22:00-7:00 h). As mentioned earlier, the highest load peak of the household is 6.88 kW. Since it occurs during the day, a loading of 8.60 kW can be allowed at night time without increasing the monthly peak power-based costs. Based on this loading limit and the night-time energy consumptions of the household, there is around 45.9-51.5 kWh of energy capacity for EV charging. This means that there would be enough charging capacity even if the daily driving distance of the EVs is doubled. The results shown in Fig. 9 also support this claim, as both EVs are fully charged before 2:30 h, which is the midpoint of the night time (22:00-7:00 h).
In this paper, it is also assumed that EVs are connected to the charging points at night (22:00-7:00 h). However, depending on the case (different charging requirements and different household electricity consumption), occasional late-night arrivals or early morning departures might not have any negative impacts. This is because the charging sessions finish before 2:10 h on average, so the required parking duration is not likely to be an issue.
When the EVs are driven notably more than average, or if they should be charged as fast as possible regardless of the costs, the residents should be allowed to manually override the charging load management. During this kind of event, the control system should only limit currents to avoid overloading. This would maximise the EV charging rates within the safe limits and thus minimise the charging need outside of home.

Conclusions
In this paper, a practical EV charging control method for detached and attached households is presented. Additionally, its operation is demonstrated using HIL simulations with commercial EVs. The control method is able to optimise the charging of two EVs under a peak power-based tariff.
The results of the HIL simulations show that the proposed smart charging algorithm successfully limits peak loading of the real estate and reallocates unused charging capacities for the other EV. When considering a modern peak power-based tariff, the algorithm reduces peak loads by 2.5 kW and offers around a 59.8% cost savings compared to uncontrolled charging. The objective for the charging control optimisation is based on Finland's specific needs. However, based on the statistical analysis, the control method will be useful in several other countries once peak power-based tariffs become more common for small-scale customers.
This paper does not consider V2G charging, BESS, or distributed generation, e.g. solar power. However, these topics will be studied in future works. Additionally, the presented charging algorithm accounts for a maximum number of two EVs, but it will be extended to be suitable for a higher number of EVs.

Acknowledgments
The work of Toni Simolin and Pertti Järventausta was supported by the LIFE-IP CANEMURE-FINLAND project (Towards Carbon Neutral Municipalities and Regions in Finland) and Prosumer Centric Energy Communities -Towards Energy Ecosystem (ProCemPlus). Kalle Rauma acknowledges the support of the German Federal Ministry of Transport and Digital Infrastructure through the project, 'PuLS -Parken und Laden in der Stadt'.