Multifamily Seasonal Load Forecasting

1. The case

The purpose of this project is to design an AI model to forecast the electricity consumption by Multifamilies 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 “Multifamily”. 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 using 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 data of 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 US holidays. 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 Multifamily electricity consumption.

Raw Data for The Whole Year - Multifamily
Raw Data for The Whole Year - Multifamily
As is clear in the plot, different seasons have different behavior in the electricity consumption with a higher consumption in some periods of Summer and lower level in December and end of Spring. 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 31th and
  • 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 Multifamily electricity consumption data in Spring in a closer look.
Raw data behavior of Spring data for Multifamily
Raw data behavior of Spring data for Multifamily

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.

Hourly Average Behavior of Spring Data for Multifamily
Hourly Average Behavior of Spring Data for Multifamily
Conclusions:
  • The average daily pattern of behavior is such that we have two peaks in a day, one in the morning at around 7:00 a.m. and one at night at around 8:00 p.m.
  • The lowest hours of consumption are at 3:00 and 4:00 a.m. followed by an upward trend until the first peak.
  • We therefore must use the built-in feature Hour-of-the-day to capture the above mentioned pattern.
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.
Daily Average Behavior of Spring Data for Multifamily
Daily Average Behavior of Spring Data for Multifamily
The above plot suggests:
  • a) Weekdays have the same behavior but with different levels, with regular peak and off peak hours.
  • b) We have two peak hours on weekdays: In the mornings at around 7:00 a.m. and at nights around 8:00 p.m.
  • c) Saturdays and Sundays show a different pattern and different peak hours.
  • d) For the weekend, the morning peak is shifted from weekdays which is at 10 :00 while the second peak remains the same for both weekdays and weekends.
  • e) At the middle of the day the consumption is noticeably higher for weekends compared to weekdays, as is expected from the profile “Multifamily”
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 Weekdays and Saturdays and Sundays separately.
3.2. Seasonal Behavior of Data - Summer
The plot below displays the behavior of the Hotels electricity consumption data in Summer in a closer look.
Raw data behavior of Summer data for Multifamily
Raw data behavior of Summer data for Multifamily
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.
Hourly Average Behavior of Summer Data for Multifamily
Hourly Average Behavior of Summer Data for Multifamily
Conclusions:
  • On average the daily pattern of electricity consumption in Summers is such that the morning peak at 7:00 a.m. in Spring is eliminated and we have higher levels in evenings compared to mornings.
  • The consumption peak on average is at 8:00 p.m.
  • A downward trend starts at night around 9:00 p.m. and continues until 4:00 a.m. when we have the lowest level of consumption.
  • From 5:00 AM consumption starts getting higher and from 7:00 AM to 3:00 PM it remains almost the same from then onwards it starts rising again till the highest peak of the day.
  • 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.
Daily Average Behavior of Summer Data for Multifamily
Daily Average Behavior of Summer Data for Multifamily
The above plot suggests:
  • f) From Monday until Friday (the weekdays) we have a similar daily pattern of consumption but with different levels during the afternoon.
  • g) There are two peaks in a day: the morning peak on weekdays is at 7:00 a.m. and the night peak is from 8:00 p.m to 9:00 p.m.
  • h) On Saturdays and Sundays the morning peak shifts and is 11:00 a.m. till noon.
  • i) Similar to what we had in Spring data, Monday mornings followed by Sunday nights have the lowest level.
  • j) For the second peak Saturdays are the same as weekdays but the consumption of Sundays is a bit higher than other days.
  • k) Similar to Spring, at the middle of the day the consumption is noticeably higher for weekends compared to weekdays
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 Weekdays and Saturdays and Sundays separately.
3.3. Seasonal Behavior of Data - Autumn
The plot below displays the behavior of the Multifamily electricity consumption data in Autumn in a closer look.
Raw data behavior of Autumn data for Multifamily
Raw data behavior of Autumn data for Multifamily
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.
Hourly Average Behavior of Autumn Data for Multifamily
Hourly Average Behavior of Autumn Data for Multifamily
Conclusions:
  • The average daily pattern of behavior is such that we have two peaks in a day, one in the morning at around 7:00 a.m till 8:00 a.m and one at night at around 8:00 p.m to 9:00 p.m.
  • The lowest hours of consumption are from 3:00 a.m to 4:00 a.m followed by an upward trend until the first peak.
  • The consumption of autumn is almost the same as of Spring, just the first peak is a bit lower than Spring’s first peak.
  • 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.
