锂电池极片瑕疵实时检测处理方法和***Real-time detection and processing method and system for lithium battery pole piece defects
本申请要求申请日为2020年9月11日、申请号为202010955791.9的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with an application date of September 11, 2020 and an application number of 202010955791.9, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请涉及锂电池极片瑕疵检测处理方法,例如涉及一种锂电池极片瑕疵实时检测处理方法和***。The present application relates to a lithium battery pole piece defect detection and processing method, for example, to a lithium battery pole piece defect real-time detection and processing method and system.
背景技术Background technique
相关技术中,CCD视觉检测技术还处于高速发展的阶段,许多检测精度要求高、检测环境恶劣、无法人工完成的工作量必须由视觉检测技术取而代之。在应用视觉检测时,需要考虑其检测实时性。以锂电池极片瑕疵检测为例,在瑕疵检测并作打标处理的过程中,影响打标的因素主要有相机的分辨率(基本忽略不计)、外界因素(机台抖动或编码器打滑等)、硬件的交互过程中响应时间的波动,在实时在线监测过程中,相机与打标机位置是相对固定不动的距离标识为L,假设瑕疵位置和相机原点位置重合时编码器(脉冲数)走固定距离就执行打标标识,采集图像过程是通过感光芯片获取光电信号,通过A/D转换器把每个像素上光电信号转换为数字信号,再经过处理成数字图像缓存并通过传输线传到PC上,该过程会在高低速状态获取及硬件配置不同会存在50ms内(主要指采集一张图片、瑕疵处理装置(如打标机)的响应时间、常规网口或串口通讯时间及IO响应时间)的波动,而相关技术的电池极片瑕疵检测存在响应慢、电池极片在高低速状态下的瑕疵检测精度差及一致性差的技术问题。In the related art, CCD visual inspection technology is still in the stage of rapid development, and many workloads that require high inspection accuracy, harsh inspection environments, and cannot be manually completed must be replaced by visual inspection technology. When applying visual inspection, it is necessary to consider its real-time detection. Taking the lithium battery pole piece defect detection as an example, in the process of defect detection and marking processing, the main factors affecting the marking are the resolution of the camera (basically ignored), external factors (machine shake or encoder slippage, etc.) ), the fluctuation of the response time during the interaction of the hardware, in the process of real-time online monitoring, the position of the camera and the marking machine is a relatively fixed distance marked as L, assuming that the defect position coincides with the camera origin position of the encoder (the number of pulses ) Marking is performed after a fixed distance. The process of collecting the image is to obtain the photoelectric signal through the photosensitive chip, convert the photoelectric signal on each pixel into a digital signal through the A/D converter, and then process it into a digital image buffer and transmit it through the transmission line. On the PC, the process will be acquired in high and low speed states and will exist within 50ms due to different hardware configurations (mainly refers to the acquisition of a picture, the response time of the defect processing device (such as a marking machine), the communication time of the conventional network port or serial port, and the IO The battery pole piece defect detection in the related art has technical problems such as slow response, poor detection accuracy and poor consistency of the battery pole piece in high and low speed states.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种电池极片瑕疵实时检测方法,能自动对瑕疵进行分类处理、消除图像和处理装置的响应延滞,检测精度高、效率高,能满足电池极片高速生产实时检测的需求。The present application provides a real-time detection method for battery pole piece defects, which can automatically classify and process the defects, eliminate the response delay of images and processing devices, has high detection accuracy and high efficiency, and can meet the needs of real-time detection of battery pole piece high-speed production.
一实施例提供了一种锂电池极片瑕疵实时检测处理方法,包括:An embodiment provides a real-time detection and processing method for defects in a lithium battery pole piece, including:
编码器获取传送的所述锂电池极片的运动信息,并将所述运动信息转化为电子信号,其中,所述锂电池极片通过多个过辊进行传送,所述编码器与所述 多个过辊传动连接,所述运动信息包括传送距离和传送速度;The encoder acquires the transmitted motion information of the lithium battery pole piece, and converts the motion information into an electronic signal, wherein the lithium battery pole piece is transmitted through a plurality of rollers, and the encoder is connected with the multi-roller. a roller transmission connection, the motion information includes the transmission distance and the transmission speed;
线阵相机对处于传送过程中的所述锂电池极片进行逐行扫描以采集图像,并将采集到的图像的信息传输到工控机,其中,所述线阵相机通过所述编码器触发图像采集操作;The line scan camera scans the lithium battery pole piece in the process of transmission line by line to collect images, and transmits the information of the collected images to the industrial computer, wherein the line scan camera triggers the image through the encoder collection operation;
所述工控机以所述采集到的图像中的任意位置作为基准位置,所述基准位置的位置信息记录为第一编码器值,并将所述第一编码器值传输到控制器上,其中所述工控机包括所述控制器;The industrial computer takes any position in the collected image as the reference position, the position information of the reference position is recorded as the first encoder value, and the first encoder value is transmitted to the controller, wherein The industrial computer includes the controller;
所述工控机根据所述采集到的图像的图像特征判断所述锂电池极片是否存在瑕疵,基于所述采集到的图像中无瑕疵的判断结果,将所述采集到的图像显示在屏幕上,基于所述采集到的图像中有瑕疵的判断结果,分析瑕疵的特征;The industrial computer judges whether the lithium battery pole piece has defects according to the image characteristics of the collected image, and displays the collected image on the screen based on the judgment result of the defect in the collected image. , based on the judgment result that there is a defect in the collected image, analyze the characteristics of the defect;
根据所述瑕疵的特征判断出所述瑕疵的等级,基于所述瑕疵为第一等级瑕疵的判断结果,所述工控机发送报警信号并停止运行,基于所述瑕疵为第二等级瑕疵的判断结果,识别所述第二等级瑕疵在所述采集到的图像中的位置信息,根据所述瑕疵的位置信息与所述第一编码器值计算第二编码器值,并将所述第二编码器值传输到所述控制器上;及响应与识别所述第二等级瑕疵的位置信息,所述控制器根据所述第二编码器值、瑕疵处理装置与所述线阵相机间的距离、所述瑕疵处理装置的响应时间及所述锂电池极片的传输速度,计算出瑕疵处理时间并将所述瑕疵处理时间反馈给瑕疵处理装置,以使所述瑕疵处理装置对所述第二等级瑕疵进行处理。The grade of the defect is judged according to the characteristics of the defect, and based on the judgment result that the defect is a first-grade defect, the industrial computer sends an alarm signal and stops running, and based on the judgment result that the defect is a second-grade defect , identify the position information of the second-level defect in the collected image, calculate the second encoder value according to the position information of the defect and the first encoder value, and use the second encoder transmitting the value to the controller; and responding to and identifying the position information of the second level defect, the controller according to the second encoder value, the distance between the defect processing device and the line scan camera, the The response time of the defect treatment device and the transmission speed of the lithium battery pole piece are used to calculate the defect treatment time and feed back the defect treatment time to the defect treatment device, so that the defect treatment device can respond to the second-level defects. to be processed.
一实施例提供了一种锂电池极片瑕疵实时检测处理***,采用了上述的锂电池极片瑕疵实时检测处理方法处理带有瑕疵的锂电池极片,所述***包括:极片运动信息采集模块,所述极片运动信息采集模块设置为将锂电池极片的运动信息转化为电子信号,并记录图像位置信息的第一编码器值;视觉***,所述视觉***设置为由所述极片运动信息采集模块触发工作,所述视觉***采集到有瑕疵的图像后,根据所述瑕疵的位置信息与所述第一编码器值计算第二编码器值;控制器,所述控制器设置为接收所述极片运动信息采集模块的锂电池极片运动信息和所述视觉***的第二编码值;及瑕疵处理装置,所述瑕疵处理装置设置为对所述锂电池极片的瑕疵进行处理。An embodiment provides a real-time detection and processing system for lithium battery pole piece defects, which adopts the above-mentioned real-time detection and processing method for lithium battery pole piece defects to process lithium battery pole pieces with defects. The system includes: pole piece motion information collection module, the pole piece motion information acquisition module is set to convert the motion information of the lithium battery pole piece into an electronic signal, and record the first encoder value of the image position information; the vision system, the vision system is set to be composed of the pole piece. The film motion information acquisition module triggers the work, and after the vision system collects the defective image, it calculates the second encoder value according to the position information of the defect and the first encoder value; the controller, the controller sets In order to receive the lithium battery pole piece motion information of the pole piece motion information acquisition module and the second encoded value of the vision system; and a defect processing device, the defect processing device is configured to perform the defect processing on the lithium battery pole piece. deal with.
其中,所述控制器设置为发送瑕疵处理时间的信号给瑕疵处理装置。Wherein, the controller is configured to send a signal of the defect processing time to the defect processing device.
所述视觉***包括图像采集模块、图像瑕疵识别模块、等级判断模块和图像存储模块;所述图像采集模块设置为由所述极片运动信息采集模块触发,所 述图像瑕疵识别模块设置为根据灰度特征识别极片是否存在瑕疵,所述等级判断模块设置为及时通知作业人员确认存在瑕疵的所述锂电池极片是否满足生产需求,所述图像显示存储模块设置为实时将图像显示到屏幕上并储存到数据库上。The vision system includes an image acquisition module, an image defect identification module, a grade judgment module and an image storage module; the image acquisition module is set to be triggered by the pole piece motion information acquisition module, and the image defect identification module is set to be based on grayscale. The degree feature identifies whether there is a defect in the pole piece, the grade judgment module is set to notify the operator in time to confirm whether the defective lithium battery pole piece meets the production requirements, and the image display storage module is set to display the image on the screen in real time. and stored in the database.
附图说明Description of drawings
图1是本申请实施例一提供的一种锂电池极片瑕疵实时检测处理方法的流程图;1 is a flowchart of a real-time detection and processing method for a lithium battery pole piece defect provided in Embodiment 1 of the present application;
图2是本申请实施例一提供的检测处理方法中采集到的图像的首行转化为编码器值示意图;2 is a schematic diagram of converting the first line of an image collected in the detection and processing method provided in Embodiment 1 of the present application into an encoder value;
图3是本申请实施例一提供的检测处理方法中捕获瑕疵的示意图;3 is a schematic diagram of capturing defects in the detection and processing method provided in Embodiment 1 of the present application;
图4是本申请实施例一提供的检测处理方法中瑕疵被最小外接矩形捕获示意图;4 is a schematic diagram of a defect captured by a minimum circumscribed rectangle in the detection and processing method provided in Embodiment 1 of the present application;
图5是本申请实施例一提供的检测处理方法中瑕疵处理过程的平面示意图;5 is a schematic plan view of a defect processing process in the detection and processing method provided in Embodiment 1 of the present application;
图6是本申请实施例二提供的一种锂电池极片瑕疵实时检测处理***的模块图;6 is a block diagram of a real-time detection and processing system for lithium battery pole piece defects provided in Embodiment 2 of the present application;
图7是本申请一实施例提供的一种锂电池极片瑕疵实时检测处理方法的流程图。FIG. 7 is a flowchart of a real-time detection and processing method for a lithium battery pole piece defect provided by an embodiment of the present application.
具体实施方式detailed description
实施例一Example 1
本申请提供了一种锂电池极片瑕疵实时检测处理方法,如图1和图7所示,该方法包括以下步骤:The present application provides a real-time detection and processing method for lithium battery pole piece defects, as shown in FIG. 1 and FIG. 7 , the method includes the following steps:
S1中,采集极片运动信息:编码器获取传送的所述锂电池极片的运动信息,并将所述运动信息转化为电子信号,其中,将电池极片绕过多个过辊,多个过辊带动极片进行传送作业,采用编码器与过辊传动连接,编码器将极片运动信息转化为电子信号,极片运动信息包括传送距离和传送速度V。In S1, collecting the motion information of the pole piece: the encoder acquires the transmitted motion information of the lithium battery pole piece, and converts the motion information into an electronic signal. The over-roller drives the pole piece for transmission operation, and the encoder is connected with the over-roller drive. The encoder converts the pole piece motion information into electronic signals. The pole piece motion information includes the transmission distance and the transmission speed V.
S1中,在过辊上对电池极片进行连续地瑕疵检测作业,能够避免机台抖动影响相机对极片的图像采集,保证能够准确地采集锂电池极片的瑕疵位置信息,保证瑕疵检测过程的可靠性。In S1, continuous defect detection is performed on the battery pole piece on the over-roller, which can prevent the camera shake from affecting the image acquisition of the pole piece by the camera, ensure that the defect position information of the lithium battery pole piece can be accurately collected, and ensure the defect detection process. reliability.
S1.1中,切换检测方案:从多个极片检测方案中选取合适的极片检测方案,即将多个检测方案配置于不同名称的机种中,方便用户进行产品型号管理,同 一型号的极片对应于一个机种名称,如果同一型号的产品拥有不同的检测要求和尺寸就需要设置相关参数进行区分,形成独立的瑕疵检测方案;另外,可以设置三个权限:操作员,工程师和管理员,操作员只能对机种选择和控制软件运行/停止权限,而工程师除拥有操作员的权限外,还可以配置拥有检测参数设置的权限,而管理员拥有整个软件的操作权,不同的权限配有不同的初始密码,用户还可以根据需求新增不同权限的用户以及设置对应的密码。In S1.1, switch the detection scheme: select a suitable pole piece detection scheme from multiple pole piece detection schemes, that is, configure multiple detection schemes in models with different names, which is convenient for users to manage product models. The chip corresponds to a model name. If the same type of product has different testing requirements and sizes, it is necessary to set relevant parameters to distinguish it to form an independent defect detection scheme; in addition, three permissions can be set: operator, engineer and administrator , the operator can only select and control the software to run/stop the machine, while the engineer can configure the authority to set detection parameters in addition to the authority of the operator, and the administrator has the authority to operate the entire software, with different authority With different initial passwords, users can also add users with different permissions and set corresponding passwords according to their needs.
S2中,图像采集:利用编码器触发相机拍照,相机对位于过辊上的电池极片进行图像采集,并将采集到的图像信息传输到工控机,工控机以图像中任意位置作为基准位置,该基准位置被记录为第一编码器值C1,并将第一编码器值C1传输到控制器上。In S2, image acquisition: use the encoder to trigger the camera to take a picture, the camera collects the image of the battery pole piece located on the roller, and transmits the collected image information to the industrial computer. The industrial computer takes any position in the image as the reference position, This reference position is recorded as the first encoder value C1 and transmitted to the controller.
线阵相机对处于传送过程中的所述锂电池极片进行逐行扫描以采集图像,并将采集到的图像的信息传输到工控机,其中,所述线阵相机通过所述编码器触发图像采集操作;所述工控机以所述采集到的图像中的任意位置作为基准位置,所述基准位置记录为第一编码器值,并将所述第一编码器值传输到控制器上,控制器与工控机电连接。The line scan camera scans the lithium battery pole piece in the process of transmission line by line to collect images, and transmits the information of the collected images to the industrial computer, wherein the line scan camera triggers the image through the encoder Acquisition operation; the industrial computer takes any position in the acquired image as the reference position, and the reference position is recorded as the first encoder value, and transmits the first encoder value to the controller to control the The device is connected with the industrial control electromechanical.
在一实施例的S2中,相机先对极片拍照,并将图片传输至工控机,线阵相机采集第一行像素时同时输出与编码器基准位置同步的IO信号。即对极片实时在线监测过程中,相机位置是固定不动,假设瑕疵位置和相机原点位置重合时,编码器(脉冲数)到设定位置发生固定距离后,执行标识瑕疵,采集图像过程是通过感光芯片获取光电信号,通过A/D转换器把每个像素上光电信号转换为数字信号,再将数字信号处理为数字图像,并将数字图像缓存以及通过传输线传输至PC端,由于存在高低速状态获取光电信号及硬件配置不同的情况,这样会存在50ms内的波动,而编码器位置和相机位置同步过程通过采集第一行图像时,立即输出一个IO信号给编码器,就相当于和图像采集波动无关,只和IO响应时间有关,IO响应一般在3ms内就能完成信号交互,将近节省50ms的时间,因此在不同的生产速度需求下,采用编码器触发相机拍照的方式能够保证瑕疵的位置信息的准确性,大大提高了后期的瑕疵处理精度。In S2 of an embodiment, the camera first takes a picture of the pole piece and transmits the picture to the industrial computer, and the line scan camera simultaneously outputs an IO signal synchronized with the reference position of the encoder when capturing the first row of pixels. That is, in the process of real-time online monitoring of the pole piece, the camera position is fixed. Assuming that the defect position coincides with the camera origin position, after the encoder (pulse number) has a fixed distance from the set position, the defect identification is performed, and the image acquisition process is as follows: The photoelectric signal is obtained through the photosensitive chip, and the photoelectric signal on each pixel is converted into a digital signal through the A/D converter, and then the digital signal is processed into a digital image, and the digital image is buffered and transmitted to the PC through the transmission line. When the photoelectric signal and hardware configuration are different in the low-speed state, there will be fluctuations within 50ms, and the encoder position and the camera position synchronization process through the acquisition of the first line of images, immediately output an IO signal to the encoder, which is equivalent to and The fluctuation of image acquisition has nothing to do with the IO response time. The IO response can generally complete the signal interaction within 3ms, which saves nearly 50ms of time. Therefore, under different production speed requirements, using the encoder to trigger the camera to take pictures can guarantee defects. The accuracy of the location information greatly improves the accuracy of the later defect processing.
在一实施例的S2中,相机为线阵相机,线阵相机具有连续逐行扫描的特点,每一卷电池极片的涂布从头到尾全部都可以被扫描检测到,不会发生间断检测等其他情况,线阵相机连续拍摄,每隔指定图片行数,输出一张图片进行图像处理,图像帧信号传输到控制器的输入端子,控制器连接有随过辊一起运转的 编码器,在图像帧信号接收到的时候,记录当前编码器值,为了便于计算,本实施例中当前编码器值为图像第一行的位置信息,如图2所示,第一张图片首行的编码器值被记录为12000pulse,第二张图片首行的编码器值被记录为22000pulse,第三张图片首行的编码器值记录为32000pulse,此时将第一张图片作为检测瑕疵的研究对象,该第一张图片的第一编码器值C1为12000pulse。In S2 of an embodiment, the camera is a line scan camera, and the line scan camera has the characteristics of continuous scanning line by line, and the coating of each roll of battery pole pieces can be scanned and detected from the beginning to the end, and there will be no intermittent detection. In other cases, the line scan camera shoots continuously, outputs a picture for image processing every specified number of picture lines, the image frame signal is transmitted to the input terminal of the controller, and the controller is connected with an encoder that runs with the roller. When the image frame signal is received, the current encoder value is recorded. For the convenience of calculation, in this embodiment, the current encoder value is the position information of the first line of the image. As shown in Figure 2, the encoder in the first line of the first picture The value is recorded as 12000pulse, the encoder value in the first line of the second picture is recorded as 22000pulse, and the encoder value in the first line of the third picture is recorded as 32000pulse. The first encoder value C1 of the first picture is 12000 pulses.
在一实施例的S2中,所述采集的图像的图像信息包括X方向像素当量和Y方向像素当量,X方向像素当量和Y方向的像素当量相等,这样拍摄出来的图像没有变形,能够保证抓取瑕疵的位置精度,同时也保证后续对瑕疵处理的精度。In S2 of one embodiment, the image information of the collected image includes the pixel equivalent in the X direction and the pixel equivalent in the Y direction, and the pixel equivalent in the X direction and the pixel equivalent in the Y direction are equal, so that the captured image is not deformed and can ensure the capture of the image. The position accuracy of the defect is taken, and the accuracy of the subsequent defect processing is also guaranteed.
S3中,识别图像瑕疵;根据灰度特征识别图像中的瑕疵,如果图像中无瑕疵,则将图像直接显示到屏幕上,如果图像中有瑕疵,则抓取瑕疵的特征进而判断瑕疵的种类。根据灰度特征来识别极片是否带有瑕疵,具有识别准确、识别效率高的优点,如图3所示,捕获了该图像的瑕疵,并与数据库内的瑕疵特征进行对比分析,识别瑕疵的种类。In S3, identify image flaws; identify flaws in the image according to grayscale features, if there is no flaw in the image, display the image directly on the screen, if there is a flaw in the image, capture the feature of the flaw to determine the type of flaw. Identifying whether the pole piece has defects according to the grayscale features has the advantages of accurate identification and high identification efficiency. As shown in Figure 3, the defects of the image are captured and compared with the defect features in the database to identify the defects. type.
所述工控机根据所述采集到的图像的图像特征判断所述锂电池极片是否存在瑕疵,基于所述采集到的图像中无瑕疵的判断结果,将所述采集到的图像显示在屏幕上,基于所述采集到的图像中有瑕疵的判断结果,分析瑕疵的特征。The industrial computer judges whether the lithium battery pole piece has defects according to the image characteristics of the collected image, and displays the collected image on the screen based on the judgment result of the defect in the collected image. , and analyze the characteristics of the defects based on the judgment result of the defects in the collected images.
S4中,NG等级判定;S3中判断出瑕疵的种类后,对瑕疵进行NG等级判定,如果瑕疵判定结果为第一等级瑕疵,则工控机发送报警信号通知作业人员并停机,如果瑕疵判定结果为第二等级瑕疵,则识别图像中瑕疵的位置坐标,根据瑕疵的位置信息与瑕疵的第一编码器值C1计算从而转化为第二编码器值C2,并将第二编码器值C2传输到控制器上,其中,第二等级瑕疵比第一等级瑕疵严重。NG等级指的是瑕疵的不良等级。In S4, the NG level is judged; after judging the type of the defect in S3, the NG level is judged on the defect. If the defect judgment result is the first-level defect, the industrial computer sends an alarm signal to notify the operator and stops the machine. If the defect judgment result is The second-level defect is to identify the position coordinates of the defect in the image, calculate it according to the position information of the defect and the first encoder value C1 of the defect to convert it into the second encoder value C2, and transmit the second encoder value C2 to the control On the device, the second-level flaws are more serious than the first-level flaws. The NG grade refers to the bad grade of the defect.
根据所述瑕疵的特征判断出所述瑕疵的等级,基于所述瑕疵为第一等级瑕疵的判断结果,所述工控机发送报警信号通知作业人员并停机,基于所述瑕疵为第二等级瑕疵的判断结果,识别所述第二等级瑕疵在所述采集到的图像中的位置信息,根据所述瑕疵的位置信息与所述第一编码器值计算第二编码器值,并将所述第二编码器值传输到所述控制器上。The grade of the defect is judged according to the characteristics of the defect. Based on the judgment result that the defect is a first-grade defect, the industrial computer sends an alarm signal to notify the operator and shuts down. Based on the defect that the defect is a second-grade defect As a result of the judgment, the position information of the second-level defect in the collected image is identified, the second encoder value is calculated according to the position information of the defect and the first encoder value, and the second encoder value is calculated. The encoder values are transmitted to the controller.
在一实施例的S4中,如图3和图4所示,抓取严重瑕疵的特征的时候,自动补获瑕疵的外接最小矩形坐标,该坐标单位为图像像素坐标,比如该矩形左上角的坐标为(X1:6000,Y1:2000),其中X1坐标信息由线阵相机来收集并传递到瑕疵处理装置,本实施例中该图像的幅宽值为400mm线阵相机的分辨率为 8192pixel,则图像运动方向(Y方向)的像素当量Vres=400mm/8192pixel=0.0488mm/pixel,计算图像Y1坐标对应实际的物理距离L1=Y1*Vres=2000pixel*0.0488mm/pixel=97.6mm,其中编码器的脉冲当量Eres=编码器转一周的周长/一周脉冲数量=200mm/8000pulse=0.025mm/pulse,因此严重瑕疵Y方向的位置信息可换算成第二编码器值C2=C1+L1/Eres=12000+97.6mm/0.025mm/pulse=15904pulse,第二编码器值C2传输到控制器上。In S4 of one embodiment, as shown in Fig. 3 and Fig. 4, when capturing the features of serious flaws, the minimum rectangle coordinates of the circumscribed flaws are automatically obtained, and the coordinate units are image pixel coordinates, such as the upper left corner of the rectangle. The coordinates are (X1:6000, Y1:2000), where the X1 coordinate information is collected by the line scan camera and transmitted to the defect processing device. In this embodiment, the width of the image is 400mm and the resolution of the line scan camera is 8192pixel, Then the pixel equivalent of the image movement direction (Y direction) is Vres=400mm/8192pixel=0.0488mm/pixel, and the calculated image Y1 coordinate corresponds to the actual physical distance L1=Y1*Vres=2000pixel*0.0488mm/pixel=97.6mm, where the encoder The pulse equivalent Eres = the circumference of one encoder revolution / the number of pulses in one cycle = 200mm/8000pulse = 0.025mm/pulse, so the position information of the severe flaw in the Y direction can be converted into the second encoder value C2 = C1 + L1 / Eres = 12000+97.6mm/0.025mm/pulse=15904pulse, the second encoder value C2 is transmitted to the controller.
S5中,瑕疵处理:S4中瑕疵的位置信息被识别后,控制器根据第二编码器值C2、瑕疵处理装置与相机间的距离L、瑕疵处理装置的响应时间T、极片的运输速度V,计算出瑕疵处理时间并将瑕疵处理时间反馈给瑕疵处理装置,瑕疵处理装置对处于第二等级瑕疵的极片进行处理,本实施例中瑕疵处理装置为贴标机,贴标机对瑕疵进行贴标标记,瑕疵处理装置还可以是喷码机。In S5, defect processing: after the position information of the defect is identified in S4, the controller determines the second encoder value C2, the distance L between the defect processing device and the camera, the response time T of the defect processing device, and the transport speed V of the pole piece. , calculate the defect processing time and feedback the defect processing time to the defect processing device, and the defect processing device processes the pole pieces in the second-level defect. Labeling and marking, the defect processing device can also be an inkjet printer.
响应与识别所述第二等级瑕疵的位置信息,所述控制器根据所述第二编码器值、瑕疵处理装置与所述线阵相机间的距离、所述瑕疵处理装置的响应时间及所述锂电池极片的传送速度,计算出瑕疵处理时间并将所述瑕疵处理时间反馈给瑕疵处理装置,以使所述瑕疵处理装置对所述第二等级瑕疵进行处理。In response to and identifying the location information of the second-level defect, the controller is based on the second encoder value, the distance between the defect processing device and the line scan camera, the response time of the defect processing device, and the The conveying speed of the lithium battery pole piece, calculating the defect processing time and feeding back the defect processing time to the defect processing device, so that the defect processing device can process the second-level defects.
在一实施例的S5中,如图5所示,已知相机与瑕疵处理装置之间的安装距离L(假定这里两者之间的距离为3m),通过换算,得到瑕疵处理装置响应时间的第三编码器值C3:In S5 of an embodiment, as shown in FIG. 5 , the installation distance L between the camera and the defect processing device is known (assuming that the distance between the two here is 3m), and through conversion, the response time of the defect processing device is obtained. Third encoder value C3:
C3=L/Eres=3m/0.025mm/pulse=120000pulse;C3=L/Eres=3m/0.025mm/pulse=120000pulse;
如果极片的运输速度较快,就需对第三编码器值C3进行速度补偿修正:瑕疵处理装置从接收到瑕疵处理信号,到标签纸接触到涂布或者极片材料,这之间会有一个相对固定的延时时间。例如出标或喷码速度为20个/s时,则从瑕疵处理动作到标签接触到材料,时间约为50ms,由于此动作时间的存在,导致不同速度下,瑕疵处理位置与理想位置存在偏移,特别是生产速度较快的时候,相关技术中的瑕疵处理的精度较差,因此本申请中控制器通过编码器实时计算当前电池极片的运输速度V,并根据瑕疵处理装置的响应时间设定补偿时间T,计算出偏移距离为S=V*T,再根据第三编码器值C3=(L-S)/Eres算出修正后的第三编码值C3,从而保证瑕疵处理装置在严重瑕疵上瑕疵处理的精度。If the transportation speed of the pole piece is fast, the third encoder value C3 needs to be corrected for speed compensation: there will be a difference between the time when the flaw processing device receives the flaw processing signal and when the label paper comes into contact with the coating or pole piece material. A relatively fixed delay time. For example, when the labeling or coding speed is 20 pieces/s, the time from the defect processing action to the label contacting the material is about 50ms. Due to the existence of this action time, the defect processing position and the ideal position are deviated at different speeds. Especially when the production speed is fast, the accuracy of defect processing in the related art is poor. Therefore, in this application, the controller calculates the current transportation speed V of the battery pole piece through the encoder in real time, and according to the response time of the defect processing device Set the compensation time T, calculate the offset distance as S=V*T, and then calculate the corrected third encoding value C3 according to the third encoder value C3=(LS)/Eres, so as to ensure that the defect processing device is in severe defects. Accuracy of flaw handling.
S6中,图像显示:将带有瑕疵的图像显示到屏幕上,并将带有瑕疵的图像储存起来。在一实施例中,有瑕疵特征的图像除了实时显示在软件界面窗口上还会按照用户指定的命名格式保存在指定的文件夹下,瑕疵分类统计的结果用 后缀名为.CSV文件实时保存于指定文件夹下,保存的本地数据方便用户进行瑕疵观察及追溯。In S6, image display: display the image with flaws on the screen, and store the image with flaws. In one embodiment, the images with flawed features are not only displayed on the software interface window in real time, but also saved in a specified folder according to the naming format specified by the user, and the results of the flaw classification statistics are saved in real time in a . Under the specified folder, the saved local data is convenient for users to observe and trace defects.
本方法中相机在过辊的位置上对电池极片进行连续地瑕疵检测作业,避免机台抖动影响相机对极片的图像采集,保证能够准确地采集极片的瑕疵位置信息,利用编码器触发相机拍照,即编码器位置和相机位置同步过程通过采集第一行图像时,立即输出一个IO信号给编码器,就相当于采集极片的瑕疵位置信息与图像采集波动无关,只和IO响应时间有关,IO响应时间一般在3ms内就能完成信号交互,这将节省50ms的时间,在不同速度下,打标精度瞬间大大提升,本方法根据灰度特征来识别极片是否带有瑕疵,具有识别准确、识别效率高的优点,识别出瑕疵的位置信息好,瑕疵处理装置能够对瑕疵进行自动瑕疵处理记录,根据被编码器收集的极片运动速度V和瑕疵处理装置的响应时间T,能够计算出瑕疵处理装置何时对极片进行瑕疵处理作业,消除瑕疵处理装置的响应时间,提高瑕疵处理的精度,本申请具有自动对瑕疵进行分类处理、消除图像和处理装置的响应延滞、检测精度高、效率高及能满足电池极片高速生产实时检测需求的优点。In this method, the camera continuously detects the defects of the battery pole pieces at the position of passing the roller, so as to avoid the influence of the machine shake on the image acquisition of the pole piece by the camera, and to ensure that the defect position information of the pole piece can be accurately collected. The camera takes pictures, that is, when the encoder position and the camera position are synchronized in the process of collecting the first line of images, an IO signal is immediately output to the encoder, which is equivalent to collecting the defect position information of the pole piece, which has nothing to do with the fluctuation of image acquisition, but only the IO response time. Related, the IO response time can generally complete the signal interaction within 3ms, which will save 50ms of time. At different speeds, the marking accuracy is greatly improved instantly. This method identifies whether the pole piece has defects according to the grayscale characteristics. The advantages of accurate identification and high identification efficiency, the position information of the identified defects is good, and the defect processing device can automatically record the defect processing. According to the pole piece movement speed V collected by the encoder and the response time T of the defect processing device, it can Calculate when the defect processing device performs the defect processing operation on the pole piece, eliminate the response time of the defect processing device, and improve the accuracy of the defect processing. It has the advantages of high efficiency, high efficiency and can meet the needs of real-time detection of high-speed production of battery pole pieces.
其中上面S2和S3之间还可以包括S2.1。S2.1 may also be included between the above S2 and S3.
S2.1中,灰度监测:采集图像后,对图像进行灰度监测,如果图像灰度满足预设值,而直接进入S3,如果图像灰度不满足预设值,则光源对极片进行自动补光提高极片的亮度,相机重新采集图像,直到图像灰度满足预设值时,才进入S3。In S2.1, grayscale monitoring: after the image is collected, the grayscale monitoring of the image is performed. If the grayscale of the image meets the preset value, it goes directly to S3. Automatic fill light increases the brightness of the pole piece, the camera re-collects the image, and enters S3 until the image gray scale meets the preset value.
在一实施例的S2.1中,为了避免用户操作异常以及其他不可抗拒的异常导致光源进行不必要的亮度调节,所以检测方案添加有光源亮度调节与不调节的勾选按钮,用户可在进行过原材料更换的产品生产时开启光源亮度调节,相机拍出来的图像灰度范围为0-255,当图片处于120左右的中间灰度值时对瑕疵识别最有利,图片的灰度可以通过调节镜头光圈、调节相机的曝光时间和调节光源的亮暗来改变。曝光时间是固定参数,且受机台运动速度的影响使曝光时间不好做改变;镜头的光圈属于硬件,经常移动硬件也不方便。光源亮度可以通过硬件调节也可以通过软件进行调节,方案实施的过程中采取通过软件调节的方式对光源亮度进行自动调节,能够保证在对用户不同原材料的产品检测时,相机拍出来的图像处于正常检测的灰度范围,后续便于S3对图像进行识别瑕疵。In S2.1 of an embodiment, in order to avoid unnecessary brightness adjustment of the light source due to abnormal user operation and other irresistible abnormalities, the detection scheme adds a check button for adjusting and not adjusting the brightness of the light source. The brightness adjustment of the light source is turned on during the production of products that have been replaced by raw materials. The grayscale range of the image captured by the camera is 0-255. When the picture is in the middle grayscale value of about 120, it is most beneficial to identify defects. The grayscale of the picture can be adjusted by the lens. Aperture, adjust the exposure time of the camera and adjust the brightness of the light source to change. The exposure time is a fixed parameter, and it is not easy to change the exposure time due to the influence of the moving speed of the machine; the aperture of the lens belongs to the hardware, and it is inconvenient to move the hardware frequently. The brightness of the light source can be adjusted by hardware or software. During the implementation of the solution, the brightness of the light source is automatically adjusted by means of software adjustment, which can ensure that the images taken by the camera are in normal condition when the user's products of different raw materials are detected. The detected grayscale range is convenient for S3 to identify defects in the image later.
实施例二Embodiment 2
如图6所示,本申请提供了一种锂电池极片瑕疵实时检测处理***,包括:极片运动信息采集模块,视觉***,控制器及瑕疵处理装置。As shown in FIG. 6 , the present application provides a lithium battery pole piece defect real-time detection and processing system, including: a pole piece motion information collection module, a vision system, a controller and a defect processing device.
所述极片运动信息采集模块将极片的运动信息转化为电子信号,同时记录图像行信号的第一编码器值C1。The pole piece motion information acquisition module converts the pole piece motion information into electronic signals, and simultaneously records the first encoder value C1 of the image line signal.
所述视觉***由所述极片运动信息采集模块触发工作,所述视觉***采集图像瑕疵的位置信息,并根据瑕疵的位置信息与第一编码器值C1相运算从而转化为第二编码器值C2。The vision system is triggered to work by the pole piece motion information acquisition module, and the vision system collects the position information of the image defects, and calculates the first encoder value C1 according to the position information of the defect to convert it into the second encoder value. C2.
所述控制器接收所述极片运动信息采集模块的极片运动信息和所述视觉***的第二编码值C2,并发送瑕疵处理时间信号给瑕疵处理装置;在一实施例中,所述控制器为PLC控制器。The controller receives the pole piece motion information of the pole piece motion information acquisition module and the second encoded value C2 of the vision system, and sends a defect processing time signal to the defect processing device; in one embodiment, the control The controller is a PLC controller.
所述瑕疵处理装置对极片的瑕疵位置进行瑕疵处理作业,本实施例中瑕疵处理装置为贴标机,贴标机对瑕疵进行贴标标记,在其他实施例中,瑕疵处理装置还可以是喷码机。The defect processing device performs the defect processing operation on the defect position of the pole piece. In this embodiment, the defect processing device is a labeling machine, and the labeling machine marks the defects. In other embodiments, the defect processing device can also be a Inkjet printer.
所述视觉***包括图像采集模块、图像瑕疵识别模块、NG等级判断模块和图像存储模块。所述图像采集模块由所述极片运动信息采集模块触发,所述图像瑕疵识别模块根据灰度特征来识别极片是否带有瑕疵,所述NG等级判断模块设置为及时通知作业人员确认瑕疵等级偏小的极片是否满足生产需求,所述图像显示存储模块设置为实时将图像显示到屏幕上并储存到数据库上。The vision system includes an image acquisition module, an image defect identification module, an NG level judgment module and an image storage module. The image acquisition module is triggered by the pole piece motion information acquisition module, the image flaw identification module identifies whether the pole piece has flaws according to grayscale features, and the NG level judgment module is set to notify the operator in time to confirm the flaw level. Whether the small pole piece meets the production requirements, the image display storage module is set to display the image on the screen in real time and store it in the database.
在一实施例中,运动信息采集模块是通过编码器采集电池极片的运动距离和运动速度V,利用编码器触发相机拍照,能够消除相关技术中相机先拍照,然后将采集到的图片传输到工控机,编码器后响应记录图片基准编码值的响应时间,提高了采集极片瑕疵位置信息的准确性,图像采集模块使用线阵相机采集图像,由于线阵相机具有连续逐行扫描的特点,每一卷电池极片的涂布从头到尾全部都可以被扫描检测到,不会发生间断检测等其他情况,图像瑕疵识别模块根据灰度特征来识别极片是否带有瑕疵,具有识别准确、识别效率高的优点,识别出瑕疵的位置信息准确,NG等级判断模块用于及时通知作业人员确认瑕疵等级小的极片是否满足生产需求,图像显示存储模块设置为实时将图像显示到屏幕上并储存到数据库,便于用户进行瑕疵观察及追溯,瑕疵处理装置能够对瑕疵进行自动瑕疵处理记录,根据编码器收集的极片运动速度V和瑕疵处理装置的响应时间T,能够算出瑕疵处理装置何时对极片进行瑕疵处理作业,消除瑕疵处理装置的响应时间,提高瑕疵处理的精度。In one embodiment, the motion information collection module collects the motion distance and motion speed V of the battery pole piece through the encoder, and uses the encoder to trigger the camera to take pictures, which can eliminate the need for the camera to take pictures first in the related art, and then transmit the collected pictures to the IPC, the encoder responds to record the response time of the reference code value of the picture, which improves the accuracy of collecting the defect position information of the pole piece. The image acquisition module uses a line scan camera to collect images. Because the line scan camera has the characteristics of continuous progressive scanning, The coating of each roll of battery pole pieces can be scanned and detected from the beginning to the end, and other situations such as intermittent detection will not occur. The advantages of high recognition efficiency, the location information of the identified defects is accurate, the NG level judgment module is used to notify the operator in time to confirm whether the pole pieces with small defect levels meet the production requirements, and the image display storage module is set to display the image on the screen in real time. It is stored in the database, which is convenient for users to observe and trace defects. The defect processing device can automatically record the defect processing. According to the pole piece movement speed V collected by the encoder and the response time T of the defect processing device, it can calculate when the defect processing device is. Defect processing operations are performed on the pole pieces to eliminate the response time of the defect processing device and improve the accuracy of defect processing.
视觉***还包括灰度监测模块,为了避免用户操作异常以及其他不可抗拒的异常导致光源进行不必要的亮度调节,所以检测方案添加有光源亮度调节与不调节的勾选按钮,用户可在进行过原材料更换的产品生产时开启光源亮度调节,相机拍出来的图像灰度范围为0-255,当图片处于120左右的中间灰度值时对瑕疵识别最有利,图片的灰度可以通过调节镜头光圈、调节相机的曝光时间和调节光源的亮暗来改变。曝光时间是固定参数,且受机台运动速度的影响使曝光时间不好做改变;镜头的光圈属于硬件,经常移动硬件会不方便。光源亮度可以通过硬件调节也可以通过软件进行调节,方案实施的过程中采取通过软件调节的方式对光源亮度进行自动调节,达到在对用户不同原材料的产品检测时,相机拍出来的图像能够处于正常检测的灰度范围。The vision system also includes a grayscale monitoring module. In order to avoid unnecessary brightness adjustment of the light source due to abnormal user operations and other irresistible abnormalities, the detection scheme adds a check button for adjusting and not adjusting the brightness of the light source. The brightness adjustment of the light source is turned on when the raw material is replaced. The grayscale range of the image captured by the camera is 0-255. When the picture is in the middle grayscale value of about 120, it is most beneficial to identify the defects. The grayscale of the picture can be adjusted by adjusting the lens aperture. , Adjust the exposure time of the camera and adjust the brightness of the light source to change. The exposure time is a fixed parameter, and it is not easy to change the exposure time due to the influence of the movement speed of the machine; the aperture of the lens belongs to the hardware, and it is inconvenient to move the hardware frequently. The brightness of the light source can be adjusted by hardware or software. During the implementation of the solution, the brightness of the light source is automatically adjusted by means of software adjustment, so that the images taken by the camera can be in the normal state when the user's products of different raw materials are detected. Grayscale range for detection.
视觉***还包括检测方案切换模块,通过该模块的设置,可以从多个极片检测方案中选取合适的极片检测方案,即将事先写好的多个检测方案配置于不同名称的机种中,方便用户进行产品型号管理,同一型号的极片产品对应于一个机种名称,同一型号的产品拥有不同的检测要求和尺寸就需要设置相关参数进行区分,形成独立的瑕疵检测方案;另外,可以设置三个权限:操作员,工程师和管理员,操作员只能对机种选择和控制软件运行/停止权限,而工程师除拥有操作员的权限外,还可以配置其拥有检测参数设置的权限,而管理员拥有整个软件的操作权,不同的权限配有不同的初始密码,用户还可以根据需求新增不同权限的用户以及设置对应的密码。The vision system also includes a detection scheme switching module, through the setting of this module, a suitable pole piece detection scheme can be selected from multiple pole piece detection schemes, that is, multiple pre-written detection schemes are configured in models with different names, It is convenient for users to manage product models. The pole piece products of the same model correspond to a model name. If the products of the same model have different testing requirements and sizes, it is necessary to set relevant parameters to distinguish them, so as to form an independent defect detection scheme; in addition, you can set Three permissions: operator, engineer and administrator. The operator can only select and control the software to run/stop the machine. In addition to the operator's authority, the engineer can also configure the authority to have detection parameter settings. The administrator has the right to operate the entire software. Different permissions have different initial passwords. Users can also add users with different permissions and set corresponding passwords according to their needs.
本***相机在过辊的位置上对电池极片进行连续地瑕疵检测作业,避免机台抖动影响相机对极片的图像采集,保证能够准确地采集极片的瑕疵位置信息,利用编码器触发相机拍照,即编码器位置和相机位置的同步过程中,通过采集第一行图像时,立即同步输出一个IO信号给编码器,就相当于采集极片的瑕疵位置信息与图像采集波动无关,只与IO响应时间有关,IO响应时间一般在3ms内就能完成信号交互,将节省50ms的时间,在不同速度下,打标精度瞬间大大提升,其中本申请的锂电池极片瑕疵实时检测处理方法是根据灰度特征来识别极片是否带有瑕疵,具有识别准确、识别效率高的优点,识别出瑕疵的位置信息准确,瑕疵处理装置能够对瑕疵进行自动瑕疵处理记录,根据被编码器收集的极片运动速度V和瑕疵处理装置的响应时间T,能够算出瑕疵处理装置何时对极片进行瑕疵处理作业,消除瑕疵处理装置的响应时间,提高瑕疵处理的精度,本申请的锂电池极片瑕疵实时检测处理方法及处理***具有自动对瑕疵进行分 类处理、消除图像的优点,处理装置具有响应延滞、检测精度高、效率高、能满足电池极片高速生产实时检测需求的优点。The camera of this system continuously detects the defects of the battery pole pieces at the position of the roller, so as to avoid the influence of the machine shake on the image acquisition of the pole piece by the camera, to ensure that the defect position information of the pole piece can be accurately collected, and to use the encoder to trigger the camera. Taking pictures, that is, in the process of synchronizing the encoder position and the camera position, when collecting the first line of images, an IO signal is output to the encoder immediately, which is equivalent to collecting the defect position information of the pole piece, which has nothing to do with the fluctuation of the image acquisition, only related to the image acquisition fluctuation. The IO response time is related to the IO response time. Generally, the IO response time can complete the signal interaction within 3ms, which will save 50ms of time. At different speeds, the marking accuracy is greatly improved instantly. The real-time detection and processing method of lithium battery pole piece defects in this application is as follows: Identifying whether the pole piece has defects according to the grayscale features has the advantages of accurate identification and high identification efficiency, the position information of the identified defects is accurate, and the defect processing device can automatically record the defects. The plate moving speed V and the response time T of the defect processing device can calculate when the defect processing device performs the defect processing operation on the pole piece, eliminate the response time of the defect processing device, and improve the accuracy of the defect processing. The real-time detection processing method and processing system have the advantages of automatically classifying and processing defects and eliminating images, and the processing device has the advantages of response delay, high detection accuracy, high efficiency, and can meet the real-time detection requirements of high-speed production of battery pole pieces.