# Energy Trading with Electric Vehicles in Smart Campus Parking Lots
## 1 Introduction
This work focuses on energy trading with electric vehicles in smart parking lots. Smart parking lots are smart places that are capable of supporting both parking and charging services for electric vehicles during their parking time for a price [9]. With respect to the electric vehicle owner, the main objective is to charge an electric vehicle as quickly as possible considering a low charging cost without considering the status of other electric vehicles nor the electricity price or grid condition. On the contrary, the main objective of retailers and the parking lot operator is to maximize the net profit. Thus, market mechanisms are different based on actors (parking lot operator, retailers, customers, etc.) and the scale of the electric vehicle system (home, parking lots, fast charging stations, etc.). The desired outcome of buying energy from another electric vehicle rather than the main power grid may include economic benefits for owners such as cost minimization. However, there are many operational benefits for utilities such as reduced dependence on the power grid, decreased transmission losses, improved system efficiency, and balance between energy demand and supply [10]. Most of the previous research has focused on the grid integration of electric vehicles and how to mitigate the impact of electric vehicle charging on the distribution power system; however, this work focuses on energy trading with electric vehicles in smart parking lots. During parking time, owners of electric vehicles can invest their batteries in energy trading with the parking lot operator or other electric vehicles by selling the surplus energy in their battery. During the on-peak period, the parking lot operator can get power from electric vehicles at a lower price compared with the grid wholesale price. Also, the owners of electric vehicles can charge their electric vehicles at a low price during off-peak time and resell it at a higher price during the on-peak period. There is a need for a new framework for energy trading between electric vehicles and the parking lot operator to facilitate the new parking lot market operation. The main contributions of this work are:  
* A framework for energy trading with electric vehicles in smart parking lots is designed. * A four-layered architecture for energy trading in smart parking lots is proposed. It consists of a parking energy layer, a data acquisition layer, a communication network layer, and a market layer. * A market mechanism based on the Knapsack Algorithm is proposed to maximize the profit of the parking lot operator. * A real case study with a realistic parking pattern of a parking lot on a university campus is considered. This paper is structured as follows. We propose a four-layered architecture for energy trading with electric vehicles in smart parking lots in Section 2. In Section 3, we develop a market mechanism for energy trading based on the Knapsack Algorithm (KPA). Section 4 provides the performance evaluation of a real case study of a university campus. Finally, Section 5 concludes the paper and gives directions for future work.