EV Smart Charging with Advance Reservation Extension to the OCPP Standard †

: An accurate management of the interactions among end user, electric vehicle, and charging station during recharge is fundamental for the di ﬀ usion of electric mobility. The paper proposes an extension of the Open Charge Point Protocol standard with the aim of including the user in the charging optimization process. The user negotiates with the central station a recharge reservation giving his / her preference and ﬂexibility. The charging station management system provides di ﬀ erent solutions based on user’s ﬂexibility. This negotiation allows the optimization of the power grid management considering the user requests and constraints. The complete architecture has been designed, implemented on a web server and on a smartphone app, and tested. Results are reported in this work.


Introduction
Full electric vehicles (FEV) are gaining popularity and market penetration can grow and sustain itself, reducing the cost of FEV. Currently, the most serious limitations to the diffusion of FEV is the lack of a widespread FEV charging infrastructure, in spite of the wide diffusion of electrical infrastructure. This infrastructure will require investment from both the private and public sectors. Although the cost issue of FEVs is expected to subside with their growing diffusion, the limited car autonomy and long battery charging time, much longer if compared to refueling of internal combustion vehicles [1], are still felt by buyers as serious barriers to the purchase [2,3].
The battery recharging time is primarily limited by the capacity of the grid connection. While plug-in recharging can take place overnight at home, a faster charging solution, requiring a high power to the electrical grid, can be made in recharging stations, in commercial or public parking lots, in shopping centers, and along streets or workplaces.
With a mass diffusion of FEV, the battery charges will have a great impact on the configuration and operation of smart grids, considering the high power needed for a fast charge (e.g., 150 kW required to charge a Tesla model S from 20% to 80% in 30 min). Overloading problems may arise when several vehicles in the same neighborhood recharge at the same time, or during the normal peak loads [4][5][6][7][8][9]. The effect of the electric vehicles (EV) charging process on a smart grid can be relevant. A pooling strategy of multiple charge points that could increase the grid stability in case of high fluctuation of renewable energy resources is presented in [10]. In this work we will focus on the OCPP standard. OCPP [31,32] is an open standard introduced by the Open Charge Alliance (OCA), a consortium of public and private organizations.
The OCPP is the industry-supported de facto standard for communication between a Charging Station and a Charging Station Management System (CSMS) and it is designed to accommodate any type of charging technique [32].
The purpose of OCA is to favor the development of a network infrastructure with the creation of an open protocol that is free from the characteristics of each individual manufacturer and that can allow the management of every single factor within the recharging operation. The OCPP is aimed to perform a number of operations between components that typically represents physical devices involved in the recharging operation, such as a "Charge Point" or the "Central System". These operations are carried out through the exchange of one or more messages called "Protocol Data Unit" (PDU).
The OCPP version 1.5, released in June 2012, allows to: • monitor and control access to individual charging stations; • check and manage the recharge status; • send data to individual users and managers; • allow the payment procedure; • allow reservation mechanisms and management of the electricity grid.
In recent years, the OCPP has been modified in order to take into account emerging requirements of smart grids and increase the involvement of the user in the charging process.
One fundamental feature added to the 1.6 version, released in October 2015, is the "Smart Charging". With "Smart Charging" the Central System can modify the charging power of a specific EV, or the total allowed energy consumption on an entire Charge Point on the basis of the energy availability on the grid. The Central System receives the energy demand/request forecast from the grid operator and accordingly modifies the charging schedules for some or all charging transactions. The Charging characteristics and time schedule are defined in the ChargingProfile type describing the Energies 2020, 13, 3263 5 of 21 amount of power or current that can be delivered per time interval. Although the ChargingProfile can be related to a single transaction, the user does not have an active role in its definition.
Some of the relevant improvements of OCPP 2.0, released in March 2018, are listed below: • cyber security; • support of the ISO 15118 standard; • different customer authorization options (RFID card/token, ISO 15118-1 Plug and Charge, payment terminals, local mechanical key, smart phones, etc.); • messages on a Charging Station to be displayed to EV drivers (related to the transaction, on the language to be used, on the applicable tariff before the EV driver starts charging, to show the running cost during and at the end of a charging transaction); • Extended Smart Charging.
The Extended Smart Charging tries to optimize the energy management, considering the limits of the energy provider or the constraints of a sustainable energy from solar panels, in case of a local supply [32]. Such smart management is obtained through the flexibility of the ChargingProfile. The OCPP 2.0 extends the features of the ChargingProfile. A CSMS can send a charging profile to a Charging Station, using the message SetChargingProfileRequest, • at the start of a transaction to set the charging profile for the transaction; • in a RequestStartTransaction request sent to a Charging Station; • during a transaction to change the active profile for the transaction; • outside the context of a transaction as a separate message.
Nevertheless, in spite of the sentence "Smart Charging is even 'smarter' when the EV driver's wishes to be part of the solution", the OCPP 2.0 still does not consider the driver requests in the ChargingProfile setting [32]. OCPP 2.0.1, released in 8 April 2020 [33], replaces OCPP 2.0 and features several bug fixes and improvements based on experiences in the field. Some of these improvements are on message level. Improvements have been made in the area of security, ISO 15118, Smart Charging and the extensibility of OCPP.

