Skip to main content

Joint Optimal Allocation of Electric Vehicle Charging Stations and Renewable Energy Sources Including CO2 Emissions


In the coming years, several transformations in the transport sector are expected, associated with the increase in electric vehicles (EVs). These changes directly impact electrical distribution systems (EDSs), introducing new challenges in their planning and operation. One way to assist in the desired integration of this technology is to allocate EV charging stations (EVCSs). Efforts have been made towards the development of EVCSs, with the ability to recharge the vehicle at a similar time than conventional vehicle filling stations. Besides, EVs can bring environmental benefits by reducing greenhouse gas emissions. However, depending on the energy matrix of the country in which the EVs fleet circulates, there may be indirect emissions of polluting gases. Therefore, the development of this technology must be combined with the growth of renewable generation. Thus, this proposal aims to develop a mathematical model that includes EVs integration in the distribution system. To this end, a mixed-integer linear programming (MILP) model is proposed to solve the allocation problem of EVCSs including renewable energy sources. The model addresses the environmental impact and uncertainties associated with demand (conventional and EVs) and renewable generation. Moreover, an EV charging forecast method is proposed, subject to the uncertainties related to the driver's behavior, the energy required by these vehicles, and the state of charge of the EVs. The proposed model was implemented in the AMPL modelling language and solved via the commercial solver CPLEX. Tests with a 24-node system allow evaluating the proposed method application.


Concerns about climate change and initiatives like the Paris agreement motivate many sectors of the economy to reduce CO2 emissions. CO2 emissions (the main greenhouse gas) in the transport sector are higher than those in other sectors. Still, these numbers are beginning to show a decline in regions with higher electric vehicle (EV) penetration rates (Canizes et al. 2019; Coignard and Macdougall 2019; Energy Information Administration (EIA) 2020). EV is the key to transport efficiency and sustainability. These technologies are being developed to reduce dependence on oil for transportation and limit CO2 emissions. Similarly, renewable energy sources are being adopted to promote alternatives to fossil fuel-based electricity generation (Cai et al. 2017; Richardson 2013).

Mass adoption of electric vehicles will provide many benefits, such as the incentive to integrate renewable energy sources (RES) into the electrical distribution system (EDS). However, a large increase in EVs can harm the EDS, causing an increase in power losses, voltage degradation, and overloads, thus compromising the electric power quality (Etezadi-Amoli et al. 2010; Richardson 2013). Therefore, EDSs must be prepared for the demand requirements and the particularities of EVs.

The main obstacles for the integration of EVs are their high acquisition cost, limited cruising range and the lack of an infrastructure prepared to supply their demand. Thus, to contribute to the integration of this technology, it is necessary to invest in the system’s infrastructure, which can be done in two ways: by expanding/reinforcing the grid and by installing EV charging stations (EVCSs) (Cai et al. 2017; Mauri and Valsecchi 2012).

Different methods have been used to solve the allocation problem of EVCSs such as classic optimization techniques (Neyestani et al. 2015) and metaheuristics (Amini and Islam 2014; Moradijoz et al. 2013). A mixed-integer linear programming (MILP) model to solve the allocation problem of EVCSs, aiming to minimize system costs, is proposed in (Neyestani et al. 2015). To this end, a two-stage model was developed. The first stage models the EVCS behavior considering market interactions (reserve and energy markets), aiming to maximize profit. In the second stage, the allocation problem of EVCSs is solved. Therefore, the method proposed in (Neyestani et al. 2015) is treated as an EVCS operation planning problem. Specialized methods using the genetic algorithm have been proposed in (Amini and Islam 2014; Moradijoz et al. 2013) to solve the allocation problem of EVCSs.

The uncertainties associated with EV demand must be addressed in the allocation problem of EVCSs, aiming to obtain a solution more committed to reality. A probabilistic approach based on the point estimate method has been proposed in (Mirzaei et al. 2016) to determine the optimal allocation of EVCSs, considering the driving patterns of EV owners. In that work, the allocation problem has been formulated as a two-stage stochastic programming model. Uncertainties based on the behavior of EV users are also considered in (Zeng et al. 2020). The allocation problem has also been formulated as a two-stage stochastic programming model. The first stage defines the planning actions, while the second stage evaluates the system operation. An important aspect that was not considered in any of the previously cited proposals is the allocation of EVCS integrated with RES investment.

The combination of EVs and RES offers a transformative impact on the world, making it possible to reduce the dependence on fossil fuels in the energy and transportation sectors and, consequently, reduces greenhouse gas emissions (Richardson 2013). Therefore, it is important to address EVCSs and RES allocation simultaneously (Bagherzadeh et al. 2019; Mozafar et al. 2017; Shaaban et al. 2019). In this context, a salp swarm algorithm has been proposed to solve joint planning of EVCSs and RES (Bagherzadeh et al. 2019). Multiobjective approaches have also been used to solve this optimization problem, such as (Mozafar et al. 2017; Shaaban et al. 2019). A non-dominated sorting Genetic algorithm (NSGA-II) was used in (Shaaban et al. 2019), while (Mozafar et al. 2017) proposed a genetic algorithm-particle swarm optimization hybrid to solve the allocation problem of EVCS and RES. Alternatively, some studies consider the presence of these technologies into the allocation problem of EVCS but without addressing the allocation of RES (Pashajavid and Golkar 2013).

Among the works cited, only (Shaaban et al. 2019) takes into account the environmental aspects associated with greenhouse gas emissions. Moreover, about the uncertainties addressed, only (Pashajavid and Golkar 2013) includes the uncertain behaviour of conventional demand. Thus, this work proposes a simultaneous approach for optimal allocation of EVCSs and RES, including environmental issues. A two-stage stochastic programming MILP model is used to solve the problem, which considers stochastic behavior of conventional demand, EV demand, and renewable generation.

Table 1 provide a comparison of previous related approaches with the proposed method in which the main contributions are highlighted and described as follows:

  • A two-stage stochastic programming model for the simultaneous allocation of EVCSs and RES that deals with uncertainties of renewable generation (wind turbine (WT) and photovoltaic (PV) generator) along with environmental issues related to CO2 emissions.

  • A mixed linear programming model (MILP) formulation for the addressed problem that can be optimally solved by efficient commercial solvers.

  • A method for forecasting EV charging demand based on uncertain user behavior.

  • An enhanced representation of active/reactive power limits of WT according to their capability curves and power factor limits.

Table 1 Comparison of the proposed model with existing approaches in the literature

Problem formulation

The joint allocation problem of EVCSs and RES is formulated in this section as a MILP model in which the uncertainties are handled through a two-stage stochastic programming model. In the first stage, the investment decisions related to EVCSs and RES are carried out before the uncertainties are realized (here and now decisions). In the second stage, the expected operation cost of the EDS is calculated according to the realization of the uncertainties (wait-and-see decisions). The proposed MILP model is based on (Tabares et al. 2016) and assumes that: the operation of the EDS is represented by a balanced AC linearized power flow model and the loads are modeled as constant powers; CO2 emissions are penalized in the objective function with an emission cost; and the RES that will be allocated belong to the distribution system operator. Similar to (Tabares et al. 2016), the original non-linear model is transformed into an equivalent linear model using the piecewise g-function for the square calculation of a given value (Wolsey 1998).

Objective function

The objective function aims the minimization of the present value of investment and operational costs. Thus, the total cost (1) considers the investment costs in EVCSs (2) and RES (3), jointly with the operational costs related to the energy imported by the substation (4), RES maintenance costs (5), and CO2 emissions costs (6). The function f(τ, λ) = 1 − (1 + τ)λ/τ allows the calculation of present value of the annualized cost. The description of sets, indices, parameters, and variables used in the model is available in the Nomenclature at the end of this paper.

$$\min\ TC:\sum \limits_{p\ }\left({IEVCS}_p+{IRES}_p+{ES}_p+{ORES}_p+{EM}_p\right)\ {\left(1+\tau \right)}^{-\left(p-1\right)\lambda }$$


$${IEVCS}_p=\sum \limits_{r\ }\sum \limits_{c\ }{C}^{\mathrm{INST}}{x}_{r,p}^{\mathrm{EV}}+{C}_c^{\mathrm{EV}}{N}_{r,c,p}^{\mathrm{EV}}$$
$${IRES}_p=\sum \limits_{k\ }{C}_k^{\mathrm{wt}}{x}_{k,p}^{\mathrm{wt}}+\sum \limits_{u\ }{C}_u^{\mathrm{pv}}{\beta}_{u,p}^{\mathrm{pv}}$$
$${ES}_p=\sum \limits_{\omega\ }\sum \limits_{i\ }{\pi}_{\omega }{d}_{\omega }f\left(\tau, \lambda \right){C}^{\mathrm{os}}{P}_{i,\omega, p}^{\mathrm{s}}$$
$${ORES}_p=\sum \limits_{\omega\ }{\pi}_{\omega }{d}_{\omega }f\left(\tau, \lambda \right)\left(\sum \limits_{k\ }{C}^{\mathrm{owt}}{P}_{k,\omega, p}^{\mathrm{wt}}\right.+\left.\sum \limits_{u\ }{C}^{\mathrm{opv}}{P}_{u,\omega, p\kern0.5em }^{\mathrm{pv}}\right)$$
$${EM}_p=\sum \limits_{\omega\ }{\pi}_{\omega }{d}_{\omega }f\left(\tau, \lambda \right){C}^{\mathrm{em}}\left(\sum \limits_{k\ }{\zeta}^{\mathrm{wt}}{P}_{k,\omega, p\kern0.5em }^{\mathrm{wt}}\right.+\sum \limits_{u\ }{\zeta}^{\mathrm{pv}}{P}_{u,\omega, p\kern0.5em }^{\mathrm{pv}}+\left.\sum \limits_{i\ }{\zeta}_i^{\mathrm{s}}{P}_{i,\omega, p}^{\mathrm{s}}\right)$$


The proposed model has the following types of constraints: Steady state operation, operational limits, investment limits, RES model, and EVCS model.

Steady state operation

Expressions (7)–(10) set the steady-state operation of the EDS and are based on (Franco et al. 2014). The active and reactive power balances are expressed by (7) and (8). The voltage drop is determined by (9), while (10) represents the relationship between the voltage at node i, the current and the active/reactive power flow through circuit ij in scenario ω and period p. Function g(Pij, ω, p, Qij, ω, p, Γ) in (10) approximates the sum of the squares of variables Pij, ω, p and Qij, ω, p, using Γ blocks in a piecewise representation (Wolsey 1998).

$$\sum \limits_{mi\ }{P}_{ki,\omega, p}-\sum \limits_{ij\ }\left({P}_{ij,\omega, p}+{R}^{\mathrm{L}}{l}_{ij}{I}_{ij,\omega, p}^{\mathrm{s}\mathrm{qr}}\right)+{P}_{s,\omega, p}^{\mathrm{s}}+{P}_{k,\omega, p}^{\mathrm{wt}}+{P}_{u,\omega, p}^{\mathrm{pv}}={P}_{i,p}^{\mathrm{D}}{f}_{\omega, p}^{\mathrm{D}}+{D}_{r,c,\omega, p}^{\mathrm{PR}}\kern2.75em \forall i,\left(s,k,u,r\in i\right),\omega, p$$
$$\sum \limits_{mi\ }{Q}_{ki,\omega, p}-\sum \limits_{ij\ }\left({Q}_{ij,\omega, p}+{X}^{\mathrm{L}}{l}_{ij}{I}_{ij,\omega, p}^{\mathrm{s}\mathrm{qr}}\right)+{Q}_{s,\omega, p}^{\mathrm{s}}+{Q}_{k,\omega, p}^{\mathrm{wt}}+{Q}_{u,\omega, p}^{\mathrm{pv}}={Q}_{i,p}^{\mathrm{D}}{f}_{\omega, p}^{\mathrm{D}}\kern2.75em \forall i,\left(s,k,u,\in i\right),\omega, p$$
$${V}_{i,\omega, p}^{\mathrm{sqr}}-{V}_{j,\omega, p}^{\mathrm{sqr}}=\left[2\left({R}^{\mathrm{L}}{P}_{ij,\omega, p}+{X}^{\mathrm{L}}{Q}_{ij,\omega, p}\right)\ {l}_{ij}+{Z^{L^2}}{l}_{ij}^2{I}_{ij,\omega, p}^{\mathrm{sqr}}\right]\kern3em \forall i,\omega, p$$
$${\left({V}_{i,\omega, p}^{\prime}\right)}^2{I}_{ij,\omega, p}^{\mathrm{sqr}}=g\left({P}_{ij,\omega, p},{Q}_{ij,\omega, p},\Gamma \right)\kern2.75em \forall ij,\omega, p$$

