Categories
Uncategorized

Why Basic Anomaly Detection Fails in Energy Data (And How ML Fixes It) ⚡

Detecting anomalies in energy data is key to optimizing consumption, reducing costs, and ensuring building systems run efficiently. With the vast amount of data from smart meters, manual oversight isn’t practical—this is where machine learning (ML) steps in! 

 

The basic idea is simple: train an ML model to predict energy consumption based on historical data and use this model to compare predicted and measured values. Any significant deviation between the two can signal an anomaly. But how do we define and detect these deviations? There are several approaches, ranging from basic thresholding to advanced statistical and algorithmic methods, which we will explore in this article.

Basic Anomaly Detection Algorithms

Absolute Value Deviation – The simplest approach is setting a fixed absolute threshold. If the difference between measured and predicted energy consumption surpasses a set threshold, it is identified as an anomaly. While straightforward, this approach doesn’t scale well across different buildings, for instance, a threshold that works well for a large office building may lead to false positive or missed anomalies in a small retail store.

📊 Relative Value Deviation – A more adaptable method considers deviations as a percentage of the predicted value, e.g., more than 50% deviation triggers an alert. This works well across varying energy scales but can cause false positives for buildings with low consumption.

🔗 Combined Approach – The best of both worlds! By applying both absolute and relative thresholds, anomalies are flagged only when both criteria are met (e.g., >20% deviation and >5 kW). Adding a minimum duration filter helps avoid false alarms from short-lived fluctuations.

An example of relative value deviation rule with a 50% threshold.
Advanced Anomaly Detection Algorithms

The above-mentioned basic algorithms can be simple and effective, they may struggle with complex patterns and time-dependent variations in energy data. Let’s have a look at more advanced anomaly detection algorithms that enhance accuracy and reliability.

 

🔢 Statistical Tests – Statistical methods offer a more sophisticated approach. For example, energy consumption profiles for weekends can be compared to typical weekday profiles. If weekend energy usage closely resembles a workday pattern, it may indicate that HVAC systems are not being properly adjusted for setbacks.

📈 Integral-Based Comparison – This method integrates the differences between predicted and measured values over time. By accumulating small deviations, it detects anomalies when the cumulative difference crosses a predefined threshold. This approach is particularly effective for identifying subtle but persistent changes that might be missed by simpler methods.

Quantifying Temporal Dissimilarity – Advanced techniques like the CORT dissimilarity index go beyond magnitude comparisons, capturing temporal misalignments between predicted and measured values. For instance, if energy consumption lags or leads expected trends, CORT can highlight these discrepancies. Compared to basic thresholding, such methods provide deeper insights into the nature of anomalies, particularly in time-dependent patterns.

An example of daily integral rule.
Practical Considerations for Anomaly Detection

So far, we’ve covered both fundamental and advanced techniques for detecting anomalies in energy data. But theory alone isn’t enough—real-world implementation comes with its own set of challenges. In this article, we’ll focus on two key aspects: handling holidays and effectively representing anomalies.

 

🎄 Handling Holidays – Holidays present unique challenges for anomaly detection since they disrupt regular energy consumption patterns. Inaccurate modeling of holidays can lead to missed anomalies or false positives. At Energy Twin we address this issue by treating holidays as an “eighth day of the week” – separate from Saturdays or Sundays with distinct modeling properties. Holidays can be downloaded automatically based on location or manually defined, ensuring accurate anomaly detection even during non-standard periods. Automatically downloading holidays simplifies working with international portfolios, ensuring consistency across different regions.

📊Representing Anomalies – When managing large building portfolios, anomaly detection can generate hundreds of alerts. Without effective representation, prioritizing and acting on these anomalies becomes overwhelming. Energy Twin models integrate seamlessly with existing solutions such as SkySpark’s Swivel feature, providing intuitive, portfolio-wide overviews. Instead of sifting through endless alerts, building managers can pinpoint key anomalies in minutes, ensuring efficient monitoring and decision-making across their entire portfolio.

An example of detected Czech public holiday - 28th October.
Conclusion

Anomaly detection is a cornerstone of energy efficiency, enabling proactive management and substantial cost savings. Machine learning enhances this process, providing precise and reliable models that minimize false alarms—often the biggest challenge in deploying such systems.

 

At Energy Twin, finely tuned ML models and robust integrations with tools like SkySpark empower us to monitor hundreds of buildings in mere minutes. This ensures no significant issue in energy consumption goes undetected, delivering actionable insights that translate into real-world benefits. With ML-driven anomaly detection, energy efficiency is not just a goal but an achievable reality – turn anomaly detection into strategic advantage! 🚀

Categories
Uncategorized

From Heatmaps to AI 📊: The First Step in Understanding Your Data

