How to Forecast Renewable Energy Consumption
- By Datamago team
- Published May 20, 2022
- 5 min read
We’re going to forecast the total renewable energy consumption in the U.S. (source) and will highlight a couple easy techniques that will help clean the data and achieve the best result. The historical data represents all sectors and energy sources; however, the techniques we use can be useful when forecasting energy consumption in any sector (e.g. residential, industrial, transportation, etc.) at local, regional, and national levels. In fact, they can be beneficial when forecasting almost any type of time series data.
We recommend getting started with a baseline forecast before looking for ways to improve, so we’ll create a 12 month forecast based on 20 years of historical data with default settings. Here’s the result:
The forecast achieved an excellent performance score (for advanced users: the mean absolute percentage error on the validation set was 2.8%), but there is room for improvement.
The first step is to analyze the predictability of the historical data and look for weak spots. Overall, there’s a consistent upward trend and increasingly prominent seasonality where consumption goes up in the spring through early summer, then dips in the fall through early winter. This is a fairly predictable pattern, but there are a couple locations where the seasonality is interrupted (circled in red below):
The interruption on the right coincides with the height of the COVID pandemic in the U.S. Although the data appears to start returning to normal afterwards in 2021, the interruption is so close to the end of the historical data that it’ll likely influence the forecast in some way. In fact, the forecast bears a resemblance to the COVID era data, which isn’t what we want unless we expect the conditions in 2022 (the forecast period) to be similar to 2020.
The interruption on the left is small and far away enough from the end that it probably isn’t highly impactful, but we’ll address it anyway to be sure.
To fix both interruptions, we’ll use a technique called historical forecasting where the original values are replaced with predictions based on the more stable parts of the data.
The new forecast achieved the same performance score but since higher consumption is forecasted in the spring and early summer where we’d historically expect it, the overall result is more feasible (assuming energy consumption will continue its return to normal in 2022). We could continue to tweak the forecast but given the high performance score and reasonable outlook, this is a good place to stop.
Alternatives
There are usually multiple ways to approach a forecasting problem, and different techniques can be more or less beneficial depending on the dataset. We’ll go over a couple alternatives below in order to broaden our understanding of the options available.
Trimming
We can see in the historical data how the yearly seasonality becomes more prominent over time, so it stands to reason that the weaker seasonality at the beginning may not be helpful for forecasting the future. In this case, we can trim the data up until the point where the stronger seasonal signal begins.
However, we’ll trim the data up until right after the first historical forecast in 2015. This way we’ll see what the final result would have been had we trimmed out the first interruption instead of creating a historical forecast to fix it. We’ll leave the historical forecast over the COVID section since that will still be included in the historical data.
Here's the result:
The performance score dropped a little to ‘good’ (4.2% mean absolute percentage error) and the energy consumption during the high season (spring and early summer) isn’t forecasted to be as much as you’d expect given the historical pattern. We can conclude that it’s better to trim less, allowing for more historical data to base forecasts on.
Extended historical forecasing
The historical forecast we previously made over the COVID affected data covers just the height of the pandemic in the U.S. in 2020. However, given the sudden dip right after it, and the unprecedentedly high consumption during the winter (December 2021 and January 2022) at the end of the dataset, you could make the case that the movement is still irregular and hasn't recovered yet to its pre-pandemic trajectory.
In this case, we have the option of extending the historical forecast to replace all of the values at the end of the dataset from March 2020 to January 2022. We’ll undo the trimming from the previous example and keep the original historical forecast in 2015. Here’s the result:
The performance score for this forecast is the same as the original but the validation set error is slightly lower (2% mean absolute percentage error compared to 2.8%). Aside from the improved accuracy, this is the forecast to keep if you can’t assume that the month-to-month fluctuation in the future will look similar to the recent past. Instead, a smoother forecast provides you with an average that captures the seasonality and trend but doesn’t attempt to predict the small scale fluctuation.
Finally, it’s worth noting that both of the alternative forecasts above fall within the 90% confidence interval of the originally recommended one. This is what confidence intervals are for: Datamago automatically computes a range of possible outcomes so that you don’t need to generate variations yourself.
As demonstrated in this post, both historical forecasting and trimming are simple yet powerful techniques that are useful for practically any type of time series, renewable energy included. And anyone with a Datamago account can use them.