Operational limits

Expressions (11)–(17) define the operating limits in the EDS. Thus, voltage limits are guaranteed by (11), while (12)–(14) limit the current, active and reactive power flows through circuit ij. The square of the apparent power supplied in each substation is determined by (15) and limited by (16). Finally, (17) ensures that there is only a single direction of flow through circuit ij.

$$\underline{V^2}\le {V}_{i,\omega, p}^{\mathrm{sqr}}\le \overline{V^2}\kern4em \forall i,\omega, p$$
$$0\le {I}_{ij,\omega}^{\mathrm{sqr}}\le \overline{I_{ij}^2}\kern5.8em \forall ij,\omega, p$$
$$\left|{P}_{ij,\omega, p}\right|\le \overline{VI_{ij}}\left({y}_{ij,p}^{+}+{y}_{ij,p}^{-}\right)\kern2.75em \forall ij,\omega, p$$
$$\left|{Q}_{ij,\omega, p}\right|\le \overline{VI_{ij}}\left({y}_{ij,p}^{+}+{y}_{ij,p}^{-}\right)\kern2.75em \forall ij,\omega, p$$
$${Sg}_{s,\omega, p}^{\mathrm{s}\mathrm{qr}}=g\left({P}_{s,\omega, p}^{\mathrm{s}},{Q}_{s,\omega, p}^{\mathrm{s}},\Gamma \right)\kern1.2em \forall s,\omega, p$$
$${Sg}_{s,\omega, p}^{\mathrm{sqr}}\le {\left({SI}_s^{\mathrm{S}}\right)}^2\kern5.8em \forall s,\omega, p$$
$${y}_{ij,p}^{+}+{y}_{ij,p}^{-}\le 1\kern6em \forall ij,p$$

Investment limits

Constraints (18) and (19) guarantee that only one investment decision is carried out for EVCSs and WT units, at each node. On the other hand, (20) limits the number of PV units that can be installed at each node during the planning horizon, while (21) limits the number of EV chargers in each node. Expressions (22) and (23) refer to the binary characteristic of the investment variables (EVCSs and WT/units) and integer (PV units and EV chargers) of the components that can be added to the EDS.

$$\sum \limits_{p\ }{x}_{r,p}^{\mathrm{EV}}\le 1\kern2.75em \forall r$$
$$\sum \limits_{p\ }{x}_{k,p}^{\mathrm{wt}}\le 1\kern2.75em \forall k$$
$$\sum \limits_{p\ }{\beta}_u^{\mathrm{pv}}\le {\overline{\beta}}_u^{\mathrm{pv}}\kern2.75em \forall u$$
$${N}_{r,c,p}^{\mathrm{EV}}\le {\overline{C}}_c^{\mathrm{EV}}\sum \limits_{t=1}^P{x}_{r,t}^{\mathrm{EV}}\kern2.75em \forall r,c,p$$
$${x}_{r,p}^{\mathrm{EV}},{x}_{k,p}^{\mathrm{wt}}\kern0.5em \in \left\{0,1\right\}\kern2.25em \forall r,k,p$$
$${N}_{r,c,p}^{\mathrm{EV}},{\beta}_u^{\mathrm{pv}}\in \left\{{\mathbb{Z}}^{+}\right\}\kern2.75em \forall r,c,p,u$$

RES model

The operation of the WT units is represented by limiting the injected active/reactive power according to the capability curves and power factor restrictions (Rueda-medina et al. 2013). Thus, WT units are modeled using the capacity curve of a double-fed induction generator. To establish the generation limits, the points \(\left({P}_{k,1}^{\mathrm{wt}},{Q}_{k,1}^{\mathrm{wt}}\right),\kern0.em \left({P}_{k,2}^{\mathrm{wt}},{Q}_{k,2}^{\mathrm{wt}}\right),\kern0.em \left({P}_{k,3}^{\mathrm{wt}},{Q}_{k,3}^{\mathrm{wt}}\right)\), and \(\left({P}_{k,4}^{\mathrm{wt}},{Q}_{k,4}^{\mathrm{wt}}\right)\) were defined. Capacity curve is linearized using constraints presented in (24)–(28). The details of this formulation can be found in (Rueda-medina et al. 2013). The operational limits of active and reactive power by RES are shown in (29) and (30) for WT units, and (31) and (32) for PV units.

