1 Introduction

The automotive industry has led to the advance of the global economy and has provided an easier life for humans. However, many vehicles that use an internal combustion engine cause serious problems including air pollution, global warming, and the rapid drain of oil and gas resources. Governments have therefore begun to reduce their dependence on fossil fuels by increasing the efficiency and usage of clean vehicles [1]. The use of electric vehicles as an alternative to internal combustion vehicles is one of the solutions offered in the transportation sector to reduce energy consumption and help with environmental crises. Electric vehicles receive energy from the grid (grid to vehicle) and store it in their battery, and converting it into mechanical energy. By using two-way converters in electric vehicles, it is possible to create the ability to transfer energy from the vehicle battery to the network (vehicle to grid) in the vehicle [2].

An electric network is used to charge the batteries of electric vehicles. An element called the charger exists between the battery and the electric network. The charger consists of two AC/DC and DC/DC converters, which is responsible for converting AC to DC [3]. Electric vehicles are generally connected to the network for charging from 14:00 to 24:00 and are on the go from 5:00 to 10:00 and do not connect to the network. According to the stated hours, the charging time of electric vehicles with peak electricity consumption overlaps in the network. Therefore, because the vehicle charging time is mainly done during peak hours, if the electric vehicle is connected to the power grid without management and coordination, the amount of energy requested from the network increases greatly during peak hours. This not only causes price jumps during peak hours but also increases losses, the probability of network instability due to the voltage drop of the buses more than allowable value and makes the power of the lines exceed the allowable value and as a result their outage occurred [4].

Therefore, the penetration of these vehicles into the power network, especially the distribution network, causes some challenges. Without efficient power management of electric vehicles, power demand increases during peak load times. And consequently, the voltage of all buses decreases, and the network losses increase. Hence, network stability becomes an important problem [3]. Neglecting the challenges of high-energy demand during peak hours causes the network indices, both in terms of stability and reliability, to tend to an inappropriate situation. To resolve these challenges, some researchers have been done and some solutions have been proposed to reduce the problems caused by the usage of the electric vehicles in the distribution network.

In [5], the synchronous charging of electric vehicles is proposed to reduce the variance of the distribution system load by considering uncertainty. In [6], the effects of electric vehicle charger connection on the smart network are investigated and a solution is presented to reduce the loss and to improve the voltage characteristic of the charger. The paper [7] discusses the use of distributed generation sources (DGs) in reducing losses and improving voltage profiles in a smart network with charging stations. Distributed generation (DG) resources have been proposed to reduce the radius of movement of machines to charge and improve the voltage profile, especially at the endpoints of buses. The work in [8], a new method based on probabilistic techniques for predicting the charge load curve of electric vehicles in the future of Iranian electricity distribution networks was presented. The parameters of the probabilistic distribution functions used in this method to model the charge load of future electric vehicles are estimated by processing the information obtained from the owners of current conventional vehicles. In [9], the authors studied the effect of charging an electric vehicle on a distribution network. In this study, the effect of the different magnitudes of electric vehicle charging on the distribution network from two aspects of network loss and voltage drop was investigated. In [10], given the physical forces applied to a moving vehicle, a method is presented to develop and implement the physical and electrical model of an electric vehicle. In [11], the role of distribution transformers in smart networks with coordinated charging of electric vehicles was studied. Intelligent network communication networks play an important role in plug-in electric vehicle (PEV) operations. Based on the PEV charging algorithm and suggestions, the effect of coordinated charge loading and distribution transformer performance was investigated. In [12], the authors studied the integration of PEVs and energy sources distributed in power distribution systems. Distributed energy resources help to improve the reliability and controllability of power distribution systems, as well as facilitate the integration of distributed generation. In [13], the authors conducted a study titled analysis and modeling of voltage–power transmitter distribution based on rechargeable electric vehicles. The method used in this study was Newton–Raphson’s load flow. The paper [14] investigates the effect of battery charging of electric vehicles on distribution transformers. In [15], the synchronous charging of hybrid electric vehicles is studied to reduce the loss of the distribution network. To minimize power loss and improve voltage profile, the straight away synchronization of charging plug-in hybrid vehicles in smart networks is studied in [16]. The work in [17] presents a new method for simultaneous locating and measuring separate charging stations and EVs and also for managing the vehicle charging process. In [18], a real-time charging scheme has been presented to coordinate the electric vehicle charging at the parking station. This charging planning has been performed as a binary optimization problem. In [19], a model prediction-based control approach is designed to handle the planning of shared charging of PEV (plug-in electric vehicle) and power control to minimize PEV charging costs and power generation costs. In [20], a smart charging strategy is presented for the PEV network that offers different charging options. For PEVs that require charging facilities, they model the problem of finding the optimal charging station as a multi-objective optimization problem that aims to find a station that guarantees the minimum charging time, travel time, and charging cost.

In the present study, an optimal design will be implemented to manage the presence of electric vehicles in the distribution network. The first step is to provide integrated and efficient modeling for power management of electric vehicles and the mathematical expression of the problem. After modeling, to manage charge in electric vehicles, and coordinate with responsive loads, the optimization problem is designed to minimize the cost of load and network losses and minimize the energy purchase of electric vehicles on the planning horizon. In this study, two practical tools have been proposed. The first tool is the optimal and managed use of the V2G mode of electric vehicles. The second tool in this study is the responsive loads and the management program of these loads. Minimizing the cost of purchasing energy of electric vehicles, the cost of load supply and the cost of power losses from the optimal amount is considered as the objective function of the optimization problem. According to this objective function, electric vehicles receive power from the network at a time when the electricity price is low, and demand responses are used to reduce costs and losses. In general terms, this study presents the modeling and simultaneous management of electric vehicle power and demand response, which will improve distribution network performance.

