Estimation of surface roughness in selective laser sintering using computational models

This study presents a comprehensive experimental dataset and a novel classification model based on Deep Neural Networks to estimate surface roughness for additive manufacturing. Many problems exist due to the very complex nature of the production process. Some focus on the production planning phase, including the nesting problem under many constraints. However, it is not possible to solve the main function without a clear understanding of the nature of the constraints. The purpose of this research is to present a method to automate the surface roughness estimation process in the production planning phase. The significance of this study is to implement a data-driven model for one of the most critical decision constraints in the nesting process. Solving this problem will automate a key decision constraint, and it might be implemented as an automated constraint module in solving the nesting problem. The proposed model focused on selective laser sintering (SLS) technology based on polyamide 12 powder applications. A comprehensive dataset is designed to simulate the behaviour of an industrial SLS manufacturing process based on a 3D positioning strategy. A set of samples with random positions are also created to test present the model’s robustness. The proposed classification model is based on Deep Neural Networks (DNN) with hyper-parameters designed for the problem. The dataset and the model provide a new user interface to estimate the surface roughness depending on the coordinates of a given product surface in an SLS production chamber and the production parameters employed in the production planning phase. The results show that the model can classify sample surfaces as “rough” or “smooth” with a very high percentage (95.8%) for the training set and with 100% for the test set. Benchmark results also show that the model outperforms other machine learning methods in classifying the surface roughness successfully on the test set.