$${P}_{k,\omega, p}^{\mathrm{wt}}\le \frac{P_{k,2}^{\mathrm{wt}}-{P}_{k,1}^{\mathrm{wt}}}{Q_{k,2}^{\mathrm{wt}}-{Q}_{k,1}^{\mathrm{wt}}}\left({Q}_{k,\omega, p}^{\mathrm{wt}}-{Q}_{k,2}^{\mathrm{wt}}\right)+{P}_{k,2}^{\mathrm{wt}}\kern2.5em \forall k,\omega, p$$
$${P}_{k,\omega, p}^{\mathrm{wt}}\le \frac{P_{k,2}^{\mathrm{wt}}-{P}_{k,1}^{\mathrm{wt}}}{Q_{k,2}^{\mathrm{wt}}-{Q}_{k,1}^{\mathrm{wt}}}\left({Q}_{k,\omega, p}^{\mathrm{wt}}-{Q}_{k,2}^{\mathrm{wt}}\right)+{P}_{k,2}^{\mathrm{wt}}\kern2.5em \forall k,\omega, p$$
$${P}_{k,\omega, p}^{\mathrm{wt}}\le \frac{P_{k,3}^{\mathrm{wt}}-{P}_{k,2}^{\mathrm{wt}}}{Q_{k,3}^{\mathrm{wt}}-{Q}_{k,2}^{\mathrm{wt}}}\left({Q}_{k,\omega, p}^{\mathrm{wt}}-{Q}_{k,3}^{\mathrm{wt}}\right)+{P}_{k,3}^{\mathrm{wt}}\kern2.5em \forall k,\omega, p$$
$${P}_{k,\omega, p}^{\mathrm{wt}}\le \frac{P_{k,4}^{\mathrm{wt}}-{P}_{k,3}^{\mathrm{wt}}}{Q_{k,4}^{\mathrm{wt}}-{Q}_{k,3}^{\mathrm{wt}}}\left({Q}_{k,\omega, p}^{\mathrm{wt}}-{Q}_{k,4}^{\mathrm{wt}}\right)+{P}_{k,4}^{\mathrm{wt}}\kern2.5em \forall k,\omega, p$$
$${P}_{k,\omega, p}^{\mathrm{wt}}\le \frac{P_{k,4}^{\mathrm{wt}}}{Q_{k,4}^{\mathrm{wt}}-{\overline{Q}}_k^{\mathrm{wt}}}\left({Q}_{k,\omega, p}^{\mathrm{wt}}-{\overline{Q}}_{k,p}^{\mathrm{wt}}\right)\kern2.65em \forall k,\omega, p$$
$$0\le {P}_{k,\omega, p}^{\mathrm{wt}}\le {f}_{\omega}^{\mathrm{wt}}{\overline{P}}_k^{\mathrm{wt}}\sum \limits_{t=1}^P{x}_{k,p}^{\mathrm{wt}}\kern5.6em \forall k,\omega, p$$
$$\left|{Q}_{k,\omega, p}^{\mathrm{wt}}\right|\le {P}_{k,\omega, p}^{\mathrm{wt}}\tan \left({\mathit{\cos}}^{-1}\left({\varphi}^{wt}\right)\right)\kern4.2em \forall k,\omega, p$$
$$0\le {P}_{u,\omega, p}^{\mathrm{pv}}\le {f}_{\omega}^{\mathrm{pv}}{\overline{P}}_u^{\mathrm{pv}}\sum \limits_{t=1}^P{\beta}_{u,p}^{\mathrm{pv}}\kern5.9em \forall u,\omega, p$$
$$\left|{Q}_{u,\omega, p}^{\mathrm{pv}}\right|\le {P}_{u,\omega, p}^{\mathrm{pv}}\tan \left({\mathit{\cos}}^{-1}\left({\varphi}^{pv}\right)\right)\kern4.5em \forall u,\omega, p$$

EVCS model

The EVCS model is based on (De Quevedo et al. 2019). Constraint (33) ensures that the charging demand in EVCSs does not surpass the capacity of the stations, while (34) determines that the charging demand in EVCS corresponds to the EV demand obtained with the method presented in the following section “Uncertainty modelling”.

$${D}_{r,\omega, p}^{\mathrm{EV}\mathrm{CS}}\le \sum \limits_{t=1}^P\sum \limits_c{N}_{r,c,p}^{\mathrm{EV}}{P}_c^{\mathrm{EV}}\kern2.5em \forall r,\omega, p$$
$$\sum \limits_{r\ }{D}_{r,\omega, p}^{\mathrm{EV}\mathrm{CS}}={D}_{\omega, p}^{\mathrm{EV}}\kern3.5em \forall \omega, p$$

Uncertainty modelling

The uncertainties brought by intermittent renewable generation, future demand growth, and EV charging demand represent challenges to the reliable operation and planning of power systems (Zhou et al. 2017). Thus, a proposal for the allocation problem of EVCSs and RES that is more appropriate and committed to reality must include these uncertainties. In this work, the uncertainties related to consumer demand, EV demand, and renewable generation are considered.

Method for forecasting EV charging demand

Electrical system operators are interested in forecasting the EV charging demand to assess the impacts and needs for updating the EDS infrastructure (Knezović et al. 2017). To quantify the EV charging demand, a method to model its uncertainties is proposed here, based on (De Quevedo et al. 2019), that comprises seven steps described as follows:

  1. 1.

    For each EV, randomly select an initial state of charge (SOC) value.

  2. 2.

    For each EV v and day d, randomly (uniform distribution) assign a total daily travel a (from 10 km to 200 km).

  3. 3.

    If the SOC of the EV is enough to make the travel a, the SOC is updated and we go to step 5. Otherwise, go to step 4.

  4. 4.

    The EV should be charged with at least the SOC necessary to carry out the travel. After charging the vehicle, the SOC and the charging demand (kW) are updated. EV arrival times are selected based on the user behavior of the fuel vehicles presented in (Federal Highway Administration 2009).

  5. 5.

    If the last day was evaluated, go to step 6. Otherwise, evaluate the next day and go to step 2.

  6. 6.

    If the last EV was evaluated, go to step 7. Otherwise, evaluate the next EV and go to step 1.

  7. 7.

    Repeat steps 1 to 6 until each EV completes all daily trips. Finally, calculate the total demand (kW) for all EVs, for each hour and day.

The algorithm above was implemented in MATLAB (Mathworks 2017) considering two types of EVs with 40 kWh (Nissan leaf) and 60 kWh (Chevrolet Bolt) batteries. An analysis to obtain the charging profiles is carried out for the planning period of 1 year. As mentioned earlier, for each vehicle, a random SOC within the interval [0.2, 1.0] is initially selected; note that this happens only on the first trip of each vehicle. Eq. (35) determines the SOC of the vehicle v on day d, while (36) calculates the remaining battery capacity. Finally, (37) is used to determine the energy used by vehicle v on day d.

$${SOC}_{v,d}\le \frac{CP_{v,d}}{CN_v}\kern2.5em \forall v,d$$
$${CP}_{v,d}={CN}_v-{CU}_{v,d}\kern2.5em \forall v,d$$
$${CU}_{v,d}={d}_{a,v,d}{CON}_v+{CU}_{v,d-1}\forall a,v,d$$

The simulation was performed considering 1000 vehicles (half with 40 kWh and half with 60 kWh). After its execution, the EV charging demand for each hour of the year was obtained. Figure 1 illustrates the obtained EV average daily demand profile as well as the demand profile calculated for day 235; this day was chosen because it has the EV charging peak demand along the year: 4650 kW at 19:00. Note that there is a variation in the demand profiles, and the maximum demand registered on day 235 is about 20% higher than the average demand profile.

Fig. 1

EV charging demand profile

The SOC is separated into ten different categories (see Table 2) to facilitate the analysis. Figure 2(a) and (b) show the probability distribution function (PDF) of the initial and final SOC of the vehicle, respectively. Figure 4(a) shows that the vehicle is more probable to be charged when the SOC is below 0.5 (Categories 1–5). On the other hand, after charging (see Fig. 2(b)), the SOC is more likely to be larger than 0.5 (Categories 6–10).

Table 2 SOC categories
Fig. 2

a PDF of the initial SOC, b PDF of the final SOC, c CDF of the initial SOC, and d CDF of the final SOC

Figure 2(c) and (d) show the cumulative distribution function (CDF) of the initial and final SOC, respectively. The probability of the initial SOC to be between 0 and 0.5 (Categories 1-5) is 85.6% (Fig. 2(c)), while the probability of the final SOC being above 0.5 (Categories 6-10) is 91.4% (Fig. 2(d)). The information provided by the calculated profiles will be used to represent the power related to EV charging in the proposed model. Finally, the proposed method to forecast EVs demand is summarized in Fig. 3.

Fig. 3

Flowchart of the proposed method to forecast EVs demand

Scenario generation method

The set of scenarios is created from annual historical data of stochastic parameters using historical demand data (ONS 2019), solar irradiation data (Renewables 2021), wind speed data (Renewables 2021), and the EV charging demand previously provided. Since a high number of scenarios can be obtained, the k-means scenario reduction method is applied to achieve computational tractability. The hourly data are divided into 2 seasons; each season has 2 sub-blocks (day and night). Moreover, each sub-block is reduced to 10 clusters using k-means (the number of clusters was arbitrarily defined). The adopted process can be described in the following steps:

  1. 1

    Historical data on demand, solar irradiance, and wind speed are normalized by their corresponding maximum values.

  2. 2

    The annual duration curve for each stochastic parameter is classified into two seasons (blocks of time): winter and summer. The data contained in the time blocks are classified into two sub-blocks (night and day).

  3. 3

    The number of required clusters is defined. The k-means method is applied to each sub-block. Thus, the data contained in each sub-block is categorized according to the number of clusters previously established. At the end of the process, centroids of each cluster are determined.

  4. 4

    The set of scenarios is stored in a matrix that represents 40 operating conditions with four columns for the uncertain parameters (10 clusters x 2 seasons x 2 sub-blocks).

  5. 5

    The probabilities for each scenario are calculated by dividing the number of hours in the respective scenario by the sum of hours within a block of time.

Renewable generation profiles are obtained following the method in (Montoya-Bueno et al. 2015). The power profiles of the WT units are obtained, for each scenario, through linearization of the power curve, which is a function of the wind speed (38). Moreover, power profiles of the PV units are obtained in (39), depending on the cell junction temperature (40).

$${P}^{wt}=\left\{\begin{array}{c}0,\\ {}\frac{P_R}{v_{R-}{v}_I}v+{P}_R\left(1-\frac{v_R}{v_{R-}{v}_I}\right),\\ {}{P}_R,\\ {}0,\end{array}\right.\ {\displaystyle \begin{array}{c}v<{v}_I\\ {}{v}_I\le v<{v}_R\\ {}\begin{array}{c}{v}_R\le v<{v}_O\\ {}v\ge {v}_O\end{array}\end{array}}$$
$${P}^{pv}={P}_{STC}\left\{\frac{G}{1000}\left[1+\delta \left({T}_{cell}-25\right)\right]\right\}$$
$${T}_{cel}={T}_{amb} + \left(\frac{NOCT-20}{800}\right)G$$

Tests and results

The proposed approach was implemented in the mathematical language AMPL (Fourer et al. 2003) and solved using the commercial solver CPLEX (IBM 2019), in a computer with an Intel Xeon E5-2650 processor and 64GB of RAM. The proposed model is validated using the 24-node EDS adapted from (Tabares et al. 2016), which has 20 load nodes, four substations, a nominal voltage of 20 kV, and the horizon of 10 years is divided in two periods (5 years for each one). The upper and lower voltage magnitude limits are 1.05 and 0.95 pu. The EVCS operational cost is considered to be 10% of the installation cost and is included in the investment cost (Banol Arias et al. 2017) Furthermore, it is assumed that the EVs demand grows 10% in the second period of the planning. The energy supplied cost in the substation is 0.1 USD/kWh and the interest rate is 10%. Data associated with demand, substation capacity, scenarios used, EVCSs, and RES are available in (De Lima et al. 2021).

The results for the planning were analyzed according to the following case studies: Case I) The allocation problem of RES is optimized without investments in EVCSs; Case II) Joint optimal allocation of EVCSs and RES; Case III) Sensitivity analysis with different CO2 emission rates; and Case IV) Sensitivity analysis with EV penetration levels.

