Optimisation of milling parameters using neural network

The purpose of this study was to design and test an intelligent computer software developed with the purpose of increasing average productivity of milling not compromising the design features of the final product. The developed system generates optimal milling parameters based on the extent of tool wear. The introduced optimisation algorithm employs a multilayer model of a milling process developed in the artificial neural network. The input parameters for model training are the following: cutting speed vc, feed per tooth fz and the degree of tool wear measured by means of localised flank wear (VB3). The output parameter is the surface roughness of a machined surface Ra. Since the model in the neural network exhibits good approximation of functional relationships, it was applied to determine optimal milling parameters in changeable tool wear conditions (VB3) and stabilisation of surface roughness parameter Ra. Our solution enables constant control over surface roughness parameters and productivity of milling process after each assessment of tool condition. The recommended parameters, i.e. those which applied in milling ensure desired surface roughness and maximal productivity, are selected from all the parameters generated by the model. The developed software may constitute an expert system supporting a milling machine operator. In addition, the application may be installed on a mobile device (smartphone), connected to a tool wear diagnostics instrument and the machine tool controller in order to supply updated optimal parameters of milling. The presented solution facilitates tool life optimisation and decreasing tool change costs, particularly during prolonged operation.


Introduction
Milling processes are non-stationary operations, the realisation of whose involves the constant change of parameters crucial to productivity and quality of machining. One of such parameters, critical to the surface roughness of machined workpiece, is the condition of the cutting tool [1]. In the case in question, the relationship between tool wear and surface roughness parameter Ra is exponential. Both the pace and the functional character of these changes are relative to an array of difficult-to-define factors and exhibit non-linear dependence on the tool operation time [2]. These relationships affect production economics, particularly in lot production at constant milling parameters. The limit value of Ra specified in the product design documentation must be attained, nevertheless tool wear may hamper these efforts at certain stages of production. In the event of such an occurrence, constant monitoring of the state of machined surfaces [3,4,5] enables spotting the defect and applying the most sensible solutioncutting tool change. However, this will inevitably lead to halting the production process and generate delay of machining time of a given lot of machined products. This leads to the question, whether altering machining parameters may prolong tool life, and provide the desired surface roughness of the workpiece.
In our experimental study, we developed a model which confirmed such presumption. However, implementation of the model for adjusting machining parameters that would ensure obtaining the required surface roughness of products may compromise the productivity of the process. The optimising algorithm is therefore designed to select parameters, from the established variants, that will produce specified Ra at a minimum loss of machining productivity. This strategy proves particularly effective when the surface roughness requirements are to be maintained in high lot size production. Resolving to the conventional solution would entail frequent stops for changing the cutting tool and maintenance-work-related productivity loss. Approaching both strategies from the perspective of production economics, what must be resolved is the issue of the limit tool wear, beyond which it is pointless to search for machining parameters to obtain the required Ra of machined surfaces. Therefore, to assess the suitability of approaches we must collate the increased machining costs, resulting from decreased machining parameters, and the alternative cost of halting the machining process for tool change operations, the cost of unused machining capacity and a potential cost of setting up a new tool. If lower machining productivity, resulting from the necessary machining parameters alteration, should generate comparable or higher costs, the The solution to the presented problem may be obtained by means of the algorithms, implemented by the developed decision-aiding software. The computer application may either aid the decision-making process of a machine tool operator, or alternatively, conduct the decision-making process automatically [6], given it is connected through proper interfaces with the machine tool controller. The model was built for cyclic milling of workpieces in high-sized lot production, at relatively low surface roughness parameter Ra.
The system was developed and tested following the stages listed below: -conducting experimental milling processes for a specified area of acceptable parameters and different tool wear; -employing the obtained experimental data into building the multilayer non-linear model defining relationships between feed per tooth, cutting speed and tool wear parameters and the target surface roughness. The model was developed by means of a designed artificial neural network; -developing optimisation algorithms for milling process parameter selection; -testing the system.

