# The Digital Twin Application for Micro-Tool Wear Monitoring with Open-Source CAD System

Unknown owned Christiand, Gandjar Kiswanto, Ario Sunar Baskoro

► To cite this version:

Unknown owned Christiand, Gandjar Kiswanto, Ario Sunar Baskoro. The Digital Twin Application for Micro-Tool Wear Monitoring with Open-Source CAD System. IFIP International Conference on Advances in Production Management Systems (APMS), Sep 2022, Gyeongju, South Korea. pp.11-18, 10.1007/978-3-031-16411-8_2. hal-04768986

HAL Id: hal-04768986

https://inria.hal.science/hal-04768986v1

Submitted on 6 Nov 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
# The Digital Twin Application for Micro-Tool Wear Monitoring with Open-Source CAD System

Christiand¹,², Gandjar Kiswanto¹, and Ario Sunar Baskoro¹

¹ Universitas Indonesia, Depok, Indonesia,
gandjar_kiswanto@eng.ui.ac.id,
www.ui.ac.id

² Universitas Katolik Indonesia Atma Jaya, Tangerang Selatan, Indonesia
https://robot.atmajaya.ac.id

**Abstract.** The digital twin technology offers a tight coupling between the simulated process and the actual world events. In the field of tool wear monitoring (TWM), such system characteristic is essential to maintain the accuracy of the wear prediction by taking into account the actual condition data during the machining process. This paper presents the implementation of the digital twin technology where the micro-milling machining process is simulated by using the spindle controller, spindle motor, and cutting torque model. The wear monitoring was performed by comparing the spindle motor's simulated and real-time electric current. A virtual environment was developed using FreeCAD - an open-source CAD system, to represent the processes and objects involved in the machining. The digital twin framework ensures that the simulation and real-time data were synchronized in the virtual environment. This paper focuses on the building blocks and technical implementation in realizing a digital twin application in the domain of micro-tool wear monitoring.

**Keywords:** digital twin, tool wear monitoring, micro-milling, FreeCAD

## 1 Introduction

Tool wear monitoring (TWM) has been actively researched for two decades. The research aimed to develop a system or method that accurately predicts the actual wear of the tool during the machining process. TWM system has an important role in achieving the properties of high-quality machining, i.e., excellent surface integrity, accuracy, and cost-efficiency. TWM systems were mostly developed for the macro-machining application, such as macro-milling or micro-turning. However, the increasing demand for miniaturization of many advanced devices with micro-feature, such as bio-sensor with their micro-fluidic channel, has stimulated the expansion of TWM research to the micro-machining domain. In particular, many recent works of TWM development were focused on improving the micro-machining quality for micro-milling applications due to the advantages of micro-milling compared to other micro-fabrication methods. Some of the
micro-milling advantages are macro-milling technique derivation and the ability to process 3D-complex geometry with various materials. However, micro-milling is very susceptible to tool breakage due to the rapid wear during the machining and the downsized dimension of the tool. Therefore, the TWM system is needed and has become an important part of the high-quality micro-milling process.

Industry 4.0 has brought one key-enabler technology named **digital twin** (DT) to seamlessly combine the simulation and the real world for providing various services. This new technology allows the development of a new class of TWM methods that combines simulation and real-time data simultaneously. Within the future smart factory of Industry 4.0, the digital twin approach is very plausible since the computing power for the simulation process equipped with a high-speed sensors network will be common in the machining environment of the future smart factory. Thus, both simulation and real-time data acquisition can be executed and integrated seamlessly. Even more, the DT-based TWM may anticipate and benefit the advancement in the field of industrial sensors in the future since the newly developed sensors can be easily integrated into the existing sensor networks.

This paper presents the development of a DT-based TWM system for the micro-milling application. The micro-milling process was simulated by using the spindle motor model, the spindle controller model, and the cutting torque model. The wear monitoring was performed by comparing the simulated and the real-time electric current from the built-in sensor of the spindle motor. The virtual environment was built by using FreeCAD - an open-source CAD system. The development was targeted for the broad range of machining sites to represent the micro-milling process and all the machining objects. The DT synchronizes the data from the simulation and real-time data acquisition inside the virtual environment. The presentation of this paper focuses on the building blocks and technical implementation in realizing a digital twin application in the domain of micro-tool wear monitoring.

# 2 Literature Review

## 2.1 Digital twin in manufacturing applications

The digital twin (DT) technology has been adopted for several manufacturing applications with some specific goals. Aivaliotis et al. developed a DT system for the predictive maintenance of industrial robot[1]. The robot gearbox parameters' iterative fine-tuning was performed using the DT system. Kannan et al. predicted the wear of the grinding wheel by using a DT system [2]. The predictive model of the grinding redress was constructed from the auto-regression moving average (ARMA). The model was selected due to the static properties of the motor spindle signal in the time series. Botkina et al. have developed a DT system for cutting tool [3]. In their system, the information of the physical tool was continuously and digitally updated during the machining process. The data representation and exchange of the cutting tool followed ISO 13399 standard. The updated information of the cutting tool was targeted for precise
process simulation, control, and analysis. Eventually, the result of the DT sys-
tem gave benefits for the continuous improvement of the production process.
The aforementioned DT systems show that the application needs at minimally
three major building blocks, i.e., a) **the object to be imitated**, b) **the digital
twin**, c) **the communication means between the imitated object and
the digital twin**.

## 2.2 Digital twin building block

The digital twin building block contains information to model the real object digitally. The digital model can represent the process (dynamics, state propagation) related to the objects [1], the physic (shape, form, geometry) of the objects [3], or the properties (surface roughness) of the objects [4]. The model can be generated from the industrial standard, physics law derivation, or empirical equation from the experiments. In order to monitor the variable of interest, the digital twin often contains a virtual environment to report the latest status of the simulation and the incoming real-time data. The virtual environment is obviously needed for the applications where the motion or object changes should be visually presented to the DT users. At a minimum, the digital twin has a user interface, e.g., a software dashboard, to monitor the variable of interest. Cai et al. presented the technique to build a DT system and fused the sensor information in the cyber-physical manufacturing [4]. Their DT system has a virtual machine to visualize the running process and a data acquisition module to get the 3-axes accelerometer data for monitoring the surface roughness of the workpiece.

## 2.3 Virtual environment for the digital twin

There are many methods to build a virtual environment for the DT applica-
tion. As suggested by Cai et al., the developments of virtual environments may
take reference from the previous works of virtual system developments, such
as Virtual Assembly [5], Virtual Tooling [6] and Virtual Prototyping [7]. Most
of the virtual environments were developed with 3D graphic libraries on some
programming language and separated from the CAD system. However, as a mat-
ter of fact, the CAD system was the initial place where the virtual object was
designed. For the reason of seamless interoperability and further expandability,
the virtual environment for DT would be more appropriate to work inside the
CAD system. FreeCAD - an open-source CAD system that offers functionality
to develop specific modules inside its 3D graphic environment [8]. The virtual
environment development for various engineering applications has been reported
using FreeCAD as the virtual environment [9, 10]. Compared to OpenSCAD -
another open-source cad system, FreeCAD has advantages in exporting the stan-
dard parametric models, Python programming, and combining external models
to its 3D graphic interface [11].
## 2.4 Micro-milling model for the digital twin

The micro-milling process can be modeled by using the mechanistic model with the tool wear as the contributing factor [12, 13]. Later, the micro-tool wear information is inferred by comparing the cutting force data from the actual machining and the simulation. However, acquiring the cutting force data is costly in micro-milling due to the high price of the force sensor with the micro-meter specification. Alternatively, the micro-milling process can be modeled by using the information from the built-in sensors of the machining devices, e.g., torque and electrical current sensors of the motor spindle [14]. This strategy cuts down the cost of the sensor installation. As far as the tool wear is concerned, the data-driven method can actually generate the model relating the tool wear and the input data from various sensors, such as cutting force, vibration, acoustic emission, and power sensors [15, 16]. However, such a data-driven approach will lose the concept of DT where the imitated object should ideally represent and be derived from the actual phenomena of the process, i.e., using physic (mechanic) law.

# 3 Methodology

## 3.1 System architecture

The system architecture of DT-based tool wear monitoring (Fig.1) follows the building blocks explained in the sub-section 2.1 and 2.2. The system consists of the three big blocks, i.e., a) the object to be imitated, b) the digital twin, and c) the communication. The micro-milling machine is a miniaturized 5-DOF (degree of freedom) CNC machine with a linear resolution of 1 µm. The motor

<figure><img src="image_3.png" /><figcaption>Fig. 1. The system architecture for micro-tool wear monitoring with digital twin</figcaption></figure>
controller provides position (x, y, z, γ, β) information through the RS-232 serial communication. The spindle uses a high-speed brushless DC motor with 80000 rpm maximum speed and air coolant. The data acquisition (DAq) module gathers real-time information on the spindle's working condition through the GPIO port. The spindle information consists of the torque (T), current (i), and speed (ω) in real-time.

## 3.2 Micro-milling simulation

The simulation uses the spindle motor model in eq.(1), the spindle controller model in eq. (2) ~ (3), and the cutting torque model in eq. (4) ~ (5) to represent the imitated micro-milling process. The formulation of the models has been taken from our previous work in [17]. Machining parameters are known prior to the simulation run. The micro-tool wear monitoring is performed by comparing the real electric current from the built-in current sensor of the spindle to the simulated current from the simulation. The difference between the two electric current values can infer the abnormality and wear progression profile. The numerical engine for the simulation uses XCOS dynamic system library from SciLab.

$$J_m \frac{d^2 \theta(t)}{dt^2} + B_m \frac{d \theta(t)}{dt} = K_T \cdot i(t) - T_c(t) \quad (1)$$

$$i(t) = K_p e(t) + K_i \int_0^\tau e(\tau) d\tau + K_d \frac{de(t)}{dt} \quad (2)$$

$$e(t) = \omega_{ref}(t) - \omega(t) \quad (3)$$

$$T_c(t) = g(t) \cdot \begin{cases} a_1 e^{a_2 t} + a_3; & \text{for rise} \\ b_1 \log(t) + b_2; & \text{for steady} \\ c_1 t^2 + c_2 t + c_3; & \text{for fall} \end{cases} \quad (4)$$

$$g(t) = \begin{cases} 1, & t_c^{start} \le t \le t_c^{end} \\ 0, & \text{else} \end{cases} \quad (5)$$

## 3.3 Virtual environment

The environment of the micro-milling was built inside the FreeCAD. All the 3D object files were imported to the FreeCAD in assembly mode. The 3D environment of micro-milling consists of the CNC machine and workpiece 3D models. For the CNC motion simulation, the CNC machine's kinematic chain should be defined by arranging the hierarchy of the kinematic joints and links (bodies). Figure (2) shows the example of the 1-DOF kinematic chain definition with two links (Link1, Link2) and one joint (J12). This work only used the primitive types of joint, i.e., revolute and prismatic. To realize such an idea in the FreeCAD
<figure><img src="image_4.png" /><figcaption>Fig. 2. Kinematics definition for the virtual environment</figcaption></figure>

system, the body coordinate with respect to the world coordinate ($H^{world}$) was assigned by using an entity named *part*. Then, each imported body was attached to the *part* entity coincidently. FreeCAD stores the local coordinate of each entity ($H$) relative to the coordinate of the parent entity. Therefore, actuating the intermediate part (e.g., *J12*) between the two connected parts (e.g., *J1*, *J2*) has the similar effect of having one primitive joint with variable $\theta$. The refresh event of the virtual environment depends on the clock signal issued by the simulation block (see Fig. 1).

# 4 Experiment and Result

The machining experiment was conducted with the three sets of machining parameters as reported in the Table.1 of our previous work [17]. For the analysis purpose, the time-stamped data of the motor position and spindle information were recorded into the files. Then, each data entry from the files was replayed sequentially in the simulation according to the time stamp. The current presentation emphasizes the quality of the simulation and real-time data synchronization in a virtual environment. In particular, the activation function of cutting torque from the Eq. (5) was executed based on the collision event between the virtual micro-tool with the virtual workpiece in the FreeCAD as the virtual environment. The collision volume became the substitution for the uncut chip thickness (UCT) to calculate the simulated cutting torque.

Figure 5 shows the synchronization between the real-time data and the simulation. Point A in Fig.5 is the starting event when the collision is about to occur with partial tool immersion. Point B is the event boundary when the tool was in full contact with the workpiece. The event triggering mechanism came from the micro-milling machine's motor controller's real-time position data. This mechanism realized the concept of a digital twin where the simulation and real-time events are integrated and coupled in one process. The tool wear monitoring was performed by observing the spindle electric current during the machining process. Abnormality of the wear progression can be detected by comparing the simulated and actual electric current of the motor spindle. Compared to the torque sensor, the electric current sensor is more economical. The experiment
<figure><img src="image_5.png" /><figcaption>Fig. 3. Experiment result</figcaption></figure>

has shown the tight interaction between the simulation, the real world, and the
targeted service.

**5 Conclusion**

The development of a tool wear monitoring system using digital twin technol-
ogy with an open-source CAD system has been presented. The micro-tool wear
monitoring was realized by observing the simulated electric current of the spin-
dle motor. The digital twin of the micro-milling process was developed based on
the three digital models, i.e., the spindle motor model, spindle controller model,
and cutting torque model. The integration of real-time position data into the
simulation was useful for calculating the virtual collision volume to simulate the
cutting torque. The proposed system becomes an example for further works on
the realization of various services in machining by using digital twin technology.

**Acknowledgement** This work has been supported by Beasiswa Pendidikan Indonesia (BPI) from Indonesia Endowment Fund for Education (LPDP).

**References**

1. Aivaliotis, P., Georgoulias, K., Arkouli, Z., Makris, S.: Methodology for enabling digital twin using advanced physics-based modelling in predictive maintenance. Procedia CIRP 81, 417–422 (2019)
2. Kannan, K., Arunachalam, N.: A digital twin for grinding wheel: an information sharing platform for sustainable grinding process. Journal of Manufacturing Science and Engineering 141(2) (2019)

3. Botkina, D., Hedlind, M., Olsson, B., Henser, J., Lundholm, T.: Digital twin of a cutting tool. Procedia CIRP 72, 215-218 (2018)

4. Cai, Y., Starly, B., Cohen, P., Lee, Y.S.: Sensor data and information fusion to construct digital-twins virtual machine tools for cyber-physical manufacturing. Procedia manufacturing 10, 1031-1042 (2017)

5. Ong, S., Pang, Y., Nee, A.: Augmented reality aided assembly design and planning. CIRP annals 56(1), 49-52 (2007)

6. Altintas, Y., Cao, Y.: Virtual design and optimization of machine tool spindles. CIRP annals 54(1), 379-382 (2005)

7. Choi, S., Cheung, H.: A versatile virtual prototyping system for rapid product development. Computers in Industry 59(5), 477-488 (2008)

8. FreeCAD: Your own 3d parametric modeler. https://www.freecadweb.org/ (accessed: 12-04-2022), 2022

9. Gayer, D., O'Sullivan, C., Scully, S., Burke, D., Brossard, J., Chapron, C.: Freecad visualization of realistic 3d physical optics beams within a cad system-model. In: Millimeter, Submillimeter, and Far-Infrared Detectors and Instrumentation for Astronomy VIII. vol. 9914, p. 99142Y. International Society for Optics and Photonics (2016)

10. Li, J.Y., Gu, L., Xu, H.S., Korepanova, N., Jiang, W., Sheng, X., Zhu, Y.L., Yu, R.: Freecad based modeling study on mcnpx for accelerator driven system. Progress in Nuclear Energy 107, 100-109 (2018)

11. Machado, F., Malpica, N., Borromeo, S.: Parametric cad modeling for open source scientific hardware: Comparing openscad and freecad python scripts. Plos one 14(12), e0225795 (2019)

12. Liu, T., Zhu, K., Wang, G.: Micro-milling tool wear monitoring under variable cutting parameters and runout using fast cutting force coefficient identification method. The International Journal of Advanced Manufacturing Technology 111(11), 3175-3188 (2020)

13. Li, G., Li, S., Zhu, K.: Micro-milling force modeling with tool wear and runout effect by spatial analytic geometry. The International Journal of Advanced Manufacturing Technology 107(1), 631-643 (2020)

14. Kaneko, K., Nishida, I., Sato, R., Shirase, K.: A practical method to monitor tool wear in end milling using a changing cutting force model that requires no additional sensors. Journal of Advanced Mechanical Design, Systems, and Manufacturing 15(6), JAMDSM0077-JAMDSM0077 (2021)

15. Bagri, S., Manwar, A., Varghese, A., Mujumdar, S., Joshi, S.S.: Tool wear and remaining useful life prediction in micro-milling along complex tool paths using neural networks. Journal of Manufacturing Processes 71, 679-698 (2021)

16. Tansel, I., Arkan, T., Bao, W., Mahendrakar, N., Shisler, B., Smith, D., McCool, M.: Tool wear estimation in micro-machining: Part i: tool usage-cutting force relationship. International Journal of Machine Tools and Manufacture 40(4), 599-608 (2000)

17. Kiswanto, G., et al.: Digital twin approach for tool wear monitoring of micro-milling. Procedia CIRP 93, 1532-1537 (2020)