[go: up one dir, main page]

CN117968772A - Power battery surface defect detection method, system and use method - Google Patents

Power battery surface defect detection method, system and use method Download PDF

Info

Publication number
CN117968772A
CN117968772A CN202410354802.6A CN202410354802A CN117968772A CN 117968772 A CN117968772 A CN 117968772A CN 202410354802 A CN202410354802 A CN 202410354802A CN 117968772 A CN117968772 A CN 117968772A
Authority
CN
China
Prior art keywords
plc
detection
serial number
battery
point cloud
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410354802.6A
Other languages
Chinese (zh)
Other versions
CN117968772B (en
Inventor
王云峰
王亚山
石光耀
李睿杨
初琦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yiqi Technology Jilin Co ltd
Original Assignee
Yiqi Technology Jilin Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yiqi Technology Jilin Co ltd filed Critical Yiqi Technology Jilin Co ltd
Priority to CN202410354802.6A priority Critical patent/CN117968772B/en
Publication of CN117968772A publication Critical patent/CN117968772A/en
Application granted granted Critical
Publication of CN117968772B publication Critical patent/CN117968772B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D21/00Measuring or testing not otherwise provided for
    • G01D21/02Measuring two or more variables by means not covered by a single other subclass
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/36Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]
    • G01R31/385Arrangements for measuring battery or accumulator variables
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/50Testing of electric apparatus, lines, cables or components for short-circuits, continuity, leakage current or incorrect line connections
    • G01R31/66Testing of connections, e.g. of plugs or non-disconnectable joints
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/054Input/output
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B21/00Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
    • G08B21/18Status alarms
    • G08B21/185Electrical failure alarms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Pathology (AREA)
  • Immunology (AREA)
  • Biochemistry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Analytical Chemistry (AREA)
  • Chemical & Material Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Emergency Management (AREA)
  • Business, Economics & Management (AREA)
  • Electromagnetism (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

A method, a system and a use method for detecting surface defects of a power battery belong to the technical field of machine vision, and comprise the following steps: point cloud analysis, defect detection, PLC control and alarm; the invention comprises the following steps: the laser contour sensor, the scanning camera, the photoelectric sensor and the network stroboscopic alarm realize comprehensive detection of the surface defects of the power battery, the concurrency and the stability of the system are improved through the parallel-working multithreading architecture and the rapid timer interrupt triggering, the hardware layout and the algorithm are adjusted aiming at the stop line scene, the stop line condition is effectively avoided, the use stability of the system is further improved, and the detection efficiency is further improved.

Description

Power battery surface defect detection method, system and use method
Technical Field
The invention relates to the technical field of machine vision, in particular to a method and a system for detecting surface defects of a power battery.
Background
In the production process of the power batteries, a plurality of power batteries are tightly assembled together after being insulated to form a power module for the continuous voyage of the automobile. Therefore, the surface of the power battery needs to be insulated, the power battery which is not effectively insulated easily causes battery leakage, explosion and the like after being assembled, defects are easily formed when the single power battery is insulated, the defective battery cannot participate in the assembly of the power module, and the visual-based power battery appearance detection system is provided for effectively screening the power battery with the defects.
Because the power battery detection system is mainly deployed on an industrial production line, defects of the power battery with defects are identified and marked under the condition of not interfering with production, and finally the defects are detected through a mechanical arm, the software and the production are required to be decoupled, and the integrated multiple devices are mutually communicated, and most importantly, the system meets the production beat of the production line, and under the condition of meeting the constraint, how to ensure the high detection speed and reliable detection results are one of the difficulties of the current power battery industrial detection.
And reliability is the first gist for industrial production. When the detection quantity of the power batteries increases, the situation that the detection system cannot be blocked or the memory overflows is a second difficulty in the current power battery industry detection.
Disclosure of Invention
In order to solve the above-mentioned difficulties presented in the background art, the embodiment of the invention provides a method and a system for detecting surface defects of a power battery. The technical scheme is as follows:
in one aspect, a method for detecting a surface defect of a power battery is provided, the method is implemented by an electronic device, and the method includes the following steps:
And (3) point cloud analysis: acquiring battery point cloud data and a battery serial number, analyzing the battery point cloud data and the battery serial number, and transmitting the data to a defect detection thread for defect detection through TCP connection;
defect detection: calling a defect detection function to detect, and sending a defect detection result to a PLC control class thread to carry out PLC control by using an S7 protocol;
PLC control: according to the defect detection result, the battery serial number is called, and the physical equipment is controlled to detect the defective battery;
and (3) alarming: periodically detecting a PLC variable to judge whether the PLC is disconnected, and controlling an alarm thread to alarm through HTTP when the PLC is disconnected; when the PLC is reconnected, the control alarm class thread ends the alarm.
Preferably, the detection results respectively send the good product results to the PLC thread and the defect results to the PLC thread.
Preferably, the point cloud analysis may generate a stop line scene including:
stopping the first line to obtain incomplete point cloud data and a battery serial number;
Stopping the second line to obtain incomplete point cloud data;
Stopping the line, and obtaining no point cloud and no battery serial number;
And stopping the line four, and obtaining the space point cloud but not obtaining the battery serial number.
Preferably, the point cloud parsing includes: after the point cloud analysis is completed and the serial number registration is requested, if no serial number exists in the queue, directly returning to the point cloud analysis, and ending; if more than 1 serial number exists in the queue, only reserving the last 1 serial number, returning the serial number in the queue, and ending; if there is only one sequence number in the queue, the current sequence number is returned directly and ended.
Preferably, the storing method of the serial number comprises the following steps:
s1, generating a unique result file path according to the serial number of a detected battery;
S2, judging whether the generated result file exists or not, if the file does not exist, continuing the next step; if the file exists, deleting the original file, and then recreating a new file;
s3, serializing information such as a battery serial number, a detection state and the like in the detection result structure body into a JSON object;
S4, writing the serialized JSON strings into result files respectively according to the detection state, writing the normal result into one file, and writing the abnormal result into the other file, wherein the JSON strings of the abnormal result files additionally contain coordinate information of an abnormal detection area;
s5, opening the file and writing the character string content into the file in an additional writing mode;
S6, closing the file.
Preferably, the periodic detection is triggered by interrupting the detection function of the detection system by a timer, and the battery point cloud data and the battery serial number to be detected need to be read from a specified data structure after the timer is interrupted once, and then the next detection operation is performed.
Preferably, the interrupt time of the timer is 100ms, and the timer is triggered every 100ms to perform the data reading operation.
In another aspect, a system for detecting surface defects of a power battery is provided, and the system is applied to a method for detecting surface defects of a power battery, and the device comprises: the method comprises a point cloud analysis class, a defect detection class, an algorithm class and an alarm class.
Preferably, the point cloud analysis class includes LMI line laser profile sensor, kine scanning camera SR-2000 and West WT34 photosensor.
Preferably, the alarm class thread includes An Xunshi D4100-E network strobe alarms.
Preferably, the point cloud parsing class further includes an encoder.
Preferably, the detection system is developed based on a Qt and OpenCV framework, adopts a multithreading architecture described by a UML timing diagram, and performs communication between threads through Qt signals and a slot mechanism.
Preferably, the PLC class performs communication control with the physical device through an S7 protocol according to the detection result.
Preferably, the physical device is a mechanical arm.
In another aspect, a method for using a power battery surface defect detection system is provided, including the steps of:
Updating the IP address of the camera and connecting;
Initializing a timer;
Updating the IP of the alarm and connecting the alarm;
Updating the PLC IP and connecting the PLC; receiving data;
a timer interrupt response function; releasing the detection signal;
detecting a response;
Refreshing an interface;
storing results;
Issuing a PLC instruction: the detection result is issued to the PLC, so that the PLC performs control operation according to whether the battery is abnormal or not, such as grabbing the battery;
PLC connection polling: the function is independent from the detection thread, read and write signals to the CPU fixed position of the PLC every 1s through a timer, so as to ensure the connection state with the PLC, the polling operation is judged according to whether the read and write are successful, if the read and write are unsuccessful, an alarm instruction is immediately issued to the alarm, at the moment, the alarm buzzer is opened to prompt the producer to disconnect the detection software from the PLC, the detection software tries to be reconnected with the PLC, and when the detection software is connected with the PLC in a recovery way or the state of the read and write is always kept successful, the buzzer of the alarm is closed;
Circularly detecting;
the system is shut down.
In another aspect, an electronic device is provided, the electronic device including a processor and a memory, the memory storing at least one instruction, the at least one instruction loaded and executed by the processor to implement the above-described method for detecting a surface defect of a power battery.
In another aspect, a computer readable storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement a power cell surface defect detection method as described above is provided.
The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:
The invention comprises the following steps: LMI line laser contour sensor, kidney scanning camera SR-2000 and Sirk WT34 photoelectric sensor, and An Xunshi D4100-E network stroboscopic alarm as alarm class thread, realize the comprehensive detection to power battery surface defect, through the multithread framework of parallel work and quick timer interrupt trigger, can accomplish the detection of a large amount of batteries in a short time, improved detection efficiency.
The timer and the regular detection function can monitor the connection state of the PLC, and once the PLC is disconnected, the alarm thread can be controlled by the HTTP to send out an alarm so as to take measures in time to solve the problem, realize quick response of abnormal conditions, and perform corresponding alarm and reconnection operation, thereby ensuring the stability and continuity of the system.
According to the invention, special conditions in a stop line scene III are effectively solved and the detection efficiency of the power battery is improved through a serial number processing method, a result storage method and a thread separation and signal and slot communication mechanism.
The system provided by the invention is developed based on the Qt and OpenCV frames, adopts a multithreading architecture described by UML timing diagrams, and communicates threads through a Qt signal and a slot mechanism, so that the concurrency and stability of the system are improved, the system can be conveniently expanded and upgraded, the hardware layout and algorithm are adjusted according to the shutdown scene, the shutdown condition is effectively avoided, and the use stability of the system is further improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system for detecting surface defects of a power battery according to the present invention;
FIG. 2 is a UML timing diagram of a communication framework of a power cell surface defect detection system provided by the present invention;
FIG. 3 is a UML timing diagram of the CC22/23 communication framework of the present invention;
FIG. 4 is a schematic diagram of a CC24 hardware assembly of the present invention;
Fig. 5 is a UML timing diagram of the CC24 communication framework of the present invention.
Fig. 6 is a logic diagram of sequence number usage in a shutdown scenario of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages to be solved more apparent, the following detailed description will be given with reference to the accompanying drawings and specific embodiments.
A power battery surface defect detection system, which relates to hardware comprising:
LMI line laser profile sensor: scanning the point cloud on the surface of the power battery, and transmitting the point cloud to a detection end for defect detection. The laser sensor has an SDK with rich and complete C++ version, is convenient to control, and is also based on TCP/IP protocol with the bottom communication mode of the detection system end.
Kidney scanning camera SR-2000: the serial number at the bottom of the power battery is scanned, the serial number can be a two-dimensional code, the serial number of the power battery is obtained and used for identifying different power batteries, and the control mode of the camera also complies with the TCP/IP protocol.
Mechanical arm: the control mode of the mechanical arm is in accordance with the S7 protocol of the PLC.
An Xunshi D4100-E network strobe alarm: in the production process, when the mechanical arm is disconnected with the communication of the detection end, the alarm strobes and sounds along with the mechanical arm to remind on-site personnel to check the connection. The control mode of the strobe alarm follows the HTTP protocol and calls the CGI interface.
Sick WT34 photosensor: in the production process, the arrival of a power battery in the production line is monitored, and when the arrival of the power battery, the output level is converted and used for triggering an LMI line laser profile sensor and an Enshi scanning camera SR-2000.
An encoder: the power battery for the LMI line laser contour sensor to scan and move at variable speed ensures that the scanned surface point cloud is more stable.
Since the system is used for industrial production, reliability is the first significance, and when the detection quantity of the power batteries is increased, the detection system cannot be blocked or the memory overflows, so that the detection system can efficiently operate the underlying system to accelerate the detection speed. Preferably, the project detection system is developed using a c++ based Qt framework, corresponding to the version: qt5.12.12.Qt provides rich UI components and interface design tools, can conveniently create a user-friendly interface, provides strong multithreading support, and can realize concurrent processing and asynchronous operation.
And carrying out data analysis on different defects of the power battery, wherein the different defects correspond to different detection modes. The defects are different according to the distribution positions of the defects, the expression forms are different in a sample graph, and in addition, the operations of sample enhancement, filtering and the like at the pixel level are needed by external factors such as line jitter and the like, and the accuracy and the rapidity of detection are considered, so that the project detection algorithm part uses the C++ based OpenCV vision library to realize efficient image processing and algorithm calculation.
As shown in fig. 1, a method for detecting surface defects of a power battery includes the following steps:
And (3) point cloud analysis: acquiring battery point cloud data and a battery serial number, analyzing the battery point cloud data and the battery serial number, and transmitting the data to a defect detection thread for defect detection through TCP connection;
Defect detection: the defect detection function is called for detection, and an S7 protocol is used for sending a defect detection result to a PLC thread for PLC control, specifically: the good product result is sent to a PLC thread, and the defect result is sent to the PLC thread; the defect detection function can judge the defect condition, and preferably, the related detection steps can be referred to the patent of the invention for new energy battery surface defect detection method and device, and the authorization notice is: CN116958137B, comprising: 1. acquiring basic image information; 2. extracting an ROI region, performing image dimension reduction treatment, correcting the transverse inclination of an image, and removing an edge longitudinal shaking extraction region substrate; 3. the extraction area substrate comprises an area substrate for extracting a middle area from the data and an area substrate for extracting an edge area from the data; 4. taking an absolute value of a drop characteristic map with a substrate; 5. performing binarization processing on the fall characteristic map; 6. the step height feature map is subjected to binarization processing, wherein the step height feature map is subjected to binarization processing by using a fixed threshold value to cut obvious defects, a gray value corresponding to 0.1mm is used as a dividing limit, the adaptive binarization of opencv is used, the parameter size of the step height feature map is properly regulated, and small defects are divided by fine granularity; 7. performing contour retrieval, extracting relevant defect characteristics, and judging and outputting defect information according to multiple parameters: extracting relevant defect characteristics, and judging and outputting defect information according to multiple parameters; and (3) carrying out contour retrieval from large to small according to the binarization graph, taking each contour as a mask to obtain corresponding data from the feature graph and the original graph, extracting a plurality of feature composition discriminators capable of distinguishing whether the contour is a defect, combining multiple parameters to judge whether the contour is a real defect, and outputting relevant information such as area and height defect.
PLC control: according to the defect detection result, the battery serial number is called, and the physical equipment is controlled to detect the defective battery, preferably, the physical equipment is a mechanical arm;
and (3) alarming: periodically detecting a PLC variable to judge whether the PLC is disconnected, and controlling an alarm thread to alarm through HTTP when the PLC is disconnected; when the PLC is reconnected, the control alarm class thread ends the alarm.
The method comprises the following steps: the point cloud analysis, detection and display signal functions respectively work under different threads, so that the power battery collected by each line of laser contour sensor can be detected under the condition of speeding up the production takt, decoupling among the functions of point cloud analysis, algorithm detection and interface display is facilitated, and communication among the threads is performed through a mechanism of Qt signals and grooves.
As shown in fig. 2, after the point cloud analysis class successfully analyzes the point cloud data, an analysis success signal is sent to the PLC class; after receiving the analysis success signal, the PLC class requests the serial number of the single battery from the detection class; the detection class returns the corresponding serial numbers of the single batteries to the PLC class after receiving the request; the PLC class acquires the serial number and then transmits the serial number to the algorithm detection class for detection calculation; returning the result to the PLC class after the detection and calculation of the algorithm detection class are completed; after the PLC receives the detection result, if the result is a defect, the result is sent to a physical device to detect the defective battery, and the physical device is a mechanical arm. The PLC class can communicate with the alarm class regularly in order to judge whether to disconnect with the PLC in order to judge, if the alarm fails to establish the connection with the PLC for a long time, then the alarm class can initiatively send out alarm signal, suggestion communication abnormal conditions.
Further, in order to explain how the invention ensures the reliability and efficiency of the power battery detection, the detection processes of different production lines, the functions of the PLC and the working mechanism of the alarm are refined. The communication architecture of the present invention is divided into two types of CC22/CC23 and CC24 production lines, and the detailed description of the CC24 production line, the CC22/CC23 production line architecture design and the corresponding hardware configuration is given below. One of the values is that CC22 and CC23 are 2 independent lines, but the same communication mode is used. The design of CC22 and CC23 can promote detection efficiency, and when a production line stops the line, another production line still can work, has promoted the reliability that detects.
As shown in fig. 3, the CC22/23 production line requires communication hardware: LMI line laser contour sensor, arm, an Xunshi D4100-E network stroboscopic alarm, each need communication hardware to dispose the IP address of LAN, CC22/23 production line testing process: the detection software receives the point cloud transmitted by the LMI line laser contour sensor, analyzes the point cloud and transmits the point cloud to the algorithm interface, and the algorithm transmits the result to the mechanical arm after detecting and writes the picture result into the appointed path.
The main functions of the PLC are that the obtained serial numbers and the result of the detection software are issued to the PLC, so that the PLC operates the mechanical arm to act.
The detection software takes the acquisition of the point cloud of the power battery and the analysis and detection as the primary task, so that the thread where the point cloud analysis class is located runs through the software, the thread where the PLC class is located is requested to acquire the current serial number only after the software analyzes the latest point cloud, and the serial number and the analyzed pictures are packed to the thread where the detection class is located. After the detection of the detection class is finished, the result is sent to a thread where the PLC class is located through a mechanism of a signal and a slot, the PLC class receives the result and sends the result to the CPU through an S7 protocol, and a complete communication process is completed.
As for the alarm class, which also works independently in an independent thread, the alarm class periodically detects a corresponding field in the PLC class because it can indicate whether the S7 protocol is disconnected. When the field indicates that the PLC is disconnected, the alarm class sends Json corresponding to the operation of the alarm to the CGI interface through the HTTP protocol, and the alarm sounds and is accompanied by stroboscopic; when this field indicates that the PLC is restored to connection, the alarm is controlled to stop operating in the same manner.
As shown in fig. 4, the CC24 production line requires hardware for communication: LMI line laser profile sensor, kidney scanning camera SR-2000.
CC24 production line detection process: the power battery passes through the Sick photoelectric sensor, the photoelectric sensor converts the output level, and the rising edge triggers the LMI line laser contour sensor and the Kidney scanning camera SR-2000. At the moment, the LMI line laser contour sensor starts to scan the passing power battery surface point cloud, and the Kidney scanning camera SR-2000 scans the serial number at the bottom of the power battery to obtain the serial number of the power battery. In an ideal state, the point cloud information and the serial number appear in pairs, the detection software analyzes the transmitted point cloud, invokes an algorithm, detects the power battery, and writes the detection result into a specified path.
Because the CC24 production line is not connected with the PLC, the condition that the PLC network is disconnected is difficult to occur, and therefore, the detection communication frame of the production line only relates to the line laser profile sensor and the Kidney scanning camera.
The method comprises the following steps: LMI line laser profile sensor: when the trigger signal of the Sik photoelectric sensor is received, the scanning of the power battery surface point cloud is started, the scanning time is fixed, no trigger signal is received in the scanning time, preferably, the interrupt time of the timer is 100ms, namely, the timer is triggered once every 100ms, and the data reading operation is performed.
Kidney scanning camera SR-2000: and when a trigger signal of the Sik sensor is received, the serial number at the bottom of the power battery is started to be scanned, the scanning time is fixed, and the same serial number is not repeatedly scanned in the scanning time.
According to the specific production situation, the following stop line scenes and corresponding solutions are summarized:
The stop line one and the code scanning camera scan the serial number but the battery main body does not completely pass through the depth camera, and the result is that: incomplete point cloud data and battery serial numbers are obtained, and the solution is as follows: judging the incomplete point cloud, namely judging the integrity of the point cloud data to determine whether the battery passes through the depth camera.
The second stop line and the code scanning camera do not scan the serial number, and the battery main body does not completely pass through the depth camera, so that the result is that: incomplete point cloud data are obtained, and the solution is as follows: judging the incomplete point cloud, namely judging the integrity of the point cloud data to determine whether the battery completely passes through the depth camera.
The three-wire stop and the battery body do not pass through the photoelectric switch, and the result is that: the point cloud is not obtained, and the battery serial number is not obtained, and the solution is as follows: without solving the problem.
Stopping line IV, the battery main part is through photoelectric switch but not to the depth camera, obtains the space point cloud but not obtain the battery serial number, and the solution is: and judging the null point cloud, namely judging whether the battery reaches the depth camera or not by judging whether the null point cloud data are null or not.
It is worth mentioning that one special situation in the stop line scene three occurs in actual production: when two power batteries are adjacent too close, a third scene appears after line stopping, and when the production line is started again, the rear power battery firstly triggers the Kidney scanning camera through the photoelectric switch, but the serial number of the previous power battery is scanned at the moment, so that the situation that the serial number is not matched with the point cloud of the power battery is caused, the hardware layout is adjusted according to the special situation, and the problems are solved by combining the processing method of the point cloud and the storage method of the point cloud, and the method is specifically shown in the contents shown in fig. 5 and 6.
As shown in fig. 5, in the UML timing diagram of the CC24 communication framework, three different classes: the point cloud analysis class, the code scanning camera class and the detection class belong to different threads, wherein the function of a TCP socket is realized in the code scanning camera class, a specified port (CC 24 line default 9004 port) of a specified IP is monitored, and a serial number of a power battery is sent to the socket as long as the code scanning is completed by the Kidney scanning camera. And after receiving the serial number, storing and processing the serial number by adopting a data structure of the queue.
As shown in fig. 6, the point cloud analysis is completed and requests for serial number registration, if no serial number exists in the queue, the point cloud analysis is directly returned and ended; if more than 1 serial number exists in the queue, only reserving the last 1 serial number, returning the serial number in the queue, and ending; if there is only one sequence number in the queue, the current sequence number is returned directly and ended. The method ensures the matching of the correct serial number and the point cloud, thereby ensuring the accuracy of subsequent data processing and analysis. Under the condition of no serial number, the current processing flow is directly returned and ended, and the program efficiency is improved; for more than 1 serial number in the queue, by discarding the first serial number, ensuring that only the correct serial number is used for matching with the point cloud in the subsequent processing, and avoiding inaccuracy of data processing and analysis; for the case that only one serial number exists, the serial number is directly used, the discarding operation is not needed, the processing flow is simplified, and the program efficiency is improved.
S1, generating a unique result file path according to the serial number of a detected battery; preferably, it is: and combining the first 31 bits of the path plus the serial number, adding hash processing to generate a unique hash value, and splicing the hash value and the text information to form a final result file name.
S2, judging whether the generated result file exists or not: if the file does not exist, continuing to the next step; if the file exists, the original file is deleted and then a new file is created again.
S3, serializing information such as a battery serial number, a detection state and the like in the detection result structure body into a JSON object;
And S4, writing the serialized JSON strings into result files respectively according to the detection state, writing normal results into one file, and writing abnormal results into another file, wherein the JSON strings of the abnormal result files additionally contain coordinate information of an abnormal detection area, so that the detection results of all batteries can be distinguished and stored according to the serial numbers of the batteries, the results are written into different files according to the normal abnormal state of the results, and meanwhile, the coordinate information of the abnormal results is also stored together, thereby facilitating the subsequent detection of the batteries.
S5, opening the file and writing the character string content into the file in an additional writing mode; the method comprises the following steps: and opening the generated result file by using an API or a function of the file system, and writing the serialized character string content into the file in an additional writing mode.
S6, closing a file: closing the file in which the result content has been written.
In conclusion, by adjusting the hardware layout, the serial number processing method and the result storage method and the thread separation and signal and slot communication mechanism, the special situation in the third stop line scene is effectively solved, and the detection efficiency of the power battery is improved. In the above-mentioned problem solving method, the point cloud analysis class, the detection class and the display signal function respectively work under different threads, so that even under the condition of speeding up the production beat, the power battery collected by each line of laser contour sensor can be accurately detected. Meanwhile, by decoupling communication among functions and using a Qt signal and slot mechanism, efficient collaborative work among point cloud analysis, algorithm detection and interface display is realized.
Further, a power battery surface defect detection system, the method of use is as follows:
update camera IP address and connect: since the software-connected camera IP is modifiable, but by default the last time the software was used camera IP address is read, the historical IP address is stored in the local database. However, when a person is used to update the IP address of the camera, the software needs to read the latest IP address from the local database for connection at startup.
Initializing a timer: the detection function of the detection software is triggered by timer interruption, the battery image and the battery serial number to be detected are required to be read in a designated data structure once the timer is interrupted, and the next detection operation is performed after the battery image and the battery serial number are read. The interrupt time of the currently set timer is 100ms, i.e., the timer is triggered every 100ms, and the data reading operation is performed.
Updating the alarm IP and connecting the alarm: this part is similar to the step of "updating the camera IP address and connecting", and will not be described again.
Update the IP of the PLC and connect the PLC: this part is similar to the step of "updating the camera IP address and connecting", and will not be described again.
And (3) data receiving: after the software starts to connect the camera, the camera enters a dynamic triggering state at the moment and is triggered by an external photoelectric switch, and after the detection end flows through the power battery, the camera is automatically triggered to acquire surface point cloud information, and a callback function of the camera is triggered to execute a point cloud analysis method. And storing the analyzed 2D images into a data structure in a queue form so as to ensure the order of data sources each time.
Timer interrupt response function: the timer executes an interrupt response function every time it interrupts. On-line detection function: the method is characterized in that the method is a main response function of a detection system and comprises the following steps:
Acquiring data: this portion of data is stored in the second step of the main flow data reception, i.e., the data at the head of the queue is requested from the data storage queue. If the data queue has data at the moment, popping the data for executing the next algorithm; if no data exists in the data queue at this time, restarting the timer, and carrying out data request polling again.
Release detection signal: if there is data in the data queue, the popped data will perform the next algorithm detection operation, which is implemented by the Qt signaling mechanism, i.e., releasing the detection signal, as described in the previous step.
Detection response: depending on the signal and slot mechanism, the algorithm detection function is immediately switched to after the on-line detection function releases the detection signal. At this time, the detection algorithm parameters written in the database are read, and algorithm detection is performed together with the data. Input: parameters to be detected, data to be detected (2D image). And (3) outputting: abnormality/normal flag, abnormality information (abnormality position, abnormality height, abnormality area, etc.). After the detection algorithm is executed, the result response signal is also released for detecting the refreshing of the interface and the storage of the result.
Results response: after the result response signal is acquired, the following operations are performed:
interface refreshing: and refreshing the interface according to the detection result.
And (3) storing results: and writing the detection result into the local in a csv writing mode.
Issuing a PLC instruction: and sending the detection result to the PLC so that the PLC can perform control operation according to whether the battery is abnormal or not, such as grabbing the battery.
PLC connection polling: the function is an independent self-detection thread, and the main function is to read and write signals to the CPU fixed position of the PLC every 1s through a timer so as to ensure the connection state with the PLC. The polling operation is mainly judged according to whether the reading and writing are successful or not, if the reading and writing are unsuccessful, an alarm instruction is immediately issued to the alarm, and at the moment, the alarm buzzer is turned on to prompt the producer to disconnect the detection software from the PLC, and the detection software tries to reconnect with the PLC. And when the detection software is in recovery connection with the PLC or the state of successful reading and writing is always kept. The buzzer of the alarm is turned off.
And (3) cycle detection: when the detection software runs, a plurality of steps from data acceptance to result response are repeatedly executed in a circulating mode.
And (3) closing a system: stopping the current timer, disconnecting the connection with the camera, destroying all threads after detecting the undetected data, and closing the software.
Further, the invention provides an electronic device, which comprises a processor and a memory, wherein at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to realize the method for detecting the surface defects of the power battery.
Further, there is provided a computer readable storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement a power cell surface defect detection method as described above.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (10)

1. The method for detecting the surface defects of the power battery is characterized by comprising the following steps of:
And (3) point cloud analysis: acquiring battery point cloud data and a battery serial number, analyzing the battery point cloud data and the battery serial number, and transmitting the data to a defect detection thread for defect detection through TCP connection;
defect detection: calling a defect detection function to detect, and sending a defect detection result to a PLC control class thread to carry out PLC control by using an S7 protocol;
PLC control: according to the defect detection result, the battery serial number is called, and the physical equipment is controlled to detect the defective battery;
and (3) alarming: periodically detecting a PLC variable to judge whether the PLC is disconnected, and controlling an alarm thread to alarm through HTTP when the PLC is disconnected; when the PLC is reconnected, the control alarm class thread ends the alarm.
2. The defect detection method of claim 1, wherein the periodic detection relies on timer interrupt triggering, and each time the timer is interrupted, the battery point cloud data and the battery serial number to be detected need to be read in a specified data structure.
3. The defect detection method of claim 1, wherein the point cloud parsing is such that a stop-line scenario is present, comprising:
stopping the first line to obtain incomplete point cloud data and a battery serial number;
Stopping the second line to obtain incomplete point cloud data;
Stopping the line, and obtaining no point cloud and no battery serial number;
And stopping the line four, and obtaining the space point cloud but not obtaining the battery serial number.
4. The defect detection method of claim 1, wherein after the point cloud analysis is completed and the serial number registration is requested, if there is no serial number in the queue, the method returns directly and ends; if more than 1 serial number exists in the queue, only reserving the last 1 serial number, returning the serial number in the queue, and ending; if there is only one sequence number in the queue, the current sequence number is returned directly and ended.
5. The defect detection method of claim 4, wherein the serial number is stored by a method comprising the steps of:
s1, generating a unique result file path according to the serial number of a detected battery;
S2, judging whether the generated result file exists or not, if the file does not exist, continuing the next step; if the file exists, deleting the original file, and then recreating a new file;
s3, serializing information such as a battery serial number, a detection state and the like in the detection result structure body into a JSON object;
S4, writing the serialized JSON strings into result files respectively according to the detection state, writing the normal result into one file, and writing the abnormal result into the other file, wherein the JSON strings of the abnormal result files additionally contain coordinate information of an abnormal detection area;
s5, opening the file and writing the character string content into the file in an additional writing mode;
S6, closing the file.
6. The system constructed by the defect detection method according to any one of claims 1 to 5, comprising a point cloud analysis class, a defect detection class, an algorithm class and an alarm class.
7. The system of claim 6, wherein the point cloud parsing class comprises: LMI line laser profile sensor, kidney scanning camera SR-2000 and West Ke WT34 photosensor.
8. The system of claim 6, wherein the alarm class thread comprises An Xunshi D4100-E network strobe alarms.
9. The system of claim 6, wherein the point cloud parsing class further comprises an encoder.
10. A method of using a system according to any one of claims 6 to 9, comprising the steps of:
initializing: updating the IP address of the camera, connecting the camera with the IP address, initializing a timer, updating the IP of an alarm, connecting the alarm with the IP, updating the IP of the PLC, connecting the PLC with the IP of the PLC, and receiving data;
Detecting and processing results, wherein a timer interrupts a response function, releases a detection signal, detects response, refreshes an interface and stores results;
and (3) control treatment: the detection result is issued to the PLC, so that the PLC performs control operation according to whether the battery is abnormal or not, and the abnormal battery is detected by using the mechanical arm;
And (3) PLC connection detection: the PLC is connected with a polling function and independent of a detection thread, the CPU fixed position of the PLC is read and written every 1s at regular time, polling operation is carried out according to the success or failure of reading and writing, if the reading and writing are unsuccessful, an alarm instruction is immediately issued to an alarm, the alarm buzzer is triggered, the detection software tries to reconnect the PLC, and if the connection is recovered or the reading and writing are always kept successful, the alarm buzzer is closed;
And (5) circularly detecting.
CN202410354802.6A 2024-03-27 2024-03-27 Power battery surface defect detection method, system and use method Active CN117968772B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410354802.6A CN117968772B (en) 2024-03-27 2024-03-27 Power battery surface defect detection method, system and use method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410354802.6A CN117968772B (en) 2024-03-27 2024-03-27 Power battery surface defect detection method, system and use method

Publications (2)

Publication Number Publication Date
CN117968772A true CN117968772A (en) 2024-05-03
CN117968772B CN117968772B (en) 2024-06-14

Family

ID=90849785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410354802.6A Active CN117968772B (en) 2024-03-27 2024-03-27 Power battery surface defect detection method, system and use method

Country Status (1)

Country Link
CN (1) CN117968772B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1662419A1 (en) * 2004-11-26 2006-05-31 Robert Bosch Gmbh Tamper proof microcontroller system
JP2008227561A (en) * 2007-03-08 2008-09-25 Nec Corp Plc-compatible intelligent outlet system
CN114280073A (en) * 2021-12-27 2022-04-05 南京光衡科技有限公司 Tile defect detection device adopting laser and camera composite detection mode and classification method
CN114384075A (en) * 2021-12-06 2022-04-22 西安理工大学 On-line detection system and detection method of track plate defects based on 3D laser scanning
CN115809983A (en) * 2022-08-26 2023-03-17 宁德时代新能源科技股份有限公司 Defect detection method, system, device, equipment, storage medium and product
CN116026839A (en) * 2022-12-27 2023-04-28 哈尔滨严格智慧工厂有限公司 Detection device for surface defects of vehicle-mounted battery and intelligent detection method thereof
CN116958137A (en) * 2023-09-19 2023-10-27 易启科技(吉林省)有限公司 New energy battery surface defect detection method and device
CN117485843A (en) * 2022-07-25 2024-02-02 一汽-大众汽车有限公司 Battery surface foreign matter detecting system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1662419A1 (en) * 2004-11-26 2006-05-31 Robert Bosch Gmbh Tamper proof microcontroller system
JP2008227561A (en) * 2007-03-08 2008-09-25 Nec Corp Plc-compatible intelligent outlet system
CN114384075A (en) * 2021-12-06 2022-04-22 西安理工大学 On-line detection system and detection method of track plate defects based on 3D laser scanning
CN114280073A (en) * 2021-12-27 2022-04-05 南京光衡科技有限公司 Tile defect detection device adopting laser and camera composite detection mode and classification method
CN117485843A (en) * 2022-07-25 2024-02-02 一汽-大众汽车有限公司 Battery surface foreign matter detecting system
CN115809983A (en) * 2022-08-26 2023-03-17 宁德时代新能源科技股份有限公司 Defect detection method, system, device, equipment, storage medium and product
CN116026839A (en) * 2022-12-27 2023-04-28 哈尔滨严格智慧工厂有限公司 Detection device for surface defects of vehicle-mounted battery and intelligent detection method thereof
CN116958137A (en) * 2023-09-19 2023-10-27 易启科技(吉林省)有限公司 New energy battery surface defect detection method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"电子工程师月刊――2003年总目录(总第138期~149期)", 电子工程师, no. 12, 15 December 2003 (2003-12-15), pages 1 - 3 *
莫之剑;范彦斌;彭明仔;: "基于3D机器视觉动力电池焊缝质量检测方法", 机电工程技术, no. 04, 20 April 2020 (2020-04-20), pages 1 - 3 *

Also Published As

Publication number Publication date
CN117968772B (en) 2024-06-14

Similar Documents

Publication Publication Date Title
WO2019216199A1 (en) Analysis assistance device and analysis assistance method
CN107526623B (en) Data processing method and device
JP2008041749A (en) Device for inspecting image defect
TW201638784A (en) Automatic testing device
CN117968772B (en) Power battery surface defect detection method, system and use method
CN114679569A (en) Production line visualization monitoring method, system and storage medium based on 3D modeling
CN113129333B (en) Multi-target real-time tracking method and system and electronic equipment thereof
JP5451883B2 (en) Head detection method, head detection device, attribute determination method, attribute determination device, program, recording medium, and attribute determination system
CN118277221A (en) System abnormal data acquisition method and device, electronic equipment and storage medium
CN116823608A (en) Page image stitching method and device, computer equipment and storage medium
CN115222720A (en) Semiconductor abnormality detection method, semiconductor abnormality detection device, electronic apparatus, and medium
CN114913649A (en) Display state monitoring method, device, equipment and computer readable storage medium
US20230214024A1 (en) Image processing apparatus, image processing method, and non-transitory computer-readable medium
CN118425840B (en) Test method and system for external display interface of notebook computer
US20230421891A1 (en) Controller
CN113033483B (en) Method, device, electronic equipment and storage medium for detecting target object
CN111654646B (en) Image synthesis method, device, system and storage medium
US20240395001A1 (en) Information processing device
US12333774B2 (en) Method for optimizing the image processing of web videos, image processing apparatus applying the method
JP7091974B2 (en) Image processing system, image processing device, image processing method, and image processing program
CN213659503U (en) Image data processing system, storage policy device
CN115543712A (en) Automatic detection method and device for equipment configuration information, electronic equipment and medium
CN117762776A (en) Test script generation method and device, electronic equipment and storage medium
CN114429614A (en) Method and apparatus for automatically restoring operation of semiconductor manufacturing equipment when it is out of service
HK40073123A (en) Display status monitoring method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant