1 Introduction

Plug-in electric vehicles (PEVs) have become a sustainable solution in response to the demand for more economic and environmentally-friendly vehicles in the transportation sector [1]. However, their impact heavily depends on the availability of resources and structure of the energy system [2]. These vehicles are capable of storing energy in their batteries and are only utilized in 4% of their lifetime for transportation [3]. That is, PEVs may be utilized for other services, particularly as distributed energy storage units, when they are parked and connected to the grid [4,5,6]. Vehicle-to-grid (V2G) technology provides the means for services such as peak shaving [5, 6], valley-filling [6], voltage and frequency regulation [7, 8], reactive power compensation [9, 10], and spinning reserve [11]. From the utility perspective, peak shaving service on the grid reduces distribution power losses, increases distribution level power quality, and extends the lifetime of transformers. Thus, the utility service provider can handle more electric loads without requiring further network reinforcements. From the upstream network perspective, minimizing peak loads can reduce power generation costs and carbon dioxide emissions [12]. The peak loads can be reduced either by unidirectional PEV charging management [12,13,14], or by discharging PEV batteries into the grid using V2G technology [5, 6]. The former approach, also called the load-shifting strategy, is based on the idea of shifting peak loads to off-peak hours. V2G service, on the other hand, suggests providing active power support back to the grid to flatten the base load profile making it more flexible and advantageous for the utility grid. However, heavier use of the vehicle batteries in V2G services contributes to the ageing of the batteries due to the increase in charge cycles which is a serious concern for PEV owners.

V2G can be implemented in two different control architectures, namely, centralized and decentralized controls [15], as shown in Fig. 1. In the centralized control, an aggregator (control center) is responsible to determine discharging set points for each PEV participating in V2G service in order to make a better use of network capacity [16, 17]. For this purpose, a bidirectional data flow takes place between the aggregator and electric vehicle supply equipments (EVSEs). The decentralized control architecture, on the other hand, allows each PEV to determine its own discharging profile [18,19,20]. It is more flexible in terms of PEV user convenience and easier to implement in the field. Various strategies for peak shaving have been presented in the literature [5, 6, 21,22,23]. Some of them determine the PEVs discharging rates in a decentralized fashion [5, 21]. However, the desired level of peak shaving cannot always be guaranteed in those approaches. Therefore, coordinated V2G strategies are needed. Most V2G schemes track a reference line to pull the demand load to a prefferred operating level by discharging PEVs into the grid [6, 22, 23]. The algorithms in these studies dictate a dynamic discharging pattern for PEVs in each time interval by considering only the grid load profile. Thus, a limited peak shaving is achieved in [22]. The algorithms in [6, 23] require very high PEV penetration levels for a satisfactory performance. Moreover, the V2G approaches proposed in [6] and [23] do not consider the stochastic nature of PEV mobility characteristics which makes it a further challenging task to accurately track the reference line. Furthermore, while user convenience is usually referred as the desired state of charge (SOC) at the departure time, the requirement of a minimum driving range for any emergency trips that might occur during the discharging process is often ignored in the literature [5, 6, 21, 23]. A more convenient PEV user experience with reduced range anxiety should definitely be considered for a realistic case study.

Fig. 1
figure 1

Control architectures

The performance of peak shaving algorithms depends on the number of PEVs connected to the grid and their mobility parameters. The total power required to support the grid should be fairly distributed among the PEVs connected to the grid. In addition, stochastic nature of the mobility parameters indicates that the discharging operation should be dynamic and coordinated for more efficient utilization of the stored energy. Both aspects have not been sufficiently explored within the same V2G algorithm in the literature. Moreover, the impact of V2G control algorithms has not been analyzed for a small-size distribution system with reduced PEV penetration rates indicating more realistic scenarios for near future implementations.

