A soft real-time ROS2-based energy management system under asynchronous messaging and different node update rates
An energy management system (EMS) developed around a ROS2 (Robot Operating System) messaging backbone used to exchange relevant information for the underlying optimization in soft real-time, is proposed herein. Several case studies performed in a critical and objective manner allow us to calibrate, test and compare existing off-the-shelf numerical optimizers, in terms of advantages and disadvantages. A novel optimal EMS problem including penalty terms in the cost functions and linear plus nonlinear inequality and equality constraints is defined, to address optimization infeasibility under asynchronous messaging and various update rates in the communicating nodes. The case study discusses the importance of each hyperparameter in ensuring the feasibility and success of the optimization in real-time settings under a real-life driving scenario for an electric vehicle. The optimizers’ performance is compared with two popular and open-source libraries, SciPy and NLopt, with nodes being updated at various frequencies. A trust region-based with interior point barrier optimizer was found to recover feasibility at the expense of some acceptable constraint violation. While for all the other cases, the softplus penalty in the objective function serves as an early constraint violation prevention mechanism, when properly tuned. The ROS2 communication infrastructure was critically analyzed in terms of Quality of Services (QoS) along with several of the associated security risks. Safety aspects of the proposed EMS architecture are tested in an adversarial setting: the messaging system resilience to network congestion was tested by altering the network parameters, while the security was challenged by false data injection. The results are also cross-built and measured on a targeted edge device in order to check feasibility under low-cost low-power computing platforms. We show that the ROS2-based EMS can deliver in several critical aspects, as required to run on real systems with soft real-time, reliable performance.
Publication Details
- Journal
- Energy Conversion and Management X
- Published
- 2025-09-23
- DOI
- https://doi.org/10.1016/j.ecmx.2025.101272
- Primary Topic
- Global trade and economics
- Type
- article
- Field-Weighted Citation Impact
- 0.00