•
Smart charging: following the smart charging features, the EV provides charging needs (departure time and requested energy), the CSMS can provide up to 3 schedules with different tariffs and the EV chooses a schedule. The Charging profile can be changed during transaction (called "renegotiation").

•
Reservation: OCPP allows you to make a reservation of a specific EVSE or a specific connector type. The reservation is made until a certain time. The user can make a reservation on the resources that are available at the moment of the reservation. The user cannot make a reservation in the future (advanced reservation), for example for the next hour for the successive two hours. • Tariff and Cost: OCPP allows to show the tariff to the user before the transaction, during and at the end of the transaction In the last version of OCPP 2.0.1, released in 8 April 2020, the CSMS can provide up to 3 schedules with different tariffs, it can show tariffs and can accept short time reservation. The advanced reservation is not allowed, probably due to the complexity of the management of the advanced reservation scheduling and to the priority given to the user actually present at the charging station with respect to a remote reservation.

System Architecture
OCPP protocol use WebSocket as a communication protocol between the individual charging stations and the central system. The data passing over WebSocket can be formatted in different formats Energies 2020, 13, 3263 6 of 21 including the Simple Object Access Protocol (SOAP) or the JSON (JavaScript Object Notation). We used the JSON implementation, which is a format widely used in various fields, and lends itself to interface with Web Applications written in Java language and applications on the Android platform.
The system developed, shown in Figure 1, consists of the Charging Station Management System, the Database storing the data, the Charging Station, the Electric Vehicle (EV), and the EV driver through an app on the smartphone. Electric Vehicle. The EV creates a communication with the charging station through powerline using the ISO/IEC 15118 standard. They exchange information on the capacity of the battery,maximum power allowed, etc.
EV driver. The driver defines the parameters of the recharge and performs the recharge reservation with the CSMS through an interface on the charge spot, the use of the smartphone or with a wide range wireless protocol (e.g. 4G/5G connection) already existing in the EV (like the Tesla models). Furthermore, the driver can define the parameters of the recharge directly with the EVSE, and monitor the actual recharge.
Charging Station. It enables interoperability with all types of electrical vehicles, provides to the user information on the cost, maximum available power directly when the driver is performing a recharge without reservation or through the central system during the reservation, exchanges information with the database through the central system.
DataBase. The database stores the data of all the Charging Stations available in the region, of the users authorized to use the charging stations, of all the reservations, and billing information. The database has been structured on four tables: Charging Stations, EVSE, Connectors, Reservations, and Users. The data base could be provided by the Mobility Service Provider (MSP).
Charging Station Management System (CSMS). It coordinates all the operations. It consists of a Java Web Application that handles the requests from both the Charging Station and the EV driver application and excanges data with the database. Some of the features of the CSMS are specified in the OCPP 1.5 standard, while the reservation functionalities, not included in the standard, have been added as possible extensions. The user service of the central station is responsible for providing and receiving information from the user app. In particular, the application sends HTTP POST requests to the webserver containing the data sent in JSON format (JavaScript Object Notation).
The new functionalities, in addition to the OCPP, implemented by the proposed system are: • user login; • creating a reservation for a certain time; • cancellation of bookings made by the user.
The operations are performed in advance with respect to the charging operation in order to perform an advance reservation of a connector of the Charging Station. The core of the proposed system is to provide to the user a set of possible solutions on the basis of the flexibility of the user, and not only if it is possible to make the reservation of the specific request and the cost of the recharge. Electric Vehicle. The EV creates a communication with the charging station through powerline using the ISO/IEC 15118 standard. They exchange information on the capacity of the battery, maximum power allowed, etc.
EV driver. The driver defines the parameters of the recharge and performs the recharge reservation with the CSMS through an interface on the charge spot, the use of the smartphone or with a wide range wireless protocol (e.g., 4G/5G connection) already existing in the EV (like the Tesla models). Furthermore, the driver can define the parameters of the recharge directly with the EVSE, and monitor the actual recharge.
Charging Station. It enables interoperability with all types of electrical vehicles, provides to the user information on the cost, maximum available power directly when the driver is performing a recharge without reservation or through the central system during the reservation, exchanges information with the database through the central system.
DataBase. The database stores the data of all the Charging Stations available in the region, of the users authorized to use the charging stations, of all the reservations, and billing information. The database has been structured on four tables: Charging Stations, EVSE, Connectors, Reservations, and Users. The data base could be provided by the Mobility Service Provider (MSP).
Charging Station Management System (CSMS). It coordinates all the operations. It consists of a Java Web Application that handles the requests from both the Charging Station and the EV driver application and excanges data with the database. Some of the features of the CSMS are specified in the OCPP 1.5 standard, while the reservation functionalities, not included in the standard, have been added as possible extensions. The user service of the central station is responsible for providing and receiving information from the user app. In particular, the application sends HTTP POST requests to the webserver containing the data sent in JSON format (JavaScript Object Notation).
The new functionalities, in addition to the OCPP, implemented by the proposed system are: • user login; • creating a reservation for a certain time; • cancellation of bookings made by the user.
The operations are performed in advance with respect to the charging operation in order to perform an advance reservation of a connector of the Charging Station. The core of the proposed system is to provide to the user a set of possible solutions on the basis of the flexibility of the user, and not only if it is possible to make the reservation of the specific request and the cost of the recharge. The typical sequence of messages with a specified format exchanged by the agents during a reservation is reported in Figure 2. The typical sequence of messages with a specified format exchanged by the agents during a reservation is reported in Figure 2.
The EV driver starts the operation sending the UserLoginRequest message to the CSMS. The CSMS sends a query to the DataBase (not highlighted in Figure 2) and replies to the EV driver with the UserLoginResponse. In case of positive response, the EV driver sends the FindBestSolutionsRequest asking information on a possible advance reservation on the basis of his/her requirements. The CSMS replies, consulting the information on the DataBase, with some possible charging solutions using the FindBestSolutionsResponse message. Then the EV driver, if satisfied by the proposal, sends the AdvanceReserveRequest to perform the reservation. The CSMS exchanges information with the Charging Station using the ReserveRequest and ReserveResponse messages. Then, the CSMS replies with the AdvanceReserveResponse to the EV driver concluding with a positive or negative response to the reservation request.
The OCPP 1.5, 1.6, and 2.0 do not define an advance reservation. Reservation is possible in OCPP using the ReserveNow operation. This operation reserves the charging connector from the instant of reservation until a certain expiring time. A reservation is released when the reservation is used on the reserved connector (when specified) or on any connector (when unspecified) or when the expiring time is reached or when the reservation is explicitly cancelled.
The introduction of the advance reservation should modify the OCPP protocol only in the fact that the CSMS should not send a positive response to a ReserveNow operation or a RequestStartTransaction operation in case the charging request could be in conflict with an existing advance reservation of the connector. Another solution could be that the Charging Station has different connectors for advance reservations.
The key messages FindBestSolutionsRequest and FindBestSolutionsResponse will be detailed in the next subsections. Then, the cost and satisfaction functions will be defined. Finally, the charge reservation flow and the developed app will be described.

