A detection method and device for surface defects of a power battery module

Through environmental quality evaluation and adaptive adjustment methods, combined with deep learning models and adaptive noise denoising algorithms, the problem of environmental factors in power battery module detection is solved, and high-precision and stable defect detection are achieved.

CN115690013BActive Publication Date: 2025-08-01FUJIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211276568.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-18
Publication Date
2025-08-01
Estimated Expiration
2042-10-18

AI Technical Summary

Technical Problem

The prior art is affected by complex industrial environmental factors in power battery module detection, resulting in image noise generation. The traditional method has shortcomings in accuracy, real-time and stability, and human empirical judgments bring errors and uncertainties.

Method used

Environmental quality assessment and adaptive adjustment methods are adopted, combined with deep learning models and adaptive denoising algorithms, and the detection accuracy and stability are improved through comprehensive image quality evaluation and intelligent noise recognition.

Benefits of technology

It improves the stability, accuracy and real-timeness of surface defect detection of power battery modules, enhances the adaptability to complex environments, reduces unstable factors, and has good economic and environmental protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115690013B_ABST
    Figure CN115690013B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and device for detecting surface defects of a power battery module. It includes: first, evaluating and adjusting the environmental quality, then collecting pictures of the battery modules on the conveyor belt, transmitting them to an industrial control computer for image processing, inputting the processed pictures into a trained deep learning model, and finally obtaining the detection results; evaluating and adjusting the environmental quality includes: designing evaluation criteria for the main factors, evaluating and adjusting the environmental quality during the detection process; image processing includes: evaluating the image through an image quality comprehensive evaluation algorithm, and adaptively adjusting using different denoising algorithms for different noises; the deep learning model uses an improved residual network ResNet. The present invention can improve the quality of image acquisition, enhance the detection accuracy, strengthen the adaptability of the system to different situations, enhance the system robustness, and ensure the detection accuracy and real-time performance; in addition, it reduces carbon emissions, saves energy and reduces emissions, and has good economic efficiency and environmental protection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of surface defect detection of power battery modules, and specifically relates to a method and device for detecting surface defects of power battery modules. Background Art

[0002] In the process of image acquisition and defect detection in reality, complex environmental factors will be encountered. Especially in the process of battery module detection, various complex industrial environmental factors will be encountered, resulting in various image noises. These noises usually do not appear alone, and it is obviously not in line with the actual situation to use a single filtering algorithm. Moreover, in most cases, the quality of noise reduction depends on human judgment, which brings great errors and uncertainties. When detecting image defects, traditional manual experience detection and artificial feature extraction methods have great deficiencies in accuracy, real-time performance, and stability, and are poor in generality and intelligence. Summary of the Invention

[0003] The purpose of the present invention is to improve the visual detection accuracy and accuracy of battery modules, and provide a method and device for detecting surface defects of power battery modules, which can greatly improve the detection efficiency and accuracy of defects such as flaws in power battery modules.

[0004] To achieve the above purpose, the technical solution of the present invention is: a method for detecting surface defects of a power battery module, including the following steps:

[0005] S1. Evaluate the environmental quality. If the environmental quality is unqualified, trigger adjustment measures. If it is qualified, continue to the next step;

[0006] S2. At the first detection point A, use a camera to collect images of the top surface and two side surfaces of the power battery module on the guide rail; then rotate the tray by 90°, and collect images of the remaining two side surfaces; thus, images of five surfaces except the bottom surface are completed.

[0007] S3. Transmit the collected images to an industrial control computer for image processing, specifically including: first, evaluate the image quality through an image quality comprehensive evaluation algorithm. If the image quality is unqualified, analyze the noise contained in the image to obtain the noise type and noise intensity; secondly, adopt different denoising algorithms for different noises and perform adaptive adjustment of noise reduction according to the noise intensity; finally, obtain an image with qualified quality and proceed to the next step;

[0008] S4. Input the images with qualified quality inspection into a trained deep learning model to obtain the results of defect detection, and visually output the results;

[0009] S5. Clamp the detected power battery module containing defects onto the conveyor belt to complete sorting; the power battery modules without defects continue to be conveyed forward;

[0010] S6. Flip the power battery module at the detection point A' through the clamping device, collect pictures of the bottom surface, and repeat the detection and sorting steps in S3, S4, and S5 to complete all detections.

[0011] The present invention also provides a detection device for surface defects of a power battery module, including an industrial control computer with a running method program as described above, and a camera connected to the industrial control computer for collecting surface images of the power battery module and transmitting them to the industrial control computer, a light source for providing collection illumination, a transmission device for transmitting the power battery module, a clamping device for clamping defective power battery modules and flipping the power battery module.

[0012] Compared with the prior art, the present invention has the following beneficial effects:

[0013] The present invention fully considers the influence of various industrial environment factors during the detection process of the battery module, conducts environmental quality assessment, and adjusts the equipment according to the assessment results. At the same time, it designs a detection method that can intelligently distinguish the types of noise and adaptively adjust denoising according to different noises; proposes a comprehensive index for objectively evaluating the image quality; establishes an improved deep learning model and visualizes the final recognition result. It improves the detection quality from both hardware and software aspects, reduces unstable factors, has good economic efficiency and environmental protection, and greatly improves the stability, accuracy, real-time performance of surface defect detection and the adaptive ability to complex environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is a flowchart of the detection method for surface defects of the power battery module of the present invention.

[0015] Figure 2 It is a schematic diagram of the battery module defect detection device of the present invention.

[0016] Figure 3 It is the convolution kernel optimization.

[0017] Figure 4 It is the downsampling optimization. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0018] The following will specifically describe the technical solutions of the present invention with reference to the drawings.

[0019] As Figure 1 、 2 shown, a detection method for surface defects of a power battery module of the present invention includes the following steps:

[0020] S1. Evaluate the environmental quality. If the environmental quality is unqualified, trigger adjustment measures. If it is qualified, continue to the next step;

[0021] S2. At the first detection point a, use a camera to collect images of the top surface and two side surfaces of the power battery module on the guide rail. Then, rotate the tray by 90° to collect images of the remaining two side surfaces. Thus, images of the five surfaces except the bottom surface are all collected.

[0022] S3. Transmit the collected images to the industrial control computer for image processing, which specifically includes: First, evaluate the image quality through an image quality comprehensive evaluation algorithm. If the image quality is unqualified, analyze the noise contained in the image to obtain the noise type and noise intensity. Second, adopt different denoising algorithms for different noises and perform adaptive adjustment of noise reduction according to the noise intensity. Finally, obtain images with qualified quality for the next step.

[0023] S4. Input the images with qualified quality inspection into the trained deep learning model to obtain the results of defect detection and visually output the results.

[0024] S5. Clamp the power battery module detected to contain defects onto the conveyor belt to complete sorting. The power battery modules without defects continue to be conveyed forward.

[0025] S6. At detection point b, use the clamping device to flip the power battery module and collect pictures of the bottom surface. Repeat the detection and sorting steps in S3, S4, and S5 to complete all detections.

[0026] As Figure 2 shown, the present invention also provides a detection device for surface defects of a power battery module, including an industrial control computer with a running method program as described above, and a camera (including a 2D camera 21 and a 3D camera 22) connected to the industrial control computer for collecting surface images of the power battery module and transmitting them to the industrial control computer, a light source for providing collection illumination, a transmission device for transmitting the power battery module (including a guide rail 31 for transmitting the power battery module and a conveyor belt 32 for transmitting the defective power battery module, and the power battery module 5 on the guide rail is carried by a tray 33), and a clamping device 4 for clamping the defective power battery module and flipping the power battery module.

[0027] The following is the specific implementation process of the present invention.

[0028] In the process of actual image collection and defect detection, complex environmental factors will be faced, resulting in various image noises. These noises usually do not appear alone, and it is obviously not in line with the actual situation to use a single filtering algorithm. Moreover, in most cases, the quality of the noise reduction effect depends on human judgment, which brings great errors and uncertainties. When detecting image defects, traditional manual experience detection and artificial feature extraction methods have great deficiencies in accuracy, real-time performance, and stability, and are poor in generality and intelligence.

[0029] The present invention fully considers the influence of various industrial environmental factors during the detection process of battery modules, conducts environmental quality assessment, and adjusts the equipment accordingly based on the assessment results. Meanwhile, a detection method is designed to intelligently distinguish the types of noise and adaptively adjust and denoise according to different noises; a comprehensive index for objectively evaluating image quality is proposed; an improved deep learning model is established, and the final recognition result is visualized. The detection quality is improved from both hardware and software aspects, unstable factors are reduced, and it has good economic efficiency and environmental protection, greatly improving the stability, accuracy, real-time performance of surface defect detection and the adaptive ability to complex environments. The specific detection steps of the method of the present invention are as follows:

[0030] S1. First, evaluate the environmental quality. If the environmental quality is unqualified, trigger the adjustment measures; if it is qualified, continue to the next step;

[0031] S2. At the first detection point A, use a camera to collect images of the top surface and two side surfaces of the power battery module on the guide rail; then rotate the tray by 90° to collect images of the remaining two side surfaces; thus, images of five surfaces except the bottom surface are all collected;

[0032] S3. Transmit the pictures to the industrial control computer for image processing, which specifically includes: first, evaluate the image quality through an image quality comprehensive evaluation algorithm. If the image quality is unqualified, analyze the noise contained in the image to obtain the noise type and noise intensity; secondly, adopt different denoising algorithms for different noises, and this denoising algorithm can be adaptively adjusted according to the noise intensity. If the evaluated image quality is qualified, proceed to the next step;

[0033] S4. Input the images with qualified quality detection into the trained deep learning model to obtain the results of defect detection, and visually output the results;

[0034] S5. Clamp the detected modules containing defects onto the conveyor belt to complete sorting; the modules without defects continue to be conveyed forward;

[0035] S6. At the detection point A', flip the module through the clamping device to collect pictures of the bottom surface, and repeat the detection and sorting steps in S3, S4, and S5 to complete all detections.

[0036] The adjustment measures include:

[0037] (1) Mechanical vibration refers to the regular reciprocating motion of an object or particle near its equilibrium position. If the vibration exceeds the allowable range, the mechanical equipment will generate large dynamic loads and noise, thereby affecting its working performance and service life. In severe cases, it will lead to premature failure of parts and increase fatigue and wear of components, thereby shortening the service life of machines and structures. Long-term vibration may also cause large deformation and damage to the structure.

[0038] When inspecting surface defects on power battery modules, vibration can severely impact the quality of captured images, reducing detection accuracy and further impacting the real-time and continuity of detection. Vibration can be measured by amplitude and frequency:

[0039] The amplitude of the camera part vibration is A C , the result of multiple tests A C1 、A C2 ,...,A Ci ; frequency is f c , the result of multiple tests f C1 、f C2 ,...,f Ci The amplitude of the lower tray and module is A B , the result of multiple tests A B1 、A B2 ,...,A Bi ; frequency is f B , the result of multiple tests f B1 、f B2 ,...,f Bi . Then we have:

[0040]

[0041] Among them, V is the comprehensive evaluation coefficient of vibration, which comprehensively reflects the intensity of vibration; k, C1, and C2 are constants; b B 、b C Ac i -A Bi |} and {|fc i -f Bi |}'s variance.

[0042] When V≥1.49, the environmental conditions are considered unqualified, and the device is triggered to adjust the vibration. The specific adjustment measures are as follows:

[0043] ① Adjust the flow rate of lubricating oil:

[0044]

[0045] Among them, v 油represents the lubricating oil flow rate; v0 represents the original speed of the lubricating oil; V is the vibration comprehensive evaluation coefficient mentioned above; k1 and k2 are both constants.

[0046] ② Controlling mechanical vibration using piezoelectric materials:

[0047] When a piezoelectric material is placed in an electric field, under the action of the electric field, the internal positive and negative charge centers of the piezoelectric material will produce a relative displacement, thereby causing the piezoelectric material to deform. The magnitude of its deformation is proportional to the electric field strength of the piezoelectric material. This phenomenon is called the inverse piezoelectric effect.

[0048] Thus, for the piezoelectric ceramics under the inverse voltage effect, there is the following relationship:

[0049] S = d×E (3)

[0050] In the formula, d is the piezoelectric constant; E is the externally applied electric field strength.

[0051] Under the actual working conditions of battery module defect detection, as the externally applied electric field E increases, the value of S also increases, and the inverse voltage effect of the piezoelectric ceramics becomes more obvious.

[0052] Vibration active control is based on the inverse piezoelectric effect of piezoelectric materials. The specific principle is as follows: The sensor collects the vibration signals of the camera part and the module part and converts them into electrical signals. After the acquisition card converts the transmitted electrical signals into digital signals and transmits them to the computer for analysis and processing, control signals are generated.

[0053] Piezoelectric ceramic materials are installed in both the camera part and the module part. After the control signals are amplified by the signal amplifier, they are transmitted to the power driver, and the externally applied electric field strength E of the piezoelectric material is adjusted according to the following formula, thereby realizing the control of vibration, with strong adjustability and adaptability.

[0054]

[0055] In the formula, E is the externally applied electric field strength of the piezoelectric ceramics, V is the vibration comprehensive evaluation coefficient mentioned above, and C3 and C4 are constants.

[0056] By the above two measures, the amplitude and frequency of the vibration are reduced, and the vibration comprehensive evaluation coefficient is decreased. When V ≤ 1.49, it is regarded as the adjustment completed.

[0057] (2) Good environmental conditions are very important in visual inspection. For example, too high temperature often brings noise to camera imaging; temperature also affects the performance of LED light sources. As the LED temperature rises, its brightness decreases, and the heat generated by the LED itself will also accelerate aging or even lead to direct scrapping; other components also have corresponding temperature limits, such as industrial controllers / embedded PCs, etc. Other environmental factors such as dust and humidity will damage the machine vision hardware itself and also affect the measurement results.

[0058] For the defect detection of battery modules, the detection process is complex and there are many important components. In actual operation, environmental factors are not constant. Targeted adjustment and control of temperature, humidity, and dust can, on the one hand, enable timely response to changes in the industrial environment, keep the hardware in the best state for work, enhance the system's robustness to different environments, and ensure the accuracy and real-time of detection; on the other hand, it can avoid the continuous operation of adjustment devices such as air conditioners, fans, dust removal, and dehumidification, extend the service life, and more importantly, can greatly reduce carbon emissions, save energy and reduce emissions, with good economic and environmental protection.

[0059] Specifically, it includes:

[0060] ① The real-time temperatures of the industrial camera, light source, industrial control computer, and battery module are Tc, T L , T P , T B respectively. When it is detected that the real-time temperature exceeds the optimal working temperature range of the component, then calculate η i :

[0061]

[0062] where i = C, L, P, B, T i represents the real-time temperature of the component, represents the maximum or minimum value of the optimal working temperature of the component; η i can be regarded as a temperature evaluation index.

[0063] When η is greater than or equal to 5%, the environmental conditions are regarded as unqualified, triggering adjustment, and adjusting the power of the fan or water cooling equipment at the component until the real-time temperature of the component is within the optimal working temperature:

[0064]

[0065] In the formula, P represents the power of the cooling equipment, P0 is the initial power of the equipment before adjustment, k3 is a constant, and η is the value when triggering adjustment, not the real-time value.

[0066] ② The relative humidity in the overall environment is RH, expressed as the percentage of the actual water vapor pressure in the air to the saturated water vapor pressure at the current temperature, and rounded to an integer; and the absolute humidity H of the industrial camera, light source, industrial control computer, and battery module part C 、H L 、H P 、H B , which refers to the mass of water vapor contained in a certain volume of air, with the unit of grams per cubic meter.

[0067] Similarly, when it is detected that the overall relative humidity RH or the absolute humidity Hi exceeds the optimal humidity range, then μ0 and μ are calculated i :

[0068]

[0069]

[0070] where i = C, L, P, B, and Hi represents the real-time humidity of the component represents the maximum or minimum value of the optimal operating temperature of the component; μ0, μ i can be regarded as humidity evaluation indicators

[0071] When μ0 or μ i is greater than or equal to 12%, it is regarded as unqualified environmental conditions, triggering adjustment, adjusting the power of the dehumidification equipment until the real-time humidity is within the optimal humidity range:

[0072] P′ = P′0 + k4ln(μ i + 1)P′0 (9)

[0073] In the formula, P′ represents the power of the dehumidification equipment, P′0 is the initial power of the equipment before adjustment, k4 is a constant, i = 0, C, L, P, B; μ i is the value when triggering adjustment, not the real-time value.

[0074] ③ Detect the particle concentration in the environment, and there is a dust evaluation indicator D:

[0075]

[0076] where D50 is the median particle size, δg is the geometric standard deviation, and C5, C6 are constants. When D ≥ 1, it is regarded as excessive dust concentration, start the dust removal equipment, and stop working until the dust evaluation indicator D ≤ 0.9.

[0077] The evaluation of the environmental quality includes:

[0078] When the vibration comprehensive evaluation coefficient V ≥ 1.49, or the temperature evaluation indicator η i ≥ 5%, or the humidity evaluation indicators μ0, μi If the dust evaluation index D is ≥ 12% or the dust evaluation index D ≥ 1, it is regarded that the environmental quality is unqualified and the corresponding adjustment is triggered; if the above indexes are all less than the specified values, the environmental quality is qualified.

[0079] The image quality evaluation includes:

[0080] The process of forming battery modules into groups is complex, there are many environmental interference factors, and the types and details of the modules are different. Therefore, the quality of the image is directly related to the accuracy and stability of a series of subsequent detection steps. At present, in the battery module production line, most judgments rely on manual experience or there is no image quality detection. Therefore, it is necessary to design an objective comprehensive image quality evaluation method:

[0081] (1) The difference between two images can be represented by D:

[0082]

[0083] Among them, P represents the standard image with excellent quality in terms of signal-to-noise ratio, clarity, contrast, etc. as a reference, T represents the image to be measured, the image sizes are both w*h, α and β represent the horizontal and vertical coordinates of a certain pixel point on the image. At the point (α,β), the gray value of the reference image is P(α,β), and the gray value of the image to be measured is T(α,β).

[0084] Since the color difference between the battery part and the background part in the image is extremely large, it is easy to distinguish and measure in the grayscale image. Use L1, L2, B1, and B2 to represent the area range occupied by the battery module part in the image, D 模组 、D 背景 respectively represent the differences between the two images of the area where the battery module is located and the background area:

[0085]

[0086]

[0087] For detecting surface defects of the battery module, different weights k1 = 0.85 and k2 = 0.15 should be given to the battery module part and the background part in the picture.

[0088] D 综合 = k1D 模组 + k2D 背景 (14)

[0089] Then the ratio of the effective part to the noise part in the picture can be represented by R:

[0090]

[0091] In the formula, n represents the number of bits of the image, and generally n = 8 is taken;

[0092] (2) Use E(P) and σ P to represent the mathematical expectation and standard deviation of all gray values in the area where the battery module is located in the reference image P respectively; E(T) and σ T Similarly; σ P σ T represents the covariance of the areas where the battery modules are located in the two images, and there is:

[0093]

[0094]

[0095]

[0096] In the formula, a1 and a2 are constants, where a1 = 2 2n+3 ×10 -4 , a2 = 4 n ×10 -4 , n represents the number of bits of the image, and generally n = 8. Considering the above three formulas comprehensively, there is:

[0097] S = k(L x ·C y ·W z ) (19)

[0098] Then S can represent the degree of closeness between the image T to be measured and the reference image P in the area where the battery module is located;

[0099] Take k = 1, x = 1, y = 1, z = 1.5, that is:

[0100]

[0101] (3) According to the results in (1) and (2), the final comprehensive evaluation standard for image quality can be obtained:

[0102] When s ≥ 0.84, the image quality is regarded as qualified, otherwise the image quality is unqualified.

[0103] Take n = 8, that is:

[0104]

[0105] The analysis of the noise contained in the image includes:

[0106] Due to the characteristics of the production, assembly, and detection of power battery modules, various interference factors are inevitable. For example, the temperature rise of components, changes in external light, fluctuations in power supply voltage, dust, humidity, and electromagnetic interference. During the image acquisition process, these interference factors will generate various types of noise, and these noises will appear and superimpose simultaneously. In the current detection methods, using a single filtering algorithm to process all images will obviously produce large errors. Therefore, it is necessary to design a method that can detect the type and intensity of the noise in the image and then perform targeted processing.

[0107] During the detection process, the image noises encountered usually include: salt-and-pepper noise, Gaussian noise, gamma noise, Rayleigh noise, exponential noise, uniform noise, etc. According to the characteristics of different noises, the following detection steps are as follows:

[0108] First, detect the salt-and-pepper noise in the image T to be measured; then subtract the reference image P from the image to obtain the image N containing only noise, generate the gray-level histogram of the noise image N, and perform normalization processing; according to the data of the gray-level histogram and the distribution function of each noise, combined with the process characteristics during the production and group detection of power battery modules, detect the type and intensity of the contained noise. Immediately perform adaptive noise reduction processing according to the detection results after each type of noise is identified. Due to its characteristics, uniform noise will be filtered out together with other noises during the filtering process. Finally, obtain the processed image.

[0109] The types and intensities of the noise contained in the detected image include:

[0110] (1) Salt-and-pepper noise, that is, impulse noise, and its probability density function is:

[0111]

[0112] In the formula, z represents the gray value at a point (α, β) in the image T to be measured; a and b represent the maximum and minimum values that the image can take, and take a = 255 and b = 0

[0113] Select an 8*8 area within the range of the battery module in the image T to be measured as the area to be measured. In this area, for the coordinates (i, j) of the pixel m to be measured and another pixel n in the area with coordinates (u, v), use d to represent the distance between them:

[0114] d = ||(i, j)-(u, v)|| (21)

[0115] I can represent their intensity difference, that is, the difference in pixel values:

[0116] I = |Z(i,j) 2 -Z(u,v) 2 | (22)

[0117] Where Z(i,j) and Z(u,v) represent the gray values of points m and n.

[0118] The weight of the distance can be expressed as:

[0119]

[0120] Where, represents the variance of the distance d from all other points in the area to be measured to the point m to be measured; A is the base of the exponential function, which is determined according to the actual situation, and usually A = 2.4 - 3.0

[0121] The weight of the intensity difference can be expressed as:

[0122]

[0123] Where, represents the variance of the intensity difference I between all other pixel points in the area to be measured and the point m to be measured; B is the base of the exponential function, which is determined according to the actual situation, and usually B = 2.4 - 3.0

[0124] Taking into account the influence of intensity and distance comprehensively, we have:

[0125]

[0126] where k is a constant, taking k = 0.42 for easy calculation, The larger the value of, the greater the possibility that the pixel point to be measured is a clean pixel point, that is:

[0127]

[0128] From this, the number n of pixel points containing salt-and-pepper noise in the entire image can be deduced i

[0129] (2) The probability density function of Gaussian noise follows a normal distribution:

[0130]

[0131] where σ is the standard deviation, σ 2 is the variance, and μ is the mean of the gray value z;

[0132] The probability density function of Rayleigh noise is:

[0133]

[0134] Its mean is:

[0135]

[0136] Its variance is:

[0137]

[0138] The probability density function of gamma (Irish) noise is:

[0139]

[0140] Its mean and variance are:

[0141]

[0142] The probability density function of exponential noise is:

[0143]

[0144] Its mean and variance are:

[0145]

[0146]

[0147] Quantization noise, also known as uniform noise, has a probability density function of:

[0148]

[0149] Its mean and variance are:

[0150]

[0151]

[0152] (3) Let T be the image to be measured and P be the reference image. Subtract the reference image P from the image to be measured T that has completed salt-and-pepper noise detection to obtain an image N containing only noise:

[0153] N(u, v) = T(u, v) - P(u, v) (26)

[0154] The noise acts on the entire area of image N. Select a region t with a size of 10 * 10 and relatively uniform gray values (i.e., the smallest variance of gray values) within the range of the battery module as the region to be measured t;

[0155] Measure the gray value z of this region t and the mean of the gray values and perform normalization processing to make its mean That is:

[0156]

[0157] Then generate the gray histogram of this region t and also perform normalization processing to prevent pixel points from overflowing. The abscissa range is set to -0.1 to 1.1;

[0158] Fit the normalized histogram data into a curve f(z t ), then f(z t ) is the result of the superposition (convolution) operation of the distribution functions of various noises described in (2), that is:

[0159]

[0160] where μ1, μ2... μ5 represent the respective means of these noises; σ1, σ2... σ5 represent the respective standard deviations of the noises; A, B... E are constants;

[0161] According to the characteristics of various noises described in (2), combined with the normalized histogram data, there are:

[0162] 1) Gaussian noise is inevitable. If f(z t ) shows a normal distribution with a mean of 0.5, then it only contains Gaussian noise, and the variance of the Gaussian noise can be obtained; otherwise, there are other noises;

[0163] 2) When z t →0, if f(z t )≠0, then it contains exponential noise, and the variance and mean of the exponential noise can be obtained; otherwise, it does not contain exponential noise;

[0164] 3) Due to the technological characteristics in the production and group detection processes of battery modules, in the region of z t = 0 to 0.05, there are only Gaussian, gamma, and exponential noise distributions. According to the above 1) and 2), it can be judged whether gamma noise is contained;

[0165] 4) If all noises exist, then: the mean of Gaussian noise = 0.5; when z t →0, there is only exponential noise distribution; on z t = 0 to 1.0, the overall mean μ1 + μ2 + … + μ5 can be obtained from the fitted f(z t ). In the region of z t = 0 to 0.05, there are only Gaussian, gamma, and exponential noise distributions; in the region of z t = 0.95 to 1.0, there are only Gaussian, Rayleigh, and exponential noise distributions. According to the above conditions, combined with the fitted f(z t ), the respective means and variances of all noises can be obtained.

[0166] The noise reduction method adaptively adjusted according to the noise detection results includes:

[0167] (1) The traditional mean filtering algorithm replaces the gray value of the central pixel (u, v) in the local window with the average value of the gray values of all pixels in the window. If the original image is g(u, v), the filtered image is f(u, v), and the window size is m*n, that is:

[0168]

[0169] In the formula, j and k are integers and w(r, s) is the weight;

[0170] According to the above salt-and-pepper noise detection results and combined with the actual situation of the module:

[0171] 1) The window size is adaptively adjusted as follows:

[0172]

[0173] Among them, P(i) = n i / n T represents the noise intensity, n i is the number of detected noise points, n T is the total number of pixel points in the image T to be measured; [] represents the rounding function.

[0174] 2) Redesign the weight w(r, s):

[0175] w(r, s) = k w ·w(d)·w(I) (30)

[0176]

[0177]

[0178] w(d) represents the spatial distance of other points in the window to the center point, represents the variance of the distance of other points to the center point; w(I) represents the degree of closeness of the gray values of other points in the window to the center point, represents the variance of the difference between the gray values of other points and the center point

[0179] In the formula, ε1 and ε2 are the bases of the exponential function and change according to the window size:

[0180] ε1 = 2.1 + N / 7, ε2 = 2 + M / 8 (33)

[0181] k w is a constant for adjusting the final result size, taking 1.28, then:

[0182]

[0183] (3) Apply the improved adaptive noise reduction algorithm only to the detected salt-and-pepper noise points to preserve more image details and edges;

[0184] (2) For Gaussian noise, the variance detection value is σ 2 , adopt the non-local means denoising algorithm. According to the Gaussian noise detection situation and the characteristics of this method, make the following adjustments to adapt to the change of noise intensity and balance the real-time performance and accuracy of battery module detection:

[0185] 1) The neighborhood size of the pixel points is 2r + 1. When σ 2 < 5, take r = 1. When 5 ≤ σ 2 < 20, take r = 2. When σ 2 ≥ 20, take r = 3

[0186] 2) The smoothing coefficient in the weight takes h = 1.5ln(σ 2 ) = 3ln(σ);

[0187] (3) Considering the on-site conditions and real-time requirements of module detection comprehensively, for gamma, Rayleigh, and exponential noises, adopt the wavelet domain denoising method. Since the mean and variance of each type of noise have been detected, according to the characteristics of the wavelet domain denoising method, there are:

[0188] When the standard deviation of the noise contained in the image ≤ 18, use the weighted hard threshold denoising method;

[0189] When the standard deviation of the noise contained in the image is 18 - 45, use the weighted soft threshold denoising method;

[0190] When the standard deviation of the noise contained in the image is greater than 45, use the adaptive new threshold method.

[0191] The deep learning model includes:

[0192] The deep learning model used is the Residual Network ResNet; the number of residual basic blocks is (3, 6, 8, 3); and each large-kernel convolution in the residual basic block is replaced by multiple small convolution kernels. As Figure 3 shown, first use a 1x1 convolution layer for feature compression, then use a 3x3 convolution network for feature extraction, and then use a 1x1 convolution layer for feature expansion. This structure has fewer parameters and higher efficiency compared to directly performing 3x3 convolution on the input. The entire network has a total of 62 layers.

[0193] At the same time, optimize the downsampling process: As Figure 4 shown, move the downsampling process to the 3x3 convolution on the left path. The convolution kernel can traverse all the information on the input feature map during the movement and has a certain overlap; at the same time, use max pooling instead of 1x1 convolution for downsampling on the right path.

[0194] The visualization of the final recognition result includes:

[0195] After the detection is completed, the Grad-CAM algorithm is added to generate a heat map of class activation to visualize the deep learning results. Random spot checks on the visualization results can further determine whether the evaluation model meets the expected effect, leaving room for subsequent optimization and improvement of the model. Also, when the operating conditions and the detection object change, it can be used to judge the adaptability of the model to different environments.

[0196] For class c, take the input y of the softmax layer c , take the partial derivative of the ij-th input pixel value of the k-th neuron in the last convolutional layer, and then perform global average pooling, from which the weight of the k-th neuron in the last convolutional layer can be obtained

[0197]

[0198] The inputs of different neurons in the last convolutional layer are multiplied by their respective neuron weights, and then the corresponding values of all neurons are summed. Adding the ReLU function serves to retain the pixel values that play a positive role in classification and suppress the pixel values that play a negative role in classification. Finally, a rough heat map, that is, a classification localization map, is obtained The formula is as follows:

[0199]

[0200] The above are the preferred embodiments of the present invention. All changes made according to the technical solution of the present invention, when the functions and effects produced do not exceed the scope of the technical solution of the present invention, fall within the protection scope of the present invention.

Claims

1. A method for detecting surface defects of a power battery module, characterized in that, It includes the following steps: S1. Evaluate the environmental quality. If the environmental quality is unqualified, trigger the adjustment measures; if it is qualified, proceed to the next step. S2. At the first detection point A, use a camera to collect images of the top and two side faces of the power battery module on the guide rail. Then, rotate the tray by 90° to collect images of the remaining two side faces. Thus, images of five faces except the bottom face are completed. S3. Transmit the collected images to the industrial control computer for image processing, specifically including: First, evaluate the image quality through the comprehensive image quality evaluation algorithm. If the image quality is unqualified, analyze the noise contained in the image to obtain the noise type and noise intensity. Second, adopt different denoising algorithms for different noises and perform adaptive adjustment of noise reduction according to the noise intensity. Finally, obtain images with qualified quality and proceed to the next step. The specific implementation method of evaluating the image quality through the comprehensive image quality evaluation algorithm is as follows: (1) The difference between two images is represented by D: Among them, P represents a reference standard image with excellent quality in terms of signal-to-noise ratio, clarity, and contrast. T represents the image to be measured. The image sizes are both w*h. α and β represent the horizontal and vertical coordinates of a certain pixel point on the image. At the point (α,β), the gray value of the reference standard image is P(α,β), and the gray value of the image to be measured is T(α,β). Use L1, L2, B1, and B2 to represent the area range occupied by the power battery module part in the image, D 模组 , D 背景 respectively represent the differences between the two images of the area where the power battery module is located and the background area: Assign different weights k1 and k2 to the part of the power battery module and the background part in the image: D 综合 = k1D 模组 + k2D 背景 Use R to represent the ratio of the effective part to the noise part in the image: In the formula, n represents the number of bits of the image; (2) Use E(P) and σ P to represent the mathematical expectation and standard deviation of all gray values in the area where the power battery module is located in the reference standard image P respectively; E(T) and σ T to represent the mathematical expectation and standard deviation of all gray values in the area where the power battery module is located in the image to be measured respectively; σ P σ T represents the covariance of the areas where the power battery modules are located in the two images, and there is: where a1 and a2 are constants, with a1 = 2 2n+3 × 10 -4 , a2 = 4 n × 10 -4 , considering the above three equations comprehensively, we have: S = k(L x ·C y ·W z ) S represents the degree of proximity between the image to be measured T and the reference standard image P in the area where the battery module is located. Take k = 1, x = 1, y = 1, z = 1.5, that is: (3) According to the results in (1) and (2), the final comprehensive evaluation standard for image quality can be obtained: That is, when s ≥ 0.87, the image quality is considered qualified; otherwise, the image quality is unqualified. S4. Input the images with qualified quality inspection into the trained deep learning model to obtain the results of defect detection and visually output the results. S5. Clamp the detected power battery modules containing defects onto the conveyor belt to complete sorting; the power battery modules without defects continue to be conveyed forward. S6. At the detection point A', flip the power battery module through the clamping device to collect images of the bottom face, and repeat the detection and sorting steps in S3, S4, and S5 to complete all detections.

2. The detection method for surface defects of a power battery module according to claim 1, wherein, The adjustment measures are specifically as follows: (1) Mechanical vibration adjustment: The amplitude and frequency of mechanical vibration are measured; the amplitude of the vibration of the camera part is A C , and the results of multiple detections are A C1 , A C2 ,..., A Ci ; the frequency is f c , and the results of multiple detections are f C1 , f C2 ,..., f Ci ; the amplitude of the power battery module part is A B , and the results of multiple detections are A B1 , A B2 ,..., A Bi ; the frequency is f B , and the results of multiple detections are f B1 , f B2 ,..., f Bi ; then there is: Among them, V is the comprehensive vibration evaluation coefficient, which comprehensively reflects the intensity of vibration; k, C1, and C2 are constants; b B , b C is the variance of {|Ac i -A Bi |} and {|fc i -f Bi |}; When V≥1.49, it is regarded as the unqualified environmental quality condition, and the equipment is triggered to adjust the mechanical vibration. Specifically: ① Adjust the flow rate of the lubricating oil: Among them, v 油 represents the lubricating oil flow rate; v0 represents the original speed of the lubricating oil; k1 and k2 are both constants; ② Control the mechanical vibration using piezoelectric ceramics: Install piezoelectric ceramics on both the camera part and the power battery module part. The control signal is amplified by the signal amplifier and then transmitted to the power driver. Adjust the external electric field strength E of the piezoelectric material according to the following formula to achieve the control of mechanical vibration: In the formula, E is the external electric field strength of the piezoelectric ceramic, and C3 and C4 are constants; Reduce the amplitude and frequency of the vibration through ① and ② to reduce the vibration comprehensive evaluation coefficient. When V≤1.49, it is regarded as the completion of mechanical vibration adjustment; (2) Environmental condition adjustment: ① The real-time temperatures of the camera, light source, industrial control computer, and power battery module are Tc, T L , T P , T B respectively. When it is detected that the real-time temperature exceeds the optimal operating temperature range of the corresponding component, then calculate η i : where i = C, L, P, B, T i represents the real-time temperature of the corresponding component represents the maximum or minimum value of the optimal operating temperature of the corresponding component; η i is the temperature evaluation index When η is greater than or equal to 5%, the temperature is regarded as unqualified, and the power of the fan or water cooling device at the corresponding component is adjusted until the real-time temperature of the corresponding component is within the optimal working temperature range: In the formula, P represents the power of the cooling device, P0 is the initial power of the device before adjustment, k3 is a constant, and η is the value at which adjustment is triggered; ② The relative humidity in the overall environment is RH, which is expressed as a percentage of the ratio of the actual water vapor pressure in the air to the saturated water vapor pressure at the current temperature, and is rounded to an integer; and the absolute humidity H of the camera, light source, industrial control computer, and power battery module part C 、H L 、H P 、H B , which refers to the mass of water vapor contained in a certain volume of air; When it is detected that the overall relative humidity RH or the absolute humidity Hi exceeds the optimal humidity range, then μ0 and μ are calculated i : where i = C, L, P, B, H i represents the real-time humidity of the corresponding component represents the maximum or minimum value of the optimal operating temperature of the corresponding component; μ0, μ i are humidity evaluation indicators When μ0 or μ i is greater than or equal to 12%, the humidity is regarded as unqualified, and the power of the dehumidification equipment is adjusted until the real-time humidity is within the optimal humidity range: P′ = P′0 + k4ln(μ i + 1)P′0 Wherein, P' represents the power of the dehumidification device, P'0 is the initial power of the device before adjustment, k4 is a constant, and i = 0, C, L, P, B; μ i is the value when triggering the adjustment; ③ Detect the particle concentration in the environment, and there is a dust evaluation index D: Among them, D50 is the median particle size, δg is the geometric standard deviation, and C5 and C6 are constants; when D≥1, it is regarded as the dust concentration exceeding the standard, and the dust removal device is started. When the dust evaluation index D≤0.9, the dust removal device stops working.

3. The detection method for surface defects of a power battery module according to claim 2, characterized in that, The assessment of the environmental quality is to determine whether the comprehensive vibration evaluation coefficient V≥1.49 is satisfied, or the temperature evaluation index η i ≥5%, or the humidity evaluation indexes μ0, μ i ≥12%, or the dust evaluation index D≥1. If so, it is regarded that the environmental quality is unqualified and the adjustment measures are triggered; if these indexes are all less than the specified values, the environmental quality is qualified and the next step is carried out.

4. The detection method for surface defects of a power battery module according to claim 1, wherein The implementation method of analyzing the noise contained in the image to obtain the noise type and noise intensity is as follows: First, detect the salt-and-pepper noise in the image T to be measured; then subtract the reference standard image P from the image to obtain an image N containing only noise, generate a gray histogram of the noise image N, and perform normalization processing; according to the data of the gray histogram and the distribution function of each type of noise, combined with the process characteristics during the production and grouping detection of the power battery module, detect the type and intensity of the noise contained.

5. The detection method for surface defects of a power battery module according to claim 4, wherein The noise type and noise intensity include: 1) Salt-and-pepper noise, that is, impulse noise, and its probability density function is: In the formula, z represents the gray value at a point (α,β) in the image T to be measured; a and b represent the maximum and minimum values of the gray values that the image can take, and take a = 255, b = 0; Select an 8*8 area within the range of the power battery module in the image T to be measured as the area to be measured. In this area, for the coordinates (i,j) of the pixel m to be measured and another pixel n in the area with coordinates (u,v), use d to represent the distance between them: d = ||(i,j)-(u,v)|| I represents the intensity difference between them, that is, the difference in pixel values: I = |Z(i,j) 2 -Z(u,v) 2 | In the formula, Z(i,j) and Z(u,v) represent the gray values of points m and n; The weight of the distance is expressed as: In the formula, represents the variance of the distances d from all other points in the area to be measured to the point m to be measured; A is the base of the exponential function and is determined according to the actual situation; The weight of the intensity difference is expressed as: In the formula, represents the variance of the intensity difference I between all other pixel points and the measured point m in the area to be measured; B is the base of the exponential function, which is determined according to the actual situation; Taking into account the influence of intensity and distance comprehensively, there is: where k is a constant, The larger the value of Thus, the number n of pixels with salt-and-pepper noise in the entire image is calculated i ; 2) The probability density function of Gaussian noise follows a normal distribution: Among them, σ is the standard deviation, σ 2 is the variance, and μ is the mean value of the gray value z; The probability density function of Rayleigh noise is: Its mean and variance are: The probability density function of gamma noise is: Its mean and variance are: The probability density function of exponential noise is: Its mean and variance are: Quantization noise, also known as uniform noise, and its probability density function is: Its mean and variance are: 3) T is the image to be measured, P is the reference standard image. Subtract the reference standard image P from the image T to be measured after the salt-and-pepper noise detection to obtain an image N containing only noise: N(u,v) = T(u,v) - P(u,v) The noise acts on the entire area of the image N. Select an area of 10*10 with relatively uniform gray values (that is, the minimum variance of gray values) within the range of the power battery module as the area to be measured t; Measure the gray value z of the area t to be measured t And the average gray value And perform normalization processing to make its average value That is: Then generate a gray histogram of the area to be measured t and perform normalization processing to prevent pixel points from overflowing the abscissa range, which is set to -0.1~1.1; Fit the normalized histogram data into a curve f(z t ), then f(z t ) is the result of the superposition or convolution operation of the distribution functions of various noises in (2), that is: Among them, μ1, μ2...μ5 represent the means of various noises respectively; σ1, σ2...σ5 represent the standard deviations of various noises respectively; A, B...E are constants; According to the characteristics of various noises in 2) and combined with the normalized histogram data, we have: 3.1) Gaussian noise is inevitable. If f(z t ) follows a normal distribution with a mean of 0.5, then there is only Gaussian noise, and the variance of the Gaussian noise can be calculated; otherwise, there are other noises; 3.2) When z t → 0, if f(z t ) ≠ 0, then there is exponential noise, and the variance and mean of the exponential noise can be obtained; otherwise, there is no exponential noise; 3.3) Due to the technological characteristics in the production and assembly inspection process of power battery modules, in the region of z t = 0 to 0.05, there are only Gaussian, gamma, and exponential noise distributions. According to the above 3.1) and 3.2), it can be determined whether gamma noise is contained; 3.4) If all noises exist, then: the mean of Gaussian noise = 0.5; when z t → 0, there is only exponential noise distribution; at z t = 0 to 1.0, the overall mean μ1 + μ2 + … + μ5 can be obtained from the fitted f(z t ); at z t = 0 to 0.05 region, there are only Gaussian, gamma, and exponential noise distributions; at z t = 0.95 to 1.0 region, there are only Gaussian, Rayleigh, and exponential noise distributions; according to the above conditions, combined with the fitted f(z t ), the means and variances of all noises can be calculated respectively.

6. The detection method for surface defects of a power battery module according to claim 5, characterized in that, The implementation method of using different denoising algorithms for different noises and adaptively adjusting noise reduction according to the noise intensity is as follows: (1) The mean filtering algorithm replaces the gray value of the pixel (u, v) at the center of the window with the average value of the gray values of all pixels within a local window. If the original image is g(u, v), then the filtered image is f(u, v), and the window size is M*N, that is: where j and k are integers and w(r, s) is the weight; According to the detection results of salt-and-pepper noise and combined with the actual situation of the power battery module: 1) The window size is adaptively adjusted as follows: where P(i) = n i / n T represents the noise intensity, n i is the number of detected noise points, and n T is the total number of pixels in the image T to be measured; [] represents the rounding function; 2) Redesign the weight w(r, s): w(r, s) = k w ·w(d)·w(I) w(d) represents the spatial distance from other points within the window to the center point. It represents the variance of the distances from other points to the center point; w(I) represents the degree of proximity of the gray values of other points within the window to the center point. It represents the variance of the differences in gray values between other points and the center point. In the formula, ε1 and ε2 are the bases of the exponential functions, which change according to the window size. ε1 = 2.1 + N / 7, ε2 = 2 + M / 8 k w is a constant for adjusting the size of the final result, then: 3) Apply the improved adaptive noise reduction algorithm only to the detected salt-and-pepper noise points to retain more image details and edges; (2) For Gaussian noise, the variance detection value is σ 2 , the non-local means denoising algorithm is adopted. According to the Gaussian noise detection situation, the following adjustments are made to adapt to the change of noise intensity: 1) The neighborhood size of the pixel point is 2r + 1. When σ 2 < 5, r = 1 is taken. When 5 ≤ σ 2 < 20, r = 2 is taken. When σ 2 ≥ 20, r = 3 is taken; 2) The smoothing coefficient in the weights is taken as h = 1.5ln(σ 2 ) = 3ln(σ); (3) Considering the on-site conditions and real-time requirements for the detection of the power battery module comprehensively, for gamma, Rayleigh, and exponential noises, a wavelet-domain denoising method is adopted. Since the mean and variance of each type of noise have been detected, according to the characteristics of the wavelet-domain denoising method, we have: When the standard deviation of the noise contained in the image ≤ 18, use the weighted hard threshold denoising method; When the standard deviation of the noise contained in the image is 18 - 45, use the weighted soft threshold denoising method; When the standard deviation of the noise contained in the image is greater than 45, use the adaptive new threshold method.

7. The detection method for surface defects of a power battery module according to claim 1, characterized in that The deep learning model is the Residual Network ResNet. The number of residual basic blocks is (3, 6, 8, 3), and each large-kernel convolution in the residual basic block is replaced by multiple small convolution kernels. First, use a 1x1 convolution layer for feature compression, then use a 3x3 convolution network for feature extraction, and then use a 1x1 convolution layer for feature expansion. The entire ResNe network has a total of 62 layers; at the same time, optimize the downsampling process: move the downsampling process to the 3x3 convolution on the left path. The convolution kernel can traverse all the information on the input feature map during the movement and has a certain overlap; at the same time, use max pooling instead of 1x1 convolution for downsampling on the right path.

8. The detection method for surface defects of a power battery module according to claim 1, wherein, The visualization output of the results includes: After completing the defect detection of the power battery module, add the Grad-CAM algorithm to generate a heat map of class activation to visualize the deep learning results. Randomly check the visualization results to further judge whether the evaluation model meets the expected effect, leaving room for subsequent optimization and improvement of the model. And when the working conditions and detection objects change, it can be used to judge the adaptability of the model to different environments; For class c, take the input y of the softmax layer c , take the partial derivative of the ij-th input pixel value of the k-th neuron in the last convolutional layer, and then perform global average pooling, from which the weight of the k-th neuron in the last convolutional layer can be obtained The inputs of different neurons in the last convolutional layer are multiplied by their respective neuron weights, and then the corresponding values of all neurons are summed up. Adding the ReLU function serves to retain the pixel values that play a positive role in classification and suppress the pixel values that play a negative role in classification. Finally, a rough heat map, that is, a classification localization map, is obtained. The formula is as follows:

9. A detection device for surface defects of a power battery module, characterized in that, It includes an industrial control computer with a program running the method described in any one of claims 1 - 8, as well as a camera connected to the industrial control computer for collecting the surface image of the power battery module and transmitting it to the industrial control computer, a light source for providing the collection illumination, a transmission device for transmitting the power battery module, a clamping device for clamping the defective power battery module, and a clamping device for flipping the power battery module.

Citation Information

Patent Citations

  • Improved adaptive weighted average image denoising method based on extreme learning machine

    CN106803237A

  • Optical remote sensing image processing performance evaluating method

    CN106960436A