2 Methodology

In this section, a model is presented to manage the charge and discharge of electric vehicles in the distribution network. In this model, the multi-objective optimization problem is designed to improve the network parameters and also the energy cost management in the distribution network. The objective functions of the problem are designed to simultaneously manage and navigate several basic network parameters.

These objectives are as follows:

  1. 1.

    Reducing the cost of energy supply for consumption loads.

  2. 2.

    Reducing the cost of line losses.

  3. 3.

    Managing exchangeable energy with electric vehicles.

  4. 4.

    Reducing the voltage deviation of the network buses.

2.1 Proposed optimal operation model

In the proposed model, for the electric vehicle, the following factors are considered:

  1. 1.

    The exchange and balance of power between vehicle battery and distribution network

  2. 2.

    Technical limitations of electric vehicle charging

  3. 3.

    Energy consumed or stored in electric vehicles

In this model, demand response management, along with electric vehicles, is also proposed to help improve distribution network performance, especially during peak load times. This management plan expresses the load behavior against incentives and uses it to improve network operation. Responsive loads are modeled in two ways:

  1. 1.

    Cost-sensitive loads

  2. 2.

    Voltage-sensitive loads

The management of electric vehicles is based on the following three assumptions:

  1. 1.

    Electric vehicles are connected to the network in the household parking lot for charging or discharging.

  2. 2.

    Electric vehicles return to the parking lot and they are connected to the network after being used during the day.

  3. 3.

    Electric vehicles are connected to the network only once a day, for charging or discharging. In other words, the frequent interconnection of vehicles throughout the day is ignored.

The decision variables considered in the plan of the distribution network management with the penetration of electric vehicles and demand response are:

  1. 1

    Charging and discharging power of electric vehicles

  2. 2

    Active and reactive power of responsive loads

Therefore, exchanging power with the electric vehicle and the load’s participation rate in the demand response program are the two main tools that change the process of operation of the distribution network. The other network variables such as bus voltage, power passing through the lines, etc. are dependent variables.

2.2 The objective function of the optimization problem

The four main objectives, in the proposed management plan, are considered as follows:

  1. 1.

    Minimizing the cost of energy supply needed for network load on the planning horizon

  2. 2.

    Minimizing the cost of network losses in the planning horizon

  3. 3.

    Energy management of exchanges between electric vehicles and the upstream network in the planning horizon

  4. 4.

    Minimizing the deviation of the voltage magnitude from the nominal value in the planning horizon

The first two objectives are to manage the distribution network economically. The demand response program is used as an efficient tool to reduce the cost of energy supply. The third objective is to manage the penetration of electric vehicles in the distribution network and to minimize the cost of supplying the required energy to the first two objective functions. Finally, the fourth objective function is designed to improve the buses voltage as one of the basic parameters of the network and, as far as possible, to reach their nominal value. The objective function of the proposed model is expressed as follows:

$$ \begin{aligned} & {\rm min} \left[ {\omega_{1} \left\{ {\mathop \sum \limits_{{t \in S_{t} }} \mathop \sum \limits_{{\varphi \in S_{\varphi } }} \mathop \sum \limits_{{i \in S_{i} }} \left| {V^{i,\varphi ,t} - V_{\text{ref}} } \right|} \right\}} \right. \\ & { + }\left. { \, \omega_{2} \left\{ {\mathop \sum \limits_{{t \in S_{t} }} \rho^{t} (P_{{{\text{DR}}\_{\text{Total}}}}^{t} + P_{\text{Loss}}^{t} )} \right\}{ + }\omega_{3} \left\{ {\mathop \sum \limits_{{t \in S_{t} }} \mathop \sum \limits_{{E \in S_{E} }} \rho^{t} P_{\text{EV}}^{E,t} } \right\}} \right] \\ \end{aligned} $$
(1)

The first part of the objective function represents the minimization of the voltage deviation of all buses at all simulation times (planning horizon) and for all the network phases of nominal value. The second part of the objective function addresses the cost of providing active load and the cost of network losses. The price element ρ is considered as a variable at different times. As energy prices change or the voltage of the buses diverges from the nominal value, according to the demand response strategy, some or all of the network loads respond to these changes and change their active and reactive power. It should be noted that the price of losses per kilowatt-hour is equal to the cost of demand per kilowatt-hour. The third part of the objective is to model the purchase price of electricity by electric vehicles. \( \omega_{1} ,\omega_{2} ,\omega_{3} \) are the objective function of weighting coefficients, which are selected according to the operator’s preference for operating the distribution network. The larger weight factor is multiplied into any part of the objective function which has higher priority.

2.3 Constraints and limitations of the proposed model

The optimal response will be valid if it satisfies the network constraints. In other words, due to the limitations of the power transmission in the network and the technical constraints of different types of equipment, the optimization problem should be solved and the final solution must be extracted.

2.3.1 Power flow constraints

The equilibrium of produced and consumed power is the most important principle of stability in the power system. At this constraint, at each bus, the summation of injected power from the lines, load power, and power injected from the upstream network must be zero.

The active and reactive power which passes from the bus i to the bus j is calculated by the following equation:

$$ P^{i,j} = V^{i} V^{j} \left( {G^{i,j} \cos \left( {\theta^{i} - \theta^{j} } \right) + B^{i,j} \sin \left( {\theta^{i} - \theta^{j} } \right)} \right) $$
(2)
$$ Q^{i,j} = V^{i} V^{j} \left( {G^{i,j} \sin \left( {\theta^{i} - \theta^{j} } \right) - B^{i,j} \cos \left( {\theta^{i} - \theta^{j} } \right)} \right) $$
(3)

where \( G^{i,j} \) and \( B^{i,j} \) are i-th rows and j-th columns array of the conductance and susceptance matrix, respectively.

According to the above equations, in the proposed model, the summation of the injective power to the bus i from all the lines connected to this bus is calculated by the following equations:

$$ \begin{aligned} & P^{{\left( {i,j} \right),\varphi ,t}} = \\ & \mathop \sum \limits_{{j \in S_{B} }} V^{i,\varphi ,t} V^{j,\varphi ,t} \left( {G^{i,j} \cos \left( {\theta^{i,\varphi ,t} - \theta^{j,\varphi ,t} } \right) + B^{i,j} \sin \left( {\theta^{i,\varphi ,t} - \theta^{j,\varphi ,t} } \right)} \right) \\ & \forall i \in S_{i} ,\varphi \in S_{\varphi } , t \in S_{t} \, \\ \end{aligned} $$
(4)
$$ \begin{aligned} & Q^{{\left( {i,j} \right),\varphi ,t}} = \\ & \mathop \sum \limits_{{j \in S_{B} }} V^{i,\varphi ,t} V^{j,\varphi ,t} \left( {G^{i,j} \sin \left( {\theta^{i,\varphi ,t} - \theta^{j,\varphi ,t} } \right) - B^{i,j} \cos \left( {\theta^{i,\varphi ,t} - \theta^{j,\varphi ,t} } \right)} \right) \\ & \forall i \in S_{i} ,\varphi \in S_{\varphi } , t \in S_{t} \\ \end{aligned} $$
(5)

According to the equilibrium power constraint per bus, we have:

$$ P^{i,\varphi ,t} = P_{G}^{i,\varphi ,t} - P_{L}^{i,\varphi ,t } \quad \forall i \in S_{i} ,\varphi \in S_{\varphi } , t \in S_{t} $$
(6)
$$ Q^{i,\varphi ,t} = Q_{G}^{i,\varphi ,t} - Q_{L}^{i,\varphi ,t} \quad \forall i \in S_{i} ,\varphi \in S_{\varphi } ,t \in S_{t} $$
(7)

In the above equations, the equilibrium of power injected by lines and substations and power consumed by the load (electric vehicles and loads) in each bus is evaluated. The power consumed per bus includes the load demanded and the power exchange with the electric vehicle. It should be noted that all network loads participate in the demand response program.

$$ \begin{aligned} & P_{L}^{i,\varphi ,t} = P_{\text{DR}}^{i,\varphi ,t} + \\ & \sum\nolimits_{{E \in S_{\text{E}} }} {A_{1} A_{2} P_{\text{EV}}^{i,\varphi ,t} } \, \forall i \in S_{i} ,\varphi \in S_{\varphi } ,t \in S_{t} \\ \end{aligned} $$
(8)
$$ Q_{L}^{i,\varphi ,t} = Q_{\text{DR}}^{i,\varphi ,t} \quad \, \forall i \in S_{i} ,\forall \varphi \in S_{\varphi } ,t \in S_{t} $$
(9)

2.3.2 Electric vehicle constraints

Electric vehicle constraints fall into three categories:

  1. 1.

    Limitation of the exchange power of the vehicle with the network

  2. 2.

    A technical limitation of the vehicle battery

  3. 3.

    Energy-related restrictions on vehicle batteries

The first category examines the exchange power between the vehicle and the network and the vehicle-network converter. According to the equilibrium power constraint, the summation of power exchanges between vehicle and network and the converter losses (between vehicle and network) must be zero. So we have:

$$ P_{\text{EV}}^{E,t} = B_{\text{EV}}^{E,t} - P_{\text{LE}}^{E,t} \quad \forall E \in S_{\text{E}} ,t \in S_{t} $$
(10)

where \( P_{\text{EV}} \) is the exchange power between charge/discharge converter and network and \( B_{\text{EV}} \) is the exchange power between the vehicle battery and charging/discharging converter and \( P_{\text{LE}} \) is the charge/discharge converter losses. This schematic is \( P_{\text{G2V}} \) if the electric vehicle is in the charge state (G2V) and \( P_{\text{V2G}} \) if it is in the discharge state (V2G). So at every hour for every vehicle we have:

$$ P_{\text{EV}}^{E,t} = P_{\text{G2V}}^{E,t} - P_{\text{V2G}}^{E,t} \quad \forall E \in S_{\text{E}} ,t \in S $$
(11)

Due to the efficiency between the vehicle and the network (\( \varOmega_{\text{EV}} \)), its loss is calculated as follows:

$$ P_{\text{LE}}^{E,t} = (1 - \varOmega_{\text{EV}} )(P_{\text{G2V}}^{E,t} - P_{\text{V2G}}^{E,t} )\quad \forall E \in S_{\text{E}} ,t \in S_{\text{t}} $$
(12)

Depending on the power exchange between the battery and the network, the maximum charge and discharge will be managed by the following equation:

$$ - B_{ {\rm max} }^{E} \le B_{\text{EV}}^{E,t} \le B_{ {\rm max} }^{E} \quad \forall E \in S_{\text{E}} ,t \in S_{\text{t}} $$
(13)

To indicate the status of the charge and discharge of electric vehicles, the binary variable \( X_{EV}^{E,t} \) is considered.

$$ 0 \le P_{\text{G2V}}^{E,t} \le C_{ {\rm max} }^{E} (1 - X_{EV}^{E,t} )\quad \forall E \in S_{\text{E}} ,t \in S_{t} $$
(14)
$$ 0 \ge P_{\text{V2G}}^{E,t} \ge - C_{ {\rm max} }^{E} X_{\text{EV}}^{E,t} \quad \forall E \in S_{\text{E}} ,t \in S_{t} $$
(15)

The limitations for the energy balance of an electric vehicle are as follows:

$$ W_{\text{EV}}^{E,t} = W_{\text{EV}}^{0} + B_{\text{EV}}^{E,t} \quad \forall E \in S_{\text{E}} ,t \in S_{\text{t}} $$
(16)
$$ W_{\text{EV}}^{E,t} = W_{\text{EV}}^{E,t - 1} + B_{\text{EV}}^{E,t} \quad \forall E \in S_{\text{E}} ,t \in S_{\text{t}} $$
(17)

In other words, the energy stored in the battery is equal to the primary energy in the battery (when the vehicle is connected to the network) plus the energy exchanged with the network. The minimum energy stored in the battery is also limited as follows:

$$ W_{\text{EV}}^{E,t} \ge W_{ {\rm min} }^{E} \quad \forall E \in S_{\text{E}} ,t \in S_{\text{t}} $$
(18)

2.3.3 Demand response program constraints

As explained in the previous section, two types of demand response programs including cost-sensitive and voltage-sensitive loads are considered in the proposed model.

$$ \begin{aligned} & P_{\text{DR}}^{i,\varphi ,t} = \\ & \left( {P_{DR0}^{i,\varphi ,t} } \right)^{k3 - 1} \left( {P_{\text{DR0}}^{i,\varphi ,t} + \mathop \sum \limits_{{t^{'} \in S_{t} }} E_{\text{DR}}^{{t t^{'} }} \frac{{P_{DR0}^{i,\varphi ,t} }}{{\rho^{{t^{'} }} }}\left( {\rho^{t} - \rho^{{t^{'} }} } \right)} \right)^{k1} (V^{i,\varphi ,t} )^{k1k2} \\ \end{aligned} $$
(19)

According to the above equations, active loads participate in both demand response (voltage-sensitive and cost-sensitive) programs. In this formula, k1, k2, and k3 are binary variables. If the load has participated in the demand response program, then k3 is equal to one, otherwise, it is equal to 0. If k1 is equal to one, then the load is cost-sensitive and if k2 is equal to one, it is voltage-sensitive. According to the following equation, reactive power is only voltage-sensitive.

$$ Q_{\text{DR}}^{i,\varphi ,t} = \left( {Q_{\text{DR0}}^{i,\varphi ,t} } \right)^{k3 - 1} (V^{i,\varphi ,t} )^{\alpha \beta } $$
(20)

The values of α and β are determined by the type of load according to Ref. [21]. The following equations manage the minimum and maximum participation of loads in the demand response program.

$$ P_{ {\rm min} }^{i,\varphi ,t} \le P_{\text{DR}}^{i,\varphi ,t} \le P_{ {\rm max} }^{i,\varphi ,t} $$
(21)
$$ Q_{ {\rm min} }^{i,\varphi ,t} \le Q_{DR}^{i,\varphi ,t} \le Q_{ {\rm max} }^{i,\varphi ,t} $$
(22)

2.3.4 Network technical constraints

The network constraints which include the capacity of the lines and the voltage limitations of the buses are expressed in the following equations:

$$ V_{ {\rm min} }^{i} \le V^{i,\varphi ,t} \le V_{ {\rm max} }^{i} $$
(23)
$$ \left( {(P^{{\left( {i,j} \right),\varphi ,t}} )^{2} + (Q^{{\left( {i,j} \right),\varphi ,t}} )^{2} } \right)^{2} \le C_{L}^{{\left( {i,j} \right),\varphi }} $$
(24)

The values of \( P^{{\left( {i,j} \right),\varphi ,t}} \) and \( Q^{{\left( {i,j} \right),\varphi ,t}} \) are calculated by Eqs. (2) and (3). The constraint of the voltage difference between the phases is applied to avoid instability and unbalance reduction in the proposed scheme. In other words, the voltage difference between the three phases A, B, and C in the three-phase distribution network is managed as follows:

$$ - \varepsilon \le \left| {V^{i,A,t} - V^{i,B,t} } \right| \le \varepsilon $$
(25)
$$ - \varepsilon \le \left| {V^{i,A,t} - V^{i,C,t} } \right| \le \varepsilon $$
(26)
$$ - \varepsilon \le \left| {V^{i,B,t} - V^{i,C,t} } \right| \le \varepsilon $$
(27)

Finally, according to the objective function, the amount of loss, active and reactive demand of the whole system is calculated by the following equations:

$$ P_{{{\text{DR}}_{\text{Total}} }}^{t} = \mathop \sum \limits_{{\varphi \in S_{\varphi } }} \mathop \sum \limits_{{i \in S_{i} }} P_{\text{DR}}^{\varphi ,i,t} $$
(28)
$$ P_{\text{Loss}}^{t} = \mathop \sum \limits_{{\varphi \in S_{\varphi } }} \mathop \sum \limits_{{i \in S_{i} }} P_{G}^{\varphi ,i,t} - \mathop \sum \limits_{{\varphi \in S_{\varphi } }} \mathop \sum \limits_{{i \in S_{i} }} P_{\text{DR}}^{\varphi ,i,t} $$
(29)

3 Simulation and numerical results

To evaluate the effectiveness of the proposed approach, the model is implemented on GAMS software on the low-voltage distribution network and evaluated by various tests described below. First, the introduction of the test network and its related data and information about the electric vehicles under study are given. Then the final results were evaluated by applying various tests, taking into account the proposed intelligent charging method along with the demand response program and without considering it.

3.1 Introducing a test network

The test network used in this study is the 37 buses low-voltage network shown in Fig. 1. The voltage of this network is 400 V and its power reference is 100kVA. The upstream substation’s nominal capacity is 800 kVA. The allowed voltage range is also 0.9 pu to 1.05 pu. The network loads are residential and equipped with an electric vehicle parking lot. The information on the maximum load of this network is shown in Table 1. The load variations of the network during different hours of the day are shown in Fig. 2 based on the load factor. According to the concept of the load factor, this graph shows that the amount of load per hour is how much of the network peak load. Electricity prices are also divided into three tariffs. The three tariffs, according to the curve in Fig. 3, are the hours of low load, intermediate load, and full load. The energy price based on $/MWh is shown in Fig. 3.

Fig. 1
figure 1

The studied network (37 IEEE buses)

Table 1 Test network load information
Fig. 2
figure 2

Load factor 24 h a day

Fig. 3
figure 3

Hourly electricity price

3.2 Electric vehicles information

The information of electric vehicles is divided into several distinct categories described as follows.

3.2.1 Number of electric vehicles

Here, it is assumed that vehicles are decentralized and distributed in residential parking lots. There are two EVs per network bus. With 25 residential buses in the network, there are a total of 150 electric vehicles in the network.

3.2.2 Time of entrance and exit of vehicles

These data depend on the behavior of the owners of electric vehicles. Following [21], it is assumed that each vehicle will be connected to the network after the last day of use. Vehicle-network connection behavior at different times of the day is uncertain and must be modeled randomly. The behavior of electric vehicles in connection to the network is shown in Fig. 4 according to the normal probability density function. According to Fig. 5, the peak of the presence of EVs in the network overlaps with the peak load. According to these figures, the time of most exits of EVs from the network is between 5 am and 10 am.

Fig. 4
figure 4

An example of the presence of the electric vehicles at different hours of a day [21]

Fig. 5
figure 5

Number of vehicles connected to the network at different times based on maximum penetration coefficient

3.2.3 The amount of the energy consumption of electric vehicles battery throughout the day

There is a direct relationship between energy consumption (Ec) of electric vehicles and the distance traveled by them. Ec is the required energy to fully charge the battery. Ec represents the chemical energy consumed in the battery. The energy consumption of EV is calculated according to the following equations:

$$ {\text{SOC}} = \left( {1 - \frac{D}{\text{AD}}} \right), $$
(30)
$$ E_{\text{c}} = \left( {1 - {\text{SOC}}} \right).C_{ {\rm max} } $$
(31)

where D is the traveled distance by EV (for hybrid vehicles solely in electric mode) and AD is the maximum distance that EV can go with a single charge. \( C_{{\rm max} } \) is the maximum battery capacity and SOC is the charge state of the EV that expresses the amount of energy of the battery at each moment.

The relationship (31) is dependent on the distance traveled by the EV. The value of this distance is investigated by the normal probability density function addressed in Ref. [21]. According to this reference, electric vehicles travel an average of 25–30 miles per day.

3.2.4 Technical information of EVs

Technical information on EVs including efficiency, battery capacity, and maximum charging rate is given in Table 2.

Table 2 Technical information of the studied electric vehicle

3.3 Information of demand response

Two types of voltage-sensitive and cost-sensitive loads have been used in this study. For voltage-sensitive loads, the coefficients α and β are 0.92 and 4.04, respectively. Information on price-sensitive loads according to the load profile in Fig. 2, the energy price signals in Fig. 3, and the price elasticity of demand are presented in Table 3.

Table 3 Price elasticity of demand between different hours

3.4 Investigation of the effect of EVs penetration into the network without the proposed strategy

In this test, after connecting to the network, the EVs perform the charging process (grid to vehicle) immediately at maximum charge rate and they are fully charged after 4 h based on the battery specifications. The number of vehicles connected to the network per hour is shown in Fig. 5. This test was conducted regardless of the smart charging and discharging strategy, and ignoring demand response.

The power demand curve from the upstream network to supply the load is illustrated by changing the EV penetration level to 0%, 25%, and 50% in Fig. 6.

Fig. 6
figure 6

Hourly demanded power (load profile) at various EV penetration coefficients

