# Assignment Approach for Electric Vehicle Charging Using Traffic Data Collected by SUMO

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

_{2}in France, accounting for 31% and 29% of emissions in 2019 and 2020, respectively [7]. The sector was also one of the main sources of air pollution in 2019, with CO

_{2}accounting for 97% of greenhouse emissions, 2% attributed to HFCs from air conditioning systems, and N

_{2}O accounting for the remaining percentage.

- First, we describe the architecture of an enhanced smart grid system integrating ITS-G5 technology, which provides useful real-time information and efficient communication between roadside units (RSUs) and EVs for the purpose of distributing EV charging management decisions.
- Second, an optimized approach allowed for optimal allocation of EVs by taking into account the characteristics of the EVs, charging stations, and road traffic disseminated by the RSUs and collected in our study by the SUMO simulator.
- Third, a linear mathematical program incorporated all of the constraints. This approach assigned each electric vehicle to an appropriate charging station and consumed a minimum of electric energy when it reached the designated charging station, thus maximizing the final state of charge and reducing the waiting time of EVs at the charging station.
- Finally, we performed extensive simulations to verify the effectiveness of this approach. Our evaluation was performed using the realistic traffic simulator. The proposed strategy was found to be more effective than the shorter path strategy in managing the charging of electric vehicles.

## 2. Related Work

#### 2.1. Abbreviations Smart Grids Based on Traffic Management Techniques

#### 2.2. Smart Grids Improvements Due to V2X Communications

#### 2.3. Mobility Simulators

## 3. Proposed Solution

#### 3.1. Model System

#### 3.2. Assignment Algorithm

- The distance given by the GPS.
- The state of charge (SOC) of the remaining battery.
- The driving mode of the driver and accessories.
- The capacity and autonomy of the battery.

- The number of charging stations.
- The charging power of each station and its position.

#### 3.2.1. Problem Formulation

- The electric vehicles are of the same brand.
- An electric vehicle can be assigned to only one station.
- The charging stations have the same characteristics (power of charge).
- The charging station has several charging points.
- The road is flat.

_{0}(i, t), SOC

_{f}(i, j, t + T), q (i, j, t), K

_{jam}(i, j, t), and V

_{f}(i, j, t).

_{f}(i, j, t + T (i, j, t)) can be expressed as a function of SOC

_{0}(i, t) and speed variation:

#### 3.2.2. Algorithm

_{f}max (see Equation (3)) of each vehicle with each station, then it selects the stations with an available outlet at the minimum. If the number of outlets available at the station is greater than or equal to the number of vehicles assigned to the same station, the assignment is made. Otherwise, the average SOC

_{f max}of the EVs assigned to the same station is calculated and the minimum average is selected.

Algorithm 1: Assignment Algorithm |

Input: EV_{i}[Soc_{0},C_{i},A_{i}]; CS_{j} [q_{ij}, d_{ij}, Kjam_{ij} ] |

Output: [Soc_{f max}] |

1. RSU broadcasts the EV charging service |

2. For each EV (1,….,nEV) and for each CS (1,….,mcs) |

3. Calculate SOC_{fij} (using Equation (3)) |

4. Select CS according to occupancy (number of available outlets) |

5. If the number of outlets is less than the number of vehicles assigned to the same station, then |

6. Calculate the average of Max(Soc_{fij}) of the vehicles assigned to the same station |

7. Select the minimum of the average SOC_{fij} |

8. Update outlet matrix after EV affectation |

9. end if |

## 4. Experiments

#### 4.1. Preparation of the Simulation

**–osm-files map.osm -o filename.net.xm**].

**randomTrips.py -n Filename.net.xml -r File-name.rou.xml -e 1000 -l -e**] created two automatic files with the extensions .rou and .rou.alt, which contained all of the information concerning the road and vehicles.

#### 4.2. Insertion of EV and CS

#### 4.3. SUMO Connection with TraCi

_{jam}(i, j, t), and V

_{f}(i, j, t) for a choice of 6 vehicles (n = 6) and 6 stations (m = 6).

## 5. Obtained Results: Discussion and Analysis

