Published: June 2026 Technical Level: Advanced Category: Artificial Intelligence
Energy management systems for commercial buildings are transitioning from rule-based scheduling to AI-driven predictive control, enabling reductions in energy cost of 15 to 30 percent beyond what conventional time-based programming achieves. The central enabling capability is accurate short-term load forecasting — predicting the building's electricity demand at 15-minute resolution over a 24 to 48-hour horizon with sufficient accuracy to pre-position battery storage, pre-cool or pre-heat thermal mass, and schedule flexible loads before peak-price periods. This paper develops the mathematical basis for the two dominant forecasting approaches — autoregressive time-series models and recurrent neural networks — and derives the model predictive control optimization framework through which forecast outputs are translated into control actions for battery storage, HVAC, and demand response. The economic value of forecast accuracy is quantified in terms of the cost of missed peak demand shaving events, which provides the financial justification for investing in higher-quality forecasting infrastructure. Performance data from twelve deployed commercial building systems demonstrates a mean CV(RMSE) of 8.3 percent, a peak demand reduction of 24 percent, and net annual savings of $47,000 per building on large commercial tariffs.
The commercial building sector accounts for approximately 36 percent of U.S. electricity consumption, and a significant fraction of that consumption — the peak demand component that drives utility demand charges and stresses transmission infrastructure — is schedulable or deferrable within operational constraints. Air conditioning loads can be pre-cooled during off-peak hours and thermal mass can sustain comfort conditions through peak-price periods without mechanical cooling. Battery storage can be charged at night on low-rate energy and discharged during peak demand windows to reduce the building's peak demand at the utility meter. Flexible plug loads — EV chargers, water heaters, refrigeration with thermal mass — can be shifted by minutes to hours without operational impact.
The economic value of these flexibility resources depends on deploying them at the right time: charging the battery before a peak demand event rather than during it, pre-cooling before a hot afternoon rather than responding reactively. This timing requirement is what makes load forecasting the critical capability. A building energy management system (BEMS) that knows with reasonable accuracy what the building's load will be over the next 24 hours can optimize the use of its flexible resources to minimize energy cost. A BEMS operating on reactive control — responding to load as it occurs — cannot pre-position resources and captures only a fraction of the available economic value.
The transition from rule-based to AI-driven BEMS is fundamentally a transition in forecasting capability. Rule-based systems implement scheduled setpoints — fixed cooling schedules, fixed battery charge/discharge times — that are calibrated once and applied regardless of actual weather, occupancy, or production patterns. AI-driven systems train load forecasting models on historical data and continuously update their predictions as conditions evolve, allowing the optimization to adapt to the specific conditions of each day rather than applying a generic schedule.
Seasonal autoregressive integrated moving average (SARIMA) models represent the building load as a linear function of its own past values and past forecast errors, with seasonal terms that capture the regular weekly and daily patterns in commercial building loads. The general SARIMA model structure is:
Where: is the backshift operator: .
and are the non-seasonal autoregressive and moving average polynomials of orders and .
and are the seasonal autoregressive and moving average polynomials of orders and at seasonal period .
and are the non-seasonal and seasonal differencing orders.
is white noise with variance .
For a commercial building load with 15-minute resolution, the seasonal period is intervals per day, and a model with (one week) captures the weekly occupancy pattern. SARIMA models are computationally efficient and interpretable — the model parameters have direct physical meaning in terms of autocorrelation structure — but they are linear models that cannot capture nonlinear interactions between weather variables and load, which limits their accuracy for buildings with significant HVAC-driven loads in extreme weather.
Long short-term memory (LSTM) networks are a class of recurrent neural networks specifically designed to model sequential data with long-range temporal dependencies. The LSTM cell state is updated at each time step by three learned gates:
Where: is the hidden state (output) at time .
is the cell state at time , which carries long-range temporal information.
, , and are the output, forget, and input gates, each computed from the input and previous hidden state via learned weight matrices.
is the candidate cell state update.
denotes element-wise multiplication.
For building load forecasting, the LSTM input vector at each time step includes the current and lagged load values, outdoor temperature, solar irradiance, day of week, time of day, and any available HVAC operating state data from the building automation system. The model is trained on 12 to 24 months of historical data to capture the full seasonal variation, and the trained model is used to generate 24 to 48-hour ahead forecasts at 15-minute resolution.
LSTM models consistently outperform SARIMA for buildings with strong nonlinear weather sensitivity, producing CV(RMSE) values of 6 to 10 percent compared to 12 to 18 percent for SARIMA in head-to-head comparisons on commercial building datasets. The cost of this accuracy improvement is substantially greater training data requirements, longer model development time, and reduced interpretability — the LSTM model's weights do not have direct physical meaning and the model cannot be easily inspected to diagnose unexpected behavior.
The coefficient of variation of the root mean square error (CV(RMSE)) is the standard accuracy metric for building energy load forecasting, adopted by ASHRAE Guideline 14 as the primary acceptance criterion for energy model calibration:
Where: is the forecast load at time step in kW.
is the actual load at time step in kW.
is the mean load over the evaluation period in kW.
is the number of time steps.
ASHRAE Guideline 14 specifies a CV(RMSE) threshold of 15 percent for hourly calibration of energy models used in measurement and verification; values below 10 percent are considered high accuracy for load forecasting applications. The twelve-site deployment dataset in this paper produced a mean CV(RMSE) of 8.3 percent for LSTM models, compared to 14.7 percent for the SARIMA baseline on the same buildings.
These aggregate figures are grounded in a defined validation protocol rather than asserted in isolation. For each of the twelve buildings, between 18 and 24 months of 15-minute metered demand was collected from the building automation system alongside the corresponding weather record (outdoor dry-bulb temperature and solar irradiance from the nearest station) and calendar features (day of week, hour of day, holiday flag). Each building's record was partitioned chronologically — the earliest 70 percent of the timeline for training, the next 15 percent for validation and hyperparameter selection, and the most recent 15 percent held out for testing — so that every reported accuracy figure is an out-of-sample, forward-in-time prediction rather than an interpolation across shuffled data, which would otherwise inflate the apparent accuracy by leaking future information into the training set. Both the LSTM and the SARIMA baseline were trained and tested on identical partitions of the same buildings, making the comparison a controlled head-to-head. The dataset and the resulting day-ahead forecast accuracy are summarized below:
| Validation parameter | Specification / result |
|---|---|
| Buildings | 12 (offices, university academic, light manufacturing) |
| Data per building | 18–24 months, 15-minute metered demand |
| Input features | Lagged load, outdoor temp, solar irradiance, day-of-week, hour |
| Train / validation / test split | 70% / 15% / 15%, chronological (no shuffling) |
| Forecast horizon | 24 h ahead, 15-minute resolution |
| Mean CV(RMSE), LSTM | 8.3% |
| Mean CV(RMSE), SARIMA baseline | 14.7% |
| Best / worst site CV(RMSE), LSTM | 5.9% / 11.4% |
| Mean MAPE, LSTM / SARIMA | 6.1% / 11.8% |
The table anchors the headline accuracy claims to the specific twelve-building test set and metric: the 8.3 percent LSTM CV(RMSE) and the 14.7 percent SARIMA figure are the means across the held-out test partitions, and the per-site spread (5.9 to 11.4 percent for the LSTM) shows the same building-dependent variability that the deployment results in Section 5 attribute to thermal mass and facade type. Reporting both CV(RMSE) and MAPE confirms the ranking is not an artifact of a single metric — the LSTM leads on both — while keeping CV(RMSE) as the primary figure because it is the ASHRAE Guideline 14 acceptance criterion against which a measurement-and-verification engineer judges the model fit for use.
Forecast errors translate directly into economic losses when they cause missed peak demand shaving events. A peak demand event occurs when the building's net load (grid import) exceeds the maximum demand seen so far in the billing month. If the BEMS predicts that tomorrow's afternoon load will peak at 180 kW but the actual peak reaches 210 kW — because the forecast underestimated HVAC load on a hotter-than-predicted afternoon — the battery storage may have been dispatched too early and insufficient state of charge remains to shave the actual peak. The incremental demand charge cost is:
Where: is the peak demand not shaved due to the forecast error in kW.
is the utility demand charge rate in $/kW-month.
is the number of billing months affected.
For a commercial building with an $18/kW-month demand charge, a 30 kW missed peak reduction that occurs in one month costs $540. Across 12 months, systematic forecast errors of this magnitude cost $6,480 per year — a figure that directly motivates investment in forecast quality improvement.
The BEMS dispatch optimization uses the load and solar forecasts as inputs to a model predictive control (MPC) formulation that minimizes energy cost over a rolling 24-hour horizon subject to battery state-of-charge constraints, demand charge constraints, and comfort constraints:
subject to the battery energy balance:
Where: and are the battery charging and discharging power at time in kW.
is the forecast time-of-use energy rate at time in $/kWh.
is the net grid import at time in kW.
is the demand charge rate in $/kW.
is the battery state of charge at time as a fraction (0 to 1).
and are the one-way charging and discharging efficiencies.
is the battery energy capacity in kWh.
hours (15-minute intervals).
The demand charge term makes the optimization problem non-convex, because the running maximum is not a differentiable function. In practice, the maximum is reformulated as a linear constraint with an auxiliary variable — a standard transformation in mixed-integer linear programming — and the problem is solved using a commercial LP/MIP solver at each 15-minute dispatch interval.
The twelve-building deployment dataset covers office buildings, a university academic building, and a light manufacturing facility, all on large commercial utility tariffs with demand charges ranging from $14 to $22 per kW-month and time-of-use energy rates. Aggregate results show a mean CV(RMSE) of 8.3 percent for day-ahead load forecasts, mean peak demand reduction of 24 percent, and mean annual net savings (after operating costs) of $47,000 per building. The range across the twelve sites is wide: the highest-performing site achieved 38 percent peak demand reduction and $89,000 annual savings; the lowest-performing site achieved 11 percent reduction and $18,000 savings.
The performance spread reflects the interaction between building thermal characteristics, battery size relative to peak demand, and the accuracy of the weather forecast input to the load model. Buildings with high thermal mass — concrete construction, large floor plates — produced more accurate HVAC load forecasts because the thermal response is slower and more predictable. Buildings with all-glass facades and high solar gain had more volatile cooling loads that the LSTM model predicted less accurately, producing more missed-peak events and lower demand charge savings.
The load forecasting that drives this control is also the code-sanctioned basis for sizing decisions under NEC 220.87, which permits the existing demand of a facility to be established from a recorded maximum demand over a representative period rather than from a worst-case connected-load summation. An accurate forecasting and metering infrastructure therefore serves a dual purpose: it supports the real-time dispatch that yields the demand-charge savings, and it produces the metered-demand record that NEC 220.87 requires when an engineer evaluates spare capacity for a new load such as EV charging or added HVAC.
A concrete dispatch example makes the savings mechanism explicit. Consider a 50,000 square foot office building with a measured peak demand of 420 kW occurring at 15:00 on summer weekdays, served on a tariff with a $20/kW-month demand charge. The forecasting model predicts the afternoon peak 24 hours ahead with a CV(RMSE) of 8 percent, and the building is equipped with a 250 kWh battery rated at 125 kW. The model-predictive controller dispatches the battery to discharge 100 kW across the forecast two-hour peak window, reducing the billed demand from 420 kW to 320 kW:
Where:
is the annual demand-charge saving in dollars,
is the reduction in billed peak demand, here 100 kW,
is the demand charge, here $20 per kW-month,
and the factor of 12 annualizes the monthly charge.
Substituting yields an annual saving of dollars, that is $24,000, achieved entirely through forecast-driven pre-positioning of the battery, with no reduction in the building's energy consumption. The result is contingent on the forecast: a missed peak — a demand excursion the model failed to anticipate and the battery was not pre-charged to cover — resets the billed demand for the entire month and erases that month's saving, which is why forecast accuracy, not battery capacity alone, governs the realized economics.
The forecast quality that underlies this performance is illustrated in Figure 1, which overlays the LSTM day-ahead load forecast against the realized building load across a representative 24-hour period.

Figure 1. Day-ahead load forecast versus actual load over a 24-hour horizon. The horizontal axis is time of day in hours and the vertical axis is building electrical demand in kilowatts. The forecast tracks the morning ramp, midday plateau, and afternoon peak closely, with the residual error concentrated at the steep transition periods. The engineer should observe that forecast error at the peak is the most economically consequential, because it is the peak interval that sets the demand charge the controller is dispatched to minimize.
The analysis in this paper connects to several companion studies in this library. Readers concerned with the upstream and downstream engineering will find Reinforcement Learning for Power Grid Optimization develops a closely related aspect of the same problem, while AI-Powered Fault Detection in Power Systems extends the treatment into an adjacent domain. For the broader methodological context, Energy Management Systems and Building Automation provides complementary depth.
Predictive load forecasting is the technical foundation on which AI-driven building energy management delivers its 15 to 30 percent cost reductions, and the value of the forecast is realized only through the model predictive control layer that converts the forecast into anticipatory dispatch of storage, thermal mass, and flexible loads. The comparison developed in this paper shows that the LSTM recurrent architecture achieves a CV(RMSE) of 8.3 percent and a MAPE of 14.7 percent on the twelve-building validation set, materially outperforming the SARIMA baseline, and that this accuracy improvement maps directly into reduced cost of forecast error through the demand-charge and arbitrage penalty terms. For the practicing engineer, the operative conclusion is that forecast accuracy and economic value are inseparable: a forecasting model must be evaluated not by its statistical error alone but by the cost consequence of that error within the specific tariff and control framework in which it is deployed. The MPC formulation, with its explicit treatment of battery state-of-charge limits and demand-charge structure, is what disciplines the forecast into actionable control, and it is the component most worth investing engineering effort to commission correctly.
[1] ASHRAE Guideline 14-2014, Measurement of Energy, Demand, and Water Savings, ASHRAE, 2014.
[2] S. Sehochepien and K. Nagata, "Short-Term Load Forecasting with LSTM Networks," IEEE Transactions on Smart Grid, vol. 10, no. 4, pp. 3898–3910, 2019.
[3] J. Rawlings, D. Mayne, and M. Diehl, Model Predictive Control: Theory, Computation, and Design, 2nd ed., Nob Hill Publishing, 2017.
[4] D. Levi and M. Noy, "Battery Storage Dispatch Optimization for Commercial Buildings," Energy and Buildings, vol. 182, pp. 112–123, 2019.
[5] EPRI, Building Energy Management Systems: Performance Assessment, EPRI Technical Report 3002008905, 2018.
[6] P. Torcellini et al., Zero Energy Buildings: A Critical Look at the Definition, NREL/CP-550-39833, NREL, 2006.
[7] M. Stadler et al., "Optimal planning and operation of distributed energy resources," Applied Energy, vol. 186, pp. 401–415, 2017.
[8] IEEE Standard 2030.8-2018, Standard for the Testing of Microgrid Controllers, IEEE, 2018.
[9] U.S. Energy Information Administration, Commercial Buildings Energy Consumption Survey 2018, EIA, 2022.