MBHM_DATASET_GUIDE

MBHM 数据集详细说明

数据集概述

MBHM (Multimodal Bearing Health Management) 是首个专为轴承健康管理研究设计的多模态数据集,由 SIA-IDE 团队开发,相关论文发表于 AAAI-25 会议。

该数据集融合了振动信号与健康管理语料库,支持多种轴承健康管理任务,包括故障检测、故障分类、故障分析等。数据集涵盖了成千上万种工况,为模型训练和评估提供了丰富的挑战场景。

基本信息


数据集组成

1. 振动信号数据

data.hdf5 (13GB)
  • 总样本数: 135,516 条
  • 信号长度: 每条 24,000 个采样点
  • 数据类型: float32
  • 信号来源: 9个公开轴承故障数据集
  • 预处理: 使用离散余弦归一化 (DCN) 统一信号长度

数据访问示例:

python 复制代码
import h5py
import numpy as np

with h5py.File('mbhm_dataset/data.hdf5', 'r') as f:
    vibration = f['vibration']  # shape: (135516, 24000)
    signal_0 = vibration[0]    # shape: (24000,)
    print(f"信号形状: {signal_0.shape}")
    print(f"前10个点: {signal_0[:10]}")

2. 健康管理语料库

corpus.json (1.5MB)

包含 600 条健康管理任务样本,支持 4 种任务类型:

任务ID 任务类型 说明
0 故障检测 二分类任务,判断轴承是否有故障(yes/no)
1 故障分类 十分类任务,识别故障类型和严重程度
2 故障分析 分析故障状态并提供简单建议
3 详细分析 深度分析故障风险、后果和预防措施

样本结构:

json 复制代码
{
  "id": 0,
  "task_id": 0,
  "instruction": "Based on the provided bearing state description marked as #state_place_holder#, assess whether the bearing is experiencing any faults...",
  "label_id": 0,
  "vib_id": 34404,
  "ref_id": 34344,
  "response": "no",
  "condition_id": 798
}

字段说明:

  • id: 样本唯一标识符
  • task_id: 任务类型ID (0-3)
  • instruction: 任务指令文本
  • label_id: 标签ID (对应 metadata.sqlite 中的 label_note)
  • vib_id: 振动信号在 data.hdf5 中的索引
  • ref_id: 参考信号(无故障)的索引
  • response: 期望的响应文本
  • condition_id: 工况ID

3. 训练/验证/测试集划分

dataset.json (6.9MB)

将语料库样本划分为训练集、验证集和测试集:

数据集 样本数 占比
训练集 257,865 70%
验证集 73,674 20%
测试集 36,837 10%

数据结构:

json 复制代码
{
  "train": [[corpus_idx, corpus_idx, task_id], ...],
  "val": [[corpus_idx, corpus_idx, task_id], ...],
  "test": [[corpus_idx, corpus_idx, task_id], ...]
}

每个三元组 [corpus_idx, corpus_idx, task_id] 表示从 corpus.json 中选择样本进行数据增强。

4. 元数据

metadata.sqlite (4.3MB)

包含工况、文件信息和标签注释的数据库。

表结构:

condition 表
sql 复制代码
-- 字段: id, dataset, bearing_type, label_id, load, speed
-- 说明: 记录每种工况的详细信息
-- 总计: 1,043 种工况
字段 说明
id 工况唯一标识符
dataset 原始数据集名称(如 CWRU)
bearing_type 轴承型号
label_id 故障标签ID
load 负载(如 "28", "0HP")
speed 转速(如 "3HP")
file_info 表
sql 复制代码
-- 字段: id, vibration_idx, ref_idx
-- 说明: 文件与振动信号的映射关系
label_note 表
sql 复制代码
-- 字段: id, description
-- 说明: 故障标签的详细描述

所有标签:

ID 描述
0 Normal State (正常状态)
1 Bearing Inner Ring Minor Fault (内圈轻微故障)
2 Bearing Inner Ring General Fault (内圈一般故障)
3 Bearing Inner Ring Severe Fault (内圈严重故障)
4 Bearing Ball Minor Fault (滚珠轻微故障)
5 Bearing Ball General Fault (滚珠一般故障)
6 Bearing Ball Severe Fault (滚珠严重故障)
7 Bearing Outer Ring Minor Fault (外圈轻微故障)
8 Bearing Outer Ring General Fault (外圈一般故障)
9 Bearing Outer Ring Severe Fault (外圈严重故障)
metadata.parquet (817KB)

Parquet 格式的元数据文件,包含与 metadata.sqlite 相同的信息,但以列式存储格式提供,便于快速读取和分析。

5. 演示数据

demo_data.json (1.5MB)

包含 4 条演示样本,用于快速测试模型。

样本结构:

json 复制代码
{
  "prompt": "As an expert in bearing fault diagnosis with extensive knowledge in mechanical engineering...",
  "instruction": "Bearing status description: #state_place_holder#. Based on the bearing state description...",
  "vib_data": [-0.040446347, 0.003736008, 0.020141956, ...],
  "ref_data": [...]
}