Introduction
In recent years, advanced manufacturing technologies have increasingly adopted Artificial Intelligence for more efficient and robust manufacturing. Ensuring high-quality output in the production planning phase in additive manufacturing is a labour-intensive task. Especially in selective laser sintering (SLS) and direct metal laser sintering (DMLS) technologies, the position of the part has a significant effect on surface roughness, and it needs a high level of human expertise to estimate the surface roughness, which directly affects the quality of the final product.
Additive manufacturing (AM) technologies enable the rapid production of three-dimensional complex-shaped parts [1]. They can be worked with wax, ceramics, polymers, metals, and biomaterials [2]. Different raw materials in powder, sheet, filament, and liquid are available [2,3]. In all AM methods, parts using computer-aided design (CAD) are produced by depositing the material layer by layer through selective fusion, sintering, or polymerisation [1].
SLS technologies are generally used for rapid prototyping in their early stages [4]. However, in recent years, the technology is also implemented for mass production when materials are available and cost-effective for the given application [5].
The SLS deploys a powder bed technology approach as part of additive manufacturing. Since the manufacturing is focused on layer-based laser sintering, the technology may employ several different layer thicknesses (60 µm, 100 µm, 120 µm) depending on applications, surface quality, and material properties [6].
Production procedures can be explained as follows: First, the powder is spread to the production area by the recoater or blade much higher than the production layer thickness. The design section of the first layer is scanned and melted by an optical laser. In the second stage, the production platform lowered to a pre-planned layer thickness, opening the powder feeder required for the next layer. This powder laying and laser sintering continue in loops until the end of the process [7].
Polyamide powder materials cover more than 90% of the thermoplastics in the AM market due to the increasing volumes of PBF machines that use these powders [8]. The polyamide family Polyamide 12 (PA 12) and Polyamide 11 (PA 11; followed by Polyamide 6) are the most widely used thermoplastic polymeric material family [8]. Also, Polypropylene (PP), Polyethylene (PE), Thermoplastic Polyurethane (TPU), Polyetheretherketone (PEEK), and Polystyrene (PS) are non-polyamide laser sintering marketing materials [8].
There are material testing standards available for polymer materials for surface metrology [9]. The surface quality of end products can be improved by optimising the process parameters [10]. Surface roughness problem is investigated using response surface metrology for different polyamide parts [11,12].
Bodaghia et al. [13] compared the surface quality of printed porous materials produced by SLA, MJF, and FDM 3DP. The benchmark results show that SLA obtained the better surface finish with the lowest standard deviations of roughness. The average roughness (S a ) and root mean square (RSM) roughness (S q ) values of better surface finish of MJF samples are lower than those of FDM. Taufik et al. [14] presented a laser-assisted finishing process to further improve FDM parts' surface quality. The benchmark results showed that when the laser-based finishing process was performed, low arithmetic surface roughness (R a ), negative skewness (R sk ) and kurtosis (R ku ) > 3 were found as the most appropriate conditions for surface finishing.
In recent years, data-driven solution methods have played a critical role in many engineering problems. They provide better and time-efficient solutions that can extract information from data that might handle the complex nature of the problem, which cannot be solved within a polynomially defined time. Machine learning algorithms and deep learning algorithms have been used in many industrial applications, including intelligent damage identification [15], remaining useful life prediction [16], and prediction of energy consumption and surface roughness of natural materials [17].
Although there are several studies available for enhancing the surface quality in the pre-production (production planning) and post-production phases by optimising the process parameters, there is no research carried out on the estimation of surface roughness using a machine learning method and a production dataset that contains positioning and angle values have a substantial effect on the finish surface of final products in SLS systems. Yang et al. have proposed a customised method of post-production heating by hybridising material preparation and combining properties of the powder and parts. Various combinations of the vital process parameters have been investigated using a design of experiment (DoE) method [18]. Caliskan et al. have investigated the manufacturability, inner surface properties, and efficiency of various conformal cooling channel (CCC) geometries by using direct metal laser sintering (DMLS) system [19].
Quinsat et al. have investigated the characterisation of surface topography of 3D printed parts by two different applications of multi-scale analysis [20]. Besides, Auffray et al. researched the design of experiment analysis with Taguchi orthogonal array on tensile properties of PLA samples produced by fused filament fabrication (FFM). They focused on revealing the importance of the relationship between process parameters and mechanical behaviour of FDM™/FFF parts [21]. However, Terekhina et al. have experimented with the different material structure and fatigue properties of PA 12 specimens produced with FDM and SLS. The results were compared with the materials produced with injection moulding (IM) and extrusion techniques. Moreover, the outcomes were discussed by how the obtained degree of crystallinity, porosity, and roughness affects fatigue behaviour [22].
Technological development in the digital manufacturing environment has changed quality prediction and classification methods. Various machine learning (ML) and deep learning (DL) models have been developed for data-driven automated and smart additive manufacturing that enables product-and process-related quality predictions [23,24]. Since its complex nature material since is one the most promising application field for Artificial Intelligence tools like deep learning [25].
Johnson et al. proposed a deep learning tool on failure classification problems in additive manufacturing [26]. In the research, they investigated the porosities in additively manufactured parts and classifying them whether there is a failure in the process. Lu et al. proposed a real-time defect detection model for continuous fibre-reinforced polymer composites [27]. They have collected images as a training dataset for supervised deep learning using Faster Convolutional Neural Network (R-CNN), Single Shot Multi-Box (SSD), and You Only Look Once v4 (YOLOv4) models. Experimental results proved the effectiveness of the R-CNN model compared to others. Similarly, Qin et al. reviewed many other ML models for AM, which prove the performance of data-driven models as a practical alternative to traditional prediction models [28].
This paper investigates the effectiveness of the Deep Neural Network model for surface roughness detection in an SLS production chamber. The study aims to implement a method to automate the surface roughness estimation process for nesting parts in the production chamber since the related process is carried out manually. The model provides a new user interface for surface roughness estimation during production planning.
An experimental study is carried out to estimate the surface roughness of any given design during the production planning phase by creating a comprehensive dataset that represents a real production environment with coordinates, angles, and observed surface roughness.
Section 2 presents a methodology to prepare an experimental setup and data collection. Experimental setup, effects of standard parameters, and a new experimental design are also given. A sample design with four different angles is proposed and manufactured to represent the actual production environment. Section 3 proposes a classification and estimation model based on deep learning algorithms. In Section 4, results of the trained system are presented along with additional benchmarks with other available classification techniques to show the system's robustness.

