Artificial Neural Network Based Machining Operation Selection for Prismatic Components

— Computer-aided process planning systems are used to assist human planners in producing better process plans. New artificial intelligence techniques play a significant role in CAPP. CAPP research includes neural network approaches, knowledge-based techniques, Petri nets, agent-based, fuzzy set theory, genetic algorithm, Standard for the Exchange of Product model data (STEP)-Compliant CAPP, and Internet-based techniques. This study deals with the application of the Artificial Neural Network techniques (ANN) in CAPP because of their learning ability and massive potential toward dynamic planning. This study focuses on the usage of artificial neural networks machining operation selection and sequences of operations for prismatic components. The intelligent CAPP system suggests the best machining operation and its sequences for the prismatic components using tolerances, material requirements, and surface finish details. The process planning of machining features in part is the starting point. An enormous amount of knowledge is required for part feature process planning, like selecting proper material, size, stock, dimensional tolerance, and surface finish. In this work, various prismatic features, such as a hole, slot, pocket, boss, chamfer, fillet, and face are taken and details like material, size, stock, dimensional tolerance and surface finish are properly normalized and given as input to neural networks to find the required sequence of machining operation. LevenbergMarquidt algorithm was used to train the networks and was found very effective in operation sequence selection. A sample prismatic component with nine features have been analyzed and found to be more productive. Levenberg Marquidt algorithm is then compared with the conjugant space algorithm, and it is found that the former produces less error in outputs compared to them later.


