Office Buildings Seasonal Load Forecasting

1. The case

The purpose of this project is to design an AI model to forecast the electricity consumption by offices for the last week of each season in a particular year, in one shot. This study is a one-time project on demand.
This case study reviews an actual load forecast model for electricity consumption for industry “offices”. This forecast model is a seasonal model and takes into account the seasonal data for forecasting the last week of each season of a year. The load forecast models are implemented using0 QR AI Forecaster.

2. The Data

This case study uses seasonal data with hourly resolution for one complete year missing the last week of each season. This data is frozen for the year 2001 and is used as historical data without revision.
Input data used by the model
  • Actual data published by ***. We fetch this data all at once.
  • Los Angeles regional weather data published every hour. We used humidity and temperature data.
Output dataof the model forecasts: load forecast.
We have used weather data, mostly humidity and temperature data for this load forecasting in different seasons. A calendar was used listing holidays related to the Office industry. The system does understand the weekly cycle Monday to Friday as working day, and Saturday and Sunday as weekend.

3. Data Exploration

The first step in designing the AI model is to take a deeper look into the data and identify quantifiable behavioral patterns that may not be visible at first glance.
In order to do that, the QR data science team uses different data analysis and visualization tools to extract information from raw data. You can see below the one year hourly data for the year 2001, for Office electricity consumption.
Data for The Whole Year
Raw Data for The Whole Year - Office
As is clear in the plot, different seasons have different behavior in the electricity consumption. Thus the rest of the document is structured based on the seasons which are:
  • Spring from March 1st to May 31st
  • Summer from June 1st to Aug 31st
  • Autumn from September 1st to November 30th
  • Winter from December 1st to February 28th
It is important to mention that this project is defined such that the last week of each season is missing to forecast. However, in order to design our models, we had performed analysis and model experiments on the previous last week of each season so that we can analyze the performance of the model and compute the errors. The finalized model is then used to forecast the missing last week.
3.1. Seasonal Behavior of Data - Spring
The plot below displays the behavior of the Office electricity consumption data in Spring in a closer look.
behavior of Spring
Raw data behavior of Spring data for Offices
The plot below displays the hourly consumption averages across the 3 months training data for Spring ranging from March 1st to May 24th. This data can help us see the daily pattern and daily Peak and off Peak.
Average Behavior of Spring Data
Hourly Average Behavior of Spring Data for Offices
Conclusions:
  • The consumption starts rising from around 3:00 AM and lasts until around 5:00 PM when they start to decrease.
  • The peak hours are from 8:00 AM until 4:00 PM.
  • The data is clearly hour dependent. We therefore must use the built-in feature Hour-of-the-day.
We can further refine the above analysis by drilling down to days of the week. The next plot displays the average hourly consumption for each day of the week, computed for the 3-month training data for Spring.
Average Behavior of Spring
Daily Average Behavior of Spring Data for Offices
The above plot suggests:
  • a) Weekdays have the same behavior with regular peak and off peak hours.
  • b) Peak hour on weekdays is at 3:00 PM.
  • c) Saturdays show a different pattern with lower consumption and different peak hours.
  • d) Peak hour on Saturdays is at 11:00 AM.
  • e)Sundays have almost no consumption which is reasonable considering offices are on holiday on weekends.
These observations lead to the following feature engineering configuration of our AI Price Forecast model:
  • Hour of the day can be a good feature to set in the models to capture daily behavior of the data.
  • Weekday as a built-in feature or predictor to the AI Model to indicate the days of the week.
  • The Model Splitter feature of the QR AI Forecaster should be activated to split data at run time and create and train 3 different Models to forecast different parts of the day.
3.2. Seasonal Behavior of Data - Summer
The plot below displays the behavior of the Office electricity consumption data in Summer in a closer look.
behavior of Summer data
Raw data behavior of Summer data for Offices
The plot below displays the hourly consumption averages across the 3 months training data for Summer ranging from June 1st to Aug 24th. This data can help us see the daily pattern and daily Peak and off Peak.
Average Behavior of Summer
Hourly Average Behavior of Summer Data for Offices
Conclusions:
  • The consumption starts rising from around 4:00 AM and lasts until around 4:00 PM when it starts to decrease.
  • The peak hours are from 9:00 AM until 4:00 PM
  • The data is clearly hour dependent. We therefore must use the built-in feature Hour-of-the-day.
