CNN Based Fault Diagnosis of R oll ing Bearings Using MCU
-
摘要: 作者利用深度神经网络进行滚动轴承的智能故障诊断(IFD),将人工智能在低成本小型化平台上实现了应用。作者在文章中优化改进了二维神经网络(CNN2D)的神经网络架构,并将其部署到STM32H743VI单片机,实现了轴承故障振动信号的识别和分类。网络的训练和验证使用凯斯西储大学(CWRU)轴承故障数据集,并获得其中的包含10种故障类型的数据。使用基于Tensorflow深度学习框架的Keras工具对CNN2D的神经网络进行训练。验证可知该改进模型对故障识别准确度可以达到98.90%。利用CubeAI工具将网络部署至单片机内。通过串口与电脑进行通信获取随机轴承数据,实测每次诊断运行时间为约为19 ms。Abstract: The deep neural network is applied to intelligent fault diagnosis (IFD) of rolling bearings, and artificial intelligence is realized in low cost miniaturized platform in this paper. The author optimized and improved a neural network architecture of two-dimensional convolutional neural network (CNN2D), and deployed it to STM32H743VI MCU to realize the identification and classification of bearing fault vibration signals. The training and validation of the network uses the Case Western Reserve University (CWRU) bearing fault data set and obtains data containing 10 fault types. The neural network of CNN2D is trained by Keras tool based on Tensorflow deep learning framework. Verification shows that the accuracy of fault identification can reach 98.90%. Then CubeAI tool is used to deploy the network to the microcontroller. The random bearing data is obtained through communication between serial port and computer, and the measured running time of each diagnosis is about 19 ms.
-
Key words:
- intelligent fault diagnosis (IFD) /
- CNN2D /
- rolling bearing /
- Keras
-
表 1 CWRU数据集中获取的10种不同故障分类
Table 1. 10 different fault classifications obtained in the CWRU data set
编号 参数名称 代表数字 注解 1 00-Normal 0 正常无故障 2 07-Ball 1 0.1778 mm滚珠故障 3 07-InnerRace 2 0.1778 mm内圈故障 4 07-OuterRace6 3 0.1778 mm 6点钟外圈故障 5 14-Ball 4 0.3556 mm滚珠故障 6 14-InnerRace 5 0.3556 mm内圈故障 7 14-OuterRace6 6 0.3556 mm 6点钟外圈故障 8 21-Ball 7 0.5334 mm滚珠故障 9 21-InnerRace 8 0.5334 mm内圈故障 10 21-OuterRace6 9 0.5334 mm 6点钟外圈故障 表 2 CWRU数据集单个文件内部结构
Table 2. Internal structure of a single file of a CWRU data set
编号 参数名称 内容 注解 1 _header_ − 包含MATLAB版本,实验平台、创建时间等信息 2 _version_ 1.0 数据集版本 3 _globals_ − − 4 X000_DE_time 一维数组 驱动端信号数据 5 X000_FE_time 一维数组 风扇端信号数据 6 X000_BA_time 一维数组 正常基准数据 7 X000RPM 1797 每分钟转多少圈 表 3 CNN2D模型参数
Table 3. CNN2D model's parameters
编号 网络层 卷积核大小 卷积核数量 步长 1 二维卷积1 (10, 10) 4 1 2 二维卷积2 (5, 5) 8 1 3 最大池化1 (4, 4) 8 2 4 二维卷积3 (3, 3) 16 1 5 二维卷积4 (3, 3) 16 1 6 最大池化2 (2, 2) 16 2 7 二维卷积5 (3, 3) 32 1 8 二维卷积6 (3, 3) 64 1 9 最大池化3 (1, 1) 64 2 10 全连接 32 − − 11 Softmax 10 − − 表 4 CNN2D改进模型与其余验证模型性能比较
Table 4. Performance comparison between CNN2D improved model and other validated models
模型 总参
数量训练
时间/s最佳
准确度最小
损失值CNN1D基准模型 753 210 3.3 0.9348 0.1767 CNN2D基准模型 55 690 2.2 0.9528 0.1318 CNN2D Tanh模型 55 690 2.2 0.9765 0.0678 CNN2D改进模型 36 390 2.0 0.9890 0.0292 表 5 芯片相关引脚设定说明
Table 5. Chip-related pin setting instructions
引脚 功能设定 功能说明 PE3 LED LED灯 PC13 KEY 按键 PC14 RCC-IN 晶振输入 PC15 RCC-OUT 晶振输出 PA13 DEBUG-JTMS-SWDIO SW接口调试DIO PA14 DEBUG-JTMS-SWCLK SW接口调试CLK PB14 USART1_TX USART1串口TX PB15 USART1_RX USART1串口RX 表 6 库文件结构
Table 6. Structure of library file
文件名 描述 cwru_model_config.h 网络库配置文件 cwru_model_generate_report.txt 网络库生成与运行过程的报告 cwru_model_data.c 网络模型参数文件 cwru_model_data.h 网络模型参数头文件 cwru_model.c 各类网络库函数文件 cwru_model.h 各类网络库函数头文件 表 7 网络模型资源消耗
Table 7. Resource consumption of network model
指标 数值 MACC 1238380 FLASH 142.15 KB RAM 11.32 KB -
[1] DUAN L X, XIE M Y, WANG J J, et al. Deep learning enabled intelligent fault diagnosis: overview and applications[J]. Journal of Intelligent & Fuzzy Systems, 2018, 35(5): 5771-5784. [2] LIU R N, YANG B Y, ZIO E, et al. Artificial intelligence for fault diagnosis of rotating machinery: a review[J]. Mechanical Systems and Signal Processing, 2018, 108: 33-47. doi: 10.1016/j.ymssp.2018.02.016 [3] KHAN S, YAIRI T. A review on the application of deep learning in system health management[J]. Mechanical Systems and Signal Processing, 2018, 107: 241-265. doi: 10.1016/j.ymssp.2017.11.024 [4] ZHAO R, YAN R Q, CHEN Z H, et al. Deep learning and its applications to machine health monitoring[J]. Mechanical Systems and Signal Processing, 2019, 115: 213-237. doi: 10.1016/j.ymssp.2018.05.050 [5] 阳建宏, 黎敏, 丁福焰, 等. 滚动轴承诊断现场实用技术[M]. 北京: 机械工业出版社, 2015.YANG J H, LI M, DING F Y, et al. On-site practical technology of rolling bearing diagnosis[M]. Beijing: China Machine Press, 2015. (in Chinese) [6] 隆军, 吴金强. STFT和HHT在风力机轴承故障诊断中的应用[J]. 噪声与振动控制, 2013, 33(4): 219-222. doi: 10.3969/j.issn.1006-1335.2013.04.045LONG J, WU J Q. Application of short time fourier transform and Hilbert-Huang transform in fault diagnosis of rolling bearings of windmill[J]. Noise and Vibration Control, 2013, 33(4): 219-222. (in Chinese) doi: 10.3969/j.issn.1006-1335.2013.04.045 [7] KANKAR P K, SHARMA S C, HARSHA S P. Fault diagnosis of ball bearings using continuous wavelet transform[J]. Applied Soft Computing, 2011, 11(2): 2300-2312. doi: 10.1016/j.asoc.2010.08.011 [8] BEN ALI J, FNAIECH N, SAIDI L, et al. Application of empirical mode decomposition and artificial neural network for automatic bearing fault diagnosis based on vibration signals[J]. Applied Acoustics, 2015, 89: 16-27. doi: 10.1016/j.apacoust.2014.08.016 [9] 沙美妤, 刘利国. 基于振动信号的轴承故障诊断技术综述[J]. 轴承, 2015(9): 59-63. doi: 10.3969/j.issn.1000-3762.2015.09.017SHA M Y, LIU L G. Review on fault diagnosis technology for bearings based on vibration signal[J]. Bearing, 2015(9): 59-63. (in Chinese) doi: 10.3969/j.issn.1000-3762.2015.09.017 [10] SANTOS P, VILLA L F, REÑONES A, et al. An SVM-based solution for fault detection in wind turbines[J]. Sensors, 2015, 15(3): 5627-5648. doi: 10.3390/s150305627 [11] PANDYA D H, UPADHYAY S H, HARSHA S P. Fault diagnosis of rolling element bearing with intrinsic mode function of acoustic emission data using APF-KNN[J]. Expert Systems with Applications, 2013, 40(10): 4137-4145. doi: 10.1016/j.eswa.2013.01.033 [12] HAJNAYEB A, GHASEMLOONIA A, KHADEM S E, et al. Application and comparison of an ANN-based feature selection method and the genetic algorithm in gearbox fault diagnosis[J]. Expert Systems with Applications, 2011, 38(8): 10205-10209. doi: 10.1016/j.eswa.2011.02.065 [13] HINTON G E, SALAKHUTDINOV R R. Reducing the dimensionality of data with neural networks[J]. Science, 2006, 313(5786): 504-507. doi: 10.1126/science.1127647 [14] KRIZHEVSKY A, SUTSKEVER I, HINTON G E. ImageNet classification with deep convolutional neural networks[J]. Communications of the ACM, 2017, 60(6): 84-90. doi: 10.1145/3065386 [15] HE K M, ZHANG X Y, REN S Q, et al. Deep residual learning for image recognition[C]//2016 IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas: IEEE, 2016: 770-778. [16] 雷亚国, 贾峰, 周昕, 等. 基于深度学习理论的机械装备大数据健康监测方法[J]. 机械工程学报, 2015, 51(21): 49-56. doi: 10.3901/JME.2015.21.049LEI Y G, JIA F, ZHOU X, et al. A deep learning-based method for machinery health monitoring with big data[J]. Journal of Mechanical Engineering, 2015, 51(21): 49-56. (in Chinese) doi: 10.3901/JME.2015.21.049 [17] SMITH W A, RANDALL R B. Rolling element bearing diagnostics using the Case Western Reserve University data: a benchmark study[J]. Mechanical Systems and Signal Processing, 2015, 64-65: 100-131. doi: 10.1016/j.ymssp.2015.04.021 [18] GAN M, WANG C, ZHU C. Construction of hierarchical diagnosis network based on deep learning and its application in the fault pattern recognition of rolling element bearings[J]. Mechanical Systems and Signal Processing, 2016, 72-73: 92-104. doi: 10.1016/j.ymssp.2015.11.014 [19] JIA F, LEI Y G, LIN J, et al. Deep neural networks: a promising tool for fault characteristic mining and intelligent diagnosis of rotating machinery with massive data[J]. Mechanical Systems and Signal Processing, 2016, 72-73: 303-315. doi: 10.1016/j.ymssp.2015.10.025 [20] 吴定海, 任国全, 王怀光, 等. 基于卷积神经网络的机械故障诊断方法综述[J]. 机械强度, 2020, 42(5): 1024-1032.WU D H, REN G Q, WANG H G, et al. The review of mechanical fault diagnosis methods based on convolutional neural network[J]. Journal of Mechanical Strength, 2020, 42(5): 1024-1032. (in Chinese) [21] WANG Z G, OATES T. Imaging time-series to improve classification and imputation[C]//Twenty-Fourth International Joint Conference on Artificial Intelligence. Buenos Aires: AAAI Press, 2015: 3939-3945. [22] 薛妍, 沈宁, 窦东阳. 基于一维卷积神经网络的滚动轴承故障程度诊断[J]. 轴承, 2021(4): 48-54.XUE Y, SHEN N, DOU D Y. Fault degree diagnosis of rolling bearings based on one-dimensional convolutional neural network[J]. Bearing, 2021(4): 48-54. (in Chinese) [23] 郭梦洁, 杨梦卓, 马京九. 基于Keras的MNIST数据集识别模型[J]. 现代信息科技, 2019, 3(14): 18-19. doi: 10.3969/j.issn.2096-4706.2019.14.007GUO M J, YANG M Z, MA J J. Keras-based MNIST data set recognition model[J]. Modern Information Technology, 2019, 3(14): 18-19. (in Chinese) doi: 10.3969/j.issn.2096-4706.2019.14.007 [24] 杨永翌. 基于Keras框架MNIST数据集识别方法研究[J]. 汽车实用技术, 2019, 44(23): 101-103. doi: 10.16638/j.cnki.1671-7988.2019.23.035YANG Y Y. Improvement of MNIST data set recognition method based on Keras framework[J]. Automobile Technology, 2019, 44(23): 101-103. (in Chinese) doi: 10.16638/j.cnki.1671-7988.2019.23.035 [25] ZHAO M H, KANG M, TANG B P, et al. Deep residual networks with dynamically weighted wavelet coefficients for fault diagnosis of planetary gearboxes[J]. IEEE Transactions on Industrial Electronics, 2018, 65(5): 4290-4300. doi: 10.1109/TIE.2017.2762639