銑床為金屬加工業核心母機之一,透過刀具旋轉並切削的方式將原料進行加工。一般小型加工廠的CNC(Computer Numerical Control)銑床工具機雖可藉由電腦程式控制進行自動化精密加工,但無法判斷刀具的健康狀態是否適合達成加工的品質及效率。目前小型加工廠進行更換或保養刀具的時間點,主要仰賴銑床師傅的經驗判斷。在少量多樣的加工模式下,銑床師傅難以精準掌握刀具狀態。一旦刀具無預警地斷裂,則需要停機處理刀具及被損壞的工件,甚至需要重新維護主軸或調機,造成成本增加,也影響生產良率、效率、產能及訂單交期,一次無預警斷裂的影響可達數萬至數十萬元。因此,無法掌握更換刀具的時機是金屬加工業者的痛點之一。 本論文探討小型CNC銑床加工廠中,銑床師傅認為最難掌握刀具加工狀態、且一旦斷裂後續處理最為麻煩的製程-攻牙,以攻牙刀斷裂前進行更換為目標,進行攻牙刀斷裂預警研究與方法設計。本論文研究問題P)、相應的挑戰C)以及設計的解決方案M)敘述如下: P1)CNC銑床攻牙刀進行加工之監測數據收集問題:要監測什麼機台數據項目? 是否需外加可負擔的感測器? 如何安裝? C1)需了解攻牙刀進行加工之製程與特性,並參考銑床師傅判斷更換刀具的經驗及主觀感受指標,來具體量化為客觀系統知識與指標,選擇所需的監測數據項目。然而小型加工廠的CNC銑床控制器的感測數據一般不開放使用者讀取,因此使用者須自行外加安裝感測器並讀取,須不違反設備維護合約、不影響加工以及考量可負擔性,因此收集監測數據的項目選擇有限,具挑戰性。 M1)比較師傅聽震動聲音的經驗法則與觀察並確認主軸負載電流與刀具利鈍的關聯性,後者有更具體的強關聯性,因此選擇監測主軸負載電流。再以非侵入、並聯的方式,加裝主軸負載電流錶頭讀取設備,量測主軸負載電流相應的電壓,由電壓的趨勢特徵掌握刀具的狀態。 P2)攻牙數據前處理問題: 由於主軸負載電流讀取設備的取樣頻率略有誤差,以及不同加工參數也會影響攻牙週期時間長短,如何在不同取樣點數下定義攻牙加工週期? C2)實驗收集到的攻牙電流數據檔案,缺乏攻牙開始或結束的時間標記,也沒有製程步驟的標記。每個檔案包含不同攻牙次數、每次攻牙的取樣點數不同、峰值不同、波形不同、不同次攻牙之間有無停頓也不一定。如何對攻牙電流數據定義一次攻牙加工週期是挑戰。 M2)經實際拜訪小型CNC銑床加工廠觀察攻牙製程,了解攻牙製程步驟與攻牙主軸負載電流數據的對應表現。藉由攻牙製程步驟對應的主軸負載電流表現特性,找出攻牙製程對應的主軸負載電流數據的起始點與結束點,定義攻牙主軸負載電流所呈現的加工週期。 P3)攻牙週期數據特徵萃取問題:攻牙製程共包含七個步驟,且單一攻牙加工週期的電流數據點數多,如何萃取週期數據中重要的特徵點以利攻牙刀斷裂預警判斷? C3)單一攻牙加工週期的數據點數多,且數據點數長度不一,實驗數據中,單一攻牙週期的電流數據點數從612個點到4080個點都有,如何從眾多數據點數中萃取重要的特徵點是挑戰。 M3)攻牙加工的主軸負載電流會隨攻牙刀的切削阻力變化而升降,且有切削阻力越大、主軸負載電流越高、攻牙刀越容易斷裂的現象。依上述現象為啟發,並以機器學習的決策樹模型輔助支持上述現象的道理,推論一個攻牙週期向下切削時的電流峰值是判斷該攻牙刀是否發生斷裂最重要的特徵。 P4)攻牙刀斷裂預警方法設計問題:本研究目標為在攻牙刀斷裂前,更換刀具或進行刀具保養。本研究為了考量並模擬小型加工廠單一訂單產品數量少的訂單型態,實驗收集的數據量少,缺乏把刀具從全新開始加工直到斷裂的完整數據,且同一把刀具進行加工的參數不一定完全相同,如何在少量的攻牙刀主軸負載電流數據條件下,設計出有效的攻牙刀斷裂預警方法? C4)在小型CNC銑床加工廠少量加工的型態下,相同加工條件的數據少,同一 把刀具常經過不同加工參數條件下加工,如何在少量資料、僅一項感測數 據及不同加工參數的條件下設計出有效的攻牙刀斷裂預警方法是挑戰。 M4)攻牙刀具磨耗程度與切削阻力成正相關,亦與攻牙刀的電流特徵點(即向下切削的電流峰值)成正相關,電流特徵點的值上升越急遽、攻牙刀越容易斷裂。依上述觀察,本研究運用常態分佈用3倍標準差判斷異常的概念為啟發,假設攻牙刀的電流特徵點值是常態分佈,來設計當一個攻牙週期的電流特徵點值大於該攻牙刀使用至前一週期的電流特徵點值三倍標準差時,則預警為斷裂前之週期,並於電腦螢幕產生”ALARM”字樣提醒銑床師傅檢查攻牙刀是否有鐵屑沾黏等影響攻牙的情形,若無,則進行刀具更換。若有影響攻牙的情況發生,則於狀況排除後再繼續進行加工。 本論文的研究發現和貢獻如下: (1)於CNC銑床既有之主軸負載電流錶頭裝設並聯電壓讀取裝置,具提供控制器不開放使用者讀取的CNC銑床機台收集主軸負載數據的價值,為非侵入式,且不影響設備運作與維護。 (2)建立CNC銑床攻牙刀加工的主軸負載電流資料集(dataset),共800筆。資 料集包含由全新未磨損或已使用磨損過的9把M5攻牙刀和3把M4攻牙刀在相同加工程式、加工材料均為S45C的工件,但不同加工參數(刀具轉速、加工深度、有無切削液)下的週期資料。 (3)實驗數據中,在4把具斷裂週期且攻牙週期皆大於47個週期的攻牙刀中,演算法均可在此4把攻牙刀在斷裂前的3~47個週期成功預警。相較銑床師傅通常以人耳聽到攻牙聲音異常時,還來不及緊急停機,攻牙刀就斷了,演算法可在斷裂前3~47個週期預警,有助於銑床師傅在攻牙刀斷裂前進行刀具更換。他人實驗顯示,相同型號的攻牙刀總共可加工週期可相差數十個甚至高達五百個以上的週期,本研究的演算法預警週期範圍將攻牙刀可加工週期差異的範圍集中至少一半以上,且誤警率小於0.5%,誤警率極低。 (4)本研究提出的演算法運算時間約1.5 ms,且作為預警攻牙刀斷裂基準的所需資料少,也可適用加工參數不同的情況,適合接單型態為少量多樣的加工廠。 (5)本研究僅需一項感測數據--主軸負載電流,並結合本研究提出的數據前處理及演算法,實驗結果顯示,在攻牙刀斷裂前預警的準確率達66.7%,相較他人僅使用電流感測數據判斷銑刀嚴重磨損(斷裂前的階段)的準確率40%,提高26.7%。本研究使用的主軸負載電流讀取設備成本約台幣一萬五千元,相較需要兩種以上感測數據的研究,在感測器及其讀取設備的成本降低至少50%以上。 (6)本研究展示可將CNC銑床控制器既有的主軸負載電流錶頭搭配非侵入式的讀取設備整合設計為攻牙刀斷裂預警系統,於CNC銑床外僅需添加主軸負載電流讀取器及筆電,並藉由乙太網路線進行資料傳輸來進行整合,系統開發建置成本估計約台幣三萬元,提供小型CNC銑床加工廠可負擔的攻牙刀斷裂預警方案。
Milling machine is one of the core machines in the metal processing industry. It processes raw materials by cutting tool rotating and cutting. Although CNC (Computer Numerical Control) milling machine in general small-scale milling machining shops can be controlled by computer programs for automatic precision processing, it is not able to judge whether the health status of the cutting tool is suitable for achieving the quality and efficiency of processing. At present, the timing of cutting tool replacement or maintenance in small-scale milling machining shops mainly depends on the experience and judgment of veteran mill machinists. In a small-volume large-variety processing mode, it is difficult for veteran mill machinists to accurately grasp the state of the cutting tool. Once the cutting tool breaks without warning, it is necessary to stop the machine to deal with the cutting tool and the damaged workpiece, and even need to re-maintain the spindle or adjust the machine, which will increase the cost and affect the production yield, efficiency, production capacity and order delivery time. The impact can reach tens of thousands to hundreds of thousands of NT dollars. Therefore, the inability to grasp the timing of cutting tool replacement is one of the pain points for metal processing workers. This research discusses the tapping process, which is considered by the veteran mill machinist in the small-scale milling machining shop to be the most difficult process to grasp the machining state of the cutting tool, and the follow-up treatment is the most troublesome once the tapping tool breaks. The aim is to replace the tapping tool before it breaks, and to research and design a method of early warning for tapping tool breakage. The main research problems P), the corresponding challenges C) and the designed solutions M) are: P1)The monitoring data collection problem of CNC milling machine tapping tool processing: what machine data items should be monitored? Is it necessary to add an affordable sensor and how to install it? C1)It is necessary to understand the process and characteristics of the tapping tool, and refer to the veteran mill machinist’s experience in judging tool replacement and subjective feeling indicators to quantify it into objective system knowledge and indicators, and select the required monitoring data items. However, the sensing data of CNC milling machine controllers in small-scale milling machining shops are generally not open to users to read, so users need to install additional sensors and read the sensing data without violating the equipment maintenance contract, not affecting processing, and considering affordability. It is challenging that the item options for collecting monitoring data are limited. M1)Comparing the rule of thumb of the veteran mill machinist listening to the vibration sound and observing and confirming the correlation between the spindle load current and the sharpness of the tool, the latter has a more specific and strong correlation, so I choose to monitor the spindle load current. Then, in a non-invasive and parallel way, install the reading device of the spindle load current meter to measure the voltage corresponding to the spindle load current, and grasp the state of the tool from the trend characteristics of the voltage. P2)Tapping data pre-processing problem: Since the sampling frequency of the spindle load current reading device has a slight error, and different processing parameters will also affect the length of the tapping cycle, how should a tapping processing cycle be defined under different sampling points? C2)The tapping current data files collected in the experiment lack time stamps for the start or end of tapping, and no markings for process steps. Each file contains different tapping times, different sampling points for each tapping, different peak values, different waveforms, and whether there is a pause between different tappings is not certain. How to define a tapping cycle for tapping current data is a challenge. M2)By visiting a small-scale CNC milling machining shop to observe the tapping process, understand the corresponding performance of the tapping process steps and the load current data of the tapping spindle. Based on the performance characteristics of the spindle load current corresponding to the tapping process steps, find out the starting point and end point of the spindle load current data corresponding to the tapping process, and define the tapping cycle presented by the spindle load current. P3)Tapping cycle data feature extraction problem: The tapping process includes seven steps in total, and there are many current data points in a single tapping processing cycle. How should important feature points in the cycle data be extracted to facilitate the early warning judgment of tapping tool breakage? C3)There are many data points in a single tapping cycle, and the length of the data points is different. In the experimental data, the current data points in a single tapping cycle range from 612 points to 4080 points. How to extract important feature points from many data points is the challenge. M3)The spindle load current of tapping processing will rise and fall with the cutting resistance of the tapping tool, and there is a phenomenon that the greater the cutting resistance, the higher the spindle load current, and the easier the tapping tool breaks. Inspired by the above phenomenon, and supported by the decision tree model of machine learning, it is deduced that the current peak value of the downward cutting in a tapping cycle is the most important feature for judging whether the tapping tool breaks. P4)Design problem of early warning method for tapping tool breakage: The goal of this research is to replace the tool or perform tool maintenance before the tapping tool breaks. In order to consider and simulate the order form of small number of products in a single order in a small-scale milling machining shop, the amount of data collected in the experiment is small, and there is a lack of complete data on cutting tools from new to broken, and the parameters of the same cutting tool are not necessarily the same. How do we design an effective early warning method for tapping tool breakage under the condition of a small amount of spindle load current data of the tapping tool? C4)In the case of a small amount of processing in a small-scale CNC milling machining shop, there are few data of the same processing conditions, and the same tool is often processed under different processing parameters. It is a challenge to design an effective early warning method for tapping tool breakage under the condition of a small amount of data, only one sensing data, and different processing parameters. M4)The degree of wear of the tapping tool is positively correlated with the cutting resistance, and is also positively correlated with the current characteristic point of the tapping tool (that is, the peak value of the downward cutting current). The sharper the value of the current feature point rises, the easier it is for the tapping tool to break. Based on the above observations, this study uses the concept of using a normal distribution to judge abnormalities with 3 times the standard deviation as an inspiration, assuming that the current characteristic point value of the tapping tool is a normal distribution, to design when the current characteristic point value of the cycle is higher than three times the standard deviation of the current characteristic point value used to the previous cycle, the cycle is early warned as the cycle before the breakage, and the word "ALARM" will be displayed on the computer screen to remind the mill machinist to check whether the tapping tool has iron filings sticking or other situations that affect the tapping process. If there is no situation that affects the tapping, replace the tool. If there is a situation that affects the tapping, continue processing after the situation is eliminated. The research findings and contributions of this paper are as follows: (1)Installing a voltage reading device in parallel on the existing spindle load ammeter of the CNC milling machine can provide the value of collecting spindle load data for CNC milling machines whose controllers are not open to users. It is non-invasive and does not affect the operation and maintenance of the equipment. (2)A data set of spindle load current for CNC milling machine tapping cutter processing, a total of 800 cycles, is created. The data set contains 9 tapping tools of size M5 and 3 tapping tools of size M4 that are new and unworn or have been used and worn. The cycles of data are collected under the condition of the same processing method and the same workpiece material that is S45C, but different processing parameters, such as tool speed, processing depth, with or without cutting fluid. (3)In the experimental data, among the 4 tapping tools with breakage cycle and the tapping cycles are greater than 47 cycles, the algorithm can successfully warn the 4 tapping tools 3 to 47 cycles before the breakage. Others' experiments have shown that the total processing cycle of the same type of tapping tool can differ by dozens or even as high as 500 or more cycles. The algorithm early warning cycle range of this research concentrates the range of the tapping tool's processing cycle difference by at least half , and the false alarm rate is less than 0.5%, which is extremely low. (4)The running time of the algorithm proposed in this research is about 1.5 ms, and less data is required as a benchmark for early warning of tapping tool breakage. It can also be applied to different processing parameters, and is suitable for small-scale CNC milling machining shops with the order form of a small-volume large-variety mode. (5)This study only needs one sensing data——spindle load current, combined with the data preprocessing and algorithm proposed in this study, the experimental results show that the accuracy rate of early warning before the tapping tool breaks is 66.7%, compared with others who only using current sensing data, the accuracy rate of judging severe wear of the milling cutter (stage before breakage) was 40%, an increase of 26.7%. The cost of the spindle load current reading device used in this study is about NT$15,000. Compared with the research that requires more than two kinds of sensing data, the cost of the sensor and its reading device is reduced by at least 50%. (6)This study shows that the existing spindle load current gauge of the CNC milling machine controller can be integrated with a non-invasive reading device to design a tapping tool breakage warning system. A spindle load current reader and a laptop only need to be added outside the CNC milling machine , and the integration is carried out through data transmission via the Ethernet cable. The cost of system development and construction is estimated to be about NT$30,000. It provides an affordable early warning solution for tapping tool breakage for small-scale milling machining shops.