Published on 24 May 2024

Algorithms forecast future electricity demands

Assoc Prof Yeo Chai Kiat and Assoc Prof Adams Kong use video-prediction AI and transformers to fill data gaps.

Electricity grids provide the power needed to sustain the modern world. Insufficient electricity can lead to power supply disruptions resulting in partial outages or even complete blackouts. Conversely, producing excess electricity can damage grid infrastructure.

One solution to maintaining adequate power supply is to store excess electricity in battery farms that can be tapped when demand is high. However, the adoption of such farms is limited. It is therefore critical to find a balance in generating enough power to meet demand while not overproducing.

To help find this balance, load forecasting (or predicting power needs) can be used to help accurately schedule electricity production in advance. This can be achieved by studying the trends from daily and weekly schedules – such as peaks and lulls in power use corresponding to daily office working hours and a five-day work week.

On a longer timescale, yearly trends follow seasonal variations such as temperature changes, influencing electricity demand for heating or air conditioning. However, unpredictable factors such as the weather makes these trends less obvious and difficult to model.


We sought to address these issues by using neural networks – a type of artificial intelligence (AI) – to analyse visual representations of data for power use and time that highlight daily and weekly trends.

The power consumption and time data was split into slices that each represented a day. Seven slices were then stacked vertically to visually portray one week’s worth of information as an image. This method of visually representing the data made daily and weekly energy use trends obvious, as we could observe peaks in power use lining up around the same time.

This approach was used to visualise power consumption and time datasets from the past and from different locations. A video-prediction neural network was used to analyse and find clues in these images, such as patterns in electricity use at specific time periods, to help predict future power needs. This could also be useful for filling any gaps of insufficient energy supply.

To demonstrate the efficacy of the method, we first analysed datasets from two distinct sources: the American electricity transmission service operator, American Electric Power (AEP), and smart meters in London.

The AEP dataset is an aggregate of all customers connected to the service operator, while the London dataset contains data for individual households. This allowed the scalability of the model to be tested.

Compared with existing statistical and deep learning methods for forecasting a two-day period, the proposed method performed equally well in terms of accuracy (the two-day forecast for the AEP dataset being only 0.14% off from actual values on average). The proposed method was superior in predicting the one-week forecast, being closer to actual values than other methods.


A visual representation of electricity use in homes for a week. Each row represents the hourly electricity consumption by households in a day, with seven rows in all for the whole week. The lighter the colour of the squares in each row, the higher the electricity use. Representing electricity demand as stacked images makes trends in power consumption more obvious. Credit: NTU.


We also developed another method to forecast energy consumption to address a problem with existing prediction approaches using neural networks.

Current approaches used for forecasting cannot do multiple computations for a set of data in parallel because these models are designed to operate sequentially – using data from a previous step before making calculations for the next.

But a type of neural network, called a transformer, does not have the limitation of processing data in order. These types of algorithms were first used for text translation.

The transformer can then process a set of energy consumption data all at once, performing different calculations simultaneously to speed up power use forecasting.

Leveraging the latest generation of AI accelerators, we enhanced the efficiency of the transformer further by considerably reducing the number of computations needed.

Our transformer AI functioned at least four times faster than the image analysis method, while the latter performed slightly better at load forecasting.

By Yeo Chai Kiat, Adams Kong and Chan Jun Wei

Assoc Prof Yeo Chai Kiat from NTU’s School of Computer Science and Engineering (SCSE) is the Deputy Director and Programme Director of the Singtel Cognitive and Artificial Intelligence Lab for Enterprises at NTU. Her research interests include anomaly detection, data analytics, predictive analytics, neural networks, machine learning, artificial intelligence and mobile networks.

Assoc Prof Adams Kong from SCSE has major research interests in pattern recognition, deep learning and their applications in computer vision, power systems, healthcare, biometrics and improving the robustness of artificial intelligence.

Chan Jun Wei is a PhD student from SCSE.

More details on the research cited can be found in IEEE Transactions on Power Systems (2023), DOI:10.1109/TPWRS.2022.3159493, and IEEE Electrical Power and Energy Conference (2022), DOI: 10.1109/EPEC56903.2022.10000228.

The article appeared first in NTU's research and innovation magazine Pushing Frontiers (issue #22, August 2023).