RENEWIOSITY / EXPLAINER

Hybrid Renewable Energy System Optimization: Solar, Wind, Batteries and Hydrogen

Learn how to optimize solar, wind, batteries and hydrogen using hourly dispatch, storage inventories, reliability constraints and lifecycle costs.

Hybrid renewable energy optimization original solar wind battery hydrogen hero

A solar photovoltaic array, wind turbine, battery and hydrogen system can operate as one coordinated energy plant, but simply connecting all four technologies does not guarantee low cost or reliable electricity. A hybrid system must be sized for a particular load and weather pattern, and dispatched hour by hour so that electricity, stored battery energy and stored hydrogen remain physically consistent. The central engineering question is not “Which technology is best?” but “Which combination meets the required service level at acceptable lifetime cost?”

This university-level lesson builds an integrated model from generation profiles, AC power balance, battery state of charge, electrolyzer operation and hydrogen inventory. It then compares three configurations over a hypothetical seven-day, 168-hour stress-test profile and conducts a small, transparent design-space search. Every numerical assumption is illustrative, not site weather data, an equipment quotation, a certified reliability study or an investment recommendation. A production design requires measured resource data, real component models, safety engineering and an annual or multi-year chronology. For context, the National Laboratory of the Rockies' REopt and Hybrid Optimization and Performance Platform (HOPP) address related sizing and dispatch questions with more comprehensive modeling frameworks [1–3].

Learning objectives

  • Formulate the hourly electrical balance for solar, wind, battery storage, electrolysis and fuel-cell generation.
  • Calculate battery state of charge and hydrogen inventory with consistent power, energy and mass units.
  • Explain why battery storage and hydrogen storage play different roles in hybrid system operation.
  • Define reliability, curtailment and lifecycle-cost objectives and identify the constraints needed for optimization.
  • Interpret a worked 168-hour simulation, compare configurations and evaluate a constrained design search.
  • Recognize where simplified models must be strengthened before engineering procurement or financing.

1. What makes a renewable energy system hybrid?

A hybrid renewable energy system combines two or more energy sources or storage technologies under coordinated controls. Solar PV and wind often complement one another because their output profiles respond to different physical drivers. Batteries can shift energy across minutes or hours, while hydrogen can store chemical energy for longer periods when a project can justify the additional equipment and conversion losses. Grid imports, flexible loads, diesel backup or other generation may also form part of a real hybrid microgrid.

The system boundary matters. In this article, solar and wind generation, battery charging/discharging, electrolyzer input, hydrogen storage, fuel-cell output and the electrical load are measured at a simplified common AC bus. The model treats the battery charge and discharge efficiencies as AC-to-stored and stored-to-AC efficiencies. Electrolysis electricity consumption includes an illustrative compression/balance-of-plant allowance. No electricity is exported or imported in the main off-grid example.

Original engineering schematic of solar PV and wind generation feeding a common AC bus and load, with a bidirectional battery path and a power-to-hydrogen electrolyzer, hydrogen tank and fuel-cell return path.

Figure 1. Simplified hybrid architecture and accounting boundary. Battery and hydrogen branches must be modeled as separate energy inventories; conversion losses prevent them from being interchangeable.

A common misconception is that hydrogen behaves like a very large battery. In reality, a battery stores electrochemical energy and returns electricity at comparatively high round-trip efficiency. An electrolyzer converts electricity into hydrogen, a storage system holds the hydrogen, and a fuel cell or other converter returns only part of its chemical energy as electricity. Hydrogen can be valuable for long-duration flexibility or as a saleable industrial product, but its electricity-to-electricity pathway is usually less efficient than a battery pathway. The correct comparison depends on storage duration, cost, utilization, hydrogen demand and system boundaries [3–5].

2. Begin with the load and weather chronology

Optimization must use an explicit time step. A monthly energy total cannot reveal whether a wind lull coincides with a cloudy evening or whether a battery can cover a high-power peak. Let t index consecutive time intervals, and let the interval duration be delta-t hours.

\Delta t=1\ \mathrm{h}\quad\text{for the worked hourly model}

The electrical demand at hour t is the load power, measured in kW. Its corresponding energy demand is:

E_{L,t}=P_{L,t}\Delta t

