Development and implementation of a dynamic force measurement system for automatic tool changer system and drawbar mechanism in machining center

Automatic tool changer system (ATCS) and drawbar mechanism (DM) are two of key basic parts for realizing the automatic tool-changing cycle in machining centers. The dynamic force in a tool-changing cycle plays an essential role in condition monitoring, fault diagnosis, and failure warning for the ATCS and DM. However, existing force detection systems have limitations in practical application. In this paper, a novel dynamic force measurement system (DFMS) is developed, which is based on a force sensing element installed on the BT40 tool holder and operating through a wireless network. The force sensing element is used to convert the dynamic force into the electrical signal. Digital measurements are collected from the 24-bit sigma-delta analog-to-digital converter with a programmable gain array, which then are transmitted to the upper computer software via a wireless transceiver. Besides, a Teager energy operator based dual-threshold two sentences endpoint detection method is proposed to recognize the temporal onset and offset of each force event in the dynamic force recording. Experimental results show that the DFMS is reliable and suitable to measure the dynamic force in automatic tool-changing cycles.


Introduction
Machining centers, as the basic equipment in manufacturing systems, have characteristics of high speed, high precision, and high efficiency, which are widely used in the automotive, aerospace, large ships, and other manufacturing industries [1,2]. Tool-changing is one of the most frequently performed non-cutting jobs when machining parts with complex geometrical profiles. In order to reduce non-cutting time and production costs, an automatic tool changer system (ATCS) has been introduced into the machining center, and a drawbar mechanism (DM) is installed on the spindle. Thus, the ATCS and DM are two key subsystems in machining centers to realize automatic tool-changing cycles [3,4], which are also the essential difference between the machining center and the milling machine.
In a machining center, machining operations require many different types of cutting tools while machining complex structural parts. Tools (the combination of cutting tool and tool holder is called tool in this paper) are all kept in the tool pockets [5]. Actually, the spiral springs and steel balls in the tool pocket generate a locking force which can clamp the pull stud fixed on the tool holder by screw threads. The DM pulls the tool holder and makes it contact with the spindle taper face, which is crucial for improving the spindle stiffness [6,7] and metal removal rate [8]. However, frequent tool-changing cycles inevitably cause the working condition of the ATCS and DM to degenerate, resulting tool falling failures [9], deterioration of the spindle stiffness [10], and reduction of the machining accuracy [11].
According to the statistical analysis, failures of ATCS account for 15% of total failures of machining centers, so its reliability level directly affects the reliability of the whole machine. Hence, many studies have been focused on the optimal design [12], condition assessment [13], and diagnosis of ATCS [14,15] and the performance of the spindle affected by DM [16,17]. A force measurement device is used to detect the tool-pulling force, as in [18]. The device consists of a tool holder, a sensor, and a circuit part. However, the circuit part does not include wireless data transmission function, which limits its flexibility in practical application. Additionally, the device can only detect the tool-pulling force, not the drawbar force generated by the DM. So far, there are two types of drawbar force dynamometers on the market. One is the sealed hydraulic cavity with a pressure gauge to detect and display the drawbar force, which is simple and easy to use. The other is an extremely accurate electronic force sensor that uses strain gauges to sense the changes in drawbar force and the electronic equipment to convert the output into a digital display for users to view. However, both above force gauges can only be used to detect the static forces of the drawbar mechanism, which may be not suitable for online condition monitoring or failure warning. Therefore, there is an urgent need to develop and implement a dedicated force measurement system, which integrates tool-pulling force detection and drawbar force measurement into one.
To achieve the proposed goal, the remainder of this paper is organized as follows. In Sect. 2, the mechanical structure and operating principle of ATCS and DM are reviewed. Then, the architecture of the developed system is detailed in Sect. 3. The field tests and analyzed result are described in Sect. 4. Finally, conclusions are drawn in Sect. 5.

The structure and principle of ATCS and DM
The ATCS and DM are the key basic units which allow machining centers to change tools rapidly and realize different cutting processes continuously. The ATCS is used to store tools and automatically exchange tools between the tool magazine and the spindle. Generally, the tool is connected to the spindle through a taper joint. The taper contact characteristics are influenced by the drawbar force generated by the DM. An adequate drawbar force is necessary to maintain high stiffness of the spindle and transmit required forces/torques, but an excessive force makes it difficult to implement a fast and reliable tool-changing cycle. Therefore, measuring the drawbar force is necessary to acquire a reasonable level. The structure of the ATCS is shown in Fig. 1a. The ATCS consists of an automatic tool exchange device and a tool magazine. The automatic tool exchange device consists of a manipulator motor, a manipulator, a cam box, etc. The rotation and axial movement of the manipulator work together via the cam transmission mechanism in the cam box so that the dynamic force in the tool-changing cycle may be not stationary. The tool magazine is composed by a magazine motor, a turret, and dozens of tool pockets. The tool pockets are used for storage and selection of tools. When a tool is required, the corresponding pocket is brought into the toolchanging position by rotating the turret. As shown on the left side sectional view in Fig. 1a, the tool holder is firmly held in the tool pocket through the combination of lock springs 1, Manipulator; 2, cam box; 3, cutting tool; 4, tool holder; 5, lock spring; 6, steel ball; 7, pull stud; 8, manipulator motor; 9, turret; 10, tool pocket; 11, magazine motor; 12, drawbar; 13, Belleville springs; 14, clamp pull claw and steel balls, whose maximum weight depends on the locking force produced by the combination.
As shown in Fig. 1b, the DM consists of a drawbar, Belleville springs, and a clamp pull claw, which works inside the spindle. When the tool holder is in the clamping position, Belleville springs are released, pushing the gripper to move up. Then, the gripper contacts with the pull stud and provides adequate drawbar force to retain an accurate taper contact.
Nine basic steps for an automatic tool-changing cycle are shown in Fig. 2.
Step 1. According to the tool-changing instruction from the NC system, the magazine motor drives the target tool pocket to the specific tool-changing position. Then, the target tool pocket is rotated to the position parallel to the spindle axis (Fig. 2a).
Step 2. The manipulator driven by the electric motor rotates by α° and simultaneously grips two tools, the target tool to be used next in the tool pocket and the old tool in the spindle (Fig. 2b).
Step 3. First, the Belleville springs are compressed, and then, the clamp pull claw is opened, and finally the old tool in the spindle is released (Fig. 2c).
Step 4. The manipulator performs a linear downward motion to pull the tools away from their couplings (Fig. 2d).
Step 5. The tool position is exchanged by rotating the manipulator with 180° (Fig. 2e).
Step 6. The manipulator moves upward and inserts tools into the spindle and the tool pocket, simultaneously (Fig. 2f).
Step 7. The Belleville springs return to its original state, which follows an upward movement of the drawbar. So, the gripper closes and makes the target tool firmly held in the spindle (Fig. 2g).
Step 8. The manipulator releases the tools and resets to its initial position (Fig. 2h).
Step 9. The tool pocket is rotated upward and resets to its initial position (Fig. 2g) In the tool-changing cycle, the steel balls, lock springs, clamp pull claw, drawbar, and Belleville springs all bear dynamic loads. In step 4, the dynamic force exerted by the manipulator on the tool holder to keep it away from the tool pocket is called tool-pulling force, whose opposite reaction is the clamping force generated by the combination of lock springs and steel balls. The tool-pulling force detection can be used to evaluate the locking performance of the tool pocket and diagnose the tool falling failure. In step 7, the dynamic force exerted by the drawbar mechanism on the tool holder is called the drawbar force. Compared with other dynamic forces in the toolchanging cycle, the tool-pulling force and drawbar force are of great significance to detect.

General scheme of the system
The DFMS, which integrates the mechanical structure design, computer technology, data storage technology, and wireless transmission technology into one, can accurately and reliably measure the dynamic force in the tool-changing cycle. The measurement system consists of three parts: a mechanical part, a circuit measurement part, and a LAB-VIEW-based control program. The system's basic block diagram and all its sub-modules are shown in Fig. 3. The direction of the arrows represents the data flow between the blocks. The mechanical part is based on the BT40 tool holder (7/24 taper) and redesigned its internal structure without changing the contour structure size. This unique design guarantees that the dynamic force measured by the system is consistent with the actual force. The circuit measurement part includes a strain gauge-based drawing force sensor, an analog-to-digital converter AD7190 with a programmable gain array, a C8051F410 microcontroller, a USB flash storage module, and a CC1101-based wireless transceiver modules. The analog signal output by the drawing force sensor is filtered, amplified, and converted to the digital signal. The digitized signals are read with the C8051F410 microcontroller, and the CH376S type data storage module is connected to the microcontroller through a serial port to reliably store the dynamic force data in real time. Then, the CC1101-based wireless transceiver is used to communicate with the upper computer in the 433 MHz radio channel. The program for microcontroller is developed on KEIL-IDE and written in C-language, and the dynamic force analysis program running on the computer side is developed on the LabVIEW platform.

The drawing force transducer and control system design
The ATCS can quickly change tools within a short time interval of several seconds, and the duration of the pulling  Fig. 3 Block diagram of the measurement system with its sub-modules force and drawbar force will be shorter. Thus, the force transducer must have rapid response capability. The force measurement unit adopts the resistance strain gauge-based force transducer as the sensing terminal because of its excellent linearity, low cost, easy-to-use, and stable performance. In addition, 10 6 alternating loading cycles can be achieved under the strain of 1600με, which means it has an excellent fatigue life. These advantages make it widely used in dynamic force measurement, such as cutting force [19] and finger pad forces [20].
Other sensor elements have been reported in the literatures. The piezoelectric sensor possesses favorable advantages that the sensitivity is great, and the resonant frequency is high and provides accurate measurements. It is an ideal sensor for measuring dynamic forces, such as the cutting force [21,22] and the pressure of the fluid [23]. However, there are still three imperfections in this type of sensor. First, the charge amplifier is big in size and mass, which is difficult to integrate. Secondly, the cost of commercial piezoelectric sensors is too expensive to be suitable for industrial applications.
Moreover, piezoelectric sensors are susceptible to electromagnetic noise from electrical drives in the workshops. To the contrary, optical fiber strain gauges not only have the advantages of immunity to electromagnetic interference (EMI) [24], but also offer a more stable measurement with regard to zero-drifting after loading. Despite those advantages, the strain sensors based on fiber Bragg grating need to detect wavelength shifting by precise optical equipment, and the power consumption of the fiber optical sensor nodes is not acceptable for battery-supplied portable systems, because the measurement system needs to have properties of portability, lower power consumption, anti-interferences, easy integration, and low cost. Therefore, the resistance strain gauge is adopted as the load cell in this research. The piezoelectric sensor or optical fiber-based strain gauge would likely be a preferred choice along with the technical progress in these domains.

The characteristics of resistance strain gauge
Many resistance strain gauges made up of alloy materials, such as copper and Ni-Cr alloy, are attached on an elastic mechanical structure to sense strain or deformation under loading. The strain of the structure is proportional to force acting on it. Based on this principle, the resistance strain gauge converts changes in the force into the change in electrical resistivity, which will then be translated into equivalent voltage using a bridge excited by a constant voltage reference source circuit. The resistance of the resistance strain gauge is calculated as follows: where R is the original resistance value, Ω; ρ is the electrical resistivity, Ω·m; L is the length, m; and S is the crosssectional area, m 2 .
When the resistance strain gauge bears the axial external force, its relative resistance variation ratio is where μ is the Poisson's ratio, λ is the resistive coefficient, E is the Young's modulus, and ε is the strain. For specific resistance strain gauges, (1 + 2μ + λE) is a constant. Therefore, the relative resistance variation ratio is directly proportional to the strain. Taking advantage of this feature, the output resistance signal is transformed into a voltage signal through a precise voltage reference exciting circuit.

Full Wheatstone bridge circuit and signal amplifier circuit design
To improve the accuracy and stability of the measurement system, the general Wheatstone bridge with a voltage reference excitation source has been adopted, and its schematic is shown in Fig. 4. The Wheatstone bridge contains 4 resistance strains. The original resistance of each resistance strain is 350Ω, and temperature coefficient is 5 ppm/°C, which ensures very small temperature drift. The bridge circuit is excited by the precision reference voltage IC Ref02 with + 5 V which outputs from VOUT pin and inputs to the + 5VREF pin of the bridge circuit. The output voltage of the bridge is calculated using Eq. (3).
(1) R= L S where R denotes the initial electrical resistance, ∆R denotes the variation of R, and V ref is The operational amplifier AD7190 with PGA is adopted as the complete analog front for the measurement system. The chip has characteristics of low noise, high accuracy, and simple configuration and adjustment. The on-chip PGA means that small signals with low amplitude can be directly interfaced to the ADC without external amplifier circuit while still maintaining excellent noise performance. Additionally, the device contains a 24-bit sigma-delta (∑-Δ) analog-to-digital converter (ADC) and a digital filter unit used to reject the power supply noise.
As shown in Fig. 5, the low-pass filter consists of R5, R6, C13, C16, and C18, and it can be used to get rid of the high frequency components in the differential voltage at the output of the bridge. Although the precision voltage reference is used to excite the bridge, slight voltage fluctuations still cause output offset. Therefore, the reference pins of the AD7190 are connected to the high side and low side of the bridge. The other low-pass filter is composed of C12, C15, and C17 to ensure that the AD7190 receives a low noise voltage reference. DVDD is + 5 V power supply bypass with 10uf and 0.1uf capacitor to GND. According to properties of the DM, the measuring range is 0 to 10000 N, and the sensitivity is 2 mV/V. The power supply excitation voltage of the bridge is 5 V, and the output voltage range is 0-10 mV. The AD7190 is programmed to have a gain of 128 and configured as differential inputs. Therefore, with an external 5 V voltage reference, the analog input range of the AD7190 is equal to ± 40 mV. The wide analog input range of the AD7190 relative to the load bridge full scale signal (10 mV) is beneficial because it ensures that the offset and gain error of the bridge do not overload the front end of the ADC.

RF and data storage unit design
According to the tool-changing cycle, the dynamic force measurement device rotates with the manipulator. So, it is difficult to use wire transmission method to transmit data between the measurement device and the computer. Therefore, CC1101 RF (radio frequency) transceiver is adopted as a radio frequency-based wireless transmission and receiving module. CC1101 RF chip mainly works at the ISM frequency bands at 315, 433, 868, and 915 MHz and can easily be set for operation at other frequencies. Compared with other wireless chips based on 2.4 GHz, CC1101 has characteristics of greater transmission distance, good antiinterference ability, and efficient GFSK modulation. Its operating voltage is 3.3 V, and communication distance is up to 500 m. These features make it suitable for low power and short distance wireless communication applications.
Considering the harsh working environment, the wireless signal is susceptible to the noise caused by electrical drives, and its anti-interference ability may degenerate. To improve the reliability of data transmission, the USB flash is employed by the interface with a dedicated IC responsible for the creation of file directories and the real-time data storage. The microcontroller has to transmit data to the RF transceiver as well as offers a backup stored inside the USB flash. A UART interface is used to communicate the microcontroller with the CH376S, and the 4 GB of storage is sufficient to store the collected data.
The abovementioned circuits and units are integrated, and the circuit measurement part is shown in Fig. 6.

Microcontroller application
The basic executing processes of the microcontroller program are shown in Fig. 7.
The initialization subroutine first starts to execute. It completes various tasks, including setting of timers, the serial port, the SPI interface, the AD7190 analog-to-digital converter, and the wireless transceiver. When receiving the startup command, the AD7190 goes into operation and transmits the dynamic force data to the microcontroller via the SPI interface. Simultaneously, the microcontroller sends the acquired data to the computer and copies it to the USB flash. After completion of the data acquisition, the microcontroller reads backups from the USB flash to calculate the cyclic redundancy check (CRC) code and send it to the computer. There are only 3 times to retry during this data transmission process. Otherwise, the microcontroller believes that this communication fails and the unsent data is stored in the USB disk still waiting for the next successful connection to send data to the upper software.

LabVIEW application
As the central part of the whole measurement system software, the upper software is based on the LabVIEW platform. Compared with other text-based programming languages such as C/C + + , Java, and Matlab, LabVIEW is a graphical programming language which helps engineers create a high-quality program with a friendly user interface in a short time. In accordance with the requirement of the system, the application adopts modularization design which consists of parameter configuration, data verification, data display, and storage, as shown in Fig. 8. The parameter configuration module is used for setting the parameters of the COM port, and the parameters about serial communication must be consistent with the microcontroller's.
Data verification module completes a CRC checksum result based on the data received from the RF transceiver and compares with the checksum pass back from the microcontroller. If consistent, the application sends the right code FFH; if inconsistent, the application discards the data and sends the error code 00H, commanding the microcontroller to transmit data again. Data display and storage module complete the dynamic force data display and storage, respectively. While in the tool-changing cycle, the dynamic force data is shown graphically in real time. A user can then check if the tool-changing cycle is running as expected. The data is stored in "xlsx" data format, providing the user advantages to further analyze.

Teager energy operator based dual-threshold two sentences endpoint detection method
To accurately identify the onset and offset of each force event in a tool-changing cycle, a dual-threshold two sentences endpoint detection method based on Teager energy operator (TEO) is proposed in this paper. The TEO is a nonlinear energy operator derived by Kaiser to extract a measure of the mechanical process that generated a single time-varying signal [25]. The TEO possesses favorable properties of suppression of the low frequency background signal and enhancement of the high frequency signal. For a continuous 1-D time signal, the TEO is defined as where ̇x(t) and ẍ(t) are the first and second derivative of x(t), respectively. The discrete version of the TEO is defined as An excellent advantage of the TEO is that it can follow the energy of the transient signal. This is because only three adjacent samples of the signal are required to carry out the local differential operation without doing the integral. So, it offers us a simple tool to detect the transient part of the signal effectively. During the tool-changing process, if the force signal is stationary, its adjacent values will change slightly. If the force signal is impulsive, its adjacent values will change dramatically. Therefore, it is expected that features based on TEO can effectively discriminate between the stationary and impulsive states.
The dual-threshold two sentences method is used to detect the start-time and end-time of each force event in the toolchanging cycle. When the measurement device is in the tool pocket, the output force signal is relatively smooth and used for setting the first threshold for the stationary background signal. In consideration of the random noise, another higher threshold is set. The Teager energy of the segmented signal is calculated and compared with the threshold value. If the Teager energy of the current segment is lower than the first threshold, then it is called as silence state. However, if it is greater than the first threshold and the next segment's is also greater the second threshold, then it is an active state. Otherwise, it is the noise. Hence, by using the threshold algorithm, it provides a possible solution to estimate the duration of each force event in the tool-changing cycle.

Experimental results and discussion
To validate the performance of the DFMS, an experiment is conducted, and the field test environment is shown in Fig. 9. In the experiment, the load cell, the circuit board, the USB disk, and the supply battery are all integrated in the tool holder. Prior to the experiment, the measurement device needs to be zero for eliminating the effect of its weight. Moreover, the device should be installed in the tool pocket, and then, a tool-changing instruction is input into the NC system.
The tool magazine and spindle with BT40 tool holder specifications are used in the experiments, and the maximum capacity of the tool magazine is 24 tools with a maximum tool weight of 8 kg. According to the spindle specification, the drawbar force of DM is 5900-6100 N. When the NC system transmits the tool-changing signal to the ATCS, the system begins to work, and the acquisition ends when the manipulator resets to its initial position. Figure 10a demonstrates the experimental results for four tool-changing cycles. For the purpose of locating each step in a tool-changing cycle, the double threshold two sentences endpoint detection method based on TEO is used to recognize force events. Figure 10b illustrates the start-time and end-time of each force event in a tool-changing cycle. It can be seen that there are seven force events in a tool-changing cycle. The 1st one corresponds to step 1; the peak of transient force is close to 367 N, which is far greater than the weight of the device. Moreover, the force around the peak fluctuates for about 300 ms due to the shock vibration during the braking process. The 2nd one corresponds to the step 2; the dynamic force acting on the tool pocket increases by 29 N due to the fact that the actual position of the manipulator is slightly lower than the ideal position. The 4th one corresponds to step 4, and the maximum tool-pulling force is 185 N. The 5th one corresponds to step 5, and the measured force varies slowly. The 7th one corresponds to step 7, and the drawbar force suddenly approaches about 5879 N within 130 ms, which has a significant impact on the fatigue life of the tool holder and DM. The 8th one corresponds to step 8. When the manipulator leaves from the device, the drawbar force drops 5 N. Finally, the drawbar force reaches a constant value, which is about 5950 N.
The performance of the proposed endpoint detection algorithm is evaluated regarding its ability to accurately estimate the location of the onset and offset of each force event in a dynamic force signal by three standard metrics. They are sensitivity (Se), positive predictive value (PPV), and accuracy (Acc), which are defined as follows where true positive (TP) refers to the number of correctly detected force events in a given dynamic force signal. False negative (FN) refers to the number of force events not correctly detected in a given dynamic force signal. False positive (FP) refers to the number of noisy segments detected as force events. A force event is considered to be correctly detected if its temporal position overlaps the one of a ground-truth annotation. A tolerance of ± 10 ms is allowed for both the temporal onset and offset of a force event. The overall performance results of the proposed endpoint detection algorithm are tabulated in Table 1. The dataset consists of 100 dynamic force recordings, in which each force event segment is manually marked with a start-time and end-time.
From the results, it is observed that the proposed endpoint detection approach achieves above a sensitivity of 91%, predictive value of 93%, and accuracy of 84% for all force events. In particular, the algorithm achieves the best results for the 7th force event.

Conclusions
This paper demonstrates a dynamic force measurement system for the ATCS and DM. It has the following advantages: (1) Reliability. In the design stage, the reliability of the measurement system is mainly considered, including wireless transmission and electromagnetic shielding.
The measurement system requires collection of all data without loss in the tool-changing process. So, the proposed system adopts USB disk as the data cache and CRC algorithm to enhance the reliability of wireless data transmission. In order to reduce electromagnetic interference to the measurement system caused by the electrical equipment used in the machine tool and the electronic equipment used by the workers, such as the servo drive, the frequency converter, the mobile phone, and the wireless notebook, the load cell and measurement circuit are all placed in the electromagnetic shielding chamber made of metal material. (2) Modular design. The modular structure of the system makes it very easy to extend and modify. In this paper, the mechanical structure of the system is based on BT40 tool holder. However, it is also suitable for tool-pulling force and drawbar force measurement of the BT30 or BT50 tool holders by redesigning their mechanical structure, respectively. These features make it available in small-scale machining centers plant, as economical alternatives.
(3) Graphical user interface. As shown in Fig. 8, the software running on the computer takes advantage of Lab-VIEW's graphical programming. It is simple and easy for users to set parameters and complete the data acquisition and display.
However, the design is preliminary, and more tests need to be carried out before it can be used for fault diagnosis, predictive maintenance, and fatigue life prediction of the ATCS and DM.