Skip to Content
EnergiesEnergies
  • Article
  • Open Access

30 November 2026

51 Pages

Hybrid Stochastic Energy Management Framework for Stand-Alone PV Microgrids with Green Hydrogen Production Under Healthy and Faulty Conditions

and
1
Yanbu Industrial College, Royal Commission Yanbu Colleges & Institutes, Yanbu 46452, Saudi Arabia
2
Department of Electrical Engineering, College of Engineering, Prince Sattam Bin Abdulaziz University, Al-Kharj 11942, Saudi Arabia
*
Author to whom correspondence should be addressed.
This article belongs to the Special Issue Solar Energy Conversion and Storage Technologies

Abstract

The role of energy management systems (EMSs) in stand-alone photovoltaic (PV) microgrids with hybrid storage has been extensively studied to ensure healthy operation. Nevertheless, their behavior under fault conditions has received little attention. In this study, a hybrid stochastic EMS is proposed for a stand-alone PV microgrid with battery energy storage (BES) and a proton-exchange-membrane (PEM) electrolyzer for green hydrogen production and tested under healthy and faulty conditions. The EMS combines a rule-based reactive five-mode dispatch policy, defined on a Markov decision process (MDP) state abstraction, with a model predictive control (MPC) layer that solves a linear program every 15 min over a 6-h horizon to shape the battery state-of-charge trajectory. The MPC employs perturbed-oracle forecasts; hence, its outcomes are presented as an idealized predictive-control benchmark rather than as the performance attainable with realistic forecasts. Uncertainty is modeled using a clear-sky irradiance envelope with Poisson-distributed cloud events, a stochastic ambient-temperature model, and an eight-state continuous-time Markov chain for the deferrable load with time-of-day and weekday/weekend transition rates. The battery current is directly modeled based on the pack’s electrical characteristics, thereby exposing short-circuit stresses that power-only models cannot capture. A dual-timescale fault-response framework cleanly separates millisecond-scale local hardware protection from the communication-constrained EMS supervisory response. The five fault scenarios (DC-bus short circuit, PV array fault, battery-converter failure, sensor drift, and electrolyzer overheating) are embedded in a five-day stochastic simulation under clear, partly cloudy, and overcast conditions. The study characterizes the efficiency-reliability trade-off introduced by predictive dispatch, delimits which faults the EMS can and cannot mitigate, identifies a structural limitation of electrolyzer-curtailment-based fault redirection, and derives design recommendations for multilayer, fault-aware EMSs in green-hydrogen PV microgrids. The electrical faults are simulated at millisecond resolution, while the sensor drift and electrolyzer overheating are simulated at their physical minute-to-hour timescales; the sensitivity of the fault results to the battery resistance and the fault injection instant is quantified, and the reliability cost of predictive dispatch is reported as unmet energy.

1. Introduction

The worldwide demand to minimize carbon emissions from energy systems has led to increased use of renewable energy sources, with solar photovoltaics (PVs) playing a major role [1]. Grid-linked systems benefit from the stability of a large network, although off-grid or stand-alone PV microgrids are crucial for providing electricity to remote villages, rural areas, and critical infrastructure without access to a stable or reliable conventional grid [1]. These off-grid technologies offer a path to energy access without a utility connection, but they must function without the stabilizing effect of a large utility grid. The main issue with stand-alone PV microgrids is the balance between electricity supply and demand. The output of a PV generator is inherently variable, unlike that of a typical power station [2].
This is due to its dependence on uncertain external parameters, such as solar irradiation and temperature. Nevertheless, this discrepancy is only one aspect of the problem. Another often-overlooked difficulty is the unexpected pattern of load consumption [3]. In real applications, such as small households and remote industrial sites, user behavior, especially how people manipulate the appliances and how they behave, can lead to sudden and unexpected changes in energy consumption. A persistent problem with PV-only systems is the mismatch between the daily availability of solar and the continuous load: battery energy storage systems (BESSs) effectively balance hour-to-day fluctuations but are limited, both technically and economically, in their ability to perform seasonal or multi-day storage [4,5]. Green hydrogen, produced locally by proton-exchange-membrane (PEM) water electrolysis and powered by surplus PV generation, has consequently emerged as a complementary long-duration energy medium, converting otherwise wasted solar energy into a storable and transportable fuel [6].
Hydrogen is especially beneficial to overcome the multi-day and seasonal gaps between the generation and use of renewable energy and is a key element of the large-scale integration of renewables into future energy systems [7,8]. Batteries are used for immediate grid stabilization, and hydrogen for long-term storage, forming a robust multi-temporal energy storage framework necessary for fully renewable energy systems. Reliability requires a hybrid energy storage system that incorporates long-duration hydrogen and short-duration battery technologies. The dual storage concept promotes the matching of intermittent solar generation, energy demand, and electrolyzer operation. The economic case for installing PEM electrolysis capacity in a stand-alone microgrid depends on the trajectory of green-hydrogen production costs, which is dynamically changing: a recent global assessment shows that climate change alone can raise the levelized cost of hydrogen by up to 20% in some locations and change it by more than 5% in either direction in about 16% of locations, so that cost-competitiveness depends on location and on proactive, climate-aware investment decisions [9]. In this cost-competitiveness window for small-scale PEM units, the most defensible mode of operation is to use as much PV surplus as possible that would otherwise be curtailed, which motivates the EMS-based optimization of electrolyzer use.
Stand-alone PV–battery–hydrogen systems have a DC-coupled architecture in which PV panels and battery storage are connected to a common DC bus via dedicated converters. The PV side converter controls the bus voltage and tracks the maximum power point [1]. The bidirectional battery converter controls the charging and discharging processes within the ideal state-of-charge (SoC) parameters. If generation exceeds consumption for the usual DC bus, an energy management system (EMS) is used to meet load needs, safeguard battery health, and transfer any excess energy to a PEM electrolyzer for hydrogen production. The integrated design couples the battery’s fast response with hydrogen’s long-term storage capability, enabling the effective use of renewable energy. The individual power converters enable each element (PV system, battery, electrolyzer) to operate at optimal voltage and current levels. The hierarchical EMS incorporates load-following algorithms to ensure a stable power supply in the face of solar fluctuation. These algorithms balance the short-term storage requirements with environmentally benign hydrogen generation. An adequately designed EMS is crucial for avoiding cascading failures, such as uneven power delivery, recurring outages, and irreversible battery degradation due to SoC violations [10]. The system features a complex controller architecture that balances the energy between battery performance and hydrogen storage capacity for optimal operation. The unpredictability of PV renewables requires effective management to ensure consistent round-the-clock operation.
Effective control algorithms enhance power management and energy consumption in off-grid PV systems with green hydrogen production. The control algorithm optimizes hydrogen production by modulating energy flows to match generation and demand, thereby meeting local energy requirements [11].
Recently, energy management of PV microgrids has attracted interest, with efforts focused on developing efficient control algorithms to improve energy utilization [12,13]. These technologies successfully perform maximum power point tracking (MPPT) while considering the battery’s charge level. This control architecture enhances the adaptability, resilience, and reliability of microgrid operations in actual settings.
A modified PID controller was developed in [14] to improve the energy efficiency of a PV–battery hybrid generation system for dynamic motor loads. An efficient control technique for a grid-connected PV microgrid source under partial shading was explored in [15]. This approach allows fast switching between maximum- and intermediate-power-point modes. In this study, a hybrid algorithm that combines particle swarm optimization with a novel intermediate MPPT is used to control a boost converter. Furthermore, an effective optimization of PI controller parameters was proposed for a DC renewable microgrid based on solar PV technology and hydrogen-centered energy storage [16]. Research has highlighted the optimal tuning of PID/PI controllers using metaheuristic approaches, but studies testing these controllers in stochastic load and generation scenarios are limited. Controller gains are usually optimized for a specific operating state, limiting their applicability to stand-alone microgrids with unpredictable demand and variable PV output. Many approaches fail to accurately capture the complex dynamics of battery state-of-charge, leading to over-cycling, reduced dependability, and poor energy management. Such restrictions emphasize the necessity of flexible, holistic control systems that account for real-world changes.
A distributed control framework is used to develop an efficient control approach for a renewable-energy-based microgrid that includes numerous solar PV systems and battery energy storage units [17]. The PV system uses an MPPT algorithm and bi-directional batteries to store excess solar energy or release it when needed. The authors in [18] investigated an effective energy management framework for a DC microgrid serving a commercial building that integrates multiple energy sources, including a fuel cell acting as a dispatchable generation source and a battery as the storage element, using the salp swarm algorithm. In [10], a model predictive control-based EMS for hydrogen production in an off-grid microgrid comprising PV generation, lead-acid battery storage, hydrogen synthesis, and various loads was presented. The primary purpose is to improve system effectiveness and sustainability by controlling energy flows and reducing battery cycling.
Protection and diagnostics are far more challenging in off-grid PV–battery–hydrogen microgrids than in single-source systems, because faults can arise across three energy domains: PV generation, battery storage, and the hydrogen subsystem. The most prevalent problems on the PV side include line-to-line and ground faults, open-circuit conditions, partial shadowing, and MPPT failures caused by a defective charge regulator, which reduces the array’s output power and voltage [19]. The hydrogen subsystem has its own unique modes of failure: investigators have used validated mathematical models to simulate faults and study statistical residuals, successfully identifying more than a dozen distinct fault signature patterns in fuel-cell-based generation to prevent performance degradation or total system failure; independent research has developed dynamic fault detection and diagnostic methods for industrial alkaline water electrolyzers using variational Bayesian dictionary learning, pointing out the electrolyzer’s susceptibility to degradation and operational malfunctions [20].
The diagnostic challenge is further complicated by the fact that most existing fault datasets and diagnostic frameworks are developed for PV–battery systems connected through distribution lines and a common coupling point. Fewer studies address the complexity introduced by hydrogen storage integration, highlighting a gap in integrated, multi-domain fault detection systems developed only for off-grid PV–battery–hydrogen systems. Recently, machine learning has been used to estimate the failure of microgrids [20]. All these approaches can accurately detect and locate the position and severity of faults and require the activation of protection devices for disconnection. The ability of the EMS to actively intervene on a specific fault depends on whether the fault clears itself before the communication-limited EMS can detect it; nevertheless, this interplay between fault duration and detection latency has not been explored extensively. This is the basis for the reliable, robust, and energy-efficient operation aimed for in this work.
Evaluations of microgrid supervisory controllers delineate fault mitigation, topology reconfiguration, islanding, generation curtailment, and load shedding as fundamental EMS activities that operate in conjunction with local protection. In addition, studies on distributed EMS architectures suggest that decentralization serves as a fault-mitigation approach: by removing single points of failure, a distributed EMS can maintain fundamental operations despite temporary communication-link disruptions, which is consistent with findings of the present study that communication-reliant detection is the primary limitation to rapid fault detection [21]. Self-healing architectures with automatic reconfiguration are complementary to the two-timescale distinction developed in this paper. Ultimately, broader evaluations of EMS architectures indicate that centralized supervisory frameworks such as our reactive and MPC EMS encounter recognized difficulties in fault situations, including prolonged computational durations and instability during failure events, which is a key reason referenced in the literature for transitioning toward decentralized or hybrid options [22].
Beyond this closely related line of work, the broader literature on stochastic and predictive EMS for renewable microgrids has established model predictive control [2] and Markov decision processes [5] as canonical tools for sequential decision-making under uncertainty, while techno-economic analyses of green hydrogen [6] have underscored the value of maximizing electrolyzer utilization from otherwise curtailed renewable surplus. This paper adopts these canonical formulations but extends them into the fault domain, which the reviewed stochastic-EMS literature does not address.
The position of the present research relative to the most pertinent studies is presented in Table 1. The EMS research established a stochastic, MDP-based dispatch for stand-alone PV microgrids facing uncertain load [5,23] and expanded it to enhance green hydrogen production in PV–battery–PEM systems [6]; however, all these studies assume optimal functioning. MPC-based energy management systems for independent PV–battery–hydrogen microgrids and metaheuristic energy management systems for DC microgrids with battery storage and fuel-cell generation similarly neglect fault considerations, while fault-detection research for DC and AC microgrids emphasizes identifying and pinpointing faults but fails to illustrate the collaborative responsibility of the supervisory energy management system and local protection across varying timescales. The current research diverges from earlier studies in three ways: (i) It incorporates a predictive MPC layer atop the MDP-structured dispatch from [5,6], detailing both its efficiency improvements and reliability expenses; (ii) it integrates five fault categories within the same stochastic simulation, distinctly timing the contributions of local protection and the EMS; (iii) it directly models the battery current, revealing fault stresses that power-centric EMS models fail to capture.
Table 1. Comparison of the present work with closely related studies.
Table 1 presents two types of related studies that have been developed separately. The first category (stochastic, MDP-based, predictive, and metaheuristic EMSs [2,3,5,6,10,16,18,23,24]) optimizes PV, battery, and hydrogen asset dispatch under healthy operation. The second category (fault detection, diagnosis, and EMS reviews [19,20,21,22]) identifies faults and discusses fault mitigation qualitatively but does not quantify how supervisory EMS and local protection divide fault response time. In [18], the fuel cell is characterized as a controllable generation source, not a storage element. In this system, hydrogen is dispatched from the microgrid, and the battery is the only load-supplying storage. The novelty of this work lies not in a new dispatch algorithm, but in a combined evaluation, on identical stochastic realizations, of (i) MDP-structured and MPC-enhanced dispatch of a PV–battery–PEM system and (ii) five fault types addressed on their respective physical timescales, allowing for a determination of whether local protection, EMS, or neither affects the result for each fault type.
Based on these differences, the major contributions of this paper may be outlined as:
•
A five-mode dispatch strategy with MDP structure and an additional receding-horizon MPC layer solved as a linear program every 15 min across a 6-h horizon with sky-dependent weights. The MPC layer predicts PV–load imbalances, instead of the strictly reactive MDP-based EMSs we proposed earlier [6,23,24]. The efficiency benefits are presented not as strict improvements but alongside the load-shedding exposure they cause. Because the MPC uses perturbed-oracle forecasts, these benefits are reported as an idealized upper bound.
•
A two-timescale fault-response framework that distinguishes the millisecond-scale local hardware protection and the ≈120 ms communication-constrained EMS supervisory response, thus making the contribution of each layer to safety and service continuity explicit instead of assumed, as is the case with studies that treat faults as only power-flow disturbances or detection problems [19,20,22].
•
A current-domain representation of a battery fault where short-circuit current is a function of the pack’s internal-plus-interconnect resistance, revealing overcurrent stresses (10.7 times rated current for the base-case 0.1 Ω and 3.6–21.3 times over 0.05–0.3 Ω) that power-only EMS models cannot capture.
•
A five-day stochastic case study with five fault types in clear, partly cloudy, and overcast conditions that identifies which faults the EMS can and cannot influence, reveals a structural limitation of electrolyzer-curtailment-based redirection when the electrolyzer is idle, and explicitly delimits the conclusions that can be drawn from single-realization, single-operating-point simulations. An exhaustive fault-injection sweep over all 1440 operating points of the investigated realization then isolates the findings that hold at each operating point from injection-instant-dependent magnitudes.
The remainder of the paper is organized as follows. Section 2 describes the system architecture and the models of the uncertainty sources, PV array, battery, and PEM electrolyzer. Section 3 introduces the MDP-structured reactive dispatch, MPC layer, and two-timescale fault-tolerant control framework. Section 4 reports nine case studies covering healthy operation, five fault scenarios, a cross-fault comparison, and a communication-delay sensitivity analysis, followed by a discussion of the fault sensitivity analysis and limitations of the results. The paper concludes in Section 5.