Test specimen design
A test specimen is designed in octagonal form with 16 mm × 16 mm × 18 mm (XYZ, respectively), as shown in Fig. 1. The specimen is specially designed to represent actual product conditions with the part design module of Catia V5©. The arrow form in the middle of the test specimen is added to ensure that all samples are produced in the same Z direction relative to X and Y. The size determination of the specimen is limited to the technical specifications of the surface roughness measurement device.
In the SLS production process, certain constraints are considered in the placement of parts throughout the volume of the production chamber. The parts must be separated apart 1 mm minimum in the production chamber to achieve standard surface quality, as indicated in the manufacturer's guide. Any contact should result in surface deformation and failure. A minimum of 3 mm must be left before the first layer of any product.
The positioning and relative angles of the parts substantially affect the surface quality in the process. In this research, the effects of various parameters on the surface quality are investigated with production samples developed in an octagonal form. It is proposed to create several different angles at the same spot of the production chamber and simulate an actual product with several surfaces simultaneously (see Fig. 1).
A multi-surface octagonal form with various angles on the same sample represents the actual manufacturing conditions. The angles 00, 450, 900, and 1350 were set relative to the Z dimension, as shown in Fig. 2a, b, c, and d. The surface roughness measurements to create a dataset are made on these surfaces, as discussed in the following sections. The test samples are positioned in a production volume to gather surface roughness data, as shown in Fig. 3a. A threedimensional position data for each sample is recorded, as shown in Fig. 3b.

Experimental setup and process parameters
Experimental studies are carried out using EOS Formiga P100 machine setup under standard production conditions of temperature, humidity, and powder management procedures.
The production system is kept in a particular environment where EASA Part21 Subpart G civil aviation production organisation approval standards and TS EN ISO 9001:2015 quality management standards are applied. The production volume of the machine is 192 mm, 242 mm, 320 mm X, Y, and Z, respectively, as can be seen in Fig. 3. Surface roughness is measured using the Mitutoyo SJ-500 device (see Fig. 7). The process parameters that significantly affect surface roughness are studied in this study as preliminary work. It was determined that the standard contour parameters had a more significant effect than on-part and downskin parameters. Standard process chamber temperatures of 168 °C and 150 °C for the SLS production process were deployed as the building chamber and removal chamber temperatures, respectively. Table 1 presents the constant core parameters of the SLS process and their respective values used throughout the experimental studies.
In the first phase, the preliminary experiments were carried out for only 00 and 1800 specimens (see Fig. 1) to identify the best set of parameters for dataset creation. Figure 4 presents the mean values of both experimental setups to identify the best possible set compared to the original EOS contour parameters. Table 2 presents the details of the scan and power parameters and their corresponding surface roughness values.
The methodology of the parameter setup is presented in Table 2. In the first stage of parameter trials, the contour parameters given by EOS have been changed. The first stage was completed by increasing and decreasing the scan and power values of the Standard (S i ) parameters in contour. Six (from S 1 to S 6 ) contour parameters were determined in the first study. The power parameters are adjusted by changing the 2500-mm/s and 800-mm/s max/min scan parameters of the EOS whilst fixing the 16-W power parameter, and the power parameters are changed from 11 to 21 W as max/min values whilst fixing the 1500-mm/s scan parameter of the EOS. The min and max values of scan and power parameters used in both cases are also grouped in Table 2 (S 1 to S 6 ).
Twenty more parameters are created in the second stage of the preliminary study. Whilst the scan value, where the best roughness value is obtained, was kept constant at 800 mm/s, nine different parameters were tried to observe the effect of the power parameter. Then, whilst the power value was kept constant at 11 W, the effect of the scan parameter was examined with 11 different parameters. As a result of these experiments, it is determined that the best value is obtained with the S 5 parameter.
As the roughness values of S 5 , S 16 , and EOS© parameters are examined in Fig. 5 and Table 3, the best surface roughness values are obtained using the S 5 parameter set. Thus, the S 5 parameter sets are the experimental contour setup and the constant core parameters given in Table 1.

Experimental dataset
An experimental dataset is designed to collect data regarding the effect of positioning on surface roughness in the SLS process. Details of the experimental setup and the process parameters used in the experiments are introduced in Section 2.2. During dataset design same setup is used to measure the effect of positioning in a production chamber.
The octagonal test specimen is employed for the data collection process (see Fig. 1). Three levels of the production chamber (bottom, middle, top) are dedicated to conducting five specimens on each level. In total, 15 specimens are placed in a production chamber to represent the whole volume (see Fig. 10). The placements are b a Fig. 3 a The production platform and dimensions of SLS technology are carried out in the research: x: 192 mm, y: 242 mm, and z: 320 mm. b Measurement method of x, y, and z position information of test samples given in Table 4  started from 2 to 285 mm on the Z coordinates. Table 4 presents the coordinates of each octagonal specimen surface in the process chamber in mm. As shown in Fig. 1, each specimen has four surfaces at 0, 45, 90, and 135°. Table 4 presents the coordinates of central points on each specimen surface. Three more specimens are also designed to test the robustness of the representation of the first set. Table 5 presents the coordinates of randomly placed A, B, and C specimens. The test set is also identical to the first batch given in Table 1.

