How to build energy consumption prediction model

Submitted by Bruno Santos Pimentel on Fri, 08/10/2018 - 17:25
How to build energy consumption prediction model

Understand how consistent application of Machine Learning techniques can contribute to identifying significant opportunities for gains in energy-intensive processes.


There is currently a great deal of discussion about Artificial Intelligence, Machine Learning, and their potential to create value in a number of areas. In fact, however much these topics have been popularized by the increasing availability of programming languages, libraries, modeling tools, and courses, among other sources, cases of successful applications are still far from numerous. In addition, good applications of Machine Learning necessarily entail a deep understanding of the process that is under analysis.

In this article we will discuss projects that involve the analysis, modeling, and interpretation of data on energy consumption and on the context in which this consumption is taking place.

But first it is worth calling attention to an important concept: Explainable Artificial Intelligence. As the name itself indicates, making artificial intelligence more "explainable" implies building models that can be easily understood and that at the same time produce accurate results – a movement at right angles to a number of popular, powerful models that are true "black boxes" in the eyes of their users.

Transparency, robustness, and comprehensibility are fundamental aspects of any prediction model, in addition to directly influencing their dissemination and effective adoption.

Machine Learning and energy prediction models

We will begin our exploitation with a relatively simple model, but of a process that is anything but simple. Imagine an industrial machine for continuous production, where the inputs are supplied and the finished products are continuously removed, without interruption of the process. Steel furnaces, grain dryers, fractionation and classification towers are some examples.

If the objective of the analysis is to understand the relationships between the consumption of a certain energy input and the operational context in which this consumption is taking place, the first step in a data-based approach would be to visually assess this relationship.

Thus each point in the chart below represents a production day, considering the total energy consumption (vertical axis) and the total quantity produced during this period (horizontal axis), and ignoring other information in this context, such as the type of product, process time, and characteristics of the inputs, among others.

machine learning graphic 1

This model allows us to predict how much energy would be needed to produce a given quantity of product during one day (or any other time interval). For medium and long-term energy planning of large consumers, this is important information that facilitates budget and contracting functions.

Another important observation: data from the real world are rarely as well-behaved as we would like. This is because any real process presents some variance in its behavior, and also because the instruments we use to understand it are necessarily inaccurate and subject to noise and interference.

Of course a good prediction model will only be obtained using a sufficient quantity of good-quality data. And more significantly: a good prediction model will only give good results if the data supplied to it are of good quality. Reinforceing once again the maxim of George Box, “all models are wrong, but some are useful.”

But in any case the linear equation produced by the regression model represents with good approximation the relationship between the variables of interest, in addition to highlighting two important parameters of any process: the fixed amount of energy consumption (intercept of the line) and the variable amount (slope of the line).

This model also leads us to another important observation. If energy consumption can be well explained by the quantity produced, there will be two main ways to promote energy efficiency: reducing the fixed consumption, diluting it at higher levels of production, and/or reducing the variable consumption, investing in the energy efficiency of the process and its equipment.

Contextualization of energy consumption

Let us now return to the contextual information we initially left aside. What if we analyzed the process from the point of view of each production order (lot, batch, run, or other form of production organization), taking into account the type of product, the characteristics of the inputs, and the actual mode of operation?

machine learning graphic 2

The idea would then be to predict the energy consumption of each production order as a function of all of the contextual variables available. Thus each point in the chart would represent a production order, taking into consideration not only energy consumption (vertical axis) and quantity produced (horizontal axis), but also all of the contextual information relevant to the analysis.

Although a pattern can be observed in the graph, the relationship between the characteristics of a production order and its energy consumption can no longer be expressed by a simple linear equation. In addition, the levels of variance and noise are clearly higher than in the previous analysis.

Therefore we need a more sophisticated model that can incorporate all of the non-linearities of the process while still being able to predict consumption accurately. And here we have an important trade-off: for complex problems, greater predictive power can imply a less “explainable” model.

An interesting candidate is the XGBoost (Extreme Gradient Boosting) models that generally achieve good accuracy although they are less explainable than the linear regression previously used. XGBoost is based on the concept of decision trees, but with boosting strategies that confer the to the model better ability to cope with the dilemma between polarization (bias) and variance and their capacity to generalize starting from the training data. But these details will wait for a future article.

Let us return to our analysis. The red dots are the actual data, and the blue ones are the points predicted by our model. Visually the adherence of the model is good, even for less well-behaved regions of the analysis space – which can indicate a certain degree of overfitting, i.e., the model becomes less generalized, adjusting to include actual data that correspond to the noise in the training data.

machine learning graphic 3

In any case the model suggests that it is possible to predict, with a good degree of certainty, the energy consumption of a certain process as a function of each production order, considering all of its parameters. In turn these parameters can be analyzed as a function of the strength of their contribution to the variations in the behavior of the process.

It is interesting to note that this model, in addition to allowing the prediction of energy consumption, also enables the identification of the variables most relevant to energy efficiency efforts.

Advanced analyses of energy efficiency

In this article we discuss digital twins and their central role in Industry 4.0 and in operational efficiency initiatives. Digital twins are complex models, constructed from a large volume of data, for reproducing the main operational characteristics of a certain process or machine – a digital representation of the asset of interest.

In fact, the construction of a digital twin is an activity that requires, in addition to specific skills in Machine Learning, a good amount of knowledge about the object of the analysis. The need follows for the deep involvement of experts, identifying the characteristics of the process that should be handled by the model, and highlighting the details of the phenomena present there.

Developing a digital twin will necessarily involve the integration of models having different approaches – statistical, analytical, numerical, and stochastic – around a common objective: reproducing, with the greatest possible fidelity, the behavior of the physical system of interest, making it possible to infer its condition from specific measurements, and to extrapolate operational behaviors that are difficult to extrapolate experimentally.

Whatever the approach, the application of Machine Learning techniques to energy management problems involves in-depth analyses, with significant input of knowledge about the process, culminating in the construction of prediction models that make it possible to determine the effects of managerial decisions on many types of operations.

Learn more about Digital Transformation and Industry 4.0 in Energy and Utilities Management

Intelligent energy and utilities management systems

In the context of Industry 4.0, good energy and utilities management systems should be able to capture, store, and process large volumes of data on the consumption of energy and utilities of any type of business, whether it be industrial equipment or a production or corporate process. These data, combined with information about the context in which they were registered (production plans, process variables, and operational parameters, among others) allow, using Machine Learning techniques, the construction of prediction models that can be combined both to support planning functions as well as to create a digital representation of those assets. Technological platforms with large integration capacity facilitate the capture of relevant data, and offer modeling and visualization functions that make natural the use, interpretation, and evolution of the constructed prediction models, resulting in significant value creation for the user.

Request a demonstration


Product Manager, Viridis

Viridis Product Manager, with more than 20 years of leadership in innovation and technology programs in large industrial organizations. PhD and masters degree in computer science from UFMG, bachelor’s degree in mechanical engineering, innovation and sustainability fellow at Sloan School of Management, MIT. Extensive experience in project management and open innovation teams with industry, academia, and startups, applying digital technologies and analytics to challenges in productivity, strategy, and sustainable development.


Ricardo Drummond (not verified) (Mon, 08/13/2018 - 14:24)

Mon, 08/13/2018 - 14:24

Commented by Ricardo Drummond on Mon, 08/13/2018 - 14:24

Muito interessante o artigo. Fiquei com uma dúvida, que provavelmente vem da minha completa ignorância sobre o assunto:

Se um processo possui uma variância intrínseca, sobre a qual não estamos atuando ou não podemos atuar, e se fizermos alguma otimização baseada em um modelo preditivo, mesmo adequado, não estamos sempre correndo o risco de, apesar de produzirmos efeitos positivos em geral, trazermos prejuízos à uma ordem de produção específica?

Bruno Pimentel (not verified) (Fri, 08/17/2018 - 02:37)

Fri, 08/17/2018 - 02:37

In reply to by Ricardo Drummond (not verified)

Commented by Bruno Pimentel on Fri, 08/17/2018 - 02:37

Olá, Ricardo.

Obrigado pela contribuição.

De fato, um modelo de predição será tão bom quanto os dados que foram utilizados para construí-lo. Se esses dados refletem, com boa representatividade, o comportamento histórico de um determinado processo (inclusive em termos de sua variância), espera-se que um bom modelo de predição reproduza adequadamente aquele comportamento. Isso, por si só, não garante ganhos de eficiência, mas possibilita que diferentes análises possam ser feitas, e diferentes cenários operacionais possam ser considerados na busca por maior eficiência energética. A tarefa de atuar na redução da variância do processo, ou seja, conferir-lhe maior previsibilidade e estabilidade – o que já era um dos principais desafios dos times responsáveis pelo seu gerenciamento – ganharia uma ferramenta valiosa: a análise preditiva. Daí, com processos mais bem regulados, os próprios modelos de predição poderiam ser atualizados para um novo padrão de operação, renovando todo o ciclo de melhoria.


Roginer Vaz Ramos (not verified) (Thu, 09/20/2018 - 16:56)

Thu, 09/20/2018 - 16:56

Commented by Roginer Vaz Ramos on Thu, 09/20/2018 - 16:56

Ótimo artigo Bruno.

Realmente modelos que descrevem o consume de energia elétrica baseados em variáveis de produção e de context são extremamente úteis nos dias atuais, principalmente para planejamento estratégico e de custos.
Com certeza poder ter um sistema capaz de capturer e gravas estas informações e que, através de inteligência própria, possa retroalimentar os modelos constantemente, sera um diferencial no planejamento de longo prazo e, por consequencia, redução de riscos associados ao processo.



Bruno Pimentel (not verified) (Wed, 11/28/2018 - 20:09)

Wed, 11/28/2018 - 20:09

Commented by Bruno Pimentel on Wed, 11/28/2018 - 20:09

Olá, Roginer!

Obrigado pelos comentários. Estamos trabalhando bastante para tornar o Viridis cada vez mais poderoso nas análises de eficiência e nas capacidades de análise e de predição. Tem sido interessante perceber que, na nossa experiência, tão ou mais importante que desenvolver bons modelos, é cuidar de uma boa governança dos dados que os alimentam. Contamos com vocês para avançarmos juntos nessa frente e colher resultados cada vez melhores.


Add new comment