Supporting the decision during inter-operational inspection of the electrodes based on the ensemble of neural networks

* Dr inż. Halina Nieciąg (hnieciag@agh.edu.pl) – AGH Akademia Górniczo-Hutnicza; dr inż. Rafał Kudelski (kudelski@agh.edu.pl) – AGH Akademia Górniczo-Hutnicza; dr inż. Krzysztof Zagórski (zagkrzys@agh. edu.pl) – AGH Akademia Górniczo-Hutnicza In this paper the method based on the ensemble of artificial neural networks is presented for prediction of the geometrical quality of workpieces after electro-discharge machining (EDM). The complexity and random nature of physical phenomena accompanying the EDM process excluded the theoretical ways. The working electrodes were measured using CMM in flexible manufacturing system. The data obtained from inter-operational measurements were used for the neural networks training. Commonly used measures to express the tool wear turn out to be useless due to their large uncertainty. The tool monitoring and the ensemble method provided more stable diagnosis of the condition of the tool.


In this paper the method based on the ensemble of artificial neural networks is presented for prediction of the geometrical quality of workpieces after electro-discharge machining (EDM).
The complexity and random nature of physical phenomena accompanying the EDM process excluded the theoretical ways.The working electrodes were measured using CMM in flexible manufacturing system.The data obtained from inter-operational measurements were used for the neural networks training.Commonly used measures to express the tool wear turn out to be useless due to their large uncertainty.The tool monitoring and the ensemble method provided more stable diagnosis of the condition of the tool.
The quality of products shaped with EDM technology is an effect of many physical phenomena related to electrical discharges occurring between the electrode immersed in a liquid with dielectric properties and the machined surface.With the erosion of the material, at the same time the working electrode (ER) erodes and changes its dimensions and original shape.The degree of deformation and loss of the ER material depends on many factors [2].The optimal choice of these factors plays an important role in planning the machining process.
The ER wearing out results in the gradual decreasing the geometric accuracy of the workpiece.Traditionally, the tool life is evaluated on the basis of linear and volume wear measures.However, the usefulness of the working tool is primarily determined by its ability to manufacture "good" products, which is why this criterion should decide about tool life.
The accuracy of EDM machining is evaluated in a similar way as in other technologies by determining the dimensional and geometric deviations and surface finish parameters.This means that the values of deviations should not exceed the intervals specified by specifications of the part [3].These criteria are not especially useful if the process has already been completed, because the results of geometrical verification of the final product did not prevent happening the defects.

Monitoring
The optimal process settings usually are achieved on two different ways.In the first case, the observations from DOE experiments are becoming the basis for creating statistical models or determining empirical relationships between the input quantities and the observed features.The creation of a complete and at the same time adequate model of the EDM process is difficult task, due to complex and incompletely identified phenomena accompanying the machining process.The important problems of EDM processing are large fluctuations of process parameters and factors affecting the process, their interactions, causing its variability.The results of ER measurements to determine tool wear are subject to considerable uncertainty.This complicates the establishment of unambiguous criteria for the exchange of the tool and makes it necessary to adopt other diagnostic methods that can be used while the process.
In the second case, the optimal course of the process is achieved by monitoring the quality of the process and the condition of the tool to avoid machining deviations due to incorrect tool work.
The aim of the research presented in this paper was to develop a method for predicting the deviations after EDM shaping, based on the results of inspection of the tool geometry during the manufacturing of repetitive components, hence enabling the recognition the ER loss of ability to work.It required to recognize the relationships between both ER and the product deviations.On the basis of ER inspection the diagnosis of the condition of the tool can be made.The preparation of a large product series is much more difficult in EDM machining than in other technologies, which is why the crucial issue was the development of an effective way of prediction the quality of machining with a small amount of data.