According to Fig. 6, unmanaged charging of EVs increases the network peak and consequently increases the power demand during peak hours of the upstream network. According to the network capacity limit (upstream substation), lines, and buses voltage, with a 50% penetration level of electric vehicles, i.e., 75 vehicles are connected to the network, the apparent power of the network reaches the nominal power of 8 pu. In this situation, further vehicle connection is impossible. On the other hand, the network is at risk, and no capacity is left to cover any possible increase in load; thus, the reliability of the network is reduced. Therefore, because of the significant increase in peak load, without a smart and controlled charging strategy, it is impossible to connect half of the vehicles. To connect these new loads, upgrading the network is needed, which requires considerable time and costs.

Naturally, as the peak load power increases, the bus voltage drop also increases relative to the EV-free mode. The effect of increasing the level of penetration of EVs in the network on the bus voltage drop is shown in Fig. 7. In this figure, bus number 1 is the reference bus and its voltage value is 1pu. The increase in voltage drop in this form is quite obvious.

Fig. 7
figure 7

Voltage magnitude of different buses at different penetration coefficients of EVs

Since the load distribution is unbalanced between different phases, the voltage drop of each phase in each bus varies from other phases. In other words, there is an imbalance between phases. The voltage drop of the different phases in each bus is shown in Fig. 8. According to this figure, the worst case of voltage drop is related to bus 36, which is the farthest bus from the power supply, as shown in Table 4 of values. This bus is considered in the following section as an indicator to investigate the effect of charge control of EVs on voltage drop.

Fig. 8
figure 8

Voltage of different phases in each bus

Table 4 Phases voltage difference of bus 36 in different penetration coefficients of EVs

The amount of losses in the network is also shown in Table 5 for 24 h. As expected, with the increase in loads due to the charging of EVs and consequently the increase in the line passing current, losses have also increased significantly.

Table 5 Losses (kwh) in the network at different penetration coefficients of EVs

The network was evaluated technically in the above description. Economically, according to Fig. 3, the cost of power supply needed by the network in 24 h based on the level of EV penetration is presented in Table 6. Certainly, as the cost of purchasing energy is high during peak hours of consumption, the cost of supply has also increased considerably with the increase in peak demand.

Table 6 Cost of electricity ($) to supply the network load per day understudy at different penetration coefficients of EVs

3.5 Investigating the effect of EVs penetration into the network without charge control strategy and with regard to demand response management

In this test, the effect of the demand response management program on network performance is evaluated. Since this study applies two types of voltage-sensitive and cost-sensitive loads, this section is divided into three sub-sections to investigate the effectiveness of each demand management program. In the first section, only voltage-sensitive loads are considered. In the second sub-section, price-sensitive loads, and in the third sub-section, both types of loads are considered. The effect of each management strategy on the network parameters is discussed below.

3.5.1 Voltage-sensitive loads management

In this case, the coefficients k1 and k2 are considered to be 0 and 1, respectively. In this section, active and reactive loads are considered as decision variables in the optimization problem. The power demand variations of the network with respect to the different penetration levels are shown in Fig. 9.

Fig. 9
figure 9

Hourly demanded power (load profile) in different EV penetration coefficients

According to this figure, the management of voltage-sensitive loads alone does not have much impact on the release of micro-grid capacity and the increase in EVs penetration coefficient. Managing these loads reduces the apparent network power slightly at all hours and ,consequently, increases the EVs penetration to 4%. Lack of network capacity for connecting all the electric vehicles, lack of free network capacity, and dramatically increased peak load are still evident. Therefore, managing these loads does not affect the daily load curve greatly.

Figure 10 shows the effect of the management of all these loads on the voltage drop of the network. According to this figure, the management of these loads has reduced the voltage drop of the network.

Fig. 10
figure 10

Voltage magnitude of different network buses at different penetration coefficients of EVs

The voltage difference between the different phases in bus 36 is expressed in Table 7, and network losses are expressed in Table 8.

Table 7 Phases voltage difference of bus 36 in different penetration coefficients of EVs
Table 8 Losses (kwh) in the network at different penetration coefficients of EVs

To better evaluate the effectiveness of voltage-sensitive load management, a comparison between the results of the previous section with this section at a constant penetration level of 50% for EV is presented in Table 9. According to this table, peak load power has been reduced by 2.5%, which has increased the EV penetration rate by 4%. On the other hand, network losses have been dropped by about 7%. Buses voltage drop and the voltage difference between phases, which reflects network imbalance, have also been reduced.

Table 9 Improvement in the percentage of network parameters at 50% constant penetration coefficient

3.5.2 Cost-sensitive loads management

In this case, the coefficients k1 and k2 are considered as 1 and 0, respectively. In this sub-section, active load and energy prices are considered as decision variables in the optimization problem. The management of the power demand variations of the network for different penetration levels is shown in Fig. 11.

Fig. 11
figure 11

Hourly demanded power (load profile) in different EV penetration coefficients

According to this figure, the management of cost-sensitive loads has increased the penetration rate of electric vehicles up to 22%. This increased penetration states the efficiency of the proposed management approach on the reduction in peak load. However, the network still needs to be developed to supply all 150 electric vehicles, and the surplus power of the network, to cope with the possible power increase, which is equal to 0.

Figure 12 shows the effect of the management of these loads on the voltage drop of the network. According to this figure, the management of these loads has reduced the voltage drop of the network. This reduction is less than the previous state (voltage-sensitive load management).

