Abstract
Due to increasing demand for high accuracy and high-quality surface finish in optical industry, contact lens manufacturing requires reliable models for predicting surface roughness (Ra) which plays a very important role in the optical manufacturing industry. In this study, a Nanoform 250 ultra-grind turning machine was used for machining, while cutting speed, feed rate, and the depth of cut (with values selected to cover a wide range based on the literature) were considered as the machining parameters for a diamond turned rigid polymethylmethacrylate (PMMA) contact lens polymer. Turning experiments were designed and conducted according to Box–Behnken design which is a response surface methodology technique. Fuzzy logic-based artificial intelligence method was employed to develop an electrostatic charge (ESC), Ra, and material removal rate (MRR) prediction models. The accuracy and predictive ability of the fuzzy logic model was then judged by considering an average percentage error between experimental values and fuzzy logic predictions. Further, a comparative evaluation of experiments and fuzzy logic approach showed that the average errors of ESC, Ra, and MRR using fuzzy logic system were in tandem with experimental results. Hence, the developed fuzzy logic rules can be effectively utilized to predict the ESC, Ra, and MRR of a rigid PMMA contact lens polymers in automated optical manufacturing environments for high accuracy and computational cost.
Introduction
Conventional/traditional methods of contact lens manufacturing include spin-casting, cast molding, and injection molding. 1 The manufacture of conventional contact lenses often begins with the creation of molds using precision lathe and proceeds to the generation of the optical surface via rough cutting, grinding, and polishing processes until the required optical quality is reached. 2 With the current production of lenses which involves moving parts from one process to another, unwanted pressure due to improper fixing of the parts, geometry deviation, inhomogeneous index distribution, birefringence, free-form fabrication, and problems originating from the nature of grinding and polishing can deteriorate the final quality of optical parts. 3 Modern contact lens manufacturing approach involves direct lathing of contact lens material in their un-hydrated state; as lens buttons. 4 In recent years, ultrahigh precision machining (UHPM) process using single-point diamond cutting is regarded in optical industries as an effective process for generating high-quality functional surfaces. 1 UHPM has therefore being classified as one of the state-of-the-art technologies that results in the formation of advanced optical surfaces (i.e. spherical, aspheric, and free forms) that are featured by their nanometric characteristics.
In UHPM, a natural diamond insert is used as a cutting tool to shape optical surfaces with deviation in accuracy from as low as 50 nm to surface finish in the range of few nanometers (less than 1 nm). 5 However, despite advances in UHPM, it is not always easy to achieve a high-quality surface finish. Lots of parameters such as machine tools, cutting tools, workpiece material, and machining process affect surface quality during turning. 6 Fabrication of high-quality optical surfaces still relies on the technical experience of machine operators, and the optimum cutting conditions are determined based on an expensive trial and error approach when machining new surface design. 6 Therefore, there is a need for the establishment of surface generation model for the prediction of the surface finish and the factors affecting surface roughness (Ra) in UHPM of contact lenses with single-point diamond turning (SPDT).
The precision optics industry is dependent on the production of high-quality surface optical profiles for use in various applications. 7 Due to the increasing demand for higher precision requirements in contact lens optical industry, Ra plays an important role in the UHPM with SPDT process. 7 This is because it affects the functional characteristics of products such as resisting fatigue, friction, tool wearing, light reflection, heat transmission, and lubrication. 8,9 Average Ra is the most common index for determining surface quality. 8 While Ra decreases, the product quality increases. 10 The Ra model has been developed by many researchers. Liman et al. 7 developed Ra model in ultrahigh precision turning of an rigid gas permeable (RGP) contact lens polymer considering cutting speed, feed rate, and depth of cut as the turning parameters and concluded that Ra improves with an increase in cutting speed. However, according to the Ra model developed by Ramesh et al. 11 which also considered cutting speed, feed, and depth of cut as cutting parameters, Ra was found to increase with increasing feed rate but decreased with increasing cutting speed and depth of cut. This disparity may have been due to different workpiece materials used by the respective authors.
In recent years, adaptive neuro-fuzzy inference system in artificial intelligence has been used for modeling and monitoring in manufacturing engineering. 8 Artificial intelligence techniques such as artificial neural network, 12,13 fuzzy logic, adaptive neuro-fuzzy inference system, 14 support vector regression, 15 and genetic algorithm 16 have played important roles in manufacturing as they are being used to develop the relationship between given input parameters and output responses in various manufacturing techniques. Among these schemes, fuzzy logic is easier to develop and possesses the ability to model a complex process containing uncertain and vague information with less hardware and software resources. 8,17 A fuzzy logic controller is the successful application of fuzzy set theory. It was introduced by Zadeh in 1965 as an extension of the set theory and involves the replacement of the characteristic function of a set by a membership function (MF) whose value ranges from 0 to 1. 18
Many researchers have used fuzzy logic-based reasoning for modeling the manufacturing process parameters. Hashmi et al. 19 developed a model based on fuzzy logic to study the relationship between the workpiece material hardness and drilling speed for proper selection of cutting speed in a single-point turning operation. Accordingly, Yilmaz et al. 20 used a user-friendly fuzzy-based system for the selection of electro-discharge machining process parameters. In a study by Arghavani et al., 21 fuzzy logic approach was used for selecting gaskets in sealing performance. Lin et al. 22 also used a new fuzzy logic approach to determine the best combination of mobile phone form elements for matching a given product image. In Yue Jiao et al.’s 23 work, fuzzy adaptive network was used in machining process modeling for Ra prediction in turning operations. Ramesh et al. 24 used fuzzy logic for the prediction of tool flank wear, Ra, and specific cutting pressure in machining of titanium alloy, and recently, Jiao et al. 23 used fuzzy adaptive networks in machining process modeling for Ra prediction in turning operations.
To the best of the author’s knowledge, no work has been reported on intelligent modeling of Ra, electrostatic charge (ESC), and material removal rate (MRR) in ultrahigh precision diamond turning of a rigid polymethylmethacrylate (PMMA) contact lens polymer using fuzzy logic approach, and it is the goal of the present study to fulfill this gap in the research literature. In this study, a fuzzy logic rule-based expert system is presented to predict the Ra, ESC, and MRR of PMMA contact lens polymer turning. The experiments were conducted as per response surface methodology (RSM)-based Box–Behnken design (BBD). The fuzzy model included cutting speed, feed rate, and depth of cut as turning parameters, and Ra, ESC, and MRR were considered as response parameters.
Experimental procedure
In this study, the experimentation tests were carried out on the Precitech® (Keene, USA) Nanoform Ultragrind 250 ultrahigh precision lathe using monocrystalline diamond cutting tool as shown in Figure 1. The workpiece used in this experiment is a rigid PMMA contact lens polymer. The contact lens button dimensions are 17.0 mm diameter and 4.40 mm thick. The buttons were block-mounted unto a copper arbor for machining using low-temperature optical wax. 25 The experimental tests were performed under dry cutting conditions. Experiments were planned and conducted according to BBD-based RSM using Design-Expert 7 software considering three machining parameters (i.e. cutting speed, feed rate, and depth of cut) as shown in Table 1. The Ra was measured and recorded after each pass using Taylor Hobson PGI Dimension XL surface profilometer (Figure 2).