The goal of this paper is to coordinate PEV discharging considering PEV stochastic mobility data. The main idea is to use PEV battery capacities depending on the load profile characteristic to ensure an effective peak shaving throughout the peak times. This requires a coordinated V2G strategy by considering both the load profile and PEV characteristics connected to the grid. In this study, the optimal V2G solution is first found to provide a basis for assessing the performance of the developed algorithm. Then, a two-stage V2G control scheme is developed. The first stage includes an off-line operation to determine the desired level for peak shaving and the time period for V2G service based on a forecasted load profile. In the second stage, discharging rates for each PEV are simultaneously determined considering both the load profile level and the available capacities of PEVs participating in V2G service. From the distribution system operator (DSO) perspective, PEVs track the load profile in the distribution system so that the peak loads are shaved effectively. From a PEV user convenience point of view, a minimum SOC level is maintained for emergency departures at any time. This is also to avoid the deep discharging which causes premature aging of the batteries. To evaluate the impact of the extra charge energy need resulting from the V2G contribution, a simple charging scheduling strategy is employed at off-peak hours. The algorithms are tested on real residential distribution transformer loading data for heuristic user case scenarios with different PEV penetration rates and the performance of the algorithm is assessed by two metrics: peak shaving index (PSI) and peak load reduction (PLR) rate.

The paper is organized as follows. Section 2 describes the modeling of PEV mobility. The optimal and proposed V2G control algorithms, and the off-peak charging scheduling are developed in Sect. 3. Experimental data and case studies are presented in Sect. 4. Section 5 provides the main concluding remarks.

2 System modeling

2.1 Transportation mobility modeling

To better analyze the impact of the stochastic travel behaviors and charging demands of the PEV users on power grids, a realistic scenario should be designed. For this purpose, daily home arrival/departing time and daily travel distance data of 10 vehicles have been collected for a year using vehicle tracking devices [24]. The histograms obtained for the home arrival/departing times and the daily trip distances turn out to be quite similar to a Gaussian distribution. The mean and standard deviations of these Gaussian distributions are (7.55 PM, 1 hour 40 min),(7.47 AM, 0 hour 23 min) and (\(39.5\,\hbox {km}, 15.8\,\hbox {km}\)) for home arrival time and daily trip distance, respectively. PEVs are assumed to stay parked at home till the next morning departure time and occasional evening trips are ignored. However, this assumption does not change the performance of the proposed solution because as explained in the following section, the actual mobilities of PEVs are updated in real time.

2.2 Modeling of plug-in electric vehicle

This study considers five different PEV models which are currently available in the market. Table 1 shows the specifications of those PEV models (i.e., battery capacity, range, and charging/discharging power). The vehicles will be charged and discharged through their on-board chargers which are assumed to be capable of bidirectional power transfer. PEVs are connected to the grid using different EVSEs utilizing ac connections according to the IEC 61851 standard [25]. It is assumed that Mode-2 (1-phase, 32 A, for i3, Volt, Leaf, and Bolt) and Mode-3 (1-phase, 63A, for Model S) discharging ratings are employed for on-board discharging using required EVSE and cabling/conduit rating [25]. Since the charger limit imposed by EVSEs is much greater than the on-board charger power ratings, the maximum discharging power is determined by the each on-board charger power rating.

Table 1 Types of PEVs and their specifications

The initial SOC for the \(i^{\mathrm{th}}\) PEV at the time of home arrival can be calculated as follows:

$$\begin{aligned} SOC_{arr,i}=\left( 1-\frac{d_i}{R_i}\right) \times100\% \end{aligned}$$
(1)

where \(d_i\) is the daily distance travelled by the \(i^{\mathrm{th}}\) PEV and \(R_i\) is the nominal range of that PEV, which are listed in Table 1, under normal driving conditions. To prevent the battery from deep discharging, PEVs which participate in V2G service are warranted to maintain a minimum SOC at any time. That is, PEVs are allowed to discharge to the grid only down to a pre-defined SOC level. This level will be referred to as \(SOC_{\text {min}}\). \(SOC_{\text {min}}\) is defined such that it corresponds to an emergency range of \(50\,\hbox {km}\) which is an average distance to important destinations within the city of Ankara. It is determined for each PEV separately:

$$\begin{aligned} SOC_{\mathrm{min},i}=\frac{50}{R_i}\times100\% \end{aligned}$$
(2)

So, the maximum available energy which can be provided during the whole V2G process for the \(i^{\mathrm{th}}\) PEV is,