FindBestSolutionsRequest
It is a message from EV driver to CSMS, in which the user specifies his/her requirements and flexibility. The message contains the booking request with all the recharge parameters set by the user: The EV driver starts the operation sending the UserLoginRequest message to the CSMS. The CSMS sends a query to the DataBase (not highlighted in Figure 2) and replies to the EV driver with the UserLoginResponse. In case of positive response, the EV driver sends the FindBestSolutionsRequest asking information on a possible advance reservation on the basis of his/her requirements. The CSMS replies, consulting the information on the DataBase, with some possible charging solutions using the FindBestSolutionsResponse message. Then the EV driver, if satisfied by the proposal, sends the AdvanceReserveRequest to perform the reservation. The CSMS exchanges information with the Charging Station using the ReserveRequest and ReserveResponse messages. Then, the CSMS replies with the AdvanceReserveResponse to the EV driver concluding with a positive or negative response to the reservation request.
The OCPP 1.5, 1.6, and 2.0 do not define an advance reservation. Reservation is possible in OCPP using the ReserveNow operation. This operation reserves the charging connector from the instant of reservation until a certain expiring time. A reservation is released when the reservation is used on the reserved connector (when specified) or on any connector (when unspecified) or when the expiring time is reached or when the reservation is explicitly cancelled.
The introduction of the advance reservation should modify the OCPP protocol only in the fact that the CSMS should not send a positive response to a ReserveNow operation or a RequestStartTransaction operation in case the charging request could be in conflict with an existing advance reservation of the connector. Another solution could be that the Charging Station has different connectors for advance reservations.
The key messages FindBestSolutionsRequest and FindBestSolutionsResponse will be detailed in the next subsections. Then, the cost and satisfaction functions will be defined. Finally, the charge reservation flow and the developed app will be described.

