# MicrogridModeler engineering methodology

Version: 2.5
Reviewed: 2026-07-20
Canonical HTML: https://www.microgridmodeler.com/methodology
OpenAPI: https://www.microgridmodeler.com/openapi.json
Reference data: https://www.microgridmodeler.com/benchmarks.json

## Direct answer

MicrogridModeler is a deterministic, chronological techno-economic screening engine. The local engine runs an explicit hourly energy balance, propagates battery state of charge, records renewable curtailment and generator surplus, tests supported feasibility constraints, recommends from the evaluated feasible set by lifecycle net present cost (NPC) or a declared robust objective, and retains the Pareto-efficient alternatives.

The default sizing search exhaustively evaluates a declared PV × battery × genset coarse grid, refines four promising basins jointly across DER sizes and dispatch policy, screens up to 12 finalists under four planning scenarios, and preserves the non-dominated decision set across NPC, capex, fuel, and renewable share. When historical weather is attached, up to 18 finalists are re-dispatched against every exact year, must meet the declared feasible-year probability, and are ranked by P90 high NPC. Its finite-set guarantee applies to explicitly evaluated candidates; this is not an unqualified proof of the continuous global optimum.

## Time model

- One non-leap chronological year contains 8,760 hourly values.
- Timestamped CSV/TSV load imports identify the demand column, parse zone-less timestamps deterministically, time-weight subhourly/multi-hour/irregular readings into energy-preserving one-hour averages, and align them to their correct non-leap calendar hours before dispatch.
- Custom meter profiles are immutable through site edits; changing the declared peak scales the attached profile rather than regenerating an archetype. Any selected 24-hour to 14-day window reconciles demand, supply, unmet energy, curtailment, fuel, generator operation, and SOC and can be exported directly.
- The model re-dispatches the system for every project year.
- Load grows by `(1 + annual load growth)^year`.
- PV availability declines by `(1 - PV degradation)^year`.
- The weather-year sequence repeats; it is not a distinct weather realization for every project year.
- The year-one hourly series is available as CSV or through the API with `includeHourly=true`.

## Solar geometry and irradiance

For day of year `n`, latitude `φ`, solar declination `δ`, and hour angle `ω`:

```text
δn = 23.45° × sin[2π(284 + n) / 365]
cos(θz) = sin(φ)sin(δ) + cos(φ)cos(δ)cos(ω)
G0 = 1367 × [1 + 0.033 cos(2πn/365)] × cos(θz)
```

Clock time is corrected using longitude, standard meridian, and the equation of time:

```text
B = 2π(n - 81) / 364
E_t = 9.87 sin(2B) - 7.53 cos(B) - 1.5 sin(B)  [minutes]
```

The labeled synthetic resource uses the Hottel clear-sky model:

```text
τb = a0 + a1 exp[-k / max(cos(θz), 0.05)]
τd = 0.271 - 0.294τb
```

The coefficients are altitude- and climate-adjusted. A seeded autoregressive daily clearness multiplier and bounded hourly fluctuation modulate the clear-sky envelope. The synthetic series is reproducible for the same site label, coordinates, and climate; it is not measured weather.

For hourly clearness index `kt = min(1, GHI/G0)`, the Erbs diffuse-fraction correlation is:

```text
kd = 1 - 0.09kt                                             kt <= 0.22
kd = 0.9511 - 0.1604kt + 4.388kt² - 16.638kt³ + 12.336kt⁴  0.22 < kt <= 0.8
kd = 0.165                                                   kt > 0.8
```

With surface tilt `β`, ground albedo `ρg`, and incidence angle `θi`, the fixed-plane isotropic transposition is:

```text
G_POA = DNI × max(0, cos(θi))
      + DHI × (1 + cos(β))/2
      + ρg × GHI × (1 - cos(β))/2
```

The PV conversion model is:

```text
Tcell = Tamb + (NOCT - 20) × G_POA / 800
Ppv = Prated × (G_POA/1000) × [1 + γ(Tcell - 25)] × derate
```

Ideal dual-axis tracking is also selectable. It keeps beam incidence normal to the array and uses a conservative horizontal-sky diffuse view. The PVWatts TMY path uses PVWatts' dual-axis array model directly.

PVWatts supplies a modeled typical-year AC-production series, not ground measurements. Historical NSRDB supplies satellite-derived/model irradiance records; they are converted to normalized PV output with the active array orientation, NOCT, temperature coefficient, and derate. Source, grid point, year, UTC offset, and conversion provenance are retained.