$$\begin{aligned} E_{V2G,i}^{av,{\mathrm{max}}}=(SOC_{arr,i}-SOC_{\mathrm{min},i})\frac{C_{B,i}\cdot \eta }{100} \end{aligned}$$
(3)

where \(C_{B,i}\) is the nominal battery capacity of that PEV; and \(\eta\) is the on-board charger efficiency. Finally, the energy required to fully charge the \(i^{\mathrm{th}}\) PEV is calculated as follows:

$$\begin{aligned} E_{i}^{ch}=(1-SOC_{final,i})\frac{C_{B,i}}{100\eta } \end{aligned}$$
(4)

where \(SOC_{final,i}\) is the SOC of that PEV after the discharging process ends, which is equal to or greater than \(SOC_{\text {min},i}\). Using (4), the total charging time for the \(i^{\mathrm{th}}\) PEV to be fully charged at rated charging power can be calculated as:

$$\begin{aligned} T_{ch,i}=\frac{E_{i,ch}}{P_i^{rated} \eta } \end{aligned}$$
(5)

where \(T_{ch,i}\) is the total charging time and \(P_i^{rated}\) is the rated charging power. Each on-board charger used in this study are assumed to have a constant 90% operating efficiency and 1.0 power factor at all operating points.

3 Development of two-stage V2G control algorithm

3.1 Problem formulation and optimal V2G solution

To define a peak loading period in the grid, we should first decide the preferred point-of-loading value which will be referred to as the reference line \(P_{ref}\). Once the peak period is identified, the objective of the V2G process becomes to level the grid load down to the \(P_{ref}\). Thus, the V2G procedure can be formulated as an optimal discharging control problem whose objective is to minimize the mean square error (MSE) between the load profile and the reference line making the objective function concave.

Let us consider a 24 hours time horizon divided into a T number of time slots of one minute each. Let \(P_{V2G,i}= \left\{ P_{V2G,i}(1), P_{V2G,i}(2),\cdots ,P_{V2G,i}(T)\right\}\) denote the discharging profile of the \(i^{\mathrm{th}}\) PEV, and n denote the number of PEVs participating in V2G service. Let \(P_{load}(t)\) and \(P_{V2G,i}(t)\) be the grid load and discharging rate of \(i^{\mathrm{th}}\) PEV at time t, respectively. \(t_{arr,i}\) is the arrival time of the \(i^{\mathrm{th}}\) PEV, respectively. \(t_{peak,s}\) and \(t_{peak,e}\) denote the start and end times of the peak period. Then, the objective function can be expressed as follows:

$$\begin{aligned} {\left\{ \begin{array}{ll} \\ \underset{{P_{V2G,1}...P_{V2G,i}}}{\text {min}} \sum \limits _{t_{peak,s}}^{t_{peak,e}}\left( P_{load}(t) -\sum \limits _{i=1}^n P_{V2G,i}(t)-P_{ref}\right) ^2 \\ \text {s.t.}\\ 0\leqslant P_{V2G,i}(t) \leqslant P_{i}^{rated} \\ \quad \quad \quad \quad \quad \forall t \in [\hbox {max}\lbrace t_{arr,i},t_{peak,s}\rbrace ,t_{peak,e}] \\ P_{V2G,i}(t)=0 \;\;\;\;\;\; \forall t \not \in [\hbox {max}\lbrace t_{arr,i},t_{peak,s}\rbrace , t_{peak,e}]\\ \sum \limits _{t_{peak,s}}^{t_{peak,e}}P_{V2G,i}(t)\frac{{\Delta } {t}}{60} \leqslant E_{V2G,i}^{av,{\mathrm{max}}} \end{array}\right. } \end{aligned}$$
(6)

By minimizing the MSE, we aim to have an aggregated load profile that closely tracks \(P_{ref}\) and achieve an effective peak shaving. The first constraint in (6) is due to discharging limitations imposed by the on-board charger. The second constraint ensures that V2G operation can be performed between the arrival time of a PEV and the end of the peak period. The last constraint ensures that the provided energy should be equal to or less than the maximum available energy of the vehicle. As PEVs connect to the grid, the aggregator solves (6) iteratively, and broadcasts control signals to update the discharging profile of the PEVs in V2G service. As the number of PEVs in V2G service increases, the computational load of the optimal solution incrementally increases making it impractical for real-time implementations.

We propose another approach which significantly reduces the computational load of the V2G operation while providing a competitive peak shaving performance. The approach consists of two stages: off-line and on-line processing. The desired level of loading after peak shaving and the time period for V2G service are first determined. These parameters depend only on the load profile characteristic and can be forecasted off-line. Then, the discharging power rates for PEVs connected to the grid are simultaneously determined. As the load profile varies with time, discharging PEVs at variable rates by considering the peak load level and the available capacities of PEVs would be more effective. Therefore, the discharging power rates for each PEV in V2G service are updated adaptively whenever a new PEV is connected to the grid for V2G service.

3.2 Off-line operation

The desired value for the point-of-loading must be determined before the online stage. Forecasting the base demand profile is assumed to be undertaken by the DSO, and the forecasted demand is provided as an input to the algorithm developed here.

Suppose that the forecasted base load is as shown in Fig. 2. It is the daily average loading of a distribution transformer in the month of October 2014 which will be introduced in detail in Section IV. To find the location of the reference line, a local minima/maxima analysis is done on the load curve. The points indicated with a star (green) represent the local maxima, whereas the ones indicated with a hole (red) represent the local minima for the load curve in Fig. 2. The x-coordinate for the second local minimum in late afternoon corresponds to the time where the peak starts, \(t_{peak,s}\), and the corresponding y-coordinate is chosen to be the reference line value. The peak ends at the early hours after mid-night when the base curve and the reference line intersect second time, \(t_{peak,e}\). During the time between \(t_{peak,s}\), and \(t_{peak,e}\), which corresponds to the period between 16:10 and 00:50 for the base load in Fig. 2, V2G service takes place, and the base demand curve is shaved down to the reference line by the proposed algorithm.

Fig. 2
figure 2

Local minima/maxima analysis on a forecasted base load profile

3.3 On-line operation

Having determined the desired level for the demand curve and the time interval for the V2G service, the discharging power rates as a function of time should be sent to each PEV simultaneously. The discharging pattern of each PEV should be calculated such that when the total power support of PEVs that participate into V2G service is subtracted from the base load, the resulting load level is equal or within an acceptable distance to the reference line between \(t_{peak,s}\) and \(t_{peak,e}\). The reason why it may not exactly follow the reference line lies in the stochastic driving behaviors and number of PEVs connected to the grid. The peak power desired to be shaved at time t can be expressed as:

$$\begin{aligned} p_{peak}(t)=p_{load}(t)-P_{ref} \quad \quad \forall t \in [t_{peak,s},t_{peak,e}] \end{aligned}$$
(7)

where \(p_{load}(t)\) is the actual base demand load at time t; and \(P_{ref}\) is the desired loading level at peak hours. The total energy to be shaved from time t to \(t_{peak,e}\) can be calculated by integrating the peak power over this period:

$$\begin{aligned} E_{peak}(t)=\int _t^{t_{peak,e}}p_{peak}(\tau )\hbox {d} \tau \quad \quad \forall t \in [t_{peak,s},t_{peak,e}] \end{aligned}$$
(8)

Then, the total available energy which can be utilized for peak shaving from time t till \(t_{peak,e}\) is found. It is equal to the sum of the available energy for each PEV participating in V2G process:

$$\begin{aligned} E_{total}^{av}(t)=\sum _{i=1}^nE_i^{av}(t) \quad \quad \forall t \in [t_{peak,s},t_{peak,e}] \end{aligned}$$
(9)

where n is the number of PEVs in V2G service at time t, and \(E_i^{av}(t)\) is the energy corresponding to a state of charge \((SOC_i(t)- SOC_{\mathrm{min},i}(t))\) for the \(i^{\mathrm{th}}\) PEV. Note that \(E_i^{av}(t_{arr,i})\) is equal to \(E_i^{av,{\mathrm{max}}}\). In order to shave the peak accurately and not to create a valley as more vehicles are included in V2G service, \(E_{total}^{av}(t)\) has to be updated each time in an adaptive manner. That is, if \(E_{total}^{av}(t)< E_{peak}(t)\), then the available energy should be fully utilized, and if otherwise, it should be adjusted in such a way that it is kept equal to \(E_{peak}(t)\). In addition, the share of the total support of a PEV at a time t is decided based on the ratio of its available energy to the total available energy of all vehicles. To sum up:

$$\begin{aligned} \\ E_{i}^{av}(t)= {\left\{ \begin{array}{ll} \frac{{E_{i}^{av}(t)}}{{E_{total}^{av}(t)}}\ {E_{peak}(t)}\quad \quad & {E_{total}^{av}(t)}>{E_{peak}(t)}\\{ E_{i}^{av}(t)} \quad \quad &{E_{total}^{av}(t)}\leqslant {E_{peak}(t)} \end{array}\right. } \end{aligned}$$
(10)

Finally, the discharging energy for each PEV at a time step \(\triangle t\) and the peak energy to be shaved at that time step are calculated as:

$$\begin{aligned} {\Delta } E_i^{dsch}(t)=\frac{{\Delta } E_{peak}(t)}{E_{peak}(t)} E_i^{av}(t) \end{aligned}$$
(11)

where

$$\begin{aligned} {\Delta } E_{peak}(t)=\int _t^{t+{\Delta } t}p_{peak}(\tau )\hbox {d}\tau \end{aligned}$$
(12)

The discharging power of the \(i^{\mathrm{th}}\) PEV at time t is:

$$\begin{aligned} P_i^{dsch}(t)=\frac{{\Delta } E_{i}^{dsch}(t)}{{\Delta }(t)} \end{aligned}$$
(13)

It is important to note that the remaining available energy of the \(i^{\mathrm{th}}\) PEV after a time step should be updated as:

$$\begin{aligned} E_i^{av}(t+{\Delta } t)=E_i^{av}-{\Delta } E_i^{dsch}(t) \end{aligned}$$
(14)
Fig. 3
figure 3

Overall structure of V2G controller

The overall structure of the proposed V2G controller is shown in Fig. 3. The flow chart summarizes (7)-(14). The controller updates the control signals at each time step by considering the load profile and the actual mobilities of PEVs connected to the grid. This requires a centralized control framework. A control center retrieves load profile data from the DSO, and charging/discharging requests and PEV characteristics from the electric vehicle supply equipment (EVSE) also known as charging stations. The controller calculates the discharging power references for each PEV for the remaining V2G period and each PEV discharges with respect to its own reference. Whenever a new PEV is connected to the grid, the controller adaptively readjusts the control signals for new discharging power references of PEVs.

3.4 Off-peak charging scheduling

For a complete scenario, PEV charging loads should also be considered and the impact of the extra charging energy need due to discharging PEVs at peak hours should be investigated. It is more convenient to charge the PEVs at off-peak hours, because the demand load and the electricity price are lower during these hours. Herein, we use the approach in [26] where charging is carried out with rated power in a scheduled manner. This approach has several advantages from the energy consumption and the charging time perspectives. Classical heuristic charging prioritizing policies can also be applied in charging scheduling. However, the off-peak charging scheduling can be better exploited to achieve a valley-filling behavior, i.e., a grid load profile with lower variance value [20]. This is important for DSOs, because minimizing variance is equivalent to maximizing the load factor and hence, minimizing the losses in the distribution network [27]. It was shown in [28] that the minimum variance can be achieved at best by scheduling PEVs starting from the time slots where the base load profile is at its lowest value. Thus, the off-peak charging, inferred from [28] is formulated as follows:

$$\begin{aligned} \min \left[ \frac{1}{t_{peak,e}-t_{dept}}\sum _{t_{peak,e}}^{t_{dept}} (P_{aggr}(t)-\mu )^2\right] \end{aligned}$$
(15)

with

$$\begin{aligned} P_{aggr}(t)= & {} P_{base}(t)+ \sum _{i=1}^{n}(P_{ch,i}(t)s_i(t)) \end{aligned}$$
(16)
$$\begin{aligned} \mu= & {} \frac{1}{t_{peak,e}-t_{dept}}\sum _{t_{peak,e}}^{t_{dept}} \left( P_{base}(t)+ \sum _{i=1}^{n}(P_{ch,i}(t)s_i(t)\right) \end{aligned}$$
(17)

where \(P_{base}(t)\) is the grid base load; \(P_{ch,i}(t)\) and \(s_i(t)\;\in {\left\{ 0,1\right\} }\) denote the charging load and the binary charging decision of \(i^{\mathrm{th}}\) PEV at time t, respectively; \(t_{dept}\) is the departure time of the last PEV; and n is the number of PEVs to be charged at off-peak hours. The scheduling algorithm determines the appropriate time \(t_{i,start}\) to start charging . The objective function is subjected to the following constraint:

$$\begin{aligned} P_{ch,i}(t)={P_{i}}^{rated} \quad \quad \forall {t}\in \left[ {t_{i,start}},{t_{dept,i}} \right] \end{aligned}$$
(18)

4 Experimental data and case studies

4.1 Distribution transformer loading data

Tests are carried out on a residential distribution transformer. The transformer rated at 1000 kVA, 34.5 kV/0.4 kV is located in the distribution network in the city of Ankara operated by Baskent DisCo. It is serving 1000 customers with 90% residential apartment dwellings and 10% small-scale commercial shops. The transformer loading data were recorded for 4 months using Schneider ION 7650 power quality meter that is installed at the low voltage side of the transformer. The measurements have been taken according to the IEC 61000-4-30, and the recorded data are transmitted to the Baskent DisCo servers via 3G communication. The power measurements are recorded at every ten minutes.

Fig. 4
figure 4

Daily average base load profiles measured on TR3312

The daily average grid load profiles for four months are shown in Fig. 4. As observed in the figure, the active power demand varies between 150 kW and 410 kW in the Fall season. The maximum loading without PEV loads at this transformer is 40% of the rated power. The peak and lowest demands occur around 21:00 and 05:00, respectively. The time frame where peak loading occurs also coincides with the vehicle home arrival times. According to the triple tariff determined by the Energy Market Regulatory Authority (EPDK) of Turkey, the peak times correspond to the hours between 17:00 and 22:00. As shown in the figure, peak loading mostly occurs in these hours but also extends beyond 24:00. If the loads were shaved according to the peak hour definition by EPDK, the peak shaving operation would not be fulfilled effectively. Therefore, to determine the peak loading region depending on the load profile, a new reference line is used which was described in Section III-B.

4.2 Case studies

This section presents the results obtained with the proposed V2G algorithm in different discharging and charging scenarios with three PEV penetration rates. The same scenarios are also investigated with the optimal solution using the convex optimization toolbox CVX in MATLAB [29]. In these scenarios, PEV users select one of the two profiles at plug-in time: V2G service or standard (dumb) charging. PEVs which have an SOC level greater that \(SOC_{\mathrm{min}}\) at plug-in time are allowed to join the V2G service. This is to ensure a minimum driving range of \(50\,\hbox {km}\) for emergency trips. A first come-first serve basis is used for V2G service participation. Standard charging refers to full charging at on-board charger ratings. In this context, three different scenarios have been studied as reported in Table 2. The first scenario is selected to demonstrate the proposed algorithm performance on the base load profile. 40% of all PEVs join into the V2G service in this scenario. The remaining PEVs which do not join into V2G are assumed to wait until off-peak hours for charging. The second scenario is selected to quantify the algorithm performance on the aggregated load profile, including the base load and PEVs charging loads. In this scenario, 40% of all PEVs provide V2G service while the PEVs, which have an SOC level less than \(SOC_{\mathrm{min}}\), start charging at their on-board rated power until they reach \(SOC_{\mathrm{min}}\). Charging power required for emergency trips is determined as follows:

$$\begin{aligned} \\ P_{emg}(t)= {\left\{ \begin{array}{ll} P_i^{rated} \quad \quad &{}SOC_{i}(t)\leqslant SOC_{\mathrm{min},i}\\ 0 &{}SOC_{i}(t)> SOC_{\mathrm{min},i} \end{array}\right. } \end{aligned}$$
(19)

The other PEVs are again assumed to wait until off-peak hours for charging. The last scenario is to investigate the performance of the algorithm under heavy PEV charging loads. This scenario is the most realistic one because it also considers the PEV users who prefer to charge their vehicles immediately at the time of arrival. In this scenario, participation ratio is assumed to be 40% for V2G service and 20% for standard charging among all PEVs. At the same time, the PEVs with SOC levels less than \(SOC_{\mathrm{min}}\) start charging at their on-board rated power until they reach \(SOC_{\mathrm{min}}\). The remaining 20% PEVs wait until off-peak hours for charging. The standard charging power is determined as follows:

$$\begin{aligned} \begin{aligned} \\ P_{dumb}(t)= {\left\{ \begin{array}{ll} P_i^{rated}\quad \quad &SOC_{i}(t)< 100\%\\ 0\quad \quad &SOC_{i}(t)= 100\% \end{array}\right. } \end{aligned} \end{aligned}$$
(20)
Table 2 Test scenarios

To implement these scenarios, a total of 1000 residential customers are considered and each one is assumed to possess only one vehicle. The PEV models listed in Table 1 are distributed homogeneously among all customers. The home arrival times and the daily trip distances for all PEVs are extracted from the models generated in Section II.A. The load profile in the month of October is used. For each scenario, three different PEV penetration rates are considered as 5% (short-term), 10% (middle-term), and 20% (long-term) to account for different market adoption levels.

The algorithms are implemented in MATLAB on a general-purpose computer with Intel Core i5-3337U CPU @1.80 GHz and 6 GB RAM. The simulation is run for 100 times to fairly assess the performance of the algorithm. The presented figures show the averaged results among 100 simulation runs.

Fig. 5
figure 5

Transformer loading profiles with proposed and optimal V2G algorithms for 10% PEV penetration rate

Table 3 Comparison of average computing times of algorithms
Fig. 6
figure 6

Transformer loading profiles with V2G algorithm for 10% PEV penetration rate.

Fig. 7
figure 7

PEV discharging power profiles for 10% PEV penetration rate.

Figure 5 depicts the load profiles for 10% PEV penetration rate under Scenario 1. The optimal V2G algorithm shaves all peak loads. As the number of PEVs in V2G service increases, the proposed solution converges to the optimal solution. Average total required time to compute the discharging profiles of PEVs for both algorithms under different PEV penetration rates is reported in Table 3. The computing time of the proposed algorithm is much lower than that of the optimal solution. The large number of iterations typically involved in optimal charging algorithm is a burden on computation time even for low penetration rates. Requiring high computation times makes optimal solution impractical at field implementation.

Fig. 8
figure 8

Transformer loading profiles with V2G algorithm for 20% PEV penetration rate (scenario 3)

Figure 6 shows the actual and shaved load profiles with the proposed algorithm for 10% PEV penetration rate under all three scenarios. The corresponding discharging profiles for PEVs providing V2G service are illustrated in Fig. 7. As shown in Fig. 6, the PEVs in V2G service are able to shave the peak loads completely for all scenarios after the arrival of the required number of PEVs for V2G service. Since there are only a few PEVs arriving before 19:00, the peak can be shaved up to a certain extent. It can be observed from Fig. 7 that discharging power rates of PEVs are updated continuously at each time step considering the load profile and the available capacities of PEVs in V2G service. The proposed algorithm adjusts the discharging powers of PEVs in V2G service dynamically in such a way that they are discharged until the end of the peak period. Hence, the loads at early peak hours (before 19.00) are slightly shaved even if the total available PEV capacity in V2G service is sufficient to shave all the loads at that time. This is to guarantee that maximum peak shaving performance is attained throughout the whole peak period. Figure 8 illustrates the simulation results for 20% PEV penetration rate under heavy PEV charging loads (scenario 3). It is again observed that the proposed control system is able to shave the peak loads successfully even if the PEV charging loads are increased. This is mainly because of the increase in the amount of the available energy. Compared to the 10% PEV penetration in Fig. 6, the time when the load profile becomes flat is earlier for the 20% case due to the increased number of V2G-available PEVs. In conclusion, as the discharging patterns of each PEV are updated at each time step, the proposed algorithm achieves a good peak-shaving independent of the load profile characteristics.

The mean, standard deviation and median values of the number of charging cycles in 10% PEV penetration case, which corresponds to 40 PEVs, are given in Table 4. The average number of daily charging cycles increases from 0.17 to 0.44 when V2G service is provided. The PEV user should be compensated through a well-established market for the cost of the additional battery wear due to increased charging/discharging cycles.

Table 4 Statistics of daily charging cycles for 10% PEV penetration
Fig. 9
figure 9

Transformer loading profiles with V2G and off-peak charging algorithms for 5% PEV penetration rate (scenario 3)

Fig. 10
figure 10

Transformer loading profiles with V2G and off-peak charging algorithms for 10% PEV penetration rate (scenario 3)

Table 5 Performance of V2G algorithms for different PEV penetration rates and user case scenarios

The impact of V2G on the entire load profile are shown for 5% and 10% PEV penetration rates in Figs. 9 and 10, respectively. Note that the demand load in the figures does not include the energy demand to fully charge the PEVs but includes \(P_{emg}\) and \(P_{dumb}\), while the green line, which is the resulting load profile with the proposed algorithm, includes all PEVs’ charging loads at off-peak hours as well as the V2G support. It is observed that at 10% rate, a new peak occurs at off-peak hours. The main reason is that the transformer used in this study cannot accommodate such a penetration rate of beyond 30% [24]. However, the need of additional charging energy due to V2G process may also contribute to the peak at off-peak hours. Therefore, the desired level of peak shaving should be determined by considering the grid load and the number of PEVs with their mobility parameters.

The performance of the proposed V2G algorithm is evaluated in terms of two parameters: PSI and PLR rate. PSI represents the peak shaving performance, and it is calculated as the ratio of the total shaved energy to the total energy to be shaved,

$$\begin{aligned} PSI=\frac{\sum \limits _{i=1}^n\displaystyle \int _{peak,s}^{peak,e}P_i^{dsch}(\tau )\hbox {d}\tau }{E_{peak}(t_{peak,s})}\times 100\% \end{aligned}$$
(21)

Minimizing peak demand value enables the utility to supply more loads with the current generation capacity, and it is a concern for transmission system operators. Therefore, PLR rate can also be used to assess the performance of the proposed algorithm. It refers to what extent the peak value reduction is achieved and is calculated as follows:

$$\begin{aligned} PLR=\frac{(P_{load})_{\mathrm{max}}-(P_{load,shaved})_{\mathrm{max}}}{(P_{load})_{\mathrm{max}}} \times100\% \end{aligned}$$
(22)

where \((P_{load})_{\mathrm{max}}\) and \((P_{load,shaved})_{\mathrm{max}}\) are the peak value of the actual and shaved load profiles, respectively.

Table 5 summarizes PSI values and PLR rates of the proposed and optimal algorithms for three PEV penetration levels under aforementioned scenarios. As the penetration rate increases, PSI also increases due to the increased available capacities of PEVs in V2G service. For 20% PEV penetration rate, the peak loads are almost shaved under all scenarios. On the other hand, the PLR rate increases as the penetration level and transformer loading increases. The best PLR (40.73%) with the proposed strategy is obtained under the most realistic scenario (Scenario 3). The optimal solution gives the best performance for all cases. However, the proposed algorithm gives a near optimal solution. The proposed algorithm outperforms the approaches in [6] and [23] in terms of PLR. A PLR of 14% and 9% with 25% and 5% PEV penetration levels are reported in [6] and [23], respectively. The performance of the V2G algorithms is not reported in terms of PSI metric in the related literature. Also, it is not meaningful to make a comparison between the PSIs because the transformer loadings differ in each study. However, the proposed V2G algorithm can achieve a PSI of 98% at 20% PEV penetration.

5 Conclusion

In this study, we introduced an efficient coordinated V2G control scheme to reduce peak loads at distribution substation level. The proposed algorithm adjusts the discharging rates of PEVs in an adaptive manner by considering the grid load profile and PEV characteristics. Even at low PEV penetration rates, the algorithm achieves a good peak-shaving independent of the load profile characteristics. It is shown that 8% PEV V2G penetration achieves a peak shaving rate of approximately 99% on a 1MVA rated transformer. The results are also shown to be competitive with the optimal solution. Compared to the optimal solution, the computational cost is very low which makes the proposed algorithm more applicable at field implementation.