Data collection for the neural network model
The data for the neural network was obtained from the series of test runs of the milling machine tool, conducted at a specified constant milling parameters.
The study was carried out on 25 mm x 25 mm x 80 mm cuboid-shaped workpiece specimens made of 55NiCrMoV7 tool steel (hardness 240 HB). The specimens were subjected to face milling with cutting fluid, carried out on FV-580A vertical machining centre supplied by MOC-Mechanicy. The process was realised with R390-050C5-18060 square shoulder milling cutter (D = 50 mm, entering angle κr = 90 0 ) equipped with R390-180612H-PL coated cemented carbide cutting inserts, produced by Sandvik Coromant.
The milling process was conducted at the following constant milling parameters: -axial depth of cut ap = 0.5 mm, -radial depth of cut ae = 25 mm (partial symmetrical face milling).
Changeable parameters of the process were: -cutting speed in the range of vc = 60 ÷ 450 m/min., -feed per tooth, in the range of fz = 0.02 ÷ 0.3 mm/tooth, -localised flank wear at the tool-workpiece interface VB3 = 0 -0.6 mm.
The value of VB3 was monitored immediately after each machining of a test specimen by means of Keyence VHX 5000 digital microscope.
Average surface roughness parameter Ra, the arithmetic average of the absolute values of the profile heights, measured with Surtronic 3+ surface texture measurement system produced by Rank Talyor Hobson, was specified as nominal roughness.

Neural network as a model of milling process
Considering the non-linear and multilayer character of the modelling object it was resolved that the best solution for representation would be provided by the neural network [7,8]. Among its advantages, a model generated by the neural network exhibits one significantly beneficial feature, i.e. it is capable of calculating values of a modelled function outside of the training data set.
The neural model building process consists of three stages: -defining the structure of a neural network, -network learning, -validation and testing.
The process was modelled in MatLab environment with the application of Neural Network Toolbox. Machine learning in MatLab begins with a processing function creating the network based on the values of input and output data: where: net_mfa variable defining the structure of the neural network, P-R-by-Q matrix of Q input vectors of R elements each, Tmatrix of output vectors, Snumber of neurons in hidden layer. The structure of thus defined network may be modified by means of optional parameters, according to the descriptions found in Neural Network Toolbox guidebook. The network designed for solving the problem of a given process is shown in Fig. 2. The network model is adjusted to fit the experimental data at the learning stage, which in MatLab is carried out by the function train: where: -milling process model. The process of learning involves specifying weights in particular neurons and fit assessment of the model to training data and to data outside of the training data set but were obtained from the same experimental milling process. The experimental machining process in question produced 27 values of surface roughness parameter Ra of machined surfaces for different combinations of three input parameters: cutting speed vc, feed per tooth fz, and tool wear VB3. Variable P in the function of training took the form of a 3x27 matrix, whereas variable T was represented by a single-row matrix with 27 columns. The history of training and the correlation between targets and outputs may assessed from diagram in Fig. 3.   Fig. 3. Training history of neural network.
The network model net_mf obtained through training is a virtual model representing the process of milling for values of three selected input machining parameters from the set of training data. The statement is true if other parameters of the milling process, constant and not included in the model, are not subject to change. This condition is fulfilled for lot production processed on the same milling machine, on the same workpiece, and with the same tools and inserts. The model may be represented graphically only to a limited extent due to the fact that the function describing the architecture of the model contains three variables. Fig. 4 shows the correlation between surface roughness of the machined workpiece, feed per tooth and cutting speed at zero tool wear VB3, while Fig. 5 represents surface roughness at identical machining parameters but carried out with a worn tool, VB3 = 0.6 mm. In both diagrams the relationship exhibits a nonlinear character, whereas advancing tool wear results in higher sensitivity to feed per tooth and cutting speed changes, as well as lower and more limited range of surface roughness values.