Every journey into AI begins with a crucial first step: understanding your data. Many clients approach us eager to jump straight into machine learning (ML), but without a clear grasp of their data or meeting key prerequisites for ML, this leap often leads to frustration. Why? ML can only produce meaningful results when built on a solid foundation—with data preprocessing playing a vital role.


This is where data visualization comes in. Seeing your data clearly and gaining new perspectives and insights is the essential first step. Some methods, like heatmaps, go even further—empowering technical teams with detailed analysis while providing non-technical stakeholders with an intuitive, quick and easy-to-understand view of optimization opportunities.

Heatmaps

For those unfamiliar with heatmaps, they are visual representations of data where values are displayed as colors. This makes it easy to spot patterns, trends, and anomalies at a glance, providing an intuitive way to understand complex information. Let’s explore some examples!

In the following set of heatmaps, the x-axis represents the hour of the day, and the y-axis displays the days of the week. Each cell within the heatmap reflects the average energy consumption for a specific hour and day, providing a concise visual summary of the building’s energy use. This approach is comparable to a pivot table with conditional formatting, where data is organized systematically and shaded to highlight key patterns and anomalies.

The first heatmap showcases an office building with a well-configured weekend setback. The heatmap clearly shows low energy consumption during night hours and weekends, which are shaded in blue. This indicates that the building’s energy use is well-managed during non-operating hours, with peak energy usage occurring during standard working hours, from 9 a.m. to 5 p.m. on weekdays, with slight extensions to 6 p.m. on Mondays and Wednesdays.

 

In contrast, the second heatmap highlights an office building with operational inefficiencies. Starting with the weekend setback, we see that Saturday is well-managed, but Sunday shows an anomaly. From 2 p.m. to 7 p.m., energy consumption unexpectedly rises, disrupting the consistent blue pattern of low energy use throughout the day. Additionally, there’s a problem with the startup and shutdown periods. If the building operates from 7 a.m. to 5 p.m., why is it starting up as early as 4 or 5 a.m.? The night setback, which is set to begin at 8 p.m., is also somewhat late. It would be more efficient if the setback were activated earlier, around 6 or 7 p.m., to minimize unnecessary energy consumption.

Image 1: Daily heatmap examples.

To gain a deeper understanding of your building’s energy usage patterns, it’s crucial to look beyond daily patterns and consider how energy usage changes throughout the year. In this set of heatmaps, the y-axis represents the months of the year, giving us a clear view of how energy consumption fluctuates across the seasons. 

 

In the first heatmap, we observe consistent and effective night setbacks year-round. We also see that the building is cooling-dominated, as the highest energy consumption occurs during the summer months of June, July, and August. Some heating-related energy use is apparent in the mornings during January and February. These patterns are typical for an office building in Central Europe, where gas heating is common, and cooling accounts for the majority of electrical energy consumption in warmer months.

 

In contrast, the second heatmap illustrates inefficient cooling practices. During the summer months, particularly in July and August, night setbacks show higher energy consumption than expected, indicating inefficiency. Additionally, we notice regular energy usage at 4 a.m. in certain months, including June, July, August, and December, which suggests unnecessary operational activity during off-hours.

Image 2: Monthly heatmap examples.

A unique energy pattern is shown in the following heatmap from a building located in Central Europe. The lowest energy consumption occurs during the summer and daylight hours. What’s responsible for this change?


The building is equipped with photovoltaic (PV) panels. This example illustrates how renewable energy sources can significantly alter a building’s energy profile, and heatmaps provide an intuitive way to track and understand these shifts.

Image 3: Energy profile after adding PV panels.
Conclusion

Heatmaps are a powerful yet simple tool for understanding energy consumption patterns. Whether revealing operational inefficiencies in weekly heatmaps or uncovering seasonal trends in yearly heatmaps, they provide a clear, actionable view of a building’s energy usage. By starting with this foundational step, we ensure that the data is not only understood but also prepared for deeper analysis, such as machine learning. This approach enables smarter decision-making and paves the way for AI-driven insights that can optimize energy management across buildings and portfolios.

Categories
Demo Series

Demo Series Part 01 – Energy Twin Interactive

New video series is here! In this video we will show you the full demo of Energy Twin Interactive, our machine learning extension for SkySpark for daily, weekly and monthly data.

Categories
Analytics Walkthrough

ET Analytics Walkthrough 03 Utilizing a model for anomaly detection – Part 1

In this tutorial we will showcase how Energy Twin Analytics models can be used for anomaly detection using pre-defined rules, such as Relative Value Deviation rule.

Categories
Analytics Walkthrough

ET Analytics Walkthrough 02 Visualize a Model Using ET Views

This tutorial is focused on visualization of a model in the app ET Views once it has been identified.

Categories
Analytics Walkthrough

ET Analytics Walkthrough 01 Create a Model

This video demonstrates how to identify a model in the ET Admin app using Energy Twin Analytics.