Total demand over N intervals is:

E_{L,\mathrm{total}}=\sum_{t=1}^{N}P_{L,t}\Delta t

For the synthetic seven-day example, the load varies around 105–131 kW, with a small extra demand during the two low-resource days. Total energy demand is 19,536 kWh. This is a deliberately constructed teaching profile, not an hourly profile downloaded from a real site.

The solar output is modeled from a nonnegative, normalized solar availability factor between zero and one. The wind output is modeled similarly:

P_{\mathrm{PV},t}=C_{\mathrm{PV}}f_{\mathrm{PV},t}
P_{\mathrm{W},t}=C_{\mathrm{W}}f_{\mathrm{W},t}

Here the design capacities C are in kW and the availability factors f are dimensionless. Real applications replace the illustrative factors with validated irradiance, temperature, module, inverter, wind-speed, power-curve, wake-loss and availability models. The synthetic profile includes two cloudy, low-wind days to reveal the value and limitations of storage.

Seven-day synthetic hourly plot of solar photovoltaic power, wind power and electric demand, highlighting two consecutive cloudy and low-wind stress days.

Figure 2. Synthetic 168-hour resource and demand profiles for the 550 kW PV, 200 kW wind example. The shaded two-day interval represents an intentionally difficult weather event, not historical meteorological data.

3. The hourly power-balance equation

Every hourly dispatch decision must satisfy conservation of energy at the common bus. With no grid connection, the generated and discharged power must either supply the load, charge the battery, run the electrolyzer or be curtailed. If the system cannot supply the full load, the difference is explicitly recorded as unserved power.

P_{\mathrm{PV},t}+P_{\mathrm{W},t}+P_{\mathrm{B,dis},t}+P_{\mathrm{FC},t}+P_{\mathrm{unserved},t}=P_{L,t}+P_{\mathrm{B,ch},t}+P_{\mathrm{EL},t}+P_{\mathrm{curt},t}

The unserved term is on the supply side as a bookkeeping slack variable; it is not a physical source of electricity. In a design optimization, its magnitude should be limited by a reliability constraint or penalized sufficiently in the objective. Curtailment is generated renewable power that cannot be productively absorbed under the modeled dispatch policy.

P_{\mathrm{unserved},t}\ge 0,\qquad P_{\mathrm{curt},t}\ge 0

When renewable generation exceeds demand, the simplified controller first charges the battery, then produces hydrogen if the tank and electrolyzer have capacity, and finally curtails the remainder. When generation falls short, it first discharges the battery, then uses the fuel cell, and finally records any residual deficit. This battery-first priority rule is easy to reproduce but is not guaranteed to minimize total cost. An optimal controller may reserve battery energy for a later peak, anticipate tomorrow's wind, protect battery life or run the electrolyzer for hydrogen sales.

4. Battery sizing: distinguish kW from kWh

Battery energy capacity and battery power capacity answer different questions. A 300 kWh usable battery with a 150 kW discharge limit can deliver 150 kW for at most about two hours before losses, assuming it starts fully charged. The energy inventory is called state of charge (SOC) and must remain within the usable storage window.

SOC_{t+1}=SOC_t+\eta_{\mathrm{ch}}P_{\mathrm{B,ch},t}\Delta t-\frac{P_{\mathrm{B,dis},t}\Delta t}{\eta_{\mathrm{dis}}}
0\le SOC_t\le E_{\mathrm{B,usable}}
0\le P_{\mathrm{B,ch},t}\le C_{\mathrm{B,power}}
0\le P_{\mathrm{B,dis},t}\le C_{\mathrm{B,power}}

The teaching model uses 95% charge efficiency and 95% discharge efficiency. Its electrical round-trip efficiency is therefore:

\eta_{\mathrm{B,RT}}=\eta_{\mathrm{ch}}\eta_{\mathrm{dis}}=(0.95)(0.95)=0.9025

Worked example 1: battery losses. Charging the battery with 300 kWh of AC electricity adds 285 kWh to usable SOC. Discharging that added inventory returns 270.75 kWh to the AC bus, a 90.25% round trip. If the battery begins with 150 kWh of usable SOC, a demand of 100 kW for one hour removes approximately 105.26 kWh from SOC, not merely 100 kWh.

