Technical Deep-Dive

Exact content from the final report, adapted to site formatting.

Technical Approach & Architecture
System Architecture Overview

For our project, we developed a three-stage machine learning pipeline that transforms weather forecasts into coordinated building recommendations:

Solution architecture diagram
Figure 1: Solution architecture. LSTM demand forecasting and grid strain prediction combine with compliance modeling to feed portfolio optimization recommendations that are served to the operator dashboard interface.

Stage 1: Multi-Cohort Demand Forecasting
This stage consisted of a multi-output LSTM neural network predicting 24-hour ahead demand for 15 building cohorts covering >94% of all building stock, a 48-hour weather lookback window (temperature, humidity, wind speed), and is trained on NREL Building Stock Data with Massachusetts climate patterns.

Stage 2: Compliance Prediction & Modeling
This stage consisted of building-specific compliance probability based on operational characteristics, domain expertise rules accounting for HVAC system types, building operations, and contextual factors, and a realistic 36.3% average compliance rate aligned with industry research.

Stage 3: Portfolio Optimization
This stage coordinated building selection algorithm maximizing grid impact, included constraint-based optimization respecting individual building capabilities, and multiple scenario planning (conservative 30%, emergency 70% participation).

Data Sources & Scale

We used the NREL Commercial Building Stock Data (Massachusetts baseline), covering 8,111 buildings across 13 types and 34 HVAC configurations, with 625 energy characteristics per building. Synthetic weather data modeled Massachusetts climate patterns for extreme-weather testing.

Processing Performance: The system processes 8,000+ buildings in under 30 seconds with <50MB memory usage, supporting cost-effective cloud deployment and Spark-ready distributed scaling.

Neural Network Implementation & Validation

We built a 2-layer multi-output PyTorch LSTM for commercial building energy forecasting. The network includes 15 cohort-specific prediction heads, uses a 48-hour weather lookback with a 24-hour forecast horizon, and incorporates inputs such as temperature, humidity, wind speed, and building characteristics. Training used temporal validation splits to prevent data leakage, a critical step for time-series modeling.

Model Development Methodology

The LSTM architecture was selected based on its proven effectiveness for time series forecasting in commercial building applications. Our implementation process followed systematic validation protocols:

Training Strategy: The model employed temporal validation splits to prevent data leakage, a critical consideration for time series forecasting where traditional random splits would invalidate results by incorporating future information into training data.

Architecture Selection: The 2-layer design with 15 cohort-specific outputs balances model complexity with training efficiency. Each cohort head enables specialized learning for different building types while sharing common temporal pattern recognition in the base layers.

Domain-Specific Adaptations: Weather feature engineering incorporated 48-hour lookback windows to capture thermal lag effects in building energy systems, while building characteristics were embedded to provide context-aware forecasting for each cohort.

LSTM forecasting performance by cohort and scenario
Figure 2: LSTM forecasting performance by cohort and weather scenario. Average RMSE for grid strain scenarios shown, demonstrating system performance within literature-supported ranges. Large buildings tended to have larger errors.
Time Horizon Heat Wave - RMSE Heat Wave - MAPE Cold Snap - RMSE Cold Snap - MAPE
1-hour ahead 1.86 MW 7.29% 4.64 MW 17.11%
6-hours ahead 10.43 MW 29.45% 8.79 MW 28.40%
12-hours ahead 12.49 MW 23.41% 10.49 MW 28.42%

Table 2. LSTM performance across 1, 6, and 12 hour forecast timelines presented for heat wave and cold snap extreme weather scenarios in both RMSE and MAPE for academic literature comparison. Performance in line with production-viable range established for commercial building applications (Okotore, 2024).

This methodological rigor ensures our performance metrics provide reliable foundations for the portfolio optimization algorithms that follow. While our analysis uses RMSE for internal model comparison across weather scenarios, literature benchmarks typically report MAPE for cross-study comparison. Our 12-hour RMSE values of 23.41-28.42% correspond to forecast accuracy levels consistent with the 20-25% MAPE range established as production-viable for commercial building applications (Okotore, 2024), particularly given the extreme weather conditions tested.

Technical Achievement: Our multi-cohort approach balances building-level accuracy with portfolio-level coordination, emphasizing relative demand patterns during extreme weather over absolute consumption.

Integration with Optimization: The LSTM feeds into portfolio optimization by generating weather scenarios, forecasting 24-hour demand, detecting grid strain, and coordinating building responses for maximum impact.

Back to overview

Tech Stack
PyTorch LSTM FastAPI Docker Kubernetes AWS