### Historical weather-year risk and sizing

The historical importer accepts:

- NREL NSRDB standard CSV with POA, or the complete GHI + DNI + DHI set;
- user timestamped irradiance with the same complete fields;
- timestamped normalized AC production in `pv_kw_per_kw`; or
- a strict headerless list of 8,760 normalized production values.

Leap-day hours are removed explicitly. Every represented year must then contain exactly 8,760
unique non-leap hourly records. A missing, duplicate, invalid, or non-finite row rejects the file;
the importer never interpolates a gap and markets it as historical evidence. NSRDB fill flags are
preserved and contribute to the disclosed A–D evidence grade.

For the fixed design, each exact weather year is repeated across the project horizon so load growth,
PV degradation, component replacement, tariff, and lifecycle economics remain comparable. The
report gives empirical P90/P50/P10 yield, feasible-year probability, P90 high NPC/fuel/unmet load,
worst-year unmet load, and every year-level outcome. The sizing optimizer applies the same year set
to finalists. A design must meet every hard constraint in at least the selected share of years;
passing finalists are ranked by P90 high NPC. If none passes, the UI labels the highest-probability
result as a planning fallback rather than a recommendation that met the gate.

This is planning evidence, not an automatic bankable probability claim. NSRDB is modeled/satellite-
derived, and finance-grade work still requires source validation, project-specific loss and
availability uncertainty, correlation treatment, and independent engineering review.

### Solar probability-of-exceedance screen

The optional P50/P90 screen re-runs the synthetic resource generator with 40 distinct deterministic
weather seeds. Annual specific yields are sorted into an empirical distribution. P90 is the 10th
non-exceedance percentile (the value exceeded by 90% of sampled years); P50 is the median and P10 is
the 90th non-exceedance percentile. The report also includes the sample standard deviation and
coefficient of variation.

When the active resource is NREL PVWatts, every sampled yield is scaled by one common factor so the
distribution median equals the active TMY specific yield. This anchors the center, not the uncertainty:
the spread remains synthetic. This feature is a planning screen, not a bankable probability-of-
exceedance study. It does not replace quality-controlled multi-year measured records, a complete loss
and availability uncertainty budget, spatial correlation, or independent engineer review.

## Battery and converter

Battery charging and discharging obey energy, power, converter, and SOC limits:

```text
E(t+1) = min(Emax, E(t) + Pcharge × ηbattery,charge × ηconverter × Δt)
E(t+1) = max(Emin, E(t) - Pdischarge × Δt / (ηbattery,discharge × ηconverter))
Emin = minimum SOC × battery capacity
Emax = maximum SOC × battery capacity
```

Equivalent full cycles are computed from charge and discharge throughput. Calendar life and throughput-based cycle life both influence the replacement schedule. The current model does not simulate cell voltage, electrochemical temperature, rainflow degradation, or manufacturer warranty logic.

## Dispatch order

For the local off-grid engine, renewables are must-take:

1. PV and wind serve load.
2. Renewable surplus charges the battery within its power and energy limits.
3. Remaining renewable surplus is recorded as curtailment.
4. Storage and the generator cover the remaining deficit according to the selected strategy.
5. Any remaining deficit is recorded as unmet load.

Four energy-management systems are selectable:

1. **Smart battery-first / load-following** uses a 24-hour net-deficit look-ahead once the generator is committed so it can bank enough energy to reduce rapid starts.
2. **NPS favor diesel / cycle-charging** runs the generator at rated output when needed, serves load, and banks usable surplus.
3. **NPS diesel-first legacy** uses diesel after renewables and before battery storage, but does not start the generator solely to charge.
4. **NPS maintain maximum SOC** protects battery reserve with diesel and uses storage only after renewable and generator capacity; sub-minimum operation is permitted and recorded as wet-stacking.

In every mode, energy that cannot serve load or charge storage is recorded as dumped generator output.

## Generator part-load fuel

When the generator is on:

```text
Pgen >= minimum-load-ratio × Prated
Fuel [L/h] = F0 [L/h/kW rated] × Prated + F1 [L/kWh] × Pgen
```