Nanoform® 250 ultra-grind precision diamond turning lath.
Turning parameters used for the experiments.

Surface roughness measurement of PMMA contact lens button with Taylor Hopson optical profiler.
In this experimental study, observations on the influence of turning parameters on Ra, ESC, and MRR of machined PMMA contact lens polymer were presented. The lowest and the highest values of Ra obtained when machining of rigid PMMA contact lens polymer using Taylor Hopson PGI profilometer are 1.7 nm and 83.7 nm, respectively (Table 2). The nature of peaks and valleys for the cutting conditions of speed = 4000 r/min, feed = 12 mm/min, and depth = 25 µm corresponding to 1.7 nm roughness values and that of cutting speed = 200 r/min, feed rate = 12 mm/min, and depth of cut = 25 µm corresponding to 83.7 nm are shown in Figures 3 and 4, respectively.
Machining parameters and experimental results.
Ra: surface roughness; ESC: electrostatic charge; MRR: material removal rate.

Surface profile chart for 1.7-nm surface roughness.

Surface profile chart for 83.7-nm surface roughness.
The ESCs are encountered by a cutting tool when turning advanced contact lenses are important as they reflect the quality and condition of the tool, machine, fixture, and sometimes even the finished surface. The use of electrostatic sensor is critical and allows for easy monitoring of the cutting process. The ESCs on the polymeric contact lens material were measured using an SMC IZD10 electrostatic sensor and ESD monitor configuration. The ESC profile obtained at two different turning parameters in SPDT of PMMA contact lens polymer is as shown in Figures 5 and 6. The IZD10 electrostatic sensor has a measuring range of ±20kV and is connected to an electrostatic monitor which provides a scaled output. A PC using National Instruments’ (NI) LabView 2016 software integrated with NI PXleI-1071 chassis data acquisition system was used to monitor and acquire the ESC data during PMMA contact lens polymer turning. The measured and recorded ESCs signals are as shown in Figures 5 and 6. Average values of ESCs were determined based on the values of start and finish when statics were stable during turning processes. The MRR was then calculated using equation (1) 26 –28

