1 Introduction

An electric vehicle (EV) offers several benefits over a combustion-based vehicle, such as independence from fossil fuels, zero tailpipe emissions, superior drivetrain, provision for regenerative braking, and less fuel and maintenance costs. With widespread usage, EVs can collectively enhance a nation’s energy security against oil imports, improve the air quality in cities, increase transportation efficiency and lower the cost of mobility [1,2,3]. These environmental and socio-economic benefits have prompted authorities across the world to promote EVs as the future of road transportation. However, large-scale deployment of EVs could jeopardize the healthy operation of power systems when the EV batteries are being recharged simultaneously [4]. Due to the high correlation between EV plug-in time and peak-load hours, it is anticipated that domestic EV charging could triple the system peak load [5]. The relative increase in peak load will be more severe at the low-voltage distribution level due to the predominance of commercial and industrial loads at higher network levels [6]. Unregulated EV charging can increase the peak load, power loss, voltage fluctuations, and the need for network reinforcements at the distribution level [7]. These adverse impacts can be alleviated using smart charging solutions, in which the distribution system operator (DSO) coordinates EV charging to improve the technical or economic aspects of power distribution. The communication infrastructure and information technology required to regulate EV charging remotely is expected to be a standard feature in future smart grids.

Smart charging of EVs can be used to achieve peak shaving, load leveling, loss minimization, grid-usage maximization, or voltage enhancement [8]. Peak shaving strategies prevent the need for expensive peaking plants to come online [9]. Load leveling can be realized by minimizing the peak-valley difference of system demand [10] or the variance from optimal loading using convex optimization [11]. The efficiency of power distribution can be improved by minimizing the power loss in the network with interval optimization [12] or maximum sensitivity selection optimization [13]. Charging strategies that increase the network utilization by maximizing the energy delivered to EVs have also been implemented [14, 15]. As the electricity demand of an EV is comparable to that of an average household [16], the start and end of EV charging tasks represent sizeable load variations on the network that are capable of producing significant voltage deviations. The voltage fluctuations can be minimized by scheduling EVs using dynamic programming [8] or meta-heuristic methods [17] while the acceptable range of magnitude can be enforced with voltage constraints [18, 19].

One drawback shared by all of the above strategies is the lack of incentives for customer participation in centralized charging schemes. EV owners should be offered monetary rewards for handing over the charging control of their vehicles to the DSO. The incentives could be in the form of financial compensation [20] or reduction in energy cost [21]. As domestic charging of EVs is expected to double the electricity bill of consumers [5], cost minimization could attract reluctant EV owners. An optimal charging strategy that minimizes the charging cost of EVs using convex optimization was proposed in [22]. A scheduling scheme that minimizes the total electricity cost of customers using heuristic algorithms was presented in [23]. A control algorithm that reduces the charging cost by utilizing vehicle to grid technology was developed in [24]. The performance of multiple unidirectional and bidirectional charging algorithms that seek charging-cost minimization was compared in [25]. A centralized controller that minimizes the charging cost was implemented using binary particle swarm optimization in [26]. However, the impact of cost-minimized charging on the operation of the distribution system was not considered in any of the above works. In [27], the authors concluded that cost-minimizing charging strategies which do not take the distribution network into account could lead to suboptimal power delivery. Moreover, smart charging algorithms that ignore the impact on power distribution could violate network capacity limits [28].

This paper presents a smart charging scheme that minimizes the total energy cost incurred by customers with respect to a time-varying electricity price. Here, the term energy cost refers to the sum of EV-charging cost and the operating cost of conventional non-EV loads. In addition to validating the proposed charging scheme’s cost-saving, its impact on the operation of the distribution system is also analyzed in this paper. The effects of smart charging on the distribution network’s peak demand, load factor, energy loss, distribution efficiency, voltage magnitude, and voltage unbalance are investigated in this study. Unidirectional charging, in which the direction of energy flow is always from grid to vehicle (G2V), and bidirectional charging, in which energy may flow in G2V or vehicle-to-grid (V2G) directions are both considered in this study. Furthermore, conventional day-ahead scheduling schemes have limited applicability in the case of EVs due to the unpredictability of their availability [29]. Day-ahead scheduling of EVs can be practical only if charging contracts in which the EV users commit to plug in their vehicles at a designated time have been signed in advance [22]. The scheduling scheme in this paper utilizes a dynamic approach that does not presume the knowledge of future EV trips and instead relies on solving the scheduling problem multiple times within the scheduling horizon.

The rest of this paper is organized as follows: Section 2 formulates the energy-cost minimization problem. In Sect. 3, the simulation models and the case studies are discussed. The analysis of the simulation results is provided in Sect. 4 and Sect. 5 presents the concluding remarks.

2 Energy-cost minimization

The different aspects of energy-cost minimization, such as energy pricing, the dynamic scheduling approach and problem formulation are presented in this section.

2.1 Energy pricing

It is not possible to minimize energy costs under fixed tariffs, in which the electricity price remains constant throughout the day. The potential for cost minimization with smart charging exists only under time-varying tariffs, in which the price of electricity depends on the time of consumption. Real-time pricing tariff, in which the price is a function of demand, is an effective way of promoting the participation of EV owners in charge scheduling schemes [30]. As the EVs gain wider acceptance from the public, EV charging loads will begin to influence the electricity price [27]. When the EV charging cost attains a significant market share, the DSO can affect the electricity prices by manipulating the system demand with controlled EV charging [31]. In this paper, the real-time relationship between electricity price and system demand is approximated by a linear relation [22]. The first-order approximation leads to a tariff in which the real-time price at time t, denoted by \(r^t\) is a linear function of the system demand, given by

$$\begin{aligned} r^t = k_0+k_1 \times L_\mathrm{{sys}}^t \end{aligned}$$
(1)

where \(k_0\) (in $/kWh) and \(k_1\) (in $/kWh/kW) are positive real numbers denoting the intercept and slope of the linear relationship. The total load on the system, \(L_\mathrm{{sys}}^t\) consists of two parts—the base load, \(L_\mathrm{{base}}^t\) and the EV charging load, \(L_\mathrm{{EV}}^t\), such that,

$$\begin{aligned} L_\mathrm{{sys}}^t = L_\mathrm{{base}}^t+L_\mathrm{{EV}}^t \end{aligned}$$
(2)

The conventional domestic appliances are assumed to be price-inelastic loads that must be supplied with the exact power required irrespective of the electricity price. The operation of these household loads depends on the convenience of individual consumers and cannot be scheduled centrally. As a result, the aggregated demand of these non-EV loads represents the base load on the system that is beyond the DSO’s control. On the contrary, EVs represent price-elastic loads, the operation (charging) of which can be remotely manipulated by the DSO in response to price variations. The entire premise of energy-cost minimization rests on the DSO’s ability to monitor, optimize and control the charging power of individual EVs, so that the EV charging load \(L_\mathrm{{EV}}^t\), the subsequent system demand \(L_\mathrm{{sys}}^t\) and the electricity price \(r^t\) will be at their optimal values. Thus, EV charging power represents the control variable of the cost-minimization problem.

Furthermore, the base load is assumed to be a deterministic quantity, with the value of \(L_\mathrm{{base}}\) known in advance by virtue of accurate load forecasts or real-time load reports from smart meters. In contrast, the EV charging load represents the stochastic component of the system demand. The value of \(L_\mathrm{{EV}}\) cannot be forecast ahead of time as it depends on the travel pattern of EV users, which is highly unpredictable. As day-ahead scheduling strategies will be ineffective in dealing with the stochastic nature of EV energy requirement, a dynamic scheduling scheme is utilized here.

2.2 Dynamic scheduling of EVs

In order to account for the unpredictability in EV mobility, it is necessary to divide the period under study into smaller intervals. The scheduling horizon of one day can be discretized into equal time slots that are \(\Delta t\) hours long. The dynamic scheduling algorithm will check for new EV arrivals, update the problem parameters and recompute the optimal solution at the beginning of each time slot. The iterative approach ensures that the maximum delay between the arrival of an EV and the processing of its charging request will never exceed \((\Delta t \times 60)\) min. As the value of \(\Delta t\) tends to zero, the scheduling scheme approaches real-time operation and can respond to system events almost instantaneously. However, the number of times the optimization problem is solved during the day, i.e., \((24/\Delta t)\) would approach infinity.

Thus, choosing the temporal resolution of the scheduling horizon is based on a trade-off between the speed of response to changes in the system (such as EV arrival) and the frequency of solving the optimal scheduling problem. In this paper, the value of \(\Delta t\) is set to 0.25 h (15 min), such that one day is evenly divided into ninety-six time slots. Let \(\mathbb {I}=\{1,2,\ldots ,96\}\) represent the set of time-slot indices in a day, which is assumed to begin at 12 noon and end 24 h later at 12 pm on the next day. Hence, the first element in \(\mathbb {I}\) refers to the 12:00 pm–12:15 pm time slot and the last element corresponds to the 11:45 am–12:00 pm interval of the following day. Simulation variables such as number of plugged-in EVs and the base load are assumed to remain constant within a time slot.

Assume that the current time is \(t^i\), which denotes the starting time of the ith \((\forall i \in {\mathbb {I}})\) interval. Let \({\mathbb {N}}\) denote the set of all EVs that will be charging during the day and \({\mathbb {P}}^i\) denote the subset of all EVs that are plugged-in at \(t^i\), such that, \( {\mathbb {P}}^i \subset {\mathbb {N}}\). The nth vehicle \(EV_n \; (\forall n \in {\mathbb {N}})\) belongs to \({\mathbb {P}}^i\) if it satisfies the condition \(t_n^{arr} \ge t^i\) and \(t^i < t_n^{dep}\), where \(t_n^{arr}\) and \(t_n^{dep}\) denote the timings of the EV user’s arrival at and departure from home. It is assumed that the EV user plugs in the vehicle for charging immediately upon reaching home, so that any time lag between \(t_n^{arr}\) and the plug-in time can be neglected. In a smart grid environment, the set of plugged-in EVs can be determined by detecting connection to the smart charging points.

The dynamic arrival of EVs can be managed by using charging horizons that are subsets of the scheduling horizon and slide forward in time. A charging horizon can be defined as the set of time slots from the current interval for which the charging schedule of plugged-in EVs should be optimized. At the beginning of a time slot, once the set of plugged-in EVs has been determined, the next step is to define the length of the charging horizon. The charging horizon for the ith slot, denoted by \({\mathbb {H}}^i\) represents the number of time slots from time \(t^i\) for which the charging of EVs in \({\mathbb {P}}^i\) will be scheduled. The charging horizon extends up to the departure time of the last vehicle in the plugged-in EV set, i.e., max(\(t_n^{dep}\,|\,n \in {\mathbb {P}}^i\)). Thus, the charging horizon comprises the consecutive time slots between its start and end times, such that \({\mathbb {H}}^i \subset {\mathbb {I}}\).

Fig. 1
figure 1

Dynamic scheduling of EVs

An instance of the charging horizon is illustrated in Fig. 1, which corresponds to a sample scenario with four EVs, i.e., \({\mathbb {N}}=\{EV_1,EV_2,EV_3,EV_4 \}\). At time \(t^i = \text {1 p.m. } (i=5)\), the plugged-in EV set, \({\mathbb {P}}^{5} = \{EV_2, EV_3\}\). The charging horizon \({\mathbb {H}}^{5}\) extends from the 5th (current) time slot to the 11th one (2:30–2:45 p.m.), by which time both the EVs in \({\mathbb {P}}^{5}\) would have departed. Thus, at the beginning of the 5th time slot, the optimal charging schedules for \(EV_2 \text { and } EV_3\) are prepared for the 1 p.m.–2:30 p.m period. At the beginning of the next slot (1:15 p.m.), the starting time of the charging horizon slides to the right by one time slot. The charging schedule is then re-optimized with updated parameters like new EV arrivals if any, energy available in the EV batteries and time left to acquire the desired energy in the new charging horizon. In this manner, the charging horizon slides forward in time during the day and incorporates new EV arrivals dynamically.

2.3 Optimization problem formulation

Once the currently plugged-in EVs and the charging horizon have been determined, the next stage is the optimization of the charging schedule. The optimal charging schedule defines the best way, i.e., at what time and at what power to charge (or discharge) the EV batteries in order to minimize the energy costs with respect to the time-varying price of electricity. More specifically, the scheduling algorithm’s objective at time \(t^i\) is to minimize the total energy cost incurred during the charging horizon \({\mathbb {H}}^i\) by optimizing the charging power of the vehicles in the plugged-in EV set \({\mathbb {P}}^i\).

The total energy cost, \(C^{total}\) is calculated by summing the energy cost incurred during each time slot in the charging horizon, i.e.,

$$\begin{aligned} C^{total} = \sum _{h \in {\mathbb {H}^i}} C^h \end{aligned}$$
(3)

where \(C^h\) denotes the energy cost during time slot h, which is obtained by levying the slot price on the total energy consumed during that interval, i.e.,

$$\begin{aligned} \begin{aligned} C^h&= r^h \times L_{\mathrm{{sys}}}^h \times \Delta t \\&= \left[ k_0+k_1 \left( L_{\mathrm{{base}}}^h+L_{\mathrm{{EV}}}^h\right) \right] \times \left( L_{\mathrm{{base}}}^h+L_{\mathrm{{EV}}}^h\right) \times 0.25 \end{aligned} \end{aligned}$$
(4)

By courtesy of accurate load forecasts, the base load can be assumed to be a known entity during the optimization. Thus, the \(L_{\mathrm{{base}}}^h\) term in (4) can be replaced with a constant, say c, so that:

$$\begin{aligned} \begin{aligned} C^h&=0.25 \left[ k_0\Big (c+L_{\mathrm{{EV}}}^h\Big )+k_1\Big (c+L_{\mathrm{{EV}}}^h\Big )^2 \right] \\&=c_0 + c_1L_{\mathrm{{EV}}}^h + c_2\Big (L_{\mathrm{{EV}}}^h\Big )^2\\&= f\Big (L_{\mathrm{{EV}}}^h\Big ) \end{aligned} \end{aligned}$$
(5)

where f denotes a quadratic function with parameters \(c_0 = 0.25(k_0c + k_1c^2), c_1 = (0.25k_0+0.5k_1c) \text { and } c_2=0.25k_1\).

Thus, the total energy cost in (3) can be minimized by optimizing \(L_{\mathrm{{EV}}}^h\), which is given by:

$$\begin{aligned} L_{\mathrm{{EV}}}^h = \sum _{n \in \mathbb {P}^i} p_n^h \end{aligned}$$
(6)

where \(p_n^h\) denotes the charging power of the nth EV during time slot h. From (3), (5) and (6) it is evident that the decision variable of the scheduling problem is \(p_n^h\), by optimizing which the total energy cost can be minimized. Positive values of \(p_n^h\) indicate charging (G2V) operation, whereas negative values correspond to energy discharge (V2G).

Thus, the dynamic energy-cost minimization problem can be mathematically stated as follows:

$$\begin{aligned} \min _{p_n^h} \sum _{h \in {\mathbb {H}}^i} \left[ c_0 + c_1 \sum _{n \in {\mathbb {P}}^i} p_n^h + c_2 \left( \sum _{n \in {\mathbb {P}}^i} p_n^h \right) ^2 \right] \end{aligned}$$
(7)

subject to the following constraints:

  • Charging power: The upper bound on charging power depends on \(P^{max}\), the maximum rating of EV charger beyond which it cannot be operated. The lower bound depends on the type of charging. If only unidirectional charging is considered, the charging power will always be nonnegative, such that:

    $$\begin{aligned} 0 \le p_n^h \le P^{max}, \quad \forall n \in {\mathbb {P}}^i, \, \forall h \in {\mathbb {H}}^i \end{aligned}$$
    (8)

    However, under bidirectional energy flow the charger can also be loaded in the negative direction up to its maximum rating, such that:

    $$\begin{aligned} -P^{max} \le p_n^h \le P^{max}, \quad \forall n \in {\mathbb {P}}^i, \, \forall h \in {\mathbb {H}}^i \end{aligned}$$
    (9)
  • Battery energy: The energy available in the nth vehicle’s battery at the start of time slot h can be calculated as:

    $$\begin{aligned} E_n^{av(h)}=E_n^{ini} + \sum _{g \in {\mathbb {G}}^h} \left( p_n^g \times \Delta t\right) \end{aligned}$$
    (10)

    where \({\mathbb {G}}^h\) denotes the current previous-interval set, defined as the set of time slots that belong to the current charging horizon \({\mathbb {H}}^i\) but are no later than time slot h. \(E_n^{ini}\) denotes the initial energy available in the battery at the start of the charging horizon (time slot i), such that, \(E_n^{ini} = E_n^{av(i)}\). At any time slot h, \(E_n^{av(h)}\) cannot exceed the rated battery capacity, \(E_n^{cap}\). Moreover, under unidirectional charging, as there is no chance for energy discharge from the battery, the lower limit equals the initial energy at the beginning of the charging horizon, such that:

    $$\begin{aligned} E_n^{ini} \le E_n^{av(h)} \le E_n^{cap}, \quad \forall n \in \mathbb {P}^i, \, \forall h \in \mathbb {H}^i \end{aligned}$$
    (11)

    With bidirectional charging enabled, it is possible for the battery energy to fall below its initial value while discharging. In this case, the lower limit is set to zero, beyond which further discharge is physically not possible. Thus, for bidirectional charging:

    $$\begin{aligned} 0 \le E_n^{av(h)} \le E_n^{cap}, \quad \forall n \in {\mathbb {P}}^i, \, \forall h \in {\mathbb {H}}^i \end{aligned}$$
    (12)
  • User satisfaction: The final battery energy at the time of departure should be at the level desired by the EV user. The final energy can be computed by adding the total energy transferred over the charging horizon to the initial energy. The energy transferred to the EV is obtained by summing the energy transferred during each time slot over the whole charging horizon. Thus, the satisfaction of EV users can be guaranteed by ensuring that:

    $$\begin{aligned} E_n^{ini} + \sum _{h \in {\mathbb {H}^i}} \left( p_n^h \times \Delta t\right) = E_n^{des}, \quad \forall n \in {\mathbb {P}}^i \end{aligned}$$
    (13)

    where \(E_n^{des}\) denotes the battery energy desired by the EV user at departure.

In the problem formulation presented above, the objective function is quadratic and all the constraints are linear. Therefore, the energy-cost minimization problem is a quadratic programming problem, the solution to which provides the optimal charging powers, \(p_n^{h*} \, (\forall n \in {\mathbb {P}}^i, \,\forall h \in {\mathbb {H}}^i )\). By charging the EVs at these optimal values, the DSO can ensure that the total energy cost is at its minimum value given by:

$$\begin{aligned} C_{\mathrm{{min}}}^{total} = \sum _{h \in {\mathbb {H}}^i} f \big (L_{\mathrm{{EV}}}^{h*}\big ) = \sum _{h \in {\mathbb {H}}^i} f\bigg (\sum _{n \in {\mathbb {P}}^i} {p_n^{h*}} \bigg ) \end{aligned}$$
(14)

3 Test system modeling

3.1 Network topology

Fig. 2
figure 2

One-line diagram of the test system

The IEEE European Low-Voltage Test Feeder is used as the test system in this work. It is a radial distribution feeder supplying 55 residential consumers with single-phase voltage of 240 V at 50 Hz frequency. The one-line diagram of the test system is shown in Fig. 2. The feeder is supplied by a 11 kV/416 V, 200 kVA three-phase distribution transformer. The nodes at which customers are connected are represented by disks, the color (red, yellow or blue) of which depicts the phase (R, Y or B) of connection. The R phase is loaded most heavily with twenty-one connections, followed by Y phase with nineteen and B phase with fifteen, resulting in an unbalanced system. Each connection represents a residence with a connected load of 3 kW. All the household loads are assumed to operate at a power factor of 0.95 lagging. The test system data also provides the energy consumption pattern of each household for a day, the aggregate of which gives the base load profile.

3.2 Pricing model

The real-time price of electricity is to be calculated at the beginning of each 15-min time slot, using the relation given in (1). The coefficients of the pricing model are set as \(k_0=2.6 \times 10^{-3} \;\) $/kWh and \(k_1=3.12 \times 10^{-3} \;\) $/kWh/kW , which represent a scaled version of the values used in [22]. The scaling factor selected is such that the average price under base load scenario is 13.17¢/kWh (1¢ = $0.01), which is comparable to the average residential price for electricity in the USA [32]. The resulting pricing model is:

$$\begin{aligned} r^t = 2.6 \times 10^{-3} + \big (3.12 \times 10^{-3}\big ) \times L_\mathrm{{sys}}^t \end{aligned}$$
(15)

3.3 EV model

The level of EV penetration determines the percentage of households possessing EVs. In this paper, the penetration level is assumed to be 100%, which is the worst-case charging scenario from the DSO’s perspective. This extreme scenario also makes it easier to appreciate the benefits of smart charging. Each EV is serially assigned with an ID between 1 and 55. The charging location of \(EV_n\), which denotes the nth EV, in the network can be identified by matching its ID with the number assigned to each node in Fig. 2. The phase at which EV charging occurs is given by the color of the respective node. The phase-wise distribution of the EVs while charging from the network is tabulated in Table 1.

The EVs plugged into the system are modeled as single-phase constant-power loads during load flow analysis [33]. The EV chargers are rated at 3 kW which corresponds to a maximum current of 16 A that is common in European networks [27]. The chargers are assumed to operate at unity power factor with negligible power losses and harmonics. The battery capacity of each EV is assumed to be 20 kWh. The energy required by an EV depends on its battery’s initial state of charge (SOC) at plug-in and the desired SOC at plug-out. The SOC of a battery refers to its stored energy, expressed in per unit (pu) of the rated capacity. The initial SOC values assigned to EVs are uniformly randomized in the [0.15, 0.6] pu range [20]. All the EVs are required to be fully charged (unity SOC) by the hour of departure, which is declared by the EV user at the time of plug-in.

Previous studies [23, 34, 35] have used Gaussian distributions to model travel pattern of vehicles and generate arrival and departure times of EVs. The same trend of using a Gaussian distribution with mean and standard deviation values in accordance with real-life travel patterns [36] is followed in this study. The probability density function for arrival time, \(\rho ^{arr}(t)\) is defined with a mean of 6 p.m. and standard deviation of 2 h [23], such that, \(\rho ^{arr}(t) = 0.2\mathrm{{e}}^{-0.125(t-6)^2}\). Similarly, the hour of departure is assigned a distribution with 8 a.m. mean and a standard deviation of 2 h, such that, \(\rho ^{dep}(t) = 0.2\mathrm{{e}}^{-0.125(t-20)^2}\).

3.4 Case studies

3.4.1 Base load scenario

The base load refers to that component of the system demand which is beyond the DSO’s control. In the absence of EVs the system demand equals the base load alone, giving rise to the base load scenario. The base load scenario represents the benchmark against which the impacts of EV charging can be compared. With the integration of EVs, the EV charging load gets appended to the base load on the system. The EV charging load on the system depends upon the type of charging, as explained below.

Table 1 Phase-wise distribution of the EVs

3.4.2 Dumb charging of EVs

Dumb charging, also known as uncontrolled charging, occurs when the EVs are allowed to charge at the maximum rate as soon as they are plugged-in, irrespective of the electricity price. The charging continues until the energy requirement is satisfied or the vehicle departs, whichever occurs first. Here, the plug-in duration of each EV is assumed to be greater than the time required for full charge. Thus, the EVs continue to charge until the batteries attain the desired SOC. In this scenario, both the number of EVs plugging in during a time slot and the subsequent charging load on the system are random. Under real-time pricing, dumb charging is financially unfavorable as majority of the EV users tend to plug in their vehicles upon returning home from work during the evening, when the system demand and electricity price will be relatively higher.

3.4.3 Smart charging of EVs

Under smart charging, each plugged-in EV is assigned an optimal charging schedule that determines the intervals during which the vehicle is allowed to charge and the rate (power) at which it does so. In this scenario, although the number of EVs plugging in during a time slot continues to be random, the charging load applied on the system is not; it is maintained at the optimal value by the DSO. Two types of smart charging strategies are considered-

  1. 1.

    Unidirectional charging: Energy flows from grid to vehicle alone. For the sake of brevity, this charging scheme will be referred to as ‘smart G2V’ from here on. The smart G2V problem is defined by (7) and constrained by (8), (11) and (13). Under smart G2V, energy-cost minimization is essentially charging-cost minimization as the energy drawn by non-EV loads from the distribution network cannot be affected.

  2. 2.

    Bidirectional charging: Energy can flow from vehicle to grid also. The term ‘smart V2G’ will be used in subsequent references to this case. Smart V2G can be implemented by realizing the objective in (7) subject to the constraints in (9), (12) and (13). V2G presents the opportunity for discharging the EV batteries during peak load hours to regulate the prices, and compensate for the lost charge during the cheaper off-peak hours.

The lack of DSO’s supervision and the fixed charging power under dumb charging is evident from the schematic in Fig. 3. Bidirectional communication between the DSO and EVs is critical for implementing smart charging. From the vehicle owner’s perspective, EV information such as tentative departure time and desired battery energy should be uploaded and the optimal charging power for each interval downloaded. The DSO selects the optimal charging power from a set of possible values. The range of charging powers that can be utilized under each mode along with the time limit for charging is also indicated in Fig. 3. A wider range of charging rates is available under smart V2G due to the provision for bidirectional power flow. A flowchart of the different steps involved in simulating the case studies is displayed in Fig. 4.

Fig. 3
figure 3

Types of EV charging

Fig. 4
figure 4

Flowchart depicting the different case studies

4 Results and analysis

The cost-minimization problem was solved using the CVX package [37] in MATLAB. A hybrid MATLAB-OpenDSS platform was used to model the test system, simulate EV charging and execute load flow studies.

4.1 Energy-cost minimization

The real-time electricity price during the day, \(r^i \, (\forall i \in {\mathbb {I}})\) under different scenarios are compared in Fig. 5. Based on these prices, the total energy cost incurred by the consumers over the day, \(C^{day}\) can be calculated as:

$$\begin{aligned} C^{day} = \sum _{i \in {\mathbb {I}}} C^i = \sum _{i \in {\mathbb {I}}} (r^i \times L_{sys}^i \times \Delta t) \end{aligned}$$
(16)
Fig. 5
figure 5

Real-time price of electricity

The values of \(C^{day}\) under each scenario are tabulated in Table 2. The base energy cost, \(C^{day}_\mathrm{{base}}\) refers to the cost incurred by the non-EV base load. EV charging indirectly influences \(C^{day}_\mathrm{{base}}\), by escalating the system demand and the subsequent prices. \(C^{day}_\mathrm{{base}}\) is highest under uncontrolled charging on account of the concurrence of EV charging with the peak hours of base load, which leads to the highest prices.

Table 2 Components of energy cost incurred by customers

The range of prices during peak load hours is significantly lower under smart charging, which defers EV charging to off-peak hours. Although this results in higher off-peak prices, the net effect is one of cost-saving. The electricity price under smart G2V can never be brought below the base load prices. At best, the smart G2V prices during peak load hours can overlap with the base load prices. In contrast, smart V2G can lower the prices further by injecting power into the network and modifying the system demand. It can be observed from Table 2, that smart G2V is able to halve the charging cost, \(C^{day}_\mathrm{{EV}}\). The energy discharge under smart V2G results in a higher \(C^{day}_\mathrm{{EV}}\) than smart G2V on account of the enhanced energy requirement to make up for the lost charge. However, the reduction in \(C^{day}_\mathrm{{base}}\) outweighs the increase in \(C^{day}_\mathrm{{EV}}\) leading to an additional saving of $4.13 in the total energy bill.

4.2 EV charging-power profile

Figure 6 compares the charging profile of two different EVs: \(\mathrm{{EV}}_1\) that plugs in at 7:30 p.m. with 0.76 pu battery SOC and departs at 9 a.m., and \(\mathrm{{EV}}_2\) that is plugged in from 11:15 p.m. to 7 a.m. with 0.49 pu SOC initially. Under the uncontrolled charging scenario, the charging profile of both the EVs has a similar shape. The vehicles start charging at the maximum rating of 3 kW as soon as they are plugged in and continue charging at this value until their batteries are fully charged. However, under smart charging, the process is spread out over a longer duration so that the same energy is transferred at lower powers, with a smaller contribution to the system demand.

Fig. 6
figure 6

Comparison of EV charging-power profile

As \(\mathrm{{EV}}_1\) is plugged in during the peak-load hours when the real-time price of electricity is high, the smart G2V scheme delays its charging to the more economical postmidnight hours. In contrast, as \(\mathrm{{EV}}_2\) is plugged in during the cheaper off-peak hours, it starts charging immediately, albeit at powers much lower than the rated (dumb charging) value. The average charging power of \(\mathrm{{EV}}_2\) is higher than \(\mathrm{{EV}}_1\) due to the higher charging urgency, which can be defined as the ratio of energy requirement and plug-in duration. Under smart V2G, \(\mathrm{{EV}}_1\) is made to discharge upon plug-in so that the system demand and the resultant price can be reduced. After continuing to discharge until the price stabilizes, \(\mathrm{{EV}}_1\) transitions to charging mode. The subsequent charging power is higher than that under smart G2V as the discharged energy needs to be compensated in addition to the original energy requirement over a smaller duration (resulting in higher urgency). As \(\mathrm{{EV}}_2\) is plugged in during off-peak hours, the need for discharging does not arise leading to a high similarity between the smart G2V and V2G charging profiles.

4.3 EV battery-SOC profile

The general trend exhibited by the charge build-up within EV batteries under the three modes of charging is compared in Fig. 7. Each line represents the variation in battery SOC of a particular EV during the charging process. Under dumb charging, the battery SOC of all the EVs increase linearly with equal slope as the rate of charging is fixed at \(P^{max}\). It can be seen that the majority of dumb charging coincides with the evening peak load hours, which is undesirable in terms of both the charging cost as well as the network impact. Under smart G2V, it is observed that the rise in battery SOC is delayed to off-peak hours and occurs at a slower rate due to smaller magnitude of the optimal charging powers. Under smart V2G, the SOC profiles of several vehicles exhibit a decline during the evening-to-midnight hours when battery energy is being discharged into the network to regulate the system demand and the subsequent price of electricity. Furthermore, the few vehicles that remain plugged-in during the morning peak hours also participate in V2G as evident from the dip in SOC around 9 am. In both cases, the energy discharged is compensated in the subsequent intervals courtesy of the user-satisfaction constraint in (13), which ensures that the battery SOC attains the desired level (full charge) before the hour of departure.

Fig. 7
figure 7

Comparison of EV battery-SOC profile

4.4 EV battery degradation

The smart charging process of each EV is spread out over the low-priced intervals and typically lasts until the vehicle’s departure. The lower magnitudes of charging power and the shorter duration spent in fully charged condition under smart G2V improve the battery health when compared with dumb charging [38]. However, bidirectional charging subjects the EV battery to a higher number of charge-discharge cycles that causes lifetime reduction [22]. The battery degradation cost under V2G operation should be accounted for in the cost-minimization study. When compared with unidirectional charging, the bidirectional scheme incurs a total battery degradation cost of $8.27 at the rate of 6.5 ¢/kWh [39]. The battery degradation cost under smart V2G is double the additional cost-saving earned by it relative to its G2V counterpart. Thus, smart G2V is found to be the more economical prospect overall. It is safe to assume that the EV owners would prefer to utilize the V2G facility for more lucrative applications such as ancillary services for grid support [40].

4.5 Impact on the distribution network

The impact of different loading scenarios on the system demand (kVA) is shown in Fig. 8. The base load profile resembles a typical two-peak daily load profile. During the peak load hours under dumb charging, the system demand exceeds the transformer rating of 200 kVA. Sustained overloads on the transformer could raise the internal temperature leading to insulation deterioration and loss of service life [41].

Fig. 8
figure 8

System demand

Two important characteristics of the system demand—peak load and load factor, are tabulated in Table 3. The peak load is equal to the maximum value of system demand (kW). The load factor is defined as the ratio of the average and peak values of the system demand (kW) during a designated period, which is one day in this study [42]. Under smart charging, a significant portion of the peak load gets shifted to off-peak hours, which simultaneously improves the load factor as well. A significant difference between the peak shaving capabilities of G2V and V2G can be appreciated from Fig. 8. During the evening peak-load hours, the demand profile under smart G2V cannot fall below that of the base load, as there is no alternative source of energy for the domestic loads. On the other hand, smart V2G can lower the system demand below the peak base load by discharging the energy stored in EV batteries, resulting in a flatter demand profile and a higher load factor.

Table 3 Impact on system demand
Fig. 9
figure 9

System losses