`F0` captures the rated-capacity-dependent no-load intercept and `F1` captures marginal fuel per electrical kWh. Fuel is charged against the actual generator operating setpoint, including output later recorded as dumped surplus. Normal dispatch uses aggregate fleet capacity and records generator starts and wet-stacking. Disturbance analysis divides that capacity into independently fail-able equal-sized units. Individual-unit commitment, start fuel, minimum up/down time, and nonlinear manufacturer curves are not modeled.

## Component disturbance, repair, and resilience

The NPS Microgrid Planner v3 disturbance/repair framework is implemented for PV, wind, battery strings, and gensets. Each fleet has an explicit unit count, exposure count, component failure probability, and mean repair time. Deterministic mode fails every exposed unit for its entered repair time. Stochastic mode is reproducibly seeded:

```text
Failed_i ~ Bernoulli(p_asset)
Trepair_i ~ Exponential(mean = MTTR_asset)
Aasset(t) = [Nunits - Σ_i 1(Trepair_i > t)] / Nunits
```

Failed capacity is removed at the disturbance start and returns as repairs complete. PV/wind availability, battery energy/power, and genset power are each derated by their live fleet availability. Genset startup delay and available outage fuel are enforced. The critical-load service fraction is:

```text
S(t) = min(1, Psupplied(t) / Pcritical-load(t))
```

All four NPS resilience measures are reported for the specified event window, a local start-time shift window, and sampled start times over the full year:

```text
R_invulnerability-recovery = 0.5 × S(tevent) + 0.5 × [Σ Eserved / Σ Ecritical-load]
R_average-demand = average min(1, Psupplied(t) / Pdemand(t))
R_average-peak-demand = average min(1, Psupplied(t) / Pannual-peak)
R_average-median-demand = average S(t) for demand above the annual median
```

The same analysis adds deterministic seed provenance, probability of serving the complete event, mean and P95 unserved energy, asset failure outcomes, recovery time, and a mean load-service curve. The separate REopt-style outage simulator still evaluates every requested outage start/duration from the normally dispatched SOC trajectory.

## Energy accounting

Each hour closes the balance among load, charging, generation, discharging, curtailment, grid exchange, and unmet load. Key reported definitions are:

```text
renewable fraction = renewable energy serving load / total served load
excess fraction = (renewable curtailment + dumped generator output) / total generated energy
unmet fraction = unmet energy / load energy
```

Battery discharge is attributed to renewable or non-renewable energy by the origin of the energy that charged it.

### Grid tariff accounting

The simple tariff path supports flat or weekday time-of-use energy prices, a monthly demand charge,
fixed monthly charge, export credit or annual net-metering cap, and import/export power limits. The
full tariff path accepts an OpenEI Utility Rate Database JSON structure and preserves weekday/weekend
and monthly energy schedules, graduated monthly energy tiers, tiered monthly demand charges,
time-of-use demand ratchets, fixed charges, minimum monthly/annual charges, and export rules.

Energy tiers are billed against monthly cumulative imports. Demand charges use the applicable monthly
or scheduled-period peak grid import. Demand lookback/ratchet carry-over across months and coincident-
peak charges are not modeled. A location lookup currently seeds an annual-average NREL rate; it does
not automatically select or certify the customer’s applicable URDB tariff.

## Feasibility and optimization

The local sizing objective is:

```text
minimize NPC(x)
subject to:
  hourly energy balance
  battery energy and power bounds
  generator and converter bounds
  maximum unmet-load fraction
  minimum renewable fraction
  maximum excess-energy fraction
  off-grid operating-reserve rule
```

The PV × battery-energy × genset coarse grid is exhaustively evaluated. Four best feasible coarse basins are refined independently. Each refinement jointly explores PV × battery interactions, PV capacity, wind capacity, battery energy, battery power, genset capacity, and all four dispatch policies. The reported local-neighborhood gap and boundary warnings are resolution diagnostics, not a formal continuous optimality gap.

Robust mode promotes up to 12 distinct nominal finalists through expected, 10%-higher-load, 15%-renewable-drought, and combined load/resource/fuel/capex downside scenarios. Each scenario re-runs the complete chronological dispatch and lifecycle economics. The selected design must remain feasible in every case and minimizes:

```text
risk-adjusted NPC = probability-weighted expected NPC
                  + risk aversion × (worst-case NPC - expected NPC)
```

Scenario multipliers, weights, candidate count, feasibility, expected/worst NPC, and the selection/fallback rule are returned as evidence. These planning stresses are declared assumptions, not probabilistic forecasts.