Typical more electrostatic charge generation than figure 6.

Typical electrostatic charge obtained.
where MRR is the material removal rate (mm3/min), v is the cutting speed (m/s), f is the feed rate (µm/rev), and d is the depth of cut (µm). Different machining parameter combinations with their corresponding experimental results for MRR and Ra are presented in Table 2.
Fuzzy rule-based modeling of cutting parameters
Fuzzy logic is one of the important mathematical modeling-based artificial intelligence techniques that can be used to solve complex problems using linguistic terms. 17,29 –31 In fuzzy system, model is in the form of “IF–THEN” rules instead of a mathematical equation. The fuzzy logic decision-making unit is composed of five functional blocks 32,33 and is illustrated in Figure 7. A fuzzy system is composed of a fuzzifier, which is used to generate fuzzy sets by converting the crisp inputs through selected MFs; an inference engine, which is used to generate fuzzy values based on defined rules; and a defuzzifier, which is used to convert fuzzy values into crisp outputs. 17,31 In this study, cutting speed, feed rate, and depth of cut were considered as input parameters, while ESC, Ra, and MRR were considered as the output parameters (Figure 8). In the fuzzy logic, the ranges of parameters are firstly identified. Minimum and maximum values of input/output parameters used in this study were presented in Table 3. The input and output values giving minimum and maximum numeric values, the experimental results, and linguistic terms used for experimental conditions are presented in Table 4.


Model for Ra, ESC, and MRR based on FIS.
Minimum and maximum value for input/output parameters to FLM.
FLM: fuzzy logic modeling.
Experimental conditions, results, and linguistic form used.a
Ra: surface roughness; ESC: electrostatic charge; MRR: material removal rate; L: low; M: medium; H: high; VL: very low; VH: very high.
aThe linguistic variables L, M, and H were used for input parameters and VL, L, M, H, and VH for output parameter.
Appropriate shapes of MFs for developing the algorithm to select the process parameters were chosen. The MFs define functional overlap between inputs and ultimately determine the output responses. 34 There are various MFs available such as triangular, trapezoidal, and Gaussian for assessment in fuzzy logic. For this study, triangular MF was selected due to its computational efficiency and its wide usage in the real-time implementations. 17,35,36 Fuzzy expressions for input variables (cutting speed, feed rate, and depth of cut) and output responses (Ra, ESC, and MRR) were divided into three and five sets ranging from low to high using triangular MFs. The triangular-shaped MF for a given input is described as follows 17,37,38
where x is a variable and a, b, c indicates triangular fuzzy triplet. The input and output parameters were converted to linguistic variables, fuzzy linguistic terms, and MFs. The linguistic variables low (L), medium (M), and high (H) were used for input parameters and very low (VL), low (L), medium (M), high (H), and very high (VH) for output parameters. MFs considered for cutting speed, feed rate, and depth of cut are depicted, respectively, in Figures 9 to 11. MFs of Ra, ESC, and MRR are shown in Figure 12 with Ra output ranging from 1.7 nm to 83.7 nm, respectively.

Membership function of cutting speed.

Membership function of feed rate.

