1 Introduction

Due to advances in PEVs technology, they act as an efficient alternative instead of fossil fuel vehicles that they have numerous problems such as limited resources and fossil fuel prices [1]; hence, there is certain look to the salient presence of PEVs at the home as a place for connection to distribution network for injection and getting power [1]. It is estimated that the number of PEVs would increase in the North American significantly by 2017–2018; thus, there is considerable increasing in charging load [2, 3]. The utilization of PEVs is serious challenge at the demand side in the distribution network [4, 5]; the amount of power of PEVs is different due to their battery’s state of charge (SOC) and capacity [4,5,6]. Generally, this power amount is close to power consumption of homes [6], so it causes feeder overloading and distortion of voltage profile during the time of getting power (G2V). Furthermore, it can reduce losses and improve voltage profile during the time of injection power (V2G) [7, 8]. Recently, a number of algorithms have been considered to distribute the PEV-charging load to off-peak periods [9]. However, such algorithms have been designed based on a centralized method such as [4, 10,11,12,13,14]. Some researches dealt with the problem in real-time and in decentralized method such as [15, 16] and [9], because expectation performance is not always obtained. Also the coordination of PEVs charging (G2V) has been investigated in [4]. The main goals of the proposed literatures are: reducing cost of electricity for consumers and minimizing system operating costs without maintaining distribution network in suitable real-time conditions. In some articles such as [13], just charging of EVs (G2V) has been coordinated under certain conditions and coordination of PEV in distribution system has not been considered in G2V and V2G conditions concurrently. Hence, this paper presents a framework based on a LSMC for PEVs charging management (G2V and V2G) in distribution smart grid with real constraints. The MSS has been used as main criteria for optimization of reducing losses and improvement feeder voltage profile real-time domain [4, 17]. By utilizing this method with weight factors for power losses of network elements and improvement in feeder voltage profile, the optimization problem for coordination of bidirectional charging of PEV is investigated and it leads to reduce system operating costs and the cost of electricity for consumers as indirect. This paper includes six parts. The network constraints, proposed algorithm, MSS optimization and scenarios of PEVs presence have been introduced in the second part; the third part is about test network and method of network and its elements simulation. In the fourth part, the results of simulation of network have been investigated and compared. The fifth part is about conclusion, and all of paper references have been arranged in sixth part.

2 Coordinated EVs charging and proposed algorithm

This part is relevant to the network constraints, objective function, proposed algorithm, MSS optimization and scenarios of EVs presence.

2.1 Proposed algorithm constraints and objective function

Due to meet the mentioned purpose (reducing power losses and improvement in voltage profile), the algorithm has two constraints that they should be included. First is the voltage range in every feeder, and the second is the active power consumption of the network. These constraints have been considered to maintain the distribution network in a proper operation condition. The first condition is about voltage limitation in every feeder. Thus, proposed algorithm reduces the network power losses by controlling of power consumption (with management the arrival and departure of EVs (G2V) to the grid). It is clear as well that the presence of PEVs (V2G) usually can reduce the power losses, especially in peak time of the grid [7, 8]. In the Eqs. (1)–(5), the network power consumption and power losses have been presented after and before connection of EVs to network in different conditions. In the formulas (6)–(8), the objective functions have been shown and the Eqs. (10)–(11) belong to the power consumption and voltage constraints. In the following equations, the indexes [(1)–(2)] are states before and after connection of EVs to grid at every time step.

$$\begin{aligned} P_{\Delta t}^{\text {totaldemand}(1)}= & {} P_{\Delta t}^{\text {B-load}} + P_{\Delta t}^{\text {loss}(1)} \end{aligned}$$
(1)
$$\begin{aligned} P_{\Delta t}^{\text {loss}(1)}= & {} P_{\Delta t}^{\text {B-loss}} = P_{\Delta t}^{\text {line-loss}(1)} + P_{\Delta t}^{\text {trans-loss}(1)} \end{aligned}$$
(2)

If \( N_{\text {EV-G2V}} \ge N_{\text {EV-V2G}}\)

