Investigation of the effect of machining parameters on the surface quality of machined brass (60/40) in CNC end milling—ANFIS modeling

Brass and brass alloys are widely employed industrial materials because of their excellent characteristics such as high corrosion resistance, non-magnetism, and good machinability. Surface quality plays a very important role in the performance of milled products, as good surface quality can significantly improve fatigue strength, corrosion resistance, or creep life. Surface roughness (Ra) is one of the most important factors for evaluating surface quality during the finishing process. The quality of surface affects the functional characteristics of the workpiece, including fatigue, corrosion, fracture resistance, and surface friction. Furthermore, surface roughness is among the most critical constraints in cutting parameter selection in manufacturing process planning. In this paper, the adaptive neuro-fuzzy inference system (ANFIS) was used to predict the surface roughness in computer numerical control (CNC) end milling. Spindle speed, feed rate, and depth of cut were the predictor variables. Experimental validation runs were conducted to validate the ANFIS model. The predicted surface roughness was compared with measured data, and the maximum prediction error for surface roughness was 6.25 %, while the average prediction error was 2.75 %.


Introduction
Brass is one of the first two metals most widely used by humans, copper and its alloy (brass) and gold [1]. Brass is specified because of the unique combination of properties, it is stronger and harder than copper, easy to form into various shapes, a good conductor of heat, and is generally resistant to corrosion from salt water. Owing to these properties, brass is usually a first-choice material for many components in equipment made in general. In the electrical and precision engineering industries, brass is also used to make pipes and tubes, weather stripping, and other architectural trim pieces, screws, radiators, musical instruments, and cartridge casting for firearms [2].
In the milling process, surface roughness plays a vital role in how products perform, and it is also a factor with great influence on manufacturing cost. It describes the geometry of the machined surface, and combined with surface texture, it can play an important role on the operational characteristics of the part (e.g., fatigue, corrosion, fracture resistance, and surface friction). To achieve a desirable surface quality value, the part must be machined more than once. Therefore, the desired surface finish is usually specified, and appropriate processes are selected to attain the required quality [3].
To achieve a desired surface finish, a good predictive model is required for stable machining. The number of surface roughness prediction models available in literature is very limited [4]. Most surface quality prediction models are empirical and generally based on laboratory experiments. In addition, it is practically very difficult to control all factors as required to obtain reproducible results [5,6].
Actual surface roughness monitoring can be accomplished either by intensive post-process inspection, an in-process surface roughness measuring device, or a surface roughness prediction system. Although post-process inspection is the easiest to implement, it cannot prevent the parts from being processed before a defective batch is discovered. In-process measurement of surface roughness requires adding sensitive sensors to a hostile environment. Ultimately, the surface roughness prediction system can be used to determine the surface roughness indirectly [7][8][9].
The criterion variable is surface roughness and the predictor variables are controllable machining parameters, such as spindle speed, feed rate, and depth of cut and their interactions. These techniques were used in turning [17,18], milling [19,20], and drilling processes [21,22].
ANFIS is a fuzzy inference system implemented in the framework of an adaptive neural network. By using a hybrid learning procedure, ANFIS can be used to construct an inputoutput mapping based on human knowledge as fuzzy if-then rules as well as predetermined input-output data pairs for neural network training. It provides a means for fuzzy modeling to learn information about the data set in order to compute the membership function parameters that best allow the associated fuzzy inference system to track the given input-output data [23,24].
Recently, ANFIS has been applied to predict workpiece surface roughness in end-milling operation, yielding accuracy as high as 96 % [25] and average error up to 0.522 % [26]. It has also been used to predict surface roughness in turning operation, producing average error up to 0.38 % [27]. Lee et al. [28] employed ANFIS to establish the relationship between actual surface roughness and texture features of the surface image. Accurate surface roughness modeling can facilitate the effective estimation of surface roughness. The input parameters of a training model are spatial frequency, arithmetic mean value, and standard deviation of gray levels from the surface image, without involving cutting parameters (cutting speed, feed rate, and depth of cut). Experiments demonstrate the validity and effectiveness of fuzzy neural networks for modeling and estimating surface roughness. Empirical results also show that the proposed ANFIS-based method outperforms the existing polynomial-network-based method in terms of training and test accuracy of surface roughness. Hence, the aim of this work is to obtain optimal milling parameters (cutting speed, feed rate, and depth of cut) for minimal surface roughness while milling brass (60/40). ANFIS modeling is used to accomplish this objective.

Experimental setup
Surface roughness is the dependent variable, while cutting speed (n) in the range of 750-1,750 rpm, feed rate (f) ranging from 50 to 250 mm/min, and depth of cut (t) in the range of 0.3-0.7 mm were used as predictor variables, which were selected based on the tool manufacturer's recommendations ( Table 1).
The experiments were performed using a ProLight2000 computer numerical control (CNC) end-milling machine. A high-speed steel four-flute end-milling cutter with a diameter of 7/16 in. (11.1 mm) was used for dry machining slots of brass (60/40) blocks under specific machining conditions (speed, feed, and depth of cut), as shown in Fig. 1. Brass (60/40) with Vickers hardness of 125 and a chemical composition of 60 % copper and 40 % zinc served as a workpiece material with 40×40×20 mm dimensions (Fig. 1). The surface roughness Ra (μm) was measured with a stylus-based profilometer (Surtronic 3+, 99 % accuracy).