Membership function of depth of cut.

Membership function of surface roughness.
Since MFs and rules are designed to obtain desired output responses, 15 “IF–THEN” conditional rules were formulated for attaining required Ra using MATLAB 9.2.0 fuzzy logic toolbox. The centroid defuzzification method was employed to determine the fuzzy crisp outputs using the following relationship (equation (3)) 17,39
where yo is the defuzzified output of response variable (i.e. Ra) and yj is the center value of the regions (i.e. output variable). Mamdani maximum–minimum approach was used as an inference engine to examine the behavior of the system.
Few examples of the fuzzy rules are shown in Figure 13. The linguistic forms are:

Mamdani-type rule editor.
Rule 1. If (Cutting speed is L) and (Feed rate is L) and (Depth of cut is M) then (Ra is M) (ESC is M) (MRR is L). Rule 2. If (Cutting speed is H) and (Feed rate is L) and (Depth of cut is M) then (Ra M) (ESC is H) (MRR is L). Rule 3. If (Cutting speed is L) and (Feed rate is H) and (Depth of cut is M) then (Ra is VH) (ESC is VH) (MRR is H).
---------- Rule 15. If (Cutting speed is M) and (Feed rate is M) and (Depth of cut is M) then (Ra is L) (ESC is M) (MRR is M).
Graphical presentation of the fuzzy logic reasoning procedure for PMMA contact lens polymer machining results of BBD of 15 experiments using the MATLAB 9.2.0 software is shown in Figure 14, in which rows represent the 15 rules and columns are the three inputs/three outputs variables. The locations of triangles indicate the determined fuzzy sets for each input/output value. The height of the darkened area in each triangle corresponds to the fuzzy membership value for that fuzzy set.

Fuzzy logic rules viewer for Ra, ESC, and MRR.
Through exhibiting fuzzy logic procedure, the rule viewer was used for determining each predicted output (Ra, ESC, and MRR). For example, by considering the fourth experiment number. The prediction of Ra, ESC, and MRR through the rule viewer is depicted in Figure 14. Consequently, 1.7 nm Ra, 0.0377 kV ESC, and 14.9 mm3/min MRR were obtained for the inputs of cutting speed 4000 r/min, feed rate of 12 mm/min, and depth of cut 25 µm as illustrated in Figure 14.
Figure 15 shows the 3-D surface profile obtained during fuzzy logic modeling for the effect of turning parameters, cutting speed, and feed rate on Ra.

3-D interaction effect of cutting speed and feed rate on surface roughness.
Figure 15 shows the interaction effect of cutting speed and feed rate on Ra of an RGP contact lens polymer turning. It is evident from the plot that Ra increased with an increase in feed rate, while roughness decreased with an increase in cutting speed. From this figure, it can be observed that low feed rate ranging from 2 mm/min to 6 mm/min improved the Ra. Also, increase in cutting speed ranging from 1500 r/min to 2500 r/min affected the quality of the machined surface. The effects of speed and feed on Ra of rigid contact lens polymer are clearly depicted in Figures 16 and 17, respectively.

Variation of surface roughness with cutting speed.

Variation of surface roughness with feed rate.
It can also be seen that the roughness improves with increase in cutting speed (Figure 16). It can be observed that Ra improved with increase in cutting speed at medium feed and depth. 40 This indicates that high cutting speed improves the surface quality of the machined PMMA contact lens polymer. 40 The results are, however, in agreement with the results of Liman et al, 7 Smith, 41 and Gubbels 42 regarding the increase of surface quality with increasing cutting speed.
Figure 17 shows the distribution of Ra with varying feed rate from 2 µm/rev to 12 µm/rev. Judging from the plot, low feed rate gives better Ra, an increase in feed rate slightly reduced the quality of the surface. This result is in agreement with the results of Gubbels who also iterated that increase in feed rate diminishes the surface quality. Figure 18 illustrates the variation of Ra with depth of cut, while Figures 19 and 20 show the 3-D surface profile obtained during fuzzy logic modeling for the effect of process parameters (i.e. cutting speed, feed rate, and depth of cut) on Ra.

Variation of surface roughness with depth of cut.

