Tools › Building Systems › Energy › Energy Baseline Regression


Energy Baseline Regression

Whole-building measurement and verification by regression: fit a baseline model of metered energy against weather (and an optional production variable), check it, then adjust the baseline to the weather of the reporting period and take the avoided energy use as adjusted baseline minus metered use. Models: mean, two-parameter, three-parameter heating or cooling change-point, four- and five-parameter change-point, degree-day regression, and degree-days with the balance temperature searched from daily temperatures; each fitted by least squares inside a grid search over the change point. The page reports the coefficients with standard errors, R-squared, CV(RMSE), NMBE and net determination bias beside editable comparison values, the avoided energy with its uncertainty and fractional savings uncertainty, and the cost saving. The method is that of IPMVP Option C and ASHRAE Guideline 14 as documented in the public guides of the Bonneville Power Administration and the Federal Energy Management Program.

  • Baseline model by least squares with the change point or balance temperature found by a grid search; per-day, day-weighted or per-period fitting

  • Coefficients, standard errors and t statistics; R-squared, CV(RMSE), NMBE and net determination bias against editable comparison values

  • Adjusted baseline, avoided energy use, savings fraction and cost saving for the reporting period

  • Savings uncertainty by the exact least-squares formula and by the Guideline 14 form printed by BPA, without and with the autocorrelation correction

  • Charts of energy against weather with the fitted model, of adjusted baseline against metered use by period, and of the residuals

Energy Baseline Regression


Unit System: /

Data and Model (temperatures in °F with U.S. units and °C with SI; nothing is converted)








Baseline Period (one row per billing period: label, days, energy, then the weather column(s), then production if used)



Reporting Period (rows in the same form as the baseline)



Savings and Uncertainty





Comparison Values (editable; a model outside them is flagged, not rejected)






×

Energy Baseline Regression

Baseline Regression for Whole-Building Measurement and Verification: Models, Statistics, Savings Uncertainty, What It Assumes and When It Misleads

Scope

The page carries out the regression arithmetic of whole-building measurement and verification (IPMVP Option C, ASHRAE Guideline 14): a model of metered energy against weather is fitted to a baseline period, the model is evaluated at the weather of the reporting period to give the adjusted baseline, and the avoided energy use is the adjusted baseline minus the metered energy. IPMVP and Guideline 14 are copyrighted and are cited only. Every formula and comparison value on the page is taken from public documents: the Bonneville Power Administration's Regression for M&V: Reference Guide (2024) and Verification by Meter-Based Energy Modeling Protocol (version 3.1, 2024), a report on savings uncertainty prepared for BPA by SBW Consulting (2017), and the Federal Energy Management Program's M&V Guidelines, version 4.0 (2015).

The companion tool Energy Savings and Payback ranks model forms automatically, normalizes to a typical weather year and carries the measure economics (payback, savings-to-investment ratio). This page is the M&V report for one chosen model: more model forms (a production term, degree-days with a searched balance temperature, day-weighted fitting), the coefficient statistics, the bias figures and the savings uncertainty in several published forms.

Not covered: normalized savings at a typical weather year, non-routine adjustments, daily or hourly interval models with day types, demand savings, meter and weather-data error, and bootstrap uncertainty.

Data

Each row is one billing period: an optional label, the days in the period, the metered energy, then the weather. Three forms of weather data are accepted. Degree-days of each period (HDD, CDD) at whatever base the weather source used. Mean outdoor temperature of each period, for the change-point models. Daily mean temperatures pasted as one list, from which the page sums the degree-days of each period itself at any balance temperature. An optional last column holds a production, occupancy or other activity quantity. Temperatures are read in the degrees typed (°F with U.S. units, °C with SI) and energy in the unit named; nothing is converted. The opening degree-day rows are Table 6-1 of the BPA guide (days, kWh, heating degree-days) with a cooling degree-day column and a reporting period that are invented for the illustration; the mean-temperature and daily-temperature examples are invented throughout.

The models

