Machine Learning in Ignition

This article is co-authored by Matt McCallum and Stu Matthews.

What Is Machine Learning?

Machine Learning is a method in computer science by which a large amount of historical input and output data is used to form a model to predict future output. Machine learning has been around for a long time, but in recent years the explosion in the amount of data available to feed into even better algorithms which are run on faster and faster processors has made machine learning very practical and useful.

Where Machine Learning is Being Used in the World Today

A classic example of machine learning in the world today are with sites like Amazon providing product recommendations based on your purchase history and other variables. A more exciting example that looks like it will revolutionize transportation is self-driving cars. Google has used machine learning to reduce cooling costs in its data centers by 40%.

According to Anna-Katrina Shedletsky, CEO of Instrumental, Elementum uses machine learning algortithms to anticipate supply chain problems due to a number of different factors including regular shipping delays, bad weather, and even political unrest.

How can Machine Learning and Ignition Improve Your Operation?

Two big problems facing the integration of machine learning in industrial applications are the lack of data needed to train an accurate model for any given operation and the difficulty of implementing new ways to utilize the data learned by the machine. Ignition provides the perfect environment for machine learning in industrial applications because it addresses these problems directly.

First, Ignition’s SQL Bridge and Tag Historian modules provide access to all the data needed to train an accurate prediction model that is custom fit to your facility. Second, Ignition allows you to use Python to easily script new ways to utilize the data. If your team members come up with an innovative way to respond to the data provided by the prediction model, they can program it directly inside of Ignition, in one of the easiest scripting languages to use. There is no need for integrating complicated third-party software or hardware to utilize Machine Learning to benefit your Ignition-equipped facility.

Waste Water Treatment Example

Imagine you are running a waste water treatment facility. It might be of great value to you to be able to predict when a certain tank will approach capacity, or a certain pH level is reached. When either of those conditions occur, you would like to have the appropriate staffing on hand. Until now you have been using your intuition and experience to predict future tank capacity and pH. But, what if, using machine learning techniques, you could achieve a 50% improvement in your predictions? This would enable you to better staff your facility at appropriate levels, saving you from paying overtime and in general making your facility more efficient. Sounds great, right? Let’s dive a little deeper so you can get an idea of how this would work.

(Disclaimer: I am not a sanitation engineer, so my example is necessarily contrived.)

To provide adequate lead time to schedule staffing, let’s try to predict a tank level and pH four days in the future. To do this, we have to decide what our inputs are around the facility. In this case it would probably be wise to bring in some external data as well, such as the weather forecast, if there are any large events in our service area that would affect the inflow to our facility, and the day of the week. Using historical data from historical tags or from your database, you train your model using a machine learning library. You could probably use multiple linear regression in this case. In essence, the algorithm will iteratively change your coefficients in a formula such as the following until it achieves an ideal model:

Tank Level Four Days From Now = A x (Tank Level Today) + B x (Is a Weekend) + C x (Today’s Staffing Level) + D x (How Many Events at Local Stadium in Next Three Days) + … any number of variables

In building your model you typically would use 80 – 90% of your available data, setting aside 10-20% for testing your model. This is to avoid over-fitting your model to the past data which may result in a model which does not reflect real life.

Building the model is data- and CPU-intensive, but once you have your model you can instantly plug new inputs into it to receive your predictions. As has been demonstrated in chess, with human-AI teams outperforming both AI-only and human-only opponents, your intuition will still be valuable in interpreting the results. Machine learning is a tool, not the boss.

Optimizing Your Overall Equipment Effectiveness

The biggest impact machine learning can have on any industrial facility’s bottom line is its ability to automate the process of improving its Overall Equipment Effectiveness (OEE). OEE is the industry standard in measuring productivity. By using a combination of machine learning techniques and AI it is possible not only to identify losses in your existing OEE, but to accurately predict the effects of potential improvements and automatically provide solutions to optimize your OEE.

Using machine learning methods, your Ignition Gateway could build a prediction model to accurately determine future tag values for any given piece of equipment on site. That model can then be used in conjunction with a genetic algorithm to randomly generate potential improvements fit for use, and accurately simulate the effects of these solutions on your OEE.


Chemical A is added to Mixer A, Mixer A agitates for 3 minutes, checks pH, and if the pH is above MixerA/SP_ChemALvl, it repeats the process. It takes roughly 2 minutes to stop the mixer, check pH, and restart the mixer.

The model learns that of about 250 checks per day, 84 are coming back over MixerA/SP_ChemALvl and being mixed again. That results in about 4.2 hours every day of the same batch being mixed again and roughly 166 successfully processed batches in a 12.5 hour time span.

It then uses the prediction model to simulate what would happen if it altered some of the inputs. The genetic algorithm randomly generates solutions such as changing the position of the solenoid valve controlling the flow of Chemical A, altering the value of MixerA/SP_ChemALvl, changing the agitation speed of the mixer or altering the amount of time spent agitating before testing.

It then checks each potential solutions fitness, and determines that by increasing the solenoid valves position by 5% and running for additional 6 seconds will reduce the number of batches that need remixed from 84 to 24. This will reduce the amount of time spent on remixing batches by 3.26 hours, and result in 226 successfully processed batches in a 12.9 hour timespan. The result is a 36% increase in productivity for an extra 24 minutes of production time.

Your projected OEE with the changes is calculated and the suggested improvements and their effects are reported to you, allowing you to approve or deny the changes. This is just one single process. Your entire Ignition-powered facility, utilizing Machine Learning techniques, can be analyzed and improved in hours or days using methods that would take a team of human experts months or years to complete.

What an Ignition Machine Learning Module Would Look Like

The first version of a machine learning module would simply expose machine learning Java libraries such as Deeplearning4j  and Java-ML to the scripting environment. It would be up to the project developer to understand machine learning concepts and implement them.

Further versions of a machine learning module could include GUI elements to guide the project developer in choosing the best algorithms and input data for their application, and to provide feedback on how reliable the predictions are. The user would be able to easily bind a property to a trained machine learning model.

The next version of a machine learning module would incorporate a genetic algorithm and a GUI to configure process groups to automatically suggest optimizations to processes based off of projections provided by the deep learning model.

What are some ways you would like to use machine learning in your environment? What is the best business case for you in using machine learning? Please leave a comment below or contact us here!

One thought on “Machine Learning in Ignition

  1. Nice intro into a large topic. People think MES is hard for some to comprehend and implement. Machine Learning seems even harder and/or more “niche”. If a facility barely understands their day-to-day inputs/outputs from even an MES perspective, I don’t see them “graduating” to predictive OEE improvements or predictive maintenance via machine learning anytime this decade. But at least they can know it exists and contact folks who do know how to do this valuable investigation.

Leave a Reply

Your email address will not be published. Required fields are marked *