The impact of EV charging on the efficiency of power distribution is addressed next. The variation in system losses during the day is plotted in Fig. 9. As an overloaded system is susceptible to higher losses [29], dumb charging is prone to the highest losses and the lowest operational efficiency. The total energy drawn from the (11 kV) grid and that dissipated in the test system over the day are given in Table 4. Although the energy transferred is highest under smart V2G, a portion of this energy is fed back to the network during the discharge operation of EVs. The energy lost under smart V2G is the lowest as a consequence of the higher load factor. A detailed analysis of the relationship between load factor and system losses is available in [43]. As a result, with smart charging the distribution efficiency improves not only from the dumb charging scenario, but also relative to the base load scenario.

Table 4 Impact on energy distribution

The magnitude of voltage supplied to the 55 residences under the four scenarios is shown in Fig. 10. The colors used denote the phase (R,Y or B) of connection. As per the EN50160 standard, the voltage magnitude is expected to be within 10% in either direction of the nominal value [44]. The upper limit of 1.1 pu is not exceeded under any of the scenarios. However, under dumb charging, the voltage supplied to 14 customers fall below the 0.9 pu limit. Twelve of these customers are connected to the R phase and the remaining to the Y phase. None of the customers connected to the B phase experience voltage sags. The unacceptable voltage excursions under dumb charging can be ascribed to the EV plug-in events during peak-load hours. The voltage sags are absent under smart charging, as apparent from Fig. 10. It is further evident from Table 5 that smart V2G is the most effective in raising the minimum load voltage.

Fig. 10
figure 10

Comparison of voltage magnitude at load buses

Fig. 11
figure 11

Comparison of voltage unbalance at load buses

Table 5 Impact on load voltage

Most of the current EVs are provided with single-phase chargers that could increase unequal voltage drops among the phases and aggravate the voltage unbalance at load buses [45]. The degree of unbalance can be expressed using the voltage unbalance factor (VUF), which is defined as the ratio of the negative and positive sequence voltage components [46]. The ceiling for acceptable VUF is 2% according to the EN50160 standard [44]. The variation in %VUF under different scenarios is displayed in Fig. 11, with the peak values tabulated in Table 5.

The VUF under dumb charging exceeds the allowed limit during the peak load hours. The violation can be avoided by implementing either of the smart charging algorithms. Among the three charging scenarios, the voltage unbalance is highest under dumb charging and lowest under smart G2V. The lower unbalance under smart charging can be attributed to the lower magnitude of optimal charging currents that result in smaller voltage drops in the respective phase conductors.

4.6 Summary

Dumb charging of EVs increases the energy bill under base load by 126.4%. This result justifies the consumer concerns regarding doubling of electricity consumption in the wake of domestic charging [5]. When compared with dumb charging, smart G2V is able to reduce the energy cost by 33.7%, whereas smart V2G can save 34.6%. However, the inclusion of battery degradation cost reduces the effective cost-saving under smart V2G to 32.8%, which is inferior to that under smart G2V. Thus, smart G2V will be the charging strategy preferred by EV owners.

When compared with dumb charging, the smart charging algorithm is able to reduce the peak load (kW) by 42.0% under G2V and 57.3% under V2G, thereby relieving the stress on overloaded equipment in the network. Furthermore, by discharging the energy stored in EV batteries, the peak load under optimal V2G is even lower than that under base load scenario (by 26.3%). The load factor improves by 66.7% under smart G2V and a remarkable 125.6% under smart V2G, leading to a much flatter demand profile than under dumb charging. Smart charging was able to increase the distribution efficiency under dumb charging by 1.5% with G2V and 1.8% with V2G. The scheduling algorithm is also able to improve the voltage profile of the system significantly. With respect to dumb charging, the minimum voltage recorded at the load buses is higher by 5.1% and 5.8%, with the system voltage more balanced by 20.0% and 18.4% under G2V and V2G modes of smart charging, respectively.

5 Conclusion

A new technique for regulating the charging of EVs was presented in this paper. A smart charging strategy that seeks to minimize the energy cost incurred by consumers was formulated as a quadratic programming problem. The dynamic arrival of EVs was accounted for by executing the scheduling algorithm over smaller charging horizons that slide forward in time through the scheduling horizon. The optimal charging schedule conveys the best timing and power of charging individual EVs that result in the minimum energy bill. Although smart V2G resulted in the lowest energy cost, the prospect of shorter battery life under bidirectional charging might discourage participation of EV users. When battery degradation cost was incorporated into the analysis, the most economical approach was found to be smart G2V. In addition to minimizing the energy cost, both the smart charging schemes were able to improve the operational aspects of power distribution. The smart V2G exhibits a better performance with respect to reduction in peak load, energy losses, and voltage deviations. Thus, smart V2G is likely to be the DSO’s preferred charging strategy, whereas the more economical smart G2V strategy would be the one favored by EV owners.