With (x)+ meaning x when positive and zero otherwise, T the mean temperature of a period and c a change-point temperature (BPA protocol, section 3.2, after ASHRAE research project RP-1050):

mean: E = b1    two-parameter: E = b1 + b2 T

three-parameter heating: E = b1 + b2 (c − T)+    three-parameter cooling: E = b1 + b2 (T − c)+

four-parameter: E = b1 + b2 (c − T)+ + b3 (T − c)+

five-parameter: E = b1 + b2 (c1 − T)+ + b3 (T − c2)+

degree-day: E = b1 + b2 HDD + b3 CDD (either term alone, or both)

The protocol writes the four-parameter model with a minus sign before the second slope; here both slopes are written with a plus sign, so b2 is the use per degree below the change point and b3 the use per degree above it, and either may come out negative. With a production column the term b P is added to any of them.

Degree-days with a searched balance temperature. Pasted degree-days carry the base temperature of their source (often 65 °F), and the BPA guide notes that results often improve with a different base. That can be done only from daily temperatures: HDD(Tb) = Σ (Tb − Tday)+ and CDD(Tb) = Σ (Tday − Tb)+ over the days of each period, with Tb chosen by the search. From period-mean temperatures the same idea is exactly the three-parameter model, because (c − T)+ times the days is the degree-days of a period whose every day has the mean temperature. The two differ in months that straddle the balance temperature, where daily temperatures count the cold days of a mild month and the mean does not.

Normalization by days

Billing periods differ in length, so the default fits energy per day against degree-days per day (BPA guide, section 6.1). The guide's own example then finds a net bias of about 0.3 % between modeled and metered totals and remarks that "the best approach would have been to use a weighted regression". That is the default here: each period is weighted by its days, which makes the modeled total equal the metered total exactly (the normal equation of the intercept is Σ d (E/d − Ê/d) = 0). The unweighted per-day fit and a fit of period totals are the other options.

The fit and the search

At fixed change points every model is linear in its coefficients and is solved by (weighted) least squares, b = (X′WX)−1X′Wy. Between two neighboring data temperatures the squared error is a smooth function of the change point, and at each data temperature it has a kink, so the search evaluates every data temperature and several points inside every gap (for two change points, every pair with c1 < c2), keeps the best candidate of each of the best cells and polishes each by golden-section searches on every coordinate. For balance temperatures from daily data the candidates are a uniform grid over the range of the daily temperatures (201 values, or 61 × 61 pairs with the heating balance not above the cooling balance). The search is numerical, not a proof of the global minimum; it was checked against brute force (see Verification). A change point is admissible only when every sloped branch holds at least two baseline periods and the flat part of a three- or five-parameter model at least one; otherwise the change point could move without changing the fit. For searched balance temperatures at least two periods must have degree-days on each branch. These admissibility rules are this page's, not from the cited documents.

The parameter count p includes the searched temperatures (three for a three-parameter model). Standard errors, t statistics and p-values of the coefficients are those of the linear fit at the change point found: s² (X′WX)−1 with s² = SSE/(n − p). They do not include the uncertainty of the change point itself.

Statistics

As defined in the BPA guide (section 5.1 and Table 5-1), with n periods, p parameters, y the fitted quantity and ŷ its modeled value:

RMSE = √[Σ(y − ŷ)² / (n − p)],   CV(RMSE) = RMSE / ȳ,   R² = 1 − Σ(y − ŷ)² / Σ(y − ȳ)²

NMBE = Σ(E − Ê) / [(n − p) Ē],   net determination bias = Σ(E − Ê) / ΣE

The two bias figures are computed on period totals E, as the guide does in its example. With day weights the sums of squares carry the weights d n/Σd and ȳ is the weighted mean (total energy over total days). The adjusted R² is 1 − (1 − R²)(n − 1)/(n − p); the guide's Table 5-1 prints n − p − 1 in the denominator while its Table 5-2 sets p = 2 for a straight line, which would count the intercept twice.

Comparison values (all editable inputs; a model outside one is flagged, not rejected):

  • R² above 0.75: "the rule-of-thumb for an acceptable model using monthly billing data" (BPA guide, section 5.1.1), with the guide's caution that a low R² does not by itself make a poor model.
  • CV(RMSE): "a low value (often interpreted as 10% or 15%) is desirable" (same section). The stricter 10 % is the opening value. FEMP's Table 4-2 gives 15 % for monthly data, as the calibration tolerance of a simulation model (Option D), quoting Guideline 14.
  • NMBE within ± 5 %: FEMP Table 4-2, monthly mean bias error, again a calibration tolerance for simulation models. The FEMP guide prints no numeric tolerance for an Option C regression.
  • Net determination bias below 0.005 %: the Guideline 14-2014 criterion as quoted in the BPA guide (section 5.1.6). The guide accepts its own example at 0.3 % because that bias is small beside the uncertainty and the expected savings.
  • Fractional savings uncertainty no more than 50 % at 68 % confidence (BPA protocol, sections 3 and 5.5), which the protocol itself calls "a pretty modest requirement".
  • Each slope's t statistic is compared with the two-sided 95 % critical value for n − p degrees of freedom (BPA guide, section 5.2.2).

Savings uncertainty

Two published forms are computed, each without and with a correction for autocorrelated residuals, at 68 % and at the entered confidence level.

Guideline 14 form, as printed in the BPA protocol (sections 5.5.1 and 5.5.2):

ΔEsave / Esave = t · 1.26 · CV · √[(n/n′)(1 + 2/n′)/m] / F

with CV the CV(RMSE), F the savings fraction, n and m the numbers of baseline and reporting points, t the two-sided Student t value, and n′ = n (1 − ρ)/(1 + ρ) the effective number of baseline points, ρ being the lag-1 autocorrelation of the residuals (n′ = n when the residuals are taken as independent). For monthly data the protocol allows the constant 1.26 to be replaced by −0.00022 m² + 0.03306 m + 0.94054.

Exact least-squares form. The SBW report for BPA (section 3.3) derives the variance of a sum of predictions from the covariance of the coefficients and adds the noise of the reporting periods:

ΔEsave = t s √[ g′(X′WX)−1g + N n/n′ ]

where s is the RMSE, g is the sum over the reporting periods of the regressor rows (each scaled to its period total), and N is the noise multiplier. The first term is model uncertainty: the same coefficient error enters every period, so it adds linearly. The second is noise, which adds in quadrature; following the report (section 3.3.3) the autocorrelation factor n/n′ multiplies the noise term only. The report derives the case of a straight line fitted to equal periods (N = m). The extensions to per-day models are this page's: N = Σd² for an unweighted per-day model, and N = d̄ Σd for a day-weighted one, whose noise variance per day is taken as inversely proportional to the days of the period. They were checked by simulation.

The exact form is the opening choice, and the autocorrelation correction is applied by default. The protocol classes weekly and monthly models with uncorrelated residuals; with twelve points the lag-1 autocorrelation is itself poorly known, and applying the correction always widens the result because ρ is taken as a magnitude. The table prints every combination. The t value uses n − p degrees of freedom in all of them; the documents do not say whether n′ should replace n there.

What it assumes

  • Energy depends on the entered variables only, in the piecewise-linear form of the chosen model, with the same relation in the reporting period had the measures not been installed.
  • Residuals are independent, of constant variance (per period, or per day for the day-weighted fit) and roughly normal: the conditions of ordinary least squares that the BPA protocol lists.
  • The change point is treated as known when the standard errors and the savings uncertainty are computed.
  • The weather and energy readings cover the same dates, and the meter and weather data are without error.
  • Nothing else changed at the site: no non-routine event in either period.

When it misleads

  • Too few points. Twelve monthly points and a five-parameter model leave seven degrees of freedom. A change-point model will fit noise; the comparison table of model forms shows how little the extra parameters may buy.
  • Choosing the model by its savings. The table of other model forms prints the avoided energy of each for transparency. The model belongs in the M&V plan before the reporting period.
  • Extrapolation. A reporting period colder or hotter than any baseline period is evaluated on an extended line; the page counts such periods, and the uncertainty formulas do not cover the model-form error there.
  • Understated uncertainty. The uncertainty is that of the regression alone. The SBW report found the least-squares formula about 12 % high against a bootstrap for one real four-parameter data set and the Guideline 14 form further off, and found the Guideline 14 autocorrelation adjustment to overstate with daily data; none of these forms includes the uncertainty of the change point.
  • Site changes. An added floor, a new shift or a change of occupancy appears as negative or positive "savings". Non-routine adjustments are outside this page.
  • Savings small beside the scatter. When the savings fraction is a few percent, the fractional savings uncertainty exceeds 100 % and the sign of the result is not established.
  • Mean temperatures and degree-days are not interchangeable. A model fitted on one cannot be evaluated on the other, and pasted degree-days must have the same base in both periods.

Verification

The heating degree-day example of the BPA guide (section 6.1, Tables 6-1 to 6-8) is the opening baseline. With equal weights the page gives intercept 132.17 and slope 8.872 kWh per day against the printed 132.24 and 8.8678, R² 0.880 (printed 0.879), CV(RMSE) 11.7 % (11.7 %), modeled total 92,330 kWh (92,331) and a net bias of 0.35 % (0.3 %). The small differences are in the source: the guide prints whole degree-days, two of its printed degree-days per day (3.7 and 19.4) differ by 0.1 from the quotient of its own columns, and its regression was evidently run on values with more digits. The effective-point numbers of the protocol's uncertainty example (section 10.7.1: 46.03 and 31.74) and its baseline-period result (12.7 % with the printed t of 1.013) are reproduced; the example's reporting-period figure of 26.4 % does not follow from the numbers printed beside it (they give 24.1 % to 25.6 %, depending on which printed t is used). Change points, coefficients, statistics and uncertainties of 140 seeded cases agree with an independent numpy and scipy computation that locates the change points by brute force, and the weighted noise term agrees with a Monte Carlo simulation within 1 %.




References

Bonneville Power Administration (2024). Regression for M&V: Reference Guide. Bonneville Power Administration, Portland, OR, May 2024.

Bonneville Power Administration (2024). Verification by Meter-Based Energy Modeling Protocol, Version 3.1. Bonneville Power Administration, Portland, OR, September 2024.

SBW Consulting, Inc. (2017). Uncertainty Approaches and Analyses for Regression Models and ECAM. Prepared for Bonneville Power Administration, Bellevue, WA, 11 August 2017.

Federal Energy Management Program (2015). M&V Guidelines: Measurement and Verification for Performance-Based Contracts, Version 4.0. U.S. Department of Energy, Washington, DC, November 2015.

Kissock, J. K., Haberl, J. S., and Claridge, D. E. (2003). "Inverse Modeling Toolkit: Numerical Algorithms." ASHRAE Transactions, Vol. 109, Part 2, pp. 425–434.

American Society of Heating, Refrigerating and Air-Conditioning Engineers (2014). Measurement of Energy, Demand, and Water Savings. ASHRAE Guideline 14-2014, ASHRAE, Atlanta.

Efficiency Valuation Organization (2022). International Performance Measurement and Verification Protocol: Core Concepts. EVO 10000-1:2022, Efficiency Valuation Organization, Washington, DC.

Reddy, T. A., and Claridge, D. E. (2000). "Uncertainty of Measured Energy Savings from Statistical Baseline Models." HVAC&R Research, Vol. 6, No. 1, pp. 3–20.

Worked Examples

Published examples this tool reproduces; each page lists the inputs to enter and the printed answers.

All worked examples


DISCLAIMER: The methods and calculation on aNOWysis.com are provided as means to educate the reader. There is no warranty, expessed or implied, as to the relevance or accuracy of the methods or calculations. All calculations should be checked by a qualified analyst for appropriateness and accuracy. We will not be held liable for any damages, injuries or deaths caused by using methods or calculations from this site.