Application of artificial intelligence principles in mechanical engineering

The article deals with methods of Artificial Intelligence and their utilisation in technical diagnostics. Special meaning will be given on methods such as Deep learning. The deep learning method seems to be a very good candidate for defect detection and pattern recognition. The method was applied for technical diagnostic in automotive factory and the problem will be described in the paper.


Introduction
The primary Innovation is today one of the key benchmarks of successful companies. Conventional approaches and methods applied in the production environment are gradually becoming non-sufficient due to the increasing competitive pressure. For this reason, it is necessary to apply innovative methods and approaches to address the entire spectrum of tasks in the production environment. At the same time, market demand for increased flexibility in the behavior of production companies towards the customer requires very close intercomnection of individual levels of company management, and the required increase in profitability for companies providing goods or services requires the most accurate knowledge of customer requirements. [1] The aforementioned conditions and requirements for companies have recently been addressed through the penetration of IT technologies and automation into the existing conventional technologies and practices of producing companies. At the end of the 20th century and in the first decade of the 21st century, we saw a significant increase in the use of abovementioned approaches in the production environment, which gradually eliminated the differences between the industry leaders, with these tools even the small companies gradually eliminated competitive advantage of big actors by the gradual partial introduction of these technologies of by gradual substitution of conventional methods with more progressive ones. [2,3] The natural development is the improvement of established technologies and methods. In addition to implementing optimizations at different levels, improvements can be made by introducing innovations into individual tasks or complex task groups. An innovative idea linking the conventional automation and IT technology is the introduction of a higher degree of automation. [4] With a higher degree of automation, we understand automation that is not only applied to automate the routine work, but which has the decision-making ability at a defined level. [5] In this area, the highest degree of automation could be achieved by applying artificial intelligence to the production environment. In our context, we can understand the Artificial Intelligence application as follows: Applied Artificial Intelligence in a production environment is a program (or part of it) that can solve a task without introducing rules for solution it into the program. [6,7] When applying artificial intelligence in its entirety, we would achieve self-acting and selfgoverning units in the production environment. When achieving an absolute degree of automation through devices with a high degree of artificial intelligence, we could achieve a self-organized production company that would be in full control of the inputs necessary for production, production itself, as well as quality control and expedition. [8,9] In the real world, achieving this goal is just utopian at the moment. [4] Our task is to ensure innovation through partial application of artificial intelligence techniques and achievement of a degree that we can characterize as Advanced Intelligence.
Within the framework of cooperation with the industry, a research task was proposed to fully automate the process of quality control of produced tires by the manufacturer. At present, this task is performed by an operator who has an inspection stand consisting of a rotary mandrel, pneumatic drives, PLC controlling individual drives and lighting. The inspection stand (Fig. 1.) serves only as a device assisting the operator in handling the checked tire (securing it on the rotary thruster and rotating the tire in the selected direction). The entire evaluation process is in the full competence of the operator and is carried out solely on the basis of a quality assessment corresponding to the range of knowledge of the operator of the product. Our goal is to ensure complete automation of the control process. In the initial analysis of the task, we determined that for the elimination of an operator, it will be necessary to automate three different tasks: 1. handling of evaluated tire 2. automatic quality control process 3. automatic detection and removal of any residuals from the molding and vulcanization process of the tire Manipulation of the evaluated tire will be implemented by extending the inspection stand with a serial kinematic structure robot, supplemented by a corresponding effector optimized for tire manipulation. The robot will ensure that the tire is removed from the production line or from the in-service container, by placing it on a rotary mandrel, and after completing the quality control process, it will ensure that the tire is stored in the corresponding container.
2. An automated quality control process is described in detail the next part of our article 3. Automatic detection and removal of any residuals from the molding and vulcanization process of the tire will be accomplished by a single-purpose handling device with trimming capability. The co-ordination and synchronization of the tire and handling device will be coordinated on the basis of the analysis of the position, shape and size of unwanted residuals, this information will be obtained from the data obtained in the quality control process.

Classification method
An automatic quality control process will be created on the principle of similarity with the way this process is currently carried out by an operator. Our task is to perform an analysis of the control process after the assignment of a research task and to transform it in order to completely replace the presence of an operator in this process. Based on the analysis, it was determined that the operator of the equipment provides a visual inspection of the tire during its rotation and, based on the experience and knowledge of the operator, the tested tire is evaluated. [10,11] Our proposal for transforming this process consists of designing and assembling a camera system with appropriate illumination to get the image of the tested tire with required quality. Due to the fact that the occurrence and type of errors on the produced tires are different and at the same time it is necessary to consider the quality of the evaluation process in regard to deviation of the tire characteristics from the defined values. It was necessary to choose the method of data processing with the required performance and the necessary functions that would be able to replace the evaluation by humans. In our case, we decided to apply machine learning methods -specifically for the application of deep convolutional neural networks (DCNN) with a high probability of successful implementation due to their character and potential performance. [12] Machine learning -is a subfield of artificial intelligence that develops algorithms and techniques that enable the computer system (machine) to "learn". In this context, we understand the learning as ability to change the internal state of a system in a way that improves the ability to adapt to changes in the surrounding environment or allow the computer system after learning to extend the content of its knowledge base based on the findings obtained [13].
One approach to interpret the knowledge needed for machine learning is to acquire and subsequently analyze the images obtained through the camera. Classical forms of visual data detection are using gradient-based techniques such as gradient-oriented histogram (HoG), scale-invariant feature transform (SIFT), spatial pyramids and, where appropriate, representation of basic functions such as Gabor's filters. However, in recent years, we have more powerful tools for extracting and analyzing application-specific information by extending deep learning systems, and specifically by creating and implementing deep convolutional neural networks. [14] In our case, we plan to use a deep convolutional neural network to detect and classify the various errors encountered on the surface of the controlled tires. By applying this type of neural network, we assume that there will be a significant increase in the performance of the machine learning system, based on which results the quality control system will be built. [14]  • the convolutional layer -is connected with the next layer in a similar way to a traditional bipartite multilayer neural network with the key difference that the scales are shared between the connection sets. Each set of weights sharing links is a filter that is linked to the input data. Typically, there are several such filters trained in parallel on each layer. Convolution filters are moved through small local sections created on input image data in the image training process. Each filter acts as an element detector. The result of filter application and convolution across images will create a map of elements (Fig. 2.);

Fig. 2. Convolutional neural network with max-poolig
• activation function -Is used to discriminate between image classes by being stored at the output of a convolutional filter and performing a nonlinear transformation of the • max-pooling -is a sample-based discretization process (Fig. 3.). The objective is to down-sample an input representation, reducing its dimensionality and allowing for assumptions to be made about features contained in the sub-regions. A convolutional layer and max pooling layers are successfully created to create the DCNN architecture. Compared to shallow architectures, DCNN has several layers that can represent complex functions with higher efficiency and accuracy of generalization. [13] 3 Implementation In our solution, we plan to apply training methods that are slightly different from conventionally applied methods. The standard gradient descent method involves optimizing the error across the training set. Because this procedure can be computationally and costintensive for a large network, an approximation method called minibatch stochastic gradient descent is often used for DCNN training. [15] A significant difference lies in the fact that instead of calculating the error gradient in the entire training set, each iteration calculates the error gradient for a small portion of the samples. We denote b and n the minibatch size and the total number of training samples. For the number of minibatch gradients, total T = n / b iterations during training. Therefore, the w parameters are obtained by optimizing the approximate expected value of the error function f defined as: Where �1, … � is iteration index and � is i-th training sample. In every iteration weight will be adjusted by gradient descent rule: Where is learning rate While the standard gradient descent drops across all the samples in the training set to obtain a single update to value of w for each iteration, stochastic gradient descent uses only one training sample, and the minibatch stochastic gradient descent method uses each sample iteration b (i.e. minibatch size). The stochastic gradient descent method is computationally much cheaper than standard gradient descent. A minibatch gradient descent method may often be as rapid as a stochastic gradient descent if appropriate vectorization is used to calculate derivative terms. [15] Problems with non-convex object functions have sometimes shown a stochastic gradient value can escape from the local minimum that often forms a trap for a batch gradient. Therefore, stochastic gradient descent can be better deployed in applications such as DCNN training. [14] Our data for the automatic evaluation of the quality of the produced tires will be generated by sets of images that will be captured by a high-resolution camera system. The inspection stand will be extended by the aforementioned system of cameras. At the same time, the inspection stand will be extended by a system of additional local lighting to achieve the required image quality (Fig. 4.).
After the completion of construction and assembly modification to the inspection stand, it will be necessary to carry out the so-called 'before implementation phase' that allow us to gather the unambiguous definition of acquired images for the process of defining all potentially occurring mistakes arising from the production of tires. At the same time, it will be necessary at this stage to define the ranges of acceptable deviations from the ideal state of the product. All captured and defined examples of images will need to be broken down into classes. A prerequisite for successfully grouping examples into classes is to create classes according to the apparent similarity of its members (geometric, technological, spatial, ...).
After successful completion of the before implementation phase associated with creation of a training set of data, we will perform implementation tests to reveal a suitable variation of the DCNN model. The different test models will be different in the basic parameter combinations (number of element maps, size of applied filters, number of network layers, number of fully interconnected layers). After performing these tests, parameters will be selected to allow the highest accuracy of classification through DCNN.

Conclusion
We assume that the DCNN application in an automated quality control process by implementing an automated error detection system on inspected tires will solve the most complex set of tasks associated with the development of an automated inspection device excluding manual inspection. Our assumption is based on the fact that the inspection stand will be extended by proposed camera system, that will generate a huge amount of input data (represented by large sets of images), DCNN will be used to effectively extract and recognize image elements, and to automatically detect the presence of errors and deviations in the controlled product. We have explored the use of DCNN to skip complicated procedures for extracting features required in a classical learning approach; instead, we will use unprocessed images as the only input to the classification model, and then optimize the network using the minibatch gradient descent method.
The solution presented in this article is a concept based on the cooperation with the practice We predict the very high demands on part of the practice to given solution. In the next research we will therefore work out other methods of processing the acquired data through the methods of machine learning.
Application of a machine learning principles has the potential to create automatic detection systems that are sufficiently generic to allow us to address presently very difficult to detect failures and errors in evaluating different tasks in production environment.