Daily Average Behavior of Autumn Data for Multifamily
Daily Average Behavior of Autumn Data for Multifamily
The above plot suggests:
  • l) Weekdays have the same behavior but with different levels, with regular peak and off peak hours.
  • m) We have two peak hours on weekdays: In the mornings at around 7:00 a.m. and at nights around 7:00 p.m to 9:00 p.m.
  • n) Saturdays and Sundays show a different pattern and different peak hours.
  • o) For the weekend, the morning peak is shifted from weekdays which is at 10 :00 a.m for Saturdays and at noon for Sundays while the second peak remains the same for both weekdays and weekends.
  • p) At the middle of the day the consumption is noticeably higher for weekends compared to weekdays, as is expected from the profile “Multifamily”
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 Weekdays and Saturdays and Sundays separately.
3.4. Seasonal Behavior of Data - Winter
The plot below displays the behavior of the Multifamily electricity consumption data in Winter in a closer look.
Raw data behavior of Winter data for Multifamily
Raw data behavior of Winter data for Multifamily
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.
Hourly Average Behavior of Winter Data for Multifamily
Hourly Average Behavior of Winter Data for Multifamily
Conclusions:
  • The average daily pattern of behavior is such that we have two peaks in a day, one in the morning at around 7:00 a.m. and one at night at around 8:00 p.m.
  • The lowest hours of consumption are at 3:00 a.m to 4:00 a.m. followed by an upward trend until the first peak.
  • The consumption goes low again around 2:00 p.m to 4:00 p.m and starts to get high till the second peak.
  • 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.
Daily Average Behavior of Winter Data for Multifamily
Daily Average Behavior of Winter Data for Multifamily
The above plot suggests:
  • q) Weekdays have the same behavior but with different levels, with regular peak and off peak hours.
  • r) We have two peak hours on weekdays: In the mornings at around 6:00 a.m till 8:00 a.m and at nights around 7:00 p.m till 9:00 p.m.
  • s)Saturdays and Sundays show a different pattern and different peak hours.
  • t) For the weekend, the morning peak is shifted from weekdays which is at 9:00a.m to 10 :00 a.m while the second peak is at the same time but much lower in levels than weekdays.
  • u) At the middle of the day the consumption is noticeably higher for weekends compared to weekdays, as is expected from the profile “Multifamily”
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.

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 Multifamily 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 Multifamily 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 Multi-family 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 winter we can see with lower temperature we have again a bit higher consumption which explains the usage of heaters in winter. Note: Temperature has different correlation with consumption in different seasons like its positive correlation in summers and negative in winters, so we use it accordingly in all the seasons separately.
Average Behavior of Office Electricity Consumption vs Temperature Separated by Seasons
Average Behavior of Office Electricity Consumption vs Temperature Separated by Seasons
Conclusion:
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 Multifamily 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 but in negative correlation. Also the Consumption has peaks at the night times when people get home or in morning before leaving home.
Hourly Average Behavior of Office Data vs Temperature and Solar Radiance Separated by Seasons
Hourly Average Behavior of Office Data vs Temperature and Solar Radiance Separated by Seasons
Conclusion:
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 Multifamily case study where peak hours are day time hours.

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.
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/day/week, simple or exponential moving average on previous point and reliable externals.
Predictor Type Features
Lagged Predictors
n Previous Point, n Previous Day, n Previous Week
Built-in Predictors
Hour, Weekday
External Time Series Predictors
Temperature (with daily difference), Solar Radiance
QR Forecaster Feature Engineering Dashboard Load Forecast Model for Multifamily Consumer Type for Spring
QR Forecaster Feature Engineering Dashboard Load Forecast Model for Multifamily 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 different parts of the day when the data has different upward or downward behavior, separately with multiple models forecasting for midnight to 4:00 AM, 4:00 AM to 7:00 AM, 7:00 AM to 2:00 PM, 2:00 PM to 8:00 and 8:00 PM until midnight.
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 Hotel 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 spring
QR Forecaster Data Visualization Dashboard Actual, Forecast and Accuracy Hourly Data. May 18th - May 31st.
Summer
QR Forecaster Data Visualization summer
QR Forecaster Data Visualization Dashboard Actual, Forecast and Accuracy Hourly Data. Aug 18th - Aug 31st.
Autumn
QR Forecaster Data Visualization Autumn
QR Forecaster Data Visualization Dashboard Actual, Forecast and Accuracy Hourly Data. Nov. 17th - Nov. 30th.
Winter
QR Forecaster Data Visualization winter
QR Forecaster Data Visualization Dashboard Actual, Forecast and Accuracy Hourly Data. Dec.18th - Dec 31st.
2) Accuracy Analysis
The Multifamily Electricity Consumption forecast has a MAPE of:
  • 5.66 for Spring
  • 8.40 for Summer
  • 9.72 for Autumn
  • 6.89 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.