J. Electrochem. Sci. Technol Search


J. Electrochem. Sci. Technol > Volume 10(3); 2019 > Article
Song, Choi, and Lee: Prediction and Comparison of Electrochemical Machining on Shape Memory Alloy(SMA) using Deep Neural Network(DNN)


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.
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.
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.
  1. 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.

  2. 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.

  3. 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.

  4. 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.


This work was supported by INHA UNIVERSITY Research Grant.

Fig. 1
The neural network structure.
Fig. 2
Structure of the deep neural network.
Fig. 3
Types of optimizer
Fig. 4
Schematic diagram of an experiment.
Fig. 5
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.
Fig. 6
Predicted value and Actual value as a result of simulating the hole size and depth with a DNN.
Fig. 7
Fitting result on accuracy and loss value hole size and depth.
Fig. 8
Part of DNN coding showing prediction results.
Fig. 9
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.
Table 1
Nonlinear function
ReLU f(x) = max(x, 0)
Softmax f(xj)=exjΣiexi
Table 2
Experiment Condition
Conditions Value
Applied Current 5A
Applied Voltage 5, 10, 15, 20, 25V
Machining Time 50, 100, 150, 200, 250sec
IEG 200, 400, 600, 800, 1000um
Electrolyte NaCl (18wt%) + DI water
Electrode Tungsten Rod (Ø500um)
Workpiece Nitinol(20×20×2mm)
Table 3
Result of experiment
Number Machining Time(s) Voltage(V) IEG(um) Hole size(um) Depth(um)
1 50 5 1000 617.1 611.1 621.4 17 18.8 16.7
2 50 10 800 2221 1861.8 1932 40.6 66.1 44.7
3 50 15 600 2804 2914.7 2884.1 112.9 108.1 119.1
4 50 20 400 3760 3671 3715 240.5 221.1 259.1
5 50 25 200 4372 4311 4412.1 362.1 360.1 347.1
6 100 5 800 913.1 911.1 899.1 66.2 72.1 69.1
7 100 10 600 2563 2461.9 2611.7 154.2 137.7 169.4
8 100 15 400 2508 2441.9 2610.9 294.6 288.4 299.9
9 100 20 200 4735 4432.9 4832.1 488.4 491.9 485.6
10 100 25 1000 3677 3541.1 3688.2 173.3 176.1 164.9
11 150 5 600 817 831.1 809.1 19 23.7 22.96
12 150 10 400 2525 2417 2622 259 244 269
13 150 15 200 4180 4099 4217 511 508 539
14 150 20 1000 3745 3689 3810 231.1 249 221
15 150 25 800 4040 4028 4101 340.6 349 331
16 250 5 400 1035 1027 991.1 66.78 67.1 54.9
17 250 10 200 2946 2827 2981 398.6 400.1 405.5
18 250 15 1000 3744 3814 3711 264.1 268.2 269.4
19 250 20 800 3755 3515 3741 379.9 383.1 372.1
20 250 25 600 5011 5019 4891 557.7 558.1 603.1
21 300 5 200 899.2 917.1 911.1 109.7 88.1 96.1
22 300 10 1000 1417 1312.1 1415.1 175.8 172.1 196.3
23 300 15 800 3719 3612 3851 379.7 398.1 377.6
24 300 20 600 4147 4141 4089 538.5 527.7 551.3
25 300 25 400 5158 5217 5123 817.1 806.1 827.5
Table 4
Comparison of RMSE
DNN RSM Taguchi Regression Analysis
RSME of hole size 122.28 324.25 515.4 506
RSME of depth 15.98 28.74 125.4 95.29
Table 5
Comparison of deep neural network(DNN) and actual experimental values
Hole size/Depth Exp. No. 3 Exp. No. 9 Exp. No. 13 Exp. No. 19 Exp. No. 23

50s 15V 600um 100s 20V 200um 150s 15V 200um 250s 20V 800um 300s 15V 800um
Prediction using DNN 2867um (100.5%) 113um (100.3%) 4667um (100.0%) 491um (100.6%) 4168um (100.1%) 521um (100.3%) 3670um (101.9%) 373um (98.6%) 3737um (100.3%) 387um (100.5%)
Prediction using RSM 2830um (98.7%) 128um (112.9%) 4492um (96.3%) 488um (99.3%) 4054um (97.3%) 483um (92.7%) 4098um (111.7%) 426um (114.2%) 3170um (85.0%) 334um (86.3%)
Prediction using Taguchi 3203um (111.7%) 189um (116.7%) 4261um (91.3%) 422um (85.8%) 3890um (93.4%) 400um (76.8%) 4141um (112.8%) 394um (105.6%) 3359um (90.1%) 402um (103.8%)
Prediction using Regression Analysis 2789um (97.3%) 172um (151.7%) 4095um (87.8%) 411um (83.6%) 3292um (79.0%) 360um (69.1%) 3848um (104.9%) 401um (107.5%) 3044um (81.66%) 349um (90.1%)
Experience value 2867um 113um 4666um 488um 4165um 519um 3670um 378um 3727um 385um


[1] Y. Guo, A. Klink, C. Fu and J. Snyder, CIRP Annals., 2013, 62(1), 83–86.
[2] DS. Jin, KH. Chun and ES. Lee, CJA., 2017, 30(3), 1231–1241.

[3] SH. Kim, SG. Choi, WK. Choi, BY. Yang and ES. Lee, Applied Surface Sci., 2014, 314, 822–831.
[4] WJ. Song and ES. Lee, J Korean Soc Manuf Process Eng., 2017, 16(5), 141–149.

[5] SG. Choi, SH. Kim, WK. Choi and ES. Lee, IJAMT., 2016, 82(9–12), 1933–1939.

[6] TN. Tsai and . ML, Applied Soft Comp., 2016, 48, 124–136.
[7] JK. Kim, BD. Kim, DW. Yoon and JW. Choi, J Korean Ins Infor Tech., 2016, 14(12), 107–115.
[8] S. Ranganathan, T. Senthilvelan and G. Sriram, Materials Manuf Process., 2010, 25(10), 1131–1141.
[9] MS. Sukumar, P. Venkata Ramaiah and A. Nagarjuna, Procedia Eng., 2014, 97, 365–371.
[10] Z. Chen, S. Deng, X. Chen, C. Li, RV. Sanchez and H. Qin, Microelectronics Reliability., 2017, 75, 327–333.
[11] Z. Yin and J. Zhang, Neurocomputing., 2018, 283, 266–281.
[12] A. Ş, Acta Polytec Hungarica., 2011, 8(2), 22–32.

Share :
Facebook Twitter Linked In Google+ Line it
METRICS Graph View
  • 1 Crossref
  • 1 Scopus
  • 2,420 View
  • 83 Download
Related articles in J. Electrochem. Sci. Technol


Browse all articles >

Editorial Office
E-mail: journal@kecs.or.kr    Tel: +82-2-568-9392    Fax: +82-2-568-5931                   

Copyright © 2022 by The Korean Electrochemical Society.

Developed in M2PI

Close layer
prev next