I. INTRODUCTION
Process planning is vital in bridging the gap between design and manufacturing. Manual process planning has a huge drawback because it requires process planning knowledge, such as a handbook, manufacturing resources, model shape, and decision making. Moreover, human process planners should be skilled in using reference books, designing tools and fixture equipment, selecting raw materials, and choosing the manufacturing process. They should also possess the ability to understand engineering drawings and perform computations on machining time and cost.
Neural networks are more advantageous than any other method because of their tolerance towards small errors from the input. Artificial Neural Network deals with simple mathematical calculations and does not involve any logical rule, and it is faster. It can deal with a large amount of data, especially in situations where rules are unknown. A neural network consists of many numbers of nodes interconnected to each other by layers such as input, output, and hidden layers. Each neuron will do any mathematical operation (i.e.) it computes the weighted sum of its input, subtracts its threshold from the amount, and sends the results through the transfer function [1]. The inputs and the desired outputs are learned carefully, so the actual output gets very close to the desired outputs.
Based on past training experience, the prediction process takes input and produces the required outputs. Training of ANN is a crucial step because altering the connection will cause the neural network to learn the solution, and it is generally carried out using supervised and unsupervised learning methods. Deep Learning has been currently getting attention in Computer-Aided Process Planning (CAPP). Artificial Intelligence (AI) technology applies to the entire range of manufacturing activities, where here we focused on applying it to CAPP. Towards the automation, the expert systems are broadly utilized in the manufacturing domain over two decades.
Recent advancement in computing power through the graphics processing unit (GPU), deep learning algorithms are gaining more and more recognition and have been successfully applied in various manufacturing process selection. In this section, we explained a few among them. Prismatic part machining features were recognized using Artificial Neural Network (ANN), and the method also proposes a 12-node vector representation of machining features, which varies in geometry and topology.
On successive vector representation on Boundary Representation (B-Rep) of CAD models, ANN is used for making the final prediction [2]. Rule-based STEP-based feature modeler introduced for the integration of CAPP/CAD systems [3]. Through the two cascaded neural networks, they were able to achieve nearly 0.02 Root Mean Square Error with 38 epochs. A 3 layer feed-forward network based on Radial Basis. Function (RBF) as an activation function is proposed to represent the information about adjacent edges and constituent faces [4]. This method reports considerable computation speed and performance. The geometric model-based neural network on generating part-programs for milling, drilling, and similar operations on machining centers was developed without the operator intervention [5].
A process planning methodology based on a combination of radial basis function (RBFNN) and granular computing (Grc) was proposed by Danchen Zhou et al. [6]. A hole feature was taken to illustrate the proposed work, and it was found that GRC-RBFNN produces accurate process routing of part features compared to RBFNN. Ding et al. [7] used Genetic Algorithm to find optimal sequence plans for machining and applied (ANN) to allocate relative weights for different evaluation factors of variant components for process sequencing. Least manufacturing cost, least manufacturing time, and satisfaction of manufacturing sequence rules are the main considerations taken as input.
Sankha Deb et al. [8] proposed a feed-forward back propagation neural network for the rotational component. Thumb rules (if then) were used for training the neural network. The simulation was done using a software package named Neuframe Version 4. Amaitik et al. [9] introduced an intelligent CAPP system. Fuzzy logic, artificial neural networks, and rule-based techniques were used to create a digital process plan .Sankab et al. [10] tried to automate two main important components of process planning, machining operation selection, and set-up planning. Catia V5 R13 software was used for feature recognition and input. Software stores the part data, and it is accessed using a macro tool in the VBA module, which stores information such as bodies, feature shape, and sketches, parameters collection, and annotation set collections.
Ouyang Hua bing [11] dealt with ANN, GA, and fuzzy logic. Solid works adopted by VB.NET was employed for feature recognition. Intelligent process planning ST-CAPP was deployed to integrate process planning and using STEP-NC standards, which transforms the design entities to manufacture features, followed by this process planning was converted to the machining operation. Gokulchandran et al. [12] did a tool life prediction using both regression and ANN analysis. A regression model was proposed for predicting the remaining tool life, whereas the ANN model was used for tool life prediction.
Gokulchandran et al. [13] used Matlab to train a neural network to predict the tool life in which 70 % of the data was used for measurement, 15 % for testing, and remaining for validation purposes. S.Illangovan et al. [14] implemented the integration of neural network and fuzzy logic for predicting the hardness and wear rate of specific alloy specimens. Izabela Rojek [15] did a comparative analysis utilizing MLP, RBF, and Kohonen systems for the machine choice, tool choice, and machine parameter choice. A complex genuine issue was tried utilizing these neural systems. These neural systems have given modern quality to CAPP systems. Amaitik [16] used a backpropagation neural network to minimize the total sum of square error. He trained the various drilling and milling tools. Many training experiments were performed to select the optimal structure. Recently radial basis function-based models have been used for modeling [17]. Techniques like Fuzzy logic and radial basis function has also been used for modeling the response of welded and processed plates. Wang et al. [18] discussed a dynamic process planning in modern manufacturing and manufacturing sustainability in terms of energy consumption, productivity, and production quality for process planning and scheduling optimization. Analysis based on the Backpropagation algorithm, gradient descent, and gradient descent with momentum, utilizing the sigmoidal and hyperbolic tangent activation functions, combined with preprocessing techniques, were executed and compared [19].
The backpropagation gradient descent with the adaptive learning rate (BPGD-AL)was improved by modifying a few values locally in the learning rate. The dataset results show that the modified and improved learning rate improved the learning efficiency of the Back-Propagation Algorithm [20]. The input parameters used to analyze the end milling process for Al2024-T4 were cutting speed, feed per tooth, depth of cut, and the cutting fluid flow rate, and the response parameters used are surface roughness, cutting force, and MRR. MATLAB was used to perform a Regression analysis in an Artificial neural network, and optimized results were obtained [21]. The cutting parameters in CNC milling operations were optimized using an Artificial neural network to reduce the cost of production in face milling operation. Matlab 2011 software was used to train a Multilayer perceptron using the Levenberg Marquidt algorithm along with Edgeworth-Pareto methods [22]. Feedforward neural networks were used to predict machining responses. Feed, depth of cut, and speed were taken as Input and surface roughness, cutting forces, and the temperature was the required output. The output values were very close to the input values. A hard turning component was taken as an example [23].

II. MATERIALS AND METHOD
Machining of parts includes drilling, boring, reaming, milling, etc. Milling is considered the best destructive type machining process because of its ability to produce a good surface finish and machine to its closest tolerance range. It can start with simple surface machining to complex machining of parts.

