Utility Tariff and Metering Validation Report · Test Matrix

Utility Tariff and Metering Test Matrix

Every parameter we varied, every gate we scored, every result we published. Thirteen stages, 174 test cases, all passing.

Stage 1 - Flat single-period rate

30 test cases, all passing

Pass

Reference engine: NREL System Advisor Model PySAM 7.1.1 Utilityrate5 with ur_ec_tou_mat populated as a single period at the flat rate, demand charges disabled (ur_dc_enable=0), monthly fixed charge zeroed out. Bill output read from Outputs.utility_bill_w_sys_year1 (scalar annual) and Outputs.charge_w_sys_ec_ym (12-tuple monthly). Both engines collapse to load times rate by construction.

Parameter sweeps

ParameterLevelsValues
Flat retail rate10$0.05, $0.075, $0.10, $0.125, $0.15, $0.20, $0.25, $0.30, $0.40, $0.50 per kWh
Building archetype3Large Hospital (DOE Commercial Reference Building, 6.6 GWh/yr); Large Office (5.7 GWh/yr); Standalone Retail (320 MWh/yr); all from RefBldg*New2004_Chicago.idf against the Chicago O'Hare TMY3
Run period1Full 8760-hour year

Gates scored on every case

GateToleranceResult
Annual bill+/- 5% (ASHRAE Guideline 14-2023)+/-0.0000% on all 30
Monthly bill NMBE+/- 5% (ASHRAE Guideline 14-2023 monthly)+/-0.0000% on all 30
Monthly bill CV(RMSE)<= 15% (ASHRAE Guideline 14-2023 monthly)0.0000% on all 30
Download sample workbook (.xlsx)7 sheets · Inputs, both engines' outputs, live formula-driven NMBE / CV(RMSE) / annual deviation, gate table, and embedded comparison charts.

Stage 1B - Flat rate, annual archetype profile

9 test cases, all passing

Pass

Reference engine: Same NREL SAM PySAM 7.1.1 Utilityrate5 contract as Stage 1, run through the parallel annual-driver entry point. Confirms the annual driver and plumbing that subsequent Stages 2B-12B would use.

Parameter sweeps

ParameterLevelsValues
Flat retail rate3$0.10, $0.15, $0.25 per kWh
Building archetype3Large Hospital; Large Office; Standalone Retail
Run period1Full 8760-hour year

Gates scored on every case

GateToleranceResult
Annual bill+/- 5% (ASHRAE Guideline 14-2023)+/-0.0000% on all 9
Monthly bill NMBE+/- 5% (ASHRAE Guideline 14-2023 monthly)+/-0.0000% on all 9
Monthly bill CV(RMSE)<= 15% (ASHRAE Guideline 14-2023 monthly)0.0000% on all 9
Download sample workbook (.xlsx)7 sheets · Inputs, both engines' outputs, live formula-driven NMBE / CV(RMSE) / annual deviation, gate table, and embedded comparison charts.

Stage 2 - Time-of-use energy rates

18 test cases, all passing

Pass

Reference engine: NREL SAM PySAM 7.1.1 Utilityrate5 with ur_ec_sched_weekday[12][24], ur_ec_sched_weekend[12][24], and ur_ec_tou_mat[N][6] derived from the same TariffSchedule abstraction that drives CogenS. Post-init coverage check verifies every (month, hour, daytype) cell is claimed by exactly one HourBlock. Calendar pinned to Monday January 1 2018 to match the internal SAM weekday/weekend mapping.

Parameter sweeps

ParameterLevelsValues
TOU schedule6PG&E E-19 (5 periods); SCE GS-3 (4); ConEd SC-9 (4); ERCOT TOU (3); NYSEG TOU (2); SDG&E EV-TOU-5 (6)
Building archetype3Large Hospital; Large Office; Standalone Retail
Run period1Full 8760-hour year

Gates scored on every case

GateToleranceResult
Annual bill+/- 5% (ASHRAE Guideline 14-2023)+/-0.0000% on all 18
Monthly bill NMBE+/- 5% (ASHRAE Guideline 14-2023 monthly)+/-0.0000% on all 18
Monthly bill CV(RMSE)<= 15% (ASHRAE Guideline 14-2023 monthly)0.0000% on all 18
Download sample workbook (.xlsx)7 sheets · Inputs, both engines' outputs, live formula-driven NMBE / CV(RMSE) / annual deviation, gate table, and embedded comparison charts.

Stage 3 - Tiered block-rate energy schedules

12 test cases, all passing

Pass

Reference engine: NREL SAM PySAM 7.1.1 Utilityrate5 with ur_ec_tou_mat rows of [period_idx, tier_idx, max_usage, units='kWh', buy_rate, sell_rate] per tier. Cumulative-monthly threshold model: tiers reset on the month boundary; each hour's kWh allocated to whichever tier the running cumulative position falls into.

Parameter sweeps

ParameterLevelsValues
Tiered tariff4SDG&E DR Baseline (3-tier residential); PG&E E-1 (2-tier residential); SCE TOU-D Tiered (3-tier; tiered-only mode for Stage 3); Commercial Block 2-Tier (generic medium commercial)
Building archetype3Large Hospital; Large Office; Standalone Retail
Run period1Full 8760-hour year

Gates scored on every case

GateToleranceResult
Annual bill+/- 5% (ASHRAE Guideline 14-2023)+/-0.0000% on all 12
Monthly bill NMBE+/- 5% (ASHRAE Guideline 14-2023 monthly)+/-0.0000% on all 12
Monthly bill CV(RMSE)<= 15% (ASHRAE Guideline 14-2023 monthly)0.0000% on all 12
Download sample workbook (.xlsx)7 sheets · Inputs, both engines' outputs, live formula-driven NMBE / CV(RMSE) / annual deviation, gate table, and embedded comparison charts.

Stage 4 - Demand charges (dollars per kW-month)

12 test cases, all passing

Pass

Reference engine: NREL SAM PySAM 7.1.1 Utilityrate5 with ur_dc_enable=1 plus ur_dc_flat_mat (flat NCD) and ur_dc_tou_mat plus ur_dc_sched_weekday / ur_dc_sched_weekend (TOU demand) derived from the same DemandSchedule abstraction that drives CogenS. The translator merges all-hours weekday-plus-weekend NCD pairs into a single DemandPeriod to match SAM's combined-daytype monthly peak.

Parameter sweeps

ParameterLevelsValues
Demand structure4Flat NCD Low ($5/kW-month all hours); Flat NCD Mid ($15/kW-month all hours); TOU Summer Peak ($25/kW-month on summer weekday 12-18 monthly peak); Combined NCD + TOU peak ($10 NCD + $20 TOU)
Building archetype3Large Hospital; Large Office; Standalone Retail
Run period1Full 8760-hour year

Gates scored on every case

GateToleranceResult
Annual demand-charge bill+/- 5% (ASHRAE Guideline 14-2023)+/-0.0000% on all 12
Monthly demand-charge bill NMBE+/- 5% (ASHRAE Guideline 14-2023 monthly)+/-0.0000% on all 12
Monthly demand-charge bill CV(RMSE)<= 15% (ASHRAE Guideline 14-2023 monthly)0.0000% on all 12
Download sample workbook (.xlsx)7 sheets · Inputs, both engines' outputs, live formula-driven NMBE / CV(RMSE) / annual deviation, gate table, and embedded comparison charts.

Stage 5 - Combined TOU energy plus demand bundles

9 test cases, all passing

Pass

Reference engine: NREL SAM PySAM 7.1.1 Utilityrate5 with both the energy-rate inputs (Stage 2 path) and the demand-rate inputs (Stage 4 path) populated jointly. The composition stage; no new SAM contract beyond the two predecessor stages.

Parameter sweeps

ParameterLevelsValues
Combined utility bundle3PG&E B-19 (E-19 TOU energy + $25/kW NCD + $15/kW summer-peak demand adder); SCE TOU-GS-3-B (GS-3 TOU energy + $18/kW NCD + $12/kW summer on-peak demand); ConEd SC-9 R4 (SC-9 TOU energy + $25/kW flat NCD, no TOU demand)
Building archetype3Large Hospital; Large Office; Standalone Retail
Run period1Full 8760-hour year

Gates scored on every case

GateToleranceResult
Annual combined bill+/- 5% (ASHRAE Guideline 14-2023)+/-0.0000% on all 9
Monthly combined bill NMBE+/- 5% (ASHRAE Guideline 14-2023 monthly)+/-0.0000% on all 9
Monthly combined bill CV(RMSE)<= 15% (ASHRAE Guideline 14-2023 monthly)0.0000% on all 9
Download sample workbook (.xlsx)7 sheets · Inputs, both engines' outputs, live formula-driven NMBE / CV(RMSE) / annual deviation, gate table, and embedded comparison charts.

Stage 6 - Multi-year tariff escalation

12 test cases, all passing

Pass

Reference engine: Year 1: live NREL SAM PySAM 7.1.1 Utilityrate5 (matched handshake on the Stage 5 combined bundle). Years 2 through 10: NIST Handbook 135 closed-form escalation formula, applied as the analytical reference because SAM Utilityrate5's bill output for years 2 through N is a flat repetition of year 1 (the rate_escalation input is consumed downstream by SAM Cashloan and SingleOwner, not by Utilityrate5's bill output itself).

Parameter sweeps

ParameterLevelsValues
Escalation case4PG&E B-19 @ 0%/yr over 10 years (sanity); PG&E B-19 @ 2.5%/yr over 10 years; SCE TOU-GS-3-B @ 3%/yr over 10 years; ConEd SC-9 R4 @ 4%/yr over 10 years
Building archetype3Large Hospital; Large Office; Standalone Retail
Analysis horizon110 years

Gates scored on every case

GateToleranceResult
Year-1 bill vs SAM (matched handshake)+/- 5% (ASHRAE Guideline 14-2023)+/-0.0000% on all 12
Years 2-10 projection vs NIST Handbook 135 closed-form+/- 0.5% per year+/-0.0000% on every year of every scenario
Download sample workbook (.xlsx)7 sheets · Inputs, both engines' outputs, live formula-driven NMBE / CV(RMSE) / annual deviation, gate table, and embedded comparison charts.

Stage 7 - NEM 1.0 net energy metering

9 test cases, all passing

Pass

Reference engine: NREL SAM PySAM 7.1.1 Utilityrate5 with ur_metering_option=0 (kWh-netted, paired with ur_nm_yearend_sell_rate for the year-end true-up compensation rate) or ur_metering_option=1 (dollar credits, paired with ur_sell_eq_buy=1). PV generation injected via ur.SystemOutput.gen as a deterministic noon-bell synthetic profile sized to 30% of annual load - byte-identical to what CogenS sees.

Parameter sweeps

ParameterLevelsValues
NEM 1.0 variant3kWh-netted + flat retail rate (ur_metering_option=0); dollar credits + flat (ur_metering_option=1, ur_sell_eq_buy=1); dollar credits + NYSEG TOU
Building archetype3Large Hospital; Large Office; Standalone Retail
PV profile1Deterministic noon-bell sized to 30% of annual load; byte-identical between CogenS and SAM

Gates scored on every case

GateToleranceResult
Annual metered bill+/- 5% (ASHRAE Guideline 14-2023)+/-0.0000% on all 9
Monthly bill NMBE+/- 5% (ASHRAE Guideline 14-2023 monthly)+/-0.0000% on all 9
Monthly bill CV(RMSE)<= 15% (ASHRAE Guideline 14-2023 monthly)0.0000% on all 9
Download sample workbook (.xlsx)7 sheets · Inputs, both engines' outputs, live formula-driven NMBE / CV(RMSE) / annual deviation, gate table, and embedded comparison charts.

Stage 8 - NEM 2.0 (NEM plus non-bypassable charges)

9 test cases, all passing

Pass

Reference engine: NREL SAM PySAM 7.1.1 Utilityrate5 (Stage 7 base) plus an explicit NBC computation on the gross hourly imports applied identically on both engines. Both engines see byte-identical gross imports by construction (load and PV are identical, so max(load - pv, 0) is identical) so the NBC adder closes to the penny.

Parameter sweeps