Supporting the decision during inter-operational inspection of the electrodes based on the ensemble of neural networks Wspomaganie decyzji podczas międzyoperacyjnej inspekcji elektrod na podstawie zespołu sieci neuronowych
HALINA NIECIĄG RAFAŁ KUDELSKI KRZYSZTOF ZAGÓRSKI * DOI: https://doi.org/10.17814/mechanik.2018.12.188 As a representative measure of the quality of operation of single network and the ensemble, the mean square error (MSE) was assumed.It was expected that the integration of network output signals would be characterized by a reduced MSE with respect to the values obtained from each network separately.
All studies were carried out in MATLAB 7.12.0 using the Neural Network Toolbox™ library [6], on data rising from measurements of machined shapes.
The ensemble under study was formed by two networks of different topology (Fig. 2a), operating in parallel on the basis of different operating principles, so that the outputs generated by the members - component networks of the ensemble for the same inputs (set of data) were independent and diverse.The diversity of individuals in the ensemble is an important factor influencing the generalization capabilities, which has already been proven in early works [7].
The first designed network was a multi-layer perceptron network (MLPN).In the simulation of this network the following parameters were adopted: number neurons of the input layer 3, of the hidden layer 8, sigmoidal activation function, the Lavenberg-Marquardt as a training method.
The second network was the network with radial basis functions (RBFN).It had a two-layer structure, the hidden layer realized nonlinear mapping carried out by neurons of the radial base function.
The output neuron was linear and its role was the weighting of the signals from the hidden layer neurons.The network had also three input variables, a layer hidden with 22 neurons, and as the learning method was applied a gradient algorithm [5].
The estimated values from each network constituted the basis for determining the weighted mean, in accordance with the Generalised Ensemble Method (GEM) [8].This method involves finding weights for two or more networks output, that minimizing MSE with respect to the target values in validation set.
For unit generating more accurate results, a higher priority was assigned, represented by an adequate weighting in the averaging process.
Networks forming the ensemble were trained on the same data sets.In our method, these results were then compared with the results of single networks but using the bagging technique whilst training process (Fig. 2b).This technique, also referred to as cross-validation, is based on the bootstrap technique of generating training sets from the original set of experimental data.In the situation when the experimental data are not too numerous, it allows to obtain large variability of individuals signals as independent

The electrode inspection
The acquiring of the information during the process is implemented by monitoring or supervising the tool in real working circumstances [4].
The information needed to evaluate the ER condition can also be acquired during the inspection of the tool between successive machining cycles.In advanced manufacturing systems it is possible to integrate measuring device and automated cutting machine developing IT technology.
Communication between both devices allows the use of transmitted information to make a correction of the process parameters, correction of the tool trajectory or to withdraw the tool from use and replace it with others.Connected to the loading device and the tool magazine creates the fully automated flexible manufacturing systems.
The basic research stand on which the examinations have been carried out, was the WorkShopManager (WSM) working in Research Center AGH University (Fig. 1).

The proposed method
Artificial neural networks (ANNs) are considered to be an effective tool for solving problems such as estimation, prediction or diagnosis [5].They can enable a comprehensive assessment and facilitating the tracking of the relationships between the parameters characterizing the condition of the tool, the parameters of the EDM process and the geometrical features of the machined products.
An ensemble of neural networks was designed and tested, based on three basic measures of geometric accuracy, i.e. dimensional deviations, form deviations and roughness.The ensemble was to develop a prediction of selected measures based on measurement results of geometric features of the ER, established during its regular inspection.
The initial attempts to use the single networks for this purpose did not bring satisfactory results.When evaluating the quality of the network, the results of the network responses with the corresponding actual values in the training and validation set were compared.Response errors at random initialization of weights in the learning process were changeable and reached unacceptable values.responses on different sets of training data, so that integration results can achieve more realistic prediction.
Also in this case, the MSE was accepted indicating the quality of the ensemble's signal.

