An interpretable machine learning based approach for process to areal surface metrology informatics

Surface metrology parameters represent an important class of design variables, which can be controlled because they represent the DNA or fingerprint of the whole manufacturing chain as well as form important predictors of the manufactured component’s function(s). Existing approaches of analysing these parameters are applicable to only a small subset of the parameters and, as such, tend to provide a narrow characterisation of the manufacturing environment.This paper presents a new machine learning approach for modelling the surface metrology parameters of the manufactured components. Such a modelling approach can allow one to understand better and, as a result, control the manufacturing process so that the desired surface property can be achieved whilst manipulating the process conditions. The newly proposed approach utilises a fuzzy logic based-learning algorithm to map the extracted process features to the areal surface metrology parameters. It is fully transparent since it employs IF...THEN statements to describe the relationships between the input space (in-process monitoring variables) and the output space (areal surface metrology parameters). Furthermore, the algorithm includes a ridge penalty based mechanism that allows the learning to be accurate while avoiding over-fitting. This new machine-learning framework was tested on a real-life industrial case-study where it is required to predict the areal parameters of a manufacturing (machining) process from in-process data. Specifically, the case study involves a full factorial experimental design to manufacture seventeen (17) steel bearing housing parts which are fabricated from heat-treated EN24 steel bars. Validation results showed the ability of this new framework not only to predict accurately but also to generalise across different types of areal surface metrology parameters.


Introduction
Surface metrology, defined as the science of measurement of small-scale characteristics (such as amplitude, spacing and shape of features) in manufactured parts [1], forms an important part of the manufacturing processes for two main reasons. The first relates to the fact that surface metrology can be thought of as the fingerprint of the whole manufacturing chain. This fact can be used for control of the manufacturing process [2,3]. The second reason is that surface metrology can directly correlate with the manufactured components function. Such information is useful for quality assessment and function prediction. Predicting the quality or how a manufactured component will function is particularly valuable in helping to meet today's ever tighter budgetary and time constraints as well as the drive for right-first-time production of materials [4]. Indeed, a mechanism for controlling the surface metrology parameters can represent a valuable asset as evidenced by the plethora of research studies which have sought to design algorithms for this purpose [1,5,6]. However, before such a control can take place, a mapping from the process conditions to the surface metrology variables must be found. Such a mapping has formed the topic of many research studies for several decades as will be discussed in the next section. The majority of these research studies focus on very simple mappings typically involving the creation of a limited list of input features from the process data. A data model is then found to map these features to selected surface metrology parameters (usually profile parameters). One notable example is the prediction of the surface roughness heights (Ra) from process conditions [5][6][7]. It should be noted, however, that these existing studies have mainly focussed on predicting the profile parameters and the application of modelling algorithms for predicting areal parameters which are arguably more important is limited [8]. The areal parameters provide a characterisation for the full 3D surface of the manufactured part and have been shown to be more descriptive of the surface as well as being better related to its function [8]. Therefore, mappings from process conditions to areal parameters can provide better value for the manufacturing process. This research study will therefore mainly focus on the modelling of the areal surface metrology parameters. Existing research studies also typically focus on very small subsets of areal parameters whilst neglecting the others. They also tend to derive coarse scale features extracted from the process data [9,10]. However, as discussed in [5], many areal surface metrology variables can correspond to a particular function and as such it is often imperative that these areal parameters be combined in a systematic way for function prediction. The surface metrology variables can vary in a very different and sometimes unpredictable manner; an approach formulated for predicting one areal parameter might not be applicable for predicting another areal parameter. As the algorithms hitherto developed have only been validated on one or two areal parameters, it is difficult to make a concrete statement on how such modelling approaches perform across the many areal parameters. Consequently, validating the published algorithms on the other areal parameters (which may perhaps be of equal or more importance depending on the use of the variable) may prove to be problematic. The study in this paper proposes a new framework to predict areal surface metrology parameters based on features extracted from process conditions. The proposed approach is shown not only to generalise across unseen data, but is also robust enough to be utilised for all the twenty four (24) areal surface metrology parameters on which the proposed approach is tested upon. To validate the developed algorithms, a full factorial experimental design was carried out to manufacture seventeen (17) steel bearing housing parts as a case study. The sparse and highly uncertain multidimensional data obtained during this case study represent real manufacturing processes where components are manufactured in low volume. Therefore, the main contribution of this paper is the development of a modelling methodology which can generalise to a large number of manufacturing variables using a limited quantity of data. The details of the experimental design as well as process conditions are discussed in section 3. The proposed framework presents methodology that can aid the drive towards manufacturing automation and data exchange [11]. The review paper by [12] describes state-of-the-art in terms of algorithms, industry uptake and investments across a wide-range of manufacturing industries. For different materials and manufacturing processes, machine learning approaches, such as artificial neural networks, have also been developed with limited experimental data for predictive modelling of properties of manufactured components [13]. The properties of the components can be dictated by the properties of the material, mechanical or microstructural, but also via surface metrology parameters within a synergetic framework. There is a plethora of applied research works relating to the causality between process and material data and mechanical and microstructural properties, but there is little work on such causality with respect to surface metrology parameters. This holistic approach should improve our understanding of how the final properties of manufactured components may be optimised for right-first-time production. The remainder of the paper is organised as follows: section 2 presents a detailed literature review of existing techniques which have been used for mapping process conditions to surface metrology variables. The section details the strengths and weaknesses of these approaches to the overall manufacturing informatics system. As already mentioned, section 3 provides a detailed description of the experimental procedure for which the data has been derived. Section 4 discusses the proposed interpretable fuzzy-based machine learning approach for the surface metrology informatics system. Section 5 presents and discusses the results while section 6 provides the conclusion which can be drawn from the studies conducted from the paper as well as providing suggestions for future research.