Characterisation of the specimens
The surface roughnesses of specimens are measured to complete the dataset. Test specimens can be seen in Fig. 6. There is no surface treatment applied on the specimens apart from a high-pressure air to clean the remnant powder on the parts. The values were measured using the Mitutoyo SJ-500 surface roughness device (see Fig. 7). Table 6 presents the surface roughness values of specimens. Table 7 presents the surface roughness values of random positioned samples.

A classification model using Deep Neural Networks
In this study, seven different features, including position X, position Y, position Z, angle, speed, power, and mixture, have been considered for the classification process of Polyamide 12. The study aims to propose an estimation model to decide whether the surface roughness of the samples is over the threshold in actual production conditions. The average surface roughness, which varies relative to position X, position Y, position Z, and angle value, is used as a decision parameter.
A classification model using a Deep Neural Network (DNN) is proposed in the context of this study. DNN is a wellknown artificial neural network model that deploys more than two hidden layers to solve estimation and classification problems in many engineering applications that can be solved using  a supervised learning algorithm [22]. Figure 8 represents a deep learning model with an input layer, three hidden layers, and an output layer. The proposed model has two hidden layers, one drop-out layer and one output layer. The dense layer is modelled with an average value of surface roughness. The drop-out layer has been used to prevent the overfitting problem.
The transformation between the layers is carried through an activation function. The transformation between layers is defined as follows: Here, z (l) represents the output value for layer l. It is calculated using weight matrix W (l) , which is defined by combining an associative weight value w (l) ij from ith neuron of layer l − 1 to jth neuron of layer l. Learning happens by updating weights using optimisation (training) algorithms. Here a (l) is the activated value of corresponding input value, which is defined using activation function as follows: (1) z (l) = W (l) × a (l−1) Figure 9 presents the proposed flowchart of the estimation/classification model. Details of data cleaning, labelling, and pre-processing steps are given in the next section.

Parameters of the Deep Neural Network model
Hyper-parameters of the proposed model are given in Table 8. The dataset is split into training, validation, and test sets (Tables 4, 5, 6, and 7). Ten different Deep Neural Network models have been defined, combining different batch sizes, the reference value of EOS for different angles, and different numbers of hidden layers. Rectified Linear Unit (ReLU) activation function is used as an activation function along with the Adam optimiser. Keras Sequential model, including dense feature layer, is modelled based on the average surface roughness value.
In order to determine the effect of the number of hidden layers on model learning, different numbers of hidden     different samples with random positions for each dimension have also been investigated in terms of surface roughness. Figure 11 represents the distribution of the roughness measurement of the samples, which have random position parameters for each angle, including 0, 45, 90, and 135°.

Experiments
As can be seen in Table 9, the reference (threshold) value for the measured surface roughness is defined in two pathways: the first is considering the average value surface roughness measurements of the related angles. The measurement for the EOS sample for each angle, including 0, 45, 90, and 135°, is defined as a reference value to detect the roughness of the related samples. Hence the threshold value of the samples is defined as 10 for angle 0, 12 for angle 45, 15 for angle 90, and 22 for angle 135. The second pathway uses 11 as a standard threshold value for each angle as it is claimed as the threshold value for the default EOS sample with angle 0.
We have proposed two approaches for labelling the data according to these definitions. The first is labelling the data samples by considering the EOS samples combined with different angles, including 0, 45, 90, and 135°. The dataset samples have been labelled as "ROUGH" if the surface roughness value exceeds the EOS reference value and as "SMOOTH" if not. The second approach is labelling the dataset by considering the average threshold value. Since the production temperature of 168 °C at 100-µm layer thickness using PA12 powder (PA2200) with EOS P110 Formiga system and standard "Default_EOS" parameter was measured as 11 µm, we claimed the threshold value as 11.

