A visual control method and system for battery surface defect detection

By analyzing ambient lighting and airflow parameters to adjust the visual illumination mode and movement speed, and combining historical control sets and model optimization to improve movement speed, the blurring problems caused by light source consumption and improper speed were solved, achieving efficient, clear, and reliable image acquisition for battery surface defect detection.

CN120741482BActive Publication Date: 2025-11-04TAIYUAN INST OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511195375.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-11-04
Estimated Expiration
2045-08-26

AI Technical Summary

Technical Problem

When there is sufficient light, turning on the corresponding light source consumes resources. At the same time, improper speed control of the image acquisition device leads to blurry and ghosting results, which cannot effectively guarantee the reliability of battery surface defect information.

Method used

By acquiring ambient lighting data and airflow parameters of the area to be detected, analyzing and adjusting the visual supplementary lighting mode and movement speed, and combining historical control sets and speed control models, the target movement speed is determined for defect detection.

Benefits of technology

Energy saving and consumption reduction have improved the reliability and accuracy of vision control, ensuring clear and accurate images of the battery surface and improving the accuracy and reliability of defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120741482B_ABST
    Figure CN120741482B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of control, and discloses a visual control method and system for battery surface defect detection, which comprises the following steps: acquiring environmental illumination data of a detection area; judging whether to start a visual light supplement mode according to an analysis result; determining a moving speed of the visual based on the judgment result; judging whether to adjust the moving speed based on the detection area and size data; determining a speed control index according to the number of airflow marks; comparing the speed control index with a historical control set; determining a control factor of the moving speed according to a judgment result; when it is judged that there is no data identical with the speed control index, determining the control factor based on the historical control set and a speed control model; and performing defect detection on the detection battery based on a target moving speed. The light supplement mode and the moving speed of the visual are controlled, and the reliability of defect detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of control, in particular to a visual control method and system for battery surface defect detection. BACKGROUND

[0002] Under the background of rapid development of new energy vehicles and energy storage power stations, the market demand for batteries is growing explosively, and the quality of batteries has become a key link in the development of the industry. Battery surface defects, such as scratches, dents, foreign matter attachment, and uneven coating, not only affect the appearance of the battery, but also cause internal short circuits, performance degradation, and even safety accidents. Therefore, it is particularly important to detect battery surface defects.

[0003] Chinese Patent Publication No. CN110441316B discloses a battery surface defect detection method and detection system, relating to the technical field of battery detection. The method includes: controlling a plurality of light sources to irradiate the surface of a battery corresponding to each detection station through a controller, and controlling an image acquisition device to acquire images of the surface of the battery corresponding to each detection station, and the controller processes the images of the surface of the battery acquired by the image acquisition device for at least one detection station to obtain surface defect information of each visual detection system. The controller controls the image acquisition device to acquire images of the surface of the battery, and processes the images of the surface of the battery through the controller to obtain surface defect information of the battery. As can be seen, in the case of sufficient light, turning on the corresponding light source for irradiation causes certain resource consumption. At the same time, when the controller controls the image acquisition device to acquire images of the surface of the battery, if the speed during acquisition is not controlled, the acquisition result will appear blurred and ghosted, which cannot effectively guarantee the reliability of the battery surface defect information.

[0004] Therefore, it is necessary to design a visual control method and system for battery surface defect detection to solve the problems in the current technology. SUMMARY

[0005] In view of this, the present application proposes a visual control method and system for battery surface defect detection, aiming to solve the problem that in the case of sufficient light, turning on the corresponding light source for irradiation causes certain resource consumption, and at the same time, when the controller controls the image acquisition device to acquire images of the surface of the battery, if the speed during acquisition is not controlled, the acquisition result will appear blurred and ghosted, which cannot effectively guarantee the reliability of the battery surface defect information.

[0006] In one aspect, the present application proposes a visual control method for battery surface defect detection, comprising:

[0007] The installation position of the vision is divided to determine a detection area, environment light data of the detection area is acquired, the environment light data is analyzed, it is judged whether to start the light compensation mode of the vision according to the analysis result, the moving speed of the vision is determined based on the judgment result;

[0008] The size data of the battery to be detected is acquired, it is judged whether to adjust the moving speed based on the detection area and the size data, when it is determined to adjust the moving speed, the airflow parameter of the detection area is acquired and an airflow identifier is generated, the speed control index is determined according to the identifier number of the airflow identifier, and the speed control index is recorded;

[0009] The speed control index and the historical control set are compared, it is judged whether there is the same data as the speed control index according to the historical control set, the control factor of the moving speed is determined according to the judgment result, when it is determined that there is no data same as the speed control index, the control factor is determined based on the historical control set and the speed control model;

[0010] The moving speed is adjusted according to the control factor, the target moving speed of the vision is determined, and the defective battery is detected based on the target moving speed.

[0011] Further, when the installation position of the vision is divided to determine the detection area, it includes:

[0012] The geometric center of the vision lens of the vision is taken as the center, and the conical space area with a radius of r and a height of d is formed along the direction of the vision lens;

[0013] The bottom circle of the conical space area is taken as a scanning area, the scanning area is divided into a plurality of scanning sub-areas, and each scanning sub-area is determined as the detection area.

[0014] Further, when the environment light data of the detection area is acquired and analyzed, and it is judged whether to start the light compensation mode of the vision according to the analysis result, it includes:

[0015] The detection area covered by a preset radius is taken as a control area, and the standard environment light intensity of the vision is acquired;

[0016] The environment light data of the control area is acquired, and the environment light intensity is determined by analyzing the environment light data;

[0017] When the environment light intensity is greater than or equal to the standard environment light intensity, it is determined that the light compensation mode of the vision is not started;

[0018] When the ambient light intensity is less than the standard ambient light intensity, it is determined to turn on the light compensation mode of the vision.

[0019] Further, the moving speed of the vision is determined based on the determination result;

[0020] The first preset moving speed and the second preset moving speed are preset, and the first preset moving speed is greater than the second preset moving speed;

[0021] When it is determined not to turn on the light compensation mode of the vision, the first preset moving speed is determined as the moving speed of the vision;

[0022] When it is determined to turn on the light compensation mode of the vision, the second preset moving speed is determined as the moving speed of the vision.

[0023] Further, when it is determined whether to adjust the moving speed based on the to-be-detected area and the size data, it includes:

[0024] When all the to-be-detected areas are greater than the size data, it is determined not to adjust the moving speed, the moving speed is determined as the target moving speed, and the to-be-detected battery is detected for defects at the target moving speed;

[0025] When all the to-be-detected areas are less than or equal to the size data, it is determined to adjust the moving speed.

[0026] Further, when the air flow parameters of the to-be-detected areas are obtained and the air flow identifiers are generated, the speed control index is determined according to the number of identifiers of the air flow identifiers, which includes:

[0027] The air flow parameters of each to-be-detected area are obtained and compared with the standard air flow parameters to generate air flow identifiers, and the air flow identifiers include air flow overflow identifiers, air flow standard identifiers and air flow attenuation identifiers;

[0028] When the air flow parameters of the to-be-detected area are greater than the standard air flow parameters, the air flow overflow identifier is generated for the corresponding to-be-detected area;

[0029] When the air flow parameters of the to-be-detected area are equal to the standard air flow parameters, the air flow standard identifier is generated for the corresponding to-be-detected area;

[0030] When the air flow parameters of the to-be-detected area are less than the standard air flow parameters, the air flow attenuation identifier is generated for the corresponding to-be-detected area;

[0031] The overflow number of the air flow overflow identifier is counted, the standard number of the air flow standard identifier is counted, and the attenuation number of the air flow attenuation identifier is counted;

[0032] obtaining an overflow number of powers of the natural exponential function e, denoted as a first gas flow rate, and an attenuation number of powers of the natural exponential function e, denoted as a second gas flow rate, determining a flow rate ratio of the first gas flow rate and the second gas flow rate, and determining the flow rate ratio as the speed control index.

[0033] Further, in determining the control factor of the moving speed according to the judgment result of whether there is the same speed control index as the speed control index in the historical control set, comprising:

[0034] The historical control set comprises a plurality of historical speed control indexes and a plurality of historical control factors, each historical speed control index corresponds to a historical control factor;

[0035] When the historical control set contains a historical speed control index identical to the speed control index, and the historical speed control index is unique, the historical control factor corresponding to the historical speed control index is taken as the control factor of the moving speed, otherwise, the average of the historical control factors corresponding to the same historical speed control index is taken as the control factor of the moving speed;

[0036] When the historical control set does not contain a historical speed control index identical to the speed control index, the control factor is determined based on the historical control set and the speed control model.

[0037] Further, in determining the control factor based on the historical control set and the speed control model, comprising:

[0038] Dividing the historical control set into a training set and a test set, searching for the hyperparameters of the neural network model by using grid search and establishing a neural network model, and taking the neural network model as an initial control model;

[0039] Training the initial control model according to the training set, and verifying the trained initial control model according to the test set to determine the mean square error;

[0040] If the mean square error of the current trained initial control model is greater than or equal to the mean square error of the previous trained initial control model, summing the absolute values of the model parameters of the current trained initial control model by L1 regularization, and summing the squares of the model parameters of the current trained initial control model by L2 regularization, adding the sum results of L1 regularization and L2 regularization as weight decay to the loss function of the current trained initial control model, and continuing to train until the mean square error of the trained initial control model is less than the mean square error of the previous trained initial control model;

[0041] If the mean square error of the current trained initial control model is less than that of the previous trained initial control model, the training is stopped, the current trained initial control model is determined as the speed control model, and the speed control index is substituted into the speed control model to determine the control factor.

[0042] Further, when adjusting the moving speed according to the control factor and determining the target moving speed of the vision, the method comprises:

[0043] The target moving speed is a product value of the control factor and the moving speed.

[0044] Compared with the prior art, the method has the beneficial effects that energy consumption is reduced, unnecessary energy consumption is avoided by collecting the ambient light data of the detection area and analyzing and controlling the light supplement mode, the reliability and accuracy of control are improved by considering the moving speed of the vision under different light supplement modes, the speed control index is determined in combination with the airflow identifier generated by the airflow parameter according to the size data to determine whether to control and adjust the moving speed, image blur and trailing are avoided due to improper speed, the collected battery surface image is clear and accurate, the accuracy and reliability of defect detection are improved, the battery quality is effectively guaranteed, the control factor of the moving speed is flexibly determined according to the comparison result by comparing the speed control index with the historical control set, and when a new speed control index appears, the control factor is generated by the historical control set and the speed control model, so that the historical control set is continuously enriched and updated, and the stability and flexibility of the vision control are improved.

[0045] In another aspect, the application also provides a vision control system for battery surface defect detection, which is used for the above-mentioned vision control method for battery surface defect detection, and comprises:

[0046] A first control module is configured to divide and determine the detection area according to the installation position of the vision, acquire the ambient light data of the detection area, analyze the ambient light data, determine whether to turn on the light supplement mode of the vision according to the analysis result, and determine the moving speed of the vision based on the determination result.

[0047] A second control module is configured to acquire the size data of the battery to be detected, determine whether to adjust the moving speed based on the detection area and the size data, acquire the airflow parameter of the detection area and generate an airflow identifier when it is determined to adjust the moving speed, determine a speed control index according to the identifier number of the airflow identifier, and record the speed control index.

[0048] The control processing module is configured to compare the speed control index with a historical control set, determine whether there is data identical to the speed control index according to the historical control set, determine a control factor of the moving speed according to a determination result, and determine the control factor based on the historical control set and a speed control model when it is determined that there is no data identical to the speed control index.

[0049] The control adjustment module is configured to adjust the moving speed according to the control factor, determine a target moving speed of the vision, and perform defect detection on the battery to be detected based on the target moving speed.

[0050] It can be understood that the battery surface defect detection vision control method and system have the same beneficial effects, which will not be described here. BRIEF DESCRIPTION OF DRAWINGS

[0051] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of the preferred embodiments and are not intended to limit the scope of the present application. Moreover, the same reference numerals are used throughout the same figures. In the drawings:

[0052] Figure 1 A flowchart of a battery surface defect detection vision control method provided by an embodiment of the present application;

[0053] Figure 2 A functional block diagram of a battery surface defect detection vision control system provided by an embodiment of the present application. DETAILED DESCRIPTION

[0054] Exemplary embodiments of the present disclosure will be described in detail with reference to the drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be accurately conveyed to those skilled in the art. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The present application will be described in detail below with reference to the drawings and in conjunction with the embodiments.

[0055] In some embodiments of the present application, referring to Figure 1 A battery surface defect detection vision control method, as shown in the figure, includes:

[0056] S100: divide the installation position of the vision, determine the detection area, obtain the ambient light data of the detection area, analyze the ambient light data, judge whether to start the light compensation mode of the vision according to the analysis result, and determine the moving speed of the vision based on the judgment result.

[0057] S200: obtain the size data of the battery to be detected, judge whether to adjust the moving speed based on the detection area and the size data, when it is determined to adjust the moving speed, obtain the air flow parameter of the detection area and generate the air flow identifier, determine the speed control index according to the identifier number of the air flow identifier, and record the speed control index.

[0058] S300: compare the speed control index with the historical control set, judge whether there is the same data as the speed control index according to the historical control set, determine the control factor of the moving speed according to the judgment result, when it is determined that there is no same data as the speed control index, determine the control factor based on the historical control set and the speed control model.

[0059] S400: adjust the moving speed according to the control factor, determine the target moving speed of the vision, and perform defect detection on the battery to be detected based on the target moving speed.

[0060] Specifically, the vision in this embodiment includes 2D cameras and 3D cameras. Due to different camera types and camera parameters of various 2D cameras and 3D cameras, there may be inconsistencies in the observed areas when scanning the battery surface. The installation position of the vision is divided to determine the detection area, which can clearly define the scanning range corresponding to each vision device, so as to comprehensively obtain the defect condition of the battery surface and ensure that each part of the battery surface can be effectively detected. The ambient light data of the detection area is obtained by the ambient light sensor and the like, and the data is analyzed to determine whether the current ambient light meets the detection requirements, avoiding excessive control of the vision to open the corresponding light compensation mode, and improving the stability and reliability of the vision control. At the same time, the moving speed of the vision is determined according to the condition of the ambient light. When the ambient light is sufficient, it may cause the image to have a brightness gradient. When the vision has different light sensitivities, it may be misjudged as a battery surface defect (such as scratches and uneven coating). Therefore, even if the light intensity is sufficient, the moving speed needs to be determined according to the condition of the ambient light to ensure that the subsequent collected images will not be blurred and have a trailing effect due to too fast speed. After obtaining the size data of the battery to be detected, it is determined whether to adjust the moving speed based on the detection area and the size data. Some large batteries may have a large surface area, and in order to ensure comprehensive detection, the moving speed may need to be controlled and adjusted. When it is determined that the moving speed needs to be adjusted, the airflow in the environment will form a certain pushing force or resistance, causing the moving speed of the vision to change, and the vision cannot be effectively controlled accurately. The airflow parameters of the detection area are obtained and an airflow identifier is generated. The speed control index is determined according to the number of identifiers. The more the number of identifiers, the greater the influence of the airflow, and the more complex the control requirements of the moving speed. The speed control index is recorded to ensure the adaptability and flexibility of the control. The speed control index and the historical control set are compared, and the control factor of the moving speed is determined according to the determination result. If there is no same data, the control factor is determined based on the historical control set and the speed control model through data analysis. The speed control model integrates experience data in different detection scenarios and can comprehensively consider the influence of various factors on the moving speed, so as to accurately determine the control factor. The moving speed is controlled and adjusted according to the control factor to realize accurate control of the vision and ensure the reliability of the defect detection.

[0061] It can be understood that the moving speed of the vision is determined and adjusted by comprehensively considering factors such as ambient light data, size data and airflow parameters, avoiding image blurring and trailing caused by improper speed, improving the stability and accuracy of the vision control, and determining the control factor based on the historical control set and the speed control model, so that the target moving speed can effectively cope with the influence of light environment and battery size, improving the intelligent level and reliability of the vision control.

[0062] In some embodiments of the present application, when the installation position of the vision is divided to determine the detection area, the method comprises: taking the geometric center of the vision lens of the vision as the center, extending along the direction of the vision lens, forming a conical space area with a radius of r and a height of d, taking the bottom circle of the conical space area as a scanning area, dividing the scanning area into a plurality of scanning sub-areas, and determining each scanning sub-area as a detection area.

[0063] Specifically, the conical space area is constructed with the geometric center of the vision lens as the center, which is based on the optical characteristics of the lens to define the detection area. The division of the scanning area makes the relative position and angle of each detection area and the vision lens fixed. At the same time, the division of the detection area facilitates the determination of the moving speed, reduces the adjustment time of the moving speed in the control process, and improves the overall control efficiency.

[0064] In some embodiments of the present application, when the ambient light data of the detection area is obtained and analyzed, and whether the light compensation mode of the vision is started is determined according to the analysis result, the method comprises: obtaining a control area covered by a preset radius, obtaining a standard ambient light intensity of the vision, obtaining ambient light data of the control area, and analyzing the ambient light data to determine the ambient light intensity. When the ambient light intensity is greater than or equal to the standard ambient light intensity, it is determined that the light compensation mode of the vision is not started. When the ambient light intensity is less than the standard ambient light intensity, it is determined that the light compensation mode of the vision is started.

[0065] In some embodiments of the present application, the moving speed of the vision is determined based on the judgment result. The first preset moving speed and the second preset moving speed are preset, the first preset moving speed is greater than the second preset moving speed, the first preset moving speed is determined as the moving speed of the vision when it is determined that the light compensation mode of the vision is not started, and the second preset moving speed is determined as the moving speed of the vision when it is determined that the light compensation mode of the vision is started.

[0066] Specifically, the area to be detected covered by the preset radius is recorded as a control area, and the preset radius is determined according to the use instruction of the vision, for example, the illumination range required by the vision is within 0.8r. The control area is demarcated by the preset radius, and the ambient light data of the control area is obtained by the ambient light sensor and the like, so as to determine the ambient light intensity. The standard ambient light intensity is also determined according to the use instruction of the vision. By comparing the ambient light intensity with the standard ambient light intensity, the on-off state of the light compensation mode of the vision is controlled, so as to avoid image overexposure or reflection caused by excessive illumination, reduce the influence of interference factors on the detection result, and timely control the vision to start the light compensation mode when the illumination is insufficient, thereby ensuring the image clarity. According to the judgment result of the light compensation mode, the preset moving speed is directly called. When the light compensation mode is not started, the advantage of short exposure under sufficient illumination is fully utilized, so that the vision is controlled to have a higher first preset moving speed as the moving speed, thereby shortening the detection time of the battery to be detected. When the light compensation mode is started, a lower second preset moving speed is used as the moving speed, so as to avoid motion blur caused by excessive speed while ensuring the image quality. The hierarchical control strategy enables the vision to respond to the detection environment under different illumination conditions, thereby improving the overall control reliability.

[0067] In some embodiments of the present application, when it is determined whether to adjust the moving speed based on the area to be detected and the size data, the following steps are included: when all the areas to be detected are greater than the size data, it is determined not to adjust the moving speed, the moving speed is determined as the target moving speed, and the battery to be detected is detected for defects at the target moving speed; and when all the areas to be detected are less than or equal to the size data, it is determined to adjust the moving speed.

[0068] Specifically, the comparison result of the area to be detected and the size data is used as the decision basis, so that the moving speed of the vision can be accurately adapted to the actual detection demand of the battery to be detected. The size data represents the actual detection area of the battery to be detected. When all the areas to be detected are greater than the size data, it indicates that the coverage range of the vision is sufficient, and the original moving speed can complete the defect detection. When all the areas to be detected are less than or equal to the size data, it indicates that the actual detection area of the battery to be detected is just covered or cannot be completely covered, so that the details of the battery to be detected need to be comprehensively analyzed. At this time, the moving speed of the vision needs to be controlled and adjusted to ensure that the vision can carefully scan the surface of the battery to be detected, so as to prevent the detection blind area caused by excessive speed, and improve the adaptability and flexibility of the control of the moving speed.

[0069] In some embodiments of the present application, when the air flow parameters of the to-be-detected areas are acquired and the air flow identifiers are generated, and the speed control index is determined according to the number of the air flow identifiers, the method comprises: acquiring the air flow parameters of each to-be-detected area, comparing the air flow parameters with standard air flow parameters, generating air flow identifiers, the air flow identifiers comprising air flow overflow identifiers, air flow standard identifiers and air flow attenuation identifiers, when the air flow parameters of the to-be-detected area are greater than the standard air flow parameters, generating an air flow overflow identifier for the corresponding to-be-detected area, when the air flow parameters of the to-be-detected area are equal to the standard air flow parameters, generating an air flow standard identifier for the corresponding to-be-detected area, when the air flow parameters of the to-be-detected area are less than the standard air flow parameters, generating an air flow attenuation identifier for the corresponding to-be-detected area, counting the overflow number of the generated air flow overflow identifiers, counting the standard number of the generated air flow standard identifiers, counting the attenuation number of the generated air flow attenuation identifiers, acquiring the overflow number of the natural exponential function e, denoted as the first air flow rate, and acquiring the attenuation number of the natural exponential function e, denoted as the second air flow rate, determining the flow ratio of the first air flow rate and the second air flow rate, and determining the flow ratio as the speed control index.

[0070] Specifically, by comparing the air flow parameters with the standard air flow parameters and generating corresponding air flow identifiers (air flow overflow identifiers, air flow standard identifiers and air flow attenuation identifiers), a digital characterization system of the air flow state is constructed, and the standard air flow parameters are determined according to the use instructions of the visual. The introduction of the natural exponential function amplifies the abnormal air flow (overflow / attenuation). When the air flow overflows or attenuates, a small air flow change may cause a mutation of the reflectivity characteristics of the battery surface. By amplifying the overflow number and the attenuation number through the exponential function, the visual has adaptive control ability when facing different degrees of air flow, and the balance between control accuracy and stability is achieved.

[0071] In some embodiments of the present application, when it is determined whether there is a same speed control index as the speed control index in the historical control set, and the control factor of the moving speed is determined according to the determination result, the method comprises: the historical control set comprises a plurality of historical speed control indexes and a plurality of historical control factors, each historical speed control index corresponds to a historical control factor, when there is a historical speed control index same as the speed control index in the historical control set, and the historical speed control index is unique, the historical control factor corresponding to the historical speed control index is taken as the control factor of the moving speed, otherwise, the average value of the historical control factors corresponding to the same historical speed control indexes is taken as the control factor of the moving speed, when there is no historical speed control index same as the speed control index in the historical control set, the control factor is determined based on the historical control set and the speed control model.

[0072] Specifically, by introducing the historical control set as a reference benchmark, the accuracy and automation level of control adjustment of the moving speed are improved, the current speed control index is compared with the historical control set, the adaptability to different control conditions is enhanced, when the same historical speed control index is found, the control factor can be directly determined by using these data, thereby ensuring the reliability and consistency of the control, for the case that the control condition does not completely match the historical control set, the control factor is determined based on the historical control set and the speed control model, the changes of different control conditions are coped with, the automation level and reliability of the control are improved through data-driven automatic adjustment, a large amount of historical data is comprehensively utilized to provide rich reference information for the determination of the control factor, and learning and optimization are performed in the process of accumulating the historical control set, thereby continuously improving the stability of the control of the moving speed.

[0073] In some embodiments of the present application, when the control factor is determined based on the historical control set and the speed control model, the historical control set is divided into a training set and a test set, the hyperparameters of a neural network model are searched for and the neural network model is established by using a grid search, the neural network model is taken as an initial control model, the initial control model is trained according to the training set, and the trained initial control model is verified according to the test set, the mean square error is determined, if the mean square error of the current trained initial control model is greater than or equal to the mean square error of the previous trained initial control model, the absolute values of the model parameters of the current trained initial control model are summed by L1 regularization, and the squares of the model parameters of the current trained initial control model are summed by L2 regularization, the summation results of the L1 regularization and the L2 regularization are added to the loss function of the current trained initial control model as weight decay, and the training is continued until the mean square error of the trained initial control model is less than the mean square error of the previous trained initial control model, if the mean square error of the current trained initial control model is less than the mean square error of the previous trained initial control model, the training is stopped, the current trained initial control model is determined as the speed control model, and the speed control index is substituted into the speed control model to determine the control factor.

[0074] Specifically, the historical control set is divided into a training set and a test set, with a division ratio of 7:3, ensuring that both the training set and the test set contain various data, thereby improving the generalization ability of the model. The grid search establishes a neural network model by exhaustively searching for hyperparameters in the parameter space. The neural network model is selected as the initial control model, which contains multiple layers, different types of neurons, and activation functions, aiming to capture complex relationships in the data. The training set is used to train the neural network model, and the test set is used to evaluate the performance of the trained model. After each training, the model attempts to learn patterns and relationships in the data to improve its prediction or classification ability. After each training, the model is validated using data from the test set, with the mean squared error as the validation indicator. The mean squared error is used to measure the performance of the model. L1 regularization and L2 regularization are used to prevent the initial control model from overfitting during training, avoiding the problem of the initial control model relying too much on training data and resulting in poor prediction on new data. L1 regularization sums the absolute values of the model parameters of the initial control model and adds them as weight decay to the loss function of the current trained initial control model, which helps feature selection and dimensionality reduction. L2 regularization sums the squares of the model parameters and adds them as weight decay to the loss function of the current trained initial control model, which helps reduce the complexity of the model and improve the generalization ability. By adding the regularization term (L1 and L2) to the loss function for optimization, the risk of overfitting of the initial control model being trained is avoided, improving the stability and accuracy of the model.

[0075] It can be understood that if the mean squared error of the current trained initial control model is less than that of the previous trained initial control model, the training is stopped, and the current trained initial control model is determined as the speed control model. By continuously optimizing the parameters of the initial control model, the determined speed control model can accurately output the control factor, improving the accuracy of control.

[0076] In some embodiments of the present application, when the moving speed is adjusted according to the control factor, the target moving speed of the vision is determined, including: the target moving speed is the product value of the control factor and the moving speed.

[0077] Specifically, the moving speed is adjusted according to the control factor, and when a higher or lower target moving speed is needed, the precise control of the moving speed is achieved through the adjustment of the control factor, improving the reliability and stability of the control process.

[0078] In summary, the application has the advantages of energy saving and consumption reduction: by collecting the ambient light data of the detection area and analyzing, the light compensation mode is controlled correspondingly to avoid unnecessary energy consumption, and the control reliability and accuracy are improved by considering the visual moving speed under different light compensation modes, the size data is used to determine whether to control and adjust the moving speed, the speed control index is determined in combination with the airflow identifier generated by the airflow parameter to avoid image blur and trailing caused by improper speed, ensure that the collected battery surface image is clear and accurate, improve the accuracy and reliability of defect detection, effectively guarantee the battery quality, compare the speed control index with the historical control set, and flexibly determine the control factor of the moving speed according to the comparison result. When a new speed control index appears, the control factor is generated by means of the historical control set and the speed control model, so as to constantly enrich and update the historical control set, and improve the stability and flexibility of visual control.

[0079] In another preferred mode based on the above embodiment, referring to Figure 2 The battery surface defect detection visual control system is used for applying the battery surface defect detection visual control method, and includes:

[0080] The first control module is configured to divide and determine the detection area according to the installation position of the visual, acquire the ambient light data of the detection area, analyze the ambient light data, determine whether to start the light compensation mode of the visual according to the analysis result, and determine the moving speed of the visual based on the determination result.

[0081] The second control module is configured to acquire the size data of the battery to be detected, determine whether to adjust the moving speed based on the detection area and the size data, acquire the airflow parameter of the detection area and generate an airflow identifier when it is determined to adjust the moving speed, determine a speed control index according to the identifier number of the airflow identifier, and record the speed control index.

[0082] The control processing module is configured to compare the speed control index with the historical control set, determine whether there is data identical to the speed control index according to the historical control set, and determine the control factor of the moving speed according to the determination result.

[0083] The control adjustment module is configured to adjust the moving speed according to the control factor, determine the target moving speed of the visual, and perform defect detection on the battery to be detected based on the target moving speed.

[0084] Those skilled in the art will appreciate that embodiments of the application can be supplied as a method, a system or a computer program product. Accordingly, the application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the application can be embodied in the form of a computer program product on one or more computer readable storage media (including, without limitation, magnetic disks; optical disks; magneto-optical disks; ROMs; flash memory; etc.) having computer usable program code embodied therein.

[0085] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks.

[0086] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks.

[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks.

[0088] Finally, it should be noted that the above-mentioned embodiments are merely intended for describing the technical solutions of the present application, but not for limiting the same. Although the present application is described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalent replaced without departing from the spirit and scope of the present application, and any modification or equivalent replacement should be covered within the scope of protection of the claims of the present application.

Claims

1. A visual control method for detecting surface defects of a battery, characterized by, The method comprises the following steps: dividing the installation position of the vision to determine the detection area, obtaining the ambient light data of the detection area, analyzing the ambient light data, judging whether to start the light compensation mode of the vision according to the analysis result, and determining the moving speed of the vision based on the judgment result; obtaining the size data of the battery to be detected, judging whether to adjust the moving speed based on the detection area and the size data, obtaining the air flow parameter of the detection area and generating an air flow identifier when it is determined to adjust the moving speed, determining a speed control index according to the number of identifiers of the air flow identifier, and recording the speed control index; comparing the speed control index with the historical control set, judging whether there is the same data as the speed control index according to the historical control set, determining the control factor of the moving speed according to the judgment result, and determining the control factor based on the historical control set and the speed control model when it is determined that there is no data same as the speed control index; adjusting the moving speed according to the control factor, determining the target moving speed of the vision, and performing defect detection on the battery to be detected based on the target moving speed; when obtaining the air flow parameter of the detection area and generating an air flow identifier, and determining a speed control index according to the number of identifiers of the air flow identifier, the method comprises the following steps: obtaining the air flow parameter of each detection area and comparing it with the standard air flow parameter to generate an air flow identifier, wherein the air flow identifier comprises an air flow overflow identifier, an air flow standard identifier and an air flow attenuation identifier; when the air flow parameter of the detection area is greater than the standard air flow parameter, the air flow overflow identifier is generated for the corresponding detection area; when the air flow parameter of the detection area is equal to the standard air flow parameter, the air flow standard identifier is generated for the corresponding detection area; when the air flow parameter of the detection area is less than the standard air flow parameter, the air flow attenuation identifier is generated for the corresponding detection area; counting the overflow number of the air flow overflow identifier, the standard number of the air flow standard identifier, and the attenuation number of the air flow attenuation identifier; obtaining the overflow number of the natural exponential function e, denoted as the first air flow rate, and obtaining the attenuation number of the natural exponential function e, denoted as the second air flow rate, determining the flow ratio of the first air flow rate and the second air flow rate, and determining the flow ratio as the speed control index.

2. The visual control method of battery surface defect detection according to claim 1, wherein, when dividing the installation position of the vision to determine the detection area, the method comprises the following steps: taking the geometric center of the vision lens of the vision as the center, extending along the direction of the vision lens to form a conical space area with a radius r and a height d; taking the bottom circle of the conical space area as a scanning area, dividing the scanning area into a plurality of scanning sub-areas, and determining each scanning sub-area as the detection area.

3. The visual control method of battery surface defect detection according to claim 2, wherein, when obtaining the ambient light data of the detection area and analyzing the ambient light data, and judging whether to start the light compensation mode of the vision according to the analysis result, the method comprises the following steps: Obtaining the area to be detected covered by the preset radius as a control area, and obtaining a standard ambient light intensity of the vision; Obtaining the ambient light data of the control area, and analyzing the ambient light data to determine an ambient light intensity; When the ambient light intensity is greater than or equal to the standard ambient light intensity, it is determined that the light compensation mode of the vision is not started; When the ambient light intensity is less than the standard ambient light intensity, it is determined that the light compensation mode of the vision is started.

4. The visual control method of battery surface defect detection according to claim 3, wherein, Determining the moving speed of the vision based on the determination result; Pre-setting a first preset moving speed and a second preset moving speed, the first preset moving speed being greater than the second preset moving speed; When it is determined that the light compensation mode of the vision is not started, the first preset moving speed is determined as the moving speed of the vision; When it is determined that the light compensation mode of the vision is started, the second preset moving speed is determined as the moving speed of the vision.

5. The visual control method of battery surface defect detection according to claim 4, wherein, When determining whether to adjust the moving speed based on the area to be detected and the size data, comprising: When all the areas to be detected are greater than the size data, it is determined that the moving speed is not adjusted, the moving speed is determined as a target moving speed, and the target moving speed is used for defect detection of the battery to be detected; When all the areas to be detected are less than or equal to the size data, it is determined that the moving speed is adjusted.

6. The visual control method of battery surface defect detection according to claim 5, wherein, When determining the control factor of the moving speed according to the historical control set and the determination result of whether there is the same speed control index as the speed control index, comprising: The historical control set includes a plurality of historical speed control indexes and a plurality of historical control factors, each historical speed control index corresponds to a historical control factor; When the historical control set includes a historical speed control index identical to the speed control index, and the historical speed control index is unique, the historical control factor corresponding to the historical speed control index is used as the control factor of the moving speed, otherwise, the average of the historical control factors corresponding to the same historical speed control index is used as the control factor of the moving speed; When the historical control set does not include a historical speed control index identical to the speed control index, the control factor is determined based on the historical control set and a speed control model.

7. The visual control method of battery surface defect detection according to claim 6, wherein, When the control factor is determined based on the historical control set and the speed control model, comprising: Dividing the historical control set into a training set and a test set, finding the hyperparameters of a neural network model by grid search and establishing the neural network model, and using the neural network model as an initial control model; Training the initial control model according to the training set, and verifying the trained initial control model according to the test set to determine the mean square error; If the mean square error of the current trained initial control model is greater than or equal to the mean square error of the previous trained initial control model, the absolute values of the model parameters of the current trained initial control model are summed by L1 regularization, and the squares of the model parameters of the current trained initial control model are summed by L2 regularization, the sum of L1 regularization and the sum of L2 regularization are added to the loss function of the current trained initial control model as weight decay, and the training is continued until the mean square error of the trained initial control model is less than the mean square error of the previous trained initial control model; If the mean square error of the current trained initial control model is less than the mean square error of the previous trained initial control model, the training is stopped, the current trained initial control model is determined as the speed control model, and the speed control index is substituted into the speed control model to determine the control factor.

8. The visual control method of battery surface defect detection according to claim 7, wherein, In the process of adjusting the moving speed according to the control factor and determining the target moving speed of the vision, the following steps are included: The target moving speed is the product of the control factor and the moving speed.

9. A visual control system for battery surface defect detection for applying the visual control method for battery surface defect detection according to any one of claims 1 to 8, characterized by, The following steps are included: The first control module is configured to divide the installation position of the vision to determine a to-be-detected area, acquire environmental light data of the to-be-detected area, analyze the environmental light data, judge whether to start a light compensation mode of the vision according to an analysis result, and determine a moving speed of the vision based on a judgment result. The second control module is configured to acquire size data of a to-be-detected battery, judge whether to adjust the moving speed based on the to-be-detected area and the size data, acquire an air flow parameter of the to-be-detected area and generate an air flow identifier when it is determined to adjust the moving speed, determine a speed control index according to an identifier number of the air flow identifier, and record the speed control index. The control processing module is configured to compare the speed control index with a historical control set, judge whether there is same data as the speed control index according to the historical control set, determine a control factor of the moving speed according to a judgment result, and determine the control factor based on the historical control set and a speed control model when it is determined that there is no same data as the speed control index. The control adjustment module is configured to adjust the moving speed according to the control factor, determine a target moving speed of the vision, and perform defect detection on the to-be-detected battery based on the target moving speed.

Citation Information

Patent Citations

  • Battery Surface Defect Detection Method and System

    CN110441316B

  • Casting product appearance defect detection method and system based on machine vision

    CN119223984A

  • Inline inspection system for stamping part, visual inspection device, and inspection method and apparatus

    WO2025162292A1