Optimisation algorithm based on the model of milling process
The model of milling process obtained from the neural network provides us with data regarding the surface roughness of a machined surface obtained as a result of particular combination of machining parameters: feed per tooth, cutting speed and tool wear. This functionality itself is insufficient in terms of the optimisation objective: specifying particular parameters of milling that fulfil the optimisation objective function, i.e. maximum productivity of milling process W, defined as the material removal rate in a given time unit:  Simultaneously, one more condition must be fulfilled: the surface roughness of a machined workpiece Ra must be within the given tolerance range Tol: The surface roughness [9] of a machined workpiece Ra on a higher than nominal level is unacceptable, however, the range of Ra may be limited to values no lower than defined by Tol. Such limits may result from product design specifications. Decision-making variables are fz and vc for a particular localised flank wear VB3.
The developed algorithm searches the space of combination parameters generated by the trained neural model with the aim of specifying a sub-set of parameters fulfilling the inequality (4). The next step is to find a pair of parameters controlling the process of milling, fz and vc, which fulfil the objective function (3). The algorithm may include the minimal permitted productivity of milling Wmin defined by the machine operator and dictated by economic analysis of the production process. Upon achieving the specified value, the algorithm suggests tool change. Fig. 6 shows a simplified representation of the optimisation algorithm for the milling process, developed with the use of the neural network model. In this algorithm has been applied invers method for identification of parameters [10,11]. The was programmed in MatLab ver. R2017a.
The programme is composed of two modules: network learning aimed at producing the model, and application employing the developed model in controlling milling process parameters via milling machine controller. At a current level of software development the controller conducts regular tool wear measurements and updates the VB3 value in the system. The interface of the programme is a simple graphic design programmed with Guide tool in MatLab software. Dialogue boxes are completed automatically with constant machining parameters (number of cutting edges and milling cutter diameter) specific for a given machine tool model, entered in the programme. The remaining fields must be completed by a machine tool operator, who must specify: -nominal surface roughness -Ra; -tolerance range of surface roughness -Tol; -minimal permitted productivity of a milling process carried out with a worn-out tool, producing the surface of specified surface roughness -Wmin; -regularly updated value of localised tool flank wear VB3.
Selecting "CALCULATE OPTIMAL PARAMETERS" button initiates generation of new optimal parameters of feed per tooth fz and cutting speed vc, which should be input in the machine tool controller in subsequent Updating the set of parameters in the milling machine controller will ensure maintaining desired surface roughness of machined surfaces at a specified level VB3, at maximal productivity of the process.

5
Testing milling parameter optimisation software Programme testing consisted in analysing the fit of calculated parameters, fz and vc, and predicted productivity of machining. Table 1 collates test results, which show that the algorithm for high nominal Ra (between 1 and 3 µm) always proposed parameters close to maximal for a given cutting tool and milling machine, regardless of tool wear indication. As a consequence, high values of productivity W, which result from the fact that such high limit for surface roughness had little impact on decreasing the productivity. It may be furthermore seen that lower surface roughness values cause the decrease in productivity, particularly for higher values of tool wear VB3. For localised flank wear values VB3 higher than 0.15 mm it was impossible to attain a desired nominal surface roughness of 0.3 µm.

Conclusions and future work in the field of computer aided milling
The results obtained from the presented application tests confirmed the proposed theses. The system is capable of maintaining specified surface roughness of machined workpiece surface. Simultaneously, the generated pair of milling parameters f and n ensure maximal productivity at a constantly updated tool wear level VB3. Economicwise, the efficiency of the proposed solution will depend on individually assessed tool change and set-up costs and the interval of tool wear measurement VB3. The target application of the presented solution is automation of the localised tool flank wear monitoring procedure [12]. The value of VB3 obtained after machining of subsequent workpieces will be sent to the optimisation programme. The optimal parameters f and n will be automatically updated in the milling controller software. Our study suggests that the presented application (Fig. 8) will shorten correction time and ensure full operation of milling cutter inserts without compromising the specified design features of the final product.