\Delta SOC_{\mathrm{dis}}=\frac{100\ \mathrm{kWh}}{0.95}=105.26\ \mathrm{kWh}

An engineering model should also account for SOC-dependent power limits, temperature, calendar and cycling degradation, minimum reserve SOC, inverter clipping, replacements and thermal management. The simple constant-efficiency model does not establish battery warranty performance [4].

5. Hydrogen storage: electricity, kilograms and conversion efficiency

Hydrogen introduces a mass inventory as well as an electrical energy balance. An electrolyzer consumes AC electrical energy and produces hydrogen mass. The assumed specific electricity consumption is 55 kWh per kilogram of hydrogen, including a simplified 3 kWh/kg allowance beyond an illustrative 52 kWh/kg electrolysis input. These are hypothetical model parameters, not guaranteed manufacturer specifications. U.S. Department of Energy technical targets illustrate why electrolyzer performance must be defined at stack or system boundary [5].

\dot m_{\mathrm{H2,prod},t}=\frac{P_{\mathrm{EL},t}}{e_{\mathrm{EL}}}
e_{\mathrm{EL}}=55\ \mathrm{kWh/kg\ H_2}

A fuel cell consumes stored hydrogen and returns AC electricity. Using a lower heating value of approximately 33.33 kWh/kg and a hypothetical 50% net AC fuel-cell efficiency:

E_{\mathrm{FC,AC}}=m_{\mathrm{H2,used}}\,LHV_{\mathrm{H2}}\,\eta_{\mathrm{FC}}
LHV_{\mathrm{H2}}=33.33\ \mathrm{kWh/kg}

The tank inventory evolves as:

m_{t+1}=m_t+\frac{P_{\mathrm{EL},t}\Delta t}{e_{\mathrm{EL}}}-\frac{P_{\mathrm{FC},t}\Delta t}{\eta_{\mathrm{FC}}LHV_{\mathrm{H2}}}
0\le m_t\le M_{\mathrm{H2,max}}
0\le P_{\mathrm{EL},t}\le C_{\mathrm{EL}},\qquad 0\le P_{\mathrm{FC},t}\le C_{\mathrm{FC}}

For electricity-to-hydrogen-to-electricity storage, the simplified net round-trip efficiency is:

\eta_{\mathrm{H2,RT}}=\frac{\eta_{\mathrm{FC}}LHV_{\mathrm{H2}}}{e_{\mathrm{EL}}}=\frac{0.50(33.33)}{55}=0.303

Worked example 2: a hydrogen storage cycle. Supplying 550 kWh of AC electricity to this modeled pathway produces 10 kg of hydrogen. At 50% net AC fuel-cell efficiency, the stored hydrogen can later generate approximately 166.65 kWh of electricity. The other 383.35 kWh are conversion and auxiliary-energy losses within the simplified boundary. The hydrogen has not disappeared: its chemical energy is converted into electricity and heat, and oxygen is consumed in the fuel cell. Water, purification, compression, storage pressure, leakage and safety systems require separate engineering treatment.

m_{\mathrm{H2}}=\frac{550}{55}=10\ \mathrm{kg}
E_{\mathrm{FC}}=10(33.33)(0.50)=166.65\ \mathrm{kWh}

Ideal electrolysis stoichiometry consumes approximately 9 kg of water per kilogram of hydrogen. Practical water intake can be higher after purification and process losses; a chemical engineering design must distinguish stoichiometric consumption from total site water withdrawal.

m_{\mathrm{water,stoich}}\approx 9m_{\mathrm{H2}}

6. Dispatch constraints and control decisions

Battery and hydrogen capacities are not sufficient by themselves. The dispatch model must prevent physically impossible charging, discharging and conversion. A rigorous optimization can use binary variables to prohibit simultaneous charging and discharging when necessary; a deterministic rule-based simulator instead makes only one battery action per time step. Both approaches must preserve inventory bounds.

For a battery operating-mode indicator z taking values zero or one, a standard linearized formulation is:

P_{\mathrm{B,ch},t}\le z_t C_{\mathrm{B,power}}
P_{\mathrm{B,dis},t}\le (1-z_t)C_{\mathrm{B,power}}

