Automated Runtime Verification of EV-Charging Software Using Physics-Informed Oracles and Search-Based Threshold Synthesis
This paper presents an automated runtime verification approach for electric vehicle charging software that checks Open Charge Point Protocol (OCPP) telemetry against an independent physical oracle at the edge. Integrity faults or attacks can preserve statistical plausibility while violating the physical charging process, which limits software-side anomaly monitors that observe only reported data. The proposed approach treats the charging station as a cyber-physical software system and combines two executable runtime oracles: a protocol and statistical oracle over OCPP MeterValues and a physics-informed oracle derived from local hardware power measurements and constant-current/constant-voltage charging dynamics. Their scores are normalized and fused by a transparent decision rule. Two decision thresholds are synthesized automatically with particle swarm optimization under a shared false-alarm budget, turning calibration into a small search-based software engineering problem. A seeded simulation benchmark evaluates five telemetry mutation operators: scaling, bias, replay, stealthy value manipulation, and protocol-timing corruption. At a 5% target false-positive rate, the cross-layer monitor detects 93.1% of attacks with a 4.6% false-positive rate and an area under the ROC curve of 0.953, compared with 72.8% and 0.845 for the physics-only monitor and 44.1% and 0.691 for the cyber-only monitor. Average detection latency is 2.36 min and processing cost is 50.8 \textmu{}s per session. The results show that physics-informed runtime oracles can strengthen automated software assurance for cyber-physical telemetry while remaining interpretable and lightweight. External validation on measured charging-station data remains future work.
Authors
- Ferdaws Ben Naceur (ORCID: https://orcid.org/0009-0003-5949-6055)
- Chokri Ben Salah (ORCID: https://orcid.org/0000-0002-3103-7012)
- Mahmoud El Amri
Institutions
- University of Monastir (TN)
- University of Sousse (TN)
Publication Details
- Journal
- Research Square
- Published
- 2026-11-20
- DOI
- https://doi.org/10.21203/rs.3.rs-11027842/v1
- Primary Topic
- Smart Grid Security and Resilience
- Type
- preprint