#### 5.1. Illustrative Example

_{i}= 160 km and capacity of C

_{i}= 24 KWh:

- n = 6 EVs.
- m = 6 CSs.
- The SOC
_{0}(i, t) of each vehicle EV_{i}is given. - Number of outlets at the charging stations: n
_{1}= 1, n_{2}= 1, n_{3}= 1, n_{4}= 0, n_{5}= 2, n_{6}= 2.

_{f max}chosen by our approach to match the assignments (numbers written in red). The optimal solution of the linear program that represented the system is given in Table 3 and Figure 10. This answer corresponded to the optimal assignment of each EV. A comparative study in the following paragraph explains the advantages of our approach.

#### 5.2. Evaluation and Performance

## 6. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Ban, D.; Michailidis, G.; Devetsikiotis, M. Demand response control for PHEV charging stations by dynamic price adjustments. In Proceedings of the 2012 IEEE PES Innovative Smart Grid Technologies (ISGT), Washington, DC, USA, 16–20 January 2012; pp. 1–8. [Google Scholar]
- Cabello, G.; Navas, S.; V’azquez, I.; Iranzo, A.; Pino, F. Renewable medium-small projects in Spain: Past and present of microgrid development. Renew. Sustain. Energy Rev.
**2022**, 165, 112622. [Google Scholar] [CrossRef] - Lakshminarayana, S.; Quek, T.Q.; Poor, H.V. Cooperation and storage tradeoffs in power grids with renewable energy resources. IEEE J. Sel. Areas Commun.
**2014**, 32, 1386–1397. [Google Scholar] [CrossRef] - Maharjan, S.; Zhu, Q.; Zhang, Y.; Gjessing, S.; Basar, T. Dependable demand response management in the smart grid: A Stackelberg game approach. IEEE Trans. Smart Grid
**2013**, 4, 120–132. [Google Scholar] [CrossRef] - Palensky, P.; Kupzog, F. Smart grids. Annu. Rev. Environ. Resour.
**2013**, 38, 201–226. [Google Scholar] [CrossRef] - Kabalci, Y. A survey on smart metering and smart grid communication. Renew. Sustain. Energy Rev.
**2016**, 57, 302–318. [Google Scholar] [CrossRef] - Liu, Z.; Ciais, P.; Deng, Z.; Lei, R.; Davis, S.J.; Feng, S.; Zheng, B.; Cui, D.; Dou, X.; Zhu, B.; et al. Near-real-time monitoring of global CO
_{2}emissions reveals the effects of the Covid-19 pandemic. Nat. Commun.**2020**, 11, 5172. [Google Scholar] [CrossRef] [PubMed] - Roszczypala, D.; Batard, C.; Ginot, N.; Poitiers, F. Optimisation de charge de véhicules électriques au sein d’un micro-réseau avec production d’énergie renouvelable, et stockage fixe. In Proceedings of the Symposium de Genie Electrique (SGE 2018), Nancy, France, 3–5 July 2018. [Google Scholar]
- Dominguez, J.M.L.; Sanguino, T.J.M. Review on V2X, I2X, and P2X communications and their applications: A comprehensive analysis over time. Sensors
**2019**, 19, 2756. [Google Scholar] [CrossRef] [PubMed] - Alghamdi, T.G.; Said, D.; Mouftah, H.T. Decentralized energy storage system for EVs charging and discharging in smart cities context. In Proceedings of the 2019 IEEE International Conference on Communications (ICC), Shanghai, China, 20–24 May 2019; pp. 1–5. [Google Scholar]
- Ma, C.; Rautiainen, J.; Dahlhaus, D.; Lakshman, A.; Toebermann, J.-C.; Braun, M. Online optimal charging strategy for electric vehicles. Energy Procedia
**2015**, 73, 173–181. [Google Scholar] [CrossRef] - Kristoffersen, T.K.; Capion, K.; Meibom, P. Optimal charging of electric drive vehicles in a market environment. Appl. Energy
**2011**, 88, 1940–1948. [Google Scholar] [CrossRef] - He, Y.; Venkatesh, B.; Guan, L. Optimal scheduling for charging and discharging of electric vehicles. IEEE Trans. Smart Grid
**2012**, 3, 1095–1105. [Google Scholar] [CrossRef] - Shaaban, M.F.; Ismail, M.; El-Saadany, E.F.; Zhuang, W. Real-time PEV charging/discharging coordination in smart distribution systems. IEEE Trans. Smart Grid
**2014**, 5, 1797–1807. [Google Scholar] [CrossRef] - Wang, T.; Cassandras, C.G.; Pourazarm, S. Energy-aware vehicle routing in networks with charging nodes. IFAC Proc. Vol.
**2014**, 47, 9611–9616. [Google Scholar] [CrossRef] - Wang, M.; Liang, H.; Zhang, R.; Deng, R.; Shen, X. Mobility-aware coordinated charging for electric vehicles in VANET-enhanced smart grid. IEEE J. Sel. Areas Commun.
**2014**, 32, 1344–1360. [Google Scholar] [CrossRef] - Cecchini, G.; Bazzi, A.; Masini, B.M.; Zanella, A. Performance comparison between IEEE 802.11 p and LTE-V2V in-coverage and out-of-coverage for cooperative awareness. In Proceedings of the 2017 IEEE Vehicular Networking Conference (VNC), Turin, Italy, 27–29 November 2017; pp. 109–114. [Google Scholar]
- Lim, K.G.; Lee, C.H.; Chin, R.K.Y.; Yeo, K.B.; Teo, K.T.K. Simulators for vehicular ad hoc network (VANET) development. In Proceedings of the 2016 IEEE International Conference on Consumer Electronics-Asia (ICCE-Asia), Seoul, Republic of Korea, 26–28 October 2016; pp. 1–4. [Google Scholar]
- Lee, C.H.; Lim, K.G.; Chua, B.L.; Chin, R.K.Y.; Teo, K.T.K. Progressing toward urban topology and mobility trace for vehicular ad hoc network (VANET). In Proceedings of the 2016 IEEE Conference on Open Systems (ICOS), Langkawi, Malaysia, 10–12 October 2016; pp. 120–125. [Google Scholar]
- Wegener, A.; Piórkowski, M.; Raya, M.; Hellbrück, H.; Fischer, S.; Hubaux, J.-P. TraCi: An interface for coupling road traffic and network simulators. In Proceedings of the 11th Communications and Networking Simulation Symposium, Ottawa, ON, Canada, 14–17 April 2008; pp. 155–163. [Google Scholar]
- Mkahl, R.; Nait-Sidi-Moh, A.; Gaber, J.; Wack, M. A linear optimization approach for electric vehicles charging. In Proceedings of the 3rd International Renewable and Sustainable Energy Conference (IRSEC), Marrakech, Morocco, 10–13 December 2015; pp. 1–6. [Google Scholar]
- Farhani, R.; El Hillali, Y.; Rivenq, A.; Boughaleb, Y.; Hajjaji, A. Real-time traffic data collection using the two simulators SUMO and OMNeT++. In Proceedings of the 11th International Symposium on Signal, Image, Video and Communications (ISIVC), El Jadida, Morocco, 18–20 May 2022; pp. 1–4. [Google Scholar]

**Figure 9.**Traffic conditions data. (

**a**) Traffic density (

**b**) Traffic flow (

**c**) Distance (

**d**) Reference speed.

Notation | Description |
---|---|

n | Number of electric vehicles (EV_{1}, EV_{2}, …, EV_{n}) |

m | Number of charging stations (CS_{1}, CS_{2}, …, CS_{m}) |

Alloc (i, j, t) | EV_{i} allocation coefficient at charge station CS_{j} at time t |

K (i, j, t) | Vehicle density instant on the route between the EV_{i} and station CS_{j} at time t [veh/km] |

V (i, j, t) | Vehicle speed according to traffic conditions at time t [km/h] |

v_{f} (i, j, t) | Reference speed on the route between the EV_{i} position and station CS_{j} at time t [km/h]. |

k_{jam}(i, j, t) | Traffic density, capacity supported by the road leading from the EV_{i} position to charging station CSj at time t [veh/km]. |

q (i, j, t) | Vehicle flow [veh/h] |

d (i, j, t) | Distance between the vehicle EV_{i} and charging station CS_{j} at time t [km] |

C (i) | Nominal capacity of EV_{i}’s traction battery [KWh] |

A(i) | Autonomy of the traction battery of vehicle EV_{i} [km] |

T (i, j, t) | Time required to complete distance d (i, j, t) [h] |