字段说明:

  • prompt: 系统提示词
  • instruction: 任务指令
  • vib_data: 待测振动信号(24000个点)
  • ref_data: 参考振动信号(24000个点)

文件结构

复制代码
mbhm_dataset/
├── README.md                    # 数据集说明文档
├── corpus.json                  # 健康管理语料库 (600条)
├── dataset.json                 # 训练/验证/测试集划分
├── data.hdf5                   # 振动信号数据 (135,516条)
├── metadata.sqlite             # 元数据数据库
├── metadata.parquet            # 元数据(Parquet格式)
├── demo_data.json             # 演示数据 (4条)
└── src/
    └── dcn.py                 # 离散余弦归一化实现

任务类型详解

Task 0: 故障检测

目标: 判断轴承是否处于故障状态

示例:

复制代码
Instruction: Based on the provided bearing state description marked as
#state_place_holder#, assess whether the bearing is experiencing any faults.
Provide a response of either "yes" if it is faulty, or "no" if it is not.

Response: no

Task 1: 故障分类

目标: 从10种轴承状态中选择最合适的分类

示例:

复制代码
Instruction: Bearing State Overview: #state_place_holder#. Your task is to
determine the most fitting bearing state type from the following options:
[Fault-Free, Minor Inner Ring Fault, Moderate Inner Ring Fault, Severe
Inner Ring Fault, Minor Ball Fault, Moderate Ball Fault, Severe Ball Fault,
Minor Outer Ring Fault, Moderate Outer Ring Fault, Severe Outer Ring Fault].

Response: Fault-Free

Task 2: 故障分析

目标: 分析故障状态并提供建议

示例:

复制代码
Instruction: Bearing status description: #state_place_holder#. Determine the
most suitable bearing state type from this list according to the provided
bearing condition.

Response: Based on the bearing status description "Fault-Free", the most
suitable bearing state type is:

**Fault-Free**

Since the bearing is reported as "Fault-Free", **no particular actions are
necessary** at this time. It is recommended to maintain regular monitoring...

Task 3: 详细分析

目标: 深度分析故障风险、后果和预防措施

示例:

复制代码
Instruction: Analyze the bearing status #state_place_holder#. From the
provided description, identify which bearing state type best fits from this
list.

Response: **Bearing Status: Fault-Free**

**Risks Associated:**
Since the bearing is classified as "Fault-Free," there are **no immediate or
inherent risks**...

**Potential Consequences:**
Because the bearing is reported as fault-free, there are **no specific
potential consequences**...

**Actions to Prevent Catastrophic Failures:**
1. Regular Lubrication: ...
2. Load and Speed Monitoring: ...
[更多预防措施]

🔧 使用方法

1. 加载数据集

方法一:直接加载
python 复制代码
import json
import h5py
import sqlite3

# 加载语料库
with open('mbhm_dataset/corpus.json', 'r') as f:
    corpus = json.load(f)

# 加载振动信号
with h5py.File('mbhm_dataset/data.hdf5', 'r') as f:
    vibration_data = f['vibration']

# 加载元数据
conn = sqlite3.connect('mbhm_dataset/metadata.sqlite')
cursor = conn.cursor()

# 获取标签信息
cursor.execute('SELECT * FROM label_note')
labels = cursor.fetchall()
方法二:使用 Hugging Face Datasets
python 复制代码
from datasets import load_dataset

dataset = load_dataset("SIA-IDE/MBHM")

2. 访问样本

python 复制代码
# 获取单个样本
sample = corpus[0]
print(f"任务类型: {sample['task_id']}")
print(f"指令: {sample['instruction']}")
print(f"响应: {sample['response']}")

# 获取振动信号
vib_signal = vibration_data[sample['vib_id']]
ref_signal = vibration_data[sample['ref_id']]

print(f"振动信号形状: {vib_signal.shape}")

3. 数据集划分

python 复制代码
import json

with open('mbhm_dataset/dataset.json', 'r') as f:
    split_data = json.load(f)

train_indices = split_data['train']   # 训练集索引
val_indices = split_data['val']       # 验证集索引
test_indices = split_data['test']     # 测试集索引

print(f"训练集样本数: {len(train_indices)}")
print(f"验证集样本数: {len(val_indices)}")
print(f"测试集样本数: {len(test_indices)}")

4. 运行演示

python 复制代码
import json

# 加载演示数据
with open('mbhm_dataset/demo_data.json', 'r') as f:
    demo_data = json.load(f)

# 使用第一个演示样本
sample = demo_data[0]
print(f"Prompt: {sample['prompt'][:100]}...")
print(f"Instruction: {sample['instruction'][:100]}...")
print(f"振动信号长度: {len(sample['vib_data'])}")
print(f"参考信号长度: {len(sample['ref_data'])}")

📈 数据集特点

1. 多模态融合

  • 振动信号 + 文本指令 + 文本响应
  • 支持信号处理和自然语言理解的联合学习

2. 多任务学习

  • 4种不同的健康管理任务
  • 从简单的二分类到复杂的多轮对话

3. 大规模工况

  • 1,043 种工况组合
  • 涵盖不同转速、负载、故障类型和严重程度
  • 更贴近真实工业应用场景

4. 统一信号表示

  • 所有振动信号通过 DCN 归一化到相同长度 (24,000)
  • 便于模型批处理和并行计算

5. 丰富的元数据

  • 详细的工况信息
  • 完整的标签注释
  • 支持细粒度的数据分析

🎓 应用场景

1. 轴承故障诊断

  • 实时监测轴承状态
  • 早期故障检测
  • 故障类型识别

2. 预测性维护

  • 基于振动信号预测轴承寿命
  • 制定维护计划
  • 降低意外停机风险

3. 智能运维系统

  • 多模态故障诊断
  • 自动化健康评估
  • 维护建议生成

4. 研究与教育

  • 多模态学习研究
  • 自然语言处理在工业领域的应用
  • 信号处理与深度学习结合

🔬 数据预处理

离散余弦归一化 (DCN)

数据集使用 DCN 将不同长度的振动信号统一到 24,000 个采样点:

python 复制代码
def dcn(signal, target_length=24000):
    """
    离散余弦归一化

    Args:
        signal: 输入振动信号
        target_length: 目标长度

    Returns:
        归一化后的信号
    """
    from scipy.fft import dct
    from scipy.fftpack import idct

    # 计算DCT
    dct_coeffs = dct(signal, type=2, norm='ortho')

    # 截断或补零
    if len(dct_coeffs) > target_length:
        dct_coeffs = dct_coeffs[:target_length]
    else:
        dct_coeffs = np.pad(dct_coeffs, (0, target_length - len(dct_coeffs)))

    # 逆DCT
    normalized_signal = idct(dct_coeffs, type=2, norm='ortho')

    return normalized_signal

更多实现细节请参考: mbhm_dataset/src/dcn.py


📊 数据统计

样本分布

指标 数值
总振动信号数 135,516
总工况数 1,043
语料库样本数 600
故障类型数 10
任务类型数 4
信号采样率 统一至 24,000 点
原始数据集数 9

工况多样性

  • 数据集来源: CWRU, MFPT, Paderborn, 等多个公开数据集
  • 转速范围: 0HP - 3HP
  • 负载范围: 多种负载条件
  • 故障严重程度: 轻微、一般、严重

引用方式

如果您的论文使用了本数据集,请按以下格式引用:

bibtex 复制代码
@article{pengBearLLMPriorKnowledgeEnhanced2025,
  title = {{{BearLLM}}: {{A Prior Knowledge-Enhanced Bearing Health Management Framework}} with {{Unified Vibration Signal Representation}}},
  author = {Peng, Haotian and Liu, Jiawei and Du, Jinsong and Gao, Jie and Wang, Wei},
  year = {2025},
  month = {apr},
  journal = {Proceedings of the AAAI Conference on Artificial Intelligence},
  volume = {39},
  number = {19},
  pages = {19866--19874},
  issn = {2374-3468},
  doi = {10.1609/aaai.v39i19.34188},
  urldate = {2025-04-11},
}

联系方式


许可证

MIT License


更新日志

v1.0 (2024-08-21)

  • 初始版本发布
  • 包含完整的振动信号和语料库
  • 发布于 Hugging Face

v1.1 (2025-03-06)

  • 完整的数据集和代码开源
  • 添加 demo 数据
  • 完善文档和示例

提示与建议

  1. 内存管理: data.hdf5 文件较大 (13GB),建议使用内存映射或分批加载
  2. 信号归一化: 使用数据集提供的 DCN 方法处理新信号
  3. 任务选择: 根据应用场景选择合适的任务类型
  4. 数据增强: 可以使用 dataset.json 中的索引组合进行数据增强
  5. 元数据利用: 充分利用 metadata.sqlite 中的工况信息进行细粒度分析

相关资源


最后更新: 2025年1月

相关推荐
AI街潜水的八角2 小时前
深度学习洪水分割系统2:含训练测试代码和数据集
人工智能·深度学习
万行2 小时前
机器学习&第二章线性回归
人工智能·python·机器学习·线性回归
全栈小精灵2 小时前
Winform入门
开发语言·机器学习·c#
万行3 小时前
机器学习&第四章支持向量机
人工智能·机器学习·支持向量机
llddycidy3 小时前
峰值需求预测中的机器学习:基础、趋势和见解(最新文献)
网络·人工智能·深度学习
larance3 小时前
机器学习的一些基本知识
人工智能·机器学习
做科研的周师兄3 小时前
【MATLAB 实战】栅格数据 K-Means 聚类(分块处理版)—— 解决大数据内存溢出、运行卡顿问题
人工智能·算法·机器学习·matlab·kmeans·聚类
AI小怪兽3 小时前
轻量、实时、高精度!MIE-YOLO:面向精准农业的多尺度杂草检测新框架 | MDPI AgriEngineering 2026
开发语言·人工智能·深度学习·yolo·无人机
一招定胜负3 小时前
图像形态学+边缘检测及CNN关联
人工智能·深度学习·cnn