Artificial intelligence in CAM-systems for solving tasks of automation of processes of creating control programs

Having studied habr well, I met many interesting solutions built on neural networks.
I also found rare topics on CAD topics, namely CAD / CAM systems, which suggested: "why not write about your developments and thoughts here?" After all, there is a decent number of specialists, programmers and just sensible people. And in scientific and professional circles at my local level, it’s almost impossible to discuss the subtleties on this topic. At least the search for developers of such software for the purpose of communication with me was unsuccessful and they still do not stop.


For several years now, I have been studying artificial intelligence systems (AI), and the main work activity tightly connects me with CAD / CAM systems and CNC equipment (numerical control).

And once thought caught up by surprise? Why not combine one with the other? Those. why not integrate AI into CAD? About a year it took to collect bit by bit information on the achievements of the bourgeoisie in this area. And it turned out to be a very funny picture - they use AI, but for very limited tasks and goals. For the most part, the tasks of classifying and recognizing objects (for example, typical elements in a solid-state model of a part) are solved. But what about the software area in which control programs are written? After all, this process is saturated with a lot of handmade.

This is where the in-depth study of the main representatives of CAD / CAM systems on the topic of maximum simplification and automation of program writing processes began. There is to this day replenished, experience in various packages. There was also a lot of useful communication at exhibitions, conferences, even directly on the territory of foreign companies. What did all this lead to? And this led to one thing - I decided to start developing my algorithm. It is clear that the level of my software development will never reach the code level of a serious company with a great staff of programmers, but no one bothered me with starting theoretical research. And thinking with your head a lot is even useful!

The idea of ​​its algorithm, from simple thoughts - slowly began to grow into something tangible and quite tangible real. It began with a small one - with the solution of the question of automating the description of the machining of typical elements. For a brief reference: typical elements are holes, pockets and grooves in the models and the details themselves (shown in the figure)


An uncomplicated name for the future algorithm was invented: “ i-feature ”. I will say right away that this is not a startup, nor a commercial project. It is simply a matter of soul and scientific interest. Here is the logo of the project that I made:


Next, the first tests of the algorithm were carried out (though so far only theoretical). But more on that later. What is the essence of my development? I will show by the example of processing a conventional hole, which is obtained by elementary drilling.


A hole, like any typical element, has its own parameters. Actually that they:

- of L holes - hole depth;
- D resp - its diameter;
- M det - the processed material;

Also there is still a tool - a drill, which also has the following parameters:

- L drill - the length of the cutting part (i.e. how deep it can be drilled);
- D drill - drill diameter;
- M det - the processed material;

Everything seems to be logical. And what can be optimized here, you say? And here the fun begins! Consider an example: we are machining a part from titanium, and we need to drill a hole with a diameter of 8 mm to a depth of 45 mm. Anyone who has come across such a living knows that it is difficult to drill and it is necessary to split the drilling depth into parts. Moreover, either with an increment, or with a rigid value of the step of the drill passing a short distance in the hole. From here one more parameter arises, which relates already to the machining strategy:

- N passes - the number of “pokes” with a drill, necessary to achieve the required depth.

“Pushes” are necessary for two things: removal of chips from the hole and additional cooling of the drill. Everything is enough to ensure that the tool simply does not break, and also does not wear out faster.

Summarizing the description of the processing conditions - it will be absolutely correct to use two of its important parameters - cutting and feed speeds.

So! In total, we have 9 parameters that can describe the machining of an elementary hole. And what to do with them? How to get automation in the future?

Just here the developed i-feature algorithm comes into operation . Its working scheme is shown in the figure:


Everything is extremely simple: as the parameters used in the linear structure - the diameter of the hole and its depth, which correlates with the diameter of the drill and the length of its cutting part. And as parameters for the intellectual structure, drill materials, parts and hole depth are used in conjunction with the processing modes and the number of passes.

Linear parameters are used without any problems in any CAM to automatically create the necessary cutting tool (or correctly select it from an available library). There is nothing new to think of.

But what about the intellectual structure and its parameters? Imagine that there are a lot of similar (exactly similar, but not similar) holes in the part, and everything needs to be processed based on the conditions of the material of the drill or part. In this case, experienced engineers will say: “Pre-created templates will come to our aid, which are and have long been implemented in all modern CAD systems!” After all, everything is simple with templates - you set all the parameters in advance and copy them as necessary. From the side, the templates seem like a great solution, but there is one thing!

What to do if the depth of the hole or the material being processed changes dramatically? Re-create the template? Or describe everything with pens in the absence of a prepared template?

So it’s just such tedious manual procedures for creating hand processing or creating clouds of similar patterns, and catalyzed in me the birth of the idea of ​​automating such processes.

And in order not to limit himself - it was decided to make it not only fully automatic, but also reasonable, intelligent! So that the system itself can have an idea of ​​HOW it is necessary to process the element slipped by the user into the details!

In the process of developing the idea, different methods, algorithms, and existing solutions were sorted out in the head, but the choice finally fell on the use of neural networks. Specifically, to solve this problem - to a multilayer perceptron with an algorithm for the back propagation of error and teacher training. After all, we have the obvious task of forecasting, and this is just the hobby of using this type of network.

The network for processing our hole was as follows:


Number of inputs - 3. Number of outputs - 3. The number of hidden layers was chosen based on the formula 2n-1 , where n is the number of inputs.

For the training of the network, training samples were prepared in which examples of processing various materials with different depths and cutting modes are presented. While the network was created, trained and modeled in Matlab`e 7 (thanks to them for good neuro-solutions) and showed excellent results in terms of the minimum error and forecasting results.

Now in theoretical form, an algorithm for trial integration of " i-feature " in Unigraphics NX CAD is developed . There, this development will work in tandem with a good module for recognizing typical elements in a part (it seems to be called FBM).

There are also built networks for other types of typical elements (grooves and pockets). All parameters for linear and intellectual structures are similarly painted on them.

Work is in full swing! (depending on the amount of my free time and mood)

There is no desire to stop there.

The main goal of the work is, in the near future, to completely replace the concept of a template in CAM-systems and to go for total automation and simplify the work of users in this kind of systems.

In the following posts I will begin to describe the processes of integration into the existing CAM. As well as new research in this area.

I will be glad to comments and comments.

Thanks for attention!

Also popular now: