## 4 EMS Optimization
### Hydrogen Energy and Hydrogen Power  
Hydrogen energy (Figure 6) uses a time scale of 0 to 25 h to show how hydrogen energy storage changes over a 24 h period. The hydrogen energy scale ranges from 0 to 8 \(\times\) 10\({}^{\circ}\)4 kW-h. Initially, hydrogen energy starts at 4 kW-h and steadily decreases to 1 kW-h by the 10 th h. It then increases back to 4 kW-h, drops again around the 16 th h and rises sharply to 8 kW-h by the 18 th h. After this peak, hydrogen energy decreases to 4.5 kW-h before increasing again to 8 kW-h at the 24 th h. This figure illustrates the fluctuations in hydrogen energy storage, reflecting dynamic charging and discharging processes. Figure 5: Grid Price. Figure 6 depicts the levels of stored hydrogen energy (in kW-h) over a 24 h period, capturing the variations influenced by the energy management system (EMS). The horizontal axis represents the time from 0 to 24 h, while the vertical axis denotes the stored hydrogen energy, with values in the range of 000 to 8\(\times\)1048 \(\backslash\)times 104 kW-h.  
* Daytime Period (6:00 AM-6:00 PM, 6 to 18 h): During the daytime, hydrogen energy levels show some fluctuations, with a notable increase starting around 2:00 PM (14 h). This increase indicates the EMS's response to higher electricity prices or lower grid availability during peak hours, likely converting surplus energy into stored hydrogen. The fluctuations around midday suggest dynamic management of energy storage as the EMS balances production and consumption needs. * Nighttime Period (6:00 PM-6:00 AM, 18 to 6 h): At night, the stored hydrogen energy levels increase significantly, particularly after 6:00 PM (18 h). This rise may reflect the EMS's strategy to store energy when grid prices are lower, and electricity demand is reduced. The gradual stabilization towards the end of the period suggests that the EMS has maximized storage capacity or reduced the conversion rate as energy needs diminish. This Figure 6 emphasizes the EMS's role in managing energy storage, with clear patterns of hydrogen energy fluctuation corresponding to day and night cycles. Understanding these variations is essential for optimizing the use of hydrogen storage in maintaining grid stability and ensuring efficient energy use. Hydrogen power (Figure 7) shows the variation in hydrogen power output over the same 24 h period, with a time scale from 0 to 25 h. The power scale ranges from \(-\)40 to 40 kW. Throughout the day, the power level mostly stays at 40 kW, especially from the 12 th to the 13 th h, when it briefly drops to \(-\)40 kW before returning to 40 kW. This pattern continues until the 24 th h. This figure highlights the rapid and significant fluctuations in hydrogen power output, indicating periods of high activity and the system's capability to effectively manage hydrogen production and consumption. Figure 6: Hydrogen Energy. Figure 7 shows the power output associated with hydrogen energy storage (in kW) over a 24 h period, highlighting the dynamic management by the energy management system (EMS). The horizontal axis represents time from 0 to 24 h, while the vertical axis denotes power output, ranging from \(-\)50 kW to 50 kW. * Daytime Period (6:00 AM-6:00 PM, 6 to 18 h): During the daytime, hydrogen power output displays frequent and rapid fluctuations between positive and negative values. These fluctuations indicate the EMS's active role in balancing energy storage and release, driven by variable energy generation (like solar) and demand during daylight hours. The transitions between positive and negative values suggest alternating periods of hydrogen production (storing energy) and consumption (releasing energy), particularly in response to peak demand and grid price variations. * Nighttime Period (6:00 PM-6:00 AM, 18 to 6 h): At night, the hydrogen power output continues to fluctuate, although with somewhat reduced intensity compared to the daytime. These fluctuations reflect the EMS's strategy to manage energy storage during periods of lower electricity demand.