The same principle can apply to electrolyzer and fuel-cell mutual exclusivity if the physical plant or control strategy requires it. In some real systems, separate devices can operate simultaneously for legitimate operational reasons, so an automatic mutual-exclusion constraint should not be added without a physical justification.

Battery and hydrogen inventories also need initial and terminal conditions. A model that begins with a full hydrogen tank but does not charge for that inventory may appear artificially reliable. For cyclic or representative-week modeling, the end state is often constrained to equal or exceed the starting state.

SOC_N\ge SOC_0,\qquad m_N\ge m_0

The numerical teaching example begins with the battery at 50% of its usable capacity and the hydrogen tank empty. It reports terminal inventories but does not impose cyclic terminal equality. This makes the short-horizon results useful for understanding dispatch, not for certifying annual reliability or bankable system sizing.

7. Define reliability before optimizing

Reliability can be defined in several ways. The most direct energy-based measure is expected or simulated energy not served (ENS). For a deterministic time series, ENS is the sum of hourly power deficits multiplied by the time step:

ENS=\sum_{t=1}^{N}P_{\mathrm{unserved},t}\Delta t

The loss of power supply probability (LPSP) is sometimes defined as the fraction of demanded energy not served. This is an energy fraction, not the fraction of hours with outages:

LPSP=\frac{ENS}{E_{L,\mathrm{total}}}
F_{\mathrm{served}}=1-LPSP

A separate loss-of-load-hours measure counts the time intervals with any shortage:

H_{\mathrm{short}}=\sum_{t=1}^{N}\mathbf{1}\!\left(P_{\mathrm{unserved},t}>0\right)\Delta t

Two systems can have the same ENS but very different outage durations or peak deficits. Hospitals, process plants and critical facilities may require firm capacity, ride-through capability, black-start and contingency criteria in addition to an energy-fraction threshold. A 95% served-energy fraction is not a 95% uptime guarantee.

8. The cost objective: CAPEX, replacements and operation

A useful optimization objective is the net present cost (NPC) of owning and operating the system over its analysis life. The economic boundaries must match those used in our LCOE explanation and NPV/IRR project economics lesson.

NPC=C_{0}+\sum_{y=1}^{Y}\frac{O_y+R_y-S_y}{(1+r)^y}

Here C0 is initial capital, O annual operating cost, R replacement expenditure, S any salvage or other credited value, r the consistent real or nominal discount rate, and Y the economic horizon in years. Annualization converts a present-value cost into an equivalent annual amount:

CRF=\frac{r(1+r)^Y}{(1+r)^Y-1}
EAC=NPC\times CRF

For the small teaching search, the hypothetical cost assumptions are USD 800/kW PV, USD 1,400/kW wind, USD 300/kWh usable battery, USD 150/kW battery power converter, USD 900/kW electrolyzer, USD 1,600/kW fuel cell and USD 650/kg hydrogen tank capacity. Fixed annual O&M is approximated as 2% of initial CAPEX; battery replacement in Year 10 is priced at USD 200/kWh and discounted at 7% real. Analysis life is 20 years. These numbers are artificial classroom coefficients, not current market prices or project estimates. They omit several real costs and revenues.

C_0=800C_{\mathrm{PV}}+1400C_{\mathrm{W}}+300E_{\mathrm{B}}+150C_{\mathrm{B,power}}+900C_{\mathrm{EL}}+1600C_{\mathrm{FC}}+650M_{\mathrm{H2}}
EAC=\left(C_0+\frac{200E_{\mathrm{B}}}{(1.07)^{10}}\right)CRF+0.02C_0

A model with grid electricity purchases, hydrogen sales or market participation must add the corresponding time-dependent cash flows. For an off-grid system, minimizing energy cost while permitting extensive unmet demand is misleading unless a reliability constraint is imposed.

9. Optimization variables, constraints and objectives

The design vector contains installed capacities, while the operational variables describe hourly dispatch. A basic optimization chooses capacities to minimize annualized cost subject to an energy-service requirement and the power and inventory equations above.

\mathbf{x}=(C_{\mathrm{PV}},C_{\mathrm{W}},E_{\mathrm{B}},C_{\mathrm{B,power}},C_{\mathrm{EL}},M_{\mathrm{H2}},C_{\mathrm{FC}})
\min_{\mathbf{x},\,\mathrm{dispatch}}\ EAC(\mathbf{x})
ENS\le\varepsilon E_{L,\mathrm{total}}

For example, a minimum 95% served-energy fraction corresponds to epsilon = 0.05. This threshold is intentionally permissive for classroom comparison and would be inappropriate for many critical loads. A practical engineering problem often includes land limits, grid export limits, hydrogen delivery obligations, reserve requirements, maximum power ramp rates, emission limits, safety setbacks and equipment lifetime constraints.

Sizing and dispatch are coupled. A larger electrolyzer may capture short solar surpluses, but only if tank space is available. A larger hydrogen tank may be useless if the electrolyzer rarely produces enough hydrogen. A large battery can reduce curtailment but may cycle too little to justify its cost. Optimizing capacities independently can miss these interactions.

10. Worked seven-day dispatch comparison

Consider the following illustrative off-grid plant: 550 kW solar PV, 200 kW wind, 650 kWh usable battery energy, 160 kW battery converter, 160 kW electrolyzer, 120 kg hydrogen tank and 130 kW fuel cell. The battery starts half charged at 325 kWh; the hydrogen tank starts empty. Battery efficiencies are 95% each direction. The hydrogen pathway uses 55 kWh/kg and 50% net AC fuel-cell efficiency. The model operates at one-hour intervals with a simple battery-first controller.

The same 168-hour load and resource profiles are tested for three equipment configurations: generation only; generation plus battery; and generation plus both battery and hydrogen. Equipment capacities are otherwise held fixed for a fair operational comparison. No case imports power from the grid.

Metric over 168 hours | Solar + wind only | + Battery | + Battery and hydrogen

Total demand: 19,536 kWh | 19,536 kWh | 19,536 kWh

Energy not served: 4,918.1 kWh | 2,654.5 kWh | 1,038.5 kWh

Demand energy served: 74.83% | 86.41% | 94.68%

Curtailed energy: 14,433.8 kWh | 11,850.2 kWh | 5,181.5 kWh

Battery AC discharge: 0 kWh | 2,263.6 kWh | 2,263.6 kWh

Fuel-cell AC output: 0 kWh | 0 kWh | 1,616.0 kWh

Illustrative equivalent annualized cost: USD 82,363/year | USD 113,653/year | USD 162,842/year

The hybrid system reduces unserved energy by approximately 3,879.6 kWh relative to generation alone over this particular week. Its battery discharges about 2,263.6 kWh and its fuel cell supplies about 1,616.0 kWh. Those figures describe AC energy delivered; the energy required to charge the storage systems is greater because of conversion losses. The hydrogen system produces approximately 121.25 kg over the week and consumes approximately 96.97 kg, leaving about 24.28 kg in the tank. The battery ends with about 396.71 kWh of usable SOC. The terminal inventories differ from the initial values, reinforcing that this is not a cyclic annual model.

Original three-panel hybrid dispatch chart showing seven-day load supplied by renewables, battery and fuel cell, together with battery state of charge and hydrogen inventory across the low-resource event.

Figure 3. Reproducible hourly dispatch for the hypothetical solar–wind–battery–hydrogen plant. Hydrogen inventory is measured in kilograms, battery SOC in kWh, and AC power in kW; these units must not be confused.

Worked example 3: interpreting the reliability improvement. The hybrid system's served-energy fraction is:

F_{\mathrm{served}}=1-\frac{1038.511}{19536}=0.94684

The result is approximately 94.68%, below a 95% served-energy requirement. This system therefore fails that particular constraint, even though its hydrogen and battery equipment substantially improve service during the cloudy, low-wind interval. Optimizing for a constraint requires actually checking it, not rounding the result up.

11. A transparent design-space optimization

We next examine a finite grid of candidate designs. The candidate PV sizes are 400, 500, 600 and 700 kW; wind sizes are 120, 180, 240 and 300 kW; battery capacities are 300, 650 and 1,000 kWh; and hydrogen tank sizes are 60, 120 and 180 kg. Battery converter, electrolyzer and fuel-cell power limits remain 160, 160 and 130 kW, respectively. Every candidate therefore includes all four technologies.

N_{\mathrm{designs}}=4\times4\times3\times3=144

