摘要: | 準確預測加工時間,對於預測交貨時間以及製造成本非常重要。對於使用電腦數值控制(Computer Numerical Control, CNC)工具機進行小批量生產時,評估數值控制(Numerical Control, NC)程式的循環時間會是製造成本和調度排程的關鍵問題。本研究將提出一系列的方法進行收集資料、前處理輸入資料、以及開發深度學習模型。由於NC程式可被視為一種機器語言,因此本研究使用長短期記憶(Long Short-Term Memory, LSTM)模型做為此深度學習模型的核心。 首先,使用CAM軟體分析產品CAD檔之後建立刀具路徑與產生NC程式。接著使用CNC執行NC程式並取得運行資料,再將NC程式與運行資料經過擬合處理,合併為單節運行時間資料。接著,使用簡單的加工案例對研究方法進行驗證和調整,找出合適的深度學習模型。較佳的模型為一層64節點的LSTM、一層32節點的LSTM、以及一層單節點的Dense;適合的輸入資料為單節之刀具路徑長除以單節之進給速度,且適合的輸出資料為單節運行時間,並在複雜的加工案例進行驗證測試。 本研究提出評估準確度的指標應為總時間誤差率、單節平均誤差值、以及實際結果與預估結果的相關係數。在相關的案例中,加工時間的預測總時間誤差率約在0.01%與0.2%間,單節平均誤差值約在0.005秒與0.041秒間,以及實際結果與預估結果的相關係數約在96%與99.9%間。
關鍵字:循環時間、(Long Short-Term Memory, LSTM)、小批量生產、電腦數值控制(Computer Numerical Control, CNC)、數值控制(Numerical Control, NC)、深度學習。 ;Accurate prediction of machining time is very important for estimating delivery time and manufacturing costs. When using Computer Numerical Control (CNC) machine for small batch production, evaluating the cycle time of Numerical Control (NC) programs is a key issue for manufacturing costs and scheduling. This study propose a series of approaches for collecting data, pre-processing input data, and developing deep learning models. Since NC programs can be regarded as a kind of machinery language, this study uses the Long Short-Term Memory (LSTM) as the core of the deep learning model. Firstly, CAM software is applied to analyze product CAD files to create tool paths and generate NC programs. Then a CNC machine runs the NC programs to generate the dynamic data. The NC program and the dynamic data are combined into a set of single block data. After that, regular machining cases are applied to study the deep learning model The best model is one 64-node LSTM layer, one 32-node LSTM layer, and an one-node dense layer as the outputting layer. The suitable input data is the ratio of distance and feed rate, the output data is runtime of the target block, and conduct verification tests on the complex machining cases. The study proposed the performance indexes to evaluate the performance of our model including the error rate of total cycle time, the average runtime error of single blocks, and the correlation coefficient between the actual results and estimated results. In the related cases, the estimated total time error rate of processing time is between 0.01% and 0.2%, the average error of single block is between 0.005 sec and 0.041 sec, and the correlation coefficient of actual results and estimated results is between 96 % and 99.9 %.
Keywords: Cycle Time, Long Short-Term Memory (LSTM), Small Batch Production, Computer Numerical Control (CNC), Numerical Control (NC), Deep Learning. |