Experimental results
A slot-milling test was carried out using the proposed experimental setup to investigate the surface quality. The average surface roughness Ra was calculated for three different measurements under the same conditions with a sampling length

ANFIS prediction model
The ANFIS architecture is shown in Fig. 2. Five network layers were used by ANFIS to perform the following fuzzy inference steps: (1) input fuzzification, (2) fuzzy set database construction, (3) fuzzy rule base construction, (4) decisionmaking, and (5) output defuzzification. ANFIS was constructed through MATLAB, and 75 readings comprised the training data set as listed in Table 1.
Different membership functions were used in training ANFIS to predict surface roughness. The generalized bell membership function (gbellmf) gives the lowest training error, so it was adopted for the ANFIS training process in this study. The fuzzy rule architecture of ANFIS when gbellmf is adopted consists of 27 fuzzy rules generated from the input-output data set based on the Sugeno fuzzy model [29][30][31]. During training, the 75 Ra values (training data set) were used to conduct 300 cycles of learning with an average error of 0.10.
The membership functions of every input parameter within the architecture can be divided into three areas, i.e., small (S), medium (M), and large (L). Figure 3 shows the initial and final membership functions of the three end-milling parameters derived from training via gbellmf.
In Fig. 3a, b, the initial and final membership functions of speed only undergo minor changes in the medium and large areas, and major changes in the small area. Figure 3c, d illustrates the initial and final membership functions of the feed rate. It appears that the final membership function after training experiences smaller variation in the small and large areas but slightly greater variation in the medium area. Figure 3e, f shows the initial and final membership functions of the depth of cut. There is obviously a small change in the final membership function's shape after training, regardless of area size. The large changes in the small area in Fig. 3b indicate that the lower speed value has greater effect on surface roughness than the medium and large values. The minor changes in the small, medium, and large areas in Fig. 3d indicate that all ranges of feed rate and depth of cut have the same effect on surface roughness. Also, Fig. 3 shows that among the three endmilling parameters studied, speed had the greatest impact on surface roughness, followed by feed rate, and finally depth of cut, which was the least significant factor of all.
According to Fig. 4a, b, speed and feed rates had considerable effect on surface roughness, while an increase in speed led to a decrease in surface roughness and an increase in feed rate resulted in an increase in surface roughness, but depth of cut had a minor effect on surface roughness. Lower depth of cut and feed rate values are recommended for smaller surface That is because the combination of feed rate and depth of cut determines the undeformed chip section and hence the amount of cutting forces required to remove a specified volume of material. By decreasing the feed rate and depth of cut, less material has to be cut per tooth per revolution; thus, the energy required is lower. Consequently, this would reduce the cutting forces, leading to lower surface roughness, while the high depth of cut and feed rate would lead to a contact overload between the cutting tool and the workpiece, which would cause inferior surface quality. On the other hand, the effect of cutting speed should also be taken into consideration. The results of cutting speed are shown in Fig. 4a, and they suggest that higher spindle speed would result in lower surface roughness. This could be explained in terms of the chip formation process, which is influenced by the shear given as ls=t/sin φ, where t is undeformed chip thickness, and φ is the shear angle [32]. Shear angle (φ) is large at high cutting speeds; therefore, the shear length (ls) is small, as shown in Fig. 5 [33]. As a result, the chip will break away with less material deformation at the tool tip, which will in turn preserve the machined surface properties leading to less edge chipping.

Model verification
Twenty-five random readings were used as the testing data set ( Table 2). The plot of 25 measured Ra values versus predicted Ra using the ANFIS model is shown in Fig. 6. This figure presents a comparison of the measured Ra and predicted Ra of the testing data set of 25 following training using ANFIS. Appropriate assent is evident between the measured and ANFIS-predicted surface roughness values. This close assent obviously displays that the ANFIS model can be used to predict the surface roughness under consideration. Thus, the proposed ANFIS model offers a promising solution to predicting roughness values in the specific range of parameters. Table 2 and Fig. 6 show a big difference in surface roughness from 625 to 875 rpm and small change between 875 and 1,375 rpm. There is also a big difference in surface roughness   (1) and (2), respectively, were used.
where E i is the percentage error of sample number i; Ra i is the measured Ra of sample number i; b Ra i is the predicted Ra generated by the ANFIS model; i=1,2,3,…; m is the sample number; and E av is the average percentage error of m sample data. Table 2 and Fig. 7 show that the average percentage error for surface roughness prediction is 2.75 %. Figure 7 presents the percentage error between the predicted and measured Ra. The highest percentage of error for ANFIS model prediction is 6.25 %. The low error level signifies that the surface roughness results predicted by ANFIS are very close to the actual experimental results. The error and accuracy values mean that the proposed model can predict surface roughness satisfactorily.

Conclusion
ANFIS was used to develop an empirical model for predicting the surface roughness of machined brass in CNC end milling. Spindle speed, feed rate, and depth of cut were used as predictor variables. Seventy-five measured Ra values, under different cutting conditions, comprised the training data set, and 25 random values were used as the testing data set. The model was verified with test data, and the average percentage accuracy achieved was 97.25 %. These results indicate that the ANFIS model with gbellmf is accurate and can be used to predict surface roughness in end-milling operation.