Each of the 144 combinations is simulated on exactly the same seven-day profiles and initial-condition rule. The least-cost candidate meeting at least 95% of energy demand has 400 kW PV, 300 kW wind, 300 kWh usable battery and 120 kg hydrogen capacity. Its simplified equivalent annualized cost is approximately USD 149,760/year, and it serves 96.40% of the stress-week demand. Its unserved energy is approximately 704.0 kWh. This is a minimum only within the enumerated grid and the stated fixed dispatch rule, not a continuous global optimum.

Original scatter plot of 144 synthetic hybrid designs showing equivalent annualized cost versus percentage of stress-week demand served, with the 95 percent constraint and least-cost feasible all-four-technology candidate marked.

Figure 4. Constrained design-space search. Each point is one hypothetical four-technology configuration. The highlighted design is the least-cost member of the tested grid satisfying the 95% served-energy threshold; it is not an industry cost benchmark.

Worked example 4: a tighter reliability requirement. Requiring 98% served energy changes the least-cost grid candidate to 500 kW PV, 300 kW wind, 300 kWh battery and 120 kg hydrogen capacity, with approximately USD 158,911/year equivalent annualized cost and 98.06% demand served. Requiring 100% served energy in this single synthetic week produces a least-cost grid candidate of 600 kW PV, 300 kW wind, 300 kWh battery and 180 kg hydrogen capacity, at approximately USD 172,524/year. A perfect score on one synthetic week says nothing conclusive about multi-year reliability or extreme-event resilience.

A particularly instructive counterexample appears if the battery is allowed to be zero in the candidate set. Under these artificial cost assumptions and the chosen battery-first dispatch, the cheapest design reaching 95% served energy may omit the battery altogether. Thus, “a hybrid must include all technologies” is not an optimization principle. The preferred architecture depends on objective, boundary, reliability target, resource correlation and component prices. This article deliberately restricts the plotted search to all-four-technology designs so the comparison illustrates joint sizing of each component.

12. Sensitivity analysis: what can change the answer?

Optimization results are only as reliable as their inputs. Renewable production varies from year to year; battery and electrolyzer efficiency change with operating conditions; and future component prices, discount rates, equipment life and hydrogen offtake values may be uncertain. A rigorous study repeats the design process across credible scenarios rather than merely perturbing one input after the capacities have been fixed.

A general scenario-dependent objective is:

\min_{\mathbf{x}}\sum_{s=1}^{S}p_s\,NPC(\mathbf{x},s)

Here p is a scenario probability when a defensible probability distribution exists. Without justified probabilities, a scenario table is more transparent than pretending the outcomes are statistically weighted. A robust alternative seeks a design that remains feasible under a specified uncertainty set:

ENS(\mathbf{x},s)\le\varepsilon E_L(s)\quad\text{for all tested scenarios }s

Useful stress tests include a 20% reduction in wind resource during an extended lull, consecutive cloudy days, a battery derating during high temperature, delayed hydrogen deliveries, higher equipment replacement costs, and a lower real discount rate. The model should also test loss of a fuel-cell module and whether the inverter can meet short-term starting currents. Averages can conceal exactly the hours that govern resilience.

13. Grid-connected systems need a different objective

An off-grid microgrid seeks reliable service without grid purchases. A grid-connected hybrid plant may instead optimize energy arbitrage, peak-demand reduction, capacity payments, renewable curtailment, emissions, hydrogen sales or a combination. A negative spot electricity price can make export undesirable, while a contractual hydrogen demand can force electrolysis even when selling electricity would be more profitable. The grid introduces import/export tariffs, network limits and potentially demand charges.

P_{\mathrm{import},t}-P_{\mathrm{export},t}+P_{\mathrm{PV},t}+P_{\mathrm{W},t}+P_{\mathrm{B,dis},t}+P_{\mathrm{FC},t}=P_{L,t}+P_{\mathrm{B,ch},t}+P_{\mathrm{EL},t}+P_{\mathrm{curt},t}

An illustrative grid-connected operating-cost term is:

C_{\mathrm{grid}}=\sum_t\left(\pi_{\mathrm{buy},t}P_{\mathrm{import},t}-\pi_{\mathrm{sell},t}P_{\mathrm{export},t}\right)\Delta t