After feasibility screening, a candidate is Pareto-efficient when no other feasible candidate is no worse in nominal NPC, installed capex, annual fuel, and renewable fraction, and strictly better in at least one of those objectives. The complete frontier and lowest-NPC, lowest-capex, lowest-fuel, and highest-renewable anchors are returned. This preserves legitimate planning tradeoffs without changing the declared recommendation rule.

## Lifecycle economics

Cash flows use constant dollars and a real discount rate:

```text
ireal = (1 + inominal)/(1 + inflation) - 1
NPC = capex + Σ[cost(t)/(1 + ireal)^t] - discounted salvage - discounted incentives
LCOE = PV(cost excluding unmet-load penalty) / PV(served energy)
```

The model includes technology and BOS capital, fixed development/permitting cost, capex contingency, fixed and variable O&M with optional real escalation, annual insurance/asset-management cost, escalating fuel, an escalating carbon price, utilization-derived replacement schedules, optional real replacement-cost learning, end-of-horizon salvage, an eligible clean-energy investment tax credit, and decommissioning/restoration allowance. A dispatch-modeled diesel-only or grid-only baseline uses the same applicable cash-flow rules. NPC includes the value-of-lost-load penalty; LCOE excludes that penalty and reports it separately. Advanced terms default to zero, so older saved payloads remain valid and incur no advanced-cost contribution.

## Scope boundaries

- Single-bus energy balance, not AC power flow.
- No protection, fault-current, grounding, cable, transformer, or transient-stability study.
- No spatial PV layout or constructability check.
- Synthetic reference weather is for screening and education; historical records improve planning evidence but still require project-specific validation for finance-grade work.
- Equal-sized fleet disturbance units do not replace a detailed heterogeneous unit-commitment or protection study.
- A deterministic sampled search does not equal a continuous-variable global-optimality proof.
- Results are planning evidence, not a stamped engineering design.

## Reproducibility package

The interactive modeler can export:

- Full project inputs, including the 8,760-hour load.
- Resource provenance, complete historical weather series, quality flags, empirical risk outcomes, and the feasible-year threshold when attached.
- Technical and economic results.
- Deterministic outage and stochastic component-disturbance/repair results.
- Year-one hourly dispatch CSV.
- A versioned JSON run package.
- A deterministic cyrb53 content fingerprint over serialized inputs.

The fingerprint is a reproducibility identifier, not a cryptographic security hash.

## Primary citations

1. Hottel, H. C. (1976), “A simple model for estimating the transmittance of direct solar radiation through clear atmospheres,” *Solar Energy* 18(2), 129–134. https://doi.org/10.1016/0038-092X(76)90045-1
2. Erbs, D. G., Klein, S. A., and Duffie, J. A. (1982), “Estimation of the diffuse radiation fraction for hourly, daily and monthly-average global radiation,” *Solar Energy* 28(4), 293–302. https://doi.org/10.1016/0038-092X(82)90302-4
3. NREL PVWatts V8 API documentation. https://developer.nrel.gov/docs/solar/pvwatts/v8/
4. NREL NSRDB direct CSV download documentation. https://developer.nrel.gov/docs/solar/nsrdb/
5. NREL NSRDB GOES Aggregated PSM v4. https://developer.nrel.gov/docs/solar/nsrdb/nsrdb-GOES-aggregated-v4-0-0-download/
6. NREL End-Use Load Profiles. https://www.nrel.gov/buildings/end-use-load-profiles.html
7. NREL Annual Technology Baseline. https://atb.nrel.gov/
8. OpenEI Utility Rate Database. https://openei.org/wiki/Utility_Rate_Database
9. HOMER Pro generator fuel-curve documentation, used as an independent cross-check of the linear intercept-plus-slope formulation. https://homerenergy.com/products/pro/docs/latest/generator_fuel_curve_slope.html
10. Reich, D. and Frye, L., *Microgrid Planner: An Open-Source Software Platform*, INFORMS Journal on Computing. https://doi.org/10.1287/ijoc.2023.0336
11. Reich, D., Microgrid Planner v3.1 source repository. https://github.com/reichd/MicrogridPlanner
12. Giachetti, R. E., Van Bossuyt, D. L., Anderson, W. W., and Oriti, G. (2022), “Resilience and Cost Trade Space for Microgrids on Islands,” *IEEE Systems Journal* 16(3), 3939–3949. https://doi.org/10.1109/JSYST.2021.3103831
