Planning Sustainable Energy Generation with Machine Learning and Decision Optimization

Aakanksha Joshi
IBM Data Science in Practice
8 min readFeb 16, 2021

The Energy and Utilities Industry is undergoing a major global transition, which is driving structural shifts in the industry and challenging leaders to adopt new strategic and operational imperatives. In the United States, 77% of people believe it’s more important to develop alternative energy sources, such as solar and wind power than to produce more coal, oil and other fossil fuels. [1]

a person in an orange safety work outfit, hardhat, and goggles holding a tablet standing in front of a wind power windmill

Adoption of clean energy technologies is growing and, as grid owners add more sources of energy to their plants, understanding demand and optimizing energy generation becomes critical. Generating too much energy can lead to energy spillage, while under-generation can result in widespread blackouts. In 2018, research showed that only about 34.5% of the energy used by the electric power industry reaches end users as electricity — the rest is lost in the process of generating, transmitting and distributing the power. [2]

As we move toward more sustainable sources for energy generation, such as wind and solar, we begin to see unique challenges. There is a need to meet fluctuating energy demands by creating an optimal balance between energy generated from renewable sources and non-renewable (thermal) resources. More importantly, it’s difficult to predict precise behavior of renewable resources such as wind. Optimizing a solution when uncertainty is involved can be computationally expensive.

This doesn’t mean we should leave such challenges unaddressed. In fact, data science, machine learning and decision optimization techniques can help us in building solutions that can tackle these challenges accurately and optimally.

Let’s look at the concepts of demand forecasting and optimal grid scheduling with an example.

Meet Derek from BlueCo Energy.

a professional looking man in a blue shirt with a red tie

…………………………………

Derek is the Senior Systems Engineer for BlueCo Energy. He is responsible for monitoring energy consumption across the grid and wants to confidently bring energy generation systems online and offline as needed to maximize supply-demand efficiency.
……………………………….

He relies on manual adjustments and his judgement to make decisions on a daily basis. He shared his pain points with BlueCo Energy’s Data Scientists, and they are working on a solution to help him out.

To give him the best of data science, machine learning, and decision optimization, we have to break down his challenges into the following categories:

📝 Demand Forecasting — getting accurate energy demand forecasts

📝 Unit Commitment Recommendation — getting optimal recommendations for the grid

Part 1: Demand Forecasting

The first step towards optimal planning is to understand the expected demand. Derek tells the Application Developer that he would like to understand both the demand forecast and expected demand coverage from current unit commitment plan.

The Application Developer creates the prototype below and shares it with Derek. Derek agrees that the design aligns with his expectations.

a curve with shaded area around it in graph
Demand Forecast View

In this dashboard, Derek can see the expected demand over the next 24 hours along with the coverage his current unit commitment plan can provide. If the demand falls out of coverage, Derek might have to make some changes to the default recommendations.

The visualization itself is simple, but how does the model accurately predict demand? One interesting thing about energy demand is the high amount of seasonality in the data. Look at the example below:

time series graph
Time Series Patterns

These patterns make energy demand prediction a little more straightforward, but not entirely.

A temperature of 95° F on the 9th of July last year does not guarantee the same this year. A rainy day today does not guarantee one tomorrow. Hold this thought for now, as BlueCo Energy’s Data Scientist will be coming back to it in a moment.

First, let’s think about the features can we start with to build an hourly energy demand forecasting model. We could start with just a year, a day of the week, a week of the year and an hour and build a regression model as a baseline. The predictions from such a model would look something like this (an aggregated view):

graph of actual versus predicted demand over time
Actual vs. Predicted Demand

We can see that the model captures the overall rise and fall in demand. The model did miss some peaks, and this can cause disruptions in the energy supply.

Can you think of other features that might address this? The Data Scientists at BlueCo Energy brainstorm.

green person profile icon
Jerry, Data Scientist

💬
“I suggest we think about how we can incorporate weather data. That’s a key missing component at the moment.”

orange person profile icon
Jessica, Data Scientist

💬
“Agreed. What about incorporating more information from the calendar? I suppose demand could get impacted by various festivals. Some festivals might even cause bigger spikes that others.”

blue person profile icon
Katie, Data Scientist

