Public engineering methodology · v2.5

Every equation behind the microgrid result

MicrogridModeler is a chronological techno-economic screening engine. This page publishes the implemented equations, dispatch order, optimization guarantee, data lineage, and model boundaries in crawlable HTML.

Direct answer. The local engine runs an hourly, chronological energy balance for every year of the project, carries battery state of charge forward, records generator surplus and renewable curtailment explicitly, rejects designs that violate supported constraints, and retains Pareto-efficient alternatives. When historical weather is attached, it re-dispatches the fixed design and sizing finalists across every exact year, applies a feasible-year probability gate, and ranks passing finalists by P90 high lifecycle cost.
Step 1

Inputs

Site, 8,760-hour load, component sizes, costs, operating limits, project horizon

Step 2

Resource

Measured PVWatts/NSRDB when selected; otherwise a labeled, seeded Hottel + Erbs synthetic series

Step 3

Dispatch

Every hour closes an explicit energy balance and propagates battery state of charge

Step 4

Feasibility

Unmet load, renewable fraction, excess energy, and operating reserve are checked as constraints

Step 5

Economics

Each project year is re-dispatched; granular capital, owner, operating, replacement, carbon, and closeout cash flows are discounted explicitly

Step 6

Resilience & evidence

Grid outages plus component failures/repairs are scored; inputs, provenance, outputs, CSV, and fingerprint travel together

Solar geometry and PV conversion

Mid-hour solar position → clear-sky envelope → cloud modulation → diffuse split → tilted plane → module temperature.

QuantityImplemented equation
Solar declinationδₙ = 23.45° · sin[2π(284 + n) / 365]
Equation of timeEₜ = 9.87 sin(2B) − 7.53 cos(B) − 1.5 sin(B), B = 2π(n − 81)/364
Solar zenithcos θz = sin φ sin δ + cos φ cos δ cos ω
Extraterrestrial horizontalG₀ = 1367 · [1 + 0.033 cos(2πn/365)] · cos θz
Hottel beam transmittanceτb = a₀ + a₁ exp[−k / max(cos θz, 0.05)]
Clear-sky diffuseτd = 0.271 − 0.294τb
Clearness indexkₜ = min(1, GHI / G₀)
Erbs diffuse fractionkd = 1 − 0.09kₜ (kₜ≤0.22); polynomial (0.22<kₜ≤0.8); 0.165 (kₜ>0.8)
Plane-of-array irradianceGPOA = DNI·max(0, cos θi) + DHI(1+cos β)/2 + ρg·GHI(1−cos β)/2
Cell temperatureTcell = Tamb + (NOCT − 20)·GPOA/800
PV outputPPV = Prated · (GPOA/1000) · [1 + γ(Tcell − 25)] · derate
Resource-data boundary. These equations generate the labeled synthetic resource used by the reference suite. PVWatts supplies a modeled typical-year AC series—not ground measurements. Historical NSRDB supplies satellite-derived/model irradiance years that are converted with the active array assumptions. Source, grid point, year, fill flags, and conversion provenance are retained.
P50/P90 screening boundary. The optional exceedance screen evaluates 40 distinct deterministic synthetic weather seeds and reports the empirical P90, P50, P10, standard deviation, and complete curve. With active PVWatts data, the curve is median-anchored to its TMY yield. The spread is still synthetic and is not a lender-grade substitute for quality-controlled multi-year weather records and a complete uncertainty budget.
Historical-year gate. The importer accepts normalized PV production, POA irradiance, or complete GHI+DNI+DHI records. Each year must contain exactly 8,760 unique non-leap hours after explicit leap-day removal; missing, duplicate, and invalid rows are rejected without interpolation. The fixed design and up to 18 optimizer finalists are evaluated over every year. A finalist must meet the selected hard-constraint pass probability, then P90 high NPC selects among passing designs. This is decision-grade planning evidence, not a bankable loss-uncertainty study.

Utility tariffs and bill reconstruction

Rapid simple-rate screening or full OpenEI URDB rate structures, priced against the same hourly grid exchange.

Simple builder

Fast scenario setup

Flat or weekday TOU energy, monthly demand, fixed charge, net metering or custom export credit, and explicit import/export limits.

URDB import

Complex rate fidelity

Weekday/weekend schedules, graduated energy tiers, monthly demand tiers, TOU demand ratchets, fixed/minimum charges, and export rules are preserved from imported JSON.

Rate-selection boundary. Location lookup currently seeds an NREL annual-average rate. The analyst must still import and verify the customer’s applicable tariff; demand lookback across months and coincident-peak charges remain outside the local bill engine.

8,760-hour dispatch, storage, and fuel

Renewables serve load first, then storage; the battery follows explicit power and energy bounds; the genset closes the remaining deficit.

QuantityImplemented equation
Battery chargeEₜ₊₁ = min(Emax, Eₜ + Pcharge·ηcharge·Δt)
Battery dischargeEₜ₊₁ = max(Emin, Eₜ − Pdischarge·Δt/ηdischarge)
Charge efficiencyEcharged = PAC · ηbattery,charge · ηconverter · Δt
Discharge efficiencyPAC = ΔEstored · ηbattery,discharge · ηconverter / Δt
Generator minimum outputPgen ≥ minimum-load-ratio · Prated whenever the generator is on
Linear fuel curveFₜ [L/h] = F₀ [L/h/kWrated]·Prated + F₁ [L/kWh]·Pgen,ₜ
Hourly balanceLoad + charge + curtailment = PV + wind + discharge + generator + grid import − grid export + unmet
Renewable fractionRenewable energy serving load / total served load; battery discharge is attributed by charging origin
Excess fraction(renewable curtailment + dumped generator output) / total generated energy
Load-following

Deficit-driven, with 24-hour foresight

The genset starts only for a real deficit. Once committed, it can remain on and bank energy until the battery can cover the next 24 hours of forecast net deficit, reducing rapid starts without hiding output.

Cycle-charging

NPS favor-diesel policy

When the genset is needed it operates at rated power; load is served first, usable surplus charges storage, and any remainder is recorded as dumped generator energy.

Diesel-first

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.

SOC-maintaining

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 every resilience score implemented by NPS Microgrid Planner v3.

QuantityImplemented equation
Stochastic component failureFailedᵢ ~ Bernoulli(passet), independently for each exposed fleet unit
Stochastic repair timeTrepair,ᵢ ~ Exponential(mean = MTTRasset); deterministic mode uses Trepair = MTTR
Hourly availabilityAasset(t) = [Nunits − Σᵢ 1(Trepair,ᵢ > t)] / Nunits
Load satisfactionS(t) = min(1, Psupplied(t) / Pcritical-load(t))
Invulnerability–recoveryRIR = 0.5 · S(tevent) + 0.5 · [Σ Eserved / Σ Ecritical-load]
Average demand performanceRD = (1/T) · Σt min(1, Psupplied(t)/Pdemand(t))
Average peak-demand performanceRP = (1/T) · Σt min(1, Psupplied(t)/Pannual-peak)
Median-demand performanceRM = average S(t) over hours with demand above the annual median
Shift methodsRlocal/global = average R over sampled disturbance start times in the local/full-year window
Parity-plus implementation. Fixed, local-shift, and global-shift results include all four NPS measures. The same run also reports fleet failure outcomes, P95 energy not served, probability of fully serving the event, recovery time, a mean service curve, deterministic seeds, and outage cost.

Sizing search and lifecycle economics

A transparent sampled search with a bounded guarantee, followed by a cash-flow model built from the dispatch.

QuantityImplemented equation
Real discount rateireal = (1 + inominal)/(1 + inflation) − 1
Net present costNPC = capex + Σₜ(costₜ/(1+ireal)ᵗ) − discounted salvage − discounted incentives
Levelized costLCOE = PV(cost excluding value-of-lost-load penalty) / PV(served energy)
Sizing objectivemin NPC(x), subject to dispatch balance, SOC and power bounds, and user feasibility limits
Sampled-search guaranteex* = arg min NPC(x), for every feasible x in the explicitly evaluated candidate set
Risk-adjusted objectiveNPCrisk = E[NPCscenario] + λ · (max NPCscenario − E[NPCscenario])
Pareto decision setKeep x when no feasible y is no-worse in NPC, capex, fuel, and renewable share, and strictly better in at least one
What “deterministic” means here. Identical inputs evaluate the same candidates, produce the same hourly series, and return the same recommendation and Pareto set. The coarse grid is exhaustive; four promising basins are jointly refined and dispatch policy is co-optimized. Robust mode screens up to 12 finalists under expected, high-load, renewable-drought, and combined downside cases and requires all-scenario feasibility. The engine also retains every feasible design not dominated across NPC, capex, fuel, and renewable share. This finite search is not mathematically equivalent to a continuous-variable MILP; candidate counts, scenario outcomes, decision anchors, boundary warnings, and a local-gap proxy expose its resolution.

Assumptions and model boundaries

These statements are part of the result, not footnotes hidden after the decision.

Chronology. One 8,760-hour resource and load shape is re-dispatched for every project year. PV degradation and load growth change the hourly magnitudes; the weather-year sequence itself repeats.
Interval load import. Timestamped CSV/TSV inputs identify the demand column, parse zone-less timestamps deterministically, time-weight subhourly, multi-hour, or irregular readings into energy-preserving one-hour averages, and align them to the correct non-leap calendar hours. Custom profiles survive site edits and peak changes scale rather than replace them.
Window evidence. Any selected 24-hour to 14-day period reconciles demand, served and unmet energy, direct renewables, battery, grid/diesel, curtailment, fuel, generator operation, and state of charge and can be exported as timestamped CSV.
Synthetic resource. Reference templates use a physics-based, seeded synthetic weather series unless a measured resource is explicitly selected. Synthetic is reproducible, but it is not a substitute for measured site data in final design.
Single-bus boundary. The local engine closes an energy balance at one bus. It is not AC power flow, protection coordination, cable sizing, or a transient stability study.
Generator model. Normal dispatch uses an aggregate fleet capacity with a linear fuel curve, minimum-load bound, selectable EMS, startup delay, starts, and wet-stacking evidence. Disturbance analysis subdivides that capacity into independently fail-able equal-sized units. Individual-unit commitment, minimum up/down time, and nonlinear manufacturer curves are not modeled.
Battery model. Usable energy, separate charge/discharge power and efficiencies, minimum/maximum SOC, cycle throughput, calendar life, and independently fail-able equal-sized strings are explicit. Electrochemical voltage, temperature, and rainflow degradation are outside the current scope.
Disturbance model. Component failures are independent Bernoulli events and stochastic repair time is exponential around the entered mean. Common-cause correlation can be represented with deterministic exposed-unit failures, but a fitted copula or network-topology failure model is not implied.
Optimization claim. The coarse PV × battery × genset grid is exhaustively evaluated; several feasible basins are jointly refined over PV, wind, battery energy/power, genset, and all dispatch policies. Robust mode screens finalists under declared scenarios. This is deterministic, but not a continuous global-optimality proof.
Economics. Constant-dollar cash flows use a real discount rate. Technology/BOS capital, development, contingency, O&M escalation, insurance/asset management, fuel, carbon, replacements with optional learning, salvage, ITC, decommissioning, and a dispatch-modeled baseline are explicit. LCOE excludes value-of-lost-load; NPC includes it.

Primary methods and public data

Direct links are included so a reviewer—or an answer engine—can follow every important claim to its source.

DomainPrimary sourceUse in MicrogridModeler
Solar methodHottel (1976)Clear-atmosphere direct-beam transmittance and climate corrections.
Diffuse splitErbs, Klein & Duffie (1982)Hourly diffuse fraction as a piecewise function of clearness index.
Measured solarNREL PVWatts / NSRDBHourly site-specific PV output and underlying station metadata when the measured flow is selected.
Load profilesNREL End-Use Load ProfilesDOE reference-building profiles used by the simulated-load flow.
TariffsOpenEI Utility Rate DatabaseUtility tariff structures queried through NREL APIs.
Cost baselinesNREL Annual Technology BaselinePublic cost and performance reference points; every project value remains editable.
Fuel pricesU.S. Energy Information AdministrationPublic petroleum price series for scenario assumptions.
Fuel-curve cross-checkHOMER Pro generator documentationIndependent documentation of the same rated-capacity intercept plus output-dependent slope form.
Component resilienceNPS Microgrid Planner v3.1Component disturbance probabilities, repair times, fixed-window scoring, and local/global start-time shift methods.
Resilience metricGiachetti et al. (2022)Invulnerability–recovery resilience measure implemented by the NPS platform and reproduced here.
Human-readable

Public methodology

Open HTML and Markdown publish the equations, scope, and citations without a login or PDF gate.

Open methodology.md
Machine-readable

Benchmark data

Every reference project exposes inputs, starting sizes, provenance, and computed outputs as JSON.

Open benchmarks.json
Headless

OpenAPI contract

The same deterministic simulation can be called by benchmark key or a complete project payload.

Read API docs