A Defect Detection Method for Hairpin Winding Weld Joints Independent of Defect Data
Shi Cenwei1,2, Liu Binghao1,2, Qiu Jianqi1,2, Shi Tingna1,2
1. College of Electrical Engineering Zhejiang University Hangzhou 310027 China; 2. Zhejiang University Advanced Electrical Equipment Innovation Center Hangzhou 311107 China
Abstract:Conventional defect detection methods for hairpin winding weld joints based on image and deep learning require amount of defective weld joints data for model training, while there is a severe scarcity of such samples in actual production, resulting in challenges related to small sample sizes and imbalanced sample classes. Some existing studies have attempted to artificially create defective weld joints by controlling welding conditions, but this approach not only incurs additional costs but also fails to fully represent the types of defects that occur in real production. When the model encounters unknown defects, it cannot effectively detect or identify them. Therefore, this paper proposes a defect detection method for hairpin winding weld joints independent of defect data. The core of the method is to accurately identify defective weld joints by comparing the feature matching degree between weld joints to be detected on the production line and normal weld joints. The proposed method consists of two parts during the training phase. On one hand, it uses images of hairpin windings with annotated weld joints locations to train an object detection model. This process involves freezing the backbone network Resnet50, which is pretrained on ImageNet, and only training the detection head responsible for outputting location parameters. On the other hand, the backbone network of the model is used to extract intermediate layer features of a large number of normal weld joints, and a feature bank is constructed based on these features. In the detection phase , the trained object detection model is first used to detect the positions of weld joints in the images to be detected, but it does not perform defect detection on the potentially defective weld joints. Then, the backbone network of the model is reused to extract intermediate layer features from each weld joint region, which are compared with the features in the feature bank constructed during training to detect defects and locate the defective regions. The experimental data for this paper were collected from images taken by cameras on the automatic welding production line for hairpin windings, consisting of 111 images, with approximately 20 weld joints in each image. Based on whether the morphology of the weld joints met the standard, the weld joints were classified into two categories: normal and abnormal, and the positions and categories of the weld joints were annotated on the images. To evaluate the effectiveness of the proposed defect detection method, abnormal labels were cropped from the original images, and defect segmentation masks were further annotated. Comparative experimental results between the conventional classification network and the proposed method show that the accuracy, precision, and recall of the conventional classification network for defect detection are 89.1%, 87.9%, and 90.6%, respectively. In contrast, the proposed method improves these metrics to 98.4%, 97.0%, and 100%, respectively, and is also able to segment defect regions, achieving a pixel-level AUROC of 98.0%. Additionally, ablation experiments were conducted on the proposed method to explore the impact of different levels and sampling rates used in the feature bank construction process. This paper addresses the issue of the scarcity of defective hairpin winding weld joint samples in real industrial production, which makes it difficult to directly predict defect categories using object detection algorithms. By proposing a feature comparison-based method for defect detection that does not rely on defect data, the experimental results demonstrate that the method meets industrial requirements and solves the problem of limited defect samples in industrial production, which provides a new approach to the task of defect detection for hairpin winding weld joints in industrial applications.
史涔溦, 刘炳昊, 邱建琪, 史婷娜. 一种不依赖缺陷数据的扁线绕组焊点缺陷检测方法[J]. 电工技术学报, 2024, 39(zk1): 141-149.
Shi Cenwei, Liu Binghao, Qiu Jianqi, Shi Tingna. A Defect Detection Method for Hairpin Winding Weld Joints Independent of Defect Data. Transactions of China Electrotechnical Society, 2024, 39(zk1): 141-149.
[1] Tola O J, Ambafi J G, Umoh E A, et al.Performance analysis of a PMSM for traction applications in electric vehicles with hairpin winding technology[C]//2022 IEEE Nigeria 4th International Conference on Disruptive Technologies for Sustainable Development (NIGERCON), Lagos, Nigeria, 2022: 1-5. [2] Berardi G, Nategh S, Bianchi N, et al.A comparison between random and hairpin winding in E-mobility applications[C]//IECON 2020 The 46th Annual Conference of the IEEE Industrial Electronics Society, Singapore, 2020: 815-820. [3] 朱洒, 曾峰, 陆剑波, 等. 考虑PWM谐波损耗的车用扁线内嵌式永磁同步电机效率图简化工程计算[J]. 电工技术学报, 2022, 37(22): 5687-5703. Zhu Sa, Zeng Feng, Lu Jianbo, et al.Simplified engineering calculation of efficiency map of interior permanent magnet synchronous machines with hairpin windings considering PWM-induced harmonic losses[J]. Transactions of China Electrotechnical Society, 2022, 37(22): 5687-5703. [4] 王晓光, 尹浩, 余仁伟. 轴向磁通无铁心永磁电机多层矩形扁线绕组涡流损耗解析计算及优化[J]. 电工技术学报, 2023, 38(12): 3130-3140. Wang Xiaoguang, Yin Hao, Yu Renwei.Analytical calculation and parameter optimization of eddy current loss for coreless axial flux permanent magnet synchronous machine with multilayer flat wire winding[J]. Transactions of China Electrotechnical Society, 2023, 38(12): 3130-3140. [5] Glaessel T, Riedel A, Franke J, et al.Influence of enameled wire preparation on the laser welding of hairpin windings[C]//2022 IEEE 67th Holm Conference on Electrical Contacts (HLM), Tampa, FL, USA, 2022: 1-5. [6] Glaessel T, Seefried J, Franke J.Challenges in the manufacturing of hairpin windings and application opportunities of infrared lasers for the contacting process[C]//2017 7th International Electric Drives Production Conference (EDPC), Würzburg, Germany, 2017: 1-7. [7] Baader M, Mayr A, Raffin T, et al.Potentials of optical coherence tomography for process monitoring in laser welding of hairpin windings[C]//2021 11th International Electric Drives Production Conference (EDPC), Erlangen, Germany, 2021: 1-10. [8] Omlor M, Reith J, Breitbarth A, et al.Inline process monitoring of hairpin welding using optical and acoustic quality metrics[C]//2022 12th International Electric Drives Production Conference (EDPC), Regensburg, Germany, 2022: 1-8. [9] Glaessel T, Seefried J, Masuch M, et al.Process reliable laser welding of hairpin windings for automotive traction drives[C]//2019 International Conference on Engineering, Science, and Industrial Applications (ICESI), Tokyo, Japan, 2019: 1-6. [10] Zhang Yu, Huangfu Yixin, Ziada Y, et al.Efficient hairpin winding fault detection using impedance measurements[J]. IEEE Access, 2023, 11: 92838-92846. [11] 陶显, 侯伟, 徐德. 基于深度学习的表面缺陷检测方法综述[J]. 自动化学报, 2021, 47(5): 1017-1034. Tao Xian, Hou Wei, Xu De.A survey of surface defect detection methods based on deep learning[J]. Acta Automatica Sinica, 2021, 47(5): 1017-1034. [12] 裴少通, 张行远, 胡晨龙, 等. 基于ER-YOLO算法的跨环境输电线路缺陷识别方法[J]. 电工技术学报, 2024, 39(9): 2825-2840. Pei Shaotong, Zhang Hangyuan, Hu Chenlong, et al.The defect detection method for cross-environment power transmission line based on ER-YOLO algorithm[J]. Transactions of China Electrotechnical Society, 2024, 39(9): 2825-2840. [13] 张烨, 李博涛, 尚景浩, 等. 基于多尺度卷积注意力机制的输电线路防振锤缺陷检测[J]. 电工技术学报, 2024, 39(11): 3522-3537. Zhang Ye, Li Botao, Shang Jinghao, et al.Defect detection of transmission line damper based on multi-scale convolutional attention mechanism[J]. Tran-sactions of China Electrotechnical Society, 2024, 39(11): 3522-3537. [14] 郑含博, 胡思佳, 梁炎燊, 等. 基于YOLO-2MCS的输电线路走廊隐患目标检测方法[J]. 电工技术学报, 2024, 39(13): 4164-4175. Zheng Hanbo, Hu Sijia, Liang Yanshen, et al.A hidden danger object detection method for trans-mission line corridor based on YOLO-2MCS[J]. Transactions of China Electrotechnical Society, 2024, 39(13): 4164-4175. [15] Mayr A, Lutz B, Weigelt M, et al.Evaluation of machine learning for quality monitoring of laser welding using the example of the contacting of hairpin windings[C]//2018 8th International Electric Drives Production Conference (EDPC), Schweinfurt, Germany, 2018: 1-7. [16] Vater J, Schamberger P, Knoll A, et al.Fault Classification and Correction based on Convolutional Neural Networks exemplified by laser welding of hairpin windings[C]//2019 9th International Electric Drives Production Conference (EDPC), Esslingen, Germany, 2019: 1-8. [17] Hartung J, Jahn A, Bocksrocker O, et al.Camera-based in-process quality measurement of hairpin welding[J]. Applied Sciences, 2021, 11(21): 10375. [18] Mayr A, Hauck L, Meiners M, et al.Prediction of the joint cross-section of laser-welded hairpin windings based on 2D image data using convolutional neural networks[C]//2020 10th International Electric Drives Production Conference (EDPC), Ludwigsburg, Germany, 2020: 1-7. [19] Vater J, Pollach M, Lenz C, et al.Quality control and fault classification of laser welded hairpins in electrical motors[C]//2020 28th European Signal Processing Conference (EUSIPCO), Amsterdam, Netherlands, 2021: 1377-1381. [20] He Kaiming, Zhang Xiangyu, Ren Shaoqing, et al.Deep residual learning for image recognition[C]//2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 2016: 770-778. [21] Deng Jia, Dong Wei, Socher R, et al.ImageNet: a large-scale hierarchical image database[C]//2009 IEEE Conference on Computer Vision and Pattern Recognition, Miami, FL, USA, 2009: 248-255. [22] 郎松, 曹选, 张艳微, 等. 融合改进YOLOv5算法的图像全站仪全自动测量方法[J]. 仪器仪表学报, 2022, 43(5): 120-127. Lang Song, Cao Xuan, Zhang Yanwei, et al.Fully automated measurement method of image total station based on the improved YOLOv5 algorithm[J]. Chinese Journal of Scientific Instrument, 2022, 43(5): 120-127. [23] Zheng Zhaohui, Wang Ping, Ren Dongwei, et al.Enhancing geometric factors in model learning and inference for object detection and instance segmentation[J]. IEEE Transactions on Cybernetics, 2022, 52(8): 8574-8586.