For this use case we will have a two part blog post. The goal will be to showcase how we can use the machine learning module from Critical Manufacturing to predict material defects.
Overview#
The full use case will be to train a machine learning module with data from a machine and correlate it with an MES material defect that happens in an inspection machine.
We want to be able to predict defects and notify the employees that something was wrong.
For this second part we will focus on:
- Creating and Training a Machine Learning model
- Simulator tool
- Making Predictions
Creating and Training a Machine Learning Model#
We have already a prepared dataset from the first blog post.
In the MES UI we can now simply create a machine learning model, feed it the dataset and specify the type of model we want.
In our use case we want the model to classify if a certain set of machine will generate a defect. So we are using classification and our classifier is the feature classification which will be marked as label.
We can then transform/normalize our data and train our model, specifying what percentages of our dataset will be used to train, validate and test. We can also specify what should our model optimize for, each one will impact how the model behaves.
Now our model is ready to predict!
Simulator Tool#
In order to create this scenario we created a simulator tool based on actual machine data. This tool will be an IPC-CFX simulator and will mimic all the events a Reflow Oven does in an SMT shopfloor. This tool will also prepare the MES scenario and will be able to also record defects.
In detail what will happen is that we will have a live instance of the MES system, a live instance of a Connect IoT Automation Manager and then the simulator. The simulator will call the MES API and also interface with the Automation Manager as if it was an IPC-CFX machine. In order to perform this we leverage the IoT Test Orchestrator which is a testing tool provided by Critical Manufacturing (more in-depth explanation here).
For this scenario we know that there is a defect type Solder Balling
that happens if the temperature of the PreHeat zones of the oven is too high. All simulator will then simulate an SMT line and every X amount of times it will simulate that a panel has been exposed to high temperatures in the PreHeat. Then when it reaches the optical inspection AOI
it will record a defect.
Making Predictions#
Let’s now change our workflow so as to use the ML Prediction
task to predict if we will have defects.
We send our post telemetry event and then call the ML Prediction task. If the prediction is true, we will create a notification.
We can later check the material to see if it did create a material defect.
So we can actually validate that our model prediction was correct.
Final Thoughts#
This is a very simple scenario which is very delimited. We area only looking at temperatures and not to a whole host of other parameters. In a real life scenario we can use the real events of a shopfloor to either train our model or run it in unsupervised mode to perform predictions. In this example we have passive control, by just creating a notification, but we can perform actions like putting the material on hold.
Hopefully this two part blog post gives you the tools so you can try by yourself, adjusting it to your real life use case.