数据集可从https://github.com/cathysiyu/Mechanical-datasets/tree/master/dataset下载
实验平台如图1所示,主要由六个部分组成,分别是电机控制器、电机、行星齿轮箱、减速齿轮箱、负载以及负载控制器。共安装了七个型号为608A11振动传感器来分别采集行星齿轮箱和减速齿轮箱的x、y、z三轴以及电机z轴方向上的振动数据,采样频率为5120Hz。在该实验平台上,模拟并采集了不同工况下齿轮不同运行状态的振动数据,包括:断损、健康、缺齿、齿根裂纹以及齿轮表面磨损。

不同故障状态的齿轮都是提前委托加工好变转速可通过电机控制器来实现,而负载的变化则可以通过负载控制器实现。此外,故障齿轮安装在减速齿轮箱内,如图2所示。
本数据集模拟了两种工况下的5种轴承运行状态和5种齿轮运行状态。两种工况分别为转速20Hz (1200rpm) -无负载0V (0Nm)与转速 30Hz (1800rpm) -有负载 2V (7.32Nm)。具体的故障类型描述如下表1所示。
哪个轴承、齿轮坏了信息未提供,轴承和齿轮尺寸参数也未提供。

图2 实验平台的结构框图
表1 故障类型描述

## 导入包from matplotlib import pyplot as pltfrom matplotlib import rcParamsimport numpy as npimport pandas as pdimport osconfig = {"font.family": 'serif', # 衬线字体"font.size": 14, # 相当于小四大小"font.serif": ['SimSun'], # 宋体"mathtext.fontset": 'stix', # matplotlib渲染数学字体时使用的字体,和Times New Roman差别不大'axes.unicode_minus': False # 处理负号,即-号}rcParams.update(config)
##========绘制时域信号图========##def plt_time_domain(arr, fs=1600, ylabel='Amp($m/s^2$)', title='原始数据时域图', img_save_path=None, x_vline=None, y_hline=None):""":fun: 绘制时域图模板:param arr: 输入一维数组数据:param fs: 采样频率:param ylabel: y轴标签:param title: 图标题:return: None"""import matplotlib.pyplot as pltplt.rcParams['font.sans-serif'] = ['SimHei'] # 显示中文plt.rcParams['axes.unicode_minus'] = False # 显示负号font = {'family': 'Times New Roman', 'size': '20', 'color': '0.5', 'weight': 'bold'}plt.figure(figsize=(12,4))length = len(arr)t = np.linspace(0, length/fs, length)plt.plot(t, arr, c='g')plt.xlabel('t(s)')plt.ylabel(ylabel)plt.title(title)if x_vline:plt.vlines(x=x_vline, ymin=np.min(arr), ymax=np.max(arr), linestyle='--', colors='r')if y_hline:plt.hlines(y=0.2, xmin=np.min(t), xmax=np.max(t), linestyle=':', colors='y')#===保存图片====#if img_save_path:plt.savefig(img_save_path, dpi=500, bbox_inches = 'tight')plt.show()
##========绘制频域信号图========##def plt_fft_img(arr, fs, ylabel='Amp(mg)', title='频域图', img_save_path=None, vline=None, hline=None, xlim=None):""":fun: 绘制频域图模板:param arr: 输入一维时域数组数据:param fs: 采样频率:param ylabel: y轴标签:param title: 图标题:return: None"""# 计算频域幅值length = len(arr)t = np.linspace(0, length/fs, length)arr = arr - np.mean(arr)fft_result = np.fft.fft(arr)fft_freq= np.fft.fftfreq(len(arr), d=t[1]-t[0]) # FFT频率fft_amp= 2*np.abs(fft_result)/len(t) # FFT幅值# 绘制频域图plt.figure(figsize=(12,4))plt.title(title)plt.plot(fft_freq[0: int(len(t)/2)], fft_amp[0: int(len(t)/2)], label='Frequency Spectrum', color='b')plt.xlabel('频率 (Hz)')plt.ylabel('幅值')plt.legend()if vline:plt.vlines(x=vline, ymin=np.min(fft_amp), ymax=np.max(fft_amp), linestyle='--', colors='r')if hline:plt.hlines(y=hline, xmin=np.min(fft_freq), xmax=np.max(fft_freq), linestyle=':', colors='y')#===保存图片====#if img_save_path:plt.savefig(img_save_path, dpi=500, bbox_inches = 'tight')if xlim: # 图片横坐标是否设置xlimplt.xlim(0, xlim)plt.tight_layout()plt.show()
def plt_envelope_spectrum(data, fs, ylabel='Amp(mg)', title='包络谱图', img_save_path=None, vline=None, hline=None, xlim=None):'''fun: 绘制包络谱图param data: 输入数据,1维arrayparam fs: 采样频率param xlim: 图片横坐标xlim,default = Noneparam vline: 图片垂直线,default = None'''from scipy import fftpack#=========做希尔伯特变换=======#xt = dataht = fftpack.hilbert(xt)at = np.sqrt(xt**2+ht**2) # 获得解析信号at = sqrt(xt^2 + ht^2)at = at - np.mean(at) # 去直流分量fft_amp = np.fft.fft(at) # 对解析信号at做fft变换获得幅值fft_amp = np.abs(fft_amp) # 对幅值求绝对值(此时的绝对值很大)fft_amp = fft_amp/len(fft_amp)*2fft_amp = fft_amp[0: int(len(fft_amp)/2)] # 取正频率幅值fft_freq = np.fft.fftfreq(len(at), d=1 / fs) # 获取fft频率,此时包括正频率和负频率fft_freq = fft_freq[0:int(len(fft_freq)/2)] # 获取正频率# 绘制包络谱图plt.figure(figsize=(12,4))plt.title(title)plt.plot(fft_freq, fft_amp, color='b')plt.xlabel('频率 (Hz)')plt.ylabel('幅值')if vline:plt.vlines(x=vline, ymin=np.min(fft_amp), ymax=np.max(fft_amp), linestyle='--', colors='r')if hline:plt.hlines(y=hline, xmin=np.min(fft_freq), xmax=np.max(fft_freq), linestyle=':', colors='y')#===保存图片====#if img_save_path:plt.savefig(img_save_path, dpi=500, bbox_inches = 'tight')if xlim: # 图片横坐标是否设置xlimplt.xlim(0, xlim)plt.tight_layout()plt.show()
def data_read(file_path):""":fun: 读取csv数据:param file_path: 文件路径:return df:"""try:df = pd.read_csv(file_path, header=None)df = df.iloc[16:, 0:8]df = df.astype(float)except:df = pd.read_csv(file_path, header=None)df.columns = ['acc_data']df = df.iloc[16:,:]# 首先,检查一下是否每个单元格都是字符串类型,如果不是,转换为字符串df['acc_data'] = df['acc_data'].astype(str)# 使用str.split来分割列,参数expand=True表示分割后的结果将作为新的列添加到DataFrame中df[['col1', 'col2', 'col3', 'col4', 'col5', 'col6', 'col7', 'col8', 'col9']] = df['acc_data'].str.split('\t', expand=True)df = df[['col1', 'col2', 'col3', 'col4', 'col5', 'col6', 'col7', 'col8']]df = df.astype(float)return dffile_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/ball_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesdf

2.2.2 时域分析
fs = 5120##=======滚动体=====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/ball_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfs = 5120file_name = r'ball_20_0.txt'plt_time_domain(acc_arr, fs=fs, title=file_name, img_save_path=time_img_save_path)kurtosis_value = calculate_kurtosis(acc_arr)print(f"Kurtosis of the signal: {kurtosis_value}")##=====外圈====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/outer_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'outer_20_0.txt'plt_time_domain(acc_arr, fs=fs, title=file_name, img_save_path=time_img_save_path)kurtosis_value = calculate_kurtosis(acc_arr)print(f"Kurtosis of the signal: {kurtosis_value}")##=====内圈====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/inner_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'inner_20_0.txt'plt_time_domain(acc_arr, fs=fs, title=file_name, img_save_path=time_img_save_path)kurtosis_value = calculate_kurtosis(acc_arr)print(f"Kurtosis of the signal: {kurtosis_value}")##=====复合====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/comb_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'comb_20_0.txt'plt_time_domain(acc_arr, fs=fs, title=file_name, img_save_path=time_img_save_path)kurtosis_value = calculate_kurtosis(acc_arr[fs*15:])print(f"Kurtosis of the signal: {kurtosis_value}")##=====正常====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/health_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'health_20_0.txt'plt_time_domain(acc_arr, fs=fs, title=file_name, img_save_path=time_img_save_path)kurtosis_value = calculate_kurtosis(acc_arr[fs*15:])print(f"Kurtosis of the signal: {kurtosis_value}")