$$\begin{aligned} P_{\Delta t}^{\text {totaldemand}(2)}= & {} P_{\Delta t}^{\text {B-load}} +P_{\Delta t}^{\text {EV-load}} \nonumber \\&+P_{\Delta t}^{\text {loss}(2)}\qquad P_{\Delta t}^{\text {EV-load}} \succ 0 \end{aligned}$$
(3)
$$\begin{aligned} P_{\Delta t}^{\text {loss}(2) }= & {} P_{\Delta t}^{\text {B-loss}} +P_{\Delta t}^{\text {EV-loss}} \nonumber \\= & {} P_{\Delta t}^{\text {line-loss}(2)} + P_{\Delta t}^{\text {trans-loss}(2)} \end{aligned}$$
(4)

If \( N_{\text {EV-G2V}} \prec N_{\text {EV-V2G}}\)

$$\begin{aligned} P_{\Delta t}^{\text {totaldemand}(2)}= & {} P_{\Delta t}^{\text {B-load}} + P_{\Delta t}^{\text {EV-load}} + P_{\Delta t}^{\text {loss}(2)}\nonumber \\ P_{\Delta t}^{\text {EV-load}}\prec & {} 0 \end{aligned}$$
(5)

Objective functions:

$$\begin{aligned}&\text {Min}\left( P_{\Delta t}^{\text {loss}(2)}+|\Delta V_{\text {ave}} |\right) \end{aligned}$$
(6)
$$\begin{aligned}&\text {Min} P_{\Delta t}^{\text {loss}(2)} = P_{\Delta t}^{\text {line-loss}(2)} +P_{\Delta t}^{\text {trans-loss}(2)}\end{aligned}$$
(7)
$$\begin{aligned}&V_{\text {ave}} =\left( \frac{1}{n}*\sum _{i=1}^n { V_i } \right) =\frac{ V_1 + V_2 +......+V_n }{n}\end{aligned}$$
(8)
$$\begin{aligned}&{\text {Min}} |\Delta {V}_i |\approx {\text {Min}}|\Delta {V}_{\text {ave}} |={\text {Min}}|V_{\text {ave}} - V_{\text {spec}} | \nonumber \\&\quad ={\text {Min}}\left| \left( \frac{1}{n}*\left( \sum _{i=1}^n { V_i } \right) \right) - V_{\text {spec}} \right| \nonumber \\&\quad ={\text {Min}}\left( \frac{1}{n}*\sum _{i=1}^n |1-{V}_i | \right) ={\text {Min}}\left( \frac{1}{n}*\sum _{i=1}^n |\Delta V_i |\right) \end{aligned}$$
(9)

Subject to:

$$\begin{aligned}&\Delta V_i \le {\Delta V}^{\max } \qquad i=1,,,,n \end{aligned}$$
(10)
$$\begin{aligned}&P_{\Delta t}^{\text {totaldemand}(2)} =P_{\Delta t}^{\text {B-load}} +P_{\Delta t}^{\text {EV-load}}+ P_{\Delta t}^{\text {loss}(2)}\nonumber \\&{\varvec{P}}_{\Delta t}^{\text {totaldemand}(2)} \le {\varvec{D}}_{\Delta t,\max } \end{aligned}$$
(11)
Fig. 1
figure 1

General overview of PEV and its connection with network and load smart management center (LSMC)

where

  • n and i are the total number of feeders and the feeder number.

  • \(P_{\Delta t}^{\text {totaldemand}(1)}\) is power consumption at time step within 24 h,

  • \(P_{\Delta t}^{\text {B-load}}\) is power consumption about base load,

  • \(P_{\Delta t}^{\text {EV-load}}\) is power consumption about EVs load,

  • \( P_{\Delta t}^{\text {loss}} , P_{\Delta t}^{\text {B-loss}} , P_{\Delta t}^{\text {EV-loss}} , P_{\Delta t}^{\text {line-loss}} , P_{\Delta t}^{\text {trans-loss}} \) are set to total network losses and base load losses and PEVs load losses and lines losses and transformers losses that all of them at time step within 24 h,

  • \(N_{\text {EV-G2V}}\) and \(\hbox {N}_{\text {EV-V2G}}\) are number of EVs including (G2V) and number of PEVs including (V2G),

  • \(D_{\Delta t,\max }\) is network maximum demand

  • \(V_{\text {spec}}\) and \( {\Delta V}^{\max } \)(maximum deviations of voltage) are 1 and 0.05 p.u.

2.2 Overview of LSMC and proposed algorithm

