About the Project
Inspiration
Buildings contribute nearly one-third of global energy consumption and emissions, making them a prime target for optimization in the fight against climate change. We were inspired by the vision of smart, sustainable buildings—spaces that adapt, learn, and optimize energy usage with minimal human intervention. Traditional energy forecasting tools often fall short in generalizing across diverse building types, and we saw a clear opportunity to leverage Time Series Foundation Models (TSFMs) to bridge this gap.
How We Built It
Our system, SmartEnergy, was developed to perform short-term load forecasting and anomaly detection using fine-tuned TSFMs. Here's how we approached it:
- Data Collection & Preprocessing We gathered time-series data from both residential and commercial buildings, including:
- Historical energy consumption
- Temperature and weather data
- Occupancy schedules and operational patterns Preprocessing included normalization, handling missing values, and encoding temporal features like hour of the day and day of the week.
Model Selection We started with pre-trained TSFM architectures based on Transformers and Temporal Convolutional Networks (TCNs). These models were chosen for their ability to model long-range temporal dependencies.
Fine-Tuning Strategy Using supervised learning, we fine-tuned the TSFMs on building-specific datasets. This allowed the model to learn both:
- Global patterns across buildings
- Local idiosyncrasies unique to each environment
- Forecasting and Anomaly Detection
- We forecasted energy load over the next 24–72 hours, supporting dynamic load management.
- Anomalies were detected using deviations from predicted values. We calculated thresholds using statistical methods like z-scores and rolling windows.
- Evaluation Our models were evaluated using:
- MAE (Mean Absolute Error)
- RMSE (Root Mean Square Error)
- Precision and Recall for anomaly detection Baseline comparisons were made against ARIMA, Prophet, and basic LSTM models.
- Deployment Simulation We simulated real-time forecasting using a rolling window evaluation strategy to mimic actual operational environments.
What We Learned
- Transfer learning with TSFMs significantly improves forecasting accuracy, especially in data-scarce environments.
- Fine-tuning pre-trained models reduces the need for building-specific training from scratch.
- Anomaly detection benefits greatly from context-aware modeling of energy patterns.
- The plug-and-play architecture we designed has the potential for scalable deployment across portfolios of buildings.
Challenges We Faced
- Data Quality & Diversity: Real-world building datasets are often noisy, incomplete, and inconsistent.
- Model Generalization: Balancing generalization with building-specific customization was non-trivial.
- Anomaly Labeling: Lack of ground truth made it difficult to validate anomaly detection performance.
- Computation: Fine-tuning large TSFMs was computationally expensive and required optimization.
Math Behind the Forecasting
Our models optimized the Mean Squared Error (MSE) loss:
$$ \text{MSE} = \frac{1}{n} \sum_{i=1}^{n} (y_i - \hat{y}_i)^2 $$
For anomaly detection, we used the z-score method to flag anomalies:
$$ z = \frac{x - \mu}{\sigma} $$
Values beyond a chosen threshold (e.g., \( |z| > 3 \)) were marked as potential anomalies.
Log in or sign up for Devpost to join the conversation.