## 5 Discussion and Conclusions  
This paper introduces an advanced demand-side management (DSM) system aimed at optimizing electric vehicle (EV) charging at public charging stations through a novel event-driven model predictive control (MPC) approach. The system's ability to dynamically  
Figure 7: Geographic area selected for the field tests, in Ljubljana (Slovenia). The red shaded area represents the pilot study area, with blue points indicating parking houses and green points representing charging stations. adjust to real-time grid conditions, electricity prices, and user preferences highlights its potential as a crucial component in the management of modern smart grids. The results from extensive simulations demonstrate that the proposed system not only effectively reduces charging costs for users but also significantly enhances grid stability by mitigating peak loads and efficiently managing the distribution of energy demand. The integration of such a DSM system into smart city infrastructures represents a forward-thinking solution for the challenges posed by the growing adoption of EVs. As urban areas increasingly prioritize sustainable and efficient energy management, the ability to balance electricity demand and supply in real-time becomes critical. The MPC-based DSM system proposed in this study addresses these needs by optimizing charging schedules, thereby supporting the stable operation of the grid while also providing cost savings for end-users. This dual benefit positions the system as a key enabler in the development of sustainable urban energy solutions. Another important consideration is the integration of the proposed DSM system with existing payment systems in the market. Synchronizing the charging infrastructure with widely used payment platforms will be essential for the practical implementation of the system in real-world scenarios. This includes enabling seamless payment processing through mobile apps, contactless payments, and other digital wallets commonly used by EV owners. A key challenge will be ensuring that the system is compatible with the dynamic nature of energy tariffs and billing structures. Future iterations of the DSM system should prioritize the development of secure, scalable, and user-friendly payment interfaces that can adapt to real-time price fluctuations while providing a smooth user experience. This integration will further enhance the adoption of the system by making it easier for EV users to interact with charging services and manage costs effectively. However, while the system shows great promise, it is important to recognize and address its limitations. One notable limitation is the assumption of a uniform electricity tariff across all charging events. In reality, energy costs can vary significantly based on factors such as time of day, location, and market conditions. Future iterations of the system should incorporate variable tariffs to more accurately reflect the complexities of real-world energy markets. Additionally, the current model does not fully integrate renewable energy sources, which are becoming increasingly prevalent in modern power systems. The inclusion of renewable energy considerations in the DSM framework could further enhance the system's ability to reduce costs and improve grid stability, particularly in regions with high penetration of solar and wind power. Additionally, the current model does not fully integrate renewable energy sources, which are becoming increasingly prevalent in modern power systems. The inclusion of renewable energy considerations in the DSM framework could further enhance the system's ability to reduce costs and improve grid stability, particularly in regions with high penetration of solar and wind power. By leveraging renewable energy, the DSM system could optimize charging times to coincide with periods of excess renewable generation, helping to balance supply and demand while minimizing reliance on fossil fuels.