**1. Introduction**

With a wide range of applications, plastics comprise a large and varied group of materials, essentially processed using heat and pressure. Injection molding is the leading plastic transformation process, and it is the most technical and the most widespread. It is used for mass production and has a high production rate of items, with tight tolerances and with little or no need for finishing operations [1]. The surface quality of the molded parts is incomparably superior to that of other competing technologies [2]. The injection-molding process requires an injection machine and a specially manufactured mold that defines the geometry of the final product. Despite having similar elements and structures, mold production is individual, which makes the mold-making industry project-driven. One of the primary sources of risk in managing these projects is the inaccurate prediction of manufacturing costs of the mold, which is usually produced using machining services and can influence, for example, up to 45% of a molded automotive part's price [3].

Machining processes are some of the most relevant processes in the industry. The requirements of some parts, such as injection molds, are only fulfilled using these processes, which makes them irreplaceable [4,5]. Due to their complexity and popularity,

**Citation:** Rodrigues, A.; Silva, F.J.G.; Sousa, V.F.C.; Pinto, A.G.; Ferreira, L.P.; Pereira, T. Using an Artificial Neural Network Approach to Predict Machining Time. *Metals* **2022**, *12*, 1709. https://doi.org/10.3390/ met12101709

Academic Editors: Jorge Salguero and Sergey Konovalov

Received: 4 August 2022 Accepted: 7 October 2022 Published: 12 October 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

many studies aim to understand and improve the different variables involved, not only in traditional but also in modern machining processes [6]. In recent years, part of the evolution of these processes is due, above all, to the progress registered in the performance of cutting tools, with the creation and implementation of coatings suited to different and challenging conditions [7,8]. Thereby, performance studies typically focus on the behavior of these coatings on difficult-to-machine materials [9,10]. All this research aims to identify the best cutting conditions for each situation, vibration being one of the main concerns among users [11]. The analysis of the cutting forces developed throughout the process can make a solid contribution to its stabilization and consequent efficiency [12]. Choosing the appropriate cutting parameters also safeguards the cutting operation and reduces process costs and energy consumption [13]. Some proposed models allow a 7.89% reduction in energy consumption [14] and seek to help operators balance energy consumption and processing costs at the same time [15]. Still, some surveys carried out by both manufacturers and end mill users reveal that the quality and process time is more relevant than energy savings [11], which is shown by some studies that prove that the decrease of processing time has more potential to increase energy efficiency than decreasing the process load [16]. The selection of the right machining strategy and cutting tool also plays a vital role in reducing cutting times, as well as the final cost and quality of the process [17]. Some authors seek to improve the calculation of some common cutting strategies, achieving a reduction in cutting forces and longer tool life [18] or reducing machining time by more than 55% [19]. Other approaches have shown that the sequence of cutting tools used can influence the amount of energy consumed and the cost of the process [20], and that the correct planning of operations allows for the reduction of errors, setup times, and non-productivity times [21]. The machining strategy used also influences the roughness and quality of the surface produced [22,23], as well as the wear of the cutting tools [24]. Trying to cool and lubricate the cutting contact area, the cutting fluids also optimize the performance of the cutting tools and, consequently, the entire process [25]. However, the use of conventional cutting fluids has proved to be a threat to the environment and the health of operators. Therefore, the use of solid lubricants has been the subject of several studies, proving to be an economic and ecological alternative in addition to offering better material removal rates and surface quality [26], as well as increased tool life [27]. Cryogenic cutting has also been analyzed, which leads to a reduction in tool wear, energy consumption, surface roughness, machining costs, and carbon emissions [28]. Both solid lubricants and cryogenic cutting have proved to be better alternatives to traditional machining processes. Often neglected, the part clamping system also plays a critical role in machining processes, guaranteeing easy operation to reduce setup time and the number of assemblies while ensuring the quality of the cutting process [4]. Some studies increased the number of parts machined per day by 32% [29] and reduced the machining time by applying suitable modular jigs [30].

