## 4 EMS Optimization
### PV Power Integration  
Power PV integration (Figure 9) illustrates the integration of photovoltaic (PV) power with other energy sources over a 24 h period, using a time scale from 0 to 25 h and a power scale ranging from \(-\)50 to 100 kW. PV power starts at 0 kW, gradually increasing to a peak of 48 kW by the 10 th h, then slowly decreasing and stabilizing until the 24 th h. Battery power also begins at 0 kW, rising to 45 kW by the third hour and consistently maintaining this level until the end of the period. Hydrogen power starts at \(-\)48 kW, fluctuating between \(-\)48 kW and 48 kW throughout the day, indicating periods of high production and consumption. Grid power starts at 75 kW, occasionally dipping to \(-\)50 kW, but generally maintaining a level between 40 kW and 75 kW until the 24 th h. Load power operates steadily, starting at 40 kW and continuing consistently until the end of the period.  
Figure 9 illustrates the power output from various sources (power PV integration), including PV (photovoltaic), battery, hydrogen, grid, and load (in kW), over a 24 h period, highlighting the EMS's dynamic management. The horizontal axis represents time from 0 to 24 h, while the vertical axis shows power output, ranging from \(-\)50 kW to 50 kW.  
* Daytime Period (6:00 AM-6:00 PM, 6 to 18 h): During the daytime, the power outputs from different sources, particularly PV and battery, exhibit significant activity. The PV power generation increases as sunlight becomes available, peaking during the middle of the day. This is reflected in the EMS's active management, where the power from PV is used or stored in the battery. Additionally, the hydrogen system and grid also  
Figure 9: Power PV Integration.  
show fluctuations, indicating their roles in balancing the load and managing excess generation during this period of high renewable energy availability.
* Nighttime Period (6:00 PM-6:00 AM, 18 to 6 h): At night, PV power output drops to zero due to the absence of sunlight, leading to reduced fluctuations in the EMS's operation. The battery and grid systems take on more significant roles during this period, as they provide the necessary power to meet the load demand. The EMS's strategy shifts towards discharging the battery and possibly utilizing stored hydrogen to ensure a continuous power supply, with minimal reliance on fluctuating sources.  
Figure 9 emphasizes the EMS's crucial role in integrating and balancing various power sources, particularly in response to the distinct patterns of energy generation and demand associated with day and night cycles. Understanding these patterns is vital for optimizing the use of renewable energy and ensuring efficient grid operation throughout the day.  
This figure provides a detailed view of how PV power is integrated with battery storage, hydrogen energy, grid power, and load demands within the energy management system (EMS). It draws attention to the dynamic interactions and modifications that different power sources make to guarantee a reliable and effective energy supply all day long. Comprehending these interplays is crucial for maximizing the integration of renewable energy sources and augmenting the overall efficiency and dependability of the energy management system.