Existing literature
The book by Whitehouse [1] may perhaps be described as the most important piece of literature where the use of surface metrology in manufacturing for function prediction and quality control is perfectly detailed. The book forms the foundation of many research studies which have investigated the use of surface metrology components to predict manufactured components function and consequently to control the manufacturing process. Controlling the manufacturing process is typically achieved by the manipulation of the process parameters. To achieve such a control framework, it is apparent that a model indicative of how the process parameters affect the surface metrology parameters must be identified [14]. Such a mapping framework has been the subject of many research studies as already discussed in [5,6]. Surface profile parameters account for the majority of surface metrology variables utilised for understanding the manufacturing chain. Of the profile parameters defined in the ISO standards [15], the surface heights (Ra) is the most widely used because its derivation is simple, fast and its meaning is widely understood by manufacturing technologists. For example, a high value of Ra indicates a visually rougher surface. Predicting the Ra accounts for the majority of the surface profile predicted variable studies. Some of these studies include the prediction of surface roughness parameter (Ra) for a computer numerical controlled (CNC) milled surface using linear regression [16] and the assessment of surface roughness using time and frequency domain features for a polished surface [17]. In particular, the studies conducted in [18] have shown that the Ra strongly correlates with the mean and root-mean-square (RMS) of the vibration signals for the polishing process. However, one of the main limitations of the approach is that predicting the Ra may not be sufficient to fully characterise the manufacturing informatics system. This is because the Ra value is very simplistic and may not account for the variation across the surfaces [17]. One solution to this, which has been proposed in the literature, involves creating a distribution of Ra values but this has not been widely adopted by both academia and industry perhaps due to the complexity involved [19]. A better and recent approach relates to characterising the full surface as opposed to using profile parameters. This recent approach is known as the areal surface and it is the main subject of this paper. One of the most prominent studies in attempting to predict the areal surface parameters relates to the prediction of the Sa parameter for a rotating machined process from process variables as included in [19]. The areal parameters characterise the full 3D surface and have been standardised in the ISO25 178 documents [20]. These documents contain a comprehensive industry standard areal parameters. The parameters as well as their use are shown in table 1. Many of the algorithms which have been formulated for the prediction of areal surface parameters have only been applied to one or two of the areal parameters [8]. Validation of such approaches on the parameters on which they have not been tested upon may not be feasible. This paper presents a fuzzy modelling approach for the prediction of surface area metrology parameters. The proposed approach is tested on 24 areal parameters in order to show that the proposed approach can be generalised across the various surface metrology parameters. The paper in [21] provides an excellent overview of the use of fuzzy models in areal surface metrology predictions. Fuzzy logic systems provide a unique modelling approach of leading to interpretable but non-linear input/output mapping when predicting the surface metrology parameters. Manufacturing systems are in the middle of a revolution where different components and stages of the manufacturing process are increasingly becoming 'intelligent'. This intelligence stems from the fact the many components involved in this process are increasingly able to inter-communicate from upstream to downstream. This special ability is embedded in the concept of industry 4.0 which references the fourth industrial revolution in which machine components and processes are equipped with cyberphysical capabilities and are thus capable of tuning their process conditions in response to feedback from the environment and other manufacturing conditions. The promise of industry 4.0 is well discussed in [22]. Surface metrology represents a key enabling component of this revolution as surface metrology parameters play a key part in the inspection of manufactured components. The surface metrology parameters can provide insights for online decision making in a cyber-physically connected system. The Ra, for example, is a design variable and it is typically Table 1. Selected areal parameters as defined in the ISO documents. The derivations of some of these parameters are shown in figure 3. It should be noted that the data is sampled uniformly along the x and y axes. Z(x, y) represents the measured height at location (x, y).
This parameter is particularly useful in sealing applications.
The Sdr parameter has a direct correlation with surface adhesion. ISO 25 178 part 2 defines the Sdr with integrals instead of summations.
required to not exceed a particular limit for the manufactured component to function as expected.