The investment plan for Case I determined the following actions: (1) First period: allocation of eight WT units at nodes 3, 4, 5, 9, 11, 14, 16 and 19; and installation of one hundred one PV units. (2) Second period: Allocation of six PV units at node 10. On the other hand, the investment plan for Case II defined the following proposals for each period: (1) First period: allocation of eight WT units at nodes 3, 4, 5, 9, 11, 14, 16 and 19; installation of eighty nine PV units; and allocation of five EVCSs 12 at nodes 3, 6, 8, 14, and 15. (2) Second period: Allocation of sixteen PV units (three at node 6, eight at node 10, and five at node 13). A summary of the main results for Cases I and II is shown in Table 3. It is possible to note, that the total cost for Case I (without investments in EVCSs) is higher than the cost related to Case II, with a difference of approximately 3.62 %. Moreover, Case II, which simultaneously optimizes the allocation of EVCSs and RES, resulted in lower emissions than Case I (a difference of 5.53%). The best expansion plan (Case II) is illustrated in Fig. 4.

Table 3 Main results for Cases I and II
Fig. 4

Topology of the expansion plan (Case II)

A sensitivity analysis was performed with different CO2 emission rates (Case III). The results of this analysis are summarized in Table 4. The first and the last solutions (1 and 9) represent the extreme solutions, with solution 1 presenting the lowest cost and maximum CO2 emission value and solution 9 the opposite. The first solution represents Case II, in which the problem is optimized without directly restricting CO2 emissions, aiming to minimize investment and operational costs (including emissions costs). Moreover, it is noted in Table 4 that to reduce CO2 emissions, investment in RES increases. Figure 5 shows the conflict between minimizing costs and reducing emissions. It is noted that the decrease in emission values leads to an increase in the total planning cost.

Table 4 Results for Case III
Fig. 5

Efficient frontier for case III

A sensitivity analysis was performed varying the EV penetration level. Figure 6 illustrates how the total cost increases as the EVs demand increases, with vehicle penetration ranging from 60% to 140%, emphasizing the importance of adequately forecasting the EVs charging demand.

Fig. 6

Sensitivity analysis with different EVs penetrations (Case IV)


A two-stage stochastic programming model for the simultaneous allocation problem of EV charging stations (EVCSs) and renewable energy sources (RES) in electrical distribution system (EDS) has been proposed in this paper. The proposed mixed-integer linear programming model aims to minimize investment and operational costs (including CO2 emission costs). Additionally, uncertainties related to conventional demand, EV demand, and renewable generation were considered.

Results showed that the installation of EVCSs has a positive impact on the EDS, reducing the expansion plan costs, despite the investment costs in this technology. Moreover, the integration of EVCS with RES contributes to the reduction of CO2 emissions, showing that the simultaneous allocation of these technologies can bring both economic and environmental benefits. A sensitivity analysis has been performed with different CO2 emission rates. Results demonstrate that an increase in RES investments leads to CO2 emission reduction. However, the reduction of CO2 emissions results in increasing costs, evidencing the conflict between cost and emission reduction.

Future work will consider the uncertainties associated with the penetration of EVs and RES. Besides, a new proposal would address the robust optimization that has been little explored in the specialized literature in comparison with stochastic programming.



ω Index of scenarios.

a Index of daily travel distance.

b Index of candidate nodes for installation of ESS.

c Index of alternatives for EV chargers.

d Index of days.

i Index of nodes.

ij Index of circuits.

k Index of candidate nodes for installation of WT units.

p Index of planning periods.

r Index of candidate nodes for installation of EVCSs.

s Index of substation nodes.

u Index of candidate nodes for installation of PV units.

v Index of EVs.


\({\overline{\beta}}_u^{\mathrm{pv}}\) Limit of PV units to be installed in each candidate node.

δ Power-temperature coefficient.

ζpv Emission rate of PV units.

\({\zeta}_i^{\mathrm{s}}\) Emission rate of energy supplied by substations.

ζwt Emission rate of WT units.

λ Number of years in each period.

πω Probability of the scenario s.

τ Interest rate.

Γ Number of discretization blocks.

Cem Cost of CO2 emissions.

\({C}_c^{\mathrm{EV}}\) Cost coefficients for EV chargers type c.

\({\overline{C}}_c^{\mathrm{EV}}\) Maximum number of EV chargers type c.

CINST Installation cost for the EVCS.

\({C}_u^{\mathrm{pv}}\) Cost coefficients for PV unit investment at node u.

copv Maintenance and operational cost coefficients for PV units.

cowt Maintenance and operational cost coefficients for WT units.

\({C}_k^{\mathrm{wt}}\) Cost coefficients for WT unit investment at node k.

CONv Electric vehicle consumption

CPv, d Remaining battery capacity for the vehicle v and day d.

CUv, d Used vehicle battery capacity for the vehicle v and day d.

\({D}_{\omega, p}^{\mathrm{EV}}\) Total EV demand in scenario ω and period p.

da, v, d Travel distance a of vehicle v on day d.

dω Duration (hours) of scenario ω.

\({f}_{\omega}^{\mathrm{D}}\) Demand factor of scenario ω.

\({f}_{\omega}^{\mathrm{pv}}\) PV generation factor of scenario ω.

G Solar irradiance.

\({\overline{I}}_{ij}\) Maximum current of circuit ij.

lij Length of circuit ij.

\({\overline{N}}^{\mathrm{pv}}\) Maximum number of PV units to be installed.

\({\overline{N}}^{\mathrm{wt}}\) Maximum number of WT units to be installed.

NOCT Nominal operating cell temperature conditions.

\({P}_{i,p}^{\mathrm{D}}\) Active power demand at node 풊 and period p.

\({P}_c^{\mathrm{EV}}\) Capacity of EV charger type c.

Pwt Output power of the WT units.

\({P}_{k,h}^{\mathrm{wt}}\) h-th point of the capability curve of WT unit k.

\({\overline{P}}_k^{\mathrm{wt}}\) Active power capacity of WT units at node k.

Ppv Output power of the PV units.

\({\overline{P}}_u^{\mathrm{pv}}\) Active power capacity of PV units at node u.

PSTC Power under standard test conditions.

\({Q}_{i,p}^{\mathrm{D}}\) Reactive power demand at node 풊 and period p.

\({\overline{Q}}_k^{\mathrm{wt}}\) Upper reactive power limits of WT unit at k.