In Fig. 1, the general overview of EV (G2V, V2G) and its connection with distribution network and load smart management center (LSMC) have been shown. In fact, LSMC is a place, which has two-way connection with all of network elements such as loads, PEVs. LSMC can monitor loads and PEVs in real time by utilizing receiving information from measurement instruments and EVs charger through grid [18]. Therefore, the proposed algorithm makes decision based on real-time information that each PEV charger when it connects to the network and it starts to get or inject power (G2V, V2G), and LSMC send essential commands to PEVs Chargers. Also it is assumed; there is an intelligent communication infrastructure for transmission signals between LSMC and home chargers and other elements.

In Fig. 2, the proposed algorithm has been illustrated. In this method, the time step of 15 min has been preferred for each calculation period and it is considered as a real-time optimization for this application. The main idea for PEVs (G2V) charging is to shift charging time from on-peak time to off-peak time or when the constraints are not violated.

Fig. 2
figure 2

Proposed algorithm for coordination EVs (G2V, V2G) charging in each time step

In this approach, the situation of residential and commercial base loads and number of PEVs (G2V, V2G) (that they want to connect to network in this time step) are considered. Then, it computes load flow (by this assumption that all of EVs and loads have connected to network) in every 15 min. After that, the proposed algorithm checks the constraints. If the power consumption constraint is violated, the algorithm shall plug out (postpone charging time until next time step) a number of PEVs (G2V) in order to reduce power consumption; however, the algorithm computes and selects number of PEVs (G2V) as a list for plugging out until next time step. This selection must be optimal as those PEVs shall be plugged out that they have most effect on increasing of network losses and voltage profile distortion. This optimal selection has direct effect on decreasing of network power consumption in (3–5) and costs of customers especially in peak times. Finally, algorithm can let the more number of PEVs (G2V) that they connect to network (plug in) for getting power. Also if the voltage constraint is violated by PEVs (G2V or V2G) in every feeder, PEVs (belong to that feeder) are plugged out (postpone charging or discharging until next time step) as one by one until the voltage constraint is not violated again. Therefore, the constraints are checked again; if the constraints are not violated again, in the final stage of this time step, the rest number of PEVs (G2V or V2G) is determined for connection to network, and the permanent program of loads and PEVs is finalized for this time step. After that, the algorithm will go to next time step. The approximate number of PEVs (G2V) (for plugging out) is calculated in formulas (12), (13). The variations of power consumption depend on the variations of the EVs number and their contribution to power losses in every time step. The number of PEVs can be computed with utilizing these formulas:

$$\begin{aligned}&P_{\Delta t}^{\text {total}} - D_{\Delta t}^{\max } = P_{\text {ex}}\end{aligned}$$
(12)
$$\begin{aligned}&N_{\text {ex-1}} =\frac{ P_\text {ex} }{2.079(\mathrm{kW})} \quad N_{\text {ex-2}} = N_{\text {ex-1}} \times F \end{aligned}$$
(13)

where, \(P_{\text {ex}}\) is power difference between the network maximum demand and network power consumption and \(N_{\text {ex-1}} \) is the number of PEVs that they must be plugged out and it is multiplied by rate F. F is experimental factor from 0.9 to 0.95 according to network power losses that they have been caused by charging of PEVs. This method has this advantage that it increases the speed of the algorithm operation with sharp reducing number of power flow computation in each time step (real time) in comparison with [4], especially when large numbers of PEVs are ready to plug in.

2.3 Operation of MSS optimization in proposed algorithm

In this paper, the MSS includes power losses sensitivity to variations of PEVs power and average voltage sensitivity to variations of PEVs power for every feeder that it has PEVs. The coordination problem of PEVs in the presence of linear and nonlinear loads and considering two operational cases, G2V and V2G, is an optimization problem with discrete variables (e.g., discrete values of PEV power). The MSS method enables PEVs to start charging as soon as possible considering priority-charging time zones while complying with network operation criteria (such as power losses and voltage profile).

Table 1 EVs charging scenarios

The presence of PEVs in each feeder has a direct effect on voltage profile of them. So adding the term of average voltage sensitivity to earliest term (losses sensitive) has direct effect on PEVs presence priority in network. After computation MSS for all feeders [those feeders that they have candidate PEVs (G2V)] in every time step (with utilization Jacobin entries [4]), the PEVs are sorted in a vector as descending (PEVs have presence priority according to this vector). The vector is sorted such that PEVs (G2V) have more effect on increasing power losses and distortion of voltage profile; they have more priority for plugging out. The maximum sensitivity analysis is computed with utilization of partial derives as follow:

$$\begin{aligned} \mathrm{MSS}_i= & {} \left( \alpha _1 *\frac{\partial P_{\text {loss}}}{\partial P_i }\right) +\left( \alpha _2 *\frac{\Delta | V_{\text {ave}} |}{\Delta P_i }\right) \nonumber \\= & {} \left( \alpha _1 *\frac{\partial P_{\text {loss}}}{\partial P_i }\right) \nonumber \\&+\left( \alpha _2 *\frac{1}{n}*\left( \frac{\Delta | V_1 |}{\Delta P_i }+.........+\frac{\Delta | V_i |}{\Delta P_i}+.....\right. \right. \nonumber \\&\left. \left. +\frac{\Delta | V_n |}{\Delta P_i }\right) \right) \quad \alpha _1 + \alpha _2 =1, \alpha _1 = \alpha _2 =0.5\nonumber \\ \end{aligned}$$
(14)

where \(P_{\text {loss}}\) network losses and P is power consumption of PEVs in every feeder. Where \({\text {MSS}}_i \) s sensitivity of PEV at feeder i. The factor \({\alpha _1 }\) and \( {\alpha _2 }\) are weight factors which are used for importance of phrases sensitivity.

Fig. 3
figure 3

Smart distribution network includes 20 kV and 400 V networks and residential and commercial loads with distribution transformers

2.4 Charging scenarios for EVs

The charging scenarios are proposed to investigate the effect of PEVs presence in various time priorities with various presence percent on network parameters such as power consumption, power losses and voltage profile. Time priorities have been defined upon on-peak and off-peak periods of network loads. Usually the homelike customers come to their home from work about 17:00h every evening and they leave home next day about 7:00h [4, 19]. So time of PEVs arrival is at 17:00h and the time of PEVs departure is at 7:00h. The first time priority is 17:00h to 24:00h, and this priority is synchronous with peak period of network, so this priority has highest fee for getting power (G2V) and injection power (V2G) to network, because these services have been provided in peak period of network. In Table 1, the charging scenarios have been illustrated. The second time priority is 24:00h to 7:00h, and this priority is synchronous with off-peak period of loads, so this priority has lowest fee for getting power (G2V) and injection power (V2G) to network, because these services have been provided in off-peak period of network and it is possible that LSMC does not need these services in time intervals. The 3 scenarios have been defined based on time priorities of EVs charging (G2V, V2G). In the first scenario, PEVs connect to network (plug in) in the first priority between 17:00h to 24:00h and that is synchronous with peak period of loads. In the second scenario, PEVs connect to network (plug in) in the first and second priorities between 17:00h to 7:00h that this scenario is very near to real state of network. In the third scenario, PEVs connect to network (plug in) in the second priority between 24:00h to 7:00h and this scenario is synchronous with off-peak period of loads.

3 Distribution network and characteristics OF EVs

In this part, the smart test network and its topology have been introduced in the first section and the type of EVs and their parameters have been introduced in the second section. The third section is about simulation of 400(V) Network.

3.1 The distribution grid

The Ilam distribution system (63–20 kV) [20] is used for implementation of the proposed algorithm. This network consists of balanced loads of residential and commercial applications, and it is included with 12 residential feeders (20 kV–400 V) and 6 commercial feeders. The proposed algorithm has been programmed and simulated with DPL and Digsilent software [21]. The transformers join 20 kV network to 400 V network. Moreover, the network has several other residential and commercial loads (RGL1, RGL2, CGL1 and CGL2). The PEVs (G2V, V2G) connect to 400 V network in 12 residential feeders. In Fig. 3, the topology of network has been presented. This network connects to super distribution network (63 kV) through super distribution station (super distribution transformer (63–20 kV) in grid feeder in Fig. 3). The homelike chargers connect to lowest voltage level of network or 400 V network that is shown in Fig. 1. Figures 4 and 5 show loading pattern of residential and commercial loads during 24 h as percentage.

3.2 EVs power and charger locations in network

In this paper, the homelike chargers use power outlets (10 (A) and 230(V) with power factor 0.9); also a model of Mitsubishi electric vehicles (i-MiEV) has been selected with 16 kwh (battery capacity) for simulation in network [22].The state of charge (SOC) of this vehicle ascends to 85% battery capacity in about 7 h with utilization homelike chargers. The initial SOC of EV(G2V) is about 5%, and it reaches to 90% which this percent of charging is acceptable amount (gets 85% energy of battery from network) and The initial SOC of EV (V2G) is about 90%, and it reaches to 5%, (injects 85% energy of battery to network). The rate of charging in every charger is always constant. In the Table 2, the network constraints have been shown. The reference [4] suggested that the network maximum demand (\( D_{\Delta t,\max }\)) is 5 or 10% greater than the maximum power consumption of the network without PEVs [due to transformer capacity (63–20 kV)]. In this paper, arrival time, number and presence location of PEVs in the distribution network in two priorities are random and follow from a uniform statistical distribution and an PEV is allocated for every homelike customer, so the number of all PEVs is 771 that this number is according to the number of homelike customer. However, in each time step, the situation of network depends on the number of PEVs and loading of commercial and residential base loads. In fact determining of the network maximum demand is a challenge, which maximum power is got from network, without causing particular problems for network and other side, it is necessary that acceptable number of PEVs(G2V) will be charged in every time step. LSMC is committed toward offering services to customers.

Fig. 4
figure 4

Daily residential load curve

Fig. 5
figure 5

Daily commercial load curve

Table 2 Network constraints in different scenarios

3.3 Simulation of 400(V) networks

The homelike chargers connect to lowest voltage level of network or 400 V networks. The configuration of this part of distribution network in each feeder (20 kV/400 V) is different according to geographical situation of any feeder.

So for simulation all of 400 V networks, the one of the feeders has been choose as standard, it can be generalized to other feeders and can be aggregation residential loads at the end of the 400 V feeder. In Fig. 6 is visible the standard form of the 400 V network. Now considering two priorities in this paper, the 400 V network has two parts: the first part is for presence of PEVs at the first priority and the second part is for presence of PEVs at the second priority. Every part has same residential loads that are aggregated at the end of the 400 V network, and also distribution lines are aggregated as series or parallel in each side finally, they are equal to a line which this line is located between the loads at the end of the power network and a transformer (20 kV/400 V).

Fig. 6
figure 6

Over view 400 V network from transformer (20 kV–400 V)

4 EVs (G2V, V2G) presence results before and after utilization proposed algorithm

In this part, the results of network analysis were shown as follow. In the first section, PEVs (G2V) connect to network as random according to 3 scenarios (state A-Table 1). After that, the proposed algorithm coordinates the scheme of PEVs charging (state B-Table 1). Finally in the second section, PEVs (G2V, V2G) connect to network and charging scheme is managed by proposed algorithm (state C-Table 1).

4.1 The presence of PEVs (G2V) according to 3 scenarios in network

The more of homelike customers have tendency when they arrive home, their PEVs connect to the charger (plug in). So homelike customers determine scheme of PEVs charging, finally Irregularities occur in network, which it can cause significant damage to the distribution network [4, 5, 18]. In Fig. 7a, the power consumption have been presented (state A of the first scenario) that with increasing number of PEVs in each penetration, the graphs of power consumption go up, next the proposed algorithm coordinate scheme of charging according to constraints of Table 2.

Figure 7b shows power consumption (state B of the first scenario). The green line in Fig. 7b is maximum demand level (5.7 MW), and the power consumption of different penetrations must be less or equal to the maximum demand level so the algorithm plugs out a number of PEVs and shift their charging time to next time steps in order to reduce power consumption of some penetrations in some hours. In two columns of the first scenario in Table 3, the average amounts of the power consumption are shown during the time interval of the first scenario (17:00–24:00) before and after utilization proposed algorithm.

Table 3 Average amounts of power consumption (MW) during time of PEVs arrival in 3 scenarios in different penetration

The situation of the two columns of the second scenario is similar to the first scenario (Table 3), only with the difference that the average amounts of the second scenario are during the time interval (17:00–7:00) (the first and second scenarios). Also the situation of the third scenario is similar to the second scenario only with the difference that the average amounts of the third scenario are during the time interval (24:00–7:00) (second scenario). According to results, the amount of power consumption in Fig. 7b (state b) during off-peak period has been increased in comparison with Fig. 7a (state A); it is clear that the algorithm helps the network for peak shaving in peak period as real time. The power consumption in the second and the third scenarios is less than the first scenario in the first priority, because just a number of PEVs connect to network in the first priority and other PEVs connect to network in the second priority (second scenario) and in the third scenario all PEVs connect to network in the second priority, while in the first scenario, all PEVs connect to network in the first priority. In the 3 scenarios, especially in the PEVs penetration as 47% and above, the network parameters have been improved as optimal. Figure 8a, b shows line losses before and after utilization of algorithm in the first scenario. The variations pattern of Fig.  8a, b (lines losses) are similar to Fig. 7a, b everywhere Fig.  7a, b have increasing and decreasing power, Fig. 8a, b have increasing and decreasing losses. In fact with reducing power consumption in peak period and increasing power consumption in off-peak period, the lines losses are decreased in peak period and increased in off-peak period. So with utilization of algorithm, the losses are decreased, especially in peak period and high penetration. Tables 4 and 5 show the average amounts of line losses and transformers losses in three scenarios. The variations pattern of transformers losses are similar to Fig. 8a, b (line losses). With increasing power consumption and lines losses, the transformers losses are increased.

Fig. 7
figure 7

First (a, b) scenario-A: impact of uncoordinated and coordinated PEVs charging on power consumption in different penetration. a Active power consumption (state A)—first scenario, b active power consumption (state B)—first scenario

Figure 9a, b shows voltage deviation at worst feeder before and after utilization of proposed algorithm in the first scenario. The worst feeder is not always constant, and sometimes this feeder is changed and this matter depends on random presence of PEVs and base loads of system and other parameters. The variations pattern of Fig. 9a, b (voltage deviation) is inverse the variations pattern of Fig. 7a, b (power consumption). In Fig. 9b after utilization proposed algorithm, the voltage deviation has been improved especially in peak period. Table 6 shows the average amounts of voltage deviation in three scenarios. This parameter is improved in the first and second scenarios more than in the third scenario, which this matter is a capability of this approach that has most effect on all parameters in peak time.

Fig. 8
figure 8

First (a, b) scenario-A: impact of uncoordinated and coordinated PEVs charging on line losses in different penetration. a Line active losses (state A)—first scenario, b line active losses (state B)—first scenario

Table 4 Average amounts of line losses (kW) during time of arrival of PEVs in 3 scenarios in different penetration
Table 5 Average amounts of transformers losses (MW) during time of arrival of PEVs in 3 scenarios in different penetration
Fig. 9
figure 9

First (a, b) scenario-A: impact of uncoordinated and coordinated PEVs charging on voltage deviation of worst node in different penetration. a Voltage deviation (state A)—first scenario, b voltage deviation (state B)—first scenario

Table 6 Average amounts of voltage deviation (pu) during time of arrival of PEVs in 3 scenarios in different penetration
Fig. 10
figure 10

First scenario-C: impact of coordinated PEVs (G2V, V2G) charging on power consumption in different penetration. a Power consumption (V2G = 16%), b power consumption (V2G = 32%)

4.2 The presence of PEVs includes (G2V, V2G)

In this section, there is PEV (V2G) for injection power to network in addition to PEV (G2V) for getting power from network. Figure 10 show network powers consumption (state C of the first scenario). In different cases, the penetration of PEVs (V2G) is increased and the penetration of PEVs (G2V) is decreased; for example in Fig. 10 in part (a), the penetration of (V2G) is constant and is equal to 16%, and the penetration of (G2V) varies from 79 to 16% and in part (b) the penetration of (V2G) is increased and is equal to 32%. In every case with increasing of PEVs (V2G) penetration, the amount of power consumption is decreased. It is clear that with increasing number of PEVs (V2G), the proposed algorithm plugs out less number of PEVs (G2V) for maintaining network in suitable conditions in comparison with when the PEVs (V2G) do not connect to network (injection power); however, this matter depends on number of PEVs (V2G). In Fig. 10, by adding to number of PEVs (V2G) as case to case (16–32%), the amount of power consumption and line losses are reduced in comparison with Fig. 7b (power consumption of state B in the first scenario). Table 7 shows the average amounts of powers consumption in three scenarios. The results of the first column of Table 7 indicate that increasing number of PEVs (V2G) and decreasing number of PEVs (G2V) cause to decrease power consumption. The PEVs (V2G) supply power for all loads [base loads and PEVs (G2V)]. Next with increasing more number of PEVs (V2G), the power of these PEVs (V2G) is injected to 20 kV network and these PEVs (V2G) supply power for other feeders, and this matter causes to decrease power consumption (entrance of 63 kV network). The results of the second and third columns (the second and third scenario) of Table 7 indicate that increasing number of PEVs (V2G) and decreasing number of PEVs (G2V) cause to decrease power consumption that this matter is similar to the first scenario. It is obvious the state C of the second scenario is not desirable statesbecause a number of PEVs (V2G) connects to network after 24:00 h in off-peak period and this scenario has less effect on reducing losses and power consumption in comparison with the first scenario in peak period. But in the first scenario all PEVs (V2G) connect to network before 24:00h and these PEVs have most effect on reducing losses and power consumption in peak period. The second scenario is more near than other scenarios to real state in network. Table 8 shows the average amount of line losses during 24 h in three scenarios—state C. The results of losses in the first and second scenarios are similar to the results of power consumption in the first and second scenarios which with increasing number of PEVs (V2G), the line losses and power consumption are decreased. But the variations pattern of losses has difference with the variations pattern of power consumption in the third scenario, in some cases when the number of PEVs (V2G) are much more than the number of PEVs (G2V), with decreasing power consumption, the line losses are increased. In other cases, the results of losses are similar to last scenarios. Table 9 shows the average amount of voltage at worst feeder of the network during 24 h in three scenarios—state C. The results of tables indicate that increasing number of PEVs (V2G) and decreasing number of PEVs (G2V) in every case of scenarios cause to improve average amount of voltage in worst feeder and in final all feeders during 24 h. With connection of PEVs (V2G) to network in off-peak time, in some cases that number of PEVs (G2V) is very low or absent, it is possible that in some nodes, the voltage deviation is more than limitations, so the algorithm plugs out a number of PEVs (V2G) for maintaining voltage deviation in admissible range. In this network, due to network conditions, this case did not occur. But this is one of the abilities of LSMC and proposed algorithm, and this ability is visible in Fig. 2. The presence of PEVs (V2G, G2V) has positive effects on parameters of network, especially in the first and second scenarios such that in every step with increasing 16% to number of PEVs(V2G), this matter helps to decrease power consumption and losses (lines and transformers) and improve voltage profile. But in the third scenario, the situations of parameters such as power consumption and losses are different. The reason of this matter is that with reducing base loads in the second priority and increasing the number of PEVs (V2G), the PEVs (V2G) inject power to 20 kV network and they change direction of power transmission in 400 V network. The V2G operation of PEVs supplies the base loads power and PEVs (G2V) (that they belong to their nodes) in addition to inject power to 20 kV network. Finally, it causes increase in power losses in comparison with last states. Generally, it is visible that concurrent management of PEVs (G2V, V2G) (by this method) has considerable effect on improvement in all network indexes and finally on reducing operation cost of customers and grids.

Table 7 Average amounts of active power consumption (MW) during 24 h in three scenarios—state C
Table 8 Average amounts of line losses (kW) during 24 h in three scenarios—state C
Table 9 Average amounts of voltage at worst node (pu) during 24 h in three scenarios—state C

5 Conclusion

In this paper, the coordination of bidirectional charging for plug-in electric vehicles in smart distribution systems has been introduced. The proposed algorithm uses maximum sensitivity selection (MSS) for the optimized management of the vehicle charging in order to minimize the power losses and minimize variations of the average voltage of feeders. The simulation results indicate acceptable and suitable performance of proposed coordination algorithm of PEVs charging and other loads in every scenario that was presented. It was clear that when the penetrations of PEVs are high, the performance of algorithm is more reasonable and more considerable. However, the existence of these scenarios help to program a suitable charging schedule for PEVs and also they provide many choices for customers that they decide about charging schedule for their PEVs. The speed and performance of maximum sensitivity selection (MSS) method are suitable and acceptable for real-time domain. With utilization the proposed algorithm, the power losses (distribution lines and transformers) and the variations of voltage profile of feeders decrease especially in the first and third scenarios compared to the second scenario.