We can further refine the above analysis by drilling down to days of the week. The next plot displays the average hourly consumption for each day of the week, computed for the 3-month training data for Summer.
Average Behavior of Summer3
Daily Average Behavior of Summer Data for Offices
The above plot suggests:
  • f) Weekdays have the same behavior with regular peak and off peak hours with slight changes in the level.
  • g) Peak hour on weekdays is at 3:00 PM.
  • h) Saturdays show a different pattern with lower consumption and different peak hours.
  • i) Peak hour on Saturdays is at 12:00 noon.
  • j)Sundays have a whole different pattern even compared to Saturdays. It has a lower level which is reasonable considering offices are on holiday on weekends.
These observations lead to the following feature engineering configuration of our AI Price Forecast model:
  • Hour of the day can be a good feature to set in the models to capture daily behavior of the data.
  • Weekday as a built-in feature or predictor to the AI Model to indicate the days of the week.
  • The Model Splitter feature of the QR AI Forecaster should be activated to split data at run time and create and train 3 different Models to forecast different parts of the day.
3.3. Seasonal Behavior of Data - Autumn
The plot below displays the behavior of the Office electricity consumption data in Autumn in a closer look.
Raw data behavior of Autumn3
Raw data behavior of Autumn data for Offices
The plot below displays the hourly consumption averages across the 3 months training data for Autumn ranging from September 1st to November 23rd. This data can help us see the daily pattern and daily Peak and off Peak.
Behavior of Autumn-v02
Hourly Average Behavior of Autumn Data for Offices
Conclusions:
  • The consumption starts rising from around 2:00 AM and lasts until around 4:00 PM when it starts to decrease.
  • The peak hours are from 9:00 AM until 4:00 PM
  • The data is clearly hour dependent. We therefore must use the built-in feature Hour-of-the-day.
We can further refine the above analysis by drilling down to days of the week. The next plot displays the average hourly consumption for each day of the week, computed for the 3-month training data for Autumn.
Average Behavior of Autumnv04
Daily Average Behavior of Autumn Data for Offices
The above plot suggests:
  • k) Weekdays have the same behavior with regular peak and off peak hours with slight changes in the level.
  • l) The peak hour on weekdays is 2:00 PM.
  • m) Saturdays show a different pattern with lower consumption and different peak hours.
  • n) Sundays have almost no consumption which is reasonable considering offices are on holiday on weekends.
  • o) The peak hour on Saturdays and Sundays is 10:00 AM.
These observations lead to the following feature engineering configuration of our AI Price Forecast model:
  • Hour of the day can be a good feature to set in the models to capture daily behavior of the data.
  • Weekday as a built-in feature or predictor to the AI Model to indicate the days of the week.
  • The Model Splitter feature of the QR AI Forecaster should be activated to split data at run time and create and train 3 different Models to forecast different parts of the day.
3.4. Seasonal Behavior of Data - Winter
The plot below displays the behavior of the Office electricity consumption data in Winter in a closer look.
behavior of Winter-v02
Raw data behavior of Winter data for Office
The plot below displays the hourly consumption averages across the 3 months training data for Winter: January and February and December 1st until 24th of the same year. This data can help us see the daily pattern and daily Peak and off Peak.
Average Behavior of Winter-v06
Hourly Average Behavior of Winter Data for Offices
Conclusions:
  • The consumption starts rising from around 2:00 AM and lasts until around 4:00 PM when it starts to decrease.
  • The peak hours are from 8:00 AM until 3:00 PM.
  • It is concluded from the plot that we have two peaks with different levels at 9:00 AM and 2:00 PM.
  • The data is clearly hour dependent. We therefore must use the built-in feature Hour-of-the-day.
