External energy management systems are increasingly used in grid-connected photovoltaic–battery systems. However, validation is often limited to scheduling-level behavior. This paper presents a Python–Simulink software-in-the-loop framework for closed-loop validation of an external Python-based energy management system. The framework couples the Python EMS to a detailed Simulink model of a grid-connected PV–BESS system through UDP communication. Simulink sends plant measurements to Python, and Python returns supervisory battery commands. The closed loop uses multi-rate execution and supports time-compressed replay of long operating scenarios. A 48-hour case study is used to test communication continuity, command and measurement exchange, and consistency between energy management system commands and realized battery behavior under day and night operation, grid import and export, and battery charge, discharge, and idle modes. The software-in-the-loop run remained active over the full scenario. The exchanged commands were realized correctly by the Simulink plant model. As a supporting plant-level indicator, the common DC-bus voltage remained within acceptable bounds during the full run and during representative mode transitions. The results show that the proposed framework is suitable for closed-loop software-in-the-loop validation of external EMS functions before real-time and hardware-in-the-loop testing.

A Python–Simulink software-in-the-loop framework for closed-loop validation of an external EMS in a grid-connected PV–BESS system / Shah Moradi, S., Mazza, A., Pons, E., Delmastro, A.. - (In corso di stampa). (26th International Conference on Environment and Electrical Engineering (EEEIC 2026) ).

A Python–Simulink software-in-the-loop framework for closed-loop validation of an external EMS in a grid-connected PV–BESS system

Saeid Shah Moradi;Andrea Mazza;Enrico Pons;
In corso di stampa

Abstract

External energy management systems are increasingly used in grid-connected photovoltaic–battery systems. However, validation is often limited to scheduling-level behavior. This paper presents a Python–Simulink software-in-the-loop framework for closed-loop validation of an external Python-based energy management system. The framework couples the Python EMS to a detailed Simulink model of a grid-connected PV–BESS system through UDP communication. Simulink sends plant measurements to Python, and Python returns supervisory battery commands. The closed loop uses multi-rate execution and supports time-compressed replay of long operating scenarios. A 48-hour case study is used to test communication continuity, command and measurement exchange, and consistency between energy management system commands and realized battery behavior under day and night operation, grid import and export, and battery charge, discharge, and idle modes. The software-in-the-loop run remained active over the full scenario. The exchanged commands were realized correctly by the Simulink plant model. As a supporting plant-level indicator, the common DC-bus voltage remained within acceptable bounds during the full run and during representative mode transitions. The results show that the proposed framework is suitable for closed-loop software-in-the-loop validation of external EMS functions before real-time and hardware-in-the-loop testing.
In corso di stampa
File in questo prodotto:
Non ci sono file associati a questo prodotto.
Pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11583/3015535
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo