Prediction and Comparison of Electrochemical Machining on Shape Memory Alloy(SMA) using Deep Neural Network(DNN)
Article information
Abstract
Nitinol is an alloy of nickel and titanium. Nitinol is one of the shape memory alloys(SMA) that are restored to a remembered form, changing the crystal structure at a given temperature. Because of these unique features, it is used in medical devices, high precision sensors, and aerospace industries. However, the conventional method of mechanical machining for nitinol has problems of thermal and residual stress after processing. Therefore, the electrochemical machining(ECM), which does not produce residual stress and thermal deformation, has emerged as an alternative processing technique. In addition, to replace the existing experimental planning methods, this study used deep neural network(DNN), which is the basis for AI. This method was shown to be more useful than conventional method of design of experiments(RSM, Taguchi, Regression) by applying deep neural network(DNN) to electrochemical machining(ECM) and comparing root mean square errors(RMSE). Comparison with actual experimental values has shown that DNN is a more useful method than conventional method. (DOE - RSM, Taguchi, Regression). The result of the machining was accurately and efficiently predicted by applying electrochemical machining(ECM) and deep neural network(DNN) to the shape memory alloy(SMA), which is a hard-mechinability material.
1. Introduction
Nitinol is one of shape memory alloy which is difficult-to-process materials containing not less than 50% nickel. Nitinol is known as a novel materials that is restored to a memory form as the crystal structure changes at certain temperatures. Especially, Nitinol is used for body insertion stents, artificial muscles, and is utilized in the micro-sensor, actuator and aerospace industries.
Currently, the typical method of processing Nitinol is laser machining. But laser processing, like mechanical machining, has problems that cause heat deformation and residual stress after processing. Large parts do not need to be considered for residual stress and heat deformation. However, in the related advanced parts industry, such as electronics, machinery and semiconductors, where the miniaturization of components and high precision quality are required, residual stresses and heat deformation must be considered. Also, laser machining at high temperatures is not an appropriate method because shape memory alloys(SMA) have different shapes depending on temperature.
Therefore, a number of studies have been conducted that apply a variety of special processing techniques to difficult-to-process materials, including Nitinol. In this study, I used a shape memory alloy(SMA), one of which is difficult to process [1].
Among them, electrochemical machining(ECM) is a special processing method using electro-chemical properties. It is a contactless machining method that allows the form or surface to be machined by concentrating current on the area where removal is required. Electrochemical machining(ECM) is processed by connecting the workpiece to the anode(+) and applying an electrical current through the electrolyte to the cathode(−), using the oxide reduction of the metal, to produce hydrogen gas. The workpiece is machined by elution by electric coupling in the electrolyte. Electrochemical machining(ECM) does not generate residual stress, heat deformation layer, and burrs compared to conventional machining, and is capable of machining regardless of material strength, hardness, and toughness [2,3].
In addition, as products require ultra-precision, conventional experimental planning methods that obtain the maximum information with minimal experimentation on advanced composite materials have limitations to be applied.
Therefore, this study applied deep neural networks (DNN) to electrochemical machining(ECM), which provide more accurate data than traditional design of experiments (DOE). The characteristics of electrochemical machining are predicted and compared for three conditions : voltage, IEG and machining time. Then, I evaluated the root mean square errors (RMSE) against the deep neural network(DNN), response surface method(RSM), and regression equation against actual experimental values [4,5,6].
In the future, the study will make a database of current densities and material removal, measured from the nitinol workpiece in the coupons, through Deep Learning, and create a regression equation between the two relationships. Entering the conditions will help you to predict the amount of material removal and monitoring the machining through the current density [7,8].
2. Deep Neural Network
2.1 Deep Neural Network structure
Deep neural network is a structure that implements human neural networks by building multiple layers, Hidden layer, between the input and output layers. Deep neural network can model complex nonlinear relationships by adding nonlinear functions. Several different layers can be weighted to model a more accurate relationship.
The basic functions and structure are as follows.
w : Neural network weight coefficient
x : Neural network input
b : Bias
The Fig. 2 shows the structure of the DNN used in this study.
It consists of four layers starting with all three input layers or with a selected value. The first floor is consisted of 50 nodes, the second floor is 20 and the third floor is 10. In this way, building multiple basic network structures will result in a Deep Neural network, as shown in Fig. 2. As shown in Fig. 1, one or more hidden layers in the middle are used so that a given input value can be processed through several hidden layers. This means that more abstract data representations can be found across each layer, thereby gaining effective machine learning performance.
2.2 Deep Neural Network training
Typical nonlinear function formulas used in neural networks include ReLU(Rectified Linear Unit), Sigmoid, Softmax, and Tanh. Among these, ReLU and Softmax were used in this study.
Table 1 shows the nonlinear function of the ReLU and Softmax.
Each layer used the ReLU function as an active function and Softmax function at the output layer. The Softmax function is a non-linear function that is often used in the last output layer of a neural network to represent probability values for each As a cost function, the Mean Square Error is used, as shown in Equation 2, mainly when regression analysis is intended.
Because of deep neural network(DNN) objective function is a non-linear function, it is difficult to determine the optimum weighting factor by a single calculation.
Therefore, in this study, a Back Propagation Algorithm with coefficients based on the Gradient Descent method was used. To prevent overshooting, the learning rate was tested and the result was set at 0.001. Additionally, batch size was set to 3, and the optimizer used Adam with proper step direction and step size as shown in the Fig. 3 [9,10,11].
3. Experimental
3.1 Experimental Setup
Electrochemical machining occured connecting a workpiece with an oxide (+) electrode and a tool (−) electrode, and circulating the electrolyte between the electrodes while applying current. A contact-less machining method is based on the principle that metal is eluted from a workpiece.
Fig. 4 shows the schematic diagram of the electrochemical machining used in this study. The anode was connected with a workpiece, nitinol, and the cathode was supplied with an electric current by connecting tungsten, acting as an electrode. The gap was regulated by a CNC machine and was circulated through the pump for the electrolyte. In addition, current were measured through current sensors and the measured current data were used to monitor if the current uniform machining.
And the workpiece used a shape memory alloy(SMA), a type of hard-mechinability material. Because shape memory alloys(SMA) change shape according to temperature, conventional processing with laser is not suitable. Therefore electrochemical machining( ECM) with a few temperature change is suitable for shape memory alloys(SMA) such as nitinol.
3.2 Experimental Condition
Voltage, IEG and Machining time are the main processing conditions in electrochemical machining (ECM).
Table 2 shows the experimental conditions in this study.
In general experimental planning, a total of 125times tests with the 3 factor and 5 element will produce accurate results, but it takes a very long time. However, in experiments using Deep Neural Network, it is not necessary to test variables in all conditions. Therefore, in this study, we randomly selected 25 experimental conditions and conducted three experiments for each condition. Finally, the output data is selected by hole size and depth.
4. Results and Discussion
The 25 times experiment conditions and results are shown in Table 3.
Fig. 5. shows a picture of the hole and depth after the experiment is completed.

Picture of the hole and depth measurement. (A) Number of condition 4, (B) Number of condition 8, (C) Number of condition 10, (D) Number of condition 22.
The measured data were analyzed through Deep Neural Network, Respond Surface Methods, Taguchi, and Regression Analysis. The following Table 4 compares the Root Mean Square Error(RMSE) Deep Neural Network(DNN), Respond Surface Methods( RSM), Taguchi, and Regression analysis.
Root Mean Square Error(RMSE) is the square root of the arithmetic mean of the sum of squares of the residuals, which is the reciprocal deviation between the observations. In other words, it is a measure used to indicate the difference between the actual value and the estimated value as a generalized measure of standard deviation.
As Table 4 shows, Root Mean Square Error (RMSE) value for Deep New Network(DNN) is the lowest. As shown in Table 4, Deep Neural Network (DNN) have the lowest root mean square error (RMSE) between experiment and predicted data. Therefore, DNN based processing prediction is the most suitable model for electrochemical machining
As a result of training, Train Score for hole size was showed 86.51 RMSE and Test score at 122.28 RMSE. In the same way, Train Score and Test Score for Depth were 10.78 RMSE and 15.98 RMSE, respectively.
Fig. 6 shows the predicted value (Blue) and actual value (Orange) as a result of simulating the hole size and depth with a Deep Neural Network (DNN).
As shown in Fig. 6, actual and predicted values are quite consistent.
To verify this, five random processing variables are selected in Table 5 and the result values are shown. To show which prediction model is the most accuracy, we compared DNN, RSM, Taguchi, Regression analysis with experimental values at the hole size and depth.
Based on the results of the smallest root mean squares error (RMSE) in Table 4, the estimated model using DNN was assumed to be the most accurate, consistent with the prediction results, as shown in the Table 5.
Also, to verify deep learning results, I have plotted the fit function on a graph.
Fig. 7 shows a fit graph for hole size and depth, respectively. As shown in Fig. 7, both learning results show that loss values are collected below 0.001 and there is no overfitting. Both studies show an accuracy of more than 0.8, indicating that they have been made correctly.
Fig. 8 is part of DNN cording showing predictions of hole size and depth through simulation
In Fig. 8, the red ellipse is the input of the processing conditions, and the blue ellipse is the result of predicting the hole and the depth, respectively. Fig. 9 shows the picture taken after the experiment was conducted under the conditions of Table 5.

Experimental results for prediction of processing. (A) Number of condition 3, (B) Number of condition 9, (C) Number of condition 19, (D) Number of condition 23.
The above results show that the deep neural network (DNN) model is a better model than conventional experimental planning methods in predicting electrochemical machining (ECM).
5. Conclusions
In this study, I used deep learning techniques for electrochemical machining processing to predict the mechinability and compare other design of experience. The prior study revealed that the machining time, voltage and IEG were the main factors in electrochemical machining and the hole size and depth were selected as the output data. Three measurements were taken for each condition, and the mean values were used for the analysis. If the current value of a sensor increases or decreases excessively during processing, the test is stopped immediately and the test is performed again. Based on data obtained through experiments, it is predicted that hole size and depth are predicted by applying Deep Neural Network (DNN), a kind of deep learning.
A total of three hidden layers were used in the Deep Neural Network (DNN) model, with 400 times training applied. In the nonlinear function equation, the ReLU and Softmax were used. To determine the appropriateness of the experiment, I compared DNN’s root mean square error (RMSE) values with Response Surface Method (RSM), Taguchi and Regression analysis, which are most commonly used in electrochemical machining (ECM). Comparison of root mean square error (RMSE) values showed that DNN model had the lowest value with hall size 122.28 um and depth 15.98 um. This indicates that the DNN model is most suitable when compared to other design of experiment (DOE) models.
Five experiment conditions were selected to compare the root mean square error (RMSE) of DNN, RSM, Taguchi and regression analysis with the experimental values. As a result, the DNN predicted that the values were very consistent between 98.6% and 100.6%. Therefore, it was concluded that if DNN, one of Deep Learning techniques, one can predict results more accurately than previous design of experimental (DOE) methods.
Comparing the root mean squares error (RMSE) shows that the predicted values using deep neural network (DNN) are more accurate than the design of experiment (DOE) method.
In general, the predicted and experimental values of deep neural network (DNN) showed 0 to 1.5% error. his can be seen as an error for conditions not considered, such as physical shock, vibration, heat generation due to the injection of electrolyte. With this in mind, electrochemical machining hard-mechinability predictions through deep neural networks are possible.
Laser processing, which is mainly used in the processing of shape memory alloys, is not suitable due to its thermal strain sensitive properties. Therefore applying DNN and electrochemical machining( ECM) to advanced materials, such as hard-mechinability shape memory alloys(SMA), provides more accurate predictions and results compared to traditional design of experimental(DOE) methods.
Finally, applying electrochemical machining (ECM) to hard-mechinability materials such as medical, micro sensors, and advance parts alloys can solve problems such as thermal deformation and residual stresses. In addition, the DNN used in this study can be applied to electrochemical machining(ECM) and advanced parts processing using advanced materials for more precise and effective machining.
Acknowledgment
This work was supported by INHA UNIVERSITY Research Grant.