Experimental design
A full-factorial experimental design (see table 2) was performed on a steel bearing house [22]. The CAD model of the product to be manufactured is shown in figure 1a. Using a Vecstar furnace, the material blocks (steel EN24) were heat treated to approximately 845°C (figure 1b) and then quenched in oil so that they can be hardened. The next step involved tempering at the selected design temperatures. Temperature gradients and variations during both heating and tempering were also measured using high temperature thermocouples. The surface hardness measurements of the blocks were obtained using a Rockwell device. The treated product was then machined (figure 2) using a DMG MORI NVX 5080 3-axis machine with variable controlling factors to arrive at the final manufactured component. During the machining   process, process data, such as vibration data, were measured along the three main axes of the work-piece.
In particular, vibration data were obtained using an accelerometer sensor placed on the spindle which were then logged using LabView SIGNAL Express Software. The areal surface measurements were obtained using an ALICONA interferometric instrument. Two surface measurements were obtained per part resulting in 34 measurements in total. The features measured per part are shown in figure 1a. This instrument records the height (z) at sampled locations (x, y) with uniform sampling and a sampling interval of 10 μm. The instrument measures the raw surface metrology data and preprocessing is needed to obtain the standardised surface metrology data. The procedure for obtaining the standardised surface metrology data is shown as follows.
1. Obtain the primary surface by the application of the S-Filter on the real Surface. The S-Filter utilised is the Gaussian filter and the standards recommended in the ISO 16 610-21 document [23] have been followed. For example, the wavelength of the S-filter is taken to be 15 times the sampling interval (150 μm).
2. If necessary (depending on the result obtained above), perform further surface filtering to obtain the scaled limited surface. It should be noted that this stage is entirely determined by expert knowledge.
3. Specify the evaluation area which is taken as 5 times the selected wavelength (750 μm).
4. Obtain the reference surface and calculate the parameters as described in figure 3.
A sample of the areal surface metrology measurements obtained following the procedure above is shown in figure 4.

Proposed fuzzy modelling approach
Fuzzy logic represents an extension of bivariate logic and was introduced in 1965 in Zadeh's seminal paper [24]. Since then fuzzy logic systems have found applications in a variety of domains including biomedicine [25], process control, manufacturing [26] and aerospace systems. The use of fuzzy systems in these applications offers a unique advantage of being able to model non-linear systems in an interpretable manner. The interpretability comes from the fact that a fuzzy logic system is a rule-based system and the rules are similar to the natural language of humans. These rules also allow for the incorporation of expert knowledge which can be valuable for the analysis of complex systems. Central to fuzzy logic systems are the fuzzy sets. Fuzzy sets extend conventional sets in that they can provide to what extent an element belongs to a particular set. Mathemetically, a fuzzy set (type-1), A, may be expressed as follows: is the membership degree of the fuzzy set of an element x in the Universe of discourse X, 0 < μ A (x) < 1. The fuzzy logic system (FLS) can be considered to be a mapping from the input space (defined as X) to the output space (defined as Y) ( figure 5). Such a mapping can be formulated by the following equation: where yˆis output of the fuzzy logic system, f j (x) represents the degree of validity for the jth rule (for a total number of c rules) for an input x ä R N . f j (x) represents the normalised firing strength of a particular input in each input space. The nature of λ j is what determines if the fuzzy system is of the Mamdani or of the Takagi Sugeno Kang (TSK) type. For the Mamdani type, λ j represents the output/consequent fuzzy set of the jth rule while for the TSK type, λ j represents a linear function (λ j = ax + b).

Identifying Fuzzy Models
As discussed in the preceding section, the fuzzy model can be thought of as a nonlinear interpretable mapping from the input space to the output space. The fuzzy system is parameterised (the fuzzy sets can be represented by parameters) and such parameters can be learned from the data obtained from the system to be analysed via fuzzy logic. There exists a plethora of approaches for identifying the parameters of the fuzzy logic system such as optimisation of the cost function via gradient descent and iterated re-weighted least squares [27]. As the goal of this paper is to develop an approach that can generalise across the different areal parameters, it is imperative that a robust framework be found. Consequently, the proposed algorithm development follows a number of steps as discussed in the preceding sections.

