Surface Reversal Method Algorithm Development

Nor Athirah Roslan and Mohd Fauzi Ismail, "Surface Reversal Method Algorithm Development”, Annals of Emerging Technologies in Computing (AETiC), Print ISSN: 2516-0281, Online ISSN: 2516-029X, pp. 170-177, Vol. 5, No. 5, 20th March 2021, Published by International Association of Educators and Researchers (IAER), DOI: 10.33166/AETiC.2021.05.021, Available: http://aetic.theiaer.org/archive/v5/v5n5/p21.html. Research Article


Introduction
Surface texture is an outermost layer of a component or device that interact with the environment [1]. It plays an important role in the functional behaviour of the product, especially in the engineering part. Engineered surface relies on the control of surface characteristics to obtain a desired functional performance. Surface texture is divided into two which are stochastic surface and structured surface. Stochastic surface or also called a random surface consist of a collection of features at many different scales. For example, in the traditional surface generation process such as grinding or polishing, the organization of the surface is stochastic in nature.
Here, based on Kang et al. the term stochastic is used instead of random because it enables a somewhat wider description to be made [2]. Typical types of stochastic surface are isotropic surfaces and anisotropic surfaces. A surface is said to be isotropic when it presents identical characteristics regardless of the direction of measurement. In other meaning, the surface that does not have any texture that stands out. While, a surface that has an oriented surface pattern such as turned, ground or brushed surface or periodic structure is said to be in the type of anisotropic surface [3].
Based on the trend of the industries technologies nowadays, many anisotropic surfaces are designed to meet the specification of the function needed. Therefore, the parameters of the features on the surface becoming one of the important manufacturing parameter to be identify. The most important parameter describing surface integrity is surface roughness. In the manufacturing industry, surface must be within certain limits of roughness [4]. Besides surface roughness, surface www.aetic.theiaer.org features itself also plays an important role since surface nowadays already comes to change from bigger size downward to nano size that will bring to paradigm shift.
Nowadays, there are several methods available for surface texture measurement. According to X.Jian Jiang et al. due to advanced manufacturing, technology has changed from day to day resulting in the changes for surface metrology [4]. There are two main causes for the recent paradigm shift in the discipline of surface metrology. The first one is due to the ability to measure and qualify commercial micro and nanometer scale manufactured components and the second causes for the recent paradigm shift of surface metrology are due to the next generation of an ultra-precision surface that is not incredibly smooth but also has the specification of surface form at a level approaching atomic magnitude. This transformation is vital to reach the advanced technology so that surface metrology will not be outdated, more efficient, economic and less environmentally sensitive.
Metrology is a scientific study of measurement. Metrology itself can be separated into three categories with different levels of complexity and accuracy which are scientific metrology, industrial metrology and also legal metrology. Scientific metrology deals with the organization and development of measurement standard and with their maintenance while industrial metrology deals with adequate functioning of measuring instruments used in industry as well as in production and testing processes. Whereas, legal metrology as the conversion of a national standard to guarantee their accuracies by comparison with international standard. Below this type of metrology, here comes the surface metrology which focuses on the surface of the product design only.
Surface metrology is a knowledge that concerns on measurement especially the small-scale geometrical features on a surface and it is significant due to its strong association with important disciplines like surface engineering, manufacturing processes, tribology, and others [5]. Surface metrology is one of the measurement systems that was indeed realized as the best method for recognizing how special surface topography is and how it plays a vital role in a system especially in terms of component performance which results in promoting the quality in the industry by optimizing the process parameter.
Uncertainty or error is a term used frequently to describe accuracy and precision. Accuracy is defined as the degree to which the result of a measurement, calculation, or specification conforms to the correct value or standard. Meanwhile, precision is the degree of consistency and agreement among independent measurements of the same quantity. The measurement value sometimes may not be precise and accurate even though the same method is applied because there is an error that exists, either during the procedure or from the measuring tool itself.
According to Fei L the measurement results from some advance machines nowadays commonly affected by uncertainty [6]. In International Vocabulary of Metrology (VIM), uncertainty is define according to the result of the measurement. One of the ways to describe the uncertainty is based on the standard deviation [7]. Measurement error is difficult to avoid and this seeks more studies to deeply understand the characteristics of errors and uncertainties. Consequently, R. L. Alan and S. Morris researched the error sources which gave an outcome where error can be classified into two different groups [8]. One of the errors is called systematic error and the second one is random error.
Systemic error is a repeatable error which usually biases on one side of the reading. This type of error may happen due to the effect of environment, system disturbances and instrument with improper calibration [9]. Meanwhile, random error is an error that cannot be predict and it is unavoidable. A random error may happen due to human mistake. The error classification is defined by considering all possibilities that come from the measuring equipment, measured product, environment, procedure, and man. All these ideation greatly assist the process of the reversal technique in separating the error to obtain the actual value of the surface measurement.
Referring to Benedito et al. nowadays there are much faster and reliable measurement systems developed based on the need for reduction of production cost and time. However, dimensions might not be ideal due to some errors on the used machine tools during the production process [10] and this is where there is a necessity for reversal method.
Reversal method is the surface measurement done several times by changing the method against the original method. For example, Dr Scott Smith used to measure the squareness of X and Y axes of a machine tool by using a metrology square made from iron cast [11]. However, the measurement www.aetic.theiaer.org result comes out to mix with some errors. Thus, the reversal method is applied so that he can find out the source of the error, either come from the square iron cast or the surface of the flat table. If the vertical edge was measured in this case, it is not possible to tell whether the X and Y motions of the machine are not square to each other or whether the square iron cast is tilted. Thus, he placed small debris between the square and the flat table and measured the position of Y-axis to see either it is perpendicular or not towards X-axis. This method is applied by reversing the vertical axis by 180 o degree so that he can surely confirm the error. As the result, he succeeded to remove the error from a poorly mounted square. It is proven to increase accuracy by reducing uncertainties. That is why reversal method is important as mention by S. Osawa, reversal method is applied in National Metrology Institutes (NMI) to remove the geometrical errors of a Coordinate Measuring Machine (CMM) [12].
This reversal technique is often done for flatness, squareness, and roundness measurement. To have a proper technique, E. Loewen introduced some conditions where the indicator output must be a linear combination of signals representing the measured and the systematic error [13]. Then, there is a need to make a physical modification of the measurement system, which alters the sign of one component of the indicator output. Next, the measurement system should be stable through the physical adjustment and the indicator should be calibrated independently. The reversal method is classified into several classes based on the complexity of the measurement done. Level reversal concept which involves an inclination angle at the measurement surface will be applied theoretically to this area of study.
How the measurement is conducted will determine the properties of the object measured. To have a good measurement, an appropriate reference datum is needed. Reference datum is referred to as theoretically point, plan, and origin that is defined from a geometric counterpart of a specific datum feature [14]. It is important in surface metrology since it plays an important part in determining the accuracy of the value measured. In most cases, reference datum is selected by considering the geometrical features of the object. Usually, a datum is selected by referring to the standard established by ISO and ASME. However, in certain cases, the standard datum in surface topography analysis cannot provide an accurate result [15][16] [17]. For example, in this case, it is not suitable to use abrasive tool cutting edges protrusion characterization with tool-work interaction [18].
In addition, M.F. Ismail had done a research on reference datum of the rotating tool by proposing a new approach using surface reversal method [18]. The research has successfully identified an appropriate reference datum; however, there is a missing and lacking information in datum definition. Thus, this research aims to improvise datum definition by applying the same surface reversal method. On top of that, this paper targets to simulate the surface reversal method in MATLAB as the first step before continuing with error estimation process. Generally, Mounstainsmap would be selected when it involves surface analysis; however, the entire purpose is to study and estimate the error. This study focuses on simulated surface topography data so that the theoretical concept can be used to observe whether it is applicable or not.

