Techno-economic analysis inside an optimization model
Put a wind-hydrogen plant’s capital, a tax credit in its own years and the credit’s emissions tiers into one LP, then move the boundary and watch the conclusion change
One wind-hydrogen plant, three boundaries: what the same LP concludes
| Boundary | Electrolyzer | NPV | Cost per kg | NPV with no credit |
|---|---|---|---|---|
| Wind farm and electrolyzer, one plant | 46.2 MW | $46.4M | $4.79/kg | −$58.7M |
| The electrolyzer's increment | 46.2 MW | $121.2M | $4.07/kg | $16.2M |
| Electrolyzer across the grid | 40.1 MW | $63.2M | $4.60/kg | $0.0M |
Defaults
- Hydrogen $4 per kg
- Delivery charge $10 per MWh bought
- Counting rule hourly matching
- Credit top tier, $3.185 per kg, years 1 to 10 of 30
- NPV real 2025 dollars at 4%
- Cost per kg before credits
Across the grid with no credit, no electrolyzer is built.
With JavaScript on, you solve each step's linear program in the browser.
Illustrative plant and prices. A new 100 MW wind farm behind a 50 MW connection, trading at Prairie Town's cost of one more MWh ($0, $40 or $100, lesson 9); a hydrogen buyer and a delivery charge you set. Real 2025 dollars.
Real shapes, 36 days. Wind and prices follow the Southwest Power Pool's 2025 hours (EIA-930), wind at EIA's 33.8% capacity factor. Three days per month stand for the year.
Checked on the whole year. The lesson's test re-runs the plans on all 8,760 hours of 2025: hydrogen within 4%, NPV within $4M.
Costs. Electrolyzer: DOE Record 24005 (May 2024), $2,000 per kW in 2022 dollars, $2,184 per kW in 2025 dollars by BEA's GDP deflator; upkeep 5% a year; stack wear $6.01 per MWh. Wind farm, rate and life: lesson 13.
About 40 guided minutes in nine steps. Solver: HiGHS (open source), loaded on your first solve (about 3.5 MB, once).
Build it in Python · notebook lab, about 45 minutes, then 90 minutes of practice
The same LP in scipy.optimize.linprog(method="highs"): the representative days, the capital recovery factor, the credit's two periods and the tiers. assert cells check your sizes, hydrogen, NPVs, costs per kg and credit per kg against the lesson's reference block.
Hourly schedules are printed, not asserted: other plans of the same value can run some hours differently.
- Download the notebook and the five data files into one folder (in Colab, upload them with the folder icon).
- Open it in Google Colab (File → Upload notebook) or locally with Python 3, NumPy and SciPy 1.9 or later.
- Run all cells (under a minute), then try the practice tasks at the end.
Notebook (.ipynb) Lesson data (with lesson 13's wind costs) A16 data Town Year 2025 Capacity factors
What you just did, as diagrams
- Capital in the goal
- Each MW costs its capital recovery and upkeep every year: CRF 0.0578 at 4% real over 30 years.
- Size and hours together
- Without a credit the LP builds 22.7 MW: a higher cost per kg than 30 MW, yet more value.
- A credit in its own years
- $3.185 per kg for 10 of 30 years is worth about $1.24/kg over the life: 3.185 × 0.388, the credit years' 38.8% of the discounted kilograms.
- Why 38.8%, not 47%
- The credit years are 47% of the discounted years, but the plant makes 4.96 million kg a year under the tier's cap and 6.91 million after it, when it buys more grid power.
- A step rule as a set of LPs
- One LP per emissions tier, each with a cap on counted grid CO₂ per kg; the top tier wins here, at 46.2 MW.
- The boundary is part of the answer
- The same plant is worth $46.4M as one plant, $121.2M as the electrolyzer's increment, and $63.2M across the grid.
Go deeper · ModelerThe plant's LP in algebra
Periods \(p\) (the credit’s years, then the rest), representative days \(d\) with weights \(n_d\) (365 in all), hours \(t = 0 \dots 23\); MW over an hour is MWh. Money is an annual equivalent in real 2025 dollars:
\[\min\; (\mathit{CRF} + f)\, c\, S \;+\; \sum_p \varphi_p \sum_{d,t} n_d \Big[ (p_t + q)\, \mathit{imp} - p_t\, \mathit{exp} + \big(v - (h + \kappa_p)\, k\big)\, \mathit{ez} \Big]\]
\[ \begin{aligned} \mathit{dw} + \mathit{exp} &\le w_t, \quad \mathit{ez} = \mathit{dw} + \mathit{imp} \le S, \quad \mathit{exp}, \mathit{imp} \le 50 && \text{(each hour)}\\ \textstyle\sum_{d,t} n_d \big(e\, u - L\, k\, \mathit{ez} / 1000\big) &\le 0, \quad u \ge \mathit{imp} - \mathit{exp}, \quad u \ge 0 && \text{(a tier, period 1)}\\ \mathit{dw}, \mathit{exp}, \mathit{imp} &\ge 0, \quad 0 \le S \le 100 && \text{(bounds)}\\ \varphi_1 = \mathit{AF}(r, 10) / \mathit{AF}(r, N), &\quad \varphi_2 = 1 - \varphi_1, \quad \mathit{CRF} = 1 / \mathit{AF}(r, N) && \text{(weights)} \end{aligned} \]
| Symbol | Meaning | Unit |
|---|---|---|
| \(S\) | the electrolyzer’s size (a decision, 0 to 100) | MW |
| \(c\) | installed cost: $2,184 per kW = about $2,184,000 per MW | $/MW |
| \(f\) | fixed upkeep: 5% of \(c\) every year | share a year |
| \(\mathit{dw}\), \(\mathit{exp}\), \(\mathit{imp}\) | wind to the electrolyzer, wind sold, power bought | MW |
| \(\mathit{ez}\) | power into the electrolyzer, \(\mathit{dw} + \mathit{imp}\) | MW |
| \(p_t\), \(q\) | Prairie Town’s price, the delivery charge ($10) | $/MWh |
| \(v\) | stack wear, $6.01 per MWh | $/MWh |
| \(h\), \(\kappa_p\) | hydrogen price ($4), the credit in period \(p\) ($3.185, then 0) | $/kg |
| \(k\) | \(1000 / 57\), about 17.54 | kg/MWh |
| \(e\), \(L\) | the grid’s CO₂ rate (0.082), the tier’s limit (0.449 for the top tier) | t/MWh, kg/kg |
| \(u\) | power bought not matched in the same hour, never below 0 | MW |
| \(\mathit{AF}(r, N)\) | annuity factor, \((1 - (1+r)^{-N}) / r\) | years |
- Bounds matter. Every power variable is \(\ge 0\). Without \(u \ge 0\), a negative \(u\) in an hour that sells would cancel power bought in another hour: annual matching, not hourly.
- Two periods, one size. Period 1 is the credit’s 10 years, period 2 the rest of the life; both run on the same 36 days and share \(S\).
- Counting rules. No certificates: \(u = \mathit{imp}\). Annual matching: the cap counts the year’s \(\sum n_d (\mathit{imp} - \mathit{exp})\) in one row; it may go below zero there, because the right side never does. Across the grid, \(\mathit{exp}\) is the wind farm’s own sales.
- Behind one meter, the plant never buys and sells in the same hour (the tie rule), so hourly matching counts every MWh bought, as no certificates do: the page’s LP leaves \(u\) out there.
- Size. About 5,200 columns and 3,500 rows with a tier; HiGHS solves it in a fraction of a second.
Go deeper · ModelerWhy one LP per tier
- A step is not linear. The credit jumps from $0.635 to $3.185 per kg as the rate crosses limits; no single LP can hold the jump.
- Enumerate the steps. Each tier fixes the amount and adds one linear cap; five LPs (no credit, four tiers). The largest value wins; of the cases within $1 a year of it, the one listed first.
- Bound, then skip. Without its cap, a case’s hours are independent once the size is set, so its best value takes a few lines of arithmetic, not an LP. That is a bound. A case needs no LP when its bound falls more than $1 a year short of the best LP so far, or is no better than a case listed before it and already solved, which wins the tie (here, 4 of 5 skipped).
- The alternative. A mixed-integer program with one binary per tier picks the tier itself (M2); it gives no shadow prices, which come only from LPs.
- What it is not. The amounts are the law’s; the lesson never varies them.
Go deeper · AnalystThe credit as the IRS states it
- Who. A facility whose construction begins before 1 January 2028; Public Law 119-21 (2025) ended the credit for later starts. Paid for the 10 years from the day it is placed in service.
- What. Hydrogen with at most 4 kg CO₂e per kg, well-to-gate, from DOE’s 45VH2-GREET model. 2025 amounts: $0.637, $0.213, $0.159 and $0.127 per kg by tier; five times that with the prevailing wage and apprenticeship rules met.
- Bought power. It counts as clean only with energy attribute certificates from new plants in the same region, matched by year until 2029 and by hour from 2030 (final rules, T.D. 10023, effective 10 January 2025).
- Simplified here. One counting rule for all ten years; operating CO₂ in place of the rules’ life-cycle grid rate; no taxes, elective pay or transfers.
Go deeperWhat this model leaves out
- Taxes, depreciation, debt and the financing schedule: the cash flows are the project's, before tax (A1).
- Compression, storage, delivery and water: DOE's boundary for its cost per kg.
- Uncertainty: one weather year, known prices, fixed rules (M7, M8).
- Price-taking: the plant's buying and selling do not move Prairie Town's price.
- Part-load limits and output that falls with age: the electrolyzer runs anywhere from 0 to its size (M4).
Check yourself
Myth or fact? “A credit of $3.185 per kg is worth $3.185 per kg of the plant's lifetime output.”
- Myth
- Fact
Answer
Myth. It is paid for 10 of 30 years: levelized over the life it is worth about $1.24/kg here. Counting it every year overstates the NPV by $129.9M.
Myth or fact? “Moving the boundary only changes the accounting, never the plan.”
- Myth
- Fact
Answer
Myth. Taking the increment changes only the accounting (46.2 MW either way), but moving the electrolyzer across the grid changes the plan: 40.1 MW, with every MWh paying the charge.
A plant costs $100M up front. At 4% real over 30 years, what is its annual equivalent?
- $3.3M
- $5.8M
- $4.0M
- $17.3M
Answer
$5.8M: the CRF is 0.04 ÷ (1 − 1.04−30) = 0.0578.
$3.3M is $100M ÷ 30 with no interest; $4.0M is interest alone; 17.3 is the annuity factor, in years.
Numbers, sources and what’s next
Numbers to remember
| Number | What it means | Source |
|---|---|---|
| $3.185 per kg | The hydrogen credit's top tier in 2025 (less than 0.45 kg CO₂e per kg), with the wage and apprenticeship rules met: 5 × $0.637. | IRS, Instructions for Form 7210 (2025) · read 6 Nov 2026 |
| before 1 Jan 2028 | When construction must begin for a facility to qualify; the credit then runs 10 years from service. | IRS, Instructions for Form 7210 (2025), What's New · read 6 Nov 2026 |
| 0.0578 | The capital recovery factor at 4% real over 30 years: $1 up front equals $0.0578 a year. | Computed; the formula as in NREL's 1995 manual |
Keep going
In the real world
As the hydrogen price rose, the optimizer built a larger electrolyzer to use more surplus wind.
The larger unit ran at lower utilization, so each kilogram carried more capital and the levelized cost of hydrogen rose, while hydrogen revenue lowered total system cost.
Goal: the lowest life-cycle cost of the whole system, net of what it earns from electricity and hydrogen.
Where the result holds: one planned 253 MW wind farm in West Texas, with ERCOT wholesale prices; hydrogen sold at a set price per kilogram; cost assumptions dated 2020 to 2023.
It leaves out: final federal hydrogen credit rules, which came later; the rest of the grid, which enters only through wholesale prices; where the hydrogen goes after it is sold.
Case file CF2 tells the study's version: when the cost per kilogram and the cost of the system disagree.
Try it yourself
Optional, about 30 minutes; needs Python on your computer (lesson B2).
- Run
examples/configurations.py: wind, battery, electrolyzer, tank and fuel cell sized and run hour by hour on a synthetic site, with life-cycle costs as present values. - Read “Production incentives” in
docs/formulation.md: how does it handle an incentive that lasts fewer years than the analysis period? Compare it with this lesson's two periods.
reopt-hydrogen-framework: public example repository · MIT licence · synthetic data.
Sources and further reading
- IRS (2026). Instructions for Form 7210 (2025), Clean Hydrogen Production Credit: What's New, definitions and the table of rates and 2025 amounts. Page updated 30 April 2026.
- IRS (2025). Internal Revenue Bulletin 2025-13, T.D. 10023, Credit for Production of Clean Hydrogen (effective 10 January 2025): well-to-gate emissions, matching and incrementality.
- IRS. Clean hydrogen production credit. Page updated 31 December 2025.
- IRS. Prevailing wage and apprenticeship requirements: the two conditions behind the credit's × 5. Page updated 2 July 2026, read 6 November 2026.
- DOE Hydrogen Program (2024). Record 24005: Clean Hydrogen Production Cost Scenarios with PEM Electrolyzer Technology, Table 1 and p. 9.
- U.S. Bureau of Economic Analysis. NIPA Table 1.1.9, Implicit Price Deflators for GDP, line 1: 2022 118.026, 2025 128.893 (read 6 November 2026).
- Short, W., Packey, D. J. and Holt, T. (1995). A Manual for the Economic Evaluation of Energy Efficiency and Renewable Energy Technologies. NREL/TP-462-5173.
- Cutler, D. et al. (2017). REopt: A Platform for Energy System Integration and Optimization. NREL/TP-7A40-70022.
- Li et al. (2024). Towards sustainable integration: techno-economic analysis and future perspectives of Co-located wind and hydrogen energy systems. Journal of Mechanical Design 146(2), 020903.
- Earlier lessons: lesson 7 (levelized cost), A1 (cash flows and NPV), A12 (credits as instruments), A16 (matching rules), M3 (capacity expansion), M4 (the coupled plant).
Spotted an error, or stuck? Write to hlli@ksu.edu. Corrections are made in place and dated here.
Text licensed CC BY 4.0, code MIT: teachers and students may reuse and adapt it, with credit to Honglin Li.