We have spent decades researching the energy performance of buildings. We have succeeded in reducing energy demand, improving the efficiency of HVAC systems, and integrating renewables. We have built remarkably detailed, comprehensive models… And yet, they remain stubbornly imprecise. What if the problem isn’t the physical modeling of the building itself?
Building energy consumption fluctuates not only due to outdoor weather conditions but is also directly traceable to human factors. In fact, in a previous post I discussed how energy consumption patterns were clearly traceable to the holiday calendar (original paper). All of this is further amplified by modern dynamics like teleworking, flexible worktime, and increasingly fragmented vacation schedules.
Therefore, if we want to accurately predict the energy performance of a building, we need reliable predictors of when and how many occupants will be inside. Only then can we properly define their actual interaction with the building domain (thermostat adjustments, internal heat gains, window opening habits, CO2 generation, etc.).
However, we are still one step behind. First, we must be able to consolidate time series data. Field sensors deliver anomalous signals, regardless of the specific technology employed. Classic real-world issues are:
«I count people entering and exiting, but if two people walk out together… it misses one»
«I detect movement… but if someone sits still, I can’t see them»
«I detect presence in a room, but if a person shifts behind their screen, they vanish»
«people quickly step in and out of a space without producing any meaningful thermal effect, yet driving dynamic models crazy»
… not to mention the classic «signal lost for 10 minutes» dropouts.
I had the chance to work with Iker Gutierrez some months ago. So I posed a few straightforward questions to him: Can you design smoothing algorithms to stabilize the raw occupancy signal? Can you develop procedures that, once an anomalous data point or gap is identified, effectively reconstruct a continuous time series?
To address this, we developed several simple heuristic methods. We used quite basic statistical approaches (maximums, minimums, moving averages), typical profile fits (splines), and explicit activity indicators. And tested these using real operational data from office spaces in Denmark. The data basically corresponded with a (boring) fairly regular office schedule with a maximum capacity of 4 occupants per room.

From this experimentation, we reached several interesting conclusions:
- Surprisingly, almost any smoothing method results in reliable and similar results. However, a non- neglectable dispersion occurs around lunchtime.
- Signal reconstruction methods also performed quite effectively, though we observed that the handling of outliers and short-term absences could introduce discrepancies.
In a way, I am very pleased with these findings because they offer a clean, straightforward procedure for pre-processing occupancy signals. This allows us to feed high-quality data into semi-physical models, such as those implemented in Rubén Mulero’s simulator (Paper and Repository) or my own implementation for MPC (I will soon release v4 here).
Yet, I notice (here as well as in other ongoing research) that it remains particularly challenging to accurately infer occupancy during transition periods and within small occupant cohorts. This is precisely the operational context toward which modern offices are heading. A world of presence, working hours, and leave schedules that are increasingly a la carte.
When you combine this trend with lower overall thermal loads (we aim at Nearly Zero Energy), increasingly common/relevant cooling loads (is climate change still in question? These loads are inherently more transient than heating loads), and volatile electricity pricing… it creates an extraordinary playground for building energy optimization frameworks, such as Model Predictive Control and the ongoing STUNNED project in which I am involved.
Now, how to use this in practice: Everything we did in this work is useful for consolidating already observed occupancy. But not for forecasting/control. For those applications, I propose the following approach:
- We have already observed a few times that the overall usage profile of a building is heavily dependent on macro-scale calendars. This is traceable to NUS, our previous works with Mikel Lumbreras, and a recent work with Aitor Diez (will talk about this soon). So I propose to take a similar approach and identify a macroscopic behavior/day type based only on calendar data.
- Then, I believe that there is a need to identify one/several threshold levels. i.e. very few/ a lot of people obserbed. This is something similar to what Iker did in his work with the activity indicator.
- Then, once the day type and activity level are defined, occupancy forecasts based on Markov Chains seem to be a good option. I liked the recent work by Sood, and a simple Markov Chain works fine in Ruben Muleros simulator. Probably, a higher-level Markov Chain could also be used to transition between activity levels.Altogether, the above structure could be a powerful way to develop an occupancy prediction system for the short-mid-term horizon in the range of 12-24h. But this is speculative. Hopefully, in the coming years we will have some progress to show.
As I always state, it is a pleasure to collaborate with skillful and motivated young researchers. And Iker was one of these. Even better, this joint effort has produced both a peer-reviewed scientific paper and an open software repository. For anyone interested in pulling on this thread further:
- I. Gutierrez, R. Garay-Marinez, Processing of occupancy signals for building energy model, 2025 10th International Conference on Smart and Sustainable Technologies (SpliTech), Bol and Split, Croatia, 2025, https://doi.org/10.23919/SpliTech65624.2025.11091781
- Iker Gutierrez, Roberto Garay, People Occupation data smoothing and filling, 2024, https://github.com/IkerGutierrez1/People_Occupancy