Methodology
The main objective of this paper is to introduce proper basic steps regarding surface reversal analysis. To demonstrate the theoretical approach used in this study, MATLAB software is selected as the main platform to simulate the process done. This paper involves two fundamental procedures which are the preparation of the simulated surface data and surface correlation.

Preparation of 3D simulated surface
To prepare the surface structure of this study, a detailed surface requirement and method to obtain the dataset is explained within this section.

The requirement of simulated surface
To select an appropriate surface, there is a requirement that needs to be followed. First of all, the surface must be from an anisotropic surface. Next, the surface must have a distinguishable and clear www.aetic.theiaer.org orientation. These two conditions are necessary to fulfil as to ensure the surface data structure reliable to be used achieves the objective of this paper.

Obtaining the surface dataset
To improvise the previous research finding regarding datum definition in relation to a rotating tool, the electroplated diamond tool was selected to be used in this study. The electroplated diamond tool is measured by using a Confocal Laser Scanning Microscope (CLSM). The type of CLSM used is Olympus LEXT4000. By using this Olympus CLSM, the electroplated diamonds tool sample was sequentially scanned point by point, or multiple points at once. The data information was assembled into the areal topography surface data. The areal surface measurement enabled the user to view and understand the surface features and characteristic.

Construction of surface dataset
The preparation of surface data was done based on the general understanding regarding the reversal method. The actual condition of surface reversal method as illustrated in Figure 2 provided the idea where it was compulsory to develop two surfaces with different orientation (180 o ).  [18] F(x,y) is the surface topography C(x,y) is the inclination component α is the angle to indicate the direction of the measurement axis Surface A was the original surface structure of the electroplated diamond tool sample. Meanwhile, surface B was constructed by rotating the surface A by 180 o to comply with the reversal measurement system. Theoretically, an inclination angle (<1 o ) must be added at surface B to simulate the reversal system. Then, both surfaces were cropped into (509 x 501) size unit to reduce the size of the sample and ease the future procedure by focusing on the selected surface features.