\({\underset{\_}{Q}}_k^{\mathrm{wt}}\) Lower reactive power limits of WT unit at k.

\({Q}_{k,h}^{\mathrm{wt}}\) h-th point of the capability curve of WT unit k

RL Conductor resistance.

\({S}_{i,p}^{\mathrm{D}}\) Apparent power demand at node i at period p.

\({SI}_i^{\mathrm{S}}\) Apparent power capacity of the existent substation at node i.

SOCv, d State of charge EV v on day d.

Tamb Ambient temperature.

Tcell Cell temperature.

\(\overline{V}/\underline{V}\) Upper and lower voltage limits.

v Wind speed.

vI Cut-in wind speed.

vO Cut-off wind speed.

vR Rated wind speed.

XL Conductor reactance.

ZL Conductor impedance.


\({\beta}_{u,p}^{\mathrm{pv}}\) Investment variable for a PV unit at node u and period p.

\({D}_{r,\omega, p}^{\mathrm{EVCS}}\) Charging demand in EVCS at node r, scenario ω and period p.

EMp CO2 emissions costs at period p.

ESp Operational costs related to the energy imported by the substation at period p.

IEVC Sp Investment costs in EVCSs at period p.

IRESp Investment costs in RES at period p.

\({I}_{ij,\omega, p}^{sqr}\) Square of the current through circuit ij in scenario ω and period p.

\({N}_{r,c,p}^{\mathrm{EV}}\) Number of EV chargers at node r, type c and period p.

ORESp RES maintenance costs at period p.

Pij, ω, p Active power flow through circuit ij in scenario ω and period p.

\({P}_{u,\omega, p\kern0.5em }^{\mathrm{pv}}\) Active power injected by the PV units at node u, scenario ω, and period p.

\({P}_{s,\omega, p}^{\mathrm{s}}\) Active power supplied by the substation at node s, scenario ω, and period p.

\({P}_{k,\omega, p\kern0.5em }^{\mathrm{wt}}\) Active power injected by the WT units at node k, scenario ω, and period p.

PR Rated electrical power.

Qij, ω, p Reactive power flow through circuit ij in scenario ω and period p.

\({Q}_{u,\omega, p}^{\mathrm{pv}}\) Reactive power injected by the PV units at node u, scenario ω, and period p.

\({Q}_{s,\omega, p}^{\mathrm{s}}\) Reactive power supplied by the substation i at node s, scenario ω, and period p

\({Q}_{k,\omega, p}^{\mathrm{wt}}\) Reactive power injected by the WT units at node k, scenario ω, and period p.

\({Sg}_{i,\omega, p}^{\mathrm{sqr}}\) Square of the apparent power supplied by substation at node i, scenario ω, and period p.

\({V}_{i,\omega, p}^{sqr}\) Square of the voltage at node i, scenario ω, and period p.

\({x}_{r,p}^{\mathrm{EV}}\) Investment variable for installing an EVCS at node r and period p.

\({x}_{k,p}^{\mathrm{wt}}\) Investment variable for installing a WT unit at node k and period p.

\({y}_{ij,p}^{-}\) Operational variable related to the forward direction of circuit ij and period p

\({y}_{ij,p}^{+}\) Operational variable related to the backward direction of circuit ij and period p.

Availability of data and materials

Data associated with demand, substation capacity, scenarios used, EVCSs, and RES are available in (De Lima et al. 2021).



Sistemas de distribuição elétrica


Estações de carregamento de veículos elétricos


Veículos elétricos


Programação linear inteira mista




Fontes de energia renováveis


Turbina de vento


  1. Amini MH, Islam A (2014) Allocation of electric vehicles’ parking lots in distribution network. 2014 IEEE PES Innov Smart Grid Technol Conf ISGT 2014:1–5.

  2. Bagherzadeh L, Shayeghi H, Seyed-Shenava SJ (2019) Optimal allocation of electric vehicle parking lots for minimizing distribution system costs considering uncertainties. 2019 Iran Conf Renew Energy Distrib Gener ICRE DG 2019:19–20.

  3. Banol Arias N, Tabares A, Franco JF, Lavorato M, Romero R (2017) Robust joint expansion planning of electrical distribution systems and EV charging stations. IEEE Trans Sustain Energy 3029:1–1.

  4. Cai L, Pan J, Zhao L, Shen X (2017) Networked electric vehicles for green intelligent transportation. IEEE Commun Stand Mag 1(2):77–83.

  5. Canizes B, Soares J, Costa A, Pinto T, Lezama F, Novais P, Vale Z (2019) Electric vehicles’ user charging behaviour simulator for a smart city. Energies 12(8):1–20.

  6. Coignard BJ, Macdougall P (2019) Will Electric vehicles drive distribution grid upgrades. IEEE Electrification Magazine 7(2):46–56.

  7. De Lima T, Franco JF, Lezama F, Soares J, Vale Z. Joint optimal allocation of electric vehicle charging stations and renewable energy sources including CO2 emissions: Study data. Accessed 18 Mar 2021.

  8. De Quevedo PM, Munoz-Delgado G, Contreras J (2019) Impact of electric vehicles on the expansion planning of distribution systems considering renewable energy, storage, and charging stations. IEEE Trans Smart Grid 10(1):794–804.

  9. Energy Information Administration (EIA). Annual energy outlook 2020 2020. (Accessed 18 Mar 2021)

    Google Scholar 

  10. Etezadi-Amoli M, Choma K, Stefani J (2010) Rapid-charge electric-vehicle stations. IEEE Transactions on Power Delivery 25(3):1883–1887.

    Article  Google Scholar 

  11. Federal Highway Administration. National Household Travel Survey 2009. Accessed 19 Apr 2021.

  12. Fourer R, Gay DM, Kernighan BW. AMPL - A modeling language for mathematical programming: Second Edition 2003:519–554. doi:, 36, 5

    Book  MATH  Google Scholar 

  13. Franco JF, Rider MJ, Romero R (2014) A mixed-integer quadratically-constrained programming model for the distribution system expansion planning. Int J Electr Power Energy Syst 62:265–272.

    Article  Google Scholar 

  14. IBM. International business machines. IBM ILOG CPLEX 2019. (Accessed 18 Mar 2021)

    Google Scholar 

  15. Knezović K, Marinelli M, Zecchino A, Andersen PB, Traeholt C (2017) Supporting involvement of electric vehicles in distribution grids: lowering the barriers for a proactive integration. Energy 134:458–468.

    Article  Google Scholar 

  16. Mathworks. Matlab 2017. Accessed 3 Mar 2021.

  17. Mauri G, Valsecchi A. The role of fast charging stations for electric vehicles in the integration and optimization of distribution grid with renewable energy sources. 2012. CIRED 2012 workshop: integration of renewables into the distribution grid. Paper 227 2012:1–4.

  18. Mirzaei MJ, Kazemi A, Homaee O (2016) A probabilistic approach to determine optimal capacity and location of electric vehicles parking lots in distribution networks. IEEE Trans Ind Informatics 12(5):1963–1972.

    Article  Google Scholar 

  19. Montoya-Bueno S, Munoz JI, Contreras J (2015) A stochastic investment model for renewable generation in distribution systems. IEEE Trans Sustain Energy 6(4):1466–1474.

    Article  Google Scholar 

  20. Moradijoz M, Parsa Moghaddam M, Haghifam MR, Alishahi E (2013) A multi-objective optimization problem for allocating parking lots in a distribution network. Int J Electr Power Energy Syst 46:115–122.

    Article  Google Scholar 

  21. Mozafar MR, Moradi MH, Amini MH (2017) A simultaneous approach for optimal allocation of renewable energy sources and electric vehicle charging stations in smart grids based on improved GA-PSO algorithm. Sustain Cities Soc 32:627–637.

    Article  Google Scholar 

  22. Neyestani N, Damavandi MY, Shafie-Khah M, Contreras J, Catalão JPS (2015) Allocation of plug-in vehicles’ parking lots in distribution systems considering network-constrained objectives. IEEE Trans Power Syst 30(5):2643–2656.

    Article  Google Scholar 

  23. ONS. Operador Nacional do Sistema Elétrico 2019. (Accessed 3 Mar 2021)

    Google Scholar 

  24. Pashajavid E, Golkar MA (2013) Posicionamento e dimensionamento ideal de tomadas em estações de carregamento de veículos elétricos em redes de distribuição com alta penetração de painéis fotovoltaicos. J Renovar Energia Sustentável 5 (5).

  25. (acessado em 3 de março de 2021)

  26. Richardson DB (2013) Veículos elétricos e a rede elétrica: uma revisão das abordagens de modelagem, impactos e integração de energia renovável. Renew Sust Energ Rev 19: 247–254.

  27. Rueda-medina AC, Franco JF, Rider MJ, Padilha-feltrin A, Romero R (2013) Uma abordagem de programação linear inteira mista para tipo ótimo, tamanho e alocação de geração distribuída em sistemas de distribuição radial. Electr Power Syst Res 97: 133–143.

  28. Shaaban MF, Mohamed S, Ismail M, Qaraqe KA, Serpedin E (2019) Planejamento conjunto de estações de carregamento EV inteligentes e DGs em microrredes híbridas remotas ecologicamente corretas. IEEE Trans Smart Grid 10 (5): 5819–5830.

  29. Tabares A, Franco JF, Lavorato M, Rider MJ (2016) Planejamento de expansão de longo prazo em vários estágios de sistemas de distribuição elétrica considerando múltiplas alternativas. IEEE Trans Power Syst 31 (3): 1900–1914.

  30. Wolsey L (1998) Programação inteira. Springer Heidelberg Dordrecht London New York, New York.

  31. Zeng B, Zhu Z, Xu H, Dong H (2020) Alocação e gestão ótimas de estacionamentos públicos para acomodação eficiente de pev em sistemas de distribuição. IEEE Trans Ind Appl 56 (5): 5984–5994.

  32. Zhou Z, Sun C, Shi R, Chang Z, Zhou S, Li Y (2017) Programação de energia robusta em redes veículo-rede. IEEE Netw 31 (2): 30–37.

Download references


We acknowledge this work to our funding agencies in Portugal and Brazil (see Funding section).

About this supplement

This article has been published as part of Energy Informatics Volume 4, Supplement 2 2021: Proceedings of the Energy Informatics.Academy Conference Asia 2021. The full contents of the supplement are available at


The work was supported from FEDER funds through the Operational Programme for Competitiveness and Internationalization (COMPETE2020), under Project POCI-01-0145-FEDER-028983; by National Funds through the FCT Portuguese Foundation for Science and Technology, under Projects PTDC/EEI-EEE/28983/2017(CENERGETIC), CEECIND/02814/2017, and UIDB/000760/2020. This Brazillian team was supported by the Brazilian institutions Coordenação de Aperfeiçoamento de Pessoal de Nível Superior - Brasil (CAPES) - Finance Code 001, CNPq (process 313047/2017–0) and São Paulo Research Foundation (FAPESP), grants 2015/21972–6, 2017/02831–8, 2018/23617–7, and 20018/08008–4 (CENERGETIC research project).

Author information




Conceptualization, T.D.L. and J.F.F.; methodology, T.D.L and J.F.F; software, T.D.L; validation, T.D.L; supervision, J.F.F., F.L., and J.S.; review & editing analysis, J.F.F., F.L., J.S., and Z.V.; writing, T.D.L and J.F.F. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Tayenne Dias de Lima.

Ethics declarations

Ethics approval and consent to participate

Not applicable.

Consent for publication

Not applicable.

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

de Lima, T.D., Franco, J.F., Lezama, F. et al. Joint Optimal Allocation of Electric Vehicle Charging Stations and Renewable Energy Sources Including CO2 Emissions. Energy Inform 4, 33 (2021).

Download citation


  • Allocation of electric vehicle charging stations
  • Electric vehicle charging stations
  • EV charging forecast method
  • Renewable energy sources