FindBestSolutionsRequest
It is a message from EV driver to CSMS, in which the user specifies his/her requirements and flexibility. The message contains the booking request with all the recharge parameters set by the user: The introduction of the entity EV driver in the communication between CSMS and CS is an extension to the OCPP standard. The extension is necessary to add the flexibility on the user side and a corresponding multiple choice provided by the system. The advantage should be the optimization of the resource management obtained through the demand-supply law used in economic theory.

FindBestSolutionsResponse
It is a message from CSMS to the EV driver, in which the central station gives to the user more than one possible solution. Depending on the availability interval, all free slots on the stations specified within that interval are extracted.
The recharge is possible if, in the desired time, there are time slots available for the duration required for recharge. With the flexibility of the user, the constraints are not stringent since the user for example can accept not a full recharge, or the user can be flexible with a slow recharge that requires more time to recharge but less power and therefore reduced cost. On the basis of the user request and on the slot availability, the algorithm evaluates the best solutions to be shown to the user.
The slots required to recharge are calculated according to the following parameters contained in the request: battery capacity, initial charge, and desired final charge.

Cost Evaluation
To manage the price calculation proposed to the user, a function has been used that takes into account several factors, including the use of the charging network in terms of simultaneous bookings. The idea behind a variable cost is that, like for airlines companies, the service provider would like to be fully booked and increase the prize to the user when they can pay more or when the cost of the energy increases. The different service providers could use different cost functions. As an example, the cost function we have chosen is the following: It depends on four terms. Each term is weighed by an appropriate β coefficient: − β 0 : (€/kWh) fixed cost of the recharge; − β PR : (€/kWh·kWh) coefficient multiplied by the chosen power P, it expresses a linear dependence with the power required. The maximum power available for each EVSE is limited and it may depend on time. It is acceptable to think that the price increases when the user requests high recharge power; − β S : (€/kWh) coefficient multiplied by a function that increases decreasing the number of free slots; Energies 2020, 13, 3263 9 of 21 − β P : (€/kWh) coefficient multiplied by a function that increases decreasing the power available in the EVSE in the time slot in which the user charges. P available depends on the time slot required, it may depend on the overload of the power grid or the time and weather dependency of the renewable energies. P used represents the power that users are simultaneously using; − σ S, σ P : are parameters that change the speed of increment of the function f.
The cost function defines the cost that the service provider proposes to the user. The relationship we used in Equation (1) takes into account the marginal cost of the resources: slot available and power available. When few resources are available, the cost increases.

Customer Satisfaction
Customer satisfaction means the satisfaction of a customer deriving from the use of a good or a service. In our case, the satisfaction is a way to order the different possible solutions the Central Station can offer to the user on the basis of the explicitly expressed flexibilities. The customer satisfaction function is maximum when the solution proposed matches the user requests: exact desired time of start, minimum cost, minimum recharge duration, maximum recharge. The function should weigh the relevance that the user gives to the different aspects in case the request cannot perfectly be respected. The first solutions (five in our test example) will be sent to the user and the user will select one of them in case they confirm the reservation.
As an example, we used the following relationship for the customer satisfaction It depends on four terms equally weighed, depending on time start of the recharge, duration, final charge, and cost. The parameters of the function have the following meaning: The satisfaction function should be defined on the basis of an interview of a large amount of user. The function we have chosen takes into account the fact that the satisfaction decreases when the proposed solution is far from the desired solution. The flexibility parameters can be used to weigh the relevance of the different specifications for the user.
The function f that has been chosen both for the cost in Equation (1) and for the customer satisfaction in Equation (2) is the following where x is the independent variable (slot and power in Equation (1) and time, duration, charge, and cost in Equation (2)) and σ is a parameter that changes the slope of the function. Different functions can be used to define the cost functions and satisfaction function. Usually a linear combination of the variables is used, as for example in the optimization of energy resources [34], or more complex exponential function are used in general resource optimization applications [35]. We used in Equations (1) and (2) a linear combination of nonlinear functions f (x, σ) expressed by Equation (3). The advantage of the chosen monotonic function is that it becomes independent on x when σ = 5, or a rapidly decreasing function if σ = 0. Figure 3 reports the function for different values of σ = 0, 1, 2, 3, 4, 5. When x = 0 the desired choice is respected. σ = 0 means minimum flexibility, that is the consumer satisfaction decreases rapidly when the solution differs from his/her desired choice. σ = 5 means maximum flexibility, that is the consumer is satisfied even if the solution differs from his/her desired choice.