2. System Modeling

The architecture of the stand-alone PV–battery–PEM electrolyzer microgrid analyzed in this research is shown in Figure 1. Solar PV generation is controlled by a specialized DC–DC converter and connected to a shared DC bus. This bus also connects a bidirectional DC–DC converter to a battery energy storage system, DC loads, and a PEM electrolyzer, which converts excess power into hydrogen for long-term storage. EMS monitors the bus condition and allocates power to these resources; local hardware safeguards (fuses, breakers, and converter current limits) operate independently and significantly more quickly than the EMS’s communication-dependent supervisory loop, a distinction that is pivotal to the fault-tolerance evaluation. The PEM electrolyzer is connected to the DC bus through a dedicated step-down (buck) DC–DC converter that adapts the bus voltage to the stack’s low-voltage, high-current requirements and regulates the stack current (Figure 1a). Figure 1b summarizes the complete simulation framework, i.e., the power flows among the components, the location of the local protection devices, and the information flow of the EMS, including the communication and processing delays that separate the two response timescales. All models and simulations were implemented in MATLAB R2024b.
Figure 1. (a) Typical stand-alone PV–battery–PEM-electrolyzer microgrid, including the dedicated DC–DC converter of the electrolyzer; (b) power-flow, local-protection, and EMS information-flow architecture of the simulated system.
All the key parts of the system under investigation are intrinsic DC devices, so a DC-coupled microgrid was chosen. The PV array generates DC power; the battery stores DC energy; the PEM stack is a low-voltage, high-current DC load; and the loads studied are DC loads fed from the bus (Figure 1a). For a DC-coupled system, each component needs just one DC–DC conversion stage, whereas an AC-coupled design requires a DC/AC inverter for the PV array and the battery and an AC/DC rectifier for the electrolyzer. DC coupling also removes the need for frequency synchronization and reactive power control, so that the bus voltage, regulated by the battery converter, is the only common quantity that must be controlled [25]. The cost of this choice is the number of dedicated converters: a boost converter for the PV array, a bidirectional buck-boost converter for the battery, a buck converter for the electrolyzer stack, and, where the load voltage differs from the bus voltage, point-of-load DC–DC converters, each with its own local protection (Figure 1b).
The electrolyzer stack is not the only electrical consumer of the hydrogen subsystem: its balance of plant, i.e., the water circulation and coolant pumps, the cooling fan or chiller, the water purification unit, and the gas handling and control electronics, is normally powered with AC. Therefore, in the considered architecture, the balance of plant (BoP) is supplied from the DC bus through a small auxiliary DC/AC inverter (Figure 1b). At the system level of this study, BoP consumption is not modeled as a separate load; it is lumped into the electrolyzer power demand via the overall conversion efficiency of Equation (15), which yields a system-level specific consumption of 68 kWh/kg H2, and the BoP heat is represented by the 5 °C offset of Equation (18). Thus, the auxiliary inverter is part of the architecture but is not modeled as a separate dynamic element. A BoP failure is represented only by its thermal consequence (cooling degradation; Case Study 7).

2.1. Sources of Uncertainty

Many distinct sources of stochastic uncertainty are explicitly modeled, each employing its own generative method, because merging them into a single noise term would obscure their differing timelines and physical origins. These encompass solar irradiance and temperature variability, load variability, fault occurrence, and communication-delay variability. Most component models used in this study are established formulations adopted from the literature, which have been combined and extended to the fault domain.

2.1.1. Solar Irradiance and Temperature Uncertainty

Irradiance is produced as a deterministic clear-sky boundary influenced by random cloud fluctuations. The clear sky component is assumed to follow a sine envelope between sunrise and sunset:
G c l e a r t = G p e a k . m a x 0 ,   s i n π   t − t s r t s s − t s r ,
where G c l e a r ,   G p e a k are the current and peak clear-sky irradiance, respectively, while t s s   ,   t s r   designate sunset and sunrise.
Cloud transients are stacked as a continuous overcast attenuation α o c alongside N c arbitrary-time multiplicative decreases, each characterized by depth δ k and duration Δ k , drawn independently.
G t = G c l e a r t ⋅ 1 − α o c ⋅ ∏ k = 1 N c 1 − δ k   𝟏 [ t k ,   t k + Δ k ) t ,
where αoc ∈ [0, 1) is the overcast attenuation factor, Nc is the number of cloud events in the day, tk, δk ∈ (0, 1), and Δk are the start time, depth, and duration of the k-th cloud event, and 𝟙[a, b)(t) is the indicator function, equal to 1 when a ≤ t < b and 0 otherwise, so that each cloud event attenuates the irradiance only during its own interval.
The rate of cloud cover is determined by the specified sky condition (clear, partly cloudy, or overcast) and follows a daily Poisson distribution, yielding the observed irradiance characteristics for each of the five simulated days. The ambient temperature is modeled via a deterministic diurnal cosine model with additive Gaussian sensor noise.
T a m b t = T m e a n + T a m p c o s 2 π t − t p k 24 + ε t ,   ε t ∼ N 0 , σ 2 ,
where Tmean, Tamp, and tpk are the daily mean and amplitude of the ambient temperature and the time of its daily peak (h), and ε(t) is zero-mean Gaussian noise with standard deviation σ.

2.1.2. Load Uncertainty

