In this work we porpose a cyber-physical systems-based approach for intelligent energy resource management in electric vehicle charging network.
A collaborative multi-agent system has been developed where electric vehicle (EV) charging stations coordinate on the power to be delivered to vehicles using epidemic protocols. This approach ensures that the power output does not exceed the availability of the electric grid, optimizing energy distribution and enhancing the overall efficiency of the charging network.
For the complete paper, please refer to the PDF file (PowerSyncSystem.pdf) attached to this page or click here.
Full code here on GitHub.
Italian explaination of the project at this link on YouTube.
The figure below shows Simulink and Stateflow diagram of the complete system.
Ciccotelli Gabriele, Iuliano Roberto
In a context where electric vehicle (EV) adoption is rapidly increasing, the need for efficient energy resource management has become crucial. This study proposes a solution to optimise power delivery at EV charging stations, based on the integration of leader election algorithms and distributed computing. The solution developed and presented in this work represents a concrete application of the fundamental concepts in the modelling and analysis of cyberphysical systems (CPS) to enhance the efficiency of charging infrastructures, with potential benefits for sustainability and intelligent grid management.
The growing adoption of electric vehicles (EVs) presents new challenges for energy resource management, particularly in handling power flows to charging stations.
It is essential to ensure that power is distributed efficiently and proportionally among the various stations to avoid overloads and maintain acceptable charging times for all
users.
To address this problem, several solutions have been explored that leverage the potential of cyber-physical systems—systems combining physical processes and computational elements to solve complex problems. In this context, an approach based on leader-election and distributed computing algorithms is proposed to optimise power distribution among charging stations.
The proposed method utilises a particular leaderelection algorithm known as the Bully algorithm. The purpose of this algorithm is to identify the station with the highest unique identifier (UID) and designate it as the leader. Subsequently, based on this election, numerical values are assigned to each charging point, which are then employed by the Push-Sum algorithm to calculate the power share to be delivered from the generator at any given time.
This document will provide a detailed analysis of the proposed solution’s implementation, aiming to ensure fair and dynamic energy management across EV charging networks.
Consider a scenario featuring a network of n charging points (CP) for electric vehicles, all powered by a common generator. Each CP can only connect to one EV at a time, allowing the EV to charge its battery by drawing power from the generator.
This system can be framed as a cyber-physical system (CPS), as well as a real-time system that must respond to external stimuli within specified time constraints.
Similarly, each charging point can be viewed as an individual CPS, characterised by a network module enabling it to communicate through message exchange with other charging points in the system. This communication method allows the CPs to coordinate and calculate the power quotas from the shared generator within a certain time limit. At any given moment, each CP’s power quota must match the ratio of the generator’s total output to the number of CPs currently connected to vehicles requesting power.
To implement this solution, two algorithms commonly referenced in distributed computing literature were selected:
The Push-Sum algorithm was selected to calculate the distributed power quotas. Specifically, this algorithm calculates the proportion of total available power each CP can receive based on its status and the total number of active CPs at that time. For this, the network must start from a state where only one active CP node has a numerical value of 1, while all others are at zero. The Push-Sum algorithm then averages these values, and this calculation is repeated each time there’s a state change in the network (e.g., a vehicle connecting or disconnecting, or a battery reaching full charge).
To establish this initial condition, the Bully algorithm was used to assign the leader node in the network a value of 1, leaving the other nodes at zero.
It is necessary to identify a system that efficiently manages the distribution of power among various charging points for electric vehicles, powered by a common generator. The system must satisfy the following constraints:
From the previous analysis, the following functional requirements are derived and described in natural language:
The proposed solution is centred on the following mechanisms:
From these points, it is clear that the Bully algorithm is employed to ensure that, following any of the conditions listed above, only one node in
This process continuously executes the Push-Sum algorithm, which is used to calculate the power quotas assigned to each
Thus, this algorithm enables the nodes in the network to reach consensus. Once consensus is achieved, each EV connected to a CP can draw power from the charging point, provided the CP is not in an error state. The mechanisms outlined here illustrate the goal of creating a system that avoids overloads and ensures a fair distribution of power to vehicles that request it.
Based on the scenario and approach described in previous sections, a system model was created. A model is a representation of the system, useful for evaluating its properties. It is a good abstraction of the system if it omits only non-essential details.
Considering that the identified system combines both continuous and discrete dynamics, it is classified as a hybrid (or modal) system. This classification highlights the coexistence of discrete and continuous characteristics: the system is defined by discrete states, called “modes,” and
primarily continuous variables, which determine the system’s evolution. The continuous aspect represents physical processes, such as battery charging and discharging by the EVs and power delivery by the CPs. However, events that characterise the system and cause state transitions, such as the connection or disconnection of vehicles, are discrete and can be described with a state machine.
Given this, modal machines were utilised to model this hybrid system. Consequently, it is apparent that the system under consideration is a hybrid event-triggered system.
The modelling process followed a well-established engineering principle: complex systems can be described as compositions of simpler subsystems. Therefore, the first phase of this process involved decomposing the domain into multiple subsystems and modelling them accordingly.
Simulink diagram of the battery model Coulomb Counting Method (charging phase).
Simulink diagram of the battery model Coulomb Counting Method (discharge phase).
Model of the charging point system. Above is the actor model. Below is the hierarchical finite-state machine and its mode refinements. Transitions that make the machine non-deterministic are shown in red. The self transition on the Normal state represents a historical transition (labelled H). In the state refinement of the Normal state, the transition from the Connected state to the Idle state is a preemptive transition.
Implementation of the charging point system model in Simulink & Stateflow.
Modal model of the electric vehicle system. The actor model of the system is shown above, while the hierarchical state machine and corresponding refinements of modes are depicted below. Transitions introducing non-determinism are highlighted in ed. The self-transition on the Plugged state represents a historical transition (labelled H). The transition from Unplugged to Plugged is a reset transition.
Implementation of the electric vehicle system model in Simulink & Stateflow.
Cascade composition of EV&CP.
Model of the synchronous cascade composition of the electric vehicle and charging point systems.
Implementation of the synchronous cascade composition in Simulink Stateflow.
Based on the requirements, and given that the specifications involve the values of continuous signals, the following specifications have been defined using the formalism of Signal Temporal Logic (STL):
After analysing and modelling the various characteristics of the system, its complete implementation was carried out using Simulink and Stateflow tools.
Simulink and Stateflow diagram of the complete system.
When designing a system model, such as a cyber-physical system, the primary objective is to enable detailed analysis. The model is not only created to represent the system but also to serve as a tool for performing
evaluations that would be impractical or risky to conduct directly on the real system.
To this end, various simulations were carried out to assess specific aspects of the system. These simulations allow the analysis of the model’s behaviour under different scenarios and conditions, verifying how the CPS reacts in critical or particularly complex situations. Through these simulations, it is possible to gain a deeper understanding of the system’s performance, safety, and reliability, confirming the validity of the model before its real-world application.
In particular, for the case considered, several graphical views of the system’s behaviour were produced and are presented in Figures 1R, 2R, 3R, and 4R.
Figure 1R illustrates how the charging points reach consensus concerning the power demands of the vehicles. Graphically, the consensus process is represented by the ”funnel effect,” where the functions progressively converge towards the same final value. It is noted that, in the considered context, consensus is achieved when all active charging points possess the same value, calculated using the Push-Sum algorithm. This value represents the power allocation from the global generator assigned to them. An analysis of the graph reveals that:
Below is an interpretation of the system’s behaviour during the simulation window from 0s to 5s (Figure 1R). This time window reveals that:
Figures 2R, 3R, and 4R show how the SoC of a vehicle connected to a given CP increases during time intervals where consensus is achieved, i.e., when the estimates from the Push-Sum module converge. From an analysis of Figure 4R, the following observations can be made:
Fig. 1R - Graph showing how the charging points reach consensus concerning the power demands of vehicles. The solid lines represent the average value estimates calculated by the Push-Sum modules. The dashed lines represent the power requests. Colours distinguish the different nodes (charging points) in the network.
Fig. 2R - Graph showing the SoC value of the vehicle connected to CP1 (dark-coloured function) in relation to the average value estimate calculated by the Push-Sum module of charging point 1 (light-coloured function).
Fig. 3R - Graph showing the SoC value of the vehicle connected to CP2 (dark-coloured function) in relation to the average value estimate calculated by the Push-Sum module of charging point 2 (light-coloured function).
FIG. 4R - Graph showing the SoC value of the vehicle connected to CP3 (dark-coloured function) in relation to the average value estimate calculated by the Push-Sum module of charging point 3 (light-coloured function).
The work discussed in this document allowed for the evaluation of the potential of concepts and knowledge acquired during the ”Analysis and Control of Cyber-Physical Systems” course. During the model implementation phase, the team had to devise solutions to overcome various challenges that arose while applying the theoretical concepts learned. Consequently, the team demonstrated the ability to seek necessary knowledge and apply it to overcome the obstacles encountered, adhering to the philosophy stated at the beginning of the course:
”You can’t teach people everything they need to know. The best you can do is position them where they can and what they need to know when they need to know it. (Seymour Papert)”.
Future developments of the proposed solution could address various aspects of the project, including:
In conclusion, it is emphasised that the ability to manage complex scenarios was acquired through the knowledge gained. Indeed, despite necessary simplifications, it was possible to structure a solution to a problem that the development team had never encountered before.
The entire project, including test files, has been made available on GitHub in a repository accessible here.