This simple expression omits network tariffs, demand charges, taxes, balancing services and contract constraints. For real modeling, tariff structures and dispatch assumptions should be verified against the relevant utility and market rules. NLR's REopt framework offers a useful example of jointly considering sizing, dispatch, cost and resilience [1, 2].

14. Battery versus hydrogen: when is each useful?

Batteries generally offer a high-efficiency response for frequent daily shifting and power-quality services, while hydrogen can be relevant when the duration is long, when hydrogen has an industrial customer, or when large energy inventory is needed relative to conversion equipment power. Neither technology is automatically preferable for all durations. Hydrogen tanks have mass and pressure constraints, electrolyzers have turndown and degradation constraints, and fuel cells require appropriate thermal and electrical integration.

A simple storage-duration indicator is the energy inventory divided by discharge power:

D_{\mathrm{B}}=\frac{E_{\mathrm{B,usable}}\eta_{\mathrm{dis}}}{C_{\mathrm{B,power}}}

For 650 kWh usable SOC, 95% discharge efficiency and 160 kW power capacity, the maximum full-power discharge duration from a full battery is approximately 3.86 hours. This ignores minimum reserve and power derating.

D_{\mathrm{B}}=\frac{650(0.95)}{160}=3.86\ \mathrm{h}

For 120 kg of hydrogen, a 130 kW fuel cell and 50% net AC efficiency, the idealized full-power fuel-cell duration from a full tank is approximately 15.38 hours:

D_{\mathrm{H2}}=\frac{120(33.33)(0.50)}{130}=15.38\ \mathrm{h}

Worked example 5: duration is not annual adequacy. The hydrogen system has a longer idealized full-power duration, but that does not mean it can refill the tank quickly enough during a prolonged low-renewable period. At 160 kW input and 55 kWh/kg, the maximum production rate is about 2.91 kg/h, before part-load and downtime effects. Filling an empty 120 kg tank would require approximately 41.25 hours of full electrolyzer operation, plus sufficient surplus renewable electricity.

\dot m_{\mathrm{max}}=\frac{160}{55}=2.91\ \mathrm{kg/h}
t_{\mathrm{fill}}=\frac{120(55)}{160}=41.25\ \mathrm{h}

These estimates illustrate why power, energy and mass capacities must all be optimized, and why hydrogen-system design must include compression, piping, pressure regulation, ventilation, hazard analysis and applicable codes.

15. Optimization algorithms: from spreadsheets to mixed-integer models

A spreadsheet can evaluate a small number of candidate sizes and a rule-based hourly controller. Exhaustive grid search is transparent and suitable for teaching but becomes expensive as more continuous sizing variables and operational decisions are introduced. Linear programming can optimize continuous dispatch under linear assumptions. Mixed-integer linear programming (MILP) can handle discrete operating modes, unit commitment, minimum loads and investment choices. Nonlinear or mixed-integer nonlinear models may be required for detailed electrolyzer performance, battery degradation and AC power flow.

A practical sequence is: first define physical boundaries and units; second collect chronological data; third validate the simulator against hand calculations; fourth optimize capacities and dispatch; fifth run independent sensitivity and stress tests; and sixth verify the result against engineering codes and vendor data. A solver reporting “optimal” only means optimal for its mathematical model and tolerances. It does not certify that the model accurately represents the site.

For more advanced implementations, HOPP provides a documented hybrid power-plant modeling framework, and REopt provides technology sizing and dispatch methods [1–3]. They are references for model development, not proof that this illustrative seven-day case reproduces their outputs.

16. Engineering quality gates for hybrid studies

Before accepting a hybrid design, check both physical and economic consistency. Energy cannot be created by a battery or hydrogen tank. A dispatch routine must never produce negative inventory, charge a full battery, consume more hydrogen than is available, or exceed converter nameplate power. Battery and hydrogen losses must be assigned to the correct system boundary. An off-grid system with nonzero ENS cannot be described as fully reliable merely because its annual generation exceeds annual demand.

A useful hourly conservation residual is:

\epsilon_t=P_{\mathrm{PV},t}+P_{\mathrm{W},t}+P_{\mathrm{B,dis},t}+P_{\mathrm{FC},t}+P_{\mathrm{unserved},t}-P_{L,t}-P_{\mathrm{B,ch},t}-P_{\mathrm{EL},t}-P_{\mathrm{curt},t}
|\epsilon_t|\le\epsilon_{\mathrm{numerical}}

Worked example 6: independent checks. For a one-hour interval with 120 kW solar, 40 kW wind, 100 kW load, 30 kW battery charge, 20 kW electrolyzer consumption and 10 kW curtailment, the balance is 160 kW on each side. Battery SOC rises by 28.5 kWh and hydrogen inventory rises by 20/55 = 0.364 kg, assuming available capacity. If the controller instead reported a 40 kWh battery SOC increase or 2 kg hydrogen production, it would violate the declared conversion model.

120+40=100+30+20+10
\Delta SOC=(0.95)(30)(1)=28.5\ \mathrm{kWh}
\Delta m_{\mathrm{H2}}=\frac{20(1)}{55}=0.364\ \mathrm{kg}

17. Common mistakes in hybrid optimization

Confusing power and energy. kW is instantaneous power, kWh is energy over time, and kg is hydrogen mass. A 100 kW electrolyzer is not a 100 kWh hydrogen tank. All conversions must explicitly include the time step.

Using a single average capacity factor. Annual averages erase the temporal coincidence of generation and demand. Two sites with identical annual renewable energy may need very different storage sizes.

Double-counting renewable electricity. Surplus electricity cannot simultaneously charge the battery, produce hydrogen and be exported. Every kWh must appear exactly once in the power balance.

Treating all hydrogen efficiency figures as interchangeable. Stack electrical efficiency, system AC electricity consumption, hydrogen LHV/HHV and fuel-cell AC efficiency use different boundaries. Compression and auxiliaries can materially affect the full pathway.

Ignoring the starting inventory. A tank filled before the simulation contributes energy that was produced elsewhere. For a representative-period optimization, terminal inventory constraints prevent free energy from being borrowed across period boundaries.

Equating LCOE with delivered reliability. A low cost per generated MWh does not ensure that electricity is available when the load needs it. Use ENS, peak shortfall and chronological dispatch alongside lifecycle cost.

Calling a small grid search a global optimum. The best of 144 discrete candidates can be improved by a size not in the grid, a better dispatch strategy or different assumptions. Document the feasible design set and numerical method.

18. Practical project workflow and data checklist

For a real site, assemble at least a year of time-aligned load, irradiance, ambient temperature and wind data, ideally multiple representative years. Confirm whether wind speeds are hub-height corrected, whether PV output is AC or DC, and whether the electrical load includes compressor, electrolyzer auxiliaries, battery HVAC and hydrogen purification. Specify allowable unmet load, critical-load tiers, maintenance windows, backup requirements, grid rules and renewable-energy targets.

Then construct a technology cost sheet that separates power-dependent and energy-dependent capital, fixed and variable O&M, replacement years, degradation, taxes and incentives. Use consistent real or nominal prices and discount rates. Finally, test unusual events: an extended cloudy wind lull, battery unavailability, inverter failure, hydrogen-system downtime, curtailment and the effect of stricter reliability requirements. Document every modeling assumption so that an independent engineer can reproduce the result.

19. Summary: what the worked model actually shows

The synthetic stress week demonstrates why joint sizing and chronological dispatch matter. Adding a 650 kWh battery to the specified solar–wind plant raises served-energy fraction from 74.83% to 86.41%. Adding a 120 kg hydrogen pathway raises it to 94.68%, but the system still misses a 95% threshold. A finite all-four-technology grid search identifies a lower-cost alternative that meets the chosen 95% teaching constraint at approximately USD 149,760 equivalent annualized cost, under hypothetical prices and the same rule-based dispatch.

These results are not universal technology rankings. They depend on synthetic profiles, initial states, a seven-day horizon, artificial cost coefficients, fixed efficiencies and a particular dispatch rule. A real optimization must use representative chronological data, consistent terminal conditions, equipment-specific performance and safety constraints, and project-specific economics. The next step for an engineering team is not to buy the highlighted capacities, but to use this framework to build and validate a site-specific model.

Technical discussions describe general principles; site-specific engineering decisions require appropriate professional evaluation.