├── MultidomainFeatureExtraction.py ├── README.md └── WaveletPacketEnergy.py /MultidomainFeatureExtraction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on 2023/05/27 4 | 5 | @author: R. Wang @SDU 6 | """ 7 | import numpy as np 8 | import scipy.stats 9 | from WaveletPacketEnergy import WaveletPacketEnergy 10 | 11 | 12 | def exfeature(signal_, Fs=5000): 13 | ''' 14 | 15 | Parameters 16 | ---------- 17 | signal_ : TYPE 18 | the orginal cutting signal. 19 | Fs : TYPE 20 | sampling frequency. The default is 5000. 21 | 22 | Returns 23 | ------- 24 | f_mat : TYPE 25 | feature matrix. 26 | 27 | ''' 28 | N = len(signal_) 29 | y = signal_ 30 | # # time domain features 31 | t_mean_1 = np.mean(y) # 1 average 32 | t_max_2 = np.max(y) # 2 max 33 | t_std_3 = np.std(y, ddof=1) # 3 standard deviation 34 | t_fgf_4 = ((np.mean(np.sqrt(np.abs(y)))))**2 35 | t_rms_5 = np.sqrt((np.mean(y**2))) # 5 RMS 36 | t_pp_6 = 0.5*(np.max(y)-np.min(y)) 37 | t_skew_7 = scipy.stats.skew(y) # 7 skewness 38 | t_kur_8 = scipy.stats.kurtosis(y) # 8 Kurtosis 39 | t_cres_9 = np.max(np.abs(y))/t_rms_5 # 9 Crest Factor 40 | t_clear_10 = np.max(np.abs(y))/t_fgf_4 # 10 Clearance Factor 41 | t_shape_11 = (N * t_rms_5)/(np.sum(np.abs(y))) # 11 Shape fator 42 | t_imp_12 = ( np.max(np.abs(y)))/(np.mean(np.abs(y))) # 12 Impulse Fator 43 | # # frequency domain features(f_13:f_24) 44 | L = len(signal_) 45 | PL = abs(np.fft.fft(signal_ / L))[: int(L / 2)] 46 | PL[0] = 0 47 | f = np.fft.fftfreq(L, 1 /Fs)[: int(L / 2)] 48 | x = f 49 | y = PL 50 | K = len(y) 51 | f_13 = np.mean(y) 52 | f_14 = np.var(y) 53 | f_15 = (np.sum((y - f_13)**3))/(K * ((np.sqrt(f_14))**3)) 54 | f_16 = (np.sum((y - f_13)**4))/(K * ((f_14)**2)) 55 | f_17 = (np.sum(x * y))/(np.sum(y)) 56 | f_18 = np.sqrt((np.mean(((x- f_17)**2)*(y)))) 57 | f_19 = np.sqrt((np.sum((x**2)*y))/(np.sum(y))) 58 | f_20 = np.sqrt((np.sum((x**4)*y))/(np.sum((x**2)*y))) 59 | f_21 = (np.sum((x**2)*y))/(np.sqrt((np.sum(y))*(np.sum((x**4)*y)))) 60 | f_22 = f_18/f_17 61 | f_23 = (np.sum(((x - f_17)**3)*y))/(K * (f_18**3)) 62 | f_24 = (np.sum(((x - f_17)**4)*y))/(K * (f_18**4)) 63 | f_25 = WaveletPacketEnergy(signal_,3)[0] #3-layer WaveletPacket 64 | f_26 = WaveletPacketEnergy(signal_,3)[1] 65 | f_27 = WaveletPacketEnergy(signal_,3)[2] 66 | f_28 = WaveletPacketEnergy(signal_,3)[3] 67 | f_29 = WaveletPacketEnergy(signal_,3)[4] 68 | f_30 = WaveletPacketEnergy(signal_,3)[5] 69 | f_31 = WaveletPacketEnergy(signal_,3)[6] 70 | f_32 = WaveletPacketEnergy(signal_,3)[7] 71 | f_mat = np.array([t_mean_1,t_max_2, t_std_3, t_fgf_4, t_rms_5, t_pp_6, 72 | t_skew_7, t_kur_8, t_cres_9, t_clear_10, t_shape_11, t_imp_12, 73 | f_13, f_14, f_15, f_16, f_17, f_18, f_19, f_20, f_21, f_22, f_23, f_24, 74 | f_25,f_26,f_27,f_28,f_29,f_30,f_31,f_32]) 75 | return f_mat 76 | 77 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HMoTP 2 | High-speed milling of thin-walled parts (HMoTP) dataset 2024 released by Prof. Qinghua Song's Lab from Shandong University. 3 | This is a dataset for high-performance machining of titanium alloy thin-walled parts containing milling force, milling bending moment, workpiece vibration, and tool wear data that can be used for tool wear monitoring and chatter detection researches. 4 | ## Paper 5 | This is a dataset for our accepted paper 'R. Wang, Q. Song, Y. Peng, et al. Toward digital twins for high-performance manufacturing: Tool wear monitoring in high-speed milling of thin-walled parts using domain knowledge, Robot Comput-Integr Manuf 2024;88:102723 https://doi.org/10.1016/j.rcim.2024.102723'. 6 | If this dataset is useful for your research, please cite our paper. 7 | ## Dataset structure 8 | Data of Each cutting in the dataset is stored as an independent CSV file. 9 | The cutting data of the three tools are stored in folders named CuttingsignalsT01/CuttingsignalsT02/CuttingsignalsT03 respectively. 10 | Each cutting tool has 100 sets of cutting data. Taking the T1 tool as an example, its cutting data is saved in 100 CSV files named T01_001.CSV to T01_100.CSV. 11 | Each CSV file of cutting data contains data for 7 channels: Fx, Fy, Fz, Mz, Ax, Ay, and Az. 12 | Each cutting data corresponds to a tool wear value, and the wear values of all tools are saved in files named ToolWeaT01.csv/ToolWeaT02.csv/ToolWeaT03.csv. 13 | # Download 14 | All the data can be downloaded from one of the following links 15 | 1. Baidu Netdisk: https://pan.baidu.com/s/1PFtNowJL_QUmHMtoHvRHJA Extraction code: sdum 16 | 2. Google Drive: https://drive.google.com/drive/folders/1eBhTSXMd8jVITfQoJifC50fE_NIFqb89?usp=sharing 17 | 3. Personal website: https://runqiong.wang/dataset/ 18 | # Contact infor 19 | Please contact Runqiong Wang (wangrunqiong@163.com), the first author of the paper, if you encounter any problems in using it. 20 | -------------------------------------------------------------------------------- /WaveletPacketEnergy.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on 2023/05/27 4 | 5 | @author: Runqiong Wang @SDU 6 | """ 7 | 8 | import numpy as np 9 | import pywt 10 | import pywt.data 11 | 12 | 13 | def WaveletPacketEnergy(inputsignal,level): 14 | wp = pywt.WaveletPacket(data=inputsignal, wavelet='db1',mode='symmetric',maxlevel=level) 15 | energy = [] #energy of ‘level’ layer 16 | for i in [node.path for node in wp.get_level(level, 'freq')]: 17 | re=(wp[i].data) #Decomposition coefficient for the ith node of the LEVEL layer 18 | energy.append(pow(np.linalg.norm(re,ord=None),2)) 19 | return energy 20 | 21 | 22 | --------------------------------------------------------------------------------