💬
“Good point. We might also want to explore demand by smaller regions, since different zip codes may have different demand patterns. I’ll start working on that.”

As you can see from this conversation between the Data Scientists, a lot more intelligence can go into predicting energy demand.

Since the team wants to improve the experience for Derek, they decide to work in an agile manner. They add these features to their models, validate its performance and finalize the model. They decide to continue improving it during the next iteration following an agile AI methodology.

Part 2: Unit Commitment Recommendation

Knowing the demand forecast only addresses half of the challenge for Derek. He still needs smart recommendations. The Data Scientists convene again to build an optimal unit commitment plan generator.

orange person profile icon
Jessica, Data Scientist

💬
“We have been investing in renewable sources of energy. Derek has to maximize their utilization while ensuring the thermal units produce enough to meet overall demand.”

green person profile icon
Jerry, Data Scientist

💬
“Yes, that’s a good objective. There is so much uncertainty involved with wind and solar energy generation. We will need to think about how we can take this into account.”

blue person profile icon
Katie, Data Scientist

💬
“We’ll also have to be creative about model evaluation. Maybe we could try an ex-post analysis and compare the recommended plans with the actual plans to measure improvements.”

olive green person profile icon
Bob, Data Scientist

💬
And maybe we should optimize in a way that the recommended plan prefers to overcompensate for expected demand. We definitely want to avoid outages at all costs.”

They discuss their ideas and decide to build three types of unit commitment optimization models.

✔️ Deterministic: This model formulation does not take into account uncertainty, and therefore the energy produced by renewable units is given as constant values.

✔️ Stochastic: This model formulation is based on a common stochastic programming technique. A discrete set of 100 simulated scenarios is pre-computed based on hourly expected values and standard deviations for the renewable generation, and it is assumed that the realization of these scenarios is normally distributed. The final solution is optimized over this set of 100 scenarios to find the optimal solution.

✔️ Robust: This model formulation handles uncertainty by building a mathematical model over a single scenario with deterministic uncertainty intervals. The intervals can be generated using hourly expected values and standard deviations of renewable generation.

The inputs and outputs for all three models would be the same, except scenarios that would only be needed for the Stochastic model.

visualization of optimization variables: thermal units, renewable units, renewable forecasts, configuration of thermal units, configuration of renewable units, system & load configuration, and demand forecast
Optimization Variables

They decide to compare recommendations from all three models in an ex-post analysis and choose one that performs the best.

visualization of model predictions comparison
Comparing Models

Once both predictive and optimization models have been finalized, they can be deployed. The deployments can be called directly into Derek’s front-end application. We already saw how the forecast view will look. Let’s review the recommendations.

visualization of optimal plan
Optimal Unit Commitment Plan

These recommendations advise Derek on when he should turn a particular thermal unit on or off based on the expected demand and generation from wind and solar sources. This plan is optimized to meet demand and maximize utilization of the renewable resources.

BlueCo Energy’s Data Scientists have various open-source options to choose from to build this solution end to end. They could combine a forecasting model with an optimization model and then display the final outcomes in a front-end JavaScript application. This solution was built to address a specific set of requirements for Derek, with specific constraints applicable to BlueCo Energy’s grid, but we could expand the same concepts to cover a variety of other challenges in the Energy and Utilities Industry. It is open, transparent, trustworthy, modular, and completely customizable. As concerns around climate change grow, the focus towards investing in and leveraging renewable resources will sharpen, and solutions like the one above will become increasingly relevant and prominent.

Are you interested in implementing something similar for your own energy planning, but don’t know where to begin?

Request a test run of the Energy Demand Planning Industry Accelerator on Cloud Pak for Data to get started.

Explore the catalog to learn about data science accelerators on Cloud Pak for Data. The IBM Data Science and AI Elite plans, co-creates and proves the project with you based on our proven Agile AI methodology. Visit ibm.biz/datascienceelite to connect with us, explore our resources and learn more.

References:

[1], [2]: Renewable energy is growing fast in the U.S., but fossil fuels still dominate, Pew Research Center

--

--

Aakanksha Joshi
IBM Data Science in Practice

Senior AI Engineer, IBM Client Engineering • M.S. Data Science, Columbia University