3-D interaction effect of cutting speed and depth of cut on surface roughness.

3-D interaction effect of feed rate and depth of cut on surface roughness.
From Figure 19, it can be observed that high cutting speed and medium depth of cut improve the Ra, while increase in depth of cut has significant influence on the Ra. Looking at Figure 20, it can be observed that the depth of cut has little effect on the achieved Ra, although an exception seems to be noticed between 20 µm and 30 µm depth of cut. In general, it can be said that a change in depth of cut in the range 20−30 µm and feed rate 6–8 mm/min cannot be used as a parameter for increasing surface quality of a precision turned polymer workpiece. According to the observable features in the 3-D interactive profile plots of cutting parameters on ESC and MRR as depicted in Figures 21 to 26, low speed and feed give low ESC than higher values of the two factors while with MRR, speed above 2000 r/min is also favorable. Other interactive effects are displayed in Figures 21 to 26.

3-D interaction effect of cutting speed and feed rate on ESC.

3-D interaction effect of cutting speed and depth on ESC.

3-D interaction effect of depth and feed rate on ESC.

3-D interaction effect of depth and feed rate on MRR.

3-D interaction effect of speed and feed rate on MRR.

3-D interaction effect of depth and speed on MRR.
The calculated percentage errors between fuzzy logic-based predicted and experimental Ra, ESC, and MRR values for each experimental design are calculated as follows 43
Comparison between experimental and predicted fuzzy-based expert system is carried out and shown in Table 5 and Figures 27 to 29. It was observed from Table 5 and Figures 27 to 29 that good correlation exists between the experimental and the predicted fuzzy values, additionally, average errors of Ra, ESC, and MRR were found to be very minimal and of 1.4953%, 1.784%, and 5.809% values. Hence, the proposed results showed that Mamdani-based fuzzy logic model provided accurate prediction of Ra, ESC, and MRR. The results of the fuzzy logic-based model indicated its robustness and accuracy in estimating the values of Ra when diamond turning PMMA contact lens polymers.
Experimental and fuzzy predicted values of surface roughness, electrostatic charge, and material removal rate.a
Ra: surface roughness; ESC: electrostatic charge; MRR: material removal rate.
aAverage %Error: Ra = 1.4953, ESC = 1.784, MRR = 5.809.

Comparison of experimental and fuzzy predicted values for Ra.

Comparison of experimental and fuzzy predicted values for ESC.

Comparison of experimental and fuzzy predicted values for MRR.
Conclusion
In this study, Mamdani-based fuzzy logic modeling was developed for predicting Ra in diamond turning of PMMA contact lens polymers. Experiments were designed and conducted using RSM-based BBD methodology by varying turning parameters, that is, cutting speed, feed rate, and depth of cut. From the analysis, the predicted fuzzy modeling outputs, which were validated with experimental data, are highly satisfactory with an average prediction error of 1.4953% for Ra, 1.784% for ESC, and 5.809% for MRR. The result indicated that the proposed fuzzy logic model can be effectively utilized to predict the Ra, ESC, and MRR performance characteristics in diamond turning of a rigid PMMA contact lens polymers. This result explained that Ra increased with increase in feed rate, while roughness decreased with increase in cutting speed. From this study, it can be observed that low feed rate ranging from 2 mm/min to 6 mm/min improved the Ra. Likewise, increase in cutting speed ranging from 1500 r/min to 2500 r/min affected the quality of the machined contact lens polymer surface. It can be observed that high cutting speed and medium depth of cut improve the Ra. It can be observed that the depth of cut has little effect on the achieved Ra, although an exception seems to be noticed between 20 µm and 30 µm depth of cut. In general, it can be said that a change in depth of cut in the range 20−30 µm and feed rate 6-8 mm/min cannot be used as a parameter for increasing surface quality of a precision turned polymer workpiece.
Footnotes
Acknowledgements
We would like to acknowledge the National Research Foundation (NRF) of South Africa and the Research Capacity Development of Nelson Mandela University for their financial support.
Funding
The author(s) disclosed receipt of the following financial supportfor the research, authorship, and/or publication of thisarticle: The author received financial support from Research Capacity Development of Nelson Mandela University (216651263).