Charge Reservation Process and APP
The flow chart of the charge reservation decision process is reported in Figure 4. The EV driver makes a reservation to the CSMS. The CSMS sends a query to the Database and, if not fully booked, it replies to the EV with some possible charging solutions. Then the EV driver confirms or deletes the reservation. Consequently, the CSMS sends an update request on resources and reservation to the Database and consequently confirms reservation or cancellation to the EV driver.
The flow chart of the algorithm for finding the best solutions implemented on the CSMS server is reported in Figure 5. Once the booking request is received, the CSMS reads all the parameters set by the user. Then, all the free available slots on the specified station are extracted.
The number of time slots necessary to recharge are calculated according to the parameters contained in the reservation request: battery capacity, initial charge, and desired final charge. This operation is carried out for each group of consecutive free slots (SlotGroup) and for all possible charging powers.
If the number of slots needed is less than or equal to the number of slots contained in the SlotGroup and the used is less or equal to available , then the Slotgroup is divided in all possible subgroups, with a length equal to the number of slots required. For each one, the final charge, the price, and the satisfaction are calculated. The first five solutions are returned to the user.

Charge Reservation Process and APP
The flow chart of the charge reservation decision process is reported in Figure 4. The EV driver makes a reservation to the CSMS. The CSMS sends a query to the Database and, if not fully booked, it replies to the EV with some possible charging solutions. Then the EV driver confirms or deletes the reservation. Consequently, the CSMS sends an update request on resources and reservation to the Database and consequently confirms reservation or cancellation to the EV driver.

Charge Reservation Process and APP
The flow chart of the charge reservation decision process is reported in Figure 4. The EV driver makes a reservation to the CSMS. The CSMS sends a query to the Database and, if not fully booked, it replies to the EV with some possible charging solutions. Then the EV driver confirms or deletes the reservation. Consequently, the CSMS sends an update request on resources and reservation to the Database and consequently confirms reservation or cancellation to the EV driver.
The flow chart of the algorithm for finding the best solutions implemented on the CSMS server is reported in Figure 5. Once the booking request is received, the CSMS reads all the parameters set by the user. Then, all the free available slots on the specified station are extracted.
The number of time slots necessary to recharge are calculated according to the parameters contained in the reservation request: battery capacity, initial charge, and desired final charge. This operation is carried out for each group of consecutive free slots (SlotGroup) and for all possible charging powers.
If the number of slots needed is less than or equal to the number of slots contained in the SlotGroup and the used is less or equal to available , then the Slotgroup is divided in all possible subgroups, with a length equal to the number of slots required. For each one, the final charge, the price, and the satisfaction are calculated. The first five solutions are returned to the user.  The flow chart of the algorithm for finding the best solutions implemented on the CSMS server is reported in Figure 5. Once the booking request is received, the CSMS reads all the parameters set by the user. Then, all the free available slots on the specified station are extracted. A smartphone app has been developed as an interface between CSMS and EV driver. Figure 6 reports some of the screenshots of the user app during the reservation. The application receives the information in real time from the CSMS on the status of the availability of the charging station.
On the left side of Figure 6 we see the user preferences and its flexibility. Then the CSMS replies with different possible solutions, with the cost that increases for example for a fast recharge or when the slots are almost fully booked. When the user selects the preferred solution, a summary is reported. Once the user confirms the reservation, the CSMS sends back a confirmation. The number of time slots necessary to recharge are calculated according to the parameters contained in the reservation request: battery capacity, initial charge, and desired final charge. This operation is carried out for each group of consecutive free slots (SlotGroup) and for all possible charging powers.
If the number of slots needed is less than or equal to the number of slots contained in the SlotGroup and the P used is less or equal to P available , then the Slotgroup is divided in all possible subgroups, with a length equal to the number of slots required. For each one, the final charge, the price, and the satisfaction are calculated. The first five solutions are returned to the user.
A smartphone app has been developed as an interface between CSMS and EV driver. Figure 6 reports some of the screenshots of the user app during the reservation. The application receives the information in real time from the CSMS on the status of the availability of the charging station.
On the left side of Figure 6 we see the user preferences and its flexibility. Then the CSMS replies with different possible solutions, with the cost that increases for example for a fast recharge or when the slots are almost fully booked. When the user selects the preferred solution, a summary is reported. Once the user confirms the reservation, the CSMS sends back a confirmation.
reports some of the screenshots of the user app during the reservation. The application receives the 426 information in real time from the CSMS on the status of the availability of the charging station.