Construction of data structure on the cartesian coordinate system
Construction of the electroplated diamond tool surface topography was done by arranging the surface dataset along with the columns and rows of the y-axis and x-axis. The topography data was plotted on a three-dimensional (3D) cartesian coordinate system with 0 origin and a pixel scale of a constant data interval of 2 m ∆x and 2 m ∆y. The colours in the surface topographical map signify the height of the surface feature.

Surface correlation
Due to the variation of the surface dataset, surface correlation is indeed necessary to be done. Correlation provides various types of functions in different fields of study. In surface metrology, www.aetic.theiaer.org cross-correlation is used widely to study the surface topography by focusing on the roughness features on the surface topography. Cross-correlation is a mathematical tool to find a repeating pattern. Sahoo et al. introduced the cross-correlation method as one of the best methods to analyze the roughness features on a surface topography [19]. Cross-correlation function has been justified to be able to deliver information about the distribution of features like peak and valleys across the surface. Thus, it is suited to be used with anisotropic surface (random surface texture) since there is no feature that stands out among each other being created on the simulated surface. By considering the data along the Z-axis, this cross-correlation function is likely to generate a point in which it is probable to find the regions that the two signals most resemble each other.

Rotate Surface B by 180 o
To do the correlation between surface A and surface B, both surfaces need to be in the same direction. Thus, the first step that needs to be done is transforming surface B into B' by rotating it at 180 o . Surface B' is used along with surface A for the whole surface correlation.

Load surfaces and correlate
By applying the image processing toolbox, 'normxcorr2' function is selected to correlate Surface A and surface B'. This function is able to normalize two different surfaces and spots the best point where both surface topography is highly matched. This type of surface correlation work is based on equation 1 below: (1) Where; f is the surface image ̅ is the mean of the template ̅ , is the mean of f(x,y) in the region under the template However, this function can only work on a grayscale image. This condition requires the actual surface data to be converted into image type file. For this study, both surface data were transformed www.aetic.theiaer.org into Portable Network Graphic (PNG) format. Then, it was loaded into the workspace and processed by the 'normxcorr2' function.

Reduce the size of the surface
Typically, cross-correlation will extend the original surface size. To find the original size, a filtering method is applied. Rectangle A is illustrated as the original surface size with (m x n) unit in Figure 5. Meanwhile, the outer rectangle (black line) is the extended size with (X x Y) unit. In this paper, the original size can be obtained by multiplying n and m with 3 and both sides are minused by two.

Find maximum point
'Normxcorr2' function also works to obtain the best match point between both surfaces. This step is required to ease the future study where surface subtraction is done using the point acquired. Plus, this point can be a proof where surface A and surface B are from the same sample but with a different position. This point can be seen through the final plot of the surface correlation.

Results and Discussion
A sample of surface topography data of the electroplated diamond tool was used in this study to examine the capability and performance of the proposed approach to introduce an appropriate algorithm for basic reversal method before continuing to develop the estimation error process and implement the full process. The data surface type of the electroplated diamond tools which were measured through CLSM consisted of 997 of X-axis and 808 of Y-axis.  Figure 6 shows the surface data of electroplated diamonds tools topography that were measured by CLSM after viewing them in MATLAB software. This sample was classified as an anisotropic surface where the pattern on the surface was designed with a specific function. Therefore, this kind of surface is suitable to be used with this system algorithm since it helps to distinguish the character and features more easily.
www.aetic.theiaer.org To fulfil the reversal measurement concept, two surfaces of surface A and surface B were created. Surface A was a part of the electroplated diamond tool after being cropped on x (300) and y (200). Meanwhile, surface B was created by rotating surface A at 180 o degree. Both surfaces had the same surface topography but in different direction and inclination. Pre-processing was done before conducting surface correlation. The initial step required transforming surface B into B' by rotating the surface data into a 180 o degree. This step was indeed compulsory to ensure an accurate surface correlation because both surfaces were in the same direction. Cross-correlation method was required to convert the surface data into an image type file. This is because 'normxcorr2' was only able to read the grayscale image to normalize both surfaces A and B. The result of the normalized surface is shown in Figure 8. This method allows an area with the most resembled feature to be highlighted. Based on the correlation surface obtained, the point was located at position x, 540 and y, 409. These positions will be used in future to ensure both surfaces are in proper position before undergoing surface subtraction.

Conclusion
This paper has presented an appropriate algorithm of surface reversal method developed through MATLAB software and has successfully achieved the objective. This algorithm will help to ease error estimation which is very useful to prevent useless findings in future studies. This surface reversal method apps is expected to improve the accuracy of the surface analysis and gives benefit to studies related to tool-work interaction; for example, the grinding process. However, this study