Machine Learning Based Surface Roughness Prediction for  
Parameters of ECM  
Sharanya Kalkunte1, Ritish Hullar1, S Divyashree1, Surabhi Satish1, Gajanan M Naik2  
1 Department of Computer Science and Engineering, RV Institute of Technology and Management,  
Bengaluru, India  
2 Department of Mechanical Engineering, RV Institute of Technology and Management, Bengaluru,  
India  
Received: 02 November 2025; Accepted: 10 November 2025; Published: 24 November 2025  
ABSTRACT  
Electrochemical Machining (ECM) is a machining technique which is non traditional used for shaping complex  
components with superior accuracy and surface finish. However, optimizing surface roughness remains  
challenging because of the intricate, non-linear dependency between various process aspects such as electrolyte  
concentration, voltage, frequency, duty cycle, temperature, and feed rate. Traditional trial-and-error or analytical  
approaches are often time- consuming and inefficient. This study introduces a Machine Learning (ML)-based  
predictive modeling approach to estimate and optimize the roughness of the surface in ECM processes using  
data obtained by Chen Xuezhen et al.’s tests on the Ti60 titanium alloy.  
KeywordsElectrochemical Machining, Surface Roughness, Machine Learning, Process Parameters,  
Predictive Modeling  
INTRODUCTION  
Electrochemical Machining (ECM) is a machining technique which is non traditional used for producing  
complex and high-precision components that are difficult to manufacture using conventional methods. It operates  
on the principle of anodic dissolution, where the workpiece (anode) is eroded under a controlled electric current  
in the presence of an electrolyte, while the tool (cathode) remains unaffected. This enables the machining of  
extremely hard materials like titanium alloys, superalloys, and stainless steels without inducing thermal or  
mechanical stresses. Industries such as aerospace, biomedical, defense, and automotive rely heavily on ECM  
because of its skill to produce intricate geometries with excellent surface finish and dimensional accuracy. These  
components were constantly observed and were noticed to be reacting in non-linear ways: for example,  
increasing voltage enhances the rate of dissolution but may also lead to over-etching, while electrolyte  
concentration and duty cycle affect ion mobility and effective machining time. Traditionally, optimization of  
ECM parameters has been achieved by empirical experiments or statistical techniques like Design of  
Experiments (DOE) and Response Surface Methodology (RSM). While these methods provide insights, they  
often fail to capture the complex, multi-dimensional relationships inherent in ECM and require extensive  
experimentation. This has led to growing interest in Machine Learning (ML)-based approaches that can identify  
hidden patterns, predict outcomes, and optimize processes efficiently [1]. Machine Learning offers a data-driven  
way to model and optimize  
ECM by learning from past experimental data and identifying non-linear relationships among parameters. Unlike  
traditional modeling, ML does not need explicit equations depicting the process physics. Instead, it predicts  
machining outcomessuch as surface roughness or material removal ratewith high accuracy, enabling virtual  
experimentation and real-time optimization. In this project, an ML- based predicting model has been developed  
to estimate and optimize the surface rougghness of ECM workpieces using experimental data from Chen  
Xuezhen et al., involving the machining of Ti60 titanium alloya material widely used in aerospace  
applications. The dataset includes a range of parameter combinations such as electrolyte concentration, voltage,  
Page 4202  
frequency, duty cycle, temperature, and feed rate, making it ideal for model training and validation. Two  
regression modelsLinear Regression and Polynomial Regression—are implemented using Python’s scikit-  
learn library[2]. The Linear model captures basic additive trends, while the Polynomial model represents non-  
linear interactions more effectively. The data undergoes preprocessing steps such as outlier removal,  
normalization, and consistency checks, followed by train-test splitting to ensure robust evaluation and prevent  
overfitting. Exploratory Data Analysis (EDA) using visual tools like scatter plots and correlation heatmaps  
reveals that voltage and feed rate strongly influence surface roughness, while duty cycle and temperature have  
moderate effects. These insights align with theoretical expectations and validate the dataset’s reliability. Model  
performance is evaluated using metrics such as Mean Absolute Error (MAE), Root Mean Square Error (RMSE),  
and R². Results show that the Polynomial Regression model performs significantly better, reducing RMSE by  
about 33% and achieving higher R² values. Cross-validation further confirms the model’s robustness and  
generalizability [3]. An interactive visualization dashboard built using Matplotlib and Plotly allows users to input  
process parameters and instantly visualize predicted surface roughness values with confidence intervals. This  
serves as a virtual experimentation tool, helping engineers make informed decisions without conducting costly  
physical trials. The integration of Machine Learning in ECM process optimization represents a shift from  
traditional trial-based approaches to intelligent, data-driven manufacturing. Predictive modeling not only  
minimizes time and cost but also enhances precision and efficiency. The developed framework can be extended  
to real-time control systems, adaptive tuning, and hybrid approaches combining physics-based and data-driven  
methods.In conclusion, this study demonstrates the potential of ML in transforming ECM into a predictive,  
optimized, and efficient process. The developed models enable accurate surface roughness prediction and form  
a foundation for intelligent process automation in modern electrochemical manufacturing, aligning with the goals  
of Industry 4.0.  
LITERATURE REVIEW  
Electrochemical Machining (ECM) has been the focus of extensive research due to its ability to machine hard  
alloys with high accuracy and minimal tool wear. Traditional research has primarily concentrated on  
understanding the electrochemical dissolution mechanisms and optimizing machining parameters using design-  
based statistical frameworks. Early studies employed Response Surface Methodology (RSM) and Taguchi  
analysis to model relationships between parameters such as voltage, electrolyte concentration, and feed rate;  
however, these linear statistical methods often failed to capture the non-linear and interactive nature of ECM  
processes. Recent advancements in machine learning have expanded the scope of ECM research. Wu et al. [7]  
demonstrated that Support Vector Regression improved prediction accuracy for ECM profile shape compared to  
analytical models, especially when machining complex turbine blade geometries. Bahiuddin et al. [1] applied  
Random Forests and Gradient Boosting to forecast surface roughness and reported a significant reduction in  
prediction error compared to RSM. Similarly, Shang et al. [4] developed an Extreme Learning Machine approach  
for ultra-precision milling and emphasized that hybrid data fusion significantly enhances model stability. In the  
domain of unconventional machining, machine learning has shown strong generalization capabilities. Qasem et  
al. [2] used artificial neural networks for EDM roughness prediction and highlighted the superiority of nonlinear  
ML models over conventional polynomial fitting. Batu et al. [3] extended AI-driven roughness prediction to  
additive manufacturing, demonstrating that ML models effectively capture microstructural irregularities that  
conventional models overlook. Within ECM specifically, Rajesh et al. [9] attempted roughness prediction using  
ANN for dry turning, though the paper was later retracted due to data inconsistencies. Nevertheless, their study  
highlighted the increasing dependence on AI-driven models for machining applications. Recent comprehensive  
reviews by Ko et al. [10] and Yang et al. [14] emphasize a shift toward integrating ML with physics-based  
simulations and Digital Twin systems, allowing real-time prediction and closed-loop control of machining  
operations. While various ML techniques have been explored for ECM, many studies suffer from small datasets,  
lack of cross-validation, or limited parameter ranges. Furthermore, only a few works incorporate visualization  
tools or decision-support systems into the predictive framework. Thus, there remains a compelling need for a  
reliable, interpretable, and user-friendly predictive model for ECM roughnessmotivating the development of  
the present study.  
Page 4203  
METHODOLOGY  
This study focuses on developing predictive regression models to estimate surface roughness in Electrochemical  
Machining (ECM) processes using experimentally obtained data. The research utilizes the dataset provided by  
Chen Xuezhen et al., based on controlled machining tests of Ti60 titanium alloy, a material commonly employed  
in aerospace blisks due to its strength and temperature resistance. The experiments were conducted with  
variations in six key process parameterselectrolyte concentration, applied voltage, pulse frequency, duty cycle,  
electrolyte temperature, and tool feed rateeach known to significantly influence the resulting surface finish.  
Surface roughness was measured through profilometry at multiple locations on each machined sample to ensure  
accuracy and account for spatial variations. The dataset, which encompasses a broad range of parameter  
combinations under well-controlled conditions, provides a reliable and comprehensive foundation for  
regression-based analysis. The availability of such a validated dataset eliminates the need for further  
experimentation while ensuring the consistency and reproducibility required for model development. The  
modeling framework involves the implementation of two regression techniquesLinear Regression and  
Polynomial Regression—using Python’s scikit-learn library. The Linear Regression model assumes a  
straightforward, additive relationship between machining parameters and surface roughness, while the  
Polynomial Regression model captures the non-linear dependencies often observed in ECM processes. Prior to  
model training, the dataset undergoes essential preprocessing steps including outlier removal, normalization, and  
data consistency checks to ensure the integrity and uniformity of input features. The dataset is subsequently  
divided into training (70%), validation (15%), and testing (15%) subsets to ensure unbiased evaluation and  
prevent overfitting. Model performance is assessed using standard statistical metrics such as Mean Absolute  
Error (MAE), Root Mean Square Error (RMSE), and the Coefficient of Determination (R²). Cross-validation  
techniques are also employed to verify the robustness and reliability of the models across different data  
partitions. This structured methodology ensures that the developed models are both accurate and generalizable,  
providing valuable insights into the complex interrelationships governing surface roughness in ECM.  
I.  
RESULTS AND DISCUSSION  
Exploratory Data Analysis (EDA) revealed that surface roughness exhibited a distinctly non-linear dependence  
on various process parameters, with voltage and feed rate emerging as the most influential factors. As seen in  
Figure 1 (Correlation Heatmap), strong positive correlations were observed between voltage and surface  
roughness (r ≈ +0.72) and between feed rate and roughness (r ≈ +0.64), confirming their dominant influence on  
machining performance. The scatter plots in Figure 2 further illustrate these trendshigher voltages increased  
the material removal rate but also led to localized over-etching, raising surface roughness beyond the desired  
threshold. Variations in duty cycle and frequency revealed that increasing the duty cycle initially enhanced the  
surface finish up to an optimal point, after which excessive anodic dissolution slightly degraded it. Similarly,  
electrolyte concentration displayed a non-linear behavior, where intermediate values produced smoother  
surfaces, while higher concentrations caused turbulence and irregular ion movement. Overall, the visualizations  
clearly demonstrate the complex interplay among the parameters, validating the need for non-linear modeling  
approaches in predicting surface quality in electrochemical machining.  
Fig 1. Heatmap  
Page 4204  
Feature Importance and Sensitivity Analysis  
Understanding how each machining parameter influences surface roughness is essential for interpreting model  
predictions and improving process control in Electrochemical Machining (ECM). After training the regression  
models, a feature importance and sensitivity analysis was performed to identify which input variables contributed  
most significantly to the predicted roughness values. This analysis not only validates the model’s learning  
behaviour but also provides practical engineering insights into the ECM process. Since Linear Regression and  
Polynomial Regression do not inherently produce feature importance scores like tree-based models, a  
combination of statistical coefficient analysis, correlation studies, and controlled sensitivity testing was used.  
For each parameterelectrolyte concentration, voltage, frequency, duty cycle, temperature, and feed ratethe  
model’s response was observed while systematically varying one parameter at a time and keeping others  
constant. This approach helps isolate the direct effect of each factor on the predicted surface roughness. Across  
both models, voltage and feed rate emerged as the dominant parameters. Voltage showed the strongest influence,  
where increases beyond a certain threshold led to rapid roughness escalation due to intensified anodic  
dissolution. Feed rate exhibited a similar patternhigher feed rates resulted in insufficient time for uniform  
material removal, producing rougher surfaces. The polynomial model captured these non-linear behaviours more  
clearly, showing that small variations in voltage and feed rate could cause disproportionately large changes in  
roughness. The duty cycle and electrolyte temperature demonstrated secondary but still meaningful influence.  
Higher duty cycles improved surface finish up to an optimum value by increasing effective machining time, after  
which excessive current exposure slightly degraded the surface. Temperature affected ion mobility and  
electrolyte conductivity; moderate temperatures contributed to smoother surfaces, while overly high  
temperatures increased turbulence and disturbed the dissolution layer. Electrolyte concentration and frequency  
showed the least direct impact compared to other parameters, although their effects became more noticeable  
when combined with voltage variations. The polynomial model revealed interaction termssuch as voltage ×  
concentrationthat affected roughness more strongly than either variable alone, highlighting the importance of  
capturing parameter interactions in ECM. Overall, the sensitivity analysis confirms that surface roughness in  
ECM is governed by a combination of strong primary factors (voltage, feed rate) and supporting secondary  
parameters (duty cycle, temperature), along with subtle but relevant interaction effects. These findings closely  
align with theoretical machining principles, reinforcing the reliability of the trained models. The insights from  
this analysis can guide engineers in prioritizing which parameters to control most tightly during machining and  
can assist in designing future optimization strategies for achieving consistent and smooth surface finishes.  
Model Testing and Validation  
Both of the models were trained using 70% of the available data and validated on the remaining 30%. The Linear  
Regression model, which captured only additive parameter effects, achieved reasonable precision but struggled  
to account for complex, non-linear interactions among the process parameters. In contrast, the Polynomial  
Regression model (with degree = 2) offered a more flexible fit, allowing it to adapt to intricate patterns in the  
data. This model demonstrated approximately a 33% reduction in RMSE and a notably higher R² value, reflecting  
its stronger predictive capability and its ability to model the non-linear relationships present in the  
Electrochemical Machining (ECM) process. The findings of this study confirm that surface roughness of the  
produced material can be accurately predicted using machine learning methods. Feed rate and voltage emerged  
as the most influential predictors, consistent with the established theoretical understanding of the machining  
process. Temperature and duty cycle were identified as secondary factors that affect the rate of electrochemical  
dissolution and the conductivity of the electrolyte. Through these insights, the developed model functions as a  
virtual surface roughness predictor, enabling engineers to anticipate machining outcomes even before conducting  
physical experiments. To enhance usability, a graphical dashboard was created using Matplotlib and Plotly,  
allowing users to interactively input ECM parameters and visualize the estimated surface roughness values along  
with their respective confidence intervals. This integration of predictive modeling with interactive visualization  
provides a practical decision-support tool for process engineers.  
Page 4205  
Fig 2. Line graph  
Future Scope  
Although the developed machine learning models provide reliable predictions for surface roughness in ECM,  
there is considerable room to advance this work both technically and practically. One of the most promising  
directions is the expansion of the dataset. The current model is trained on controlled experimental data, but  
incorporating real-time machining data from industry would expose the model to wider variations in behaviour,  
material inconsistencies, and environmental influences. This would help the system generalize better and  
perform accurately under production-level conditions. Future studies can also explore additional process  
parameters that were not included in this work but have known influence on ECM dynamicsfor example,  
electrolyte flow rate, tool geometry, inter-electrode gap variation, and gas bubble formation during machining.  
Capturing these aspects would allow the predictive model to represent the electrochemical process more closely  
and improve its robustness. On the modelling front, more advanced algorithms can be investigated. Techniques  
such as Random Forests, Gradient Boosting, Support Vector Regression, and Deep Learning may offer improved  
performance when dealing with highly non-linear relationships. There is also growing interest in hybrid  
approaches that combine physics-based simulations with machine learning, allowing models to retain  
interpretability while still benefiting from data-driven accuracy. A significant future opportunity lies in real-time  
integration. By connecting the prediction model to live sensor data during machining, the ECM system can  
evolve into a self-monitoring and self-adjusting process. This would enable automatic parameter tuning  
whenever surface quality begins to deviate from the desired range, reducing manual intervention and minimizing  
wasted material. Such a system is a natural step toward digital twin platforms, where virtual models continuously  
mirror and adjust physical machining processes. Lastly, the interactive dashboard developed in this study can be  
expanded into a complete decision-support tool. Features such as automated parameter recommendations, multi-  
objective optimization (surface roughness, material removal rate, tool life), and uncertainty estimation would  
make the system more practical for industry use. As ECM continues to play a critical role in aerospace,  
biomedical, and precision manufacturing, intelligent predictive tools like this have the potential to modernize  
machining workflows and significantly reduce cost, time, and trial-based experimentation.  
CONCLUSION  
The model’s robustness was further verified through five-fold cross-validation, which indicated uniform  
performance across all folds with minimal variation (standard deviation of R² ≈ 0.02). Residual analysis showed  
that the errors were randomly scattered, thereby satisfying model assumptions and confirming the model’s  
generalisation ability. Overall, the working of this machine learning-based approach demonstrates a data-driven  
optimization pathway for ECM processes, resulting in fewer experimental trials, reduced material loss, and  
enhanced process efficiency.  
Page 4206  
REFERENCES  
1. Bahiuddin, I. et al. (2025). Machine learning-based surface roughness prediction in ECM. Journal of  
Manufacturing Processes, 68, 1054-1062.  
2. Qasem, I. et al. (2025). Machine Learning-Based Prediction of EDM Material Removal Rate and Surface  
Roughness. Applied Sciences, 9(8), 274.  
3. Batu, T. et al. (2023). Application of Artificial Intelligence for Surface Roughness Prediction of  
Additively Manufactured Components. Materials, 16(18), 6266.  
4. Shang, S. et al. (2023). Surface Roughness Prediction in Ultra-Precision Milling: An Extreme Learning  
Machine Method with Data Fusion. Micromachines, 14(11), 2016.  
5. Ge, Z. et al. (2024). Machine Learning-Driven Optimization of Micro-Textured Surfaces in Ultrasonic  
Vibration-Assisted Milling. Coatings, 14(12), 1539.  
6. Shang, S. et al. (2024). Roughness prediction of end milling surface for digital twin applications. Digital  
Twin, 3(4), 100-110.  
7. Wu, M. et al. (2022). Profile prediction in ECM using machine learning. Lirias, KULeuven.  
8. Antosz, K. et al. (2025). Application of Machine Learning to the Prediction of Surface Roughness in  
Milling Operations. Journal of Manufacturing Processes, 75, 123-134.  
9. Rajesh, A. S. et al. (2022). [Retracted] Machine Learning Approach: Prediction of Surface Roughness in  
Dry Turning of Inconel 625. Journal of Materials Engineering and Performance, 31(9), 6038804.  
10. Ko, J. H. et al. (2025). A review of artificial intelligence application for machining surface quality  
prediction: from key factors to model development. Journal of Intelligent Manufacturing, 36(1), 1-22.  
11. Sharma, V. (2025). Machine learning-based prediction and optimization of surface roughness in FDM.  
Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering Manufacture,  
239(5), 1075-1087.  
12. Shang, S. et al. (2025). Machine learning-based predictive modeling for surface roughness in precision  
machining. Journal of Manufacturing Science and Engineering, 147(4), 041004.  
13. Cebi, A. et al. (2024). Implementation of robotic electrochemical machining in aerospace applications.  
Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering Manufacture,  
238(1), 123-135.  
14. Yang, H. et al. (2024). A review of artificial intelligent methods for machined surface roughness  
prediction. Journal of Materials Processing Technology, 300, 117421.  
15. Kulkarni, T. et al. (2024). Machine learning-based approach for automated classification of ECM and  
cell subtypes. Journal of Manufacturing Science and Engineering, 146(6), 061003.  
Page 4207