SOC_{0}(i, t) | Initial state of charge of the EV_{i} battery at time t [%] |

SOC_{f} (i, j, t + T) | Final state of charge of the EV_{i} battery upon arrival at charging station CS_{j} |

CS_{1} | CS_{2} | CS_{3} | CS_{4} | CS_{5} | CS_{6} | |
---|---|---|---|---|---|---|

EV_{1}SOC0 = 25% | 5.115 | 23.357 | 19.366 | 13.336 | 22.117 | 20.659 |

EV_{2}SOC0 = 36% | 0.218 | 34.062 | 0 | 0 | 0 | 0 |

EV_{3}SOC0 = 45% | 39.306 | 42.564 | 40.219 | 39.642 | 41.253 | 39.788 |

EV_{4}SOC0 = 21% | 10.763 | 15.938 | 12.001 | 11.236 | 13.486 | 12.001 |

EV_{5}SOC0 = 45% | 24.592 | 28.360 | 25.622 | 25.020 | 26.776 | 25.387 |

EV_{6}SOC0 = 28% | 0 | 21.840 | 0 | 0 | 6.691 | 6.784 |

CS_{1} | CS_{2} | CS_{3} | CS_{4} | CS_{5} | CS_{6} | |
---|---|---|---|---|---|---|

Number of outlets | 1 | 1 | 1 | 0 | 2 | 2 |

Optimal Assignment | EV_{2} | EV_{5} | EV_{4}/EV_{1} | EV_{3}/EV_{6} | ||

SOCf (%) | 34.062 | 25.622 | 13.486/22.117 | 39.788/6.784 |

CS_{1} | CS_{2} | CS_{3} | CS_{4} | CS_{5} | CS_{6} | |
---|---|---|---|---|---|---|

EV_{1} | 0.931 | 1.102 | 0.696 | 0.563 | 0.864 | 1.432 |

EV_{2} | 1.37 | 1.31 | 1.357 | 1.356 | 1.525 | 2.093 |

EV_{3} | 1.244 | 1.179 | 1.229 | 1.228 | 1.398 | 1.966 |

EV_{4} | 2.105 | 2.04 | 2.091 | 2.09 | 2.259 | 2.827 |

EV_{5} | 1.858 | 1.793 | 1.844 | 1.843 | 2.012 | 2.580 |

EV_{6} | 1.235 | 1.17 | 1.447 | 1.192 | 1.615 | 2.1831 |

Number of outlets | 1 | 1 | 1 | 0 | 2 | 2 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Farhani, R.; El Hillali, Y.; Rivenq, A.; Boughaleb, Y.; Hajjaji, A.
Assignment Approach for Electric Vehicle Charging Using Traffic Data Collected by SUMO. *World Electr. Veh. J.* **2023**, *14*, 40.
https://doi.org/10.3390/wevj14020040

**AMA Style**

Farhani R, El Hillali Y, Rivenq A, Boughaleb Y, Hajjaji A.
Assignment Approach for Electric Vehicle Charging Using Traffic Data Collected by SUMO. *World Electric Vehicle Journal*. 2023; 14(2):40.
https://doi.org/10.3390/wevj14020040

**Chicago/Turabian Style**

Farhani, Riham, Yassin El Hillali, Atika Rivenq, Yahia Boughaleb, and Abdelowahed Hajjaji.
2023. "Assignment Approach for Electric Vehicle Charging Using Traffic Data Collected by SUMO" *World Electric Vehicle Journal* 14, no. 2: 40.
https://doi.org/10.3390/wevj14020040