Every equation behind the result
MicrogridModeler is a chronological techno-economic screening engine. This page publishes the implemented models, dispatch rules, the limits of the sizing search, the data sources, what the test harness checks, and the model boundaries.
Commercial quote: energy and cash-flow boundaries
The Quote Studio (commercial-quote-3.0) uses nominal dollars and an unlevered project comparison, with a separate customer loan or lease view. The Modeler equations follow below.
Solar and wind meet demand first. Staged natural gas and diesel fleets support economic, peak-period and backup-only operation. Optional generator charging and off-peak grid charging obey battery power, reserve and conversion limits. Stored energy is traced by origin, so grid-charged discharge is not labelled renewable. Monthly bills include charging imports. Dispatch is a chronological rule set, not optimized unit commitment. Separate outage studies start from the preceding modeled SOC and honour critical-load and fuel limits; they do not earn an assumed monetary reliability credit.
Each year is dispatched again with load growth, resource degradation and battery capacity fade. Replacement budgeting is annual: calendar life, full-equivalent discharge cycles or generator hours trigger costs at the next year boundary. Within-year replacement timing and downtime are outside this approximation.
Flat or weekday TOU energy rates, uniform or twelve monthly demand rates, fixed charges and exports are explicit. Complete 15-, 30- and 60-minute meter years can be imported with annual energy preserved; the hourly dispatch and billing model can understate subhourly demand. The two reference cases carry cited tariffs: Hawaiian Electric Schedule J (URDB, effective 2026-03-01) and Xcel Energy Minnesota General Service A14 (URDB, effective 2025-01-01), each with its listed simplifications. Solar defaults to a synthetic profile scaled to an editable annual yield; optional PVWatts provides a modeled typical year. No tax credit, deduction, salvage value or underwriting approval is assumed.
Inputs
Site, 8,760-hour load, component sizes, costs, operating limits and project horizon
Resource
Hourly weather from NLR PVWatts/NSRDB, a historical or uploaded year, or a calibrated synthetic year labelled as an offline estimate, converted by one PVWatts v8-equivalent chain
Dispatch
Every hour closes an explicit energy balance and carries battery state of charge forward
Feasibility
Unmet load, renewable fraction, excess energy and operating reserve are checked as constraints
Economics
Each project year is re-dispatched; nominal cash flows are discounted at the nominal rate
Resilience and evidence
Grid outages and component failures and repairs are scored; inputs, provenance, outputs and a fingerprint travel together
PV conversion chain
One chain converts every irradiance source (PVWatts weather, historical NSRDB years, uploaded files and the synthetic year) to AC output, so the same array means the same thing everywhere. Given PVWatts’ own weather, it reproduces PVWatts 8.5.0 within ±0.5 % a year and ±2 % a month in the test harness.
Calibrated synthetic weather
When no site dataset is used (the 20 reference cases, the offline fallback), the engine generates a weather year from the NASA POWER monthly climatology for the site (bundled on a 2° grid, 2001–2020 means). It is an estimate and is labelled as one.
Resource accuracy: offline synthetic vs PVWatts and PVGIS
The offline pipeline (bundled climatology, synthetic year, the chain above; open rack, tilt near latitude, equator-facing, 15 % DC losses) against NLR PVWatts 8.5.0 and JRC PVGIS 5.3 at the same geometry. Calibration sites: 19 of 23 within ±5 % of the closer reference, mean absolute error 2.8 %. Held-out sites, checked against PVWatts only: 8 of 12 within ±5 %, mean 4.6 %. Single months can differ by 10–40 %. The largest misses come from the input data: NASA POWER’s GHI runs about 10 % above both references at Nairobi.
Reference yields: tools/fixtures/resource (PVWatts fetched 2026-09-24/25; PVGIS PVcalc 2005–2023, 18.9 % total loss). Gated by npm run validate:resource.
P50/P90 and historical years
Utility tariffs and bill reconstruction
Simple-rate screening or full OpenEI URDB rate structures, priced against the same hourly grid exchange.
Fast scenario setup
Flat or weekday TOU energy, monthly demand, fixed charge, net metering or a custom export credit, and explicit import/export limits.
Complex rate fidelity
Weekday/weekend schedules, graduated energy tiers, monthly and TOU demand tiers, fixed and minimum charges, and export rules, following REopt’s URDB semantics.
8,760-hour dispatch, storage and fuel
Renewables serve load first, then storage; the battery follows explicit power and energy bounds; the generator fleet closes the remaining deficit.
Battery first, perfect 24-hour foresight
The generator starts only for a real deficit. Once committed, it can stay on and bank energy until the battery covers the next 24 hours of net deficit, using the modeled year’s own load and renewable output: a perfect forecast, so an upper bound on a real controller.
NPS favour-diesel policy
When the generator is needed, committed units run at rated power; load is served first, usable surplus charges storage, and any remainder is recorded as dumped generator energy.
NPS legacy policy
Renewables serve load first, then diesel precedes the battery. The generator does not start solely to charge storage; unavoidable minimum-load surplus can still be stored.
NPS maximum-reserve policy
Diesel protects the battery’s maximum SOC and storage discharges only after renewable and generator capacity. Sub-minimum operation is allowed and reported as wet-stacking.
Component disturbance, repair and resilience
Seeded fleet-unit failures, repair-driven capacity restoration, and the four resilience measures implemented in NPS Microgrid Planner v3.1, adapted under its MIT license.
Sizing search and lifecycle economics
A transparent sampled search with a bounded guarantee, then a cash-flow model built from the dispatch. Federal credits come from a dated rules table (policy as of 2026-09-24) and apply only after you confirm eligibility.
What the test harness checks
Every command below runs in continuous integration on each change. The list says what each one does and does not test.
Assumptions and model boundaries
These statements are part of the result.
Data sources
Only sources the code calls or bundles are listed. Satellite and model products are described as what they are.
Implemented and tested in the engine, not yet reachable from the app: NASA POWER climatology (point API). Results do not use them today.
Methods
- PV chain: PVWatts V5 manual (Dobos 2014) and the PVWatts v8 SAM source
- Transposition: Perez et al. (1990)
- Clear sky: Ineichen and Perez (2002)
- Battery fade and cost defaults: NREL REopt.jl
- Component resilience: NPS Microgrid Planner v3.1 (MIT)
- Resilience metric: Giachetti et al. (2022)
- Exceedance: NREL P50/P90 guidance (Dobos et al., NREL/CP-6A20-54488)
Public methodology
HTML and Markdown publish the equations, scope and citations without a login.
Open methodology.mdReference-case data
Every synthetic reference case exposes inputs, starting sizes, provenance and computed outputs as JSON.
Open benchmarks.jsonOpenAPI contract
The same simulation by reference-case key or a complete project payload.
Read API docs