Fig. 12
figure 12

Voltage magnitude of different network buses at different penetration coefficients of EVs

The voltage difference between the different phases in bus 36 is expressed in Table 10, and the network losses are expressed in Table 11.

Table 10 Phases voltage difference of bus 36 in different penetration coefficients of EVs
Table 11 Losses (kwh) in the network at different penetration coefficients of EVs

To perform a better evaluation of the efficiency constant of voltage-sensitive load management, a comparison between the results of the previous section with this section at a penetration level of 50% for EV is presented in Table 12. According to this table, peak load power has been reduced by about 12%, which has increased the EV penetration coefficient by 22%. This reduction in the peak is remarkable. Network losses, on the other hand, decrease to about 7 percent. Buses voltage drop and the voltage difference between phases which causes network imbalance has also been reduced.

Table 12 Improvement percent of network parameters at 50% constant penetration coefficient

Since the penetration of electric vehicles has a great impact on peak load and the cost of the power supply is high during peak hours, the management of cost-sensitive loads, in comparison with voltage-sensitive loads, is much more effective on improving network parameters.

3.5.3 Simultaneous management of cost-sensitive and voltage-sensitive loads

In this case, the coefficients k1 and k2 are both equal to 1. Here, active load, reactive load, and energy price are considered as decision variables in the optimization problem. Managing power demand variations of the network according to different penetration levels is shown in Fig. 13.

Fig. 13
figure 13

Hourly demanded power (load profile) in different EV penetration coefficients

According to this figure, the management of cost-sensitive and voltage-sensitive loads has increased the penetration rate of electric vehicles up to 25%. This increase in penetration is higher than the previous two cases and indicating (demand response) DR’s effectiveness in significantly reducing peak load. However, the network still must be expanded to supply all 150 electric vehicles, while the network surplus capacity to cope with potential increases is zero.

Figure 14 shows the effect of the management of these loads on the voltage drop of the network. According to this figure, the management of these loads has reduced the voltage drop of the network. This reduction is less than the previous ones (managing voltage-sensitive and cost-sensitive loads alone).

Fig. 14
figure 14

Voltage magnitude of different buses at different penetration coefficients of EVs

The voltage difference between the different phases in bus 36 is stated in Table 13 and the network losses are stated in Table 14.

Table 13 Phases voltage difference of bus 36 in different penetration coefficients of EVs
Table 14 Losses (kwh) in the network at different penetration coefficients of EVs

In Table 15, a comparison between the results of the previous section with this section at a constant penetration level of 50% for EV is performed to evaluate the effectiveness of managing voltage-sensitive and cost-sensitive loads. According to this table, peak load power has been reduced by about 14%, which has increased the EV penetration rate by 25%. This reduction in peak is considerable. Network losses, on the other hand, have decreased to 13 percent. This demonstrates the remarkable impact of load management on reducing network losses. Buses voltage drop and the voltage difference between phases which indicate network unbalancing have also been reduced so that the voltage imbalance between different phases is improved up to 21%.

Table 15 Improvement percent of network parameters at 50% constant diffusion coefficient

As can be seen from the results of this section, the (demand response) DR program is indeed very effective in improving network parameters but it alone cannot manage this level of penetration of EVs in the network. In the above description, the network was evaluated technically. Economically, according to Fig. 3, the cost of power supply needed by the network in 24 h based on the level of EV penetration is presented in Table 16. As the cost of purchasing energy is high during peak hours of consumption, due to transfer of some part of the load from low load to full load, the cost of load supply is also reduced by applying a responsive loads management strategy.

Table 16 Cost of electricity ($) to supply the grid load per day understudy of different penetration coefficients of EVs

3.6 Investigating the effect of Ev’s penetration on the network by the proposed charge control strategy along with demand response management

This test considers the strategy of charging and discharging electric vehicles along with managing responsive loads. According to the proposed charging strategy, vehicles can be charged and discharged, which means they operate in V2G and G2V and they do not charge as soon as they are connected to the network [22, 23]. Charging and discharging operations are managed based on the network parameters and set of objectives in the previous section. Due to the high energy price during peak hours of consumption and increased losses and voltage drop due to high demand, the control strategy in these hours is to discharge operations and to charge vehicles during low load hours.

It should be noted that charging and discharging operations depend on the vehicle being connected to the network. Therefore, the vehicle may not be possible to charge in some hours of the day despite the low-load network, because it is not connected to the network. As explained in the previous section, the study is based on the assumption that the vehicles leave the network between 5 am and 10 am and they navigate the route at this time.

In addition to the charging and discharging strategy, price and voltage-sensitive loads have also been used to improve the network parameters in this test. Therefore, the decision variables in this test, in addition to the active and reactive loads, are also the active power stored in the EVs battery.

Given the 100% penetration coefficient (150 vehicles), the total number of vehicles connected to the network for different hours of the day is shown in Fig. 15.

Fig. 15
figure 15

Number of vehicles connected to the network at different times based on maximum penetration coefficient