Results
We compared the performance of the proposed architecture with two different machine learning models: the Support Vector Machine (SVM) and Naïve Bayes (NB) models. Table 9 and Table 10 report the experimental accuracy and loss function results. Table 9 summarises the accuracy and loss values of ten different deep learning models defined by different hyper-parameters, as shown in Table 9. Figure 12 presents an example of training and validation accuracy results over 100 training epochs.      Table 9 presents the performance comparisons of DNN, SVM, and NB models in train and test accuracy. Even though DNN has been modelled with only two hidden layers and without the need for feature engineering, it performed better than SVM and NB architectures, which are required to combine all features.
The proposed model was also tested using a random sample dataset to demonstrate the effect of position features on surface roughness. As shown in Fig. 12, the distribution of the surface roughness value of each sample with random positions for each degree is over the threshold value and should be classified as ROUGH. Random samples have been classified using the proposed DNN model, which is trained using the same hyper-parameters, except for the training and test sets. The training set includes 64 samples, and the test set includes 24 randomly positioned samples. According to the experimental results, Fig. 11 Random placements of six parts in a production chamber of an EOS Formiga 110 system (left). The distribution of the roughness measurement of the samples, which have random position parameters for 0°, 45°, 90°, and 135° (right)  Table 10) as expected.
The test set is essential to show the robustness of the model whilst considering other conditions in the same angle configurations in this experimental setup. The performance of the DNN models using the test set is presented in Table 11.

Conclusion
This paper presents a surface roughness dataset and estimation model based on Deep Neural Networks for additive manufacturing. The powderbed technology in additive manufacturing yields promising results under many constraints. The mathematical definition of those constraints allows researchers to increase automation in the process. However, additive manufacturing constraints are not easy to model since their complex nature. Artificial Intelligence tools play a vital role in implementing these highly complex systems into heuristic models.
The proposed model focused on selective laser sintering (SLS) technology based on polyamide 12 powders. The most labour-intensive part of SLS technology is considered the production planning phase. Finding a proper orientation considering surface roughness whilst nesting parts in the production chamber is a mounting manual work where success depends on user experience. The primary proposition of the research is based on the orientation of the parts in various positions in a production chamber. Since it is impossible to create a mathematical model in these highly complex systems, we proposed a heuristic model based on Artificial Intelligence, which employs many data points to simulate the system's constraints. The surface roughness problem is considered one of the constraints to achieving higher quality and better functionality of the final part. Thus, the study focused on this constraint to create an automated process to classify the surfaces as ROUGH or SMOOTH.
A comprehensive dataset is designed to simulate the surface of the parts manufactured in an industrial SLS machine (EOS© Formiga P110) based on a three-dimensional positioning strategy. A test set is also created in random positions to test the robustness of the model. The specimens are placed to represent the solution space as uniformly as possible. All the specimens are produced, and surface roughness values are measured from four different angles (0°, 45°, 90°, and 135°). The proposed classification model is based on Deep Neural Networks (DNN) with hyper-parameters designed for the problem. Dataset is employed by the model for training surface roughness classification and testing the robustness of the model by samples manufactured in random positions.
In the dataset, the best roughness configuration is defined as S 5 along with original EOS parameters. Model 6 and Model 7 are chosen as optimum DNN models. The results show that the DNN model can identify sample  surfaces as ROUGH or SMOOTH with a very high percentage depending on their positions and orientations. The success rate reached 95.8% for the training set. The test rate converged to 100% for the test set. The performance of the proposed architecture is benchmarked with the Support Vector Machine (SVM) and Naïve Bayes (NB) models. Benchmark results show that the DNN performed better test accuracy than the SVM and NB.
Author contribution Ebubekir Koç: research main theme, data preparation, algorithm design and implementation, and experimental studies; Sultan Zeybek: data pre-processing and Deep Learning Networks implementation; Burçin Özbay Kısasöz: SLS production parameter determination and characterisation studies; Cemal İrfan Çalışkan: the sample design process and CAD modelling; and M. Enes Bulduk: production planning, SLS production, and post-process.
Funding This study was carried out using the infrastructure and research funding provided by the ALUTEAM-Aluminum Test Training and Research Center of Fatih Sultan Mehmet Vakif University. The research infrastructure is supported by the Istanbul Development Agency (ISTKA) and the T. R. Ministry of Industry and Technology.

Data availability
The authors confirm that the data and material supporting the findings of this work are available within the article.

Declarations
Ethical approval The article follows the guidelines of the Committee on Publication Ethics (COPE) and involves no studies on human or animal subjects. Consent to participate Not applicable. The article involves no studies on humans.
Consent for publication Not applicable. The article involves no studies on humans.

Conflict of interests
The authors declare no competing interests.