USE OF SOFT COMPUTING TECHNIQUE FOR MODELLING AND PREDICTION OF CNC GRINDING PROCESS

Original scientific paper Due to the complexity of grinding process of multilayer ceramics, and the need for a specific product quality, the choice of optimal technological parameters is a challenging task for the manufacturers. The main aim of investigation is to secure the demanded final product quality (plane parallelism) in the function of input parameters (machine, machine operator, foil and production line). "Soft computing techniques" are becoming more interesting to the researchers for the modelling of processing parameters of complex technological processes. In this paper, a soft computing technique, known as the Artificial Neural Networks (ANN), is used for the modelling and prediction of parameters of technological process of CNC grinding of multilayer ceramics. The results show that the ANN with the back-propagation algorithm justifies the application also to this problem. By designing different architectures of ANN (learning rules, transfer functions, number and structure of hidden layers and other) on the set of data from the production - technological process, the best result of RMS error (10,76 %) in the process of learning and 12,07 % in the process of validation was achieved. The achieved results confirm the acceptability and the application of this investigation in the technological and operational preparation of production.


Introduction
The production depends on the market demands, optimal technology and technological process.The main objectives of the modern technological process are: product quality assurance (QA) in accordance with the market demands, reduction of material and energy consumption, as well as the use of modern methods of production.The set goals should be achieved with the minimal production time, within the required delivery dates and the minimal production costs.The realization of these objectives (with the defined criteria) can be ensured with the adequate preparation of production.In order to make the production preparation more efficient and effective, various computing techniques are being used today next to the more conventional approaches.The approaches based on the computer use in different segments of engineering and other fields, are called soft computing techniques.The basic idea of soft computing is the use and mimic of the cognitive model of the human mind.Unlike hard computing, soft computing is tolerant of imprecision, uncertainty, partial truth, and approximation.Soft computing includes the following approaches: fuzzy logic, evolutionary computationbased on the origin of species (e.g.Genetic Algorithm, Swarm Intelligence, Ant Colony Optimizations), neural networks, machine learning, etc.By using the systems based on the techniques of soft computing and due to the practical experience in the production, individual knowledge was gathered in order to make it accessible to the general public.Certain authors focus their investigation on the way how technological knowledge is gathered, presented and applied in the intelligent production systems.The gathered knowledge is used for the Computer Aided Process Planning (CAPP) system for the classification of workpieces, for choosing the type of machining, machines and processing parameters, for connecting the characteristics of CAD/CAPP/CAM, in order to make the technological process of metal cutting more time effective [1÷4], as well as other processing technologies, e.g.grinding [5] and forging [6].The problem of optimization of technological preparation is significant in the manufacturing companies.One of the soft computing techniques in the process of optimization is the use of genetic algorithms (GA).Genetic algorithms are described and used by various authors in the papers [7÷11].By using the genetic algorithms and hybrid genetic algorithms, the authors [7], [8] and [9] implement the optimization of processing parameters for turning with one or more spindles.By analysing the process, they consider a significant number of constraints such as: strength of the machine, the cutting force, the temperature in the cutting zone, etc. and with the goal of cost-efficient processing and shortening of time.The set goals are achieved by improving the conditions of machining by applying neural networks (NN) and genetic programming [10,11], as well as the approaches that use other methods [12÷14].In the optimization of machining parameters, NN are often combined with GA.Therefore, for the optimization of turning process and for the analysis of experimental data, statistical analysis is used, and for the modelling of process, NN are used with the subsequent optimization of GA [15].When modelling the forces of milling, the authors use four materials with three variables (cutting depth, feed per tooth and cutting speed) in the experimental part of the paper.The response surface methodology (RSM) and artificial intelligence approach (NN and GA) [16] are used in the process of predicting the forces of milling in the function of material and analysed parameters.For the multicriteria optimization of cutting parameters, the authors [17] use the optimization mathematical model that processes the machining parameters (spindle speed, feed rate, depth of cut and path spacing) as the input parameters, and machining time, use of energy and surface roughness as the output parameters.A prediction model of cutting parameters was made using the NN (Back-Propagation algorithm).This prediction NN model was compared with the mathematical model, and was accepted for use based on the acquired level of error.The NN are used for assessing the roughness of machined surfaces [18], i.e. simulation and visual control of chip size [19], as well as for the modelling and simulation of steel surface roughness [20].The results of NN application are compared by the authors [19,20] with the results of analytical models.Next to the single methods, the multi-method approaches of soft computing are also used, e.g. in papers [21,22].In [21], the modelling of temperature of cutting tools is investigated, and the process of modelling is complex (the relationship between the variables is nonlinear).In this paper, five techniques of soft computing are used (Genetic Algorithm, Particle Swarm Optimisation, Cuckoo Search, Artificial Neural Networks and Multigene Symbolic Regression Genetic Programming) for the modelling of mathematical model for two different cutting tools.In the paper [22], the potential of soft computing techniques for tool wear and surface roughness prediction in hard turning operations under high pressure cooling conditions using coated carbide tools was investigated.There are two investigation techniques of soft computing: Artificial Neural Network (ANN) and Adaptive Neuro-Fuzzy Inference System (ANFIS).In the field of grinding, next to the soft computing techniques, the investigators also used different techniques like: Adaptive Neuro -Fuzzy Inference System [23] and Self -organizing map Neural Network with unsupervised learning, the feed forward Neural Network with supervised learning [24] and ANOVA analysis [25].
Therefore, in all described papers, the conclusions generally confirm the justification of application of soft computing techniques for solving the investigated technological problems.In this paper, the soft computing technique known as Artificial Neural Networks (ANN) was used for modelling and prediction of the output parameters of technological process of CNC grinding of multilayer ceramic.

Description of technological process and goal of investigation
The technological process of grinding of workpieces made of multilayer ceramics is briefly described in this section.The demand for such technologically designed workpieces is on the rise because of the ability to generate a wide variety of electrical functions.The multilayer ceramic process is essentially a parallel process, in which each layer is produced separately in the form of a sheet or foil of certain thickness (depending on the type of product).The sheets or foils are stacked one on top of the other, depending on the complexity and the required thickness of the final product.Generally, each sheet (layer) contains a unique set of printed electrical electrodes assembled according to the requirements of product.The assembled set is sintered and then cut with wire.After heat treatment, the workpiece is sent to the technological operation of grinding.Grinding is carried out on the CNC grinding machines.CNC Grinding Machine WAC175 SCALAR (company: Wendt), Fig. 1, has 6 axes of motion (for the grinding process) and a 4axis robot (for the manipulation of workpieces).The control system of the grinding machine is made by Bosch Rexroth, while the robot is manufactured by Adept.The user interface for the control of grinding machine is developed by Wendt, and it includes the following: Setup (used for registration of tools and tasks, status of grinding, and for monitoring of the grinding process); Data management (a browser similar to "MS Windows Explorer"); Programming (manipulation of programs and settings of grinding); Diagnose (adjusting of engine parameters, encoder, SNCI); Robot (adjusting the speed of robot, selection of auxiliary tools, such as gripper of robot, pallets).The program is written in a specific code that is similar to Visual C. The software converts the program into a programming language of CNC machine (G-code).The industrial PC is used for the programming and management of CNC machine.The program can be configured in relation to three different coordinate systems: • PCO -(Part coordinate): coordinate system in relation to the measuring system (reference "zero" is set on the measuring system); • GCO -(Grinding coordinate): coordinate system in relation to the grinding system (reference "zero" is set at the beginning of grinding disc); • WCO -(Workpiece coordinate): coordinate system in relation to the workpiece (reference "zero" is set in the middle of workpiece).
The system for grinding consists of a shaft for grinding (rotation of grinding disc) with a servomotor, the auxiliary axis U which generates a shift of grinding disc (back/forth) with a stepper motor and the auxiliary axis W which is the oscillating shaft (left/right).Furthermore, an integral part of the system for grinding is also a disc for cleaning, straightening and sharpening of grinding disc.The system of workpiece is a system for defining the geometry of workpiece in the technological system of grinding.It is defined by the auxiliary axis B (turn-table), the main axis X, as well as the shift axis -auxiliary axis C (which is the axis of workpiece).Each of the main and auxiliary axes (B, X and C) propels its own servomotor, and the system of coordinate axes of CNC machine and integrated robot is shown in Fig. 2.  The technological process of grinding is specific for different workpieces, and the focus of this paper will be on the workpieces made of multilayer ceramics.These workpieces contain approximately 60 layers of sintered ceramics, and the dimensions at the cross-section are: 7×7 mm, with length of 33 mm.During exploitation, these workpieces achieve an extension of approximately 0,05 mm under the influence of electricity, and fulfil the desired function.For the defined workpieces, it is extremely important that they are manufactured in the specified tolerance field.Furthermore, next to the specified dimensional tolerance, it is also necessary to meet the shape tolerance (parallelism).The process of grinding is performed on the CNC grinding machines, and the manipulation of workpieces from the pallets (Fig. 3) is performed by a robot that puts it in the prism in which the proper positioning of workpiece is done (Fig. 4).

Figure 4 Positioning of a workpiece
After that, the robot carries the workpiece to the optical sensor, and then puts it in the shaped grippers.The workpiece is measured in the grippers, so that the machine can define the dimensions of the raw piece and calculate the dimensions necessary for the grinding to a specified measure.The grinding process is carried out on two faces (surfaces) at the set length, and afterwards other surfaces are ground (Fig. 5).Afterwards, the workpiece is measured again by the machine in order to check whether some adjustments need to be done.After the grinding process, the robot takes the workpiece and carries it to the optical sensor, and then to the container for rinsing.At the end of the process, the robot puts the workpiece back into the pallet and takes a new workpiece for grinding.The robot puts four pieces in a container for taking samples (Fig. 6) for further verification (by the employee) because of the process control.In this paper, the problem and goal of the set investigation is the monitoring of dependencies of variables that affect the plane parallelism of workpieces and their changes.The modelling process of grinding, with the dependence of observed variables (machine, operator, foil and production line) on the plane parallelism, will be investigated using the method of artificial neural networks.The investigation is based on the data collected from the database of the technological process of grinding.The abstract mathematical description of an artificial neuron (Fig. 7) is derived based on the imitation of the functions of biological neuron.As can be seen from Fig. 7, the neuron body assumes the role of a summator, while the role of dendrites is assumed by the inputs to the summator.The biological neuron activation level of sensitivity is taken over by the transfer-activation function which determines the moment of launching the impulse to the neuron output.The transfer function can be linear or nonlinear.In this investigation, different transfer functions (linear, sigmoid, hyperbolic-tangent, sinus) are used, and some of them are shown in Tab. 1.In the linear transfer functions, the summator output is multiplied by a factor and the amount thus obtained is forwarded to the neuron output.In the nonlinear functions, the summator outputs change in accordance with various forms of functions, while the neuron outputs can take over different values depending on the transfer function (as shown in Tab. 1).At the start of the learning process, i.e. of the connection weight computation, the input layer transfers data to the first hidden layer.Each neuron in the hidden layer receives the weighted input, which is (by the network initialization) usually given by the random values in the interval from −0,1 to 0,1.These inputs are transformed and get the form: The computed neuron inputs are transformed through the transfer or activation function and sent to the neuron output according to the following expression: where f is the transfer function (sigmoid or some other selected function).Every sending of the neuron output is connected with a local error.Let suppose that the network has some global error of the function E connected with the differential of function of all the connection weights in the network.The global error E is defined in the output layer and is given as: where d k -is the desired (real) output vector, while x kpresents the output of network, and k -is the index of output components.The critical parameter that propagates backwards through all the layers is defined as:  (5) The previous expression can be used only for the non-output layers.The aim of learning process, i.e. of adjusting the connection weights in this network is to minimize the global error and propagate it backward through the network all the way to the input layer.The aim of this propagation of minimized global error through the network is to adjust every particular connection weight in the network.According to the set current values of weights [ ] s ij w , ascent or descent is defined, the aim being the global error reduction.This can be realized by applying the gradient descent rule: Where α is the learning coefficient.Partial derivations in the above expression can be calculated directly from the local error value, which is given by the following expression: Inserting the calculated values of partial derivations from Eq. ( 7) into Eq.( 6), the expression for adjusting the weights of neurons in the hidden layer is obtained:

Using the back-propagation neural network in evaluation of CNC grinding process
A general form vector of the model applicable for a neural network input is as follows: ,..., , , ,..., , , where vector X i represents input variables, and vector Y o output variables.
Analyzing the described grinding process of workpieces, and based on the previous experience and heuristic approach, a data model is defined.The model is defined by selecting the input variables -vector X i = {machine, operator, foil and production line} and by investigating their influence on the output variablevector Y o = {plane parallelism}.A short description of each variable is given in order to stress the importance of particular variables for a neural network model.The influence of machine on the plane parallelism can be seen in the possible deviations of the machine (possible damages or deviations from the designed attributes), i.e. if some of the controlled axes is not within the allowed tolerance field, it may result in a poorly ground workpiece.According to the control protocol, the machine measures the length (not the plane parallelism) of the workpiece, before and after the operation of grinding.If the workpiece is outside the permitted tolerance field, the machine stops.One of the consequences of unallowed deviation from the accuracy of controlled axes is the grinding of workpiece in the shape of parallelogram, if the machine does not "conclude" that the workpiece is geometrically inadequate (a reject) according to the designed control protocol.The operator of machine has a significant role for the accuracy of plane parallelism.He performs the control measurement of 3 workpieces out of 96 pieces.Out of one block, 450 workpieces can be cut out, which means that 15 workpieces must be measured for a single block.If the operator does not measure the plane parallelism adequately, and does not adjust the machine, he can cause some deviations of plane parallelism, i.e. rejects.The operator marks each measured piece with his personal number to confirm the accuracy of plane parallelism and other measures.The foil (type of ceramic foil -batch) represents the constituent and building layers of workpiece.If the electrodes are not printed adequately on the ceramic foil during production, or if it is not well positioned, it can lead to damaged workpieces (rejects).The production line is the line on which a ceramic block is formed and produced.Several errors may occur: inadequately folded foil, inadequate temperature and pressure of sintering, inadequate temperature of firing and incorrectly cut parts.If the technological parameters are not set adequately during grinding, the workpieces can be bent, and adjusted by the grippers during the process of grinding, and after grinding and releasing of the grippers, the workpieces return to the initial state and have inadequate plane parallelism.Plane parallelism is investigated as the output variable of the designed data model.Parallelism is measured at four points.If the difference between the maximum and minimum measure is within the tolerance limits, then the workpiece is acceptable, otherwise it is not acceptable and represents a reject.Fig. 9 shows the workpiece and the attributes of measuring at the characteristic points.Plane parallelism 0 9 The data from the technological process are gathered for the selected variables.Each of the variables is defined with the max.and min.values (Tab.2), and the neural network is used.
The preparation of data for learning and testing of the neural network was done on the real data with a sample of 1860 cases.The sample is divided into three groups according to the output variable, and the groups are determined so that each group has the equal amount of data.Each group has the data as follows: 60 % for learning, 20 % for testing and 20 % for validation.After the data preparation, the architecture of neural network is designed (defining and selecting of the best attributes).After the architecture of network is defined, the process of learning (training) of network for the selected technological process can start.The procedure of learning of neural network is carried out on an arbitrary number of iterations by adjusting the attributes of network.The RMS error (Root Mean Square error) is taken as a criterion for network validation, and it is given in Eq. ( 10 By alternating the attributes of diverse architectures of neural networks: hidden layers (architectures with one, two or three hidden layers were studied), learning rules (Delta, Delta -Bar -Delta, Ext.Delta -Bar -Delta), transfer functions (Sigmoid, Hyperbolic-tangent) and other attributes (as shown in Table 4), the neural network with the minimum RMS error of 0,1076 (10,76 %) in the learning phase of neural network was chosen.The selected neural network generated the network output of 0,1207 (12,07 %) in the validation phase.The attributes of the selected architecture of neural network are shown in Tab. 3.After the architecture of neural network with one hidden layer was adopted, the investigation was conducted and the hidden layers were added.The architecture with two and three hidden layers was designed.The neural network with two hidden layers and varying of different number of neurons in the layer did not give better results than the architecture with one hidden layer.The architecture with two hidden layers and the selected relationship between the learning rule and transfer function (Delta -Bar -Delta and Sigmoid function) of neural network give the results of RMS error, as follows (second hidden layer) with the presentation of some results of investigated architectures: four hidden neurons -RMS error is 0,1540 (15,4 %); five hidden neurons -RMS error is 0,1139 (11,39 %); ten hidden neurons -RMS error is 0,1149 (11,49 %).The investigation continued by designing the architecture with three hidden layers.In the first and second hidden layer, five neurons are defined, and in the third hidden layer, the number of neurons is changed.The architecture with three hidden layers and the selected relationship between the learning rule and transfer function (Delta -Bar -Delta and Sigmoid function) of neural network give the results of RMS error, as follows (third hidden layer) with the presentation of some results of investigated architectures: three hidden neurons -RMS error is 0,1185 (11,85 %); five hidden neurons -RMS error is 0,1148 (11,48 %); ten hidden neurons -RMS error is 0,1236 (12,36 %).By alternating the attributes of diverse architectures of neural networks, it was determined that the results with one hidden layer are the best.

Conclusion
The complex technological process of grinding of multilayer ceramics is briefly described in this paper.The employees of technological and operational production preparation face the demands for the optimization of technological parameters while maintaining the high quality of workpieces.The realization of technological process of grinding in the production on the CNC machines, next to the available operators and available raw material, also asks for the output quality of workpieces (plane parallelism).By applying the results of designed model, it is possible to warn the technological and operational preparation of production about the need for changing the technological parameters of grinding in order to achieve the planned product quality, raise the level of control of final products and the correction of production plan.Analysing the set task and objective of investigation in this paper, it can be confirmed that they are completely fulfilled as can be seen in the achieved and displayed results.For the realization of investigation, one of the "soft computing techniques", that are gaining more attention from researchers for the modelling of complex technological processes, was used.The artificial backpropagation neural network was used for the modelling and investigation in this paper.A model was designed for the set task of investigation.The input and output variables of the model were analysed, and the real data from the production process of grinding of multilayer ceramics on the CNC machines were gathered.The gathered data include 1860 cases.After defining the database for the experimental work with the artificial neural networks, it was necessary to process them and to prepare them for the investigation.For the realization of set investigation, a significant number of NN architectures with different attributes (e.g.learning rules, transfer functions, number of neurons, structure of hidden layers and others), was designed.For each architecture of neural network, the process of learning and validation of network was carried out.The achieved results of investigation are described and shown in the paper, and the accepted NN architecture in the learning phase achieved the level of RMS error of 10,76 % and in the validation phase of 12,07 %.These results confirm the acceptability and the application of this methodology (soft computing technique) for the realization of set goals in the technological and operational preparation of production.An investigation in the direction of other algorithms of artificial neural networks, and the use of other soft computing techniques can be defined as a continuation of investigation for the set model.

Figure 2
Figure 2 Coordinate axes of machine and robot

Figure 3
Figure 3 Workpieces in a pallet

Figure 5
Figure 5 Face grinding of workpiece

Figure 6
Figure 6 Container for samples 3 Evaluation of parameters by using the Neural Network 3.1 Selection of the type of neural network

Figure 7
Figure 7 Neuron structure

Figure 8
Figure 8 Back-Propagation Neural Network The Neural Networks represent a strong technique for defining the nonlinear transfer functions between the continuous input values and one or more output values.The Neural Networks can have one or more hidden layers.Each layer is completely connected with the next one thus indicating a great number of synapses.Fig. 8 displays the BPNN (Back -Propagation Neural Network) standard structure, which can also be defined as Multilayer feedforward network, and was chosen for this investigation.To better understand the computation of values in the network, and to avoid the confusion from the neuron in one layer to the other layer, the indices and exponents will be used to describe the characteristic attributes.They are given as follows: [ ] s j x -output state of the j th neuron in the s th layer, [ ] s ji w -weight of the connection of the i th neuron in the (s−1) layer with the j th neuron in the s th layer, [ ] s j I -weighted sum of input of the j th neuron in the s th layer.
Using the connected rules twice successively, the relation is obtained between the local error and the particular neuron of the s th layer and all local errors of the layer s+1, given by the expression:

Figure 9
Figure 9 Characteristic points for measuring of plane parallelism MS -Mean Square error; N -Number of pairs of the training set input-output values; y n -Neural network n-th output; d n -Desired value of a neural network; n-th output.

Table 1
Some graphs and expressions of transfer function

Table 2
Min-Max values of variables

Table 3
Attributes of selected BP -Neural Network

Table 4
RMS error (Learning rule -Transfer function)