The start time of the simulation process in this test is 10 am. Since the objective function consists of three parts, voltage drop, and imbalance between phases, cost of energy supply and losses and cost of energy supply of EVs; therefore, the weighting coefficients of the objective function must also be adjusted. These coefficients are set so that the amount of changes in each part of the objective function is equal to each other. In other words, the degree of importance of all three parts is the same. For this purpose, the distance between the minimum and maximum values of each part of the objective function must be equal to the other parts. The weighting coefficients are obtained from the following equations, where \( F^{{\rm min} } \) and \( F^{{\rm max} } \) are the minimum and maximum values of the objective function, respectively, and the indices 1, 2, and 3 represent the deviations of voltage, charge supply, and loss cost, and energy supply cost of EVs, respectively. So, the weighting coefficients are obtained from the following equations.

$$ \frac{{ \omega_{1} }}{{ \omega_{2} }} = \frac{{F_{1}^{ {\rm max} } - F_{1}^{ {\rm min} } }}{{F_{2}^{ {\rm max} } - F_{2}^{ {\rm min} } }}, $$
(32)
$$ \frac{{ \omega_{1} }}{{ \omega_{3} }} = \frac{{F_{1}^{ {\rm max} } - F_{1}^{ {\rm min} } }}{{F_{3}^{ {\rm max} } - F_{3}^{ {\rm min} } }} $$
(33)

According to the above explanations and relationships, the coefficients \( \omega_{1} \), \( \omega_{2} \), and \( \omega_{3} \) are considered as 1, 0.12, and 0.17, respectively. The network demand load with the maximum penetration coefficient of the EVs considering the demand response is shown in Fig. 16.

Fig. 16
figure 16

Hourly demanded power (load profile) per hour at 100% EV penetration coefficient

According to this figure, by applying the proposed strategy, unlike the two previous tests, it is possible to connect all vehicles (100% penetration coefficient) without imposing very high costs for network development. Besides, the effect of the proposed strategy in flattening the load curve is quite evident.

EVs depending on their presence charge between hours 12 and 17. They perform discharge operations in the full load hours to reduce energy supply costs and help improve network parameters. This has caused a reduction in the peak load consumption or clipping peak of the load curve due to EV discharge during peak hours, and valley filling due to discharge during low and intermediate load hours. By this proper management, not only is the need for network expansion to supply new loads is eliminated but also some network capacities remain empty despite the connection of all EVs. This residual capacity increases the reliability of power supply, especially in conditions of unexpected increases in demand.

The value of the voltage amplitude is shown in Fig. 17 as per unit in the various buses. Table 17 also shows the phases of voltage and the amount of losses. According to these results, despite the 100% penetration of electric vehicles in the network and the significant load being added at different times, the rate of loss, voltage drop, and imbalance between phases have decreased as peak power consumption. The amount of loss at 0% penetration rate was 39 kWh (according to the first test), with 150 vehicles connected to the network, the amount of losses was only about 2 kWh, indicating the efficiency of the proposed model in reducing losses. It should be noted that according to the first test if the proposed strategy was not used, only 75 vehicles would increase the amount of energy losses by about 20 kWh. In addition to the losses, even with 150 vehicles connected to the network, the imbalance between phases is significantly reduced compared to 0 penetration levels.

Fig. 17
figure 17

Voltage magnitude of different network buses in different penetration coefficients of EVs

Table 17 Phases voltage difference of bus36 at 20 h (peak load) and energy losses at 100% EVs penetration coefficient

In the above description, the network was evaluated technically. Economically, according to the figure, the cost of power supply needed by the network in 24 h for various tests and based on the maximum EV penetration level is presented in Table 18. The results of this table illustrate the effectiveness of the proposed method. Given that the proposed strategy plays an effective role in flattening the load curve (shifting the load from full load to intermediate and low load) and on the other hand, the cost of purchasing energy that is high during peak hours, the cost of supplying the load will reduce a lot by 150 vehicles connected to the network and a significant increase in load, much less. This is the concept of turning the challenge into an opportunity. The results showed that by properly managing the penetration of electric vehicles along with responsive loads, not only were the network parameters not compromised and the penetration of all the vehicles was managed without the need for network development, but also by applying the proposed strategy, the network parameters were improved.

Table 18 Comparison of cost and maximum penetration rate of EVs and maximum peak load in different tests

4 Conclusion

In this study, a comprehensive management strategy has been introduced to manage the penetration of electric vehicles along with demand response. The strategy followed several goals, including reducing the cost of supply of power and load, reducing the cost of charging EVs, and improving network parameters, including voltage and imbalance between phases. Two practical tools have been proposed. The first tool is the optimal and managed use of the V2G mode of electric vehicles. The second tool is the responsive loads and the management program of these loads. According to the results, the proposed approach has made the challenge of the penetration of electric vehicles an opportunity to improve network parameters and even reduce the cost of energy supply. Managing the charge of EVs at low load and intermediate load times (G2V) and using the remaining energy in the EVs battery during the full load hours (V2G), along with the cost-sensitive and voltage-sensitive loads management program will lead to a great reduction in the cost of power supply and load characteristic is flattened. To smooth the daily load curve, the shift of energy consumption from peak hours to other hours has been used with responsive load management tools and the strategy of controlling the charge and discharge of electric vehicles. On the other hand, decreasing the network peak and load distribution at different times along with the management of voltage-sensitive loads has resulted in an unbalanced improvement between the phases and the voltage drop, especially at the terminal buses of the network. As can be seen from the results, without the proposed approach, it is impossible to manage the penetration of all EVs without network development. Besides, with the same level of penetration, the network capacity is completely occupied, which, in addition to reducing reliability, has a negative impact on the network parameters. The effectiveness of the proposed approach is fully supported by the results.