2.1. Solution Architecture
The OCPI 2.2 specifications describe a communication architecture in which Smart Charging features and responsibilities can be delegated to a specific actor called the SCSP. In those specifications, the representation in
Figure 1 is proposed.
It is this architecture that we chose when implementing our EV Smart Charging solution.
Figure 2, below, gives some more details about that architecture, naming the various information systems that exchange data through OCPI and listing the endpoints involved in these communications.
The CPO information system is called the “ChargePoint Management System” or CMS, or often OCPP back-end. The eMSP information system is called the “User Management System” or UMS. The SCSP information system is called the “Energy Management System” or EMS.
The charging stations communicate with the CPO back-end using OCPP. In a typical session, when an EV arrives, the charging station checks that its user is allowed to charge (Authorize message), and then informs the CPO back-end that the session has started (StartTransaction message), regularly communicates about the energy consumption (MeterValues message) and finally notifies when the user has disconnected his vehicle (StopTransaction message). These data exchanges are shown in
Figure 3.
If the CPO back-end offers an OCPI interface, these sessions’ updates can be relayed to an eMSP information system. It is through such a link that an eMSP can allow its customers to access the CPO’s charging stations and handle billing and payment for EV charging sessions. The eMSP can also offer other services, such as a user interface allowing its customer to follow up their charging sessions in real time, for instance.
Figure 2 shows that the “sessions” endpoint is used, among other things. The CPO back-end sends a request to that endpoint each time it receives either a StartTransaction, a MeterValues or a StopTransaction OCPP message from a charging station. This mechanism, illustrated in
Figure 4, allows the eMSP to learn about its customers’ session statuses in real time.
The OCPI link between the CPO back-end and the EMS of the SCSP uses the same session updates principle that the eMSP uses. This means that the CPO back-end-relays the updates to both the eMSP and the SCSP. These session updates are key for the operations of the SCSP. They allow the EMS to (1) identify the user and then the type of vehicle being charged, and thus the vehicle battery capacity, and (2) know which amount of energy has already been transferred at what time during the session, allowing the processing of the actual average charging power between two session updates.
The EMS itself will use that OCPI link to send the optimized charging profiles it has calculated to the CPO back-end. The “chargingprofiles” endpoint implemented by the CPO back-end will then be used. These communications are illustrated in
Figure 5.
After a call to its “chargingprofiles” OCPI endpoint, the CPO back-end acknowledges reception before transmitting the set points to the charging stations via SetChargingProfile OCPP messages. Then, the CPO back-end calls back the EMS to confirm that the profiles have been sent and accepted by the charging sessions.
The following paragraphs give details on how the EMS is architectured, as well as which data it manipulates.
2.2. EMS Architecture
The EMS is the information system of the SCSP. Its objective is to provide individual charging profiles for the charging sessions currently being executed by groups of charging stations in order to control the global power each group draws.
The grouping logic of charging stations can be of various forms depending on the optimization objectives: one might want to make sure that the charging stations at a given site keep their global power demand below the grid power available, or one might want to control the power of a whole territory, encompassing several charging sites. In our case, as our intent was to maximize the self-production ratio of the electricity produced by a local photovoltaic plant, we grouped together sessions executed at the same location.
Figure 6 reveals a representation of the internal architecture of the EMS.
Our EMS is made of several software components that we propose to detail hereafter to explain their utility. As a general rule, the idea is to hold the information that is needed by the optimization program, which is used to build the charging profiles.
2.2.1. OCPI Interface
First of all, as it is the main subject of this paper, it is important to mention that our EMS has an OCPI interface that it uses to communicate with the CPO back-end. It is through that interface that the EMS receives details about the infrastructure descriptions and the on-going charging sessions. That interface is (1) a set of web services which give access to the EMS database when the EMS acts as a server, and (2) a client program when it is necessary to call the CPO OCPI interface.
2.2.2. EMS Database/Infrastructure Description
Having a charging infrastructure description is a key feature for the EMS. The choice to power a given vehicle has an impact on the power flow of all upstream electrical nodes and protections. When powering several vehicles simultaneously, ensuring that these upstream nodes and protections are not overloaded is necessary and requires the availability of some models of the infrastructure electrical diagram.
For instance, let us consider the following partial diagram in
Figure 7, showing three charge points (ChargePoint1–3) powered through the same circuit breaker (Protection1).
When vehicles are to be charged through the connectors (Connector1-3), the ability to anticipate how much electrical current is drawn for each phase of circuit breaker Protection1 means that we know whether each charge point and connector is tri-phase or not, and also which phase of the network is wired to the first phase of the connector (i.e., one current will be drawn from if the vehicle is mono-phase).
The description held in the EMS database has to contain these phase details, as well as the fact that the charge points ChargePoint1-3 are powered through circuit breaker Protection1.
In
Figure 7, which is a screenshot of our EMS operator interface, we can see the technical attributes that are held for one of the connectors (Connector1) modeled in our energy system. Here, we see that the connector has its three phases wired and that its first phase corresponds to the first phase (R) of the grid. We also see that the maximum current it can let through is 32A per phase.
Through the “locations” of OCPI endpoint, the CPO back-end lets its partners (eMSPs and SCSPs) know about the technical details and status of the charging stations it manages. Unfortunately, the information we obtain is generally not sufficient to rebuild the electrical diagram and perform proper energy management. CPO back-ends often lack a detailed description of the electrical wiring of the charging infrastructure, the circuit breaker details and the phase rotation configuration. This means that the charging infrastructure description has to be carefully modeled and set at the EMS level, justifying the need for a specialized SCSP information system if the CPO back-end cannot hold that information.
The infrastructure description will then be set and updated by both the CPO back-end through the OCPI interface and also the EMS administrator through the EMS UI (User Interface). Our EMS UI makes it possible to edit CIM-style (Common Information Model) electrical diagrams like the one shown in
Figure 8.
This kind of description makes it possible for us to draw a list of all technical constraints that need to be respected by the optimized charging profiles that will be calculated.
2.2.3. EMS Database/Configuration Data
Each charging session references a “cdr_token” that was used to start the session. It is out of the scope of this paper to discuss the various types of tokens that can be used, and we will just consider that an RFID tag was used. That token can be used to identify which EV user, and then which type of vehicle, is being charged. In the “configuration data” part of our EMS database, we have the ability to host, among other details, the energy capacity of the vehicle associated with that token. That piece of information is either set by the EMS administrator through the UI based on what the eMSP was able to communicate, or estimated using the previous charging sessions that were performed for that EV user. If 20 kWh were transferred in a session for which the user had declared a 50% state of charge on arrival, the vehicle capacity can be roughly estimated to be 40 kWh. Obviously, that estimation will grow in accuracy with a growing number of sessions.
Which algorithm the optimization program should use for which group of charging stations, and other specific details, are also held in the “configuration data” part of the EMS database.
2.2.4. EMS Database/Session Details and User Preferences
In the EMS database, for each session, we hold the details needed for the optimization program to make decision on which EV vehicle to charge in what priority order, when and at what charging power.
These details require answers to the three following questions for each session:
- -
How much energy will we still have to transfer to the EV?
- -
By what time?
- -
What are the minimum and maximum power set points we can use?
All this information is not necessarily directly available. To know how much energy is still to be transferred, we need to know:
- -
The state of charge of the vehicle on arrival (obtained through the user interface);
- -
The capacity of the vehicle’s battery (either learned from history or configured by the EMS administrator as a characteristic associated with the user identifier);
- -
The amount of energy already transferred (directly accessible in the session OCPI update messages).
The UI interface used by the EV user is also the channel through which we will learn by what time the vehicle has to be charged.
By controlling the charge-point power limit, the SCSP can measure the maximum charging power which the charge point/vehicle couple can reach. That piece of information is key for the optimization program as it sets the boundaries of the charging profile it will be able to define. The maximum charging power value is also part of the data we host about each charging session.
2.2.5. EMS Database/Energy Source Forecasts
The optimization program objective is to distribute the energy, possibly available from many sources, in a smart manner. This implies that the amount of available energy for the time periods to come is known. These data might be obtained from the Distribution System Operator (DSO), the Transport System Operator (TSO), the electricity provider or from some other third-party data source. For the CEA-INES demonstrator, for which the objective is to maximize the self-production ratio of the infrastructure coupled with a photovoltaic plant, we can obtain photovoltaic production forecasts from a specialized company and automatically and regularly integrate them into the EMS database.
The prices at which this energy is available from the different sources are also a crucial indicator. They can be defined by contract and thus simply require a configuration by the EMS administrator, or can be much more dynamic and require that an automatic data flow is set up between the electricity providers and the SCSP.
The “Energy sources forecast” of the EMS database is then able to host time series representing the power that is supposed to be available for different time periods in the future and prices at which that energy is sold, as shown in
Figure 9, below.
2.2.6. EMS User Interface
The EMS user interface addresses two types of users: the electrical vehicle users and the EMS administrators. The EV users need some way to let the EMS know how much energy they need and for how long their vehicle will stay connected to the charging infrastructure.
For the e-charge4driver project, our EMS was used for two charging sites, (1) at CEA-INES and (2) in Barcelona. At CEA-INES, we are our own eMSP and we integrated the possibility for the users to communicate the state of charge of their vehicles and their expected departure time through our User Management System mobile website, which embeds a web widget served by our EMS UI; see
Figure 10.
For the Barcelona demonstrator, the eMSP SMOU application used by EV users was amended to include those two questions, as shown in
Figure 11. The requested amount of energy and the expected departure time were then communicated to the EMS by making use of an unused field (meter_id) of the OCPI session updates. This is a slight workaround for the fact that OCPI has not made provision for these details in its message structures.
Our EMS user interface is also designed to be used by EMS administrators. These users will edit the charging infrastructure electrical diagrams (see
Figure 12) and set other parameters used by the optimization program.
2.2.7. Optimization Program
The optimization program calculates charging profiles for each and every charging session to be executed. Detailing how this program works internally is not in the scope of this paper. As described before, it makes use of the various data modeled and hosted in the EMS database and simulates the power flow within the infrastructure for the hours to come, aiming to minimize a cost function designed to translate the optimization objectives into numerical indicators. The data flow diagram of this program is shown in
Figure 13.
It exploits the infrastructure description to identify constraints that need respecting. In
Figure 12, we have illustrated, in lavender, the fact that the power drawn by the 12 EV connectors must not overload the node named “IBST 63A”, and in red, the fact that connectors “esmart-ines-4-4”, “esmart-ines-5-5” and “esmart-ines-6-6” must not overload the node named “ZedBox1”. In the electrical diagram, the optimization program automatically identifies these constraints and makes sure that the charging profiles it generates respect them.
With forecasts for how much power will be available from the various energy sources and at what prices, and with estimations on the quantity or energy it has available to allocate to each charging session, by when and with what maximum power, the optimization program has the information it needs to build the set of charging profiles that best fits the optimization objectives.
Each time a new session starts or is stopped by an EV user, the global optimization problem changes and the optimized charging profiles need recalculating. This is when the optimization program is called by the EMS that detects those events.
When new charging profiles are ready, they are sent to the CPO back-end via OCPI for transmission to the charge points, as shown in
Figure 5.
2.2.8. Digital Twin
Altogether, by modeling the equipment deployed on the charging infrastructure, by updating their status in real-time and by being able to simulate their physical behavior, these software components constitute a digital twin of the charging infrastructures managed by the EMS.