📜 ⬆️ ⬇️

Artificial intelligence in CAM-systems for solving problems of automating the creation of control programs

Having well studied Habr - 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 amount of specialists, programmers and just smart people. And in scientific and professional circles at my local level, it is almost impossible to discuss the subtleties on this subject. At least, the search for developers of such software for the purpose of communication I have not been successful and they still do not stop.

image

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

And once caught a thought by surprise? Why not combine one with the other? Those. why not integrate AI into CAD? It took about a year to collect bit by bit information about the achievements of the bourgeois 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 model of a part) are solved. But what about the area of ​​software in which control programs are written? After all, this process is saturated with plenty of manual work.
')
It was here that an in-depth study of the main representatives of CAD / CAM systems on the subject of maximum simplification and automation of the process of writing programs began. There is still replenishable 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 own algorithm. It is clear that the level of my software development will never reach the level of the code of a serious company with a great programmer staff, but no one prevented me from starting with theoretical studies. And to think a lot with your head is even useful!

The idea of ​​its algorithm, from simple thoughts, slowly began to grow into something tangible and quite tangibly real. It was started from the small - from 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 parts themselves (shown in the figure).

image

The simple name of the future algorithm was invented: “ i-feature ”. I will say right away - this is not a start-up, and not a commercial project. It is simply a matter of soul and scientific interest. Here is my project logo:

image

Then the first tests of the algorithm were conducted (although only theoretical). But more about that later. What is the essence of my development? I will show the example of the processing of conventional holes, which are obtained by elementary drilling.

image

The hole, like any typical element, has its own parameters. Actually here they are:

- L resp - hole depth;
- D resp - its diameter;
- M children - processed material;

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

- L drills - cutting length (i.e. how deeply they can be drilled);
- D drill - drill diameter;
- M children - processed material;

It seems to be all logical. And what can be optimized here, you say? This is where the fun begins! Consider an example: we process a part from titanium, and we need to drill a hole with a diameter of 8 mm to a depth of 45 mm. Who faced live with such - knows that it is drilled hard and it is necessary to split the drilling depth into parts. And either with an increment or with a hard step size for the drill to drill a short distance in the hole. This is where another parameter arises, which already relates to the processing strategy:

- N passes - the number of "butts" drill, necessary to achieve the desired depth.

"Sticks" are necessary for two things: removal of chips from the hole and additional cooling of the drill. Everything is enough so that the tool simply does not break, and also does not wear out faster.

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

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

It is here that the developed algorithm “ i-feature ” comes into play . His scheme of work is shown in the picture:

image

Everything is very simple: as parameters used in a linear structure, the diameter of the hole and its depth correlate with the diameter of the drill and the length of its cutting part. And as parameters for the intellectual structure, materials of the drill, details and depth of the hole are used together with the processing modes and the number of passes.

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

But what about the intellectual structure and its parameters? Imagine that there are a lot of similar (similar, but not similar) holes in a part, and everything must be processed on the basis of the material conditions of the drill or part. In this case, experienced engineers will say: “We will come to the rescue by pre-created templates that have been implemented in all modern CAD systems for a long time!” After all, everything is simple with templates - I set all the parameters in advance and copy them as needed. From the outside, templates seem to be a great solution, but there is one thing but!

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

So it was just such a tedious manual procedure of creating a treatment by hand or creating a cloud of similar templates, and catalyzed in me the idea of ​​automating such processes.

And in order not to limit oneself - it was decided to make it not just fully automatic, but also reasonable, intellectual! So that the system itself can have an idea of ​​how HOW it is necessary to process the element slipped by the user in the part!

In the process of developing ideas, various methods, algorithms, and existing solutions got into the head, but the choice finally fell on the use of neural networks. Specifically, to the solution of this problem - to a multilayer perceptron with an algorithm for back propagation of error and teacher training. After all, we have an obvious problem of forecasting, and this is precisely the strong point of using this type of network.

The network for processing our hole was:

image

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

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

Now, in theory, an " i-feature " test integration algorithm has been developed in the Unigraphics NX CAD system. There, this development will work in tandem with a good module for the recognition of typical elements in the part (like FBMʻom called).

There are also built nets for other types of typical elements (grooves and pockets). All parameters for linear and intellectual structures are similarly written according to them.

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

There is no desire to stop at what has been achieved.

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

In the following posts I will begin to describe the integration processes in the existing CAM. And also about new research in this area.

I will be glad to comments and comments.

Thanks for attention!

Source: https://habr.com/ru/post/135795/


All Articles