We can further refine the above analysis by drilling down to days of the week. The next plot displays the average hourly consumption for each day of the week, computed for the 3-month training data for Winter.
Average Behavior of Winter-v07
Daily Average Behavior of Winter Data for Offices
The above plot suggests:
  • p) Weekdays have the same behavior with regular peak and off peak hours with slight changes in the level especially on Mondays with lowest level, followed by Fridays.
  • q) The peak hours on weekdays are 9:00 AM and 2:00 PM.
  • r) Saturdays and Sundays show completely different behavior with much lower electricity consumption which complies with the fact the offices are on holiday on weekends.
  • s) The peak hour on Saturdays and Sundays is 8:00 AM.
These observations lead to the following feature engineering configuration of our AI Price Forecast model:
  • Hour of the day can be a good feature to set in the models to capture daily behavior of the data.
  • Weekday as a built-in feature or predictor to the AI Model to indicate the days of the week.
  • The Model Splitter feature of the QR AI Forecaster should be activated to split data at run time and create and train 3 different Models to forecast different parts of the day.
4. Feature & Correlation Analysis
To select the best external time series as features or predictors, we need to analyze their correlation with the main price time series Office electricity consumption, we are forecasting. A good or useful feature must be closely correlated to and shed light on a particular behavior of the main time series.
The Office electricity consumption data present several challenges in the 1 year period considered in this Case Study. Our data science team resolves these by configuring the right AI model so as to produce accurate load forecasts for our clients.
Factoring in Temperature
Weather components such as temperature and/or feels like can affect the consumption pattern since they are directly affecting people as consumers of electricity considering this case study. This was uncovered by our data science team, using our data analysis toolbox, they executed correlation analysis across many external time series data against the main Office electricity consumption. As is displayed in the plot below, average consumption in different seasons is affected – positively correlated – with average temperature shown in the plot below. For example in summer with the higher average temperature we can see a higher average consumption in yellow, or in December we can see with lower temperature we have lower consumption.
Electricity Consumption vs Temperature Separated
Average Behavior of Office Electricity Consumption vs Temperature Separated by Seasons
Conclusions:
Temperature time series should be included as an external feature or predictor in the AI model, to guide the forecast level in different seasons and peak hours during a day.
Factoring in Solar Radiance
As can be seen in the plot below, Solar Radiance data such as DHI, DNI and GHI are good markers to separate daytime and nighttime when office consumption has active hours. This is displayed in the plot below as the average hourly behavior of solar data during the day compared to consumption data. It can be concluded from the plot that the skewness of the solar radiance data resembles the skewness in the peak hours of the consumption data. Also considering the temperature, the data pattern has a peak in the middle day with different levels in different seasons. Compared with the main time series, the plot suggests that the consumption has also a peak in the same hours during the day thus showing a positive correlation.
Temperature and solar
Hourly Average Behavior of Office Data vs Temperature and Solar Radiance Separated by Seasons
Conclusions:
Solar Radiance time series should be included as an external feature or predictor in the AI model, to guide the forecast to catch different parts of the day specifically in office case study where peak hours are day time hours.
Factoring in Humidity
Relative humidity should be inversely proportional to electricity consumption as can be seen in the plot below.
Electricity Consumption vs Humidity v02
Average Behavior of Office Electricity Consumption vs Humidity Separated by Seasons
Conclusions:
Relative Humidity time series should be included as an external feature or predictor in the AI model, to guide the forecast to adjust with the pattern.
5. The AI Forecast Model
By now the preliminary data analysis work has been done and we are ready to implement the best AI model for this case study, considering the specific features and data discussed previously. We use QR AI Forecaster cloud service. This platform is a no-coding automated AI platform, where modeling is done by dragging and dropping various model and feature engineering components in an intuitive AI dashboard, to automatically assemble and execute the final forecast model. Following the previous chapter, we are going to have separate forecast models for each season; however, the general structure is the same. Aside from training data as the input of the machine learning model which would be a specific date range for each season, some lagged predictors or internals are also different.
1) Data Preprocessing
    We first configure a few standard data processing features discussed above in QR AI Forecaster:
  • a) Gap Filling can be accomplished by several methods (Linear Interpolation, Weekly Pattern, Daily Pattern, etc. ), Generally we did not have missing data in this case study, but we used gap filling methods such as weekly pattern method to fill up if there were any.
  • b)Calendar is used by a processor to swap mid–week holiday data with Sundays in the future, and with a regular day in the past during forecast and training respectively, as well as labeling working days and weekends for the AI modeling. In this case study we used the US calendar for 2001 dedicated to the large office industry.