The technological experiment
Simple concavities (pockets) with a rectangular crosssection and dimensions: 20 × 20 × 10 mm were hollowed in solid material made with tool steel, hardened to 56 HRC.The EDM machining was carried out in two cycles: roughing and finishing.The rectangular shaped ERs were made of M1E copper.A "new" ER was always used to carrying out machining cycle successively of three pockets.The experiments were carried out according to a three-level plan.
Each ER was measured before starting work and after making each pocket.After finishing the machining, the dimensions, the form deviations, as well as the roughness on corresponding surfaces of the pockets were measured.To perform the roughness measurement, the samples with pocket had to be cut on the water-jet cutting machine by Ridder.The precision of the tool positioning relative to the sample references was also verified.
All measurements of geometrical quantities were conducted on CMM (Fig. 1), equipped with touch scanning measuring head SP100M Leitz.Roughness was measured using Hommel Werke portable T1000E.
First, after roughing cycle, were determined the influence of each factor separately and the interaction of both on the parameters characterizing tool geometry and machined surface [9].This allowed to choose for further tests those measures which were best to represent the ER geometry and the hollowed shapes.Identical inputs and outputs were accepted for both networks.Next the condition of electrode and shaped surfaces were examined for the settings of process factors.

Discussion
To train the networks the portion of 24 experimental data obtained from machined cycles were used.Integration of their signals was carried out after training according to the GEM procedure.During the tests the errors of the ensemble and its members were analyzed, as well as MSE.The most important analysis threads and observations were presented below respecting one of the analyzed variables, i.e. dimensional deviations, which could be considered as representative for other variables.
The fig. 3 shows the results of tests which have been performed in order to evaluate the quality of prediction.Comparatively, in diagrams the errors in prediction of the single members are shown (thin colour lines), and the errors of their ensemble (blue line).The errors were computed as differences between output at each input enclosed in each drawn data set and the corresponding known value, thus they represent a disagreement among the networks on inputs.
The networks have been trained and compared under the same conditions (parameters and data set used in training).
The series of errors for single members are characterizing large diversity, whilst the ensemble outputs are much less dispersed.The particular errors reduction may be especially noticed, thus the better generalisation capabilities of an ensemble has been reached.variability of the estimates and improves the generalization capability, which was a problem of prediction in EDM processes.When the single networks produce similar outputs the ensemble does not improve the combined estimates, and more suitable seems then using the bootstraping technique.In these special cases - the combination of these techniques can be applicable.The further study is aimed at testing this hybrid approach against the verifying set containing data from additional experiments.Again, a reduction in the error rate may be observed as the number of sets increases.Other observation is that RBFN has better generalisation capabilities than MPLN when the number of ensemble is small, only when the number is greater than 13 networks give comparable results.
At the bottom one can see comparatively the visualisation of output surfaces for MPLN, RBFN and their ensemble after simulation, i.e. responses within experimental parameters domain.Also this diagram confirms the main advantage of using the GEM methods to any ensemble of members, i.e. weighted averaging in their response space guarantees improvement of characteristics if only they vary sufficiently.

Conclusions
The concept of the ANNs ensemble developed in the research makes it possible to connect various though not numerous data which characterize the manufacturing process and measurements.The quality of the learning process is influenced by the size of the training set, while the EDM shaping experiments do not provide a large amount of data.The network ensemble used to predict machining quality seems to be more beneficial tool than independent neural networks of different topologies for deciding whether the ER finished its useful life.The smaller errors values allow to conclude that the ANNs ensemble reduces the

Fig. 1 .
Fig. 1.The system consists of CNC electro discharge machine (Roboform 350 Sp GF Agie Charmilles) to manufacture the workpieces, 3R robot for loading workpieces and tools in and out of the machine and for using the identification cycles (Work Master robot) and CMM (DEA Global Performance, with measuring range 500 × 700 × 500 mm, resolution 1 µm) Inspection of ER follows the sequence of commands stored in the P&M EDM software macros which are intended for execution in CNC mode in PC DMIS programming environment of the CMM.

Fig. 2 .
Fig. 2. The concept of the two networks ensemble (a).Cross-validation producing the ensemble for multiple outputs (b)

Fig. 3 .
Fig. 3.The prediction errors in [mm] of an ensemble compared to the errors of individuals members over all data in a certain training set (a) MPLN, 5 training runs; (b) RBFN, 5 training runs; (c) MPLN, 15 training runs; (d) MPLN, 15 training runs (for clarity shown first 5)

Fig. 5 .
Fig. 5. Reduction in MSE of the ensemble as a part of maximum value (a).The outputs surface of RBFN, MPLN and their ensemble (b)