427
On the left side of Figure 6 we see the user preferences and its flexibility. Then the CSMS replies 428 with different possible solutions, with the cost that increases for example for a fast recharge or when 429 the slots are almost fully booked. When the user selects the preferred solution, a summary is reported.

430
Once the user confirms the reservation, the CSMS sends back a confirmation.

Simulation Scenario
A simulation environment based on a Java application has been developed to verify the effect of different types of flexible reservation algorithms on the performances of the charging system.
The database stores the data of all the public Charging Stations available in the Marche region in Italy, but only one charging station is considered in the simulation. It provides both AC and DC connectors. The authorized users, stored in the database, can make a reservation. A sequence of reservation requests by different users, with uniform random distribution over the day, has been applied to the central system.
The following constraints on the parameters of the system have been defined: During each simulation the user requests have been randomly generated with a random desired initial time of recharge, with uniform random distribution. Each user would like to have a full recharge in the shortest time (1 time slot with 43 kW) at the requested initial time with the lower price, all combined with a "satisfaction function" reported in Equation (2). The user requirements are combined by the flexibility coefficients. The time horizon of the simulation is one day from 8 am to 6 pm, corresponding to 20 time slots for each one of the 4 connectors. The simulation is carried out until all the connectors are reserved or after 80 user requests. A fast recharge requires 1 time slot, therefore a maximum of 80 users can be served per day. If the user requests are not satisfied by the constraint of the charging station, the user is lost. For each test case, 50 simulations have been carried out, corresponding to a simulation scenario of 50 days. The average value and standard deviation over the 50 simulations of the following performance parameters have been evaluated.  (1). This is the reference situation. The user does not make any choice and does not express any flexibility to the system; therefore, we consider that its satisfaction is always 100%. If the time slots are not free in the requested connector, the user is lost.

•
No flex: all the flexibility coefficients are posed to the minimum value (0). The system provides 5 possible solutions, but the user accepts only small changes with respect to his/her desired specifications. The main difference with the "no choice" condition is that the user tries to minimize the cost, which has an important role in the satisfaction function. • Var power: the power available changes during time (simulating the variability of the power availability on the grid): 8:00-11:00 and 16:00-18:00 the power available is 120 kW, 11:00-16:00 the power available is 172 kW. As in the "flex price" simulation, all the strictness coefficients are posed to the maximum values (0), the customer shows flexibility only on the cost (σ C = 5). This test emulates the presence of a photovoltaic power source that provides energy only in the middle of the day.

Simulation Results
The results of the test conditions have been studied and then compared in Figures 7-13. Figure 7 reports the satisfaction of the customer that accepts the reservation, on average over the 50 simulations, as a function of the slot occupancy of the Charging Station for the different test cases. For the "no choice" test, the customer satisfaction cannot be properly defined, it has been fixed to 100% since the solution proposed to the user is the only one they desire, if it is possible, and the user accepts the price fixed by the Charging Station. In general, the consumer satisfaction decreases increasing the slot occupancy, being more probable that the user request cannot be satisfied without modifications. In the case of maximum cost flexibility, the satisfaction is always high since the user does not care for the cost. In the "no flex" case user the flexibility on their specifications is low. The average satisfaction is the lowest with respect to the other tests. The user accepts the solution when the satisfaction is above the threshold. In the "flex time" case, the satisfaction is not high but independent on the slot occupancy since the user accepts a delayed recharge. The satisfaction decreases only when the cost increases due to the lack of slots. Figure 8 reports the average power available as a function of the slot occupancy. The power available reduces when the slot occupancy increases. In the tests "no choice" and "flex price", the power available is lower with respect to the other tests. In fact, in those cases, the cost of the recharge is not relevant and therefore the customer accepts fast and more expensive recharge with 43 kW. Figure 9 reports the normalized average cost as a function of the slot occupancy. The cost increases increasing the slot occupancy, being the user forced to accept higher cost for the recharge. In the cases of maximum cost flexibility ("no choice" and "flex price"), the cost is always higher with respect to the other cases. The average income of the Charging Station increases, being the customer more interested on other aspects and not on the price. independent on the slot occupancy since the user accepts a delayed recharge. The satisfaction decreases only when the cost increases due to the lack of slots. Figure 8 reports the average power available as a function of the slot occupancy. The power available reduces when the slot occupancy increases. In the tests "no choice" and "flex price", the power available is lower with respect to the other tests. In fact, in those cases, the cost of the recharge is not relevant and therefore the customer accepts fast and more expensive recharge with 43 kW. Figure 9 reports the normalized average cost as a function of the slot occupancy. The cost increases increasing the slot occupancy, being the user forced to accept higher cost for the recharge. In the cases of maximum cost flexibility ("no choice" and "flex price"), the cost is always higher with respect to the other cases. The average income of the Charging Station increases, being the customer more interested on other aspects and not on the price.

•
No choice: The customer satisfaction is maximum since the customer is not interested in the price and the Charging Station gives a solution only if it perfectly fits the requirements. The customer is lost (average value is 27%) if no slots are available for the required time. The average price is high and the recharge is always a full charge with the fastest recharge speed, since the consumer is not interested in the price. Due to the random request of the time of recharge, sometime not all the slots are used: 85% slots are used and 85% power available is used. In spite of the high recharge price, the total revenue is not maximum, due to the unused slots.

•
No flex: the customer satisfaction is the lowest, since his/her flexibility is low. The power used is low in spite of the fact that the slot usage is high (92%). In fact, to reduce the cost the user prefers to use slow charging (11 kW or 22 kW), with a consequent high recharge duration. The average recharge price is low and, as a consequence, the total revenue for the Charging Station is low. The number of lost customers is high (31%). • Flex cost: the customer is completely flexible only on the price. The satisfaction is high (94%). All the power available and the slots are used, meaning that all the customers obtain a fast full charge. No customer is lost since they accept an average delay of 27 min on the desired initial charge time. The average cost is high and total revenue is maximum due to the full utilization of the Charging Station. • Flex time: the customer accepts to recharge at any time in order to have a low cost recharge, that is reached with a slow (always 120 min to recharge) and low power recharge (11 kW). The slots are fully used and the minimum cost per kWh is obtained. All the customers succeeded in finding a recharge slot, since they accept a delay on the initial time of recharge. Therefore, the average delay with respect to the desired recharge time is high, on average more than 100 min, as shown in Figure 13.
The objective of the simulation environment developed is twofold: verify the effect of the flexibility of the charging station and of the user on performances of the recharging system. The case "no choice" corresponds to a non-flexible charging station and a user who accepts all the conditions imposed by the market. The case "no flex" corresponds to a flexible charging station and a user with strong specifications and a high inclination to save money. The case "flex price" and "flex time" correspond to a flexible charging station and a user with flexibility on the price or when recharged. Figure 10a shows the customer satisfaction in the different scenarios. In the no choice case, the satisfaction cannot be properly defined, therefore the value of 100% is used. When the charging station is almost full, the cost increases and a high value of the average satisfaction is obtained only in the case of a user profile not too much interested on the cost.
The results reported in Figure 10b show that users are not lost when both user and system are flexible ("flex price" and "flex time"). The no choice scenario is equivalent to the actual case of no reservation: if all the connectors are occupied the user goes away. This situation is critical when the number of connectors is low, 4, with respect to the possible users, like in the example of this simulation.
The optimization of the power and slots available is possible when the system is flexible and the user is more interested in the fast charge with respect to the cost ("flex cost") as shown in Figure 11. The 100% use of the available power (scenario flex cost) in Figure 11a corresponds to the fact that all the users make fast recharge and all the slots are reserved, as shown in Figure 11b.
In all the test scenarios the desired full charge is reached, as shown in Figure 12a. The revenue of the charging station in Figure 12 increases if the flexibility of the system is introduced. Figure 13a shows that a fast recharge is used when the system is not flexible ("no choice") or the user is less interested in the cost ("flex cost"). In the "no flex" and "no choice" scenario the start recharge time is the desired time as shown in Figure 13b. This result confirms the fact that many users are lost if the desired time slot is not available, as shown in Figure 10b.    Figures 14 and 15 report the results of the "var power" compared to the "flex cost" and "no choice" tests. The customer profile of "var power" and "flex cost" is identical.
In the "var power" case limits are posed on the number of users requests not only due to the limited number of connectors but to the limited power also. In the time period in which the maximum power is 120 kW, the limit on the type of recharge is 43 kW + 43 kW + 22 kW + 11 kW.
The variability of the power available does not allow to reach the same results of the "flex cost" test, but similar. The users are "flexible" and they adapt lightly to the initial time of recharge in order to use the available slots, but the additional limit of power forces using a slower recharge when the connectors are still available. For this reason, the maximum of 80 users per day is not reachable and some users are lost in the "var power" case as shown in Figure 14. The users are lost only when the charging slot occupancy is high. The number of lost users is much higher in the "no choice" case, as commented in Figure 10b. Figure 15 reports the average value of the recharge power as a function of charging slot occupancy. In the "no choice" case the user is forced to a fast charge, in the "flex cost" case the user prefers a fast charge since they have no problems on the cost, in the "var power" case the user prefers a fast charge but is forced to a slower 22 kW or 11 kW charge, when in the desired recharge time the power limit is reached.
The results reported up to now show how the introduction of flexibility could improve de efficiency of the charging station. The simulation environment developed can been used to optimize the number of connectors of the charging station in scenario with a flexible reservation system or without reservation.    Figures 14 and 15 report the results of the "var power" compared to the "flex cost" and "no choice" tests. The customer profile of "var power" and "flex cost" is identical.
In the "var power" case limits are posed on the number of users requests not only due to the limited number of connectors but to the limited power also. In the time period in which the maximum power is 120 kW, the limit on the type of recharge is 43 kW + 43 kW + 22 kW + 11 kW.    Figures 14 and 15 report the results of the "var power" compared to the "flex cost" and "no choice" tests. The customer profile of "var power" and "flex cost" is identical.
In the "var power" case limits are posed on the number of users requests not only due to the limited number of connectors but to the limited power also. In the time period in which the maximum power is 120 kW, the limit on the type of recharge is 43 kW + 43 kW + 22 kW + 11 kW. As an example, Figure 16 compares the results in terms of lost users and average slot occupancy for the "no choice" and "flex price" scenario as a function of the number of connectors installed in the charging station.
In the "flex price" scenario the user accepts a high-cost fast-charge using only one time slot and accepts a change in time of charge using the free time slots. In this case, the connector occupancy is always 100% and decreases if more than four connectors are used since in the simulations the number of users has been fixed.
In the "no choice" scenario the user is lost if its request does not perfectly fit the charging station availability. Therefore, the number of lost users is high even when increasing the number of connectors and the average occupancy of the connector is always lower than the "flex price" scenario.
the number of connectors of the charging station in scenario with a flexible reservation system or without reservation.
As an example, Figure 16 compares the results in terms of lost users and average slot occupancy for the "no choice" and "flex price" scenario as a function of the number of connectors installed in the charging station.
In the "flex price" scenario the user accepts a high-cost fast-charge using only one time slot and accepts a change in time of charge using the free time slots. In this case, the connector occupancy is always 100% and decreases if more than four connectors are used since in the simulations the number of users has been fixed.
In the "no choice" scenario the user is lost if its request does not perfectly fit the charging station availability. Therefore, the number of lost users is high even when increasing the number of connectors and the average occupancy of the connector is always lower than the "flex price" scenario.

Discussion and Conclusions
The diffusion of EV requires the creation of a pervasive recharging station network, the definition of standards, and the definition of strategies to integrate the EV recharge requests with the power grid specifications. To this aim, we propose an extension of the OCPP protocol to the reservation phase.
The user negotiates with the central station a recharge reservation giving his/her preference and flexibility. The central station provides different solutions on the basis of the user flexibility. This negotiation allows the optimization of the power grid management and user requests and constraint.
An app on an android smartphone has been developed to allow the user to interact with the reservation system.

Discussion and Conclusions
The diffusion of EV requires the creation of a pervasive recharging station network, the definition of standards, and the definition of strategies to integrate the EV recharge requests with the power grid specifications. To this aim, we propose an extension of the OCPP protocol to the reservation phase.
The user negotiates with the central station a recharge reservation giving his/her preference and flexibility. The central station provides different solutions on the basis of the user flexibility. This negotiation allows the optimization of the power grid management and user requests and constraint.
An app on an android smartphone has been developed to allow the user to interact with the reservation system. Furthermore, a simulation framework has been developed, to verify the different behaviors of the system with different values of the parameters of the system. The system has been tested in different test conditions, simulating the reservations of many users in the same charging station: different capacity, power, initial and final charge, reservation time and flexibility on time, duration, price, and final charge.
The simulation framework allows verifying the effect of the flexibility of the charging station on the performances of the recharging system. Furthermore, the effect of different behaviors and inclinations of the user on the recharging system can be verified.
In conclusion, the efficiency of the recharge system is obtained by building a flexible reservation system available to the user needs, and when the user themselves does not have strong constraints, especially on the cost. To the first aim we proposed the modification of the OCPP standard, to the second aim we think that a diffusion of the culture of green economy and energy saving is necessary. The availability of flexible recharge system could help in the diffusion of the culture of green economy.