A. Knowledge Gathering:
The selection of best manufacturing operations and its sequence is based on the geometry of features, dimensions of various features, material properties, dimensional tolerance ranges, and surface finish details. The feature geometry includes types of prismatic features like a pocket, face, hole, step, etc. The feature dimensions include diameter, length, depth angle, and radius. The material properties include the type of material, its hardness values and Aluminum is selected for the research work. Dimensional tolerances indicate the allowable upper and lower limits of the dimensions, and it is represented in IT grades. The surface finish indicates how smooth the feature is. It is represented by a numerical value usually represented in N grade. The hole feature has dimensions diameter and depth. The process selection of the hole feature includes drilling, rough reaming, finish reaming, rough boring, or finish boring. For instance, if the diameter of the hole is taken as 40 mm, the process route will be rough drilling, reaming or boring a hole. The boring operation produces a better surface finish than drilling. The step features include length, depth, width, and angle. Finish milling is chosen in case of close tolerances. The process selection of Boss features includes diameter and length dimensions because only the circular boss network is taken into consideration. The fillet feature does not disturb geometry and is used for safety purposes, and it includes radius dimensions. The radius and length are the dimensions which interpret the round feature. The machining process includes end milling. The length of the part, its depth, and angle are the important dimensions considered in the chamfer feature, and end milling is the machining operation to produce it. Face features involve dimensions such as length, depth, and width. Face milling is the machining operation considered. Pocket and Slot feature considered length, depth, and width dimensions for pocket milling and slot milling, respectively. The prismatic blank shape is selected to machine all the basic features mentioned above. Table 1 illustrates the Ranges of tolerances and surface finish for various features, and it represents the machining sequence for each feature. The tolerances and surface finish values are referred from various Engineering handbooks and best manufacturing practices [24].

B. Network Topology
The network topology, which uses a feed-forward neural network, is shown in Figure 1. A two-layer feed-forward neural network is employed with hidden sigmoid neurons and linear output neurons, which matches dimensional mapping issues well, given consistent knowledge and enough neurons in its hidden layer. The detailed explanation of the selection of various Inputs and outputs for different prismatic features are discussed in the following section.

C. Selection of Input and Desired Outputs
The Inputs are selected in such a way that one neuron is allocated for each feature type. The values of Inputs are normalized using proper scaling factors, and it lies between 0 and 1. The input parameters selected for various prismatic features such as chamfer, fillet, face, rounded, hole, slot, step, face, and pocket are shown in table 1. In the inputs, the Tolerances ranges, surface finishes, and material requirements are common parameters for all the features.
Hole includes diameter and depth as input and outputs are operation sequences such as Drill, Drill-Rough Reaming, Drill-Rough Reaming-Finish Reaming, Drill-Rough Boring, and Drill-Rough Boring-Finish Boring. The machine operation sequence is given values between 0 and 1, 0 represents a particular sequence is not selected, and 1 represents a particular sequence is selected. An example of a training sample for the hole feature is shown below in Table  2.  The inputs selected are depth, length, width, blank size, and material type. Apart from this, tolerances ranges and surface finishes are taken as inputs and outputs would be their corresponding machine operation sequences like rough Milling, semi-finish milling, and finish milling. For example in a prismatic part with slot feature, for the length 50 mm, depth 15 mm, width 25 mm, Dimensional tolerance range IT 7 and surface finish range 50 µm the machining route selected is Rough Milling and for the same parameters for dimensional tolerance IT 3 and surface finish of 0.32 µm the process route selected by neural network would be Rough milling, semi finish milling and finish milling. In a similar way, the inputs and outputs of the various other features like step, face, pocket, chamfer, rounded, fillet, and boss are selected.

D. Training and Validation of Neural Networks:
The neurons are trained with the Levenberg-Marquidt backpropagation algorithm. Even though it needs more memory, this algorithm was found to be more effective. The Levenberg-Marquidt algorithmic program (LMA), additionally called the damped least-squares (DLS), the methodology provides a numerical answer to the matter of minimizing a perform, usually nonlinear, over an area of parameters of the function. These step-down issues arise, particularly in statistical procedure curve fitting and programming. The flowchart of the process planning based on LMBPNN is shown in Figure 2.

III. RESULTS AND DISCUSSION
Supervised learning is one in which both the input and output data are provided, the network processes the input data and compares with the required output data. Errors are propagated back through the system to adjust the weights which control the network. MATLAB 2018a software was used for training. The input vectors and target vectors were randomly divided 70 % of the data set were used for training, 15% for validating the networks and to stop training before overfitting, and the remaining 15% used as completely independent testing of network generalization. The training continued until the validation stopped. For each process, the input layers, output layers, and hidden layers are different for different features.

