Automatic Detection of Industrial Robot Tool Damage Based on Force Measurement

This paper proposes a solution for diagnosing the condition of the tools applied in metal alloy robotic machining. Determination of the condition of a cutting tool requires specific methods that depend on the damage type or the wear level. Methods that involved measurements of basic geometric dimensions of cutting tools based on force sensor, and testing the forces of inertia caused by tool unbalance were applied in the work covered herein. Damage of cutting tool, including unbalance, fracture or complete tool wear were detected with a system of force measurement, which was part of the standard equipment of the robot in a process used to investigate the methods covered herein. All methods proposed herein were performed automatically and require no human intervention. This paper presents examples of solutions for determining the condition of a grinding pin, which is a common machining tool.


INTRODUCTION
The robotic integration or robotisation of industrial processes has been a trend increasing for decades. Industrial robots improve the quality of processing while reducing costs. The continuous development of sensory and actuation systems expands the implementation range of robotic systems across new areas of technology. However, a group of manufacturing processes exists, the performance of which is extremely challenging. The examples include robotic NDT (non-destructive testing) or robotic machining, as presented in [1][2][3]. Despite its rigidity being lower than applied in CNC machine tools, robotic machining has become increasingly popular to the wide application potential of industrial robots, as demonstrated in [4][5][6]. Robotic applications in milling open up a world of potential for manufacturing large and complex workpieces which do not require high machining accuracy [7]. Robotic applications enable the machining of hard to reach part details in a single fixture setup of a workpiece. The virtually unlimited operating range and flexibility make industrial robots serious competition for conventional CNC machine tools. Industrial robots also perform well in applications which require real-time interaction based on visual, sound, or force feedback to adapt the cutting tool trajectory to the varying working environment parameters such as grinding of castings with randomly variable geometric features caused by solidification or welding seam grinding [8,9]. Replacement of human workers with robots in machining follows the concept of Industry 4.0, by which cyberphysical systems execute and control physical processes, forming the core of smart factories [10,11].
Robotic machining tools should represent high accuracy and repeatability of performance, not unlike in CNC machining. Significant properties of robotic machining tools include durability (service/operating life) and resistance to failure. The design engineering of cutting tools has been based on improved materials with low wearability and high strength characteristics [12,13]. However, the demanding machining parameters heighten the probability of cutting tool damage during processing. The capability to detect a damage event, followed by immediate interruption of machining, can help prevent failure of the workpiece and the components of a robotic machining station. A cutting tool tends to become damaged at the final stage of a previous machining cycle. Hence, the cutting tool should be verified before re-use and replaced with a spare one, if required.
The use of robots and the Industry 4.0 concept implies the need for advanced diagnostic systems including automatic detection of cutting tool failures, which is the subject of many research works [14][15][16][17][18][19][20]. The CIM (computer-integrated machining) systems which are currently in use require exchange of information not just about a single operation, but a continuous sequence of operating events that lead to manufacturing of a finished product. The data about the condition of ready-to-use cutting tools is a very important part of this information. The automatic operation and the sensitivity of a diagnostic system to recognising symptoms of failure wear of a cutting tool help assure continuity of processing at the machining station at a price of small losses and a very short stoppage [21,22]. Automatic tooling diagnostic systems can detect tool damage in intervals between the machining cycles and/or can be used during a machining process, as shown in the example of [23]. Tooling damage symptoms can include measurable characteristics of a tool, e.g. the current geometrical features. Here, the damage detection methods are based on verifying the tool dimensions or checking its presence in a tool holder. These methods are called 'direct diagnostic methods' to distinguish them from 'indirect diagnostic methods' which enable a tool condition assessment based on the signals generated by effects concomitant to process. The direct diagnostic methods of tool condition measurement most often require interrupting the machining process. These methods usually involve manual or automated optical and imaging recognitionbased measurements of wear indication values or characteristic dimensions of a tool, as shown in [24,25]. Laser or vision-based diagnostic systems have been found quite effective in detection of tooling damage in CNC machine tools. These systems can be implemented in robotic machining stations, however, they inflate the capital expenditure and require expansion of a robotic machining station with additional components, followed by integration thereof. This paper proposes several solutions for diagnosing the condition of cutting tools applied in robotic machining of metal alloys. Methods that involved force-sensor measurements of basic geometric dimensions of cutting tools and testing the tool unbalance were applied. Examples of solutions for a grinding pin, which is common machining tool, were also presented.

ROBOTIC MACHINING TEST STAND
The robotic machining stand, in which the possibility of automatic tool damage detection was tested, was designed for deburring and grinding workpieces with random variation of geometric features (Fig. 1) [5]. Hardware and software expansions of the robotic machining test stand made it possible to adapt the robot's trajectory to the shape of the workpiece. Moreover, the robotic machining test stand featured a 3D scanner with a software for workpiece inspection. This test stand and the machining operations carried out with it had already been published [26]. The nature of machining conducted on the test stand exposes its tooling to various types of damage.
The robotic machining test stand comprises an IRB140 industrial robot that performed robotised machining operations with an automatic tool trajectory adaptation to the varying shape of workpieces. The second component of the robotic machining test stand was an IRB1600 industrial robot with an ATOS Core 135 3D-scanner head. The measurement system was interfaced with the ATOS Professional software and exchanged data with the IRC5 robot controller over TCP/IP. Other test stand components include: an IRBPA250 2-axis positioning manipulator for handling workpieces, tool spindles, a tool changer, a valve terminal (bank), inverters, light curtains and other safety components. The RobotWare robotic controller software assured control over both robots and featured a force control functionality. The grinding tool speed was controlled by an inverter interfaced over DeviceNet with the respective robot's controller. The application of the Force Control package in the test stand made it possible to control the tool's force on the workpiece. It made a precise definition of the workpiece's position obsolete as it was within accuracy of several millimetres. It also helped the robot to interact with its environment. The control strategy helped to adapt the robot's motion to the feedback from the force sensors. The basic version of the Force Control package included: a dedicated software suite, axis computer with a DAQ card, force and moment sensor.
The control software suite of the Force Control expansion package made it possible to control the process with several strategies. The application of those strategies during automatic machining may result in damage of the tool due to the operator's errors, variation of geometrical features, or tool material defects. Hence it was prudent to implement an automatic tool detection capability.
The tests and conclusions shown in [26,27] suggested an application of the available force sensor and software functionalities to detect tool damage and monitor the wear of tool.
To implement the method of automatic tool damage detection based on the detecting tool unbalance, the robotic test stand was expanded with an application running in the Matlab software. The application was implemented on the PC workstation, which had originally been the controller of the 3D scanner. This reduced the number of hardware components of the system. The application's task was to read the force and moment outputs sent from the robot's controller over TCP/IP. The force and moment outputs were analysed in Matlab to qualify the tool condition status as damaged or OK. The tool condition status was fed back to the controller for its software to decide if automatic retooling was required. The solution proposed herein was capable of automatically detecting tool unbalance.

TOOL DAMAGE VARIANTS
The tool used in a robotic station was a grinding pin shown in Fig. 2. The cylindrical grinding pin type 1, form ZY (ref. DIN 69170) is used for machining various grades of steel, cast steel, stainless steel, and cast-iron, as well as plastics and rubber.
The grinding pin is described by geometrical parameters: working section diameter D = 25 mm, shank diameter, S = 6 mm, length T = 35 mm.

Figure 2 Cylindrical grinding pin
The tool was chucked in electrospindles manufactured by PDS, model ADEV42, stored in a 4-position tool changer manufactured by Schunk. During cutting the tool is exposed to damage by chipping and fracture of the surfaces. Moreover, the tool is exposed to continuous radial and circumferential abrasion during cutting. For this type of tool methods for automatic tool damage detection were proposed. The potential damage and wear variants of the tool were qualified into four cases, the diagram of which is shown in Fig. 3.
The tool damage and wear cases shown were related to the following parameters: -displacement of the TCP (tool centre point), the point aligned with the tool's tip and centreline by reference to which all robot's positions were defined, -axial displacement of the tool-spindle system's centre of inertia fC, -radial displacement of the tool-spindle system's centre of inertia r C .
Determination of the tool condition requires methods that depend on the damage type or the level of wear. The Force Control package was capable of detecting tool damage including fracture (Fig. 3b), complete wear (Fig.  3c) and unbalance (Fig. 3d).The tool condition assessment criteria were as follows: TCP critical displacement for tool fractures, tool diameter or length loss for complete tool wear (in radial or axial direction), determined by TCP displacement and radial displacement of the tool-spindle system's centre of inertia for tool unbalance caused by bending or a large breakaway. Unbalance could be detected by measuring the inertia forces during the rotational movement of a tool.

Tool Unbalance Detection
An elementary case of tool unbalance, caused by loss of material, was considered (Fig. 4). The centre of inertia of all rotating parts of the tool-spindle system was offset from the rotation axis of the tool-spindle system. The new position of the system's centre of inertia was determined with the equation: where m = m t + m e is the inertia of all rotating parts of the tool-spindle system, m t is the inertia of all rotating parts before damage, m e is the unbalance inertia (and it is negative for a loss of material), r C is the position of the centre of inertia of the unbalanced tool-spindle system relative to the rotation axis, r t = 0 is the position of the centre of inertia of the balanced tool-spindle system relative to the rotation axis, e is the position of the unbalance inertia relative to the rotation axis. Since r t = 0, a notation may follow: Bending of the tool gave similar results. To conclude this case, the amplitude of the forces of inertia depended on the displacement of the rotating tool's centre of inertia. Measuring the forces of inertia would help detect a condition under which the centre of inertia of the toolspindle system was radially translated by damage to the tool (Fig. 3d). This force of inertia and the resultant moment were recorded with the force and moment sensor.

Theoretical Background of Tool Unbalance Detection with a Force/Moment Sensor
To determine the diagnostic outputs viable for the diagnostic procedure, a geometric model of the toolspindle-sensor system was assumed, the relations between the displacement of the tool-spindle system's centre of inertia and inertial forces and moments of forces were analysed, and the force and moment output signals were tested for sensitivity and uniqueness in relation to these changes.
The tool-spindle system's geometric model is shown in Fig. 5. The tool was held in the chuck of the electrospindle, and the latter was fastened with a coupling to the force sensor. The Force Control package enabled measurement of the forces and moments loading the force sensor and expressed in a xyz reference system of the force sensor. The analytical formulas, which define the inertial forces and moments dependent on the tool-spindle-sensor system geometry and its centre of inertia position are as follows: where φ = ωt is the tool's angle of rotation. The possible positions of the centre of inertia of the tool-spindle system due to wearing out of the tool were determined with a system of equations: where x C0 , y C0 , z C0 are the coordinates of the centre of inertia of the balanced tool-spindle system. The values y C0 = 0 and z C0 = 0,135 m were known, whereas the value x C0 was, in practical terms, very difficult to determine because it depended on the spindle internal structure. However, it was not a necessary condition to know this value to apply the method. Given the Eq. (5) and Eq. (7), the system of Eq. (6) was expressed as follows: The substitutions in the system of Eq. (8) replaced the position of the centre of inertia of the whole tool-spindle system r C with the position of unbalance e.
The resulting equations facilitated a compilation of a table of sensitivity of the force signals and the force moment signals to displacement of the centre of inertia of the tool-spindle system. The items in Tab. 1 were expressed by calculating the derivatives of the force signals and the force moment signals relative to e and f C . Table 1 Table of sensitivity and uniqueness of the force signals and the force moment signals to displacement of the tool-spindle system's centre of inertia

Signal
Sensitivity Uniqueness When the derivative was 0, the corresponding signal was insensitive to displacement of e or f C , respectively. When the derivative was different from 0, the corresponding signal was sensitive to changes of e or f C , respectively, and it was possible to determine its level of sensitivity in further analysis. Tab. 1 also shows that: -all components except for F x are sensitive to the amplitude of inertial forces; the amplitude depended on the magnitude of unbalance m e e; the component F x was useless in the diagnostic procedure, -the components F y , F z , and T x are sensitive to displacement of the tool's centre of inertia in a radial direction only, -the components T y and T z are sensitive to displacement of the tool's centre of inertia both in radial and axial directions; it would be disadvantageous to apply them in the diagnostic procedure as the tool wear (a change of f C ) would interfere with the decision logic based on T y and T z . The last column in Tab. 1 states if a signal was unique (1) or not (0). This table shows that further consideration of feasibility of the signals for the tool unbalance diagnostics could be narrowed down to an analysis of the components F y , F z , and T x which met the criterion of uniqueness. When the unitary unbalance was m e e = 1 and the unitary angular velocity was ω = 1, the function F y changed by 1cosφ, the function F z changed by 1sinφ, and the function T x changed by 0,135cosφ. The amplitudes of changes in the signals are shown in Tab. 2 with the sensor measuring range for each signal, and measuring range percentage used by unitary amplitude. Tab. 2 shows that the unitary amplitude of the inertial force gave the highest signal changes across the measuring range for the moment signal T x . The analogue signals of forces and moment forces were processed by A/D converters. Hence, the higher the change percentage of an analogue signal was, the higher the change of the A/D converter output state was. Thus, the inertial force signal most sensitive to amplitude changes was the signal T x , and it was the most beneficial for application in the diagnostic procedure.

Experimental Research
To verify the above theoretical calculation results, experimental measurements were conducted to test and analyse 5 tools. The tests were conducted at a rotational frequency of 66 Hz. The first tests were carried out on a stock of 40 brand-new tools, followed by testing of 5 tools from the stock which were damaged by machining irregularities. The measurement procedure consisted of recording the moment Tx signal of the brand-new tools mounted in the chuck of an electrospindle in four different orientations, each with an offset of 90°. The tests were intended to establish a reference baseline, which was a maximum inertial force moment occurring at a residual unbalance caused by the manufacturing inaccuracy of the electrospindle and a brand-new tool. After a certain time, the moment Tx signal was recorded from the damaged tools which were tested mounted in the chuck of an electrospindle in four orientations, each with an offset of 90°. An overview of damaged tools is shown in Tab. 3.  During the experimental measurements, the series of signal T x samples 10 s long were recorded; at a sampling rate of f s = 2000 Hz, the trend length was N = 20000. Fig.  6 shows a selection of the time series of the moment T x for an example of a brand-new tool (Fig. 6a) and a damaged tool (Fig. 6b). This was followed by a frequency-domain analysis of the signals T x . Each sample series had a spectral characteristic determined with a fast Fourier transform. The parameters of the fast Fourier transform and the spectral analysis were: square window, transform length N FFT = 2 14 , the band of analysis 0-1000 Hz, frequency resolution ∆f ≅ 0,1211 Hz. Fig. 6c shows the signal spectra for the selection of the sample series. This was followed by a determination of the maximum values of the signal T x spectral lines around the frequency of 66 Hz, assuming the analysed spectral band width to be 66 ± 4 Hz. These values were designated max Tx(f)n,k for the brand-new tools and max Tx(f)d,k for the damaged tools, with k = 1, …, 20. The maximum number k = 20 resulted from the experimental measurements of the 5 tools mounted in four orientations, each with an offset of 90°.
The values determined for the spectra of all 20 brandnew tool sample series and 20 damaged tool sample series are shown in Fig. 6d. By entering a threshold value b Tx(f) , the values corresponding to acceptable and unacceptable tool conditions were separated. The threshold value was calculated as expressed as follows:

Diagnostic Procedure
To implement the developed method for diagnosing this type of damage, a procedure with the following steps was implemented on the test stand: (1) The robot mounted a brand-new tool: the Rapidlanguage software, implemented on the robot's controller, executed the instruction of travelling to the tool changer and mounting an electrospindle with tool. (2) The robot homed back and tested the tool at a preset rotational speed: the controller software drove the inverter to ramp the tool to the preset rotational speed and hold it at that speed, which was when the moment Tx was recorded; afterwards, the tool was stopped. (3) A proprietary software developed in Matlab determined the tool condition: the moment T x measured by the force/moment sensor was transmitted over TCP/IP to the software running on the PC workstation and processed analytically to qualify the tool condition. (4) The tool condition result was sent back to the robot's controller: depending on the tool condition (damaged or OK), the robot either changed the electrospindle with the tool with a next one, or proceeded to robotic machining. The software of the robotic machining test stand was developed to execute the tool unbalance determination procedure before each robotised machining cycle. A human operator could also launch the tool unbalance determination procedure. It was also executed after each emergency stop of the robot caused by e.g. overrunning the maximum torque of the drive units.

Tool Fracture Detection and TCP Correction of Tool Wear
The tool fractures (Fig. 3b) and the TCP correction (Fig. 3c) of normal tool wear were detected with the hardware and software functionalities of the Force Control expansion package and an advanced software implemented in the robot's controller. The determination of the tool condition in these cases did not require the software developed in Matlab. The functionalities available in the IRC5 controller's Rapid language sufficed. The tool fracture and TCP correction procedure was based on a linear motion of the tool mounted on the robotic manipulator to a stationary point P1, located within the working space over the test bench (Fig. 7). The parameters of TCP position and TCP orientation relative to the manipulator's tooling flange were designated TCP1 for the brand-new tools. TCP1 was also assigned for the worn tools and only before their test procedures. Having changed the tool, the robot started its linear movement to the point P1 with TCP1 (which defined the original tool length T1). During the movement, a separate task was executed simultaneously to the robot's motion program to measure the force load on the force/moment sensor at 0,05 s intervals. When the force exceeded the assumed maximum of 5 N, the tool was deemed to have touched the test bench. This returned an interrupt. The interrupt handling procedure stopped the movement of the robot, and the actual TCP position was stored. Next, mathematical conversion was applied to determine the new TCP for the robot, which was TCP2, as designated in Fig.  7. For a brand-new tool, TCP2 was identical to TCP1. Hence, the tool length was T1. When the tool was normally worn, the difference in length from the previous test of the same tool was not to exceed 3 mm. The testing of worn tools was possible thanks to implementation of a TCP database in the robot's controller for the available tools and their length values. Because each tool was tested before use and had its length stored, it was possible to detect a sudden change of the tool's length as compared to the previous machining cycle. This algorithm and the database of available tools, complete with their length values, made it possible to adjust for the tool length before each machining cycle and to detect the tool fracture by comparing the actual length to the last length value stored. A simplified algorithm implemented in the test procedure is shown in Fig. 8. The grinding pin can suffer an axial or radial wear during machining. It was then prudent to automatically measure the wear level to enable automatic correction of the robot's paths of motion. Fig. 7 and Fig. 8 show the method for TCP correction and axial tool wear determination. Fig. 9 shows the concept of an automatic radial tool wear measurement. Just like in the previous case, the robot's TCP moved linearly to the point P2. The radial tool wear did not affect the TCP position. In this test, the TCP position was constant and located at the tool tip and aligned with the tool's centreline.
Just as in the previous case, a separate task was executed parallel to the robot's motion program to measure the force load on the force/moment sensor at 0,05 s intervals. When the force exceeded the assumed maximum of 5 N, the tool was deemed to have touched the test bench. This returned an interrupt, the interrupt handling procedure stopped the movement of the robot, and the TCP position was stored. With the TCP position stored, mathematical conversion was applied to determine the tool diameter D2. This diameter was compared to the diameter saved during the last test of the same tool to enable an automatic offset (correction) of the paths during radial machining. This test was the second one after the robot's TCP correction and tool fracture detection. When the radial or axial wear of a tool reached a defined critical level in either test, the machining cycle was stopped and the interface warned the operator to change the failed tool. Figure 9 The concept for the radial tool wear detection Fig. 10 and Fig. 11 show the photographs of the robotic machining test station on which (Fig. 10) the TCP correction procedure and (Fig. 11) the automatic radial tool wear measurement procedure were carried out.  The duration of both tests, including the tool mounting operation, was 55 s, which is relatively short when compared to the time to machine a single workpiece. The error of method originated from the repeatability of the IRB140 that was 0,03 mm, the response time, and the interrupt handling. The source of additional errors were the problems with defining the start and end points of the test paths, which had to lie on a straight line. The resulting TCP correction error and the radial tool wear measurement error were 0,6 mm. The error value was measured by comparing the results of the sensor system to the 3D scanner measurement results.

CONCLUSIONS
This paper proposes methods of automatic tool damage detection in cutting tools operated on robotic machining stations, where the detection was carried out with the available components of robotic machining stations. The authors decided to apply a direct method of automatic tool damage detection by testing the cutting tools before machining. The proposed methodology and the applied numerical methods allowed the functionality of a robotic machining station to be expanded with automatic tool damage detection. The tool damage detection system was implemented with the Force Control package, a solution specially made for robotic machining.
The solutions presented with the examples of a grinding pin can be easily implemented for damage diagnostics of other cutting tool types, including drill bits, milling cutters, grinding wheels, or compliant ceramic fibre tooling. The practical experiences of the authors suggest that diagnosing the levels of wear in rotary files could pose certain problems. Due to a large number of fine cutting teeth in these tools, their loss does not result in significant tool unbalance, whereas applying image analysis methods to diagnose the wear would require extremely high precision of detection due to the very low loss of tooth material.