The prediction model for additively manufacturing of NiTiHf high-temperature shape memory alloy

NiTi-based alloys are one of the most well-known alloys among shape memory alloys having a wide range of applications from biomedical to aerospace areas. Adding a third element to the binary alloys of NiTi changes the thermomechanical properties of the material remarkably. Two unique features of stability and high trans- formation temperature have turned NiTiHf as a suitable ternary shape memory alloys in various applications. Selective laser melting (SLM) as a layer-based fabrication method addresses the difficulties and limitations of conventional methods. Process parameters of SLM play a prominent role in the properties of the final parts so that by using the different sets of process parameters, different thermomechanical responses can be achieved. In this study, different sets of process parameters (PPs) including laser power, hatch space, and scanning speed were defined to fabricate the NiTiHf samples. Changing the PPs is a powerful tool for tailoring the thermomechanical response of the fabricated parts such as transformation temperature (TTs), density, and mechanical response. In this work, an artificial neural network (ANN) was developed to achieve a prediction tool for finding the effect of the PPs on the TTs and the size deviation of the printed parts.


Introduction
Shape memory effect (SME) and superelasticity (SE) result in high demand for SMAs in various engineering areas [1,2]. They are the interesting engineering behavior of SMAs that can recover the initial shape of the deformed samples in a stress-free situation or above the transformation temperature. Accordingly, they widely employ in actuation systems or damping/vibration isolation [3][4][5]. Among all shape memory alloys (SMAs), NiTi based alloys due to some unique properties such as high corrosion and wear resistance, large recoverable strain (8%), and biocompatibility have become of interest in many industries, biomedical, and aerospace applications [6][7][8][9]. Adding the third element to NiTi gives metallurgists a powerful tool to manipulate the SMAs properties significantly. Transformation temperature as the key factor of SMAs behavior also can be modified drastically by the presence of the third element [10,11]. Among all possible elements can be added to NiTi, Hf is of big interest to engineers due to its cost (in comparison to other elements which may increase the TTs i.e. Zr, Au, Pt, and Pd), high thermomechanical stability, as well as key features of raising the TTs of NiTi above 100 C [12][13][14][15][16]. NiTiHf as a high-temperature shape memory alloys (HTSMAs) has a wide range of applications in different areas such as aerospace, oil, and automotive industries [11,16,17].
Beside all these unique features making NiTi alloys, a good candidate in many industries, high tool wear, undesirable chip, and burs formation make the manufacturing of the NiTi-based alloys challenging to make the complex shape of these alloys [18][19][20][21]. This provides a significant competitive advantage for the selective laser melting (SLM) as an additive manufacturing (AM) method for metallic parts that have high flexibility [22,23] to build complex shapes layer by layer which overcomes the aforementioned manufacturing challenges [24][25][26][27][28][29][30][31]. It's well reported that the AM process parameters (PPs) such as laser power (P), scanning speed (v), hatch spacing (H), and layer thickness (t) play an important role in the thermomechanical behavior of the NiTi(Hf) fabricated parts. The correlation of these parameters can be defined in energy density (E V = P v.H.t ) impacting the behavior of the final printed parts [25,28,29,32,33]. However, the energy density is not the only key factor and other PPs individually have an impact on the transformation temperatures (TTs), mechanical response, microstructure, and size of the fabricated parts [25].
Nowadays, the machine learning (ML) method has been proved a fast and reliable way to perform complex pattern recognition without solving a physical model. Among various algorithms, Artificial Neural Network (ANN) is a computational model that is widely employed for the large database to solving complicated problems using sophisticated algorithm architecture [34][35][36]. In reality, the ANN model is a powerful prediction tool for discovering intricate relations between input and output results, especially for nonlinear relation such as welding or AM process [37][38][39][40].
Some studies have been reported the application of the ANN method for predicting the operational parameters and consequently optimizing AM processes [41]. Kwon et al. applied an ANN model for the investigation on the effect of laser power in the selective laser melting (SLM) process. They performed this modeling for 13,200 melt-pool images to find out how laser power can form cracks and pores determining the quality and the density of the printed parts [42]. This approach is followed as a convolutional neural network (CNN) approach by other researchers toward robust the quality of AM parts as well as gas porosity, crack, lack of fusion, surface finish quality [43][44][45][46][47]. Mehrpouya et al. also applied the ANN models to predict the influence of the operational parameters in various laser materials processing for both metals and polymers [38,39,48]. In a particular study, they have developed a prediction model using ANN for optimizing the operational parameters in the additive manufacturing of NiTi alloy. The model showed a very good agreement between the predicted values and the experimental data with a rate of 97-99 % [49].
This paper aims to show the capabilities of the ANN model for optimizing the operational parameters in various manufacturing processes. This particular study investigates the influence of input parameters, namely laser power, laser scanning speed, and hatch spacing, in additive manufacturing of NiTiHf high-temperature shape memory alloy. In particular, the ANN model is employed as a nonlinear model to develop the correlation between inputs and the experimental results including transformation temperature (TT) and the width of the printed samples. As a result, this model can be applied as a cheap and fast prediction tool for finding the optimal operational parameters in the AM process of NiTi alloys.

