This video uses a publicly available CNC machining dataset from Bosch Rexroth to show how a simple engineering feature, found while working with a large language model, separates bad machining runs from good ones using vibration data, without training a machine learning model. The analysis is built in ErgoTech's MIStudio, deployed on a Bosch Rexroth ctrlX X3, and is deterministic and explainable. The video also shows where the data falls short.
What the video shows
- The data. The machining center was instrumented with vibration sensors and many values were recorded while it ran. Each run is labelled good or bad, and the original goal was to determine part quality from vibration data. In the time domain the vibration data shows very little.
- The method. A Fourier transform moves the data into the frequency domain, where prominent frequencies appear as clear spikes. In MIStudio, one feature extractor component pulls the data from a database and outputs both the spectrum and analytical values, so good and bad runs can be compared run-to-run. Its JSON configuration was developed together with a large language model, and a single analysis approach works across the dataset.
- The feature. On machine 1, operation 5, a step drill running at 200 Hz, there is a very large peak at 200 Hz, the spindle speed. That run is labelled bad, and when it is removed there is no longer any significant peak at 200 Hz. Across almost every case checked, bad runs show a peak at the cutting tool frequency that is far more powerful than in normal runs (the chart uses a log scale). If this holds, a good or bad decision can be made from pure analytics within about the first four seconds of a run.
- Limits of the data. On machine 3, operation 10, a 250 Hz line and its harmonic appear, and many other operations run at 250 Hz, so some runs may have been made at the wrong speed. In another step drill operation at 250, the run with the most power at 250 is labelled good, a failure for the theory. Peaks at about 164 to 165 and near 300 suggest the tool was not always run at 250, and the single bad run has an extreme peak at what is probably its actual rotation speed. To verify the approach, the encoder speed is needed alongside the vibration data.
- Deployment. The application runs as a snap on a Bosch Rexroth ctrlX platform with an X3 processor, where vibration data and encoder speed could be collected and analysed in one place. Alongside the charts, the analysis calculates the hard numbers and run-to-run comparisons needed for production analytics.
Data and method
The data was published by Bosch Rexroth and is described in a paper by Mohamed-Ali Tnani and co-researchers. The video description notes that spindle speed, from a retrofit encoder or the CNC controller, and the expected machining parameters would quickly rule out "wrong spindle speed" errors, which appear to be frequent in the dataset. If several analysis configurations had been needed, MIStudio's LLM prompt tool could generate them: the LLM produces the rules to run across the time series rather than analysing the time series itself.
Chapters
- 0:00 The Bosch Rexroth CNC vibration dataset
- 0:57 From time domain to frequency domain
- 1:29 The MIStudio application and feature extractor
- 3:28 Deploying to a ctrlX X3
- 4:29 A spindle-frequency peak marks bad runs
- 6:07 The 250 Hz line and wrong spindle speeds
- 7:48 A counterexample and the need for encoder speed
- 10:10 LLM prompt tool and knowledge base
Frequently asked questions
Does this approach use a trained machine learning model?
No. A large language model helped develop the analysis configuration, but the deployed solution is pure analytics: a Fourier transform and a comparison of spectral peaks, with no trained model.
What feature separates bad runs from good ones?
The energy at the spindle rotation frequency of the cutting tool. In the runs examined, bad runs show a far larger peak at that frequency than good runs, which can be seen within about the first four seconds of a run.
Is the result proven?
Not yet. It holds for almost every case checked, but one operation has a good run with the highest energy at the nominal speed, probably because the tool was run at a different speed. The encoder speed is needed to confirm the approach.
What is MIStudio?
MIStudio is an industrial automation, SCADA/HMI, DataOps and application engineering platform that enables engineers and LLMs to build, inspect and maintain industrial applications using proven software components.
Uses a public dataset. Original paper: ScienceDirect. Data: boschresearch/CNC_Machining on GitHub.
Transcript
Show the transcript (from YouTube's captions, lightly corrected)
0:10 I recently came across an interesting set of data that's published by the factory of the future from Bosch Rexroth and is described in this paper by Mohamed-Ali Tnani and his co-researchers. In this case, the goal was to determine the quality of a CNC machine part based on vibration data. So, the machining center was instrumented with vibration sensors, and many, many values were recorded while the machining center was running to determine good and bad jobs.
0:57 As you might expect, what you end up with is this is typical style vibration data. Really the, the real challenge is that when you look at this in the time domain, you really don't see very much. And so the secret is to move from the time domain to the frequency domain, so perform a Fourier transform on the data, and then you will see clear spikes at points where there is a particular prominent frequency in the vibration data.
1:29 Now, I took this data and started to analyze it in MIStudio. MIStudio, if you, if you don't know from semiconductor, MIStudio is a very powerful drag and drop, low-code, no-code tool that lets you build applications by linking components together, much more than something like Node-RED or similar. It's actually a complete contextual AI platform where the, you're building, you're actually building a model of, of what's happening within the environment. In this case, we actually have a fairly simple application. What we have is this feature extractor, which is going to do all the work for us. This is going to pull the data, we've stored the data into the database. We've, we've imported the data into database. This is going to search the database for the appropriate data, and it's going to do the analysis we told it to do on that data.
2:19 I worked fairly closely with a large language model to develop the configuration for this. This is actually configured with a JSON script. And the final result seems quite interesting from the standpoint of the, a single, a single analysis approach seems to work for a lot of, a lot of this different. So, this block will perform the feature analysis. It will generate the output from this. It can work with any time series data. So, it'll also put out the sample data. In this case, we've got a spectrum coming out of this, the, the frequency side of the equation. But it also puts out analytical values, so we can compare one run to another. This is in semiconductors called run-to-run. Here, we're going to compare good runs and bad runs analytically as well as graphically.
3:11 It has excellent visualization capabilities. And visualization in this case is really not just about decorations. It's really about being able to see what's going on in the application and, and see what's going on in the data, and uncovering values that may otherwise be hidden in your data set. Once you build an application in MIStudio, you can decide where you're going to deploy it. You can deploy it to the cloud, you can deploy it to an edge device, you can deploy it to any kind of IoT system. Since this platform, since this data was delivered by Bosch Rexroth, I figured the most appropriate platform to deploy it to was a Bosch Rexroth platform, the ctrlX platform. And it's, this is an X3 processor from, from ctrlX. And so you see that we have our snap running down here that, that supports our MIStudio. And from that we can get views into the application.
4:05 So here's a quick description of what we're expecting here. We've instrumented our machining center with sensors. As anything starts to move, you could reasonably expect it to create some vibrations that are detected by the sensors, and that's what we're going to do the analysis on.
4:29 So we look at this. This is machine one, operation five, which is a step drill running at 200 Hz. And we see here a huge peak at 200 Hz, which is the, the RPM of the, the, the run. So the, the, the spindle is running at, at 200 RPM, and you'd kind of expect to see a spike there. The interesting thing, though, is that this, the, the data from Bosch Rexroth was labeled as good and bad, so we know which runs are good and which runs are bad. And it turns out that's a bad run. And if you remove the bad run from the image, you suddenly see that there is no longer any significant peak at 200 Hz.
5:09 We see across pretty much this whole data set that at the RPM, at the frequency of the cutting tool, we only see huge peaks. And this is a log scale, so this is a huge, this is huge, a hugely more powerful peak than, than the, than a normal run. And this, you know, I, I, I don't claim to have done all the research on this, but this is, it's an interesting thing to, to follow up on. Because if this holds across the whole data set, and it seems to hold across just about every value I've looked at, rather than trying to use a black box AI/ML model needs training, now you have a very fast pure analytics system where you can determine whether a lot is good or bad, and you can determine it very quickly. Within the first four seconds or so of running this lot, you can see whether the, the, the lot is going to be good or bad.
6:07 There are some interesting artifacts on that. I want to start this processing on the machine three, operation 10 lot, because as much as I, I like deploying to this platform, the X3 is not a speed demon, and I want to show you that lot, but it's 40,000 samples and it takes a little bit to run. But we start to see some artifacts here, and one of the most interesting artifacts is that there's a 250 Hz line here. It turns out that a great many other operations within this environment are running at 250 Hz. So then you start to wonder, when you see a frequency band at 250, was there the possibility, and, and we see the, the harmonic of that, so it's, it's not just a, it's a, it's a real band. Was there the possibility that this, that some of these runs were actually run not at the correct speed of 200 RPM, but actually were run at 250 RPM?
7:01 And so that points out a shortcoming of the data. The vibration data is not necessarily sufficient data set to determine the answer this question. What we really need to know is the, and the, the speed of the, the drive. Was this really running at 200 Hz, or was this really running at 250 Hz? That becomes very important in the, the next set that I'll show you, because this set, in fact, although it looks as though it was a successful set, it looks as though this was a, this is again a step drill we're seeing in just a second. This is, this is in fact a step drill, and it's running at 250 RPM.
7:48 What we see here, what we see here is that the run that shows up with the most power at 250 RPM is actually not a, not a bad run. This is a run that was actually good. So, we can consider this run a failure for our theory, which is that the highest, the, the, the highest energy run, the high energy runs at the machining speed are generally bad runs. However, when you look at this data more closely, you see that there's a peak at 165, 164, and again a harmonic at 300 something, which again suggests that in fact the RPM of this tool was not always 250. That either for part of the run or for entire runs, this, this step drill was actually run at a, at a different speed. It was not consistently run at 250. And if we take out all the runs, if we take out, this is the, this is a single bad run. If we take out, we can take a look at the single bad run, we see that this has an extreme peak at what we can reasonably speculate was the actual rotation speed of this, this operation.
9:00 So, to verify this and to complete this research, and to know whether this is a viable way to find out in a matter of a few seconds whether the, whether the run is good or bad, we need another piece of data. We need to pull the encoding speed, the encoder speed, into this. One of the nice things about the ctrlX platform is that with MIStudio and ctrlX you could in fact do all this in one place. You, we could collect all that vibration data. We could collect the encoder, the encoder speed, and be running all that within this, this single. Normally you wouldn't have 40,000 runs for a single run. You have much less data. And so, this whole, this, this platform becomes a, a great target for this. You can collect the data, you can analyze the data, and you can, you can decide whether the, the, the run is good or bad in very efficient way.
9:47 And to do that, what you need is not the, the, the graphs are great. They, they show humans great things, but what you need is you need some hard numbers. And of course, at the same time as the graphs are calculated, we also calculate the hard numbers and the comparison with run-to-run. And so, these are the numbers that can be used to create concrete analytics, robust analytics for this, this solution.
10:10 As I say, this was entirely created in MIStudio. There's a definite low-code operation going on here, and it was, it turns out that really we just need one, one style, style of analysis to perform all this analysis. And so, if you look at the flow here, this is the operation we're choosing. This, it, it, this, the analysis is performed on whatever was selected in the combo box, and the, the charts and the table analysis that are output. Had it not turned out that way, had it turned out that in fact we needed a bunch of different request JSONs, we have some more tools to apply to this. Within MIStudio, we do have an LLM prompt tool, and either human-generated prompts or machine-generated prompts can be used to populate this tool condition. They can be used to say what should the configuration of this analysis be.
11:03 That's a much more powerful solution than asking an AI, a large language model, to, to think across time series data. We're not saying, thing, we're not, we're not asking it to analyze time series data. We're asking it to produce a set of rules that it would like to see run across that time series data. And then when that data comes back in the form of solid, manageable data, it can then make decisions based on that information. Adding to that, again, we also have a knowledge base, and what a knowledge base does, it'll RAG-encode documents of all kinds. So, if necessary to, to enhance the time series analysis, you can add manuals, maintenance records, any kind of information. It'll encode images, so you can have documents with images in them that'll, that'll tell you what happened with that tool, what went on with that tool. You, you can instruct, you can construct work orders. It's a very powerful tool beyond just time series analysis.
12:03 And so, that's how MIStudio, and MIStudio lets you do these kind of time series analysis very quickly. It lets you get real values out of it. It lets you visualize those values, and it lets you build applications that'll, that'll, that have the analytics you need.