All these variables make the machining process complex and difficult to budget, which is one of the main difficulties of machining services. It is common practice to set an hourly cost for the service and to determine the cost of manufacturing a part as a function of its machining time. Machining times, in turn, are commonly determined either through calculation or through human analysis. In the first case, CAM software simulates the operative sequences and the time needed to manufacture the part. In the second, the machining time is defined by a human evaluator based on a visual analysis of the part and their experience in this type of task. The first method is more accurate but requires more time to calculate machining time. The second one is faster but, as it depends on human analysis, it is less accurate, which can lead to underestimation of budgeting, resulting in losses for the company, or overestimation of budgeting, which will drive away potential customers. Thus, different studies have been developed to improve the cost estimation operation related to injection molds, with some methods showing high accuracy in applying cost drivers to estimate the cost of the manufacturing phases of the mold [31], while other authors proposed an analytic approach to determine the cutting time [32]. Other research focuses on calculating the machining cost according to cutting speed [33].

With a broad spectrum of applications in the industrial world, artificial neural networks (ANN) are mathematical models that, inspired by the functioning of the human brain, seek to understand complex relationships existing in each set of data. Therefore, some studies aim to assist in estimating manufacturing costs for different components [34,35] and to optimize the injection mold manufacturing process by implementing ANN [36,37]. The application of ANN in improving the performance of the machining process has also been studied [38,39], making it possible to predict machined surface roughness [40] and production quality [41], cutting tool wear [42], and cutting forces [43,44], as well as other computational approaches [45]. Regarding cutting tool condition monitoring, this is a very useful manner to evaluate the process's overall stability and productivity [46], contributing to overall process improvement and a reduction in the production costs. There are various opportunities to implement ANN and other computational methods for machining tool monitoring [47], either for milling or for turning [48], contributing to an improvement of these processes, particularly regarding fewer tool exchanges and quality improvements of machined parts [49]. Some authors proposed artificial neural networks for feature recognition [50] to further establish relationships between the number of features and the cost of the part [51]. Other authors presented models using ANN to estimate machining time with average errors of 10.20 min [52] or to estimate injection mold manufacturing time with a percentage error of less than 25% [53]. Artificial intelligence tools to estimate manufacturing costs in the design phase have also been studied [54] as the effectiveness of different types of ANN in estimating machining times [55].

As seen from the studies presented in the previous paragraph, the use of ANNs can be quite useful in predicting the cost of manufacturing a certain part. However, there are some constraints regarding the use of this approach, with some approaches showing high degrees of error or deviation [53]. Despite this, there is potential for application of these ANNs in predicting these costs and thus in aiding budgeting operations for machining services. Thus, the budgeting process is time-consuming, prone to mistakes, and heavily dependent on previously acquired empirical knowledge. It is known that the machining time, especially for mold machining operations, is the most impactful parameter on the overall cost of the tool. Given this, by predicting the machining time, a somewhat accurate prediction of the final part's cost can be made. In the present paper, a methodology for using an ANN to predict machining times for standard injection mold parts is presented by choosing and comparing different architectures, input data, and training variables, and thus finding the most accurate way of predicting machining times. The implementation of this ANN was compared to the previously employed method, in which the time is determined through careful modelling and simulation of the part. This is an expensive and time-consuming way of cost-estimating the machined parts. By employing the ANN presented in this work, companies should have a fast and accurate way of predicting the machining times of their produced parts.

## **2. Methods**

The present work aims at creating an artificial neural network (ANN) mode that allows the machining time of standard plastic injection mold parts to be estimated in a quick and effective way. For this purpose, it was considered that these parts usually present groups of similar features, which only diverge in dimensions, such as metric threads, clearance holes, fitting holes, rectangular and circular pockets, among others. Thus, the proposed solution consists of an ANN whose input variables are (see Figure 1):


**Figure 1.** Diagram of the input variables of the proposed solution.