1) NN for slot feature:
The input, output, and hidden layer selected using MATLAB is shown in Figure 3. The slot features have nine inputs and three outputs. The training of the network was done by changing the number of hidden layers and performing many iterations. Around 172 training samples of various dimensions, dimensional accuracy, and tolerances ranges were selected as input. The best performance of the slot feature is shown in Figure 4, and the best architecture selected is 9-30-3 at epoch 9, as shown in Table4. 2) NN for Boss feature The Boss feature has eight inputs and three outputs, and the best validation network is found to be 8-10-3. The best performance curve is shown in Figure 5, which produces less error at epoch 57. The number of training patterns selected was 49.

3) NN for Hole:
The number of inputs selected for the hole feature is eight, and the output is 5. The best validation is shown in Figure 6. The best network for the hole was found to be 8-30-5. Around 129 training samples were chosen for training using various diameter values, dimensional tolerances, and surface finishes. The best performance for the hole feature was found to be at epoch 26.

4) NN for chamfer:
The chamfer feature training samples include nine inputs and three outputs. The number of training samples was 54, and the best performance was at epoch four as shown in Figure 7. The number of the hidden layer which gave the best performance was 20. The table shows the various experiments conducted and the bestselected one.

5) NN for pocket:
The training sample selected for the pocket feature was 202 with nine inputs and three outputs. The best validation curve shown in Figure 8 is achieved at epoch 13. The best structure for the pocket feature is 9-25-3.

6) NN for STEP:
The training sample selected was 165 for the step feature. The number of hidden layers selected was 20. The best performance was at epoch 43 as shown in Figure 9 7) NN for Face: The face feature network uses 9 inputs for training, and its outputs are 3. The best validation is at epoch 14, and as shown in Figure 10. The best selected hidden layer is 10.

8) NN for Fillet:
The neural network is trained with seven inputs and three outputs, and the best validation performance is achieved at epoch 18, and the best network was found to be 7-10-3. The performance graph is shown in Figure 11. 9) NN for Rounded: The rounded feature network was trained using 43 samples, each having eight inputs and three outputs. The best validation is achieved at epoch 11, as shown in Figure 12 with hidden layer 5. The number of hidden layers used for each feature is consolidated in Figure 13, which depicts that a total of nine features and the best-hidden layers for each network. Selecting the best process routes of the different part features is the most important activity in Computer-aided process planning systems. To improve the quality of the process planning neural network approach is used. An illustrative example is used to show the feasibility of the proposed method of selecting machining operations. A sample component with different prismatic features like chamfer, boss, pocket, face, slot, and hole was considered to check the working of the neural networks. The part has 12 features. The detailed dimensions details of the various machining features are shown in Figure 15. The various features, their dimensions, tolerance, and surface finishes are input to the best selected neural network and the process routes are automatically generated for the different features using the best selected neural network, as represented in table 5.  The networks of the various prismatic parts were created using Levenberg Marquidt algorithm and tested with sample components, and further, it's compared with Scaled Conjugate Gradient, and it was found that almost all the neural networks developed using LM algorithm had the best performance compared to them later.
The comparison analysis of these algorithms is shown in Figure 16, which indicates clearly that the mean square error values in LM method are much closer to zero than the SC.
Only the Chamfer neural network shows almost the same error values, or else other networks clearly show that LM method produces the least error than the scaled conjugated method. So the computer-aided process planning using these networks proved to produce a better process plan. LM algorithm has a few disadvantages; it is not applicable when the RMSE (Root Mean Square Error) is needed. LM algorithm does not work well with large data since it cannot handle a lot of memory space. Fig .16 Comparison of LM and SC neural network LM algorithm is best suited for training a few thousand and hundreds or fewer parameters, but many neural network types are present. In our research, nine neural networks were trained using a few hundreds of settings under each network. Figure 17 shows the MSE error produced by LM and SC method for the various number of hidden layers.
Artificial neural networks easily train a flexible CAPP. A prismatic component was analyzed, and proper machining operations have been identified, and the time taken to process the plan component is very less. Future work should focus more on selecting the sub-features of the prismatic features, which is not considered here. Further tool selection and parameter selection should be considered. An Intelligent feature recognition, Integrating CAD, CAPP, and CAM are the future interest.