🗂️ 顶层目录结构说明
跳转到“🗂️ 顶层目录结构说明”F:.│ test.txt│├─12k Drive End Bearing Fault Data├─12k Fan End Bearing Fault Data├─48k Drive End Bearing Fault Data└─Normal Baseline- test.txt:可能包含数据集介绍、实验说明或测试集划分信息(需打开确认具体内容)。
📁 各数据文件夹结构与内容说明
跳转到“📁 各数据文件夹结构与内容说明”1️⃣ 12k Drive End Bearing Fault Data(12kHz 驱动端故障数据)
跳转到“1️⃣ 12k Drive End Bearing Fault Data(12kHz 驱动端故障数据)”- 采样频率:12kHz
- 采样位置:驱动端
- 子类型:
├─Ball # 滚珠故障├─Inner Race # 内圈故障└─Outer Race # 外圈故障(又细分位置)
🚨 故障类型子目录
跳转到“🚨 故障类型子目录”| 类型 | 含义说明 | 示例子目录/文件 |
|---|---|---|
| Ball | 滚珠(滚动体)故障 | Ball/0007/B007_0.mat |
| Inner Race | 内圈故障 | Inner Race/0014/IR014_2.mat |
| Outer Race | 外圈故障,进一步细分为: | Outer Race/Centered/0007/OR007@6_0.mat |
| ├─ Centered:6点钟方向 | @6 | |
| ├─ Opposite:12点钟方向 | @12 | |
| └─ Orthogonal:3点钟方向 | @3 or 文件编号如 144.mat |
🧾 文件命名规则说明(通用格式):
跳转到“🧾 文件命名规则说明(通用格式):”[故障类型代码][故障直径]@[位置]_[负载编号].mat| 项 | 示例 | 含义说明 |
|---|---|---|
| 故障类型代码 | B / IR / OR | Ball / Inner Race / Outer Race |
| 故障直径 | 007 / 014 等 | 故障直径(单位:英寸 x 0.001) |
| @位置 | @6 / @12 / @3 | 故障方向位置(Outer Race) |
| _负载编号 | _0 / _1 / _2 / _3 | 对应电机负载(0HP~3HP) |
2️⃣ 12k Fan End Bearing Fault Data(12kHz 风扇端故障数据)
跳转到“2️⃣ 12k Fan End Bearing Fault Data(12kHz 风扇端故障数据)”- 采样频率:12kHz
- 采样位置:风扇端
- 结构:与
12k Drive End类似,但文件较少,部分数据可能不完整。
3️⃣ 48k Drive End Bearing Fault Data(48kHz 驱动端故障数据)
跳转到“3️⃣ 48k Drive End Bearing Fault Data(48kHz 驱动端故障数据)”- 采样频率:48kHz
- 采样位置:驱动端
- 结构:同
12k Drive End,但具有更高分辨率的信号,适用于分析高频振动特征。
4️⃣ Normal Baseline(正常基准数据)
跳转到“4️⃣ Normal Baseline(正常基准数据)”- 说明:无故障工况下的振动信号,用于对比分析
- 示例文件:
normal_0.mat # 负载 0HPnormal_1.mat # 负载 1HPnormal_2.mat # 负载 2HPnormal_3.mat # 负载 3HP
🧪 实验设置说明
跳转到“🧪 实验设置说明”| 项目 | 说明 |
|---|---|
| 故障直径 | 0.007”、0.014”、0.021”、0.028” |
| 电机负载 | 0HP、1HP、2HP、3HP(对应文件后缀 _0 ~ _3) |
| 故障类型 | Ball(滚珠)、Inner Race(内圈)、Outer Race(外圈) |
| 采样频率 | 12kHz(Drive/Fan 端),48kHz(Drive 端) |
🧩 数据文件内容说明(.mat 文件)
跳转到“🧩 数据文件内容说明(.mat 文件)”- 文件格式:MATLAB
.mat - 常见字段:
X:振动加速度信号(一维时间序列)RPM:电机转速(单位:RPM)sr:采样频率(单位:Hz)
✅ 可用 scipy.io.loadmat(Python)或 MATLAB 加载分析。
🔑 快速示例解释
跳转到“🔑 快速示例解释”示例1:IR014_2.mat
跳转到“示例1:IR014_2.mat”- 内圈故障(IR),0.014英寸
- 电机负载为 2HP
示例2:OR007@6_1.mat
跳转到“示例2:OR007@6_1.mat”- 外圈故障(OR),0.007英寸,6点钟方向
- 电机负载为 1HP
✅ 一、故障类型标签分类总览表(可用于训练/分类建模)
跳转到“✅ 一、故障类型标签分类总览表(可用于训练/分类建模)”| 文件路径示例 | 采样频率 | 安装端 | 故障类型 | 故障位置 | 故障直径 | 负载 | 标签ID(可自定义) |
|---|---|---|---|---|---|---|---|
| 12k Drive End/Ball/0007/B007_0.mat | 12kHz | Drive | Ball | — | 0.007 | 0HP | 1 |
| 12k Drive End/Inner Race/0014/IR014_2.mat | 12kHz | Drive | Inner Race | — | 0.014 | 2HP | 2 |
| 12k Drive End/Outer Race/Centered/0007/OR007@6_1.mat | 12kHz | Drive | Outer Race | Centered | 0.007 | 1HP | 3 |
| 48k Drive End/Ball/0021/B021_3.mat | 48kHz | Drive | Ball | — | 0.021 | 3HP | 4 |
| 12k Fan End/Outer Race/Opposite/0014/OR014@12_0.mat | 12kHz | Fan | Outer Race | Opposite | 0.014 | 0HP | 5 |
| Normal Baseline/normal_0.mat | 12kHz | — | Normal | — | — | 0HP | 0 |
✅ 说明:
- 标签ID 是你训练时可以指定的分类编码。
- 也可添加一列:
是否故障 = True/False,用于二分类建模。
💻 二、Python 加载 .mat 文件数据代码模板(适用于CWRU数据)
跳转到“💻 二、Python 加载 .mat 文件数据代码模板(适用于CWRU数据)”import scipy.ioimport osimport numpy as np
def load_mat_data(file_path): data = scipy.io.loadmat(file_path) # 寻找键值,可能是 'X' 或 'DE_time',取决于.mat结构 for key in data: if isinstance(data[key], np.ndarray) and data[key].ndim == 1: signal = data[key].squeeze() return signal raise ValueError(f"No 1D signal found in {file_path}")
# 示例:加载某个文件file_path = '12k Drive End Bearing Fault Data/Ball/0007/B007_0.mat'signal = load_mat_data(file_path)print(f"Loaded signal shape: {signal.shape}")✅ 可扩展为:批量读取数据 + 自动打标签 + 存为 CSV 或 pickle 格式。
📊 三、可选 Excel 目录总览表(适合整理文件管理 & 批处理)
跳转到“📊 三、可选 Excel 目录总览表(适合整理文件管理 & 批处理)”是否需要我根据你文件结构,生成一份如下格式的 Excel 表格?可直接导入 pandas、Excel 或数据库使用:
| 文件名 | 文件路径 | 故障类型 | 故障位置 | 故障直径 | 负载 | 采样频率 | 标签ID |
|---|---|---|---|---|---|---|---|
| B007_0.mat | 12k Drive End Bearing Fault Data/Ball/0007/ | Ball | — | 0.007 | 0HP | 12kHz | 1 |
| IR014_2.mat | 12k Drive End Bearing Fault Data/Inner Race/0014/ | Inner Race | — | 0.014 | 2HP | 12kHz | 2 |
| <<OR007@6_0.mat>> | 12k Drive End Bearing Fault Data/Outer Race/Centered/0007/ | Outer Race | Centered | 0.007 | 0HP | 12kHz | 3 |
| normal_0.mat | Normal Baseline/ | Normal | — | — | 0HP | 12kHz | 0 |
| … | … | … | … | … | … | … | … |
数据解释:
# 路径:CRWU\12k Drive End Bearing Fault Data\Outer Race\Orthogonal\0007\144.mat>> whos('-file', '144.mat') Name Size Bytes Class Attributes
X144RPM 1x1 8 double X144_BA_time 122281x1 978248 double X144_DE_time 122281x1 978248 double X144_FE_time 122281x1 978248 double| 变量名 | 尺寸 | 类型 | 含义解释 |
|---|---|---|---|
X144RPM | 1×1 | double | 电机的旋转速度(单位:RPM) |
X144_BA_time | 122281×1 | double | 滚动体(Ball)位置的传感器采集的振动信号 |
X144_DE_time | 122281×1 | double | 驱动端(Drive End)传感器采集的振动信号 |
X144_FE_time | 122281×1 | double | 风扇端(Fan End)传感器采集的振动信号 |
| 项目 | 说明 |
|---|---|
| 采样频率 | 12kHz(12,000 Hz) |
| 采样端口 | 驱动端(Drive End)安装传感器进行主要采集 |
| 故障类型 | 外圈故障(Outer Race Fault) |
| 故障位置 | Orthogonal(正交方向,通常为3点钟方向) |
| 故障直径 | 0.007 英寸(从文件夹 0007 得知) |
| 文件编号 | 144(内部变量也以 X144 开头) |
| 负载情况 | 需要查看实际文件名是否有标注,或查看 RPM 估算负载(或参考实验记录) |
clc;clear;path = 'F:\code\projects\29_QT_projects\custom_widget\database\CRWU\12k Drive End Bearing Fault Data\Outer Race\Orthogonal\0007\144.mat';
data = load(path); % 加载 .mat 文件
% 绘制 X144_BA_time、X144_DE_time 和 X144_FE_timefigure;
subplot(3,1,1); % 三行一列的子图,第一行plot(data.X144_BA_time, 'r'); % y轴是采样点数据,x轴是数据点信号title('X144_BA_time');xlabel('Time Index');ylabel('Value');
subplot(3,1,2); % 三行一列的子图,第二行plot(data.X144_DE_time, 'g');title('X144_DE_time');xlabel('Time Index');ylabel('Value');
subplot(3,1,3); % 三行一列的子图,第三行plot(data.X144_FE_time, 'b');title('X144_FE_time');xlabel('Time Index');ylabel('Value');clc;clear;clc;clear;
%% 1. 数据加载与处理% 文件路径path = 'F:\code\projects\29_QT_projects\custom_widget\database\CRWU\12k Drive End Bearing Fault Data\Outer Race\Orthogonal\0007\144.mat';
% 加载数据data = load(path);
% 采样频率(根据文件夹信息推断为12kHz)Fs = 12000;
% 构建时间轴N = length(data.X144_BA_time); % 假设三个通道长度相同t = (0:N-1) / Fs; % 时间轴(单位:秒)
%% 2. 绘图% 绘制 X144_BA_time、X144_DE_time 和 X144_FE_timefigure;
subplot(3,1,1);plot(t, data.X144_BA_time, 'r');title('X144\_BA\_time');xlabel('Time (s)');ylabel('Amplitude');
subplot(3,1,2);plot(t, data.X144_DE_time, 'g');title('X144\_DE\_time');xlabel('Time (s)');ylabel('Amplitude');
subplot(3,1,3);plot(t, data.X144_FE_time, 'b');title('X144\_FE\_time');xlabel('Time (s)');ylabel('Amplitude');
%% 3. 保存数据为 CSV 文件% 将数据转换成表格t = table(data.X144_BA_time, data.X144_DE_time, data.X144_FE_time);
% 保存为 CSV 文件writetable(t, '144_data.csv');时频图
来源:CSDN 原文,首次发布于 2025-04-05。