ParameterLevelsValues
NEM 2.0 variant3kWh-netted + flat + NBC $0.020/kWh; dollar credits + flat + NBC $0.025/kWh; dollar credits + NYSEG TOU + NBC $0.030/kWh
Building archetype3Large Hospital; Large Office; Standalone Retail
PV profile1Same deterministic noon-bell sized to 30% of annual load

Gates scored on every case

GateToleranceResult
Annual bill (energy + NBC)+/- 5% (ASHRAE Guideline 14-2023)+/-0.0000% on all 9
Monthly bill NMBE+/- 5% (ASHRAE Guideline 14-2023 monthly)+/-0.0000% on all 9
Monthly bill CV(RMSE)<= 15% (ASHRAE Guideline 14-2023 monthly)0.0000% on all 9
Download sample workbook (.xlsx)7 sheets · Inputs, both engines' outputs, live formula-driven NMBE / CV(RMSE) / annual deviation, gate table, and embedded comparison charts.

Stage 9 - NEM 3.0 / Net Billing

9 test cases, all passing

Pass

Reference engine: NREL SAM PySAM 7.1.1 Utilityrate5 with ur_metering_option=2 (Net Billing) or ur_metering_option=3 (Net Billing with carry-over). Sell rate carried in the sixth column of ur_ec_tou_mat (per-period sell rate); ur_sell_eq_buy=0 so SAM uses the encoded sell rates rather than mirroring the buy rate.

Parameter sweeps

ParameterLevelsValues
Net Billing variant3A: flat buy $0.15/kWh + flat sell $0.05/kWh (sanity); B: flat buy + 2-period ACC-like TOU sell ($0.08 summer weekday 16-21, $0.04 elsewhere); C: Net Billing with carry-over, flat buy $0.15 + flat sell $0.10
Building archetype3Large Hospital; Large Office; Standalone Retail
PV profile1Same deterministic noon-bell sized to 30% of annual load

Gates scored on every case

GateToleranceResult
Annual metered bill+/- 5% (ASHRAE Guideline 14-2023)+/-0.0000% on all 9
Monthly bill NMBE+/- 5% (ASHRAE Guideline 14-2023 monthly)Within strict on all 9 (worst -0.23% on carry-over)
Monthly bill CV(RMSE)<= 15% (ASHRAE Guideline 14-2023 monthly)Within strict on all 9 (worst 0.98% on carry-over)
Download sample workbook (.xlsx)7 sheets · Inputs, both engines' outputs, live formula-driven NMBE / CV(RMSE) / annual deviation, gate table, and embedded comparison charts.

Stage 10 - Buy-All Sell-All

9 test cases, all passing

Pass

Reference engine: NREL SAM PySAM 7.1.1 Utilityrate5 with ur_metering_option=4 (Buy-All Sell-All) and ur_sell_eq_buy=0. The two energy flows live on separate meters: full load bills at retail with no on-site-generation offset, full generation sells at wholesale as a separate revenue stream.

Parameter sweeps

ParameterLevelsValues
BASA variant3Flat buy $0.15/kWh + flat sell $0.05/kWh (sanity); flat buy + 2-period ACC-like TOU sell; NYSEG TOU buy + flat sell
Building archetype3Large Hospital; Large Office; Standalone Retail
PV profile1Same deterministic noon-bell sized to 30% of annual load

Gates scored on every case

GateToleranceResult
Annual metered bill+/- 5% (ASHRAE Guideline 14-2023)+/-0.0000% on all 9
Monthly bill NMBE+/- 5% (ASHRAE Guideline 14-2023 monthly)+/-0.0000% on all 9
Monthly bill CV(RMSE)<= 15% (ASHRAE Guideline 14-2023 monthly)0.0000% on all 9
Download sample workbook (.xlsx)7 sheets · Inputs, both engines' outputs, live formula-driven NMBE / CV(RMSE) / annual deviation, gate table, and embedded comparison charts.

Stage 11 - Solar + CHP + BESS coupled plant under realistic tariffs

27 test cases, all passing

Pass