Fuzzy Modelling Approach
The fuzzy model utilised here is of the Mamdani type because it can be shown to represent the most  transparent of fuzzy models. The block diagram for the process of obtaining the fuzzy model from data is shown in figure 6. The first step involves the use of fuzzy c-means data clustering of the product space which provides an initial good guess of the parameters of the fuzzy model and will later be optimised. As shown in [26], such an approach can help in preventing the optimisation algorithm from being stuck in a local optima. The number of clusters determines the number of fuzzy rules in the trained fuzzy models. To determine the optimal number of fuzzy rules (which is the same as the number of clusters), a crude search was carried-out to find out the region where the optimal number fuzzy rules is. The authors found that for very large number of fuzzy rules, the algorithm overfitted on the hold-out set and this gets progressively worse as the complexity of the model increases. The search for the optimal number of fuzzy rules was thus limited to between 2 and 12. The second step involves determining the regularisation parameter. This step involves defining a cost function-a penalised root mean square error (RMSE) defined by the following equation: where f(X, β) represents the output of the fuzzy system, y is the vector representing the output data and λ is a penalty term that penalises for large values of the fuzzy model parameters. The value of λ is determined via a K-fold cross validation using the following steps: Algorithm 1: K-fold cross validation algorithm for determining the regularisation term 1. Divide the training data set into K-folds. Note that there is a 70% − 30% split in training data to testing data. This resulted in a training data of 24 data points. The value of K was chosen to be 4 which means there were 6 data points per fold. It should be noted that steps 2 and 4 above involve a training procedure which involves finding the parameters which minimise the error function as defined in equation (3). The procedure by which this has been done in algorithm 2 is based on the scaled conjugate gradient algorithm.
The derivative with respect to the consequent parameter is given by the following equation: where β i is the consequent parameter of the ith rule. It should be noted that N represents an un-normalised Gaussian function. F is a vector representing the firing strengths across all the rules and 1 is a vector of ones. It is worth emphasizing that the scaled gradient descent algorithm was utilised in this paper. At iteration k, the parameters are updated as follows: P is the vector of parameters, α is the step size and d is the search direction. ψ k = α k d k is given as follows: where H is the Hessian which can be approximated as discussed in [27]. It is worth emphasizing that equation (3) includes a loss function which can be utilised to control the interpretability of the elicited fuzzy model. The center of sets defuzzification method was employed in this research, but the proposed approach extends easily to other defuzzification methods.

Data
The datasets utilised in this research study are the surface metrology data (an example is shown in figure 4) and the process vibration data. The vibration dataset is a time series data sampled at a frequency of 10KHz. Sets of vibration data in the x, y and z directions were obtained per feature in each of the parts. From the vibration data, feature extraction was performed. The features extracted included time and frequency domain features (for example mean [10], root mean square value [17] and the Fourier transform frequency components). A total of 206 features were obtained from the vibration data. A distribution of the vibration data as well as selected input features shown in figure 7 indicates that the data is sparse and multidimensional.
The 24 areal parameters from the surface metrology were also obtained using an in-house software developed by the authors. The procedure for deriving the parameters are as outlined in the ISO standard as well the studies performed in [20,28].
It is worth emphasizing that the modelling problem is challenging because of the high dimensionality and sparseness of the data points. Specifically, there are 34 data points in all (25 training data points) which points to the fact that it is easy to overfit on the training data [26]. This phenomenon is representative of many manufacturing processes (such as in the manufacture of aerospace components) where parts are manufactured in low volume. It would be interesting to investigate how the proposed approach performs in this challenging modelling problem. It should be noted that a penalised error function coupled with K-fold cross validation is proposed for the modelling problem as discussed in section IV. There is a 70%-30% split between training and testing data sets. This split was performed after a random sampling of the full data set. The performance metric utilised for evaluating the developed models is the RMSE. The 206 features were extracted from the raw vibration data. New deep learning approaches make it possible to utilise raw time-series data in the modelling problem as shown in [29]. This line of thought was not pursued further because this may not be feasible for cases of low volume manufacture such as the one considered in this paper.