Material and methods
The vacuum induction skull melting technique was used to produce an ingot of slightly Ni-rich Ni50.4Ti29.6Hf20 (at. %). NiTiHf powders was produced via Electrode Induction-melting Gas Atomization (EIGA) by TLS Technique GMbh (Bitterfeld, Germany). Then, the powder was sieved to achieve a size distribution of 25− 75 μm. An SLM machine ProX200 Phenix Systems (currently 3D Systems) equipped with a 300 W Ytterbium fiber laser, was employed to build the parts. Printed parts had identical CAD sizes of 4*4*10 mm as shown in Fig. 1. The CAD files were then sliced into layers and multiple coupons were fabricated using different combinations of laser power (P), laser scanning speed (SS), and hatch spacing (H) which is the distance between two consecutive laser   passes. Since there was no available literature on process optimization of NiTiHf alloys an experiment was designed to cover wide a variety of PPs while keeping the number of samples at a reasonable number due to cost issues and difficulties in characterization. Therefore, based on our previous experience with NiTi processing optimization [49,50], P, SS, and H were changed in the range of 100− 250 W, 200− 1000 mm/sec, and 60− 140 μm, respectively. PPs have been presented in Table 1 and schematically are shown in Fig. 2. As it is evident from Fig. 2, PPs were chosen in a way to see the effect of one parameter while the rest is constant. The layer thickness (d) was constant at 30 μm for all the conditions. We note that PPs resulted in an energy density (E = P/(SS*H*d)) range of 55.5-347.2 J/mm 3 to in one hand ensure effective melting of the powder bed to avoid porosity and on the other hand avoiding excessive temperature gradients, residual stresses, and oxidation. Argon was continuously purged inside the fabrication chamber during processing. The argon atmosphere resulted in a low oxygen level of 700 ppm and below for minimizing the impurity pick-up during the process. A bidirectional raster scanning strategy was chosen to fully meltdown the powder and create coupons as depicted in Fig. 1. Based on the ASTM standard, the TTs were determined by the tangent method from the DSC curve obtained from a Perkin-Elmer Pyris 1 Differential Scanning Calorimetry (DSC) at the heating/cooling rate of 10 C/min in the nitrogen atmosphere. DSC was run twice for each condition and Af is reported from the second trial. For the size measurements, the top, middle, and bottom parts of the coupon were measured several times and the average of the measured values is reported. More information on the fabrication process can be found in [25].

The applied ANN models
ANN model can process a large number of information or signals in sort of simple elements to find a direct link between input and output data sets. It is inspired by biological nervous systems as well as the human brain. In general, ANN involves two phases including the phase of learning and also recall. The input and output data sets are connected with the application of the special weight rates during the learning phase, then the recall phase employs one pass using the calculated weight obtained in the learning phase. As a matter of fact, ANN can be considered as a system or model which uses many neurons to generate one or multi-layers between input and output for solving the problem [51,52]. To find the optimal operational parameters in additive manufacturing of NiTiHf alloy, this study applied two diverse ANN models, namely; • Multi-layer perceptrons (MLP) neural network • Radial basis function (RBF) neural network For training the MLP neural network, specific algorithms were employed which mentioned below; • Levenberg-Marquardt (LM) algorithm and an adaptive learning rate backpropagation (BP) algorithm.
The applied software in this study was used to train the neural network models using MATLAB version 2017.

Multi-Layer Perceptrons (MLP)
MLP is the most common type of neural network approach in use today. It has the capability to be applied for a general class of functions such as integral and continuous functions. In MLP, a group of neurons is integrated into some layers, and the first and last layers are input and output data respectively. The rest of the layers between them are hidden layers. As mentioned before, each layer receives a specific weight and transfer it to the next one. Fig. 3 illustrates a schematic of the MLP model with specified layers. The applicable formulations for the MLP model are mentioned as follows. Eq. (1) estimates the sum of all weighted input signals, then transmits to the nonlinear activation functions in Eq. (2). In the end, the network error is estimated through Eq. (3) based on a comparison between the modeling and the actual results. This process continues until to obtain an acceptable error for the process.
Where Y i is the response of the neuron ˙i , f(Y net ) is the nonlinear activation function, Y net is the summation of weighted inputs, X i is the neuron input, W i is the weight coefficient of each neuron input, W 0 is bias, J r is the error between the observed value and network response, O i is the observed value of the neuron ˙i . Also, the sigmoid activation function is used in the training and testing of models in this study [53].

Radial Basis Function (RBF)
RBF is a class of neural networks with a wide application for solving  various problems in science and engineering [54]. Similar to the MLP model, this network has three layers including input, output, and hidden layers, and the hidden layer includes a nonlinear activation function based on the multivariate Gaussian function (4), which is mentioned in below: Where x is the input vector for the neuron, tj is the set of reference values, σj is the standard deviation (σ 2 is the variance) of the function for each of the centers (j), and the value r (||x-tj||) is the Euclidean distance between a center vector and the set of data points [55]. Fig. 4 depicts a schematic of the RBF model that input (X 1 , X n ) and output (Y 1 , Y n ) vectors are connected through radial basis functions. As can be seen, there is not a weighted between inputs and hidden layers in the RBF model while the link between the hidden layer and output is weighted [56,57]. The neurons in the hidden layer apply the functions to estimate various parameters as the final output resulting from the network.

Neural network setup
Two types of neural networks, including MLP and RBF models, were used to predicts the operational parameters in additive manufacturing of NiTiHf shape memory alloy. In particular, the experimental parameters, namely laser power, laser speed, and hatching space, were considered as the input parameters for the ANN models, while the transformation temperature and width of samples were chosen as the output of the models. All investigated samples in this modeling are divided into three groups; • 60 % training • 20 % cross-validation • 20 % testing Fig. 5 demonstrates the ANN model in this study including two hidden layers applied for both MPL and RBF models. This model includes the process parameters (laser power, laser velocity, and hatch spacing) as the inputs and also transformation temperature and sample width in the outputs. However, it is notable that the transformation temperature and sample width attend to the input subset separately to enhance the accuracy of the neural model [49,58].

The experimental results
To evaluate the effect of PPs on the dimensional accuracy and TTs of the fabricated samples, width and austenite finish temperatures were measured and tabulated in Table 2. A size deviation up to 25 % was observed based on the condition. Energy density and scanning speed were the significant factors among PPs affecting the size of the parts. As the energy density increased, melt pools expanded and got larger, more powder was attached to the surrounding of the parts and as a result, printed samples' width varied compared to the CAD file and increased in sizes. Moreover, this size deviation was linearly increased by decreasing the scanning speed. No significant changes were observed by changing hatch spacing and laser power. In term of TTs, samples could be categorized into three different ranges (100 ℃ -200 ℃ ; 200 ℃ -300 ℃ ; 300 ℃ -400 ℃) based on their austenite finish temperatures. There are several mechanisms affecting TTs in NiTi alloys; two of which are nickel content and impurity content (oxygen, carbon …). During the hightemperature melting process of AM, Ni evaporation is one of the main reasons that deplete the matrix resulting in higher TTs. In addition, impurities such as oxygen pick up, created Ti(Hf) precipitates which result in lower TTs. The general trend of TTs showed that the higher energy density resulted in a higher loss of Ni content from the matrix, so the TTs went up. It should be noted that the TTs were not solely affected by energy density, each individual parameter can impact the TTs. For example, based on the Austenite finish temperatures obtained from DSC curves Plotted in Fig. 6, the samples 21 (Ev = 210 J/mm 3 ) and 12  (Ev = 218 J/mm 3 ) approximately had the same energy density, but the TTs are 144 C and 347 respectively. This showed that energy density is not the only reason for various TTs. Among PPs, laser power plays a more significant role with respect to scanning speed and hatch spacing. Based on the results, on the same level of the energy density, the higher power resulted in higher TTs. Since the focus of this paper is more on the modeling, a more in-depth analysis of the experimental data, as well as more information on the effect of PPs, can be found in [25].

Modeling of experimental data and results
The results of the ANN models, including MLP and RBF models, were compared together according to the coefficient of determination (R 2 ). In fact, the R 2 index represents a linear correlation between the predicted and measured values. The outcomes of the MLP model including testing  Table 3 The statistical report of linear regression in the training/testing phase for width and transformation temperature for the MLP model.

Networks
Training Testing  Fig. 9. Comparison between the measured and predicted width (above) and transformation temperature (bottom) in the training/testing phase for the RBF model. and training results for sample width (above) and transformation temperature-TT (bottom) are shown in Fig. 7. As can be seen, the graphs illustrate very good fitting lines between the measured experimental and predicted output data set. The scatter diagram in Fig. 8 shows the trend of testing samples for both outputs, transformation temperature and width, based on the MLP model. It shows how the measured and predicted data (based on the model) are close to each other. As a result, Table 3 provides statical reports with more details regards these graphs. As visible, the R 2 index for sample width and transformation temperature are achieved by almost 97.6-97.8 %.
The results of training and testing achieved from the RBF model are shown in Fig. 9 as well. The correlation between the measured and predicted results are presented with a very good fitting for sample width (above) and transformation temperature (bottom). In the following, Fig. 10 provides the trends of testing samples for both width and TT parameters in two scatter diagrams. The predicted results from the model fit closely with the experimental results. Table 4 provides more details related to the predicted results for the RBF model. It is notable that the amount of R 2 index is around 98.8-98.9 % for both outputs parameters including sample width and transformation temperature. This rate is only 1% higher than the MLP model, however, it statistically means a lot and shows a very good fit between the experimental data and the results achieved from the ANN model as well.

Conclusion
The aim of this research is to show the potential of the ANN model for achieving the optimal operational parameters in various manufacturing processes. As a matter of fact, the neural network solution can be very powerful in predicting, controlling, and managing laser processing and can be a suitable alternative to numerical and analytical models. In particular, this paper investigates two neural network models, namely MLP and RBF, to predict the operational parameters in additive manufacturing of NiTiHf alloy. Input parameters, including laser power, velocity, and hatching space, were achieved based on the experiment and utilized as the input for the neural network model as well. In this way, the performance of the models was evaluated through a comparison between the experimental data set and the regression model.
This study presented a reliable prediction model for estimating the transformation temperature and sample width based on various input parameters. The predicted parameters were evaluated quantitively using the mean error method and the coefficient of determination (R 2 ). The results obtained from MLP and RBF models effectively showed a good fit between the experimental and predicted data which proves the reliability of the model for predicting the printing parameters. However, the RBF neural network model represented a better agreement between the predicted values and the experimental data set with the R 2 index around 98.8-98.9 % for both transformation temperature and sample width.  Fig. 10. The trend of testing samples for width (left) and transformation temperature (right)-RBF model. Table 4 The statistical report of linear regression in the training/testing phase for width and transformation temperature for the RBF model.

Networks
Training Testing