The total load is divided into a constant essential and a variable deferrable part:
P l o a d t = P b a s e + P d e f θ t   ,     θ t ∈   { 1 , … , r ,
where the deferrable-load state θ t evolves as a continuous-time Markov chain over r discrete power levels. Consequently, the chance of a transition in a small interval is as follows:
P r θ t + h = j   |   θ t = i = π i j   h + o h , i ≠ j 1 + π i i   h + o h , i = j .
Using transition rates favoring gradual (adjacent-state) transitions over abrupt changes, and modified by a time-of-day activity multiplier,
π i j = π 0 i − j 1.5 ⋅ m t   ,     π i i = − ∑ j ≠ i π i j ,
m t = m p e a k   1 p e a k t ⋅ m w k n d   1 w k n d t .
In Equation (6), π0 is the base transition rate and |i − j|1.5 is an inverse power-law distance penalty: the rate of a jump between states i and j decreases with the number of levels crossed, so that a jump of two levels is 21.5 ≈ 2.8 times, and a jump of three levels 31.5 ≈ 5.2 times, less likely than an adjacent-state transition. This form is a modeling assumption reflecting that aggregate deferrable demand usually changes by one appliance block at a time, whereas simultaneous switching of several appliances is less frequent; the exponent 1.5 was chosen as an intermediate value between a weak (exponent 1) and a strong (exponent 2) preference for adjacent transitions and was not fitted to measured data. In Equation (7), 𝟙peak(t) and 𝟙wknd(t) are indicator functions equal to 1 during peak hours and on weekend days, respectively, and 0 otherwise. The activity multiplier, therefore, increases the transition rates by mpeak = 3 during peak hours (7–9 AM and 6–10 PM) and scales them by mwknd = 0.6 on weekends, reproducing more volatile demand during the morning and evening activity peaks and calmer demand on weekends without imposing a static, deterministic load profile. These multipliers are assumed values chosen to qualitatively represent typical residential activity patterns; they were not calibrated against measured load data. Because they shape only the switching frequency of the deferrable load, they influence healthy-operation efficiency and load-shedding figures, but not fault-timescale results, which depend on protection and communication times rather than load statistics.

2.1.3. Uncertainty in Fault Occurrence and Communication Delays

The third source of uncertainty is not about generation or demand, but about the operational integrity of the microgrid: the timing, type, and duration of equipment faults, and the limited yet significant latency of the communication link between field sensors and the EMS supervisory decision logic. Irradiance and load are random processes, but faults are not generated randomly; they are specified beforehand as scenario inputs. This way, the effect of each type of defect may be isolated and compared under similar background conditions. The communication delay is treated as a design parameter, with its effects considered. The three electrical faults are shown on the millisecond transient time base, whereas the two slowly developing faults, irradiance-sensor drift and electrolyzer overheating due to cooling degradation, are simulated on their physical timescales at the 5-min dispatch resolution.

2.2. PV Array Model

The power output of the PV array is represented by irradiance-based scaling and a linear temperature-decreasing factor, using a nominal operating cell temperature (NOCT) approximation for the cell temperature:
T c e l l t = T a m b t + N O C T − 20 800   G t ,
P p v t = P r a t e d ⋅ G t G r e f 1 + γ P T c e l l t − T r e f ,
where P r a t e d is the rated capacity of the array under standard testing conditions, γ P represents the negative power temperature coefficient, and T r e f = 25 °C, G r e f = 1000 W/m2 are the established reference parameters. This model encapsulates the two primary real-world influences on PV output, irradiance scaling and thermal derating, while maintaining feasibility for the system-level, EMS-oriented examination conducted in this study.
The practical effect of the thermal derating in Equation (9) is that the nameplate rating systematically overestimates the power available to size the rest of the system. The cell temperature for the simulated climate is ≈62 °C at the clear-sky irradiance peak (ambient ≈ 31 °C); the temperature factor of Equation (9) is 0.834, and the 188.5-kW array produces at most 156.8 kW (83.2% of nameplate). Over the five days, thermal derating removes 12.3% of the energy that the nameplate would suggest (5213 kWh against 5945 kWh), giving a performance ratio of 0.877 and a capacity factor of 23%; daily yield is 6.9 kWh/kWp on clear days, 5.9 kWh/kWp on partly cloudy days, and only 2.0 kWh/kWp on the overcast day. Thus the array was sized against its derated rather than its nameplate output: at the derated peak, the maximum load of 50 kW and the 25-kW electrolyzer leave ≈82 kW for battery charging, which keeps the 150-kW battery converter unsaturated while still providing a daily clear-sky surplus large enough to fill the 400-kWh usable battery capacity and run the electrolyzer near its rating for several hours; sizing from the nameplate would have overestimated this surplus by ≈32 kW (≈1/0.83 ≈ 1.2 times oversizing is needed to obtain a given available peak). Soiling, shading by physical obstructions (cloud attenuation is already accounted for in Equation (2)), orientation constraints, power-system and reliability constraints, and socio-economic barriers all contribute to further reductions in real PV installations. These effects are beyond the irradiance and temperature effects captured in Equation (9) and the wider literature on the gap between technical and deployable PV potential [26]. Therefore, the 83% ratio at the peak observed here should be treated as an upper bound for the deployable percentage, and a field installation would require a proportionally larger nameplate or a smaller electrolyzer to replicate the dispatch findings.

2.3. Model for Battery Energy Storage

The battery SoC is updated using sequential Coulomb counting, utilizing unequal charge and discharge efficiencies:
Δ S o C t = η c   P b a t t   Δ t C b a t , P b a t t ≥ 0   c h a r g i n g P b a t t   Δ t η d   C b a t , P b a t t < 0   d i s c h a r g i n g ,
S o C t + Δ t = c l i p S o C t + Δ S o C t ,   S o C m i n ,   S o C m a x ,
subject to the physical operating envelope:
S o C m i n ≤ S o C t ≤ S o C m a x   ,     P b a t t ≤ P m a x = C r a t e ⋅ C b a t .
In Equations (10)–(12), Pbat(t) is the battery power (kW; positive when charging and negative when discharging), ηc and ηd are the charging and discharging efficiencies, Cbat is the battery energy capacity (kWh), Δt is the simulation time step (h), SoCmin and SoCmax are the lower and upper SoC limits (10% and 90%), and Crate is the peak charge/discharge rate as a fraction of the nominal capacity per hour.
In the fault-transient analysis, battery current is derived explicitly rather than inferred from the power only, since power and current can diverge significantly when the terminal voltage fails (e.g., during a DC-bus short circuit).
I b a t t = 1000 ⋅ P b a t t V n o m ,
where Ibat(t) is the battery (DC-side) current in A, Pbat(t) is expressed in kW (hence the factor 1000), and Vnom = 400 V is the nominal pack voltage. With the 150-kW power limit, the rated battery current is Irated = 150 kW/400 V = 375 A.
In the event of a severe short circuit, the battery ceases to provide power as directed by the controller; instead, the fault current is determined by the pack’s internal impedance and the fault pathway, unaffected by any control measures:
I s c = V n o m R i n t ,
where R i n t is the aggregate internal-plus-interconnect resistance of the battery pack.
Equation (14) is a purposely simplified first-order (purely resistive, bolted-fault) representation: it ignores the fault-path resistance, the inductance of cables and busbars, the discharge of the DC-link capacitors, and the dependence of Rint on SoC and temperature. It thus predicts a flat-topped current without the initial capacitor-discharge peak and without the oscillatory transients that a detailed circuit model would show. The base-case value of Rint = 0.1 Ω is an illustrative engineering value for a 500-kWh, 400-V pack; the actual value depends strongly on cell chemistry, series-parallel configuration, interconnects, and temperature. Therefore, the absolute fault-current magnitudes are interpreted as indicative in this study.
Additionally, Equation (14) is the basis for the short-circuit current calculation in the DC-bus short-circuit fault. The short-circuit current ( I s c ) is charge-limited, not power-limited, and thus not constrained by the converter’s normal power rating; the current can be substantially higher than the rated current unless limited by fast local protection.

2.4. Model of PEM Electrolyzer

Faraday’s law of electrolysis, which connects the molar rate of hydrogen evolution to the current in the stack, leads directly to the generation of hydrogen, and can be written as follows:
m ˙ H 2 t = η F ⋅ n c e l l ⋅ P e l y t ⋅ 1000 V c e l l   n c e l l ⋅ M H 2 2 F ,
where η F represents the Faraday (current) lumped efficiency, n c e l l is the number of series cells and V c e l l is the nominal cell voltage, M H 2 = 2.016 g/mol indicates the molar mass of hydrogen, and F = 96,485 C/mol refers to the Faraday constant. Here, Pely(t) is the electrolyzer (stack) power in kW (the factor 1000 converts it to W), and ncell is the number of series-connected cells in the stack. Because all series cells carry the stack current, Pely·1000/(Vcell ncell), the molar hydrogen rate is ncell times the per-cell rate. With overall conversion efficiency ηF = 0.70 and Vcell = 1.8 V, Equation (15) provodes a specific consumption of 68 kWh/kg H2.
The total mass of hydrogen is determined using numerical integration:
m H 2 t = ∫ 0 t m ˙ H 2 τ   d τ ≈ ∑ k = 0 t Δ t m ˙ H 2 k Δ t ⋅ Δ t ,
where τ is the integration variable, k is the sample index, and Δt is the simulation step.
The stack temperature is modeled by a first-order thermal lag toward a load-dependent equilibrium, which is the basis for the electrolyzer overheat fault event investigated in Case Study 7:
T s t a c k t + Δ t = T s t a c k t + Δ t τ t h T s s t − T s t a c k t
T s s t = T a m b t + 30 ⋅ P e l y t P r a t e d e l y + 5
where τ t h is the stack thermal time constant, Tstack is the stack temperature, and Tss(t) is the steady-state (equilibrium) stack temperature that the stack would reach if the current operating point were held constant. In Equation (18), Pelyrated = 25 kW is the rated electrolyzer power, the constant 30 °C is the steady-state temperature rise of the stack above ambient at rated power, scaled linearly with the loading ratio Pely/Pelyrated, and the constant 5 °C is a load-independent offset representing heat from the balance-of-plant auxiliaries (pumps and power electronics), so that the stack settles 5 °C above ambient when idle and 35 °C above ambient at rated power. These are representative lumped values for a small PEM stack rather than manufacturer data. Because τth for a PEM stack is of the order of minutes to tens of minutes, a physically realistic overheating event develops over this timescale. The electrolyzer trips (Pely forced to zero) if Tstack reaches the overheat threshold (80 °C) and is re-armed by the local protection once the stack has cooled to 60 °C (Section 3.4).

3. Control Techniques

The same fault schedule was applied to two dispatch strategies and tested under the same weather and load conditions. The reactive technique is a direct, immediate basis; the MPC-augmented strategy adds a forward-looking predictive layer atop the same reactive core. Both strategies were evaluated under the same five fault situations within the framework of fault-tolerant control.

3.1. Reactive Five-Mode MDP Allocation

At each control interval, the reactive controller selects one of the five operating modes based solely on the current PV–load power equilibrium and battery SoC, without any predictive or foresight capabilities. These modes can be written as follows:
a t = M o d e   1 : c h a r g e b a t t e r y , P p v ≥ P l o a d ,   S o C < S o C m a x M o d e   2 : e l e c t r o l y z e r , P p v ≥ P l o a d ,   S o C ≥ S o C m a x M o d e   3 : f u l l d i s c h a r g e , P p v < P l o a d ,   P p v = 0 ,   S o C > S o C m i n M o d e   4 : p a r t i a l d i s c h a r g e , P p v < P l o a d ,   P p v > 0 ,   S o C > S o C m i n M o d e   5 : l o a d s h e d d i n g , P p v < P l o a d ,   S o C ≤ S o C m i n .
This hierarchy, in which vital load is served first, the battery SoC is preserved, hydrogen is produced, and load shedding is performed only as a last resort, is maintained throughout the analysis and underlies the interpretation of the fault-tolerance results. This same hierarchy determines which lower-priority function is sacrificed first to protect the load when a fault disables an asset.

3.2. MPC-Enhanced Predictive Layer

Every 15 min, a linear programming (LP) model (solved using a standard interior-point/simplex linprog routine with solve times well below the 15-min update interval) is formulated for a 6-h predictive timeframe (H = 72 intervals at 5-min resolution) to find a desired battery SoC trajectory that proactively matches the battery with expected PV–load discrepancies, rather than just responding to the current state. The prediction is based on the actual future PV and load outcomes, modified by multiplicative Gaussian noise (5% for PV, 3% for load), representing day-ahead forecasting uncertainty without requiring an additional forecasting sub-model. This simplified and idealized representation of short-term forecasting uncertainty does not require a forecasting sub-model. Its justification and limitations will be discussed.

3.2.1. Forecast Availability at Each Decision Instant

At an update instant t, the controller receives, for each future interval k = 0, …, H − 1, the forecasts Ppv,k|t = Ppv(t + kΔt)·(1 + εpv,k) and Pload,k|t = Pload(t + kΔt)·(1 + εload,k), where εpv,k ~ 𝒩(0, 0.052) and εload,k ~ 𝒩(0, 0.032) are independent multiplicative errors redrawn at every update. The forecasts are therefore generated from the realized future PV and load trajectories of the simulation, perturbed by random errors; no forecasting model is trained or run. This perturbed-oracle forecast is a common simplification for isolating the value of predictive dispatch, but it gives the MPC more information than a real forecaster would: the error does not grow with the look-ahead time, it is unbiased and uncorrelated between steps, and the timing of cloud events is known in advance up to the noise level.
The zero-mean multiplicative Gaussian error is the simplest error model that (i) is unbiased, so that it does not systematically favor or penalize the MPC, (ii) has a single, interpretable parameter per signal, and (iii) keeps the LP deterministic and linear. The selected standard deviations are at the lower end of the errors reported for short-term PV power forecasting [27] and are on the order of those reported for short-term load forecasting [28], with the PV error larger than the load error, as in these reviews. However, actual forecast errors are not Gaussian, are correlated in time, increase with lead time, and are largest precisely during cloud transients. Therefore, the adopted error model corresponds to a very accurate short-horizon forecaster and is optimistic over the 6-h horizon; in particular, it reveals the timing of cloud events up to six hours in advance, which no causal forecaster can do. Thus, all MPC results in this paper are viewed as an idealized predictive-control benchmark, i.e., an upper bound on the benefit that predictive dispatch could provide in this system, rather than the performance that could be achieved with realistic forecasts. The methodological differences between the reactive MDP-structured allocation and the MPC layer are summarized in Table 2.
Table 2. MDP tuple of the reactive policy and methodological comparison with the MPC-enhanced layer.
The decision variables are the battery power pk (kW, positive when charging) and the non-negative slack sk (kW), which represents the part of the forecast PV surplus that cannot be absorbed by the battery in interval k and must therefore be sent to the electrolyzer or curtailed, for k = 0, …, H − 1. The LP is:
m i n { p k } , { s k } ∑ k = 0 H − 1 w l o s s − 0.3   w H 2 +   s k ,
subject to
s k ≥ P p v , k − P l o a d , k − p k   ,     s k ≥ 0 ,
S o C m i n   ≤   S o C 0 + Δ t C b a t ∑ j = 0 k p j   ≤   S o C m a x   ,     ∀ k = 0 , … , H − 1 ,
− P m a x ≤ p k ≤ P m a x .
In Equations (20)–(23), Ppv,k and Pload,k denote the forecasts Ppv,k|t and Pload,k|t defined above; SoC0 is the measured SoC at the update instant; Cbat is the battery capacity (kWh), Δt = 5/60 h, and Pmax = 150 kW is the battery power limit of Equation (12). Constraint (21) makes sk at least equal to the forecast surplus that is not stored in the battery; constraint (22) keeps the predicted SoC within its limits at every step of the horizon; and constraint (23) enforces the battery power rating. In the objective (20), wloss is the penalty per kWh of surplus that is not stored in the battery, wH2 is the value per kWh assigned to surplus that is converted into hydrogen, and the factor 0.3 is a fixed calibration constant that discounts this hydrogen value relative to the loss penalty. Because the objective penalizes only sk, the LP prefers battery trajectories that absorb as much of the forecast surplus as the SoC and power limits allow over the whole horizon, i.e., it pre-positions the SoC before large surplus periods. The numerical values of all weights are listed in Table A1.
Since wH2 is included in Equation (20) solely via the non-negative coefficient c = (wloss − 0.3wH2)+ that multiplies Σsk, it does not alter the optimal battery trajectory as long as c > 0, given that multiplying a linear objective by a positive constant does not affect its minimizer. In the LP, wH2 functions as a switch rather than a continuous trade-off parameter: when wH2 < wloss/0.3, the LP minimizes the surplus forecast that the battery cannot accommodate. When wH2 ≥ wloss/0.3, the coefficient disappears, and the LP ceases to differentiate between trajectories. The weights employed in this research (Table A1) fulfill c > 0 on every day, even subsequent to the sky-dependent scaling of Equation (24). As a result, the extra hydrogen generated by the MPC-augmented dispatch is not directly attributable to wH2, but rather to the application of the LP solution: the LP distributes battery charging throughout the anticipated surplus period rather than charging at the peak rate instantaneously, leading to the initial phase of its strategy, the target SoC*(t), frequently being lower than the SoC achieved through aggressive charging. The reactive layer thereafter transmits the existing surplus to the electrolyzer once SoC ≥ SoC*(t), rather than SoC ≥ SoCmax. Hydrogen generation is consequently regulated by the SoC objective and the weight wsoc-dev, which determines the rigor with which this objective is monitored.
Following the receding-horizon principle, only the first element of the optimal trajectory is applied at each update: the resulting SoC target SoC*(t) is passed to the reactive dispatch layer, and the LP is re-solved 15 min later with updated measurements and forecasts. The reactive layer uses SoC*(t) as a secondary objective when it chooses between Modes 1 and 2: when Ppv ≥ Pload and SoC(t) ≥ SoC*(t), the surplus is routed preferentially to the electrolyzer even if SoC < SoCmax, whereas when SoC(t) < SoC*(t), the battery is charged first; deviations from the target are weighted by wsoc-dev. The hard physical and safety limits of Equation (12) are enforced in both the reactive-only and the MPC-enhanced cases. If the LP is infeasible or fails to converge, the controller falls back to a flat target without pre-positioning, so that a single unsuccessful solve never blocks the dispatch loop.

3.2.2. Adjustable Weight Calibration

The cost weighing the LP is modified according to the sky condition of the day, anticipating a smaller future PV surplus on partly cloudy and overcast days, by scaling two of the weights as follows [18]:
w ′ s o c − d e v = κ s k y ⋅ w s o c − d e v   ,             w ′ H 2 = λ s k y ⋅ w H 2 ,
where wsoc-dev is the baseline weight for the deviation of the SoC from the MPC target in the secondary allocation step described above, w H 2 is the hydrogen-value weight in Equation (20), and the primed quantities denote the weights used on a given day. The sky-condition factors are κsky = 1.8 and λsky = 0.5 on overcast days, κsky = 1.3 and λsky = 0.8 on partly cloudy days, and κsky = λsky = 1 (baseline weights) on clear days. Increasing κsky above 1 strengthens SoC-target tracking, so the battery reserve is more strongly protected when little future surplus is expected, while decreasing λsky below 1 lowers the hydrogen value w′H2; as explained in Section 3.2.1, this keeps the coefficient of Equation (20) positive but does not by itself change the optimal battery trajectory, so that the sky-dependent behavior of the MPC is governed mainly by κsky through the SoC-target tracking. The larger adjustment on overcast days (1.8/0.5) than on partly cloudy days (1.3/0.8) reflects the larger expected reduction of the daily PV surplus under overcast conditions. These factors are heuristic calibration settings selected for the present system rather than the result of a formal optimization, and they are reported so that the results can be reproduced.

3.2.3. MDP Solution and Parameter Setting

The reactive policy is defined as an MDP abstraction (S, A, P, R, γ) of the dispatch problem, whose elements are listed in Table 2. The state at decision step t is st = (Ppv(t), Pload(t), SoC(t)), where Pload(t) contains the deferrable-load state θt of Equation (4). The action at ∈ {1, …, 5} is the operating mode of Equation (19); each mode fixes the set-points of the battery, the electrolyzer, PV curtailment, and load shedding through the DC-bus power balance. The transition kernel P(st+1|st, at) combines the SoC update of Equations (10) and (11), which depends on the action, with the exogenous stochastic evolution of irradiance, temperature, and load of Equations (1)–(7), which does not. Because the policy is defined by the rules of Equation (19) rather than computed by value or policy iteration, its reward is not a weighted sum but a lexicographic (priority) order: serving the load ranks first, keeping SoC above SoCmin second, producing hydrogen third, and avoiding curtailment last, and Equation (19) is the greedy (one-step, γ = 0) policy with respect to this order. Numerical weights therefore enter only the MPC layer (wloss, wH2, and wsoc-dev in Equations (20) and (24)), which extends the one-step decision of the reactive policy to a 6-h receding horizon, following the standard MPC formulation for microgrid operation [29]. Table 2 also compares the two layers methodologically.
Under the reactive policy, the electrolyzer receives power only in Mode 2, i.e., after the battery is fully charged (SoC ≥ SoCmax). In the studied system, hydrogen is a product that leaves the microgrid: there is no fuel cell, so energy converted into hydrogen cannot be returned to the load, whereas energy stored in the battery supplies the night-time load with a round-trip efficiency of ηcηd. As the microgrid has no grid connection, every kilowatt-hour diverted to the electrolyzer before the battery is full may later appear as unmet load, so that charging the battery first is the reliability-preserving choice. The MPC layer relaxes this rule in a controlled way: through the SoC target SoC*(t) (Section 3.2), it allows electrolysis below SoCmax when the forecast indicates that the remaining surplus will still be sufficient to fill the battery.
The MPD is the formal description of the sequential dispatch problem (state, action, transition, and reward) on which the policy is defined, not a model that is solved numerically without a trained learning agent. The reward is a lexicographic priority order, and the decision horizon is one step (γ = 0), so the optimal action at each state is the highest-priority feasible mode, which Equation (19) provides in closed form. The five operating modes follow those in [6]. A closed-form policy was selected over a learned one for three reasons. (i) The action for each fault condition is deterministic and traceable to an explicit rule, which is a prerequisite for attributing each fault outcome to local protection, to the EMS, or to neither. (ii) A trained policy would be a function of the training realizations, the reward weights and the learning hyperparameters, which would confound the comparison of the dispatch strategies and of the fault responses on identical realizations. (iii) The MPC layer, which is solved online at each update by means of linear programming, explicitly provides the look-ahead that a multi-step policy would provide, and thus does not require any offline training either. Therefore, the dispatch has no learning hyperparameters (learning rate, exploration rate, discount factor, network architecture, or number of training episodes), and there are no learning curves; the closed-loop performance of the policy is reported directly by the five-day metrics of Case Study 2. The only adjustable quantities are the SoC limits (SoCmin/SoCmax = 10%/90%) of the reactive policy, which defines the battery operating window, and the MPC settings on the horizon H = 72 (6 h) and the 15-min update period. The 6-h horizon covers the morning to midday when the battery must be pre-positioned before the surplus peak, and their roles are summarized in Table 2.

3.3. Fault-Tolerant Control Framework

The key methodological contribution of this work is to explicitly distinguish between two reaction mechanisms that are often conflated in the EMS literature: the fast, local hardware protection and the slower, communication-dependent supervisory response of EMS. It uses a two-layer structure with different response times and control methods. The first level, local protection, is activated on a millisecond time scale (about 3 ms) by physical devices such as fuses, circuit breakers, and converter current limiters. This layer relies solely on localized evaluations, without requiring a communication infrastructure, and manages the instantaneous interruption of current and the preservation of equipment integrity. The second level, the EMS supervisory response, operates on a considerably longer timescale of around 120 ms, accounting for communication lags and processing time [30]. This layer follows a linear progression: sensor data collection, transmission via a communication channel, assessment of EMS decision logic, and finally implementation of dispatch updates. Its major role is to recalibrate and redistribute power among the remaining functional assets after an event.
Both layers are represented with explicit timing. Local protection interrupts the fault at a time tprot, following its initiation, contingent upon the fault’s inherent duration:
t i n t = m i n t p r o t ,   t f a u l t , e n d .
The EMS, on the other hand, cannot function until it has received the sensor update via the communication channel and finalized its decision-making process computationally:
t d e t = t c o m m s + t p r o c ,
where t c o m m s is 100 ms (baseline) communication delay between the field sensors and the EMS and tproc = 20 ms is a constant processing/decision delay, so that the overall EMS detection-and-response time is tdet = 120 ms [5]. The injected faults are grouped according to their physical timescale. The electrical faults, i.e., the DC-bus short circuit (8 ms), the PV array fault (15 ms), and the battery-converter failure (12-ms initiating event), are represented with millisecond-scale durations, which are physically representative of these events and all shorter than tdet; for them, equipment safety must rest with the local protection layer, and the EMS can only act after detection. Sensor drift and electrolyzer overheating are physically slow phenomena: calibration drift develops over minutes to hours, and stack overheating builds up over the thermal time constant τth in Equation (17), typically minutes to tens of minutes. Therefore, these two faults are represented by millisecond-scale windows but are simulated on their physical timescales with the 5-min dispatch model described in Section 3.4.
The recovery of all impacted variables (PV output, battery power, electrolyzer power, bus voltage, load service) after a fault adheres to a first-order exponential relaxation toward the pre-fault baseline operating point, in accordance with the collective dynamics of the fundamental converter control loops as follows:
y t = y s s + y 0 − y s s   e − t / τ ,
where y(t) denotes any affected variable, y0 is its value at the instant the fault clears (start of recovery), yss is the steady-state value toward which it relaxes (the pre-fault operating point), and τ is the recovery time constant.
The time constant τ is scaled to the fault’s own duration. One exception exists: a malfunction in the battery-converter hardware does not self-heal within the ms timeframe of this analysis, resulting in the battery remaining isolated for the entire observed duration instead of recovering exponentially, with control authority shifting to a backup controller after a predetermined switchover delay of t d e t + 150 ms, the only fault type, among the five examined, that necessitates redundancy [23].
Finally, to evaluate the magnitude of the electrical fault stress in relation to the equipment ratings and the efficacy of the protection, the following ratio is used:
ρ I = I p e a k I r a t e d ,
where Ipeak is the peak battery current during the fault, and Irated = 375 A is the rated battery current (Section 2.3).

3.4. Fault Models on Slow Time Scales

Sensor drift and electrolyzer overheating develop over minutes to hours, i.e., four to five orders of magnitude more slowly than tdet, so they are simulated with the 5-min dispatch resolution rather than the millisecond transient time base. For these studies, an explicit DC-bus power balance is added to the dispatch: the EMS makes a decision based on what it measures or estimates while the battery converter, controlling the bus voltage, takes up the actual imbalance Pbat = Ppv,del − Pload − Pely within its power and SoC limits; any excess that it cannot take up is curtailed by PV-converter droop, and any deficit it cannot make up is first made up by electrolyzer droop, then load shedding. Each faulty run is paired with a healthy reference run, using the same realization and MPC SoC-target plan as in Case Study 2, so that all reported differences are due solely to the fault.

3.4.1. Irradiance-Sensor Drift

As the PV converter is not operating at its MPP, the EMS estimates the available PV power from the irradiance and temperature sensors using Equations (8) and (9). A calibration drift is modeled as a multiplicative bias that accumulates linearly over Tr and then remains until a recalibration [31]:
P ^ p v t = 1 + b t P p v t ,   b t = b m a x   m i n 1 ,   t − t 0 T r ,
with bmax = ±15% (±30% as a stress case), Tr = 3 h and a persistence of 48 h. Two EMS variants are compared: an EMS that keeps trusting the sensor and a fault-aware EMS that compares the estimate with the measured power Ppvconv of the PV-converter whenever the converter operates at its maximum power point (no curtailment command) and the array produces power more than 10% of its rating [31,32]:
r t = P ^ p v t − P p v c o n v t P p v c o n v t ,   fault   declared   if   r t > r t h   for   N p   consecutive   samples ,
with rth = 5% and Np = 3 (15 min). After detection, the drifting sensor is isolated, and the available power is re-estimated based on the converter’s measurement.

3.4.2. Electrolyzer Overheating

A coolant-loop degradation (e.g., a coolant-pump or heat-exchanger fault) is modeled by multiplying the thermal rise of Equation (18) by kcool for the duration of the fault [33,34]:
T s s t = T a m b t + 30   k c o o l t   P e l y t P r a t e d e l y + 5 ,
where kcool = 2 for 6 h, after which the cooling is repaired. The temperature of the stack follows Equation (17) with τth = 0.5 h. The local over-temperature protection trips the electrolyzer at 80 °C and automatically re-arms it when Tstack has cooled to 60 °C, independent of the EMS. The fault-aware EMS detects the abnormal heating by comparing the measured stack temperature with the healthy thermal model prediction (residual above 3 °C for two consecutive samples), estimates the degraded thermal gain from the measured response, and derates the electrolyzer so that the predicted steady-state temperature stays at Tlim = 75 °C [31]:
P e l y m a x t = P r a t e d e l y   T l i m − T a m b t − 5 30   k ^ c o o l ,   k ^ c o o l = T s t a c k + τ t h   T ˙ s t a c k − T a m b − 5 30   P e l y / P r a t e d e l y .
The surplus freed by derating is allocated according to the normal dispatch hierarchy of Equation (19), i.e., to the battery if SoC < SoCmax and otherwise curtailed. All parameters for slow faults are given in Table A1.
PEM electrolyzers are subject to several fault and degradation mechanisms that can be classified into two types according to the time horizon [35,36]. The first type develops over long-life operating hours [35], including (i) membrane thinning and pinhole formation, which increase gas crossover; (ii) catalyst dissolution and agglomeration; (iii) passivation of the titanium porous transport layers and bipolar plates, which increases the ohmic resistance; (iv) ionic contamination of the feed water. These mechanisms develop over hundreds to thousands of operating hours [35], far beyond the five-day horizon investigated in this work. At the system level, they manifest as a gradual decrease in the overall efficiency ηF in Equation (15), which proportionally reduces the hydrogen yield while leaving the dispatch unchanged, thereby affecting neither the dispatch decisions nor the load service. When they become severe (e.g., when the hydrogen-in-oxygen concentration exceeds its safety limit), a local safety interlock shuts the stack down, which, at the EMS level, is equivalent to an electrolyzer trip (Pely = 0), much like a power-supply fault. The consequence of such a trip follows directly from the dispatch hierarchy of Equation (19): because the electrolyzer receives only surplus power, the freed surplus is sent to the battery or curtailed, and the load is never affected; this outcome is the protection-only trip already contained in Case Study 7. The second type comprises (i) failure or degradation of the cooling and water-circulation loop and (ii) faults of the stack power supply, which may develop within a few hours. The cooling-loop degradation was therefore selected for detailed simulation because it is the only mechanism that (a) evolves on a timescale resolved by the 5-min dispatch model, (b) is observable from a measurement available to the EMS (the stack temperature), and (c) admits a corrective EMS action (derating) that changes the outcome relative to local protection alone. Moreover, temperature is a major driver of membrane degradation [36], so avoiding thermal cycling also limits the degradation mechanism. The PEM fault mechanisms and classifications are outlined in the Appendix A, Table A2.

4. Results and Discussion

The results are divided into nine different case studies. Two are concerned with healthy operation, the other 7 with fault scenarios. The probabilistic weather and load variables utilized in all the following analyses are defined in Case Study 1. Case Study 2 compares the reactive and MPC-enhanced dispatch methods under healthy conditions for the full five-day timeframe. Case Studies 3–5 investigate the three electrical faults with millisecond resolution, and Case Studies 6–7 the two slow faults on their physical timescales. In Case Study 8, we summarize the fault outcomes in a comparison study across the faults. In Case Study 9, we explore the responsiveness of fault diagnosis and treatment to communication latency. The system settings are provided in the Appendix A.

4.1. Scenario Inputs and Logical Flow

Each simulation run is determined by a scenario, i.e., the inputs listed in Table 3: (i) the weather-and-load realization (sky condition of each day and the random seed of the cloud, temperature-noise and load processes of Section 2.1.1 and Section 2.1.2), which is generated once and re-used unchanged in all runs; (ii) the dispatch strategy (reactive MDP-structured policy or MPC-enhanced policy, Section 3); (iii) the fault type and its parameters (injection day and time, magnitude and duration); (iv) the protection and communication timing (tprot, tcomms, and tproc). All runs follow the same logical flow: 1. Generate the weather-and-load realization; 2. Simulate the healthy 5-day dispatch at 5-min resolution; 3. Inject the fault at the specified instant, i.e., into the corresponding operating point of the healthy trajectory; 4. Solve the electrical faults on a millisecond time base with the local protection and EMS timing of Section 3.3, and the slow faults on a 5-min time base of Section 3.4; 5. Compare each faulty run with its healthy reference using the metrics of Section 3.3 (peak-current ratio, redirected power, detection and recovery times, unmet energy, and hydrogen production). The injection instant varies across all operating points in Section 4.12 to assess the representativeness of the single-instant scenarios in Table 3.
Table 3. Fault-scenario inputs of Case Studies 3–9 (common to all runs: tprot = 3 ms, tcomms = 100 ms, tproc = 20 ms, i.e., tdet = 120 ms; Rint = 0.1 Ω).

4.2. Input Data Sets and Model Assumptions

All input time series were generated by the generative models in Section 2.1, so that each uncertainty source can be managed separately and each defect result can be assigned to a known background state. Thus, the fundamental data for the study are the generator settings in Table 4 and the random seed for the realization. The 5-day data set (1440 samples at 5-min resolution) comprises the following: (i) the irradiance profile G(t) (Figure 2a), i.e., a clear-sky envelope with Gpeak = 1000 W/m2, sunrise at 06:00 and sunset at ≈18:30, with Poisson-distributed cloud events on the partly cloudy Days 2–3 and continuous attenuation + cloud events on the overcast Day 5 (peak ≈ 450 W/m2); (ii) the ambient-temperature profile Tamb(t) (Figure 2b), with a daily mean of ≈24 °C, amplitude of ≈10 °C and peak at ≈15:00, representative of a hot, high-irradiance climate; (iii) the available PV power Ppv(t) derived from G(t) and Tamb(t) through Equations (8) and (9) (Figure 3; the peak is 156.8 kW for the 188.5-kW array and 5213 kWh over five days); (iv) the load profile Pload(t) (Figure 4), i.e., the 30-kW critical load and an eight-state deferrable load of 0–20 kW generated by the Markov chain of Equations (4)–(7), with a 4767 kWh demand for 5 days.
Table 4. Assumptions and parameter values of the models.
Figure 2. Synthetic environmental condition profiles for 5 days. (a) Solar irradiance; (b) ambient temperature.
Figure 3. PV array available power (5 days).
Figure 4. Base, deferrable, and total load (5 days).
Table 4 summarizes the main assumptions and parameter values for all models in Section 2 and the controllers in Section 3.

4.3. Case Study 1: Stochastic Weather and Load Characterization

In this scenario, five days with different sky conditions are considered: Day 1 (clear), Days 2–3 (partly cloudy), Day 4 (clear), and Day 5 (overcast), according to (1–3), and the deferrable load according to (4–7). Figure 2a shows the sine envelope for five days under clear-sky conditions. Figure 2b shows the corresponding daily temperature fluctuation. The maximum attainable PV output on clear days is about 156 kW (rated capacity of 188.5 kW; the difference is due to thermal derating at peak temperature around midday), and it drops to about 78 kW on an overcast day, as given in Figure 3, according to the irradiance profile in Figure 2a. In Figure 4, the total load fluctuates stochastically between the 30 kW critical floor and the 50 kW ceiling as dictated by the eight-state deferrable-load Markov chain in Figure 5.
Figure 5. Deferrable-load Markov-chain state trajectory.
It is worth noting that the load trajectories in Figure 4 and Figure 5 do not remain the same from day to day. This is deliberate: the deferrable load is a sample path of the continuous-time Markov chain of Equations (5)–(7), so that only its statistical law (the transition rates and their time-of-day and weekday/weekend modulation) repeats every day, whereas the realized sequence of states varies from one day to the next, as in real consumption, where the use of appliances varies from day to day. A deterministic repeating profile would mask precisely the demand uncertainty the EMS has to deal with.
In this work, Pbase = 30 kW is the critical (non-deferrable) load, and Pdef(θ) is the deferrable power associated with state θ, which spans 0–20 kW in steps of about 3 kW, so that the total load moves between 30 and 50 kW as depicted in Figure 4. The choice r = 8 is a modeling compromise: it resolves the deferrable demand at roughly the size of one large appliance block (≈3 kW) while keeping the rate matrix low (r(r − 1) = 56 off-diagonal rates) and each state visited often enough within a five-day horizon to produce realistic dwell-and-switch behavior. A coarser chain would produce unrealistically large load steps, whereas a finer chain would add states without changing the 30–50 kW envelope that governs the dispatch; r is therefore a resolution parameter of the load generator rather than a physical constant.
The state trajectory of the deferrable-load Markov chain (Figure 5) shows the qualitative behavior we desire: steady dwelling near low states during off-peak hours, punctuated by rapid, high-frequency switching during the modeled morning (7–9 h) and evening (18–22 h) peak-activity windows, as per the threefold transition-rate multiplier of (7). This demonstrates that the stochastic input generation represents the desired clear/partly cloudy/overcast weather signature and the realistic diurnal load volatility used in the other case studies.
The primary finding of Case Study 1 can be articulated as: the stochastic generator generates three distinct atmospheric conditions (clear-day PV peak ≈ 156 kW, overcast ≈ 78 kW) alongside a load ranging from 30–50 kW, characterized by increased volatility during peak morning and evening hours; this singular instance forms the common framework for all subsequent case studies.

4.4. Case Study 2: Reactive MDP Against MPC-Enhanced Dispatch

This case study compares the MPC-enhanced dispatch and the reactive MDP-structured dispatch under healthy operating conditions. The MPC-enhanced results offer an idealized predictive-control benchmark rather than the performance attainable with realistic forecasts, as they were obtained using the perturbed-oracle forecasts in Section 3.2.1. Both dispatch techniques are executed on the same five-day weather/load realization as in Case Study 1, thereby isolating the effect of the predictive MPC layer from confounding variations in input conditions.
Since the reactive policy is in closed form and the MPC is solved online (Section 3.2.3), neither layer has a training phase, and no learning curves are available. Figure 6 illustrates that both techniques exhibit a distinct daily charge/discharge cycle, with a SoC_max ceiling of 90% on Days 1 and 4 and a SoC_min floor of 10% overnight. On Day 2, a stark qualitative difference is observed: the reactive controller surges to the 90% ceiling, whereas the MPC-enhanced controller peaks close to 82%, then starts to discharge again, providing direct evidence of the MPC layer intentionally withholding full charging so that it can send the excess to the electrolyzer after it hits its target trajectory.
Figure 6. Battery SoC, reactive vs. MPC-enhanced dispatch.
The fundamental resource allocation trade-off will be elaborated through Figure 7 and Figure 8. The reactive method always shows higher peak battery charging power (120–126 kW versus nearly 100 kW for MPC) and only engages the electrolyzer in brief, narrow windows immediately after battery-full events (Mode 2 is triggered only once SoC saturates). In comparison, the MPC-improved scheme switches on the electrolyzer earlier and for much longer periods each day, including prolonged operation on the volatile partly cloudy Days 2–3, where the reactive controller hardly switches the electrolyzer on. This earlier and more sustained electrolyzer operation directly translates to hydrogen yield, with cumulative production under MPC-enhanced dispatch with idealized forecasts with cumulative production under MPC-enhanced dispatch (14.76 kg over five days) more than double that of the reactive baseline (6.48 kg), with the gap widening monotonically from the first charging cycle onward rather than emerging only under any single favorable day (Figure 9).
Figure 7. Battery power command (+Charge/−Discharge).
Figure 8. Electrolyzer power command.
Figure 9. Cumulative hydrogen production.
The operating-mode traces corroborate this pattern at the mode level: both controllers cycle through the same five modes in the same broad daily sequence (Mode 1 charging through the morning, Mode 5/3/4 discharge patterns overnight), but the MPC trace spends visibly more time in Mode 2 (electrolyzer) during the mid-day surplus window, as given in Figure 10, consistent with Figure 8 and Figure 9.
Figure 10. EMS operating modes.
It is also worth noting that the five-mode policy of Equation (19) jumps the electrolyzer set-point directly from the instantaneous surplus without ramp-rate limits, minimum on/off times, or hysteresis. This is especially observable on the partly cloudy Days 2–3 and the overcast Day 5, where the MPC-improved controller leads to frequent power changes and short on/off cycles, as shown in Figure 8. PEM electrolyzers are more tolerant of dynamic operation than alkaline units, but repeated start-stop cycling with idle periods and rapid load variations causes irreversible degradation of the membrane and catalyst, thereby shortening stack lifetime [37,38]. The hydrogen yields reported here thus do not include a degradation cost. The dispatch can be degradation-aware without changing the dispatch structure by (i) adding a hysteresis band on the surplus threshold that triggers Mode 2, (ii) imposing minimum on and off times, (iii) adding a ramp-rate constraint on Pely to the LP of Equations (20)–(23), and (iv) penalizing on/off cycles in the objective; these extensions, which trade some of the hydrogen yield for stack lifetime, are identified as future work.
For the reactive power control, PV curtailment events are concentrated around midday on Days 1 and 4 (peaking near 100 kW on Days 1 and 4), as shown in Figure 11. Whereas the MPC-enhanced controller shows curtailment only on Days 1 and 4, and curtailment on the partly cloudy Days 2 and 3 is reduced to zero. The LP’s anticipatory battery-versus-electrolyzer allocation evidently keeps pace with the more volatile, harder-to-react-to surplus on those two days more effectively than the purely reactive logic.
Figure 11. PV power curtailment—reactive vs. MPC-enhanced.
Figure 12 reveals the principal trade-off of this study and is presented without simplification: the MPC-enhanced controller imposes a greater load-scheduling burden than the reactive controller. Measured in energy metrics (Figure 12b and Table 5), the reactive controller fails to meet 760.9 kWh of demand over the five-day period (16.0% of the 4767-kWh demand), predominantly during the night when the battery attains SoCmin, while the MPC-enhanced controller sheds the same amount of energy during those intervals but additionally sheds 90.2 kWh, totaling 851.2 kWh (17.9% of demand, an increase of 11.9%). The surplus unmet energy is concentrated in two intervals: Day 3 (2.15–2.32 d, +42.4 kWh) and cloudy Day 5 (4.38–4.73 d, +47.9 kWh), resulting in an increase in shedding episodes from 10 to 14 and an extension of their cumulative duration from 23.2 h to 28.1 h. In Figure 12a, the reactive trace was positioned beneath the MPC trace, leading to the misrepresentation of shedding episodes as exclusive to the MPC controller.
Figure 12. Unmet (shed) load—reactive vs. MPC-enhanced. (a) Shed power (redrawn so that both controllers remain visible; orange: additional shedding caused by the MPC layer); (b) daily unmet energy.
Table 5. Five-day cumulative performance comparison (single stochastic realization; the MPC-enhanced results are obtained with perturbed-oracle forecasts and represent an idealized benchmark).
This is a direct and logical consequence of the SoC behavior in Figure 6: because the MPC layer deliberately holds SoC lower on average (trading reserve for electrolyzer throughput), it more frequently lacks the buffer needed to ride through a subsequent load spike without shedding. MPC-enhanced dispatch is therefore not a strict improvement over the reactive baseline; it is a genuine efficiency-reliability trade-off.
The cost of the MPC layer is therefore 90.2 kWh of unmet demand per additional 8.28 kg of hydrogen (≈276 kWh on a lower-heating-value basis) and 456 kWh of prevented curtailment, or 10.9 kWh of unmet energy per additional kilogram of hydrogen. The acceptability of this exchange depends on the value the operator attaches to unserved critical and deferrable demand relative to hydrogen; the unmet energy, along with efficiency metrics, is given in Table 5.
The daily power balance and overall metrics are given in Figure 13, Figure 14 and Figure 15. They show the daily operation of the MPC-enhanced controller under the three different sky conditions. Day 1 is a clear day (Figure 13), and the pattern is exemplary: PV ramps smoothly to its peak of 156 kW, the battery charges from 06:00 to 13:00 and then switches to discharge, and the electrolyzer retains a steady plateau near its 25 kW rating for about 10 h. Day 3, partly cloudy (Figure 14), shows the battery and electrolyzer following PV’s quick swings, with similarly volatile power orders. The controller reacts to the rapidly shifting surplus rather than providing a smooth or average response. Day 5 (Figure 15) is overcast and fundamentally resource constrained. PV rarely exceeds 80 kW; the battery is driven to deep discharge (−48 kW) in the pre-dawn hours, trying to cover the load from an already depleted state; the electrolyzer operates only in brief bursts that coincide with the few PV peaks of the day.
Figure 13. Power balance—Day 1 (Clear Sky, MPC).
Figure 14. Power balance—Day 3 (Partly Cloudy, MPC).
Figure 15. Power balance—Day 5 (Overcast, MPC).
The SoC histogram in Figure 16a quantifies the SoC preservation trade-off outlined above for the whole five-day sample population. The MPC-enhanced controller samples more at the SoC_min = 10% floor (about 450 of 1440 5-min samples compared to about 378 for the reactive controller), and correspondingly less at the SoC_max = 90% ceiling (about 141 vs. about 267). This is the same phenomenon observed in Figure 6 and is the direct statistical signature behind the increased load-shedding exposure shown in Figure 12.
Figure 16. Performance comparison. (a) Battery SoC distribution (5-Day Simulation); (b) key performance metrics.
Figure 16b summarizes the entire daily PV generation in terms of battery charge, electrolyzer consumption, and curtailment for the dispatch enhancement by MPC in Case Study 2. Days 1 and 4 have the highest energy production (~1300 kWh each) and are also the only days with significant curtailment (the combined battery and electrolyzer cannot absorb the full noon peak). The partly cloudy Days 2–3 yield less total energy (~1115–1120 kWh) but show zero curtailment, confirming the anticipatory allocation in Figure 11; the overcast Day 5 produces only ~380 kWh, mostly absorbed by battery charging, with no significant curtailment or electrolyzer contribution. It is a day of scarce resources rather than of dispatch constraint.
The MPC-augmented dispatch enhances PV utilization (+9%), more than doubles hydrogen yield, and decreases curtailment by around 55% relative to reactive-only dispatch, driven by earlier and more continuous electrolyzer engagement. However, this efficiency improvement comes at a cost, since the MPC layer’s tendency to operate at a lower average SoC (Figure 6 and Figure 16a) substantially increases vulnerability to load-shedding events (Figure 13), indicating a real trade-off rather than continuous improvement. Neither solution can overcome the lack of resources on an overcast day (Figure 12); predictive dispatch improves the distribution of limited resources, not their total availability.
These figures refer to the single realization analyzed and to perturbed-oracle forecasts. They therefore represent an idealized predictive-control comparison, i.e., an optimistic, realization-specific upper bound on the benefit of predictive dispatch, and not evidence of the performance achievable with realistic, causal forecasts, with which both the efficiency gains and the additional unmet energy may differ. Under these forecasts, the MPC-enhanced dispatch raises PV utilization from 84% to ≈93%, increases hydrogen production from 6.48 kg to 14.76 kg, and reduces curtailment by 55%, but lowers the mean SoC from 43.9% to 39.8% and increases the unmet energy from 760.9 kWh to 851.2 kWh (+11.9%).

4.5. Case Study 3: DC Bus Short-Circuit Fault (Day 2)

Case Studies 3–9 (Figure 17, Figure 18, Figure 19, Figure 20, Figure 21, Figure 22, Figure 23, Figure 24 and Figure 25) add three contributions that cannot be obtained from the healthy-operation analysis. First, they resolve the millisecond-scale electrical transients (bus voltage, battery current, battery and electrolyzer power, and load service) that the 5-min dispatch simulation cannot capture, thereby revealing overcurrent stresses such as the 10.7-times-rated battery current during the DC-bus short circuit. Second, by recording the local-protection action and the EMS detection instant on the same time axis, they attribute each part of the fault response to the layer that actually produces it, showing for which fault types the EMS can intervene and for which it cannot. Third, the cross-fault comparison (Figure 22, Figure 23 and Figure 24) and the communication-delay sweep (Figure 25) turn these individual observations into design information: which faults require dedicated protection, which require sustained EMS compensation, and how communication quality affects detection but not protection-driven recovery. Each fault is injected once, at a deliberately chosen operating point, so these case studies are illustrative demonstrations of mechanisms rather than statistical characterizations of fault impact. In these case studies, the fault currents and the EMS detection time are analytical results (Equations (14) and (26)), whereas the 3 ms interruption and the subsequent recovery are simulated consequences of the assumed protection operating time and the recovery model in Equation (27).
Figure 17. Fault transient, Day 2, DC bus short (8.0 ms). (a) Bus voltage, (b) battery current, (c) battery power, and (d) load.
Figure 18. Fault transient—Day 3, PV array fault (15.0 ms). (a) Bus voltage, (b) battery current, (c) battery power, and (d) load.
Figure 19. Fault transient—Day 4, battery converter fail (12.0 ms). (a) Bus voltage, (b) battery current, (c) battery power, and (d) load.
Figure 20. Irradiance-sensor drift on its physical timescale (onset Day 1 at 06:00, +15% reached after 3 h, persisting 48 h; shaded): (a) bias and EMS detection instant; (b) true available PV power and EMS estimate; (c) electrolyzer power; (d) deviation of battery and electrolyzer power from the healthy reference.
Figure 21. Electrolyzer overheating caused by a cooling-loop degradation (kcool = 2, Day 1, 10:00–16:00, shaded) on the thermal timescale: (a) stack temperature (dotted vertical line: EMS detection); (b) electrolyzer power; (c) battery power; (d) PV curtailment, for healthy cooling, local over-temperature protection only, and the fault-aware EMS.
Figure 22. Peak battery current per fault—effect of protection/EMS action (three electrical faults).
Figure 23. EMS/protection power redirection per fault (three electrical faults).
Figure 24. Fault detection and recovery time summary (logarithmic time axis; slow faults detected by residual monitoring).
Figure 25. Impact of communication delay on detection and recovery.
The first fault scenario (DC bus short circuit) is simulated by dropping the DC bus voltage magnitude on Day 2 at a background operating point selected (by inspection of the dispatch trajectory) to coincide with active overnight battery discharge, in order that the effect of the fault on a genuinely engaged battery can be observed. The bus voltage dropped by 85% to 0.15 pu for 8.0 ms. The PV output and served load during the fault are modeled as scaling by this same voltage-drop fraction, a simplified constant-fraction representation adopted for system-level tractability rather than a full constant-impedance or constant-power load model; the battery-current result below, which is this fault’s primary electrical consequence, does not depend on this simplification. The background operational conditions at the time of injection were: The PV generation is 0 kW (night), the load demand is ≈48 kW, the battery is draining ≈48 kW to supply the load, and the electrolyzer is idle (0 kW), as indicated by the pre- and post-fault figures in Figure 17c,d. The local protection operated within 3.0 ms, and the EMS required 120 ms to detect the fault.
During this fault event, battery current is the primary outcome. The uncontrolled (unprotected) trace reaches a constant 4000 A throughout the fault duration, which is 10.7 times the 375 A rated discharge current (Figure 17). The protected trace is identical to the uncontrolled trace for the first 3.0 ms, then drops to zero. The local protection interrupts the fault path, well before the fault itself naturally clears at 8 ms, and dramatically before the 120 ms it would take the EMS to even detect the event via its communication channel. The primary controller remains engaged throughout this fault, which is resolved entirely by local protection, with no EMS participation. This is the single most electrically severe of the five fault types studied, and the only one in which the EMS’s communication-limited response is fundamentally too slow to be relevant to the immediate hazard.
The uncontrolled and protected battery current profiles (Figure 17b) are identical up to the protection instant at 3 ms. Both current traces peak at 4 kA, as in both cases the fault current is governed by Equation (14). At fault inception, or at recovery, no oscillation is present, since Equation (14) is purely resistive, first order, and neglects the cable and busbar inductance and the DC-link capacitance, and since recovery follows the first-order relaxation of Equation (27). The dependence of these values on Rint is discussed, and the dependence of the fault outcome on the injection instant is analyzed in Section 4.12.
The principal outcome of this case indicates that the DC-bus short circuit propels the battery current to 4000 A (10.7 times the rated value, as derived from Equation (14)); during the simulation, the estimated 3-ms local protection interrupts this current approximately 40 times more swiftly than the EMS can identify the occurrence, rendering the EMS ineffective in mitigating this fault.

4.6. Case Study 4: PV Array Fault

The fault in this case is within the PV array, with a 60% output loss lasting 15.0 ms. The background operating conditions were PV at 41.0 kW, load at 33.0 kW, battery at 8.0 kW, and electrolyzer at 0.0 kW, with an EMS detection time of 120 ms. This PV simulated power drop was simulated on Day 3 at 07:00, deliberately chosen at a morning operating point where PV is only marginally above load (rather than the large midday surplus typical of most hours), so that a proportional PV loss produces a genuine load-relevant deficit rather than merely reducing an already large surplus.
The PV output drops from approximately 46 kW to approximately 18–20 kW for the 15 ms fault duration. This will result in a load-relevant shortfall of approximately 26.4 kW (load exceeding available PV), since only the portion of the lost PV needed to serve the load matters for service continuity. Because the fault duration (15 ms) is again shorter than the 120 ms EMS detection latency, no real-time battery compensation occurs during the fault itself. The battery current remains at 0 A throughout, and the shortfall is briefly and fully exposed as unmet load, visible as a dip in the load service panel from approximately 39 kW to approximately 20 kW (Figure 18). By the time EMS detection would have completed, local recovery had already restored PV output on its own, so no compensating action was needed or taken by the time the EMS could, in principle, have responded; the entire event resolved locally before the supervisory layer became relevant. When the identical fault is introduced at each daylight operational point (Section 4.12), a load-related deficiency occurs in 60.2% of cases, averaging 13.1 kW and peaking at 29.9 kW; thus, the 26.4 kW observed in this scenario is at the 95th percentile, representing a near-worst-case situation.

4.7. Case Study 5: Battery Converter Hardware Failure

A battery-converter hardware failure occurred on Day 4 near midnight, at the time of peak overnight discharge, so that the loss of a battery actively serving the load could be observed directly. The initiating event lasts 12.0 ms, after which the battery remains isolated. At injection, the 42.0-kW load was supplied by battery discharge and the electrolyzer was idle (0 kW). The EMS detects the failure after 120 ms, and the backup controller takes over at tdet + 150 ms.
Unlike the two preceding fault types, a converter hardware failure does not self-heal, so the battery current and power are forced to zero for the remainder of the observed window, not merely for the nominal 12 ms fault duration. This is the most consequential finding of the fault-transient case studies. At this specific, deliberately chosen background operating point, the electrolyzer was also already idle (0 kW); it was overnight, when there is no PV surplus to justify hydrogen production, so the EMS’s sole modeled redirection mechanism (curtailing the electrolyzer to free capacity for the load) had nothing available to redirect. The full 42.0 kW deficit therefore persisted as unmet load beyond EMS detection, with no compensating action possible within the current architecture. Section 4.12 demonstrates that this result is not limited to the selected moment: when injected at all 1440 operational points, the failure results in a lasting shortfall at 39.3% of them (average 36.8 kW, peak 50 kW; the 42 kW of this case is at the 66th percentile), and electrolyzer curtailment fails to mitigate it at any of these points.
Among the five fault types studied, the battery converter failure is the only one that triggers backup-controller failover, consistent with its hardware-based, non-self-clearing nature; the primary/backup state machine executes a single transition at the fixed switchover time and does not revert within the monitored period.

4.8. Case Study 6: Sensor Drift Fault (Physical Timescale)

In this case, the sensor drift is modeled on its physical timescale. The bias begins on Day 1 at 06:00, peaks at +15% after 3 h, and persists for 48 h (Figure 20a). The EMS overestimates the available PV power by up to 23.5 kW at noon without detection (Figure 20b), with an integrated estimation error of 352 kWh. The physical consequences are, however, low, since the PV converter tracks its MPP when no curtailment is commanded, and the battery converter regulates the DC bus: the estimation error is absorbed by the battery and does not translate into equal power-flow error. Drift matters only if it changes a dispatch decision, i.e., around sunset and during cloud transients, where Ppv ≈ Pload (18 affected samples). In these moments, the EMS keeps the electrolyzer running on a surplus that does not exist, which is then supplied by the battery (Figure 20c,d): 10.8 kWh of electrolysis is fed from battery discharge, the unmet load increases by 0.39 kWh, the curtailment by 2.2 kWh, and the hydrogen production decreases by 0.043 kg.
A negative drift (−15%) acts in the opposite direction: the EMS underestimates the surplus, reducing 7.9 kWh more and generating 0.45 kg less hydrogen, while the unmet load drops to 20.7 kWh as the energy that would have been fed to the electrolyzer stays in the battery; at ±30% the same mechanisms are scaled up (−1.05 kg of hydrogen and −40.1 kWh of unmet load for −30%). In this DC-coupled architecture, sensor drift is a misallocation fault rather than a reliability fault. The fault-aware EMS detects the +15% drift 1.17 h after onset, when the bias has reached 5.8%; thereafter, the trajectories coincide with the healthy case (no change in unmet load and hydrogen change below 0.001 kg). Unlike electrical faults, this fault is to be handled by the EMS rather than by local protection. The detection time of this fault is not limited by the 120 ms communication delay but by the observability (daylight and MPP operation).

4.9. Case Study 7: Electrolyzer Overheat Fault (Cooling Degradation, Thermal Timescale)

In this case study, electrolyzer overheating is modeled on its physical timescale rather than a millisecond-scale forced shutdown. Case Study 7 is a cooling-loop degradation (kcool = 2) that starts on Day 1 at 10:00, while the electrolyzer runs at its 25-kW rating on PV surplus, and lasts 6 h until the cooling is repaired. The stack temperature no longer stabilizes at 60–69 °C but converges toward an equilibrium value above 90 °C, with a thermal time constant τth = 0.5 h (Figure 21a).
With local protection alone, the stack reaches the 80 °C threshold 25 min after onset and, because the cooling fault persists, the protection trips and re-arms eight times in 6 h: the electrolyzer cycles between 0 and 25 kW (mean 14.6 kW), the stack temperature oscillates between ≈57 °C and 83 °C, and the hydrogen production falls by 1.04 kg (−7.0%). The freed surplus first charges the battery and, once the battery is full, is curtailed (+70.8 kWh). The fault-aware EMS detects the abnormal heating 10 min after onset, before the first trip, derates the electrolyzer to 14.7–17.7 kW (mean 16.1 kW) and holds the stack at 75 °C, so that trip cycling is avoided completely (one on/off cycle instead of eight); the hydrogen loss is reduced to 0.78 kg and the additional curtailment to 53.1 kWh. In both cases, the load is fully supplied, as predicted by the dispatch hierarchy. For this slow fault, the EMS, rather than local protection, determines the outcome: protection guarantees stack safety but, acting alone, converts a cooling degradation into repeated thermal and start-stop cycling, precisely the operating pattern that accelerates PEM degradation [37,38].
The results of this case study belong to different categories (Section 3.3). Analytically, Equation (31) predicts that a cooling degradation with kcool = 2 raises the steady-state stack temperature at rated power to Tamb + 65 °C, i.e., to ≈92–99 °C for the ambient temperatures between 10:00 and 16:00, which is above the 80 °C trip threshold; that the time needed to reach the threshold from the healthy operating temperature T0 is t = τth·ln[(Tss − T0)/(Tss − 80 °C)] ≈ 25–29 min; the derating of Equation (32) limits the stack power to 25·(70 °C − Tamb)/60 kW, i.e., ≈15–18 kW for ambient temperatures of 27–34 °C. The simulated responses agree with these predictions (first trip after 25 min and a derated power of 14.7–17.7 kW, with small differences arising from the estimated gain and temperature noise), thereby verifying the implementation of the thermal model and the protection logic. In contrast, the number of trip cycles, the hydrogen losses, and the additional curtailment are simulated outcomes that depend on the assumed lumped parameters (the 30 °C rise and 5-°C offset of Equation (18), τth = 0.5 h, kcool = 2, and the 80/60 °C trip/re-arm thresholds). The model-independent conclusion is that a cooling fault raises Tss above the trip threshold; protection acting alone produces repeated trip cycling, whereas a model-based derating that keeps Tss below the threshold avoids it.
The cooling degradation never affects the load; in the simulation, local protection alone causes eight trip cycles and a 1.04 kg hydrogen loss, whereas the fault-aware EMS avoids all trips and reduces the loss to 0.78 kg.

4.10. Case Study 8: Cross-Fault Comparative Analysis

This case study synthesizes the fault results of Case Studies 3–7 into a direct, comparative analysis using the peak-current ratio of (28) and the power-redirection and recovery-time metrics defined in Section 3.3. Figure 22 confirms that the DC bus short circuit (Case Study 3) is, by a significant margin, the most electrically severe fault type, with 4000 A peak current vastly exceeding the battery-converter failure’s 105–125 A (0.3× rated). The PV array fault produces no battery current. For each fault, the uncontrolled and protected bars have equal height, a reminder that protection limits exposure duration rather than peak magnitude, since the peak necessarily occurs before any protective action is implemented.
Figure 23 shows that only the DC-bus-short fault exhibits non-zero power redirection (approximately 48 kW, representing the battery’s pre-fault contribution withdrawn from the bus). On the other hand, the other two electrical faults show zero redirected power in this analysis. This is not because the underlying redirection mechanism is unused in general (under healthy conditions), but because, as documented individually in Case Studies 4 and 5, each of those fault occurrences aligned with either a self-clearing event faster than EMS detection or an already-idle affected asset.
Figure 24 (logarithmic time axis) shows that the EMS detection time is constant at 120 ms for the three electrical faults, as it solely relies on the fixed communication and processing delays of Equation (26), while the slow faults are detected by residual monitoring after 10 min (cooling degradation) and 1.17 h (sensor drift), i.e., on the timescale of the fault itself. However, the recovery times are very different: about 19 ms for the DC bus short, about 33–34 ms for the PV array fault, and N/A for the battery-converter failure that does not self-clear. This is consistent with the individual observations that either these events did not lead to any measurable service deviation, or, in the case of battery-converter failure, they did not recover in the observed time frame. Ranked by peak battery current, the electrical faults range from 4000 A (bus short) through 105 A (battery-converter failure) to 0 A (PV array fault).
The EMS detection time remains constant at 120 ms irrespective of fault type, while recovery time is highly fault-type- and operating-point-dependent, ranging from nearly instantaneous to indefinite. The overall cross-fault comparison underscores the central architectural finding of this paper: for faults on the order of tens of milliseconds, protection and recovery are governed overwhelmingly by local, non-communication-dependent mechanisms, with the EMS’s involvement limited to post-fault scenarios. For slow faults, the relationship is inverted: local protection still ensures equipment safety, but the outcome is determined by the EMS.

4.11. Case Study 9: Communication-Delay Sensitivity Analysis

This case study employs the DC-bus-short fault from Case Study 3 as a typical test scenario. The EMS communication delay tcomms in (26) varies from 0 to 0.8 s, while all other parameters remain fixed. This delineates the effect of communication infrastructure quality on fault detection and recovery. Detection time increases linearly with communication delays, exactly as predicted by (26).
It rises from approximately 20 ms with no communication delay to approximately 0.82 s with a 0.8 s comms delay. The recovery time, in contrast, is almost constant at 19–20 ms over the complete range. This is a direct and important consequence of the two-timescale architecture in Section 3.3, as shown in Figure 25. For this fault, the remedial action is local fault-path isolation, which does not depend on EMS detection. Consequently, the physical recovery time for this fault mechanism is almost independent of the communication network’s quality and latency.
For faults whose mitigation depends on EMS action, such as a persistent battery-converter failure, a comparable analysis would be expected to show a recovery time that grows with the communication latency. Three findings emerge. First, for fast, locally contained faults such as a DC-bus short circuit, the quality of the communication network has little effect on the physical recovery time, but it directly and proportionally determines how quickly the EMS recognizes the event. Second, this decoupling supports the two-timescale design principle of this paper: safety-critical responses must not rely on the performance of the communication network. Third, the finding is specific to the fault type: faults whose compensation relies explicitly on detection are expected to be considerably more sensitive to communication delays.
Table 6 combines Case Studies 2–9 into a single summary organized by the control parameters that govern each outcome, the layer that determines it, and the resulting role of the EMS (Case Study 8 is the cross-fault comparison of Case Studies 3–7).
Table 6. Summary of Case Studies 2–9 organized by the governing control parameters.

4.12. Sensitivity of the Fault Results to Rint and to the Fault-Injection Instant

The short-circuit results are based on the illustrative base value Rint = 0.1 Ω in Equation (14). Table 7 and Figure 26 show the DC-bus short circuit of Case Study 3 at the same operating point for Rint = 0.05–0.3 Ω. This range covers different cell chemistries, string configurations, interconnects, and temperatures of a 500 kWh, 400 V pack. The fault current decreases from 8000 A to 1333 A, i.e., ρI (ratio between short-circuit and rated currents) from 21.3 to 3.6 (Figure 26b). For the protection timing evaluation, the let-through energy of the reference design (Rint = 0.1 Ω cleared in 3 ms, I2t = 48 kA2s) is considered as the withstand budget of the protected components, which yields the longest allowable protection operating time.
I 2 t = I s c 2   t p r o t ,   t p r o t , m a x = t p r o t , r e f R i n t R r e f 2 .
Table 7. Sensitivity of the DC-bus short circuit (Case Study 3) to the battery internal-plus-interconnect resistance Rint (fault duration 8 ms, local protection 3 ms, tdet = 120 ms).
Figure 26. Sensitivity of the DC-bus short circuit to Rint: (a) protected (solid) and unprotected (dotted) battery current; (b) over-current ratio ρI; (c) longest admissible protection time for the I2t budget of the reference design, compared with the 3-ms protection and the 120-ms EMS detection time.
Because tprot,max scales with Rint2, the protection requirement is robust in its qualitative form but critically dependent on parameters in its quantitative form (Figure 26c). Qualitatively, the conclusion of Case Study 3 holds over the whole range: the fault current always exceeds an instantaneous over-current pick-up of 2·Irated by a factor of 1.8–10.7, so it is always detectable locally, and tprot,max never exceeds 27 ms, far below the 120 ms required for EMS detection; an interruption paced by the EMS would multiply the let-through energy by 40 at any Rint. Quantitatively, however, the admissible clearing time ranges from 27 ms at 0.3 Ω to only 0.75 ms at 0.05 Ω, so that a 3-ms device that is adequate for Rint ≥ 0.1 Ω lets through four times the budget for a low-resistance pack. Since Rint decreases with temperature and differs between new and aged packs, the protection must be coordinated with the lowest credible Rint, and sub-millisecond current-limiting devices are required for low-resistance packs.
All faults in Case Studies 3–5 were injected only once, at a purposely chosen operating point. To evaluate the representativeness of these instances, each electrical fault was also injected at each 5-min operating point of the five-day trajectory (1440 injections per fault and dispatch strategy, for both the MPC-enhanced and the reactive dispatch), using the same transient model; load already being shed before the fault was not counted as a fault impact. Figure 27 shows the results versus injection time of the MPC-enhanced dispatch, and their distribution is summarized in Table 8.
Figure 27. Fault-injection timing sweep over all 1440 operating points of the MPC-enhanced trajectory: (a) DC-bus short circuit; (b) PV array fault; (c) battery-converter failure. Stars mark the instances used in Case Studies 3–5.
Table 8. Sensitivity of fault outcomes to fault timing (injection instant or onset time).
The slow-fault results were also tested similarly, repeating Case Studies 6 and 7 for 60 drift onsets (every 2 h on all five days) and 55 cooling-degradation onsets (every hour from 06:00 to 16:00 on all five days), Figure 28. The undetected +15% drift never changed the unmet load by more than 1.03 kWh. The battery-fed electrolysis ranged from 0 to 13.6 kWh, the largest for onsets that leave the sunniest hours within the 48-h drift window. The detection delay of the fault-aware EMS ranged from 1.17 h to 13.1 h: it is short when the drift starts in the morning and long when it starts at night, because the residual in Equation (30) is observable only when the array produces power at its MPP. In the case of cooling degradation, local protection alone led to up to eight trips (on average 5.5 when the electrolyzer was running at onset), a maximum stack temperature of 83.2 °C, and hydrogen losses of 1.04 kg, while the fault-aware EMS prevented all trips at all 55 onsets and kept the stack temperature below 78.2 °C. It reduced the hydrogen loss in 42 of the 55 cases; in 9 cases, mainly on the overcast Day 5 when the electrolyzer runs only briefly and the protection trips at most once, its conservative derating cost slightly more hydrogen (at most 0.086 kg). The unmet load did not increase at any point; it actually decreased by up to 40.1 kWh for onsets on the morning of Day 2 because excess freed from the electrolyzer output was stored in the battery, another demonstration of the efficiency-reliability trade-off.
Figure 28. Onset-time sweeps of the slow faults: (a) undetected +15% sensor drift; (b) detection delay of the fault-aware EMS; (c) hydrogen loss; (d) number of over-temperature trips for the cooling degradation with local protection only and with the fault-aware EMS (no trips at any onset).
These sweeps change the status of the fault findings and limit what can be stated as general. The properties of the architecture and dispatch hierarchy that hold at every operating point of the realization are the fault current and its 3-ms interruption, the clearing of the PV array fault before EMS detection, the lack of any electrolyzer-curtailment compensation path for a discharging battery, the load neutrality of electrolyzer overheating, and the trip-free operation achieved by the fault-aware EMS. Conversely, the magnitudes given in Case Studies 3–7 (e.g., 48 kW withdrawn, 26.4 kW shortfall, 42 kW deficit, 1.04 kg hydrogen loss) are single samples from the distributions of Table 8 and are dependent on the injection instant, with the instances of Case Studies 3–5 being purposefully selected in the upper part of such distributions. All sweeps are for a single weather-and-load realization. Monte Carlo analysis to extend the sweeps to many realizations is future work.
The qualitative results (protection must act far below the EMS detection time; electrolyzer curtailment never compensates a battery-converter failure; the fault-aware EMS avoids electrolyzer trip cycling) hold for all operating points and over Rint = 0.05–0.3 Ω, while the single magnitudes depend on the injection instant and on Rint. The complete diversion of the excess to the electrolyzer takes place at just 0.8% (reactive: 18.3%) of the battery-converter charging instances.

4.13. Model Verification, Scope, and Limitations

This section summarizes how the models were verified, what the fault results represent, and where the conclusions stop. Verification. Each model was checked against an independent reference. These checks establish consistency with physical laws and published parameter ranges but are not experimental validation:
(i)
PV model: the predicted clear-sky peak of ≈156 kW for the 188.5-kW array (≈83% of nameplate) agrees with the derating expected from typical datasheet values (γP = −0.45%/°C, NOCT ≈ 45 °C) at the simulated ambient temperatures.
(ii)
Battery model: energy is conserved; the 10–90% SoC swing on clear days equals the 400-kWh usable capacity, and the charging power never exceeds the 150-kW (0.3 C) limit (Figure 6 and Figure 7).
(iii)
Fault-current model: the short-circuit current obeys Ohm’s law, and Table 7 shows that the protection requirement holds over Rint = 0.05–0.3 Ω.
(iv)
Fault framework: the communication and processing delays are taken from published microgrid studies [30], and the simulated detection times reproduce Equation (26).
The next step is hardware-in-the-loop testing of the protection and converter layer.
Role of the EMS. The fault-transient containment in Section 4.5, Section 4.6 and Section 4.7 (a 3-ms current interruption and recovery within tens of milliseconds) results from the assumed local protection and converter control, not from the proposed EMS. The EMS acts only after detection: it maintains compensating dispatch for non-self-clearing faults (e.g., a battery-converter failure), reallocates the surplus after an electrolyzer trip, and then resumes normal dispatch. The EMS therefore does not provide fault ride-through; a fault-aware EMS should be scoped to this post-detection role and coordinated with, rather than substituted for, fast local protection.
Status of the results. Table 9 classifies each fault result as either an analytical prediction (A) or simulated behavior of the assumed models (B). The timing hierarchy (protection much faster than EMS detection) and the structural findings are category-A results and hold independently of the simulation details; the magnitudes reported in Case Studies 3–7 are category-B results. A third category, physical performance validated independently on hardware, is empty in this study: none of the results has yet been validated experimentally.
Table 9. Status of the fault results: (A) analytically predicted; (B) simulated with the assumed models. No result belongs to a third category of independently validated physical performance.
Limitations. The main limitations are (i) the single five-day weather-and-load realization (Section 4.12); (ii) the perturbed-oracle forecasts, which make the MPC results an idealized upper bound (Section 3.2.1); (iii) the simplified first-order models of the fault current, the recovery, and the stack temperature, with assumed rather than manufacturer parameters (Table 4); (iv) the absence of battery and electrolyzer degradation costs in the dispatch. These limitations define the future work listed in Section 5.

5. Conclusions

This paper developed and evaluated a hybrid stochastic EMS for stand-alone PV-battery–PEM electrolyzer microgrids that distinctly addresses both healthy operation and fault propagation within a unified modeling framework. This was explored using five days of stochastic weather and load data to compare a reactive MDP dispatch against an MPC-enhanced variant, and by simulating three electrical fault types at millisecond resolution and two slow faults on their physical timescales within a two-timescale protection/EMS architecture.
In an idealized predictive-control comparison with perturbed-oracle forecasts, the MPC-enhanced dispatch increased PV utilization from 84% to 93% and more than doubled hydrogen production while reducing curtailment by 55% for the analyzed five-day realization, at the expense of a lower average SoC and more frequent and longer load-shedding episodes, a true efficiency-reliability trade-off that a purely efficiency-focused evaluation would have missed. These values are indicative rather than statistically established, since they are based on a single realization with perturbed-oracle forecasts. Dangerous fault currents are interrupted by the local hardware protection, not by EMS: DC-bus short-circuit current (4000 A, i.e., 10.7 times rated for base-case Rint = 0.1 Ω, and 3.6–21.3 times rated over Rint = 0.05–0.3 Ω) was interrupted in 3 ms, about forty times faster than EMS detection. In energy terms, the MPC layer increased the unmet load from 760.9 kWh to 851.2 kWh (+90.2 kWh, +11.9%; from 16.0% to 17.9% of demand), i.e., 10.9 kWh of unmet energy per additional kilogram of hydrogen. The protection requirement is robust in form but parameter-dependent in magnitude: the admissible clearing time scales with Rint2 (0.75–27 ms over 0.05–0.3 Ω), always far below the EMS detection time, and below 3 ms at low resistance.
A structural limitation was also identified: when the only redirection mechanism is electrolyzer curtailment, a battery-converter failure that occurs while the electrolyzer is idle (every night in the analyzed profiles) has no alternative pathway, and the entire deficit manifests as unmet load. The exhaustive injection sweep demonstrated that this limitation is structural and not instance-specific: the electrolyzer never runs while the battery discharges under the dispatch hierarchy of Equation (19), so electrolyzer curtailment did not compensate for any deficits caused by a battery-converter failure at any of the 1440 operating points. The communication-delay analysis confirmed that network latency does not affect the recovery time for fast, locally protected faults, thereby supporting the independence of safety-critical responses from communication performance. The timing results are based on the protection/EMS partition and apply to any fault that occurs before the EMS detection time. The magnitudes reported in the individual case studies are single samples, and their distributions across all operating points of the realization are presented in Table 8; they should be read with this sensitivity to the injection instant in mind. Sensor drift, modeled on its physical timescales, was a misallocation, not a reliability fault, detected by the EMS within 1.17–13.1 h. A cooling degradation of the electrolyzer did not affect load service but, with local protection alone, caused up to eight trip cycles and a 1.04 kg loss of hydrogen, which the fault-aware EMS avoided through thermal derating. For such slow faults, the EMS, not local protection, determines the outcome. These slow-fault results are simulated responses of lumped models with assumed parameters and have not yet been validated experimentally (Table 9).
Future work will (i) report statistical performance, including unmet energy, through Monte Carlo analyzes across weather/load realizations and fault-injection timing; (ii) evaluate the MPC with causal forecasting models; (iii) broaden the injection-timing and slow-fault evaluations to encompass fault severities and durations beyond those examined in this study including efficiency-degradation and gas-crossover faults of the electrolyzer; (iv) extend redirection beyond electrolyzer curtailment through tiered load shedding or backup generation, and add degradation-aware electrolyzer constraints (ramp limits and minimum on/off times); (v) perform hardware-in-the-loop validation against real converter, battery-pack, and relay data.

Author Contributions

Conceptualization, M.I.M.; Methodology, M.I.M.; Formal analysis, M.I.M.; Writing—original draft, M.I.M.; Writing—review and editing, M.I.M. and E.Y.; Supervision, E.Y. All authors have read and agreed to the published version of the manuscript.

Funding

The authors extend their appreciation to the Prince Sattam bin Abdulaziz University for funding this research work through the project number (PSAU/2025/01/35340).

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Conflicts of Interest

The authors declare no conflict of interest.

Nomenclature

AbbreviationDefinition
BES(S)Battery energy storage (system)
CTMCContinuous-time Markov chain
EMSEnergy management system
HILHardware-in-the-loop
LPLinear program
MDPMarkov decision process
BoPBalance of plant
MPCModel predictive control
MPPTMaximum power point tracking
NOCTNominal operating cell temperature
PEMProton-exchange membrane
PVPhotovoltaic
SoCState of charge
STFTShort-time Fourier transform
SymbolDescription
G, Gclear, GpeakIrradiance, clear-sky irradiance, peak clear-sky irradiance (W/m2)
Gref, TrefReference irradiance (1000 W/m2) and temperature (25 °C)
tsr, tssSunrise and sunset times (h)
αocOvercast attenuation factor
Nc, tk, δk, ΔkNumber, start time, depth, and duration of cloud events
𝟙(·)Indicator function
Tamb, Tmean, Tamp, tpkAmbient temperature, its daily mean, amplitude, and peak time
ε, σGaussian noise and its standard deviation
Tcell, NOCT, γPCell temperature, nominal operating cell temperature, power temperature coefficient
Prated, PpvPV rated power (STC) and PV output power (kW)
Pload, Pbase, PdefTotal, critical (base), and deferrable load (kW)
θt, rDeferrable-load state and number of states (r = 8)
πij, π0, hTransition rate, base rate, small time increment
m(t), mpeak, mwkndActivity multiplier and its peak-hour and weekend factors
SoC, SoCmin, SoCmax, SoC*State of charge, its limits, and the MPC target
Pbat, Pmax, CrateBattery power (+charge), power limit, C-rate
Cbat, ηc, ηdBattery capacity (kWh), charging and discharging efficiencies
ΔtSimulation/dispatch time step (5 min)
Ibat, Isc, Irated, IpeakBattery, short-circuit, rated, and peak current (A)
Vnom, RintNominal pack voltage and internal-plus-interconnect resistance
ρIPeak-to-rated current ratio
ṁH2, mH2Hydrogen production rate and cumulative mass
ηF, Vcell, ncellFaraday efficiency, cell voltage, number of series cells
MH2, FMolar mass of hydrogen, Faraday constant
Pely, PelyratedElectrolyzer power and rated power (kW)
Tstack, Tss, τthStack temperature, steady-state stack temperature, thermal time constant
H, pk, skMPC horizon length, battery-power and slack decision variables
wloss, wH2, wsoc-devLP loss, hydrogen-value, and SoC-deviation weights
κsky, λskySky-condition weight factors
tprot, tfault,end, tintProtection operating time, fault end time, interruption time
tcomms, tproc, tdetCommunication, processing, and EMS detection delays
y, y0, yss, τRecovering variable, its initial and steady-state values, recovery time constant

Appendix A

Appendix A.1. System Parameters

Table A1. System and controller parameters.

Appendix A.2. Electrolyzer Fault Mechanisms

Table A2. Fault mechanisms of the PEM electrolyzer and their treatment in this study [35,36].

References

  1. Banakhr, F.A.; Mosaad, M.I. High performance adaptive maximum power point tracking technique for off-grid photovoltaic systems. Sci. Rep. 2021, 11, 20400. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  2. Cheng, Z.; Jia, D.; Li, Z.; Xu, S.; Si, J. Multi-time-scale energy management for microgrid using expected-scenario-oriented stochastic optimization. Sustain. Energy Grids Netw. 2022, 30, 100670. [Google Scholar] [CrossRef] [Scilit]
  3. van der Meer, D.; Wang, G.C.; Munkhammar, J. An alternative optimal strategy for stochastic model predictive control of a residential battery energy management system with solar photovoltaic. Appl. Energy 2021, 283, 116289. [Google Scholar] [CrossRef] [Scilit]
  4. Chakraborty, I.; Sekaran, S.; Pradhan, S.K. An enhanced DC-DC boost converter based stand-alone PV-Battery OFF-Grid system with voltage balancing capability for fluctuating environmental and load conditions. Energy Sources Part A Recovery Util. Environ. Eff. 2022, 44, 8247–8265. [Google Scholar] [CrossRef] [Scilit]
  5. Aatabe, M.; El Abbadi, R.; Vargas, A.N.; Bouzid, A.E.M.; Bawayan, H.; Mosaad, M.I. Stochastic Energy Management Strategy for Autonomous PV–Microgrid Under Unpredictable Load Consumption. IEEE Access 2024, 12, 84401–84419. [Google Scholar] [CrossRef] [Scilit]
  6. Aatabe, M.; Tighirt, A.; Mosaad, M.I.; Hussien, S.A. Real-Time MDP-Based Optimal Control Strategy for Maximizing Green Hydrogen Production in PV Microgrids. IEEE Access 2025, 13, 188381–188398. [Google Scholar] [CrossRef] [Scilit]
  7. Uyar, T.S.; Beşikci, D. Integration of hydrogen energy systems into renewable energy systems for better design of 100% renewable energy communities. Int. J. Hydrogen Energy 2017, 42, 2453–2456. [Google Scholar] [CrossRef] [Scilit]
  8. Egeland-Eriksen, T.; Hajizadeh, A.; Sartori, S. Hydrogen-based systems for integration of renewable energy in power systems: Achievements and perspectives. Int. J. Hydrogen Energy 2021, 46, 31963–31983. [Google Scholar] [CrossRef] [Scilit]
  9. Wu, H.; Sun, M.; Craig, M.T. Updating global green-hydrogen production costs and configurations under future climates. The Innovation 2026, 7, 101303. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  10. Cecilia, A.; Carroquino, J.; Roda, V.; Costa-Castelló, R.; Barreras, F. Optimal Energy Management in a Standalone Microgrid, with Photovoltaic Generation, Short-Term Storage, and Hydrogen Production. Energies 2020, 13, 1454. [Google Scholar] [CrossRef] [Scilit]
  11. Marocco, P.; Ferrero, D.; Lanzini, A.; Santarelli, M. The role of hydrogen in the optimal design of off-grid hybrid renewable energy systems. J. Energy Storage 2022, 46, 103893. [Google Scholar] [CrossRef] [Scilit]
  12. Khan, M.W.; Wang, J.; Ma, M.; Xiong, L.; Li, P.; Wu, F. Optimal energy management and control aspects of distributed microgrid using multi-agent systems. Sustain. Cities Soc. 2019, 44, 855–870. [Google Scholar] [CrossRef] [Scilit]
  13. Sharma, P.; Dutt Mathur, H.; Mishra, P.; Bansal, R.C. A critical and comparative review of energy management strategies for microgrids. Appl. Energy 2022, 327, 120028. [Google Scholar] [CrossRef] [Scilit]
  14. Atawi, I.; Kassem, A. Optimal Control Based on Maximum Power Point Tracking (MPPT) of an Autonomous Hybrid Photovoltaic/Storage System in Micro Grid Applications. Energies 2017, 10, 643. [Google Scholar] [CrossRef] [Scilit]
  15. Guichi, A.; Mekhilef, S.; Berkouk, E.M.; Talha, A. Optimal control of grid-connected microgrid PV-based source under partially shaded conditions. Energy 2021, 230, 120649. [Google Scholar] [CrossRef] [Scilit]
  16. Abou El-Ela, A.A.; Mosalam, H.A.; Amer, R.A. Optimal control design and management of complete DC- renewable energy microgrid system. Ain Shams Eng. J. 2023, 14, 101964. [Google Scholar] [CrossRef] [Scilit]
  17. Nagaraja, Y.; Devaraju, T.; Vijaykumar, M. Optimal distributed control of renewable energy-based microgrid—An energy management approach. Int. J. Ambient Energy 2021, 42, 1635–1642. [Google Scholar] [CrossRef] [Scilit]
  18. Ferahtia, S.; Djeroui, A.; Rezk, H.; Houari, A.; Zeghlache, S.; Machmoum, M. Optimal control and implementation of energy management strategy for a DC microgrid. Energy 2022, 238, 121777. [Google Scholar] [CrossRef] [Scilit]
  19. Grcić, I.; Pandžić, H.; Novosel, D. Fault Detection in DC Microgrids Using Short-Time Fourier Transform. Energies 2021, 14, 277. [Google Scholar] [CrossRef] [Scilit]
  20. Zaben, M.M.; Worku, M.Y.; Hassan, M.A.; Abido, M.A. Machine Learning Methods for Fault Diagnosis in AC Microgrids: A Systematic Review. IEEE Access 2024, 12, 20260–20298. [Google Scholar] [CrossRef] [Scilit]
  21. Nkambule, M.S.; Hasan, A.N.; Shongwe, T. A review of intelligent control strategies for energy management systems in microgrids. Energy Convers. Manag. X 2025, 28, 101323. [Google Scholar] [CrossRef] [Scilit]
  22. Eyimaya, S.E.; Altin, N. Review of Energy Management Systems in Microgrids. Appl. Sci. 2024, 14, 1249. [Google Scholar] [CrossRef] [Scilit]
  23. Aatabe, M.; Latif, R.; Mosaad, M.I.; Hussien, S.A. Stochastic energy management of DC photovoltaic microgrids using Markov decision process. Results Eng. 2025, 27, 105835. [Google Scholar] [CrossRef] [Scilit]
  24. Aatabe, M.; Jenkal, W.; Mosaad, M.I.; Hussien, S.A. Stochastic Control for Sustainable Hydrogen Generation in Standalone PV–Battery–PEM Electrolyzer Systems. Energies 2025, 18, 3899. [Google Scholar] [CrossRef] [Scilit]
  25. Dragicevic, T.; Lu, X.; Vasquez, J.; Guerrero, J. DC Microgrids–Part I: A Review of Control Strategies and Stabilization Techniques. IEEE Trans. Power Electron. 2016, 31, 4876–4891. [Google Scholar] [CrossRef] [Scilit]
  26. Shi, M.; Wu, H.; Wang, Z.; Ruan, Z.; Navon, A.; Jing, R.; Li, X.; Li, C.; Lu, X.; Yan, J.; et al. Technical to deployable potential of rooftop solar photovoltaics. Nat. Rev. Clean Technol. 2026, 2, 492–511. [Google Scholar] [CrossRef] [Scilit]
  27. Antonanzas, J.; Osorio, N.; Escobar, R.; Urraca, R.; Martinez-de-Pison, F.J.; Antonanzas-Torres, F. Review of photovoltaic power forecasting. Sol. Energy 2016, 136, 78–111. [Google Scholar] [CrossRef] [Scilit]
  28. Hong, T.; Fan, S. Probabilistic electric load forecasting: A tutorial review. Int. J. Forecast. 2016, 32, 914–938. [Google Scholar] [CrossRef] [Scilit]
  29. Parisio, A.; Rikos, E.; Glielmo, L. A Model Predictive Control Approach to Microgrid Operation Optimization. IEEE Trans. Control Syst. Technol. 2014, 22, 1813–1827. [Google Scholar] [CrossRef] [Scilit]
  30. Khalil, A.; Alfergani, A.; Shaltami, F.M.; Asheibi, A. Robust Stabilization of a Microgrid with Communication Delay and Uncertainties. Computation 2023, 11, 75. [Google Scholar] [CrossRef] [Scilit]
  31. Isermann, R. Fault-Diagnosis Systems; Springer: Berlin/Heidelberg, Germany, 2006. [Google Scholar] [CrossRef] [Scilit]
  32. Silvestre, S.; Chouder, A.; Karatepe, E. Automatic fault detection in grid connected PV systems. Sol. Energy 2013, 94, 119–127. [Google Scholar] [CrossRef] [Scilit]
  33. Olivier, P.; Bourasseau, C.; Bouamama, P.B. Low-temperature electrolysis system modelling: A review. Renew. Sustain. Energy Rev. 2017, 78, 280–300. [Google Scholar] [CrossRef] [Scilit]
  34. Ulleberg, O. Modeling of advanced alkaline electrolyzers: A system simulation approach. Int. J. Hydrogen Energy 2003, 28, 21–33. [Google Scholar] [CrossRef] [Scilit]
  35. Feng, Q.; Yuan, X.; Liu, G.; Wei, B.; Zhang, Z.; Li, H.; Wang, H. A review of proton exchange membrane water electrolysis on degradation mechanisms and mitigation strategies. J. Power Sources 2017, 366, 33–55. [Google Scholar] [CrossRef] [Scilit]
  36. Chandesris, M.; Médeau, V.; Guillet, N.; Chelghoum, S.; Thoby, D.; Fouda-Onana, F. Membrane degradation in PEM water electrolyzer: Numerical modeling and experimental evidence of the influence of temperature and current density. Int. J. Hydrogen Energy 2015, 40, 1353–1366. [Google Scholar] [CrossRef] [Scilit]
  37. Weiß, A.; Siebel, A.; Bernt, M.; Shen, T.-H.; Tileli, V.; Gasteiger, H.A. Impact of Intermittent Operation on Lifetime and Performance of a PEM Water Electrolyzer. J. Electrochem. Soc. 2019, 166, F487–F497. [Google Scholar] [CrossRef] [Scilit]
  38. Papakonstantinou, G.; Algara-Siller, G.; Teschner, D.; Vidaković-Koch, T.; Schlögl, R.; Sundmacher, K. Degradation study of a proton exchange membrane water electrolyzer under dynamic operation conditions. Appl. Energy 2020, 280, 115911. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.