Linear Regression Modelling
Linear regression modelling is the work-horse of modelling in manufacturing. To test the proposed approach on other modelling problem, linear regression is chosen as a benchmark so that the results obtained from the proposed approach can be compared. The linear regression modelling is given by the following equation: where X represents the design matrix and β the corresponding parameters. ò represents a zero-mean Gaussian noise. For a sum of error square cost function, the solution to the optimisation problem is given by the following equation: It is worth noting that as there are significantly more features than data points, the linear regression modelling problem will be overdetermined and will result in overfitting on the modelling problem. This was indeed the case when a linear model was performed on the training data. These results are shown in figure 8.
As can be seen from the results of figure 8, the linear regression model fits the training data perfectly but does not generalise well to unseen data (as can be noted form the testing data set performance). To allow for better generalisation to unseen data, the linear regression cost function can be penalised as given by the following equation: where λ is called the ridge parameter whose function is to penalise for large weights. As already mentioned, the penalty term (λ was determined by K-fold cross validation) as described in section 3. The penalised linear regression (ridge linear regression) results is as shown in figure 9.
As can be seen from figure 9, although the results of the testing datasets are more generalising when compared with ordinary linear regression results, the training data set is significantly much worse. This is as a result of the fact that the ridge parameter is able to find a compromise between the best training results (in the linear sense) and the best validation results (in the linear sense). The results suggest that a non-linear model is required to obtain a good mapping of the process parameters. It is for this reason that Mamdani fuzzy model is first considered as discussed in section 3. The first Mamdani model considered is not inclusive of any penalty term which has already explained can result in overfitting of the training model. Such a result is similar to the ordinary regression result (shown in figure 8). The fuzzy modelling result without any penalty term is shown in figure 10.
To allow for better generalisation, the same ridge linear regression training procedure (discussed in section 4) is also followed to train the Mamdani fuzzy model. The results of the ridge Mamdani fuzzy system is shown in figure 11. We have called this approach the ridge Mamdani fuzzy modelling approach to empasize its capability to penalise for large fuzzy weights in order to improve generalisation performance.
As can be seen in figure 11, the ridge fuzzy modelling framework provides a much improved performance and is able to map the process features to the surface metrology parameters. The result shown in Figure 8. Linear regression performance on the training and testing data for a selected output variable (Sa). There is overfitting because the system is overdetermined.     figure 11 can be replicated across all the other areal surface metrology parameter which indicates that the proposed modelling methodology predicts with accuracy regardless of the parameter of interest. Tables 3  and 4 respectively show the performances of linear/ ridge regression method and the proposed fuzzy approach in predicting 24 areal parameters. The results from these tables indicate that the proposed approach is able to generalise across different areal parameters and provides consistent as well as robust modelling results. As can be observed from tables 3 and 4, for the ordinary linear and fuzzy models (without penalising the weights), the models overfit significantly on the training data set and perform badly on the testing data set across all the 24 areal parameters. The training error is close to zero and this fact is -corroborated by figures 8 and 10. For ridge linear and fuzzy models, the results are better (improved modelling accuracy on the test data). For example, if one considers the Sa parameter in two tables mentioned, it can be seen that the training RMSE for both the ordinary linear and fuzzy models are negligible (2e-15 and 3e-15 respectively). The testing performance is respectively 0.531 and 0.233. Although the fuzzy model is better than the linear regression approach (for the ordinary model), there is overfitting on the training data set. The performance is much improved when utilising the proposed ridge approach. For example, the ridge ordinary fuzzy model has a training RMSE of 0.034 and a testing RMSE of 0.033 (shown in figure 11). The ridge approach is able to provide a balance in the accuracy of training and testing results. It should be noted that using the ridge approach on the testing data set, the fuzzy model is able to provide improvement on the modelling accuracy as compared to the linear modelling approach by approximately 75%.

Conclusion
This paper has presented a new framework which is based on ridge Mamdani fuzzy logic system for the mapping of process features to areal surface metrology parameters. The proposed approach represents a nonlinear but interpretable solution to the manufacturing informatics modelling problem. The main contribution of this paper is the development of a modelling solution which provides consistent accuracy across all the 24 areal parameters on which the results were tested. This is the first time such a framework has been validated across different areal parameters even in the face of a challenging, nonlinear, sparse, multidimensional modelling task. In particular, the validation results of the proposed strategy contrast existing areal parameters modelling methods where either results do not generalise across many areal parameters or validation results are difficult to obtain. The proposed approach may benefit from adding an extra layer of complexity (such as the use of type-2 fuzzy sets) so that uncertainties inherent in manufacturing systems can be adequately modelled as well as understood. This will be the main focus of future research studies.

Data availability statement
The data that support the findings of this study are available upon reasonable request from the authors.

Ethical Approval
Not Applicable.

Consent to Participate
Not Applicable.