Reference engine: NREL SAM PySAM 7.1.1 Utilityrate5 (ur_metering_option=1, ur_dc_enable=1) consuming the same hourly net-grid-import profile that the CogenS linear-programming dispatch solver produces. The LP coordinates CHP electric output (eta_elec=0.35, eta_th=0.45), BESS charge/discharge (RTE=0.90), boiler (eta=0.85), and TESS (RTE=0.95) against the same combined utility bundle both engines see. NEM 1.0 with year-end true-up applied on both sides.

Parameter sweeps

ParameterLevelsValues
On-site DER architecture3Solar Only (synthetic noon-bell PV, no LP); CHP plus BESS (live LP dispatch, no PV); Solar plus CHP plus BESS (live LP dispatch, full microgrid)
Combined utility bundle3PG&E B-19; SCE TOU-GS-3-B; ConEd SC-9 R4
Building archetype3Large Hospital; Large Office; Standalone Retail
Run period1Full 8760-hour year (live LP dispatch against the archetype's hourly electric and thermal load profile)

Gates scored on every case

GateToleranceResult
Annual coupled-plant bill+/- 5% (ASHRAE Guideline 14-2023)+/-0.0000% on all 27
Monthly bill NMBE+/- 5% (ASHRAE Guideline 14-2023 monthly)+/-0.0000% on all 27
Monthly bill CV(RMSE)<= 15% (ASHRAE Guideline 14-2023 monthly)0.0000% on all 27
Download sample workbook (.xlsx)7 sheets · Inputs, both engines' outputs, live formula-driven NMBE / CV(RMSE) / annual deviation, gate table, and embedded comparison charts.

Stage 12 - Twenty-year financial layer (NPV / IRR / payback / MACRS)

9 test cases, all passing

Pass

Reference engine: Two-layer cross-validation. Layer A (all 9 scenarios): an independent closed-form analytical reference - standard NPV formula, scipy.optimize.brentq for the IRR root-finder, linear-interpolation simple payback against the cumulative cash-flow zero-crossing, and the published IRS Publication 946 MACRS GDS percentage tables (5-year property for PV and BESS, 7-year property for CHP, half-year convention) for the depreciation tax shield - both sides use identical published formulas so agreement to floating-point precision is by construction. Layer B (3 representative scenarios, Hospital/Office/Retail x PG&E B-19): REAL PySAM Singleowner 7.1.1 (NREL SAM C++ kernel via PySAM bindings) using a weighted Depreciation.depr_custom_schedule that aggregates the mixed-asset MACRS schedules into a single per-year array, with 30% PV ITC applied as TaxCreditIncentives.itc_fed_amount in year 1. Agreement at exactly 0.0000% adjusted-NPV deviation with a documented savings-tax architectural disclosure (the CogenS engine treats bill savings as tax-free; PySAM correctly treats them as taxable income because they reduce a tax-deductible operating expense - the implicit-tax discounted gap matches PySAM exactly).

Parameter sweeps

ParameterLevelsValues
Combined utility bundle3PG&E B-19; SCE TOU-GS-3-B; ConEd SC-9 R4
Building archetype3Large Hospital; Large Office; Standalone Retail
On-site DER architecture1Solar plus CHP plus BESS (operating bills from Stage 11C, already validated against SAM at +/-0.0000%)
Equipment capex1$1.50/W PV; $2,500/kW CHP; $400/kWh BESS
Time + finance120-year analysis period; 3%/yr operating-bill escalation; 8%/yr WACC discount rate; 27% combined federal+state tax rate; 30% federal PV ITC per IRA Section 48; IRS Publication 946 MACRS depreciation tax shield

Gates scored on every case

GateToleranceResult
20-year project NPV vs analytical reference (Layer A)+/- 0.001%delta = 0.000000 on all 9
Project IRR vs scipy.optimize.brentq (Layer A)+/- 0.001%delta = 0.000000 on all 9
Simple payback vs analytical (Layer A)+/- 0.001 yearsdelta = 0.000000 on all 9
20-year project NPV vs REAL PySAM Singleowner 7.1.1 (Layer B, with documented savings-tax adjustment)+/- 0.001% adjusted NPVdelta = 0.0000% on 3 representative scenarios