Kurtosis of the signal: 5.5406536985286845

Kurtosis of the signal: 8.797642439965788

Kurtosis of the signal: 6.232998410057402

Kurtosis of the signal: 10.848358613561665

Kurtosis of the signal: 3.9275366437831924
2.2.3 频域分析
fs = 5120##=======滚动体=====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/ball_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfs = 5120file_name = r'ball_20_0.txt'plt_fft_img(acc_arr, fs=fs, title=file_name, img_save_path=fft_img_save_path, vline=[20, 40, 60, 80, 100], xlim=500)##=====外圈====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/outer_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'outer_20_0.txt'plt_fft_img(acc_arr, fs=fs, title=file_name, img_save_path=fft_img_save_path, vline=[20, 40, 60, 80, 100], xlim=500)##=====内圈====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/inner_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'inner_20_0.txt'plt_fft_img(acc_arr, fs=fs, title=file_name, img_save_path=fft_img_save_path, vline=[20, 40, 60, 80, 100], xlim=500)##=====复合====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/comb_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'comb_20_0.txt'plt_fft_img(acc_arr, fs=fs, title=file_name, img_save_path=fft_img_save_path, vline=[20, 40, 60, 80, 100], xlim=500)##=====正常====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/health_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'health_20_0.txt'plt_fft_img(acc_arr, fs=fs, title=file_name, img_save_path=fft_img_save_path, vline=[20, 40, 60, 80, 100], xlim=500)





分析:
滚动体、外圈、内圈故障状态可以看到明显的转频及其倍频;
复合故障、正常状态可以看到明显的转频及其倍频。
2.2.4 包络谱分析
fs = 5120##=======滚动体=====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/ball_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfs = 5120file_name = r'ball_20_0.txt'plt_envelope_spectrum(acc_arr, fs=fs, xlim=300, title=file_name)##=====外圈====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/outer_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'outer_20_0.txt'plt_envelope_spectrum(acc_arr, fs=fs, xlim=300, title=file_name)##=====内圈====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/inner_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'inner_20_0.txt'plt_envelope_spectrum(acc_arr, fs=fs, xlim=300, title=file_name)##=====复合====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/comb_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'comb_20_0.txt'plt_envelope_spectrum(acc_arr, fs=fs, xlim=300, title=file_name)##=====正常====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/bearingset/health_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'health_20_0.txt'plt_envelope_spectrum(acc_arr, fs=fs, xlim=300, title=file_name)





分析:
滚动体、外圈、内圈故障状态能看到突出峰值频率,但由于特征频率未知,不能判断是否对应上;
复合故障、正常状态没有看到明显的突出峰值频率。
2.3 齿轮故障分析
2.3.1 时域分析
fs = 5120##=======缺损=====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Chipped_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfs = 5120file_name = r'Chipped_20_0.txt'plt_time_domain(acc_arr, fs=fs, title=file_name, img_save_path=time_img_save_path)kurtosis_value = calculate_kurtosis(acc_arr)print(f"Kurtosis of the signal: {kurtosis_value}")##=====断齿====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Miss_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'Miss_20_0.txt'plt_time_domain(acc_arr, fs=fs, title=file_name, img_save_path=time_img_save_path)kurtosis_value = calculate_kurtosis(acc_arr)print(f"Kurtosis of the signal: {kurtosis_value}")##=====齿根磨损====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Root_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'Root_20_0.txt'plt_time_domain(acc_arr, fs=fs, title=file_name, img_save_path=time_img_save_path)kurtosis_value = calculate_kurtosis(acc_arr)print(f"Kurtosis of the signal: {kurtosis_value}")##=====齿面磨损====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Surface_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'Surface_20_0.txt'plt_time_domain(acc_arr, fs=fs, title=file_name, img_save_path=time_img_save_path)kurtosis_value = calculate_kurtosis(acc_arr)print(f"Kurtosis of the signal: {kurtosis_value}")##=====正常===##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Health_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'Health_20_0.txt'plt_time_domain(acc_arr, fs=fs, title=file_name, img_save_path=time_img_save_path)kurtosis_value = calculate_kurtosis(acc_arr)print(f"Kurtosis of the signal: {kurtosis_value}"

Kurtosis of the signal: 7.422209118627884

Kurtosis of the signal: 5.5002292494444

Kurtosis of the signal: 5.0213472682796505

Kurtosis of the signal: 6.070086072663545

Kurtosis of the signal: 5.191029822842028
分析:
故障和正常齿轮的峭度因子均>3,峭度因子对齿轮状态监测可能不太适用。
2.3.2 频域分析
fs = 5120##=======缺损=====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Chipped_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfs = 5120file_name = r'Chipped_20_0.txt'plt_fft_img(acc_arr, fs=fs, title=file_name, img_save_path=fft_img_save_path, vline=[20, 40, 60, 80, 100], xlim=500)##=====断齿====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Miss_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'Miss_20_0.txt'plt_fft_img(acc_arr, fs=fs, title=file_name, img_save_path=fft_img_save_path, vline=[20, 40, 60, 80, 100], xlim=500)##=====齿根磨损====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Root_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'Root_20_0.txt'plt_fft_img(acc_arr, fs=fs, title=file_name, img_save_path=fft_img_save_path, vline=[20, 40, 60, 80, 100], xlim=500)##=====齿面磨损====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Surface_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'Surface_20_0.txt'plt_fft_img(acc_arr, fs=fs, title=file_name, img_save_path=fft_img_save_path, vline=[20, 40, 60, 80, 100], xlim=500)##=====正常===##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Health_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'Health_20_0.txt'plt_fft_img(acc_arr, fs=fs, title=file_name, img_save_path=fft_img_save_path, vline=[20, 40, 60, 80, 100], xlim=500)
file_path = r'E:/03-公开数据集/都灵理工大学变转速轴承数据集/都灵理工大学数据集/VariableSpeedAndLoad/C4A_400_496_1.mat'df = data_read(file_path)acc_arr= df['A1_x']plt_envelope_spectrum(acc_arr, fs=fs, xlim=3000, vline=[C_bsf, C_bsf*2])





分析:
故障和正常齿轮状态可以看到明显的转频及其倍频
2.3.3 包络谱分析
fs = 5120##=======缺损=====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Chipped_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'Chipped_20_0.txt'plt_envelope_spectrum(acc_arr, fs=fs, xlim=300, title=file_name)##=====断齿====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Miss_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'Miss_20_0.txt'plt_envelope_spectrum(acc_arr, fs=fs, xlim=300, title=file_name)##=====齿根磨损====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Root_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'Root_20_0.txt'plt_envelope_spectrum(acc_arr, fs=fs, xlim=300, title=file_name)##=====齿面磨损====##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Surface_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'Surface_20_0.txt'plt_envelope_spectrum(acc_arr, fs=fs, xlim=300, title=file_name)##=====正常===##file_path = r'E:/03-公开数据集/东南大学数据集/gearbox/gearset/Health_20_0.csv'df = data_read(file_path)acc_arr= df.iloc[:,7].valuesfile_name = r'Health_20_0.txt'plt_envelope_spectrum(acc_arr, fs=fs, xlim=300, title=file_name





分析:
故障和正常齿轮状态可以看到明显的转频及其倍频,但由于特征频率未知,不能判断是否对应上。
参考文献:
[1] 陈超. 基于迁移学习的旋转机械故障诊断方法研究[D].东南大学,2022.
[2] 邵思羽.基于深度学习的旋转机械故障诊断方法研究[D].东南大学,2019.
[3] S. Shao, S. McAleer, R. Yan and P. Baldi, "Highly Accurate Machine Fault Diagnosis Using Deep Transfer Learning," in IEEE Transactions on Industrial Informatics, vol. 15, no. 4, pp. 2446-2455, April 2019, doi: 10.1109/TII.2018.2864759.
编辑:李正平
校核:陈凯歌、赵栓栓、董浩杰、曹希铭、赵学功、白亮、陈少华
该文资料搜集自网络,仅用作学术分享,不做商业用途,若侵权,后台联系小编进行删除