A new energy battery pack box airtightness detection device and a detection method thereof
Patent Information
- Application Number
- CN202311545697.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-11-20
AI Technical Summary
[0005]本发明的目的是为了解决现有技术中难以针对新能源电池包箱体进行气密性检测的缺陷,提供一种新能源电池包箱体气密性检测装置及其检测方法来解决上述问题
[0060]本发明的一种新能源电池包箱体气密性检测装置及其检测方法,与现有技术相比利用气密性检测装置对电池包箱体进行红外图像数据采集,通过改进目标检测算法YOLOv5-SC对泄漏点进行检测,简化了电池包箱体气密性的检测步骤,降低了检测时间,较大的节省了人力成本,同时实现了无损检测,检测结果的稳定性和准确性进一步提高。本发明系统设备简单可以实现快速部署、快速检测,降低操作难度的同时大大提高了检测效率。
Smart Images

Figure CN117589397B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy battery pack enclosure testing technology, specifically a new energy battery pack enclosure airtightness testing device and testing method. Background Technology
[0002] The battery pack housing covers both new energy vehicle battery pack housings and new energy storage battery housings. The sealing performance of the battery pack directly affects the battery's lifespan and safety performance. With the continuous development of the new energy industry, the airtightness testing of battery packs has become increasingly important. The purpose of airtightness testing is to check the sealing performance of the battery pack to ensure that there is no leakage when the battery pack is filled with gas or subjected to external pressure.
[0003] Currently, the airtightness testing of most new energy battery pack enclosures is completed using a combination of differential pressure and bubble methods. The differential pressure method determines whether there is a leak in the enclosure. However, when detecting the location of the leak, the bubble method usually requires spraying foam water around the enclosure and manually observing whether bubbles appear and their locations. For a large target like a battery pack enclosure, this method has several drawbacks, including strong subjective factors, long inspection time, difficulty in reworking the enclosure for leaks that cannot be accurately located, and the need for air drying after the destructive testing involving a large amount of foam water.
[0004] Therefore, the current testing methods for new energy battery pack enclosures are cumbersome, and the testing efficiency and effectiveness are not ideal. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies in detecting the airtightness of new energy battery pack housings by providing a device and method for detecting the airtightness of new energy battery pack housings.
[0006] To achieve the above objectives, the technical solution of the present invention is as follows:
[0007] A device for testing the air tightness of a new energy battery pack casing includes a testing platform and a fixed suspension device located above the testing platform. A test component shell is placed on the testing platform, and the new energy battery pack casing is placed inside the test component shell. A fixed valve is provided on the test component shell. A robotic arm is installed on the fixed suspension device, and an infrared camera is installed on the robotic arm. The output end of the air source is inserted into the test component shell.
[0008] A method for detecting the airtightness of a new energy battery pack enclosure includes the following steps:
[0009] Acquisition of air tightness test data: Air source introduces 60 degrees Celsius air into the shell of the test piece and waits for the internal pressure of the chamber to stabilize at 0.6 MPa. The robotic arm drives the infrared camera to scan and photograph the shell of the test piece and transmits the photographed data to the terminal for air tightness test analysis.
[0010] Data collection and annotation: After the terminal acquires infrared images captured by the infrared camera, it annotates the images containing leakage points, and at the same time, it generates a simulated leakage point dataset by annotating multiple images that do not contain leakage points.
[0011] Image stitching and region localization;
[0012] Construction and training of the leak detection model: A leak detection model was built and trained based on YOLOv5-SC;
[0013] 3D localization of leak points: The images of the battery pack housing captured by the infrared camera are first stitched together and the regions are located. Then, the image after stitching and regional localization is input into the trained leak point detection model. The coordinates of the leak points are registered with the 3D model of the battery pack housing, so that the leak points can be intuitively displayed in the 3D model of the battery pack housing.
[0014] The image stitching and region localization include the following steps:
[0015] Detect scale-space extrema to determine key locations and scales.
[0016] The scale space of the two-dimensional function is related to the Gaussian kernel function, and is expressed as follows:
[0017] L(x,y,σ)=G(x,y,σ)*I(x,y)
[0018] Where G(x,y,σ) represents the Gaussian function, I(x,y) represents the input image, (x,y) represents the spatial coordinates, and σ is the scale parameter;
[0019] Precisely locate the position and scale of key points, and remove key points with low contrast and unstable edge response points;
[0020] Assigning a principal direction to feature keypoints utilizes the gradient distribution characteristics of neighboring pixels to specify parameters for the keypoints, while ensuring that the rotational directionality of the operator remains unchanged. The calculation formula is as follows:
[0021]
[0022] θ(x,y)=tan -1 ((L(x,y+1)-L(x,y-1))) / (L(x+1,y)-L(x-1,y)),
[0023] Where m(x,y) represents the keypoint parameters, θ(x,y) represents the keypoint orientation, and L(x,y) represents the gradient;
[0024] Generate key point descriptors: Rotate the coordinate axes to the main direction of the key points, and construct a 16×16 region centered on the key points, so that each key point generates 128 data points and forms a 128-dimensional SIFT feature vector; Match the SIFT feature vectors obtained from the two images to be matched to achieve image stitching; Finally, use the prior position coordinates of the battery pack box to locate the region of the target to be tested in the stitched image.
[0025] The construction and training of the leak detection model includes the following steps:
[0026] A leak detection model was built based on YOLOv5-SC: the first layer of YOLOv5-SC was set as a feature extraction network, the second layer as a feature fusion and transmission network, and the third layer as a target learning and prediction network.
[0027] The first layer of YOLOv5-SC is set as a feature extraction network. After improvement, it is composed of 8 modules connected in sequence. The first module is the stemblock module, the second to seventh modules are all ShuffleNetV2 modules, and the eighth module is the C3-CBAM module.
[0028] The second layer of YOLOv5-SC is defined as a feature fusion and transfer network. After improvement, the sequential connection settings are as follows: first convolutional module, first downsampling module, first fusion module, first C3-CBAM module, second convolutional module, second downsampling module, second fusion module, second C3-CBAM module, third convolutional module, third fusion module, third C3-CBAM module, fourth convolutional module, fourth fusion module, and fourth C3-CBAM module. The output of the first convolutional module is input into the third fusion module, and the output of the second convolutional module is input into the second fusion module.
[0029] The YOLOv5-SC third layer is set as the target learning and prediction network. First, the input image is convolved, and the three downsampling operations output three feature maps at different scales. In each feature map, three prior boxes are generated from spatial points. Finally, a mixture function of LogSoftmax and NLLLoss is used as the new bounding box regression loss function. The loss of training minimizes the difference between the output features and the ground truth labels of the target boxes, which is the predicted target box.
[0030] Configure the ShuffleNetv2 module
[0031] The ShuffleNetv2 module uses block units, which no longer split the channels of the input feature matrix. The left branch uses a 3×3 DW convolution and a 1×1 convolution, while the right branch uses a 1×1 quadratic convolution and a 3×3 DW convolution. After convolution, the channels are concatenated by Concat, doubling the number of output channels. Finally, the output feature layer is shuffled to further enhance the feature extraction capability.
[0032] Build the C3-CBAM module.
[0033] In the C3-CBAM module, the input left branch goes through convolution and multiple hourglass structures (Bottleneck), and the right branch goes through convolution and the attention module CBAM. The attention module CBAM includes a channel attention module and a spatial attention module. Finally, the results of the two branches are concatenated and then convolved before being output.
[0034] Configure the channel attention module:
[0035] The attention module is configured to use average pooling and max pooling operations to concentrate channel information, generating two distinct bundles of channel context information: and They represent the average pooling feature and the max pooling feature, respectively;
[0036] The two information bundles are transferred to the same shared network, which consists of a multilayer perceptron (MLP) containing a hidden layer.
[0037] Element-wise summation is used to merge the output feature vectors to generate channel attention weight information:
[0038] M c ∈R C*1*1 W1∈R C*C*16 W0∈R C*16*C ,
[0039] The channel attention module is calculated as follows:
[0040]
[0041] Where σ is the sigmoid function, R is the feature map, c is the number of channels, and M is the number of channels. C W1, W0, and F are sub-feature maps, MLP is a multilayer perceptron, AvgPool is the average pooling operation, and MaxPool is the max pooling operation. These represent the average pooling feature and the max pooling feature, respectively.
[0042] Setting up the spatial attention module:
[0043] Channel attention average pooling is used. and max pooling operation And connect them to generate an effective feature map;
[0044] Spatial attention weights M are generated using a 7x7 convolutional layer and an activation function σ. s (F)∈R H*W ,
[0045] The expression for the spatial attention module is as follows:
[0046]
[0047] Where σ is the sigmoid function, R is the feature map, s is the channel, AvgPool is the average pooling operation, and MaxPool is the max pooling operation. These represent average pooling and max pooling operations on s, respectively.
[0048] Constructing the loss function
[0049] The loss function is improved by using a hybrid function of LogSoftmax and NLLLoss as the new bounding box regression loss function, and the calculation formula is as follows:
[0050]
[0051]
[0052] Where, input z i This represents the score for each category, M represents the maximum score, and y represents the maximum score. i The weights of the categories are represented by n, where n represents the category.
[0053] Training the leak detection model, namely YOLOv5-SC:
[0054] Images of existing leak points are used as input to train the leak point detection model until the loss function converges. The Adam optimizer is used during training with parameters β1 = 0.9 and β2 = 0.999, and an initial learning rate of 1.0 × 10⁻⁶. -4 The learning rate for the next training cycle becomes 0.98 times that of the previous cycle, and a total of 100 cycles are trained.
[0055] Data was collected using a device for detecting the airtightness of new energy battery pack enclosures. Images containing leakage points were annotated to generate a dataset SRC, which was then expanded.
[0056] The SRC is input into the YOLOv5-SC model. The first layer of YOLOv5-SC performs feature extraction. The output feature F3 is obtained through the third ShuffleNetV2 module, the output feature F6 is obtained through the sixth ShuffleNetV2 module, and the feature F8 is obtained through the eighth C3-CBAM module.
[0057] The features are fused and passed through the second layer of the YOLOv5-SC model. Feature F3 is input into the second fusion module, feature F6 is input into the first fusion module, and feature F8 is used as the input of the first convolution module. Finally, the fused feature M8 is obtained through the second C3-CBAM module, the fused feature M11 is obtained through the third C3-CBAM module, and the fused feature M14 is obtained through the fourth C3-CBAM module.
[0058] The target is learned and predicted through the third layer of the YOLOv5-SC model. The fused features M8, M11, and M14 are distributed through three convolutional modules, i.e., downsampling operations, to obtain three feature maps at different scales. In each feature map, three prior boxes are generated from spatial points. Finally, the regression loss function is calculated to make the training loss minimize the difference between the output features and the ground truth labels of the target boxes, which is the predicted target box, thus identifying and detecting the leakage points.
[0059] Beneficial effects
[0060] This invention discloses a device and method for detecting the airtightness of a new energy battery pack enclosure. Compared with existing technologies, this invention utilizes an airtightness detection device to acquire infrared image data of the battery pack enclosure and employs an improved target detection algorithm, YOLOv5-SC, to detect leak points. This simplifies the airtightness detection steps, reduces detection time, significantly saves labor costs, and achieves non-destructive testing. Furthermore, the stability and accuracy of the detection results are further improved. The system of this invention is simple to implement, enabling rapid deployment and testing, reducing operational complexity while greatly improving detection efficiency.
[0061] This invention is based on the target detection algorithm YOLOv5 and improved to YOLOv5-SC for image leak point detection. This includes adding a lightweight module to the main feature extraction module to improve the model's recognition speed, adding a C3-CBAM module with an attention mechanism to the backbone network to strengthen target focus and improve dense target detection and resistance to background interference, and using a hybrid function of LogSoftmax and NLLLoss as a new bounding box regression loss function. Finally, a 3D model of the new energy battery pack is created to clearly mark the detected leak points. Attached Figure Description
[0062] Figure 1 This is a sequence diagram of the method of the present invention;
[0063] Figure 2 This is a structural diagram of the device of the present invention;
[0064] Figure 3 This is a structural diagram of the leakage detection model involved in this invention;
[0065] Figure 4 This is a structural diagram of the C3-CBAM module in the leak detection model involved in this invention;
[0066] Figure 5 This is a structural diagram of the ShuffleNetV2 module in the leakage detection model involved in this invention;
[0067] Figure 6 This is a three-dimensional representation of the detection results of leakage points in the battery pack housing involved in this invention;
[0068] Among them, 1-testing platform, 2-fixed suspension device, 3-tested part housing, 4-robotic arm, 5-infrared camera, 6-fixed valve, 7-gas source. Detailed Implementation
[0069] To provide a better understanding of the structural features and effects achieved by the present invention, a detailed description is provided below, accompanied by preferred embodiments and accompanying drawings:
[0070] like Figure 1 As shown, the present invention discloses a new energy battery pack housing airtightness testing device, comprising a testing platform 1 and a fixed suspension device 2 located above the testing platform 1. A test component housing 3 is placed on the testing platform 1, and the new energy battery pack housing is placed inside the test component housing 3. A fixed valve 6 is provided on the test component housing 3 for releasing gas from a gas source 7. A robotic arm 4 is mounted on the fixed suspension device 2, and an infrared camera 5 is mounted on the robotic arm 4. The output end of the gas source 7 is inserted into the test component housing 3. The gas source 7 is used to inflate the test component housing 3, and the infrared camera 5 is used to capture images of the new energy battery pack housing inside the test component housing 3 after inflatation, in order to detect its airtightness and whether leakage exists.
[0071] like Figure 2 As shown, a detection method for an airtightness testing device for a new energy battery pack enclosure includes the following steps:
[0072] The first step is to acquire airtightness test data: Air source 6 introduces 60-degree Celsius air into the housing 3 of the component under test and waits for the internal pressure of the chamber to stabilize at 0.6 MPa. At this time, the temperature and pressure of the gas inside the chamber are relatively high. If there is a leak in the chamber, according to the throttling expansion theory, the temperature at the leak point will decrease. Therefore, the leak point will appear as a singular point in the acquired infrared image, i.e., the infrared target point. The robotic arm 4 drives the infrared camera 5 to scan and capture images of the housing 3 of the component under test, and transmits the captured data to the terminal for airtightness test analysis.
[0073] The second step is data collection and annotation: After the terminal acquires the infrared images captured by the infrared camera 5, it annotates the images containing leakage points, and at the same time, it generates a simulated leakage point dataset by annotating multiple images that do not contain leakage points.
[0074] The third step is image stitching and region localization. In image stitching, the method of this invention employs image feature point matching and region localization to ensure the accuracy of image stitching. Then, region localization is performed using the prior coordinates of the box region, improving detection efficiency.
[0075] The image stitching and region localization include the following steps:
[0076] (1) Detect the extreme points in the scale space to determine the key locations and scales:
[0077] The scale space of the two-dimensional function is related to the Gaussian kernel function, and is expressed as:
[0078] L(x,y,σ)=G(x,y,σ)*I(x,y)
[0079] Where G(x,y,σ) represents the Gaussian function, I(x,y) represents the input image, (x,y) represents the spatial coordinates, and σ is the scale parameter.
[0080] (2) Accurately locate the position and scale of key points, and remove key points with low contrast and unstable edge response points.
[0081] (3) Assign principal directions to key points. Utilize the gradient distribution characteristics of neighboring pixels to specify parameters for key points, while ensuring that the rotational directionality of the operator remains unchanged. The calculation formula is as follows:
[0082]
[0083] θ(x,y)=tan -1 ((L(x,y+1)-L(x,y-1))) / (L(x+1,y)-L(x-1,y)),
[0084] Where m(x,y) represents the keypoint parameters, θ(x,y) represents the keypoint orientation, and L(x,y) represents the gradient.
[0085] (4) Generate key point descriptors: Rotate the coordinate axes to the main direction of the key points, and construct a 16×16 region centered on the key points, so that each key point generates 128 data points and forms a 128-dimensional SIFT feature vector; match the SIFT feature vectors obtained from the two images to be matched to achieve image stitching, and finally use the prior position coordinates of the battery pack box to locate the region of the target to be tested in the stitched image.
[0086] The fourth step is the construction and training of the leak detection model: a leak detection model is built and trained based on YOLOv5-SC.
[0087] The Yolov5-SC model employs a design based on Feature Pyramid Network (FPN) and feature fusion to detect targets at different scales. Designing a suitable model architecture requires considering the balance between accuracy and speed in target detection, and making appropriate adjustments and optimizations. Training the Yolov5-SC model also necessitates selecting appropriate hyperparameters such as learning rate, batch size, and optimizer, and formulating a reasonable training strategy. This includes choosing suitable learning rate scheduling methods, data augmentation strategies, and regularization methods to improve the model's convergence speed and generalization ability.
[0088] (1) As Figure 3 As shown, a leak detection model is constructed based on YOLOv5-SC: the first layer of YOLOv5-SC is set as a feature extraction network, the second layer as a feature fusion and transmission network, and the third layer as a target learning and prediction network.
[0089] A1) The first layer of YOLOv5-SC is set as a feature extraction network. After improvement, it is composed of 8 modules connected in sequence. The first module is the stemblock module, the second to seventh modules are all ShuffleNetV2 modules, and the eighth module is the C3-CBAM module.
[0090] A2) The second layer of YOLOv5-SC is set as a feature fusion and transfer network. After improvement, the connection settings are as follows: first convolutional module, first downsampling module, first fusion module, first C3-CBAM module, second convolutional module, second downsampling module, second fusion module, second C3-CBAM module, third convolutional module, third fusion module, third C3-CBAM module, fourth convolutional module, fourth fusion module, and fourth C3-CBAM module. The output of the first convolutional module is input into the third fusion module, and the output of the second convolutional module is input into the second fusion module.
[0091] A3) Set the third layer of YOLOv5-SC as the target learning and prediction network. First, perform convolution operation on the input image and output three feature maps at different scales from the three downsampling operations. In each feature map, three prior boxes are generated from spatial points. Finally, use the mixture function of LogSoftmax and NLLLoss as the new bounding box regression loss function. The loss of training minimizes the difference between the output features and the ground truth labels of the target boxes, which is the predicted target box.
[0092] (2) Configure the ShuffleNetv2 module, such as Figure 5 As shown.
[0093] The ShuffleNetv2 module uses block units, which no longer split the channels of the input feature matrix. The left branch uses one 3×3 DW convolution and one 1×1 convolution, while the right branch uses one 1×1 quadratic convolution and one 3×3 DW convolution. After convolution, the channels are concatenated by Concat, doubling the number of output channels. Finally, the output feature layer is shuffled to further enhance the feature extraction capability.
[0094] (3) Construct the C3-CBAM module, such as Figure 4 As shown.
[0095] In the C3-CBAM module, the input left branch goes through convolution and multiple hourglass structures (Bottleneck), while the right branch goes through convolution and the attention module CBAM. The attention module CBAM includes a channel attention module and a spatial attention module. Finally, the results of the two branches are concatenated and then convolved before being output.
[0096] (4) Configure the channel attention module:
[0097] B1) The attention module is configured to use average pooling and max pooling operations to concentrate channel information and generate two different bundles of channel context information: and They represent the average pooling feature and the max pooling feature, respectively;
[0098] B2) Transfer these two information bundles to the same shared network, which consists of a multilayer perceptron (MLP) containing a hidden layer;
[0099] B3) Use element-wise summation to combine the output feature vectors to generate channel attention weight information:
[0100] M c ∈R C*1*1 W1∈R C*C*16 W0∈R C*16*C ,
[0101] The channel attention module is calculated as follows:
[0102]
[0103] Where σ is the sigmoid function, R is the feature map, c is the number of channels, and M is the number of channels. C W1, W0, and F are sub-feature maps, MLP is a multilayer perceptron, AvgPool is the average pooling operation, and MaxPool is the max pooling operation. These represent the average pooling feature and the max pooling feature, respectively.
[0104] (5) Setting up the spatial attention module:
[0105] C1) Use channel attention average pooling. and max pooling operation And connect them to generate an effective feature map;
[0106] C2) Spatial attention weight information M is generated through a 7x7 convolutional layer and activation function σ. s (F)∈R H*W ,
[0107] The expression for the spatial attention module is as follows:
[0108]
[0109] Where σ is the sigmoid function, R is the feature map, s is the channel, AvgPool is the average pooling operation, and MaxPool is the max pooling operation. These represent average pooling and max pooling operations on s, respectively.
[0110] (6) Constructing the loss function
[0111] The loss function is improved by using a hybrid function of LogSoftmax and NLLLoss as the new bounding box regression loss function, and the calculation formula is as follows:
[0112]
[0113]
[0114] Where, input z i This represents the score for each category, M represents the maximum score, and y represents the maximum score. i This represents the weight of the category, where n represents the category.
[0115] (7) Training of the leak detection model, i.e., YOLOv5-SC:
[0116] D1) Train the leak detection model using images of existing leak points as input until the loss function converges. During training, use the Adam optimizer with parameters β1 = 0.9 and β2 = 0.999, and an initial learning rate of 1.0 × 10⁻⁶. -4 The learning rate for the next training cycle becomes 0.98 times that of the previous cycle, and a total of 100 cycles are trained.
[0117] D2) Data is collected using a device for detecting the airtightness of new energy battery pack enclosures. Images containing leakage points are annotated to generate a dataset SRC, which is then expanded.
[0118] The SRC is input into the YOLOv5-SC model. The first layer of YOLOv5-SC performs feature extraction. The output feature F3 is obtained through the third ShuffleNetV2 module, the output feature F6 is obtained through the sixth ShuffleNetV2 module, and the feature F8 is obtained through the eighth C3-CBAM module.
[0119] The features are fused and passed through the second layer of the YOLOv5-SC model. Feature F3 is input into the second fusion module, feature F6 is input into the first fusion module, and feature F8 is used as the input of the first convolution module. Finally, the fused feature M8 is obtained through the second C3-CBAM module, the fused feature M11 is obtained through the third C3-CBAM module, and the fused feature M14 is obtained through the fourth C3-CBAM module.
[0120] The target is learned and predicted through the third layer of the YOLOv5-SC model. The fused features M8, M11, and M14 are distributed through three convolutional modules, i.e., downsampling operations, to obtain three feature maps at different scales. In each feature map, three prior boxes are generated from spatial points. Finally, the regression loss function is calculated to make the training loss minimize the difference between the output features and the ground truth labels of the target boxes, which is the predicted target box, thus identifying and detecting the leakage points.
[0121] The fifth step is the three-dimensional localization of the leak point: The images of the battery pack box acquired by the infrared camera are first stitched together and the region is located. Then, the image after the stitched region is located is input into the leak point detection model after training. The coordinates of the leak point are registered with the three-dimensional model of the battery pack box, so that the leak point can be intuitively displayed in the three-dimensional model of the battery pack box.
[0122] like Figure 6 As shown, this is a 3D detection result diagram of the battery pack housing leakage point. As can be seen from the diagram, after data collection and analysis by the detection device, the leakage point of the battery pack housing is clearly and intuitively displayed, which is beneficial for subsequent maintenance of the battery pack housing.
[0123] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A detection method for an airtightness testing device for a new energy battery pack housing, the device comprising a testing platform (1) and a fixed suspension device (2) located above the testing platform (1), a test component housing (3) is placed on the testing platform (1), the new energy battery pack housing is placed inside the test component housing (3), a fixed valve (6) is provided on the test component housing (3), a robotic arm (4) is installed on the fixed suspension device (2), an infrared camera (5) is installed on the robotic arm (4), and the output end of an air source (7) is inserted into the test component housing (3); Its features are, Includes the following steps: 11) Acquisition of air tightness test data: The air source (6) introduces 60 degrees Celsius air into the shell (3) of the test piece and waits for the internal pressure of the box to stabilize at 0.6 MPa. The robotic arm (4) drives the infrared camera (5) to scan and photograph the shell (3) of the test piece and transmits the photographed data to the terminal for air tightness test analysis. 12) Data collection and annotation: After the terminal acquires the infrared images captured by the infrared camera (5), it annotates the images containing leakage points, and at the same time, it generates a simulated leakage point dataset by annotating multiple images without leakage points. 13) Image stitching and region localization; 14) Construction and training of the leak detection model: A leak detection model was constructed and trained based on YOLOv5-SC; 41) Construct a leak detection model based on YOLOv5-SC: Set the first layer of YOLOv5-SC as a feature extraction network, the second layer as a feature fusion and transmission network, and the third layer as a target learning and prediction network; 411) The first layer of YOLOv5-SC is set as a feature extraction network. After improvement, it is composed of 8 modules connected in sequence. The first module is the stemblock module, the second to seventh modules are all ShuffleNetV2 modules, and the eighth module is the C3-CBAM module. 412) The second layer of YOLOv5-SC is set as a feature fusion and transfer network. After improvement, the connection settings are as follows: first convolutional module, first downsampling module, first fusion module, first C3-CBAM module, second convolutional module, second downsampling module, second fusion module, second C3-CBAM module, third convolutional module, third fusion module, third C3-CBAM module, fourth convolutional module, fourth fusion module, fourth C3-CBAM module. The output of the first convolutional module is input into the third fusion module, and the output of the second convolutional module is input into the second fusion module. 413) Set the third layer of YOLOv5-SC as the target learning and prediction network. First, perform convolution operation on the input image and output three feature maps at different scales after three downsampling operations. Three prior boxes are generated from spatial points in each feature map. Finally, use the mixture function of LogSoftmax and NLLLoss as the new bounding box regression loss function. The loss of training minimizes the difference between the output features and the ground truth labels of the target boxes, which is the predicted target box. 15) 3D localization of leak points: The images of the battery pack housing captured by the infrared camera are first stitched together and the regions are located. Then, the image after stitching and regional localization is input into the trained leak point detection model. The coordinates of the leak points are registered with the 3D model of the battery pack housing to realize the intuitive display of the leak points in the 3D model of the battery pack housing.
2. The detection method of the airtightness detection device for a new energy battery pack casing according to claim 1, characterized in that, The image stitching and region localization include the following steps: 21) Detect spatial extrema points to determine key locations and scales. The scale space of the two-dimensional function is related to the Gaussian kernel function, and is expressed as follows: , in, Let I(x,y) represent the Gaussian function, I(x,y) represent the input image, and (x,y) represent the spatial coordinates. It is a scale parameter; 22) Accurately locate the position and scale of key points, and remove key points with low contrast and unstable edge response points; 23) Assign principal directions to feature keypoints. Utilize the gradient distribution characteristics of neighboring pixels to specify parameters for the keypoints, while maintaining the rotational directionality of the operator. The calculation formula is as follows: , , Where m(x,y) represents the keypoint parameters. L represents the direction of the key point, and L(x,y) represents the gradient. 24) Generate key point descriptors: Rotate the coordinate axes to the main direction of the key points, and construct a 16×16 region centered on the key points, so that each key point generates 128 data points and forms a 128-dimensional SIFT feature vector; match the SIFT feature vectors obtained from the two images to be matched to achieve image stitching, and finally use the prior position coordinates of the battery pack box to locate the region of the target to be tested in the stitched image.
3. The detection method of the airtightness detection device for a new energy battery pack casing according to claim 1, characterized in that, The construction and training of the leak detection model includes the following steps: 42) Configure the ShuffleNetv2 module. The ShuffleNetv2 module uses block units, which no longer split the channels of the input feature matrix. The left branch uses a 3×3 DW convolution and a 1×1 convolution, while the right branch uses a 1×1 quadratic convolution and a 3×3 DW convolution. After convolution, the channels are concatenated by Concat, doubling the number of output channels. Finally, the output feature layer is shuffled to further enhance the feature extraction capability. 43) Construct the C3-CBAM module, In the C3-CBAM module, the input left branch goes through convolution and multiple hourglass structures (Bottleneck), and the right branch goes through convolution and the attention module CBAM. The attention module CBAM includes a channel attention module and a spatial attention module. Finally, the results of the two branches are concatenated and then convolved before being output. 44) Configure the channel attention module: 441) The attention module is configured to use average pooling and max pooling operations to aggregate channel information, generating two distinct bundles of channel context information: and These represent the average pooling feature and the max pooling feature, respectively; 442) Transfer these two information bundles to the same shared network, which consists of a multilayer perceptron (MLP) containing a hidden layer; 443) Use element-wise summation to merge the output feature vectors to generate channel attention weight information: 、 、 , The channel attention module is calculated as follows: , in, Let R be the sigmoid function, R be the feature map, c be the number of channels, and M be the number of channels. C W1, W0, and F are sub-feature maps, MLP is a multilayer perceptron, AvgPool is the average pooling operation, and MaxPool is the max pooling operation. , These represent the average pooling feature and the max pooling feature, respectively. 45) Setting up the spatial attention module: 451) Continue using channel attention average pooling and max pooling operation And connect them to generate a feature map; 452) Through a 7x7 convolutional layer and activation function Generate spatial attention weight information , The expression for the spatial attention module is as follows: , in, Here, is the sigmoid function, R is the feature map, s is the number of channels, AvgPool is the average pooling operation, and MaxPool is the max pooling operation. , These represent average pooling and max pooling operations on s, respectively. 46) Construct the loss function, The loss function is improved by using a hybrid function of LogSoftmax and NLLLoss as the new bounding box regression loss function, and the calculation formula is as follows: , , Where, input z i This represents the score for each category, M represents the maximum score, and y represents the maximum score. i The weights of the categories are represented by n, where n represents the category. 47) Training the leak detection model, i.e., YOLOv5-SC: 471) Use existing images of leak points as input to train the leak point detection model until the loss function converges. Use the Adam optimizer during training, with parameters set to... , The initial learning rate is 1.0 × 10⁻⁶. -4 The learning rate for the next training cycle becomes 0.98 times that of the previous cycle, and a total of 100 cycles are trained. 472) Data is collected using a device for detecting the airtightness of new energy battery pack enclosures. Images containing leakage points are annotated to generate a dataset SRC, which is then expanded. The SRC is input into the YOLOv5-SC model. The first layer of YOLOv5-SC performs feature extraction. The output feature F3 is obtained through the third ShuffleNetV2 module, the output feature F6 is obtained through the sixth ShuffleNetV2 module, and the feature F8 is obtained through the eighth C3-CBAM module. The features are fused and passed through the second layer of the YOLOv5-SC model. Feature F3 is input into the second fusion module, feature F6 is input into the first fusion module, and feature F8 is used as the input of the first convolution module. Finally, the fused feature M8 is obtained through the second C3-CBAM module, the fused feature M11 is obtained through the third C3-CBAM module, and the fused feature M14 is obtained through the fourth C3-CBAM module. The target is learned and predicted through the third layer of the YOLOv5-SC model. The fused features M8, M11, and M14 are distributed through three convolutional modules, i.e., downsampling operations, to obtain three feature maps at different scales. In each feature map, three prior boxes are generated from spatial points. Finally, the regression loss function is calculated to make the training loss minimize the difference between the output features and the ground truth labels of the target boxes, which is the predicted target box, thus identifying and detecting the leakage points.
Citation Information
Patent Citations
Device and method for detecting airtightness of battery case
CN107860536A
New energy automobile battery pack leakage and leakage point detection device
CN219870160U