2) Feature Engineering
We configure the following features in QR AI Forecaster dashboard. As mentioned above, based on the designed model for each season we have used 1, 2, or more previous point/week or even have applied an experimented n hours simple moving average.
Predictor Type Features
Lagged Predictors
n Previous Point, n Previous Week, SMA applied on Previous Point
Built-in Predictors
Hour, Weekday, Day of Month
External Time Series Predictors
Temperature, Humidity
QR Forecaster Feature Engineering Dashboard v08
QR Forecaster Feature Engineering Dashboard Load Forecast Model for Office Consumer Type for Spring
3) AI Model
We configure the following AI model specifications in QR AI Forecaster dashboard:
  • a) Model Splitter:
    Recall that this feature allows the AI machine to split the data and define and train multiple models at run-time to forecast specific profiles. In this case considering the structure of the data, discussed in the previous chapter, we want to model specific parts of the day with a total of three models forecasting for midnight until 5:00 A.M and from 5:00 AM until 2:00 PM and the rest of the day.
  • b) Model Optimization:
    We configured a range of deep learning AI models for this case study. They have their own advantages. We present here 3 machine learning models, NGBoots, LightGBM and XGBoost. These can be configured to perform with nearly equal accuracy levels.
    For example with XGBoost we configure the following 12 hyper-parameters:
booster number of estimators gamma
max depth
min child weight
max delta step
Subsample
l1 regularization coefficient
l2 regularization coefficient
base score
evaluation metric
objective
The classical pitfalls of over or under fitting must be avoided. If we choose 5 values for each hyper-parameter, there are 512 combinations to try. This is an impossible manual task. QR AI Forecaster has an auto-ML toolbox that fine-tunes and optimizes the hyper-parameters. This toolbox runs the equivalent of thousands of scenarios under 30 minutes.
  • c) Model Execution:
    Once the model is finalized, training one of the machine learning models over about 3 months of hourly Office Electricity Consumption data for each season, and executing a forecast takes about 1 minute .
6. Forecast and Accuracy Analysis
1) The Forecast Display Dashboard
QR AI Forecaster has several data visualization dashboards that gather in one screen:
  • a) Forecast error is computed by MAPE (mean absolute percentage error), and MAE (mean absolute error). These are listed in table format and gauges.
  • b) Table of time series (actual, forecast and errors of each datapoint)
In the accuracy analysis dashboards below you can find the results of our forecasts for the previous to last week of each season when we have actual data to compute the errors plus the last week of each season when there is no actual data and the goal of the case study is to forecast that interval.
Spring
QR Forecaster Data Visualization Dashboard Actual, Forecast and Accuracy Hourly Data. May 18th - May 31st.
QR Forecaster Data Visualization Dashboard Actual, Forecast and Accuracy Hourly Data. May 18th - May 31st.
Summer
QR Forecaster Data Visualization Dashboard Actual, Forecast and Accuracy Hourly Data. Aug 18th - Aug 31st.
QR Forecaster Data Visualization Dashboard Actual, Forecast and Accuracy Hourly Data. Aug 18th - Aug 31st.
Autumn
Data Visualization Dashboard Autumn 10
QR Forecaster Data Visualization Dashboard Actual, Forecast and Accuracy Hourly Data. Nov. 17th - Nov. 30th.
Winter
Visualization Dashboard winter10
QR Forecaster Data Visualization Dashboard Actual, Forecast and Accuracy Hourly Data. Dec.18th - Dec 31st.
2) Accuracy Analysis
The Office Electricity Consumption forecast has a MAPE of:
  • 2.74 for Spring
  • 5.42 for Summer
  • 8.79 for Autumn
  • 4.70 for Winter
As you can see in the other Case Studies we have published for other industries, electricity load forecasting in ***, using the same machine learning model, with different parameters and features, results in a MAPE of ***. This is mainly due to the fact that the dynamic of consumption level change from one day to the next can be very different across other profiles. e.g. offices have a more regular consumption behavior throughout the year compared to schools or hotels.

Next Step

We